YesNoOk
avatar

The greatest hits of character feedback (Read 188558 times)

Started by PotS, May 22, 2009, 11:49:10 pm
Share this topic:
The greatest hits of character feedback
#1  May 22, 2009, 11:49:10 pm
  • ******
    • network.mugenguild.com/pots/
So I noticed that I (and many people) keep repeating myself on many points when testing different characters to give feedback to their authors, and it occurred to me that compiling some list of all or at least many of those common problems and solutions could turn out helpful to people.  Since my Mugen time is kinda (read: totally) being wasted lately staring at forums, I decided to put it to a better use and actually make that happen.


Some notes:
- In the second post I'll cover said common issues that should be fixed in every character, and in the third things that, while I don't point them out when testing characters because of being optional, can still make a character work better.

- This is not the bible of character issues, I won't mention how to fix a palette for instance, it's mostly aimed at people who are already comfortable with coding characters.  So if you're at an intermediate level of character coding you probably really ought to put one of those boredom times to a "good" use and give this a read.

- I'm not going to explain every code in great detail and you're not required to fully understand them for them to work, but the more you can understand the better.

- All the variables used here are just the values I used in the source of the copy/paste, you can change them to whatever variables you prefer.
Use anything you want from my works.  If you need to contact me use email, not private messages.
Re: The greatest hits of character feedback
#2  May 22, 2009, 11:50:00 pm
  • ******
    • network.mugenguild.com/pots/

COMMON MISTAKES


Air physics

a) Outside of MvC-type characters, each aerial special and super attacks should use their own landing state instead of sending the character to State 52.  The reason for this is that each of those attacks has a different recovery time, i.e. a time during which your character should be vulnerable while landing, and State 52 would just make them all recover too soon and have always the same animation etc

b) Special and super attacks (as well as some others) that take the character off the ground should never use physics=A, but physics=N instead, as physics=A automatically sends the character to State 52 when landing (see above).  You can then apply the gravity manually with veladd, keeping in mind that each of those attacks usually needs specific physics (read: you don't have to use the same acceleration for every attack)

c) The trigger used to change the character from an aerial state to a landing state (e.g. landing from a Shoryuken) should not simply be the commonly used "pos y>=0" as that will allow the character to go below the ground before actually landing.  You should use "pos y > -vel y" instead, like this:


[State 1000, Land]
type= changestate
trigger1= vel y > 0
trigger1= pos y > -vel y
value= 1010


d) Make sure that the character's statetype is always A (aerial) when it's not on the ground, as being hit out of the air without the proper statetype specified will then allow the character to walk on air.  I like to use this simple code in State -3 while making a character to make sure I don't miss that issue:


[State -3, Wrong StateType]
type= superpause
trigger1= pos y!=0 && statetype!=A && statetype!=L
time= 99999
ignorehitpause= 1


It will freeze the game if you forgot to look out for that issue, at which point you can just check the state the character is in and fix it.  Don't forget to remove or disable this when you publically release the character.




Attack direction

The start of every attack should make the character automatically face the direction in which the opponent is, which can be accomplished by simply adding the "facep2 = 1" parameter in each corresponding Statedef.  Notice that I said the start of each attack, that means that only the first State of an attack or chain of attacks (example: Fei Long's Rekka Ken) should have that line.




"Character doesn't turn after jumping over P2" bug

When you start editing the jump timings of Kung Fu Man (or whatever character) you may notice that if you then jump over the opponent without letting go of the jump direction (up-forward), your character will be facing away from the opponent instead of towards him.  Fixing this only takes one line of code, so add the "facep2 = 1" parameter to State 40.
Note that State 40 is a common state, so to implement this change you'll need to copy it from common1.cns into your character's coding files before editing.




Collision boxes

These few basic tips actually make Clsn2 easier to make while making characters more functional:
  • Do not use too many Clsn2 boxes in each frame, 2 (old SNK standard) or 3 (old Capcom standard) will pretty much always get the job done. For Clsn1, one is enough
  • Basic animations like standing, crouching or walking should use the same boxes for all frames
  • The Clsn2 on jumping animations shouldn't come all the way down to the feet, characters aren't supposed to be sweeped during jumps
  • Standing get hit (anims 5000-5017), turning (5) and guarding (120, 130, 140, 150) animations should use the same Clsn as the standing animation (anim 0)
  • Likewise, crouching get hit (anims 5020-5027), turning (6) and guarding (121, 131, 141, 151) animations should use the same Clsn as the crouching animation (anim 11)
  • Walking animations should use Clsn2 similar to anim 0 as well
  • Make sure the air get hit Clsn2 (anims from 5030 to 5071) aren't too skimpy, no one likes missing juggles because of bad Clsn on the opponent

All these pointers are followed in my latest characters if you want a reference, and you can always check KOD's KOF Clsn tutorial.




Combos

It's nice when the coder puts some thought into which moves should allow combos and whatnot, I remember wanting to incluse some characters in combo videos only to then get sad in the pants because they had nothing special, or nothing at all.
That does not mean that everything should chain six times, just... don't forget to set cancels from normal attacks, and it's nice when a juggle or two can be done.

Also note that when a normal attack is cancellable, that means it can be cancelled into any special and super attack.




Constants - head and waist positions

So many people forget to set these it's not even funny.  They are used to let the opponent know where the character's head and waist are, so they are essential to making your character react properly to being thrown, for instance.  Make sure you set them properly in every character.

Some people like to set them according to sprite 5000,0, others according to the stance, and I can see the advantages of each of those options, so it's up to you.  Either way, you get this position like you would for say an explod.  You open the SFF and AIR with an adequate program (like Fighter Factory) and make an anim with the sprite you want to use to get the position.  Then click and drag the anim axis (crosshair) until it's on the character's head and check the X and Y position, that's your head.pos.  Repeat the process for the waist (mid) position to get the mid.pos values.




Damage levels

Just a general pointer here, since so much could be said for each individual character's damages, but:

a) The easier a move is to land, the less damage it should do
b) Likewise, the easier a move is to combo into or out of, the less damage it should do




Damage dampening

It is important that a character starts causing less damage as his combos get longer, for the sake of needing to catch the opponent more than once to win.  There are many ways to do this, but for the purpose of this thread I find it appropriate to use a simple effective code as an example:


[State -2, Damage Dampener]; Scaling in action
type= attackmulset
trigger1= numenemy
value= ifelse(enemynear, gethitvar(hitcount) < 3, 24, ifelse(enemynear, gethitvar(hitcount) >= 24, 2, 26 - enemynear, gethitvar(hitcount))) / 24.0
ignorehitpause= 1

[State -2, Damage Dampener]; Full damage
type= attackmulset
trigger1= numenemy
trigger1= enemynear,movetype!=H || (enemynear,stateno=[120,155])
value= 1.0
ignorehitpause= 1


Notice how the attack multiplier depends on the number of hits P2 has received.  Or this version based on Marvel vs Capcom's system (if I didn't mess up, was made a long time ago) which at this point is reposted in some places but is worth noting:


[State -2, Damage Dampener]; Scaling in action
type= attackmulset
trigger1= numenemy
value= ifelse(enemynear, gethitvar(hitcount) = 0, 1, ifelse(enemynear, gethitvar(hitcount) = 1, 0.9, 0.8**enemynear, gethitvar(hitcount)))
ignorehitpause= 1

[State -2, Damage Dampener]; Full damage
type= attackmulset
trigger1= numenemy
trigger1= enemynear,movetype!=H || (enemynear,stateno=[120,155])
value= 1.0
ignorehitpause= 1





Debug flood

If you see any debug messages while making the character be sure to fix them, usually it's only a matter of adding numhelper(ID), numenemy etc triggers where needed.  Leaving a character with debug flood is an immediate testament of how much thought was put into it.




Hitdef

Before mentioning specific issues, I should say that the more Hitdef parameters you specify, the easier it is to make every hit behave properly and consequently make the character solid.  Ideally you'd specify all parameters related to the time P2 is stunned (hittime) and the distance he travels when hit (velocities, yaccel).




Hitdef - ground velocities

Very, very often, mostly in MvC characters, people will use really low hit velocities in attacks to favour combos.  This technique was coined "Brazillian chains" at some point (desculpem-me pessoal, haha).  But you know what?  All the combo games this tries to emulate do not use such low velocities.  Low velocities only accomplish adding potential infinites (walking jabs) and a weak feeling of impact on each hit, all that just so that the character can do a boring six (or eighteen) move chain instead of "just" around three or four moves.

I'm not going to make a list of velocities for each game here... the point is, just take a quick look at the source game and see how far each attack type (light, medium, hard) hits back the opponent, then recreate that distance in Mugen (approximately or accurately, whatever suits you).




Hitdef - hit times

Very similar to the above, but related to how long the opponent is stun by a hit.  Often you'll see Mugen characters stunning the opponent for too long with weak attacks, or not enough with hard attacks.
The answer here is the same, take a look at the source game as counting ticks is actually much easier than making them up yourself until they work right.  If you want a quick fix on some values, you can use like 10 for weak attacks, 14 for medium and 18 for hard.

Would do everyone good to pay attention to air.hittime as well.  And, while I'm at it, the pausetime too, for example in chain characters having too short pauses will make the chains feel chaotic.




Infinites

There's so many variables to consider here that there's no way to have absolute solutions, but there are some pointers one can follow:

a) The rule of thumb.  Make sure that a combo always leaves the character at less of a positional/frame advantage with each repetition, the most basic form of which being pushing the opponent further away every time you do it.  This means for instance that if you jab the opponent and keep walking forward then jab him again, the distance at which the opponent was by the time you hit him with the second jab must be longer than when you did the first one.  Actually the details on this rule could go on forever, but hopefully the basic idea is here already.

b)  Juggling.  If you're using limited juggle points make sure that every attack (eventually) subtracts them.  If you're using unlimited juggling then pay extra attention to a) when hitting the opponent in the air.




Invulnerability
A move being invulnerable to certain attacks does not always mean you should use a NotHitBy, it is often a matter of which areas of the character have or not Clsn2.
Consider Zangief's Double Lariat for instance, it doesn't avoid mid-level attacks and projectiles because of a NotHitBy but simply because he has no Clsn2 on his midsection and thighs.  Keep that in mind when you want a move to have an edge but not full-on invincibility.




Jumping normal attack properties

There's not much to say about this one, but jumping normal attacks should all cause light successful hits on the opponent, but guarded hits according to their strength (light, medium, hard).  That means that all jumping attacks should have the same hit properites of a ground weak attack, and guard properties corresponding to a ground attack of the same strength.
One of the reasons behind this, in most games, is that if a jumping hard punch caused the same hit as a standing hard punch, then the opponent would be knocked too far away for jump-in combos to be effective.




Jumping physics

Bad jumping velocities alone can throw off an entire character's aerial gameplay, so if you're not going to take the physics directly from the source game (or are making an original character) at least make sure to adjust the jumping velocities and the "yaccel" constant until the jumps feel just right.  Kung Fu Man's default 0.45 yaccel is a bad value by common standards (some characters are supposed to be floaty like that though) and 0.5 is usually considered a better value, but either way it's the combination of jump velocities and acceleration that determine a jump's floatiness, not either of them on their own.




Landing from a jump (State 52)

State 52 is a common state, so to implement these features you'll need to copy it from common1.cns into your character's coding files.
When a character lands from a jump...
  • Both X and Y velocities should be reset to 0
  • Position Y should be, of course, set to 0 as well
  • As a general rule, should regain control immediately as it lands, i.e. Statedef 52 should specify "ctrl = 1"
  • If you want to enable "trip guard", the ability to guard a low attack (usually kicks) as soon as you land, you must add this piece of coding to the state:


[State 52, Guard]
type= changestate
trigger1= inguarddist
trigger1= ctrl && command="holdback"
value= 120





Rolling (KOF / CvS)

This is the kind of game-specific thing I rather not mention, but so many people consistently make this mistake that it should be worth mentioning.
Rolls are not supposed to be completely invulnerable, they should be throwable at any time and completely vulnerable near the end.  To make a character only vulnerable to throws this is what is used:


[State 710, HitBy]
type= hitby
trigger1= animelemtime(6) < 0; Depending on your animation, of course
value= SCA, AT
time= 1





Running then crouching

Games usually don't allow characters to crouch while running (or dashing), the reasons for which can be debated but it for one makes it easier for you to position yourself while preparing a crouching attack or starting a special move motion.
This is easy to implement in Mugen, all it takes is removing control from the running state.  Then, so that you can still attack while running, you use "is in the running state" as an optional condition to executing a ground move in the command file.  Here's an example:


[State -1, Standing Light Punch]
type= changestate
value= 200
triggerall= command!="holddown" && command="x"
triggerall= statetype!=A
trigger1= ctrl || (stateno=[100,101]); "Has control or is running"


See trigger1? In this example State 100 is the running state and 101 is the stopping after running state.
Note that removing control from the running state makes it impossible for the character to jump out of it, so you'll need to add this in the state:


[State 100, Jump]
type= changestate
trigger1= command="holdfwd" && command="holdup"
value= 40





SFF

a) Make sure everything is aligned properly so that the character doesn't jitter while animating.  Remember that if you use a sprite pack like those by Just No Point you can simply align the stance perfectly then copy its coordinates to every other sprite.

b) Crop the entire thing when the char is ready for it.  Cropping means removing excessive and unneeded transparent portions of a sprite, and Fighter Factory even has the option to crop everything with one click (takes a while though, if you can use sprmaker that's a lot faster).

c) This is just a trivial reminder, but always make sure that the small portrait's size is 25x25 pixels and that the large portrait's is 120x140, and that both are properly aligned.  Cybaster will thank you dearly if you pay attention to this. ;P




SND

With the possible exception of ambience SFX, Mugen characters do not need Stereo sounds as that is already handled by the engine according to where in the screen your character plays them.  Saving sounds effects in Stereo is only a waste of space.

And, similarly to the SFF, be sure to crop sounds and not save them with a lot of blank (silent) space.




Special move levels

Somehow there's this train of thought that grew in Mugen and says that the strong version of a special is the only one you'll want to use while the others should just be lesser versions of it.  Wrong!  Every level of a special move (weak, medium, strong) should be useful for its own reasons.

Take Ken's Shoryuken for instance, do you always want to use the strongest version and be open to attacks?  No, any experienced player will alternate between the different levels and only use the strongest in combos.  That is because every level has its strengths: light is the quickest (hard to punish), medium has the most invulnerability (best anti-air) and strong does the most damage (best in a combo).  The same principle should be attempted in most specials, don't make light and medium versions be only filler.




Statetype limiting in the command file

Sometimes, when people want a move to only be performable while standing, they'll use "statetype = S" as a trigger, or if only while crouching "statetype = C".  That is wrong in most cases, as for instance making Hadouken impossible to perform while crouching makes the motion harder to execute (starts by crouching, then must wait until the character stands again to press punch).

For ground special and super attacks, such triggers should be replaced with "statetype!=A" instead; and for normal attacks what decides whether a standing or crouching attack is used should not be the statetype trigger, but rather whether the player is pressing the down direction or not.  Examples:


[State -1, Hadouken]
type= changestate
value= 1000
triggerall= command="hadouken"
triggerall= statetype!=A
trigger1= ctrl || (stateno=[100,101])

[State -1, Standing Hard Kick]
type= changestate
value= 250
triggerall= command!="holddown" && command="c"
triggerall= statetype!=A
trigger1= ctrl || (stateno=[100,101])

[State -1, Crouching Hard Kick]
type= changestate
value= 450
triggerall= command="holddown" && command="c"
triggerall= statetype!=A
trigger1= ctrl || (stateno=[100,101])





Velocities

Nothing specific to say here, just that bad velocities alone can ruin a character so be sure to spend some time tweaking them until they're just right.  No one likes to see a character with floatiness, odd movement trajectories, or nigh instant full screen dashes.
Use anything you want from my works.  If you need to contact me use email, not private messages.
Last Edit: June 04, 2009, 09:43:32 am by PotS
Re: The greatest hits of character feedback
#3  May 22, 2009, 11:51:35 pm
  • ******
    • network.mugenguild.com/pots/

OPTIONAL FIXES


Corner Pushing
It is common knowledge now that Mugen's corner push (hitting a character near the corner) system is faulty, so to have proper corner gameplay it's always recommended overriding the common system with something more true to fighting games.
There have been many versions of corner push codes to somewhat go around that, but here's my own you can use (...which like every code here has been available for a long time in my chars):

1) First of all you'll have to disable the corner push in all Hitdefs, by setting each of said parameters to 0 like so:

ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
down.cornerpush.veloff = 0

(Setting only "ground.cornerpush.veloff" to 0 is enough if you're not touching the others, since they all default to the value specified in it.)

2) Now for the actual code, add this to State -3:


[State -3, Corner Push]; Reset
type= varset
trigger1= fvar(5)
trigger1= numtarget
trigger1= (target, hitover) || (target, gethitvar(hitshaketime) > 0 && target, time <= 0)
fvar(5)= 0

[State -3, Corner Push]; Get initial velocity
type= varset
trigger1= movecontact=1 && numtarget
fvar(5)= (target, gethitvar(xvel))
ignorehitpause= 1

[State -3, Corner Push]; Apply corner push
type= posadd
triggerall= fvar(5)
triggerall= (statetype = S || statetype = C) && numtarget
triggerall= !hitpausetime && (target, gethitvar(hitshaketime) <= 0)
triggerall= (target, statetype = S || target, statetype = C) && !(target, gethitvar(yvel)) && !(target, hitfall); See note below
trigger1= target, frontedgebodydist <= abs(target, vel x)
trigger1= (target, gethitvar(xvel) * target, facing) > 0
trigger2= target, backedgebodydist <= abs(target, vel x)
trigger2= (target, gethitvar(xvel) * target, facing) < 0
x= ifelse(target, frontedgebodydist <= 0, -1, 1) * (target, facing) * fvar(5)

[State -3, Corner Push]; Apply friction to the velocity
type= varset
trigger1= numtarget
trigger1= target, gethitvar(hitshaketime) <= 0
fvar(5)= fvar(5) * 0.85


Note:  This code was designed for types of gameplay where the attacker doesn't suffer corner push if the opponent is in the air (SF, KOF, so on), if you want to change that aspect you can change the line signaled above with "triggerall= (target, statetype != L)".  There's no guarantee that that change will make it work perfectly, but it will still get the job done.

One added benefit of using a custom system like this is that you can then reset or disable corner push at any time you want by making that var 0, and you'll want to reset it for instance when a super move's superpause happens.




Fall Recovery handling for the opponent

Games like King Of Fighters and Capcom vs SNK only have fall recovery near the ground, not the aerial kind Mugen has, so allowing the opponent to use the latter can easily cause unwanted situations (such as P2 recovering from a Shoryuken and hitting you back).  Some people solve this by simply disabling fall recovery entirely for the opponent, which then of course also prevents them from doing the ground recovery type those games allow.  Here's one way to allow ground recovery but not air recovery:

1) Specify the "fall.recover" and "fall.recovertime" Hitdef parameters for every attack the character has.  Set "fall.recover" as you usually would (0 to not let P2 recover, 1 to let him), but then set "fall.recovertime" to a high value (I typically use 120) so that P2 won't actually be allowed to recover on his own but only when you allow him, and you allow him by adding this code to State -2:


[State -2, P2 Safe Fall]
type= targetstate
trigger1= numtarget=1; Just to prevent Simul mode shenanigans
trigger1= target,command="recovery"
trigger1= target,pos y>=-20 && target,vel y>0
trigger1= target,alive && target,hitfall && target,gethitvar(fall.recover)
trigger1= target,stateno=5030 || target,stateno=5035 || target,stateno=5050 || target,stateno=5071
value= 5205
ignorehitpause= 1


2) Then add this simple state to your coding files:


[Statedef 5205]
type= A
physics= N
movetype= H

[State 5205, End]; Sends character back to his own recovery states
type= selfstate
trigger1= 1
value= ifelse(pos y<-20, 5210, 5200)





Flagging the recovery frames of an attack

In fighting games every attack is divided into startup, active and recovery frames.  Startup frames are the time it takes for a move to be able to hit (Ryu's jab animation before his arm is fully extended), the active frames where it can actually hit the opponent (arm extended) and recovery frames where the character is harmless and vulnerable (retracting the arm).

Startup and active frames automatically behave properly in Mugen, but the recovery frames you'll have to manually specify them for each attack, and all it takes is setting a state to movetype=I when the attack becomes harmless.  Why do that?  Because if you don't, the opponent will guard your moves longer than he should which makes them harder and more confusing to counter; also so that counter hit systems work properly and your character doesn't receive counter hit damage while for instance falling from a Shoryuken.

Example, Ryu's standing jab enters recovery phase (can no longer hit) from the third frame, so:


[State 200, Idle]
type= statetypeset
trigger1= animelemtime(3)>=0
movetype= I





Juggle "resets"

In fighting games, resetting a juggle means hitting an opponent out of the air with a move that makes him land on his feet, for example doing a weak Akuma hurricane kick in SF3 or SF4 and then using a normal attack on the falling opponent.  Again this is something that doesn't happen in Mugen and can't be reproduced by normal means (Hitdef parameters), so to add this feature to your character you can follow this method:

1) For every attack that isn't supposed to make the opponent fall on his back, but rather land on his feet, give its Hitdefs an ID.  I'll be using ID=200 here.

2) Add this code to State -2:


[State -2, P2 Recovery]; Notice how ID 200 is being used. ID must match those Hitdefs
type= targetstate
trigger1= numtarget(200)
trigger1= (target(200), stateno=5020) && (target(200), alive) && (target(200), hitfall); Hit out of the air while alive and already falling
ID= 200
value= 5025
ignorehitpause= 1


3) And create the corresponding State 5025 (or whatever you prefer) of course:


[Statedef 5025]
type= A
physics= N
movetype= H
velset= 0, 0
facep2= 1

[State 5025, HFS]; Resets the fall parameter, so that the opponent will not fall on his back
type= hitfallset
trigger1= 1
value= 0

[State 5025, End]; Sends opponent back to his own states
type= selfstate
trigger1= 1
value= ifelse(pos y, 5020, 5000)





Juggle "resets" - invulnerability

I wasn't quite sure whether this one should be mentioned, but well since there is one alternative to implementing this that is only one line of code (times N), it should be worth it.  You can plain simply disregard this if your character allows opponents to air guard ground attacks and suffers corner push when hitting them in the air.

When you connect one of those hits that makes the opponent land on his feet, he should be invulnerable until that happens.  Just fire up any SF or KOF game, hit a jumping opponent with a light punch and then try to hit him again as he falls.
There are several ways to implement this in Mugen, but the one most suited for a summarized tutorial consists of making every Hitdef only activate if the opponent isn't in hit states that make him land on his feet.  Like so:


[State 200, Hit]
type= hitdef
trigger1= (p2stateno != [5020, 5040])
trigger1= animelem=3
...


Note: For special and super moves you may want to use just "p2stateno != 5040" instead.  If your ground attacks are set up so that the opponent can guard them in the air then "(p2stateno != [154, 155])" should be added if needed.

It is also a good idea to set air.hittime parameters to a high value so that the opponent cannot hit you back either in these situations.




P2stateno

There's this elusive Mugen bug where if a helper (or possibly player 3/4) hits you in the exact same moment you connect with a throw, your character will be hit out of it but your target will still be sent to custom states and (usually) get stuck there.  To solve this simply forget that the p2stateno Hitdef parameter exists and get used to TargetState instead.

To achieve the same effect as P2stateno in throws, you can keep using P1stateno then use TargetState when the character starts throwing.  Example:


[State 800, Hit]
type=hitdef
(...)
p1stateno= 810

[State 810, Throw]
type= targetstate
trigger1= !time && numtarget
value= 815





"Size box" variations

Ever notice that, for example, in Street Fighter if Ryu does a hurricane kick and you crouch he'll just go over you?  Ever noticed that Mugen is rarely like that?  That's because the size of a character in a fighting game, or rather its "pushing area", changes depending on whether it is standing, crouching, jumping and so on.  In Mugen it is always the same, however, so a character is always equally easy to push no matter if he's in any of those situations.
There are two ways to fix this in Mugen, one requires changing every single character in existence, while the other just goes on your character and makes it react to others as it should.  The latter is of course the one I used, and it is merely one piece of code that goes in State -3:


[State -3, Variable Height]
type= playerpush
triggerall= statetype=A && movetype!=H && numenemy
triggerall= p2bodydist x = [-(enemynear,const(size.ground.back) + enemynear,const(size.ground.front)), 0]; checks if both characters are within each other's width
trigger1= p2statetype=S
trigger1= p2dist y >= (enemynear,const(size.height) - 22)
trigger2= p2statetype=C
trigger2= p2dist y >= (enemynear,const(size.height) - 48)
trigger3= p2statetype=L
trigger3= p2dist y >= 11
value= 0
ignorehitpause= 1


This will also make jump-ins and crossups easier to execute, or basically anything related to air to ground contact.
The values used here (22, 48 and 11) aren't some universal rules you must follow but rather some I cooked up while checking some games, so, while they are fine, you're free to modify them for each character.




Target facing

In Capcom games (and others as well), every attack you land on P2 that doesn't make him fall will make him face your way, to prevent all sorts of back attack shenanigans. This can be done in Mugen by adding this piece of code to State -2:


[State -2, P2 Facing]
type= targetfacing
trigger1= movecontact=1 && numtarget=1
trigger1= !(target,hitshakeover) && !(target,hitfall) && (target,time<=1)
value= ifelse(p2dist x>=0, -1, 1)
ignorehitpause= 1





Throw limitations

Throws should not simply work anytime anywhere, there are several situations in fighting games where a character can't be thrown for the sake of fairness.  Those situations are: while starting to jump, after guarding an attack and while being hit (not in every game).
Again there are several ways to go around and do this, but I used a variable to keep track of those situations my self, like so:


[State -2, Throws Disallowed]; Resets condition every tick to check again
type=varset
trigger1= 1
var(38)= 0

[State -2, Throws Disallowed]
type=varset
trigger1= (enemynear,stateno=[150,155])
trigger2= (enemynear,movetype=H && enemynear,statetype!=A)
trigger3= (enemynear,stateno=[5020,5040]) && !(enemynear,hitfall)
trigger4= ((enemynear,stateno=0) || (enemynear,stateno=52)) && (enemynear,prevstateno=[5000,5040]) && ((enemynear,time<=0) || !(enemynear,ctrl))
trigger5= (enemynear,stateno=0) && (enemynear,prevstateno=52) && ((enemynear,time<=0) || !(enemynear,ctrl))
trigger6= (enemynear,stateno=40) && (enemynear,time>=1 || enemynear,prevstateno=0 || enemynear,prevstateno=52)
var(38)= 1


Depending on what kind of character you are making, you can change those triggers to fit the game (particularly the first three ones), what I'm using here is Capcom's typical setup (and you can guess why).

And now that you have a variable keeping track of the throw conditions, you can use that to trigger the Hitdefs of throws, example:


[State 800, Hit]
type= hitdef
trigger1= animelem=2
trigger1= var(38)=0; opponent is not in an unthrowable situation
attr= S, NT
...





"Underground" juggles

Because of one asinine aspect of Mugen's common states (common1.cns), a falling juggled character will go below the ground just before hitting it.  If you hit that character again in the precise moment it's below the ground (more common than you'd think) it'll still be below the ground which always looks funky.  See an example:



I simply cancelled Kung Fu Palm into Triple Kung Fu Palm, and the latter caught the opponent below the ground as mentioned.

You can fix this with this code in State -3:


[State -3, Prevent Undergound Juggles]
type= targetbind
trigger1= movehit=1
trigger1= numtarget=1 && numenemy
trigger1= (target,time<=1) && (target,ID=enemynear,ID); this is just to prevent Simul issues as usual
trigger1= !(target,hitshakeover) && (target, hitfall) && (target, pos y>0)
pos= ceil(p2dist x), ceil(-pos y); keeps P2 at the same horizontal distance, but resets his Y position
ignorehitpause= 1
Use anything you want from my works.  If you need to contact me use email, not private messages.
Last Edit: September 30, 2009, 11:25:19 pm by PotS
Re: The greatest hits of character feedback
#4  May 22, 2009, 11:51:51 pm
  • ******
    • network.mugenguild.com/pots/
...And that's all I could think of in a couple of writing sessions.  Consider this post a placeholder maybe.
Use anything you want from my works.  If you need to contact me use email, not private messages.

BC

Re: The greatest hits of character feedback
#5  May 23, 2009, 04:13:04 pm
  • ****
    • UK
    • www.mugenevolution.co.uk/Forum
Thanks POtS thats some great helpful information there some of which i will definatly use.


always wondered how your characters were so flawless ;) thanks for sharing.
Retired from mugen but not development
Re: The greatest hits of character feedback
#6  May 23, 2009, 08:23:36 pm
  • avatar
  • **
This thread is very helpful. Love the wrong StateType code, and the random mention of teh Ken! I'm bookmarking this thread.
Re: The greatest hits of character feedback
#7  May 24, 2009, 01:04:01 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Quote
P2stateno

There's this elusive Mugen bug where if a helper (or possibly player 3/4) hits you in the exact same moment you connect with a throw, your character will be hit out of it but your target will still be sent to custom states and (usually) get stuck there.  To solve this simply forget that the p2stateno Hitdef parameter exists and get used to TargetState instead.

Although targetstate is far better, priority = 4,miss in the hitdef itself would also prevent that.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: The greatest hits of character feedback
#8  May 24, 2009, 01:09:08 am
  • ******
  • Loyal to the Game
  • I'M SHADYYYYYYYYYY
    • USA
    • http://jesuszilla.trinitymugen.net/

  • Online
Personally, for landing triggers, Vans and I use Pos Y + Vel Y >= 0. This pretty much prevents sinking in any form.
Re: The greatest hits of character feedback
#9  May 24, 2009, 01:13:42 am
  • ******
    • network.mugenguild.com/pots/
Although targetstate is far better, priority = 4,miss in the hitdef itself would also prevent that.
How?  The problem here is that the priority is only evaluated against the throw target or something along those lines.  I see what you're trying with the Miss parameter, but I already said it happens most commonly with throws, which already always have that anyway.

Personally, for landing triggers, Vans and I use Pos Y + Vel Y >= 0. This pretty much prevents sinking in any form.
That sounds like it can make the char land one tick too soon. e.g. a char falling with Y=12 velocity lands when pos y=-12 instead of on the very next tick.
It's essentially the same though, other than the ">=" sign.  Pos Y + Vel Y > 0 <=> Pos Y > -Vel Y
Use anything you want from my works.  If you need to contact me use email, not private messages.
Last Edit: May 24, 2009, 01:27:25 am by PotS
Re: The greatest hits of character feedback
#10  May 24, 2009, 11:20:53 am
  • ****
Hmm, the underground juggles always bothered me, thanks for the code :P

No Borders, No Nations
Re: The greatest hits of character feedback
#11  May 25, 2009, 02:56:14 am
  • ***
  • Master of Vicodin
Hohoho, I'm so using it in my FFU template. 8)

Only note I can think of, just so the "Velocities" section won't look too empty, post a link for that Movement Coder tool, I use it every time I make my own moves.

Edit: Also, maybe a pointer for all those AI taking control issues could help aswell.

[size=5pt]Edit2: And head/mid pos stuff.[/size]
Last Edit: May 25, 2009, 03:00:25 am by Dr. H
Re: The greatest hits of character feedback
#12  May 25, 2009, 03:47:52 am
  • avatar
  • **
Hohoho, I'm so using it in my FFU template. 8)

Only note I can think of, just so the "Velocities" section won't look too empty, post a link for that Movement Coder tool, I use it every time I make my own moves.

Edit: Also, maybe a pointer for all those AI taking control issues could help aswell.

[size=5pt]Edit2: And head/mid pos stuff.[/size]

There's a movement coder tool?
Re: The greatest hits of character feedback
#13  May 25, 2009, 03:55:09 am
  • ******
    • network.mugenguild.com/pots/
Hohoho, I'm so using it in my FFU template. 8)

Only note I can think of, just so the "Velocities" section won't look too empty, post a link for that Movement Coder tool, I use it every time I make my own moves.
Dunno, didn't want to pass off the image that you must make everything perfectly accurate. How helpful is it when making up velocities?

Quote
Edit: Also, maybe a pointer for all those AI taking control issues could help aswell.
Hm, gets so specific to each activation method that I wouldn't know what to say other than "don't leave it like that", hehe.

Quote
Edit2: And head/mid pos stuff.
Oh, good one.  In the meantime people may just click this old link:  http://mugenguild.com/forumx/index.php?topic=45102.0
Use anything you want from my works.  If you need to contact me use email, not private messages.
Re: The greatest hits of character feedback
#14  May 25, 2009, 04:36:28 am
  • ***
  • Master of Vicodin
Quote
Dunno, didn't want to pass off the image that you must make everything perfectly accurate. How helpful is it when making up velocities?
That tool isn't really about accuraccy, it just make things more... polished, especially if you know the patterns that your favorite company uses when making similar moves. People will understand it's not a requirement, just a suggestion.

BTW someone gotta reupload it, just checked the old link and it's gone. :P

Quote
Hm, gets so specific to each activation method that I wouldn't know what to say other than "don't leave it like that", hehe.
Following topic's title filosofy, just this two should solve things 95% of times:

*Make sure that the XORs commands are identical;
*Make sure your commands are really human impossble. Bia once suggested that the only real commands that fits this description is the ones that requires all buttons to be pressed at once, screws keyboard buffer limit or something.
Re: The greatest hits of character feedback
#15  May 25, 2009, 04:53:27 am
  • ******
  • I got a PM.
Hey man,

Do you got something on your A.I. I've played with it a lot but still haven't figured out what you are doing in your var. I don't want you to go into Winanne's stuff there is all ready a tutorial. I'm talking about you implementation ai triggers and your use of var in those triggers. Thanks for the info man.
Re: The greatest hits of character feedback
#16  May 25, 2009, 05:05:48 am
  • ***
  • Master of Vicodin
Hm, you're talking to me or to POTS? Sorry, I'm not sure of what kind of info you're asking for, but I'm willing to help you if I can.
Re: The greatest hits of character feedback
#17  May 25, 2009, 05:08:26 am
  • ****
  • A frame here, a pixel there.
Nice collection of stuff here, very helpful. With regards to the playerpush thing, I'm hoping that one of these Mugen clones in development will eventually implement an AIR-based push box standard (CLSN0?) so that we could do it the way most of the commercial games do.
Re: The greatest hits of character feedback
#18  May 25, 2009, 07:28:51 pm
  • ******
  • I got a PM.
P.O.T.S I want to know his method of triggers while using the winanne Ai activation.
Re: The greatest hits of character feedback
#19  May 26, 2009, 12:20:11 am
  • ******
    • network.mugenguild.com/pots/
Oh, now that I see what you're asking and answered by PM I guess it's something that can go in there too, some basic pointers on how to not make AI's too dumb or too hard.
Use anything you want from my works.  If you need to contact me use email, not private messages.
Re: The greatest hits of character feedback
#20  May 26, 2009, 07:04:56 am
  • ******
  • Just a butcher on a mission.
    • www.justnopoint.com/lbends
If you don't add a bit of randomness, even the seemingly safest moves will be exploitable by the player.  This is a guarantee.  (Also something I have been guilty of in the past)

AI throws need to have a limiter so it won't spend an entire match trying to grab something like Onslaught.

Something I have learned recently is to have a statetypeset in every attack to set movetype=I after the hitframes are over.
This is also courteous vs. AI that relies on movetypes to know when to block.
Last Edit: May 26, 2009, 07:08:21 am by Insanius
Re: The greatest hits of character feedback
#21  May 26, 2009, 05:31:57 pm
  • ***
  • Master of Vicodin
Quote
This is also courteous vs. AI that relies on movetypes to know when to block.

Hitdefattr works better, really. Movetypes will miss opportunities to punish whifed DPs (for a most common examplar) as they aways have movetype = a for counter hit, and will act dumb if the opponent player keep spamming weak jabs repeatedly. ;P

Sorry, off-topicness.
Re: The greatest hits of character feedback
#22  May 27, 2009, 12:26:26 am
  • ***
  • Origin of Darkness
    • www.freewebs.com/demandforce/
This is not the bible? in some way it is, well to the mugen world at least  ;D


† Today you beg for your life, but one day you will beg me for your death †
Re: The greatest hits of character feedback
#23  May 27, 2009, 12:59:53 am
  • ******
  • As a general rule, should regain control immediately as it lands, i.e. Statedef 52 should specify "ctrl = 1"
KFM said:
*In that topic at Guild by PotS about "feedback greatest hits"
*"As a general rule, should regain control immediately as it lands, i.e. Statedef 52 should specify "ctrl = 1"" <- this part is wrong
*Control is given on *at least* the second tick in many games, even KOF. It's not instantaneous
If I struggled to the end of my determination, to the end of my way of life with my followers, if the result is ruin, then this ruin is inevitable. Grieve. Shed tears. But you cannot regret.
Re: The greatest hits of character feedback
#24  May 27, 2009, 02:28:38 am
  • ***
  • Origin of Darkness
    • www.freewebs.com/demandforce/
In SFEX they did regain control immediately when they land.
but some move if they land afther special attack in mid-air, they will have some delay.

I think it depend of the movement of the attack, whatever it should have delay after they land or not.

Also I believe all high/super jump should  :)


† Today you beg for your life, but one day you will beg me for your death †
Re: The greatest hits of character feedback
#25  May 27, 2009, 03:00:23 am
  • ******
    • network.mugenguild.com/pots/
Quote
this part is wrong
*Control is given on *at least* the second tick in many games, even KOF. It's not instantaneous
Mugen characters can't execute moves on time=0 without workarounds anyway, so the only difference between giving them ctrl on time=0 and time=1 is whether or not you want trip guard.  And since trip guard has to be added manually either way, there is no practical difference unless I'm forgetting something.
Use anything you want from my works.  If you need to contact me use email, not private messages.
Re: The greatest hits of character feedback
#26  June 01, 2009, 04:51:21 am
  • ***
  • ITS MORPHING TIME!!!
    • Trinidad and Tobago
    • http://www.mediafire.com/?qt39a5kvdd0a5,sf1v19c639n01,e3ctsei5sid20,5i0jjcjri7zvl,g2led8bz1uj54,47gwixx3kw399,ytydyqlxfd7b4
Quote
SND

With the possible exception of ambience SFX, Mugen characters do not need Stereo sounds as that is already handled by the engine according to where in the screen your character plays them.  Saving sounds effects in Stereo is only a waste of space.

And, similarly to the SFF, be sure to crop sounds and not save them with a lot of blank (silent) space.

I have a question about sounds? I ripped a lot of sounds from various games and i normally save them in CD quality which is Stereo, so would i have to re-rip or just convert them into Mono? 

Re: The greatest hits of character feedback
#27  June 01, 2009, 10:56:30 pm
  • *****
  • ???
    • UK
    • Skype - koopakootmugen

  • Online
Quote
Likewise, crouching get hit (anims 5020-5027), turning (6) and guarding (121, 131, 141, 151) animations should use the same Clsn as the crouching animation (anim 11)

I think crouching get hits should be bigger than anim 11 for smaller characters. Some moves that whiff on small crouching opponents will hit them if they were hit by another move (usually a jump in).
 
Re: The greatest hits of character feedback
#28  June 04, 2009, 09:49:34 am
  • ******
    • network.mugenguild.com/pots/
I have a question about sounds? I ripped a lot of sounds from various games and i normally save them in CD quality which is Stereo, so would i have to re-rip or just convert them into Mono?
I haven't noticed any quality loss when converting to Mono, so that should be enough.  When I was fixing some stuff I liked to extract the whole SND, run the wavs through GoldWave's batch processing then mount the SND again (Fighter Factory can handle that now).

I think crouching get hits should be bigger than anim 11 for smaller characters. Some moves that whiff on small crouching opponents will hit them if they were hit by another move (usually a jump in).
Yeah being generous with get hit Clsn2 can't hurt.  Characters that crouch low really are supposed to make stuff whiff more often though, annoying or not.
Use anything you want from my works.  If you need to contact me use email, not private messages.
Last Edit: June 04, 2009, 10:03:44 am by PotS
Re: The greatest hits of character feedback
#29  September 28, 2009, 10:44:33 am
  • ****
    • USA
damn good tutorial. saved the notes to the PC.
basic areas im already passed but certan sticky areas i got answers too reading this.

Thanks pots
Re: The greatest hits of character feedback
#30  September 28, 2009, 05:20:49 pm
  • ******
    • network.mugenguild.com/pots/
Glad it helped.  I should be adding some more stuff in there like supers that give back power and whatnot...
Use anything you want from my works.  If you need to contact me use email, not private messages.
Re: The greatest hits of character feedback
#31  September 29, 2009, 10:24:14 am
  • ****
    • USA
Glad it helped.  I should be adding some more stuff in there like supers that give back power and whatnot...

yeh it did. and wow "Supers that give back power"? thats cool...

look forward to that
Re: The greatest hits of character feedback
#32  September 30, 2009, 11:16:29 pm
  • avatar
  • ******
  • Complicated.cns
    • Argentina
Glad it helped.  I should be adding some more stuff in there like supers that give back power and whatnot...

yeh it did. and wow "Supers that give back power"? thats cool...

look forward to that

wow what? it's just a common mistake everybody does  ;P


Now P.o.t.S., I have a doubt about the p2stateno bug, I'm using it because the targetstate thing reacts 1 tick later than p2stateno does (Important for me due to the sudden change of animation the enemy does before the change in the case of targetstate), dunno if im just a 1-tick whore :P

btw there's something you should talk about: helper projectiles, they dont add 1 hit to the hitcount if your character doesn't have more than 1 hit already dealt (Noticable on VyN characters &gt;_&gt;).
Re: The greatest hits of character feedback
#33  September 30, 2009, 11:20:34 pm
  • ******
    • network.mugenguild.com/pots/
Now P.o.t.S., I have a doubt about the p2stateno bug, I'm using it because the targetstate thing reacts 1 tick later than p2stateno does (Important for me due to the sudden change of animation the enemy does before the change in the case of targetstate), dunno if im just a 1-tick whore :P
You can try a combination of p1stateno and TargetState like I do with throws.  Which reminds me I should've said that in the post.

Quote
btw there's something you should talk about: helper projectiles, they dont add 1 hit to the hitcount if your character doesn't have more than 1 hit already dealt (Noticable on VyN characters &gt;_&gt;).
Is more of a visual aspect than anything, don't think it's a big deal.
Use anything you want from my works.  If you need to contact me use email, not private messages.
Re: The greatest hits of character feedback
#34  September 30, 2009, 11:51:16 pm
  • avatar
  • ******
  • Complicated.cns
    • Argentina
Re: The greatest hits of character feedback
#35  September 30, 2009, 11:56:13 pm
  • ******
    • network.mugenguild.com/pots/
What combo dampeners?  Don't gethitvars or any vars still keep adding up as normal?  There isn't even a trigger to check what the combometer is saying.
Use anything you want from my works.  If you need to contact me use email, not private messages.
Re: The greatest hits of character feedback
#36  January 03, 2010, 07:20:23 am
  • ****
Pretty much common sense and never mentioned but I ran into this when I was starting out. When setting vars, make sure to reset them to 0 after its served its purpose and you want to be checked again when you start the state again. Vars don't exactly go back to 0 when you're done with the state, you generally have to manually set the situation up again yourself.
[State 310, 2]
type = varset
trigger1 = time>8 && time<14 && (command = "ab" || command = "hold_ab")
var(4) = 1

[State 310, 3]
type = changestate
triggerall = var(4)
trigger1 = animelem = 7
value = 330
With this I want a var to detect whenever I press or hold a+b in that set time period. If I do then var(4) will be set and it'll go ahead and changestate to 330. After this, var(4) will always be 1, until you state otherwise. This means that when I go to State 330, it'll still be 1. When I get back to idle, it'll still be 1. It'll always be 1 and when I go back to that state it will always bring me to state 330, even if I didn't fulfill those triggers again. To solve this you need to implement something like:
[State 310, 1]
type = varset
trigger1 = time = 0
var(4) = 0
This way var(4) will reset once you enter the state again, setting up the situation where you must fulfill the triggers to head to State 330. There's like 20000 applications for this and even more ways to do it the way you want, but this is the simplest example I could find.
composer/producer
Re: The greatest hits of character feedback
#37  January 14, 2010, 10:38:56 pm
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Quote
btw there's something you should talk about: helper projectiles, they dont add 1 hit to the hitcount if your character doesn't have more than 1 hit already dealt (Noticable on VyN characters ).
That's primarily based on the helpers lifetime. If a helper is still alive when the next hit occurs, you'll get an increase. If it's dead, there's no combo because it's dropped it's target.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: The greatest hits of character feedback
#38  January 24, 2011, 10:22:58 pm
  • ******
  • The Old Dog
  • 14 years of MFG and counting :)
    • Brazil
    • www.brazilmugenteam.com
Sorry to bump this topic but I have something to share.

Quoting POTS:

Quote
P2stateno

There's this elusive Mugen bug where if a helper (or possibly player 3/4) hits you in the exact same moment you connect with a throw, your character will be hit out of it but your target will still be sent to custom states and (usually) get stuck there.  To solve this simply forget that the p2stateno Hitdef parameter exists and get used to TargetState instead.

To achieve the same effect as P2stateno in throws, you can keep using P1stateno then use TargetState when the character starts throwing.

This happens because many creators are lazy (including me sometimes, hehe). The make this works well requires that you pay attention with some things you probabily make in another way.

I will explain why:

- When you use TargetBind you should especify a time that this bind will still occour, many creators just ignore this.

Code:
[State 0, TargetBind]
type = TargetBind
trigger1 = AnimElem = 2 ; <-change for what suits you
time = 10 ;<- THIS
...

Lets take this animation as an example:

Code:
[Begin Action 1]
Clsn2Default: 1
  Clsn2[0] = -1, -79, 21, -47
0,0, 0,0, 3,
0,1, 0,0, 10,
0,2, 0,0, 3,
0,3, 0,0, 3,

Pay attention at the 2nd element of the anim above. It last 10 ticks.
So, if p2 will be bound at the same position during the 2nd element, it needs to be bound at the same place for the same ammount of time.

Most of times, on the 3rd elem, the target will be bound in another position. If you still need the p2 bound at the same position at the 3rd elem (taking the anim above as example), you will need to change the time to the duration of the 2nd and 3rd elements - 13 ticks.

Maybe you're thiking that this is useless, but try to use a char without this bindtime on stages which the ground moves up and down - POTS Skies over Aengmore is a good example. You will notice that the p2 doesn't get bound to the right position, because it doesn't "follow" your char. To see it fully, you need a char which binds p2 at the same position for a good amount of time, you will won't notice very much.

Then, doing this, you simply use a single trigger on the custom state, which many creators forgets even that it exists:

IsBound

Code:
[State 820, 2]
type = SelfState
trigger1 = !gethitvar(isbound) ;<- THIS
value = 5050

Quote
isbound: True if the player is the subject of an attacker's
               TargetBind controller. Useful to prevent being stuck in
              thrown states. (int)

Using this, if you put p2 on a custom state but you're hitted at the same time, that trigger will make p2 fall and to not get stuck.

What bindtime and isbound has in common?

Its simple: if p2 is on a custom state for a time greater than normal (for example, when p1 is hitted while grab), p2 will fall on the ground.
And if don't put the bindtime and use the isbound trigger, p2 will fall at the next tick you hit him, because the bindtime default is 1 and, on the next tick (2), it isn't bound anymore, so the grab will fail.

I hope that people can understand my poor english :)
Localcoord is garbage― and several other basics you need to know.
#39  February 09, 2014, 09:01:25 am
  • ******
  • Loyal to the Game
  • I'M SHADYYYYYYYYYY
    • USA
    • http://jesuszilla.trinitymugen.net/

  • Online
That is all.

I see no stickies for "information you should know" or anything of the like, so I made this post because people need to know this. Keep it at 320,240 because it totally ignores the Y coordinate, which makes it garbage.



Feel free to contribute more information to this thread for n00bs.
Re: Localcoord is garbage― and several other basics you need to know.
#40  February 09, 2014, 09:16:16 am
  • ****
  • play more SNK games
  • I FUCKING LOVE PLATINUM!
    • South Africa
    • Skype - websta786
    • www.trinitymugen.net/
Add this line to your State 40, 9/10 times your jump will need this.

[Statedef 40]
type = S
physics = S
anim = 40
ctrl = 0
sprpriority = 1
facep2 = 1 <- this line
Re: Localcoord is garbage― and several other basics you need to know.
#41  February 09, 2014, 11:41:31 am
  • *****
  • [The Destroyer]
  • College Life is Killing Me
    • USA
    • Skype - wattawright
    • mugencoder.com/authors/view/watta
HD 1270x720 resolution stages WILL LOOK WEIRD on a 640x480 localcoord. You can usually fix this by tweaking the localcoord and bounds.

JZ said:
Localcoord is garbage
Surely thou jest

Re: Localcoord is garbage― and several other basics you need to know.
#42  February 09, 2014, 07:29:31 pm
  • ****
  • it's me
  • Maybe something different
    • Chile
    • koakoa@jabber.org
    • Skype - koakumadevil69
    • cowabungamugenteam.weebly.com
  • Use Training by Stupa to always check your characters's framedata if it's brought up in feedback.
  • Whenever you're using custom states for p2, remember that once the custom states are over, use SelfState, otherwise bugged behaviour will ensue until they are hit or they block.
  • Remember always in MUGEN: "Functionality over Reality", and don't be too detailed with your CLSN boxes.
  • Remember to crop your spritework after adding it in and it's aligned!! You don't want your filesizes to skyrocket.
  • ALWAYS attribute your hitdefs properly! If it's a normal attack, NA; special attack, SA; Hyper attack, HA; If it's a projectile replace A with P, and if it's a throw, replace A with T. And remember to use the correct type of stance, be it S for standing, C for crouching, A for aerial.
  • This also extends to statetype, otherwise strange things will happen if your character is hit.

That's all I can think of for the moment.

Now in bullet point format!!
Last Edit: February 09, 2014, 07:42:25 pm by Yagami Yuu
Re: Localcoord is garbage― and several other basics you need to know.
#43  February 09, 2014, 07:35:42 pm
  • *****
  • i will meditate and then write a really epic post
  • jai ho
    • Skype - executivepetrel
    • kawaiikings.net
youtube
●▬▬▬▬▬▬▬▬▬▬▬▬▬♥๑۩۩๑♥▬▬▬▬▬▬▬▬▬▬▬▬▬●
Put this on the profile of people who are known/wanted terrorists
that were involved in the September 11th attacks in 2001
●▬▬▬▬▬▬▬▬▬▬▬▬▬♥๑۩۩๑♥▬▬▬▬▬▬▬▬▬▬▬▬▬●
- courtesy of Iced
Re: Localcoord is garbage― and several other basics you need to know.
#44  February 09, 2014, 07:36:27 pm
  • ****
  • I bite the faces of people who don't wanna be cool

it's because they are already content with what they have done, mugen is not a paying job so as long as the charcter works for a creator that's enough; one's persons crouching while running is another person's change it to pots style.
Re: Localcoord is garbage― and several other basics you need to know.
#45  February 09, 2014, 07:39:40 pm
  • *****
  • i will meditate and then write a really epic post
  • jai ho
    • Skype - executivepetrel
    • kawaiikings.net
Yeah so much I even quote it in my reviews.
youtube
●▬▬▬▬▬▬▬▬▬▬▬▬▬♥๑۩۩๑♥▬▬▬▬▬▬▬▬▬▬▬▬▬●
Put this on the profile of people who are known/wanted terrorists
that were involved in the September 11th attacks in 2001
●▬▬▬▬▬▬▬▬▬▬▬▬▬♥๑۩۩๑♥▬▬▬▬▬▬▬▬▬▬▬▬▬●
- courtesy of Iced
Re: Localcoord is garbage― and several other basics you need to know.
#46  February 09, 2014, 07:44:05 pm
  • ****
  • I bite the faces of people who don't wanna be cool
I wish people would quote "embrace variables" because that is one of the biggest hurdles to creators apparently.

You limit yourself so badly when you try to avoid variables. When you get over your fear of the "complexity" (None at all unless you want to make it so) of variables, you will find yourself in a better place: A beautiful world where coding is actually fun.

it's because they are already content with what they have done, mugen is not a paying job so as long as the charcter works for a creator that's enough; one's persons crouching while running is another person's change it to pots style.
Re: Localcoord is garbage― and several other basics you need to know.
#47  February 09, 2014, 07:48:44 pm
  • ****
  • play more SNK games
  • I FUCKING LOVE PLATINUM!
    • South Africa
    • Skype - websta786
    • www.trinitymugen.net/
When you get over your fear of the "complexity" (None at all unless you want to make it so) of variables, you will find yourself in a better place: A beautiful world where coding is actually fun.

Oddly enough. I know that feels.
Re: Localcoord is garbage― and several other basics you need to know.
#48  February 09, 2014, 07:49:36 pm
  • ****
  • it's me
  • Maybe something different
    • Chile
    • koakoa@jabber.org
    • Skype - koakumadevil69
    • cowabungamugenteam.weebly.com
I wish people would quote "embrace variables" because that is one of the biggest hurdles to creators apparently.

You limit yourself so badly when you try to avoid variables. When you get over your fear of the "complexity" (None at all unless you want to make it so) of variables, you will find yourself in a better place: A beautiful world where coding is actually fun.

The most questions I get from my friends come from variables as well... From what I see it's the freedom variables give, but there's nothing really scary about them, for the most they get reset at the beginning of a round and it's as easy to work with them just as every other trigger, the only change is that you have full control over them.

I say the best way to start with variables could be simple things such as number of times this attack animation has repeated for a sort of a looping attack. If it has played 9 times, change to the final hit. Or a kind of timer, or charging attacks, hell even simple silly things such as intro selector.
Re: Localcoord is garbage― and several other basics you need to know.
#49  February 09, 2014, 07:56:53 pm
  • avatar
  • ******
  • Complicated.cns
    • Argentina
That's one thing people should keep in mind as well. I actually set them to not to automatically reset in the constants. I'd rather handle that by myself by just resetting the ones I want via varsets inside state 5900.
Re: Localcoord is garbage― and several other basics you need to know.
#50  February 09, 2014, 08:02:31 pm
  • ****
  • it's me
  • Maybe something different
    • Chile
    • koakoa@jabber.org
    • Skype - koakumadevil69
    • cowabungamugenteam.weebly.com
That's one thing people should keep in mind as well. I actually set them to not to automatically reset in the constants. I'd rather handle that by myself by just resetting the ones I want via varsets inside state 5900.

VarRangeSet and Varsets will always be your friend! There's also something to keep in mind with variables, since they only have numbered names, a good practice is to KEEP YOUR VARIABLES ORDERED AND ALWAYS HAVING TRACK OF WHAT THEY DO, every good coder does this and when you look at their CNS and ST files, you will most likely see the variables listed.
Also whenever your variables are failing, make sure to use DisplayToClipboard, it helps a ton to debug them, to see when they are not activating properly and things.

An unrelated note, whenever you're making characters extend too much outside of their common range, remember to interest yourself for, and use this controller, otherwise things could happen such as having the attack pass through the opponent, it happens quite frequently to all of us:

[State Pls use me]
type = Width
trigger1 =
player = 0,0

This will change the pushbar for an attack for 1 tick:

player = playwidth_front, playwidth_back (int)
    Sets the player width in front and behind. Player width determines
    how close the player can get to other players. These parameters
    default to 0,0 if omitted.

For an applied example: let's say the character extends a red CLSN 20 pixels to the right for his attack in his animation frame 5, and there's blue CLSN behind that red box, a code you could write is:

[State Gettin Wider]
type = Width
trigger1 = AnimelemTime(5)>=0 && AnimelemTime(6)<0
player = 20,0 ;Extend bar 20 pixels to the right, 0 pixels to the left
ignorehitpause = 1
Last Edit: February 09, 2014, 08:16:25 pm by Yagami Yuu
Re: Localcoord is garbage― and several other basics you need to know.
#51  February 09, 2014, 08:08:07 pm
  • ****
  • I bite the faces of people who don't wanna be cool
Width is definitely an underestimated stctrl

it's because they are already content with what they have done, mugen is not a paying job so as long as the charcter works for a creator that's enough; one's persons crouching while running is another person's change it to pots style.
Re: Localcoord is garbage― and several other basics you need to know.
#52  February 09, 2014, 08:11:34 pm
  • ****
    • Japan
Resetting the character to an idle statetype is very important once the active frames of a move are over.

If you forget to do this they will make the opponent attempt to block attacks even when the character is already idle. This would also create huge, fake counter windows and put them at a disadvantage.

Just make sure to include a statypeset and modify it accordingly!

[State 200, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 3 ;<= Usually the very next frame after the last CLSN1 appears.
movetype = I
Re: Localcoord is garbage― and several other basics you need to know.
#53  February 09, 2014, 08:12:22 pm
  • ******
  • it's not sad
    • USA
    • network.mugenguild.com/jmorphman
Play lots of fighting games. Read about how they work. Try and learn why some things are done the way they are, and always keep testing. Test often, test against a wide variety of characters, and test stuff in bunch of different situations. I can't stress the testing stuff enough.

     Posted: February 09, 2014, 08:13:25 pm
testing
Re: Localcoord is garbage― and several other basics you need to know.
#54  February 09, 2014, 08:20:45 pm
  • ****
  • it's me
  • Maybe something different
    • Chile
    • koakoa@jabber.org
    • Skype - koakumadevil69
    • cowabungamugenteam.weebly.com
Play lots of fighting games.

THIS, this one little gem is mostly forgotten around many places, hell, some people even take it negatively and react as if they are told to become fighting game experts, the true thing is that it's not to become an expert in the matter, but it's all to at least get the correct feel and learn the do and don'ts of a fighting game. It also helps to spark the interest for creating a character like these games you play.

Also gonna put this quote Arpa has in his sig from Vans, which is really important and should always be present in any of us. if your character comes from a game, or you want to make an X styled character, have this in mind:
I'm also under the impression that people keep neglecting data from the game, do you guys know how PotS made his original characters? He actually studied every single game he referenced, down to the core. Doing this properly requires understanding how the original system was made, not just winging it.
Re: Localcoord is garbage― and several other basics you need to know.
#55  February 09, 2014, 08:24:05 pm
  • ******
Small little thing that can be categorized with something above but I feel is necessary to mention.

Lie.down time... cannot stress this enough.
Don't leave it at 60... fighting games do not work that way.
Re: Localcoord is garbage― and several other basics you need to know.
#56  February 09, 2014, 08:26:15 pm
  • ****
  • it's me
  • Maybe something different
    • Chile
    • koakoa@jabber.org
    • Skype - koakumadevil69
    • cowabungamugenteam.weebly.com
I got also reminded of something, avoid using Trip type for attacks that you could still combo out of and try to custom state as many ground bounces as you can, as it activates fall.defence_up; something that is for the most, not really intended behaviour, why? It scales damage down like hell, and most people will leave it at 50.
Re: Localcoord is garbage― and several other basics you need to know.
#57  February 09, 2014, 08:26:28 pm
  • ******
  • tired
    • Skype - Istillhasnoname
Never be afraid to look to other characters' coding for inspiration and help.
Is finding MUGEN to be more enjoyable to play when you're not wearing clothes an underrated opinion?
Re: Localcoord is garbage― and several other basics you need to know.
#58  February 09, 2014, 08:27:24 pm
  • ****
  • I bite the faces of people who don't wanna be cool

it's because they are already content with what they have done, mugen is not a paying job so as long as the charcter works for a creator that's enough; one's persons crouching while running is another person's change it to pots style.
Re: Localcoord is garbage― and several other basics you need to know.
#59  February 09, 2014, 08:28:28 pm
  • ****
  • it's me
  • Maybe something different
    • Chile
    • koakoa@jabber.org
    • Skype - koakumadevil69
    • cowabungamugenteam.weebly.com
Small little thing that can be categorized with something above but I feel is necessary to mention.

Lie.down time... cannot stress this enough.
Don't leave it at 60... fighting games do not work that way.

Which time would you reccommend, for future releases and such?
Re: Localcoord is garbage― and several other basics you need to know.
#60  February 09, 2014, 08:32:16 pm
  • ****
  • play more SNK games
  • I FUCKING LOVE PLATINUM!
    • South Africa
    • Skype - websta786
    • www.trinitymugen.net/
9
Re: Localcoord is garbage― and several other basics you need to know.
#61  February 09, 2014, 08:34:19 pm
  • ******
Which time would you reccommend, for future releases and such?

Exact numbers are pretty easy to find, but 8-12 for the standard 2D fighter would do. I've experimented different kinds of wake-up systems, so I guess it all depends on what you're going for.

I can recall countless times where changing that one little line made the character function that much better.
Re: Localcoord is garbage― and several other basics you need to know.
#62  February 09, 2014, 08:35:19 pm
  • ****
  • it's me
  • Maybe something different
    • Chile
    • koakoa@jabber.org
    • Skype - koakumadevil69
    • cowabungamugenteam.weebly.com
Exact numbers are pretty easy to find, but 8-12 for the standard 2D fighter would do. I've experimented different kinds of wake-up systems, so I guess it all depends on what you're going for.

Hmmm, what number what would reccommend if the character were to be OTG heavy?
Re: Localcoord is garbage― and several other basics you need to know.
#63  February 09, 2014, 08:36:52 pm
  • ****
  • play more SNK games
  • I FUCKING LOVE PLATINUM!
    • South Africa
    • Skype - websta786
    • www.trinitymugen.net/
9

Seriously
Re: Localcoord is garbage― and several other basics you need to know.
#64  February 09, 2014, 08:39:20 pm
  • ****
  • it's me
  • Maybe something different
    • Chile
    • koakoa@jabber.org
    • Skype - koakumadevil69
    • cowabungamugenteam.weebly.com
Re: Localcoord is garbage― and several other basics you need to know.
#65  February 09, 2014, 08:42:52 pm
  • ****
    • Japan
Just a quick note I should mention: if you plan to have your character behave properly during liedown states make absolutely sure you override statedef 5110.

MUGEN has a hardcoded system that makes characters recover faster if you mash buttons, making your chosen liedown time pointless.

The easiest way to do this is renaming 5110 to 5111 and using this redirection:

;---------------------------------------------------------------------------
; HIT_LIEDOWN
[Statedef 5110]
type    = L
movetype= H
physics = N
[State 5110, 0]
type = ChangeState
trigger1 = 1
value = 5111

Re: Localcoord is garbage― and several other basics you need to know.
#66  February 09, 2014, 08:45:01 pm
  • *****
  • Why do unis cram all tests in one month
  • Pet your nearest animal
    • Bosnia and Herzegovina
Re: Localcoord is garbage― and several other basics you need to know.
#67  February 09, 2014, 08:56:01 pm
  • *****
  • ???
    • UK
    • Skype - koopakootmugen

  • Online
-Lots of games don't allow crouching while running. Set the ctrl to 0 in the run state to fix this. To make attacks out of runs work, you need to add the run states to the command triggers (trigger1 = ctrl || (stateno = [100,101]); for example)

-Don't base hitboxes off kfm. His hitboxes are far too small. Never use the auto clsn tool in Fighter Factory.



Last Edit: February 09, 2014, 11:29:31 pm by KoopaKoot
Re: Localcoord is garbage― and several other basics you need to know.
#68  February 09, 2014, 09:06:49 pm
  • ****
  • it's me
  • Maybe something different
    • Chile
    • koakoa@jabber.org
    • Skype - koakumadevil69
    • cowabungamugenteam.weebly.com
For some special attacks and hyper attacks, remember to make a custom landing state for these, since most of them require special landing so there's no unfair advantage, it also minimizes the chances your attack could unfairly juggle into other things that were not designed for, specially since state 52 regains you control almost immediately. Mostly just copying state 52 and getting rid of some things should do it:

In your air attack state, set the physics to N and handle vertical movement yourself using:

Spoiler: code (click to see content)

Then make another state:

Spoiler: Long code (click to see content)
Last Edit: February 09, 2014, 09:12:09 pm by Yagami Yuu
Re: Localcoord is garbage― and several other basics you need to know.
#69  February 09, 2014, 09:08:16 pm
  • *****
  • Gaps? Where we're going, we don't need gaps...
    • USA
    • ricepigeon.neocities.org
Just a quick note I should mention: if you plan to have your character behave properly during liedown states make absolutely sure you override statedef 5110.

MUGEN has a hardcoded system that makes characters recover faster if you mash buttons, making your chosen liedown time pointless.


Does that account for untechable knockdowns? or am I missing something?
Re: Localcoord is garbage― and several other basics you need to know.
#70  February 09, 2014, 09:16:45 pm
  • ****
  • it's me
  • Maybe something different
    • Chile
    • koakoa@jabber.org
    • Skype - koakumadevil69
    • cowabungamugenteam.weebly.com
Does that account for untechable knockdowns? or am I missing something?

If by untechable knockdowns you mean hard knockdowns they are often handled in custom states, which most of the time don't coincide with the numbers MUGEN does its hardcoded things within. It's like the fall.defence_up issue you had which dissapeared once you used a custom trip state :P
Re: Localcoord is garbage― and several other basics you need to know.
#71  February 09, 2014, 10:04:04 pm
  • *****
  • Gaps? Where we're going, we don't need gaps...
    • USA
    • ricepigeon.neocities.org
I know about that. But what I meant was Van's modification seems to enforce hard knockdowns...

EDIT: Just looked at the P2 Safe Fall code in the "Greatest Hits of Character Feedback" thread. I'm assuming that this is the "Quick Stand" I'm looking for as far as soft vs hard KD goes.
Re: Localcoord is garbage― and several other basics you need to know.
#72  February 09, 2014, 10:29:00 pm
  • ****
  • The Absolute Worst
    • Canada
    • Skype - do.not.even.ask
    • randomselect.piiym.net/
Unless you're making a stage that is a single layer and nothing else, never ever use the xscale and yscale parameters when making stages in 1.0+. Using it will leave gaps that are smaller than a quarter of a pixel, so you can't ever fix them.

If you do use xscale/yscale you end up with shit like this

and that's not all of the gaps that I've circled
Re: Localcoord is garbage― and several other basics you need to know.
#73  February 09, 2014, 11:32:36 pm
  • ******
  • Loyal to the Game
  • I'M SHADYYYYYYYYYY
    • USA
    • http://jesuszilla.trinitymugen.net/

  • Online
Re: Localcoord is garbage― and several other basics you need to know.
#74  February 09, 2014, 11:38:28 pm
  • avatar
  • ******
  • Complicated.cns
    • Argentina
Unless you're making a stage that is a single layer and nothing else, never ever use the xscale and yscale parameters when making stages in 1.0+. Using it will leave gaps that are smaller than a quarter of a pixel, so you can't ever fix them.

If you do use xscale/yscale you end up with shit like this
http://i.imgur.com/Rxht584.png
and that's not all of the gaps that I've circled

Can't that be fixed in 1.1 though? It allows you to use float values in pos parameters.
Re: Localcoord is garbage― and several other basics you need to know.
#75  February 09, 2014, 11:46:58 pm
  • ***
  • Dust to dust...
    • USA
    • Skype - tylorthehedgehog
    • www.freewebs.com/wubbi/
"POTS Style" is more than just simply replicating features and shiny FX that POTS' works has. Hell, it's not even one single universal style! POTS' works had a lot of variation through the time he worked in MUGEN. If you want to make your works "POTS Style", just try to go for the feel of POTS' work you liked the best.
Thanks for reading my signature.
Re: Localcoord is garbage― and several other basics you need to know.
#76  February 10, 2014, 08:58:04 am
  • ******
  • Loyal to the Game
  • I'M SHADYYYYYYYYYY
    • USA
    • http://jesuszilla.trinitymugen.net/

  • Online
Actually, that loops right back around to Jmorphman's post:

Play lots of fighting games. Read about how they work. Try and learn why some things are done the way they are, and always keep testing.


I cannot stress this enough. Wake up, people. Phantom.of.the.Server did not pull things out of his ass (well, OK, he kinda did up until I think Yuri), he actually got data from the game. Use ArtMoney to get velocities, use PCSX2's recording option, use frame step in emulators, do whatever you can to get proper data. It's not hard at all, trust me.
Re: Localcoord is garbage― and several other basics you need to know.
#77  February 10, 2014, 09:12:32 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Mugen has a hard coded bit of behaviour if liedown time remaining is less than 10, you become completely invulnerable. I would leave it at 60, cos that doesnt' really matter, and override that state to make you get up quicker. Otherwise you make your character unhittable while down which is very very rarely intended behaviour.

You can't bypass that short of making your own lie down state, and since there is one there already, overriding it to behave differently is a better idea.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: Localcoord is garbage― and several other basics you need to know.
#78  February 10, 2014, 09:18:31 am
  • ****
  • The Absolute Worst
    • Canada
    • Skype - do.not.even.ask
    • randomselect.piiym.net/
Unless you're making a stage that is a single layer and nothing else, never ever use the xscale and yscale parameters when making stages in 1.0+. Using it will leave gaps that are smaller than a quarter of a pixel, so you can't ever fix them.

If you do use xscale/yscale you end up with shit like this
http://i.imgur.com/Rxht584.png
and that's not all of the gaps that I've circled

Can't that be fixed in 1.1 though? It allows you to use float values in pos parameters.

Pretty sure 1.0 uses float variables too, since I had to use decimals quite a few times for pos params, but I'll give 1.1 a looksie if I ever find a stage to make that rekindles my passion.
Re: Localcoord is garbage― and several other basics you need to know.
#79  February 10, 2014, 10:00:03 am
  • ******
  • Loyal to the Game
  • I'M SHADYYYYYYYYYY
    • USA
    • http://jesuszilla.trinitymugen.net/

  • Online
I would leave it at 60, cos that doesnt' really matter
Yes, it does. You are way more open to OTG's and pursuit attacks if you leave it at the default liedown.time.


Speaking of which, you should override State 5120 anyway to get rid of the nothitbys (ESPECIALLY if you make a VSav character, because you should be hittable in that state by pursuit attacks).
Re: Localcoord is garbage― and several other basics you need to know.
#80  February 10, 2014, 10:23:43 am
  • avatar
  • ******
  • Complicated.cns
    • Argentina
There's also a hardcoded invulnerability people rarely pay attention to. If both characters spend way too much time in roundstate 3 (For example, due to an autocombo lasting for a long time, think K's Chain Drive or something) the target will eventually become fully invulnerable to force the round into roundstate 4. This can cause weird behavior if you don't have a fallback plan in your autocombo state (For example get stuck in certain states). Of course that will also get fixed by mugen's hardcoded behavior of forcing your character into the winpose if you're stuck for a long time anyway but it's a detail to keep in mind :P
Re: Localcoord is garbage― and several other basics you need to know.
#81  February 14, 2014, 01:57:30 am
  • ******
  • Loyal to the Game
  • I'M SHADYYYYYYYYYY
    • USA
    • http://jesuszilla.trinitymugen.net/

  • Online
You really don't have to worry about that unless your code is shitty.


Also, be sure your projectiles have MoveReversed as one of their destroy/hit decrement triggers.
Re: Localcoord is garbage― and several other basics you need to know.
#82  February 14, 2014, 02:32:48 am
  • ******
  • it's not sad
    • USA
    • network.mugenguild.com/jmorphman
To follow up my last post: more non-specific rambling of a philosophic nature

Don't be afraid to ask for help. Don't be afraid to try new things. And seriously, test that one more time, just to be sure.

Also, be sure your projectiles have MoveReversed as one of their destroy/hit decrement triggers.
Hmm, shouldn't a multi-hit projectile be destroyed if it's MoveReversed?
Re: Localcoord is garbage― and several other basics you need to know.
#83  February 17, 2014, 04:27:08 am
  • ******
  • Loyal to the Game
  • I'M SHADYYYYYYYYYY
    • USA
    • http://jesuszilla.trinitymugen.net/

  • Online
That really depends on how you want the projectile to behave.



Also, if you have a projectile that shouldn't be reflected (I personally don't think sand should be reflected, for instance), you can use the following trick:
Code:
hitdef = , SA ; or NA for normals, HA for hypers
Re: Localcoord is garbage― and several other basics you need to know.
#84  February 17, 2014, 05:16:24 am
  • ******
  • it's not sad
    • USA
    • network.mugenguild.com/jmorphman
Actually scratch what I said, I think for multihit projectiles, it would be best if they lost a hit and don't die outright (because in CvS2, in Eagle's Canterbury Blue, multi-hit projectiles are absorbed one hit at a time)
Re: Localcoord is garbage― and several other basics you need to know.
#85  February 21, 2014, 10:36:58 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
I would leave it at 60, cos that doesnt' really matter
Yes, it does. You are way more open to OTG's and pursuit attacks if you leave it at the default liedown.time.


Speaking of which, you should override State 5120 anyway to get rid of the nothitbys (ESPECIALLY if you make a VSav character, because you should be hittable in that state by pursuit attacks).
I'm not talking about state 5120. I am talking about state 5100. If it is less than 10 ticks till the end of your liedown time you are INSTANTLY and irrevocably invulnerable until the state ends. This is hardcoded. You can't do shit about it short of recreating the state using a different number therefore needing to override everything else that sends you there. OR leaving the liedown time at 60 (or whatever) and simply using a hardcoded changestate out based on the correct liedown time.

Unless you want your character to be invulnerable for his whole liedown state that is, in which case don't do anything and make it 10 or less.

Quote
; Downed get-hit (hit ground from fall) (5100):
;   defense increases at time = 0, player becomes invincible if within 10
;   ticks of getting up


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Last Edit: February 21, 2014, 10:41:06 am by Cyanide
Common char mistakes and how to solve them
#86  September 05, 2014, 04:30:42 pm
  • ******
Just an idea that popped up. Not sure if thread like this exists (even if it does, probably best to start a new one since the older would be years old or something).

Just want to discuss common mistakes that people make when converting characters to mugen and more importantly, how to avoid such oversights. It would fit better in Mugen Development but it may wind up limiting the thread activity to creators (since nobody ever goes there).

One that is (certainly for me) is liedown time. A very easily fixable problem that can be solved by changing that line (that says liedown.time) in the beginning of the cns to 9 instead of leaving it at 60 or whatever (assuming you don't use your own code for wakeup and whatnot).

Any others?
You don't have to know how to correct anything to make a mention. Just recognizing a flaw is enough to contribute to this thread.
Last Edit: September 05, 2014, 07:06:42 pm by Niitris
Re: Common char mistakes and how to solve them
#87  September 05, 2014, 05:21:59 pm
  • ****
  • Target Acquired.
    • Ukraine
    • mugencoder.com
This is a good idea. An update to the issues we all face as mugen coders. I'll contribute something:

Punishing:
While I was an offender of this as well, it's a very simple fix in the HitDef:
Code:
guard.pausetime = x,y ; having y < x. This allows P2 to recover from the pause quicker than P1 from pause.
guard.hittime = something lower than ground.hittime. ; This is again to allow P1 to recover quicker, but far more crucial than pause time.
guard.slidetime = something lower than ground.slidetime. ; Not essential, but still a factor of a hit. If P2 slides too far back, they won't be able to punish P1, depending on
the character of course.

-[Все слова это только слова.]-
Re: Common char mistakes and how to solve them
#88  September 05, 2014, 07:04:32 pm
  • ******
Another is what's commonly state 5040

In the common code, when a character enters State 5040, they regain control. This is wrong and is not supposed to happen (excluding certain games). Definitely does not happen in Street Fighter and the likes.

Code:
; Air get-hit (recovering in air, not falling)
[Statedef 5040]
type    = A
movetype= H
physics = N

[State 5040, 3]   ;Remove this state
type = CtrlSet
trigger1 = HitOver
value = 1

Re: Common char mistakes and how to solve them
#89  September 05, 2014, 07:28:50 pm
  • *****
    • Peru
Theres not a unique solution to that so I think it's better to say "Be cautious of this state" rather than "Delete that SCTRL" because what you do it's up to the game you are trying to simulate.

Take 3rd Strike as an example, where characters "reset" after some juggle hits and they don't have control to attack, but they can perform defensive actions:

After hitting you with Back+HP, Necro can reset you using some attacks, for example LP. After that, the opponent can't attack, but if Necro Performs a Magnetic Storm, they will be hit unless they parry.
Re: Common char mistakes and how to solve them
#90  September 05, 2014, 07:56:28 pm
  • *****
  • Gaps? Where we're going, we don't need gaps...
    • USA
    • ricepigeon.neocities.org
Charge motions that look like this:

Code:
[Command]
name = "ChargeBF_X"
command = ~30$B,$F,x

Why this is wrong: On the surface, this may seem to be fine. If you've played with a charge character before, then you'll know that holding DB or UB will also count toward the B charge (same applies to DB and DF for D charges). However, if you try to shift for directional input from holding D to DB or UB, you will still retain the charge. Mugen, however, considers this as a new input and you will lose the charge if this were to occur.

Solution: Rather than using Mugen's native command buffer, you'll have to build your own. First, alter the above command to the following:

Code:
[Command]
name = "ChargeBF_X"
command = ~$B,$F,x

You'll want to build your charge input buffer using two variables: one for determining how long the direction was held, and the other that tells Mugen how long the charge should be held in the command buffer. The first part is easy. First, make sure the following is in your CMD file:

Code:
[Command]
name = "holdback";Required (do not remove)
command = /$B
time = 1

Next, in your State -2, add the following.

Code:
[State -2, Back Charge Increment]
type = VarAdd
trigger1 = command = "holdback"
var(0) = 1
ignorehitpause = 1

[State -2, Back Charge Reset]
type = VarSet
trigger1 = command != "holdback"
var(0) = 0

This will increment the variable's value for each tick that you are holding the direction to be charged, and resets it back to 0 when the direction is no longer held. For the second part:

Code:
[State -2, Back Charge Buffer Activation]
type = VarSet
trigger1 = var(0) >= 50 ;Change this value to the minimum time you want the direction to be held for.
var(1) = 35

[State -2, Back Charge Buffer Decrement]
type = VarAdd
trigger1 = var(0) < 50 && var(1) > 0 ;Change the value of 50 to whatever you set the value above to.
var(1) = -1

What this does is it tells Mugen to register the back command in the input buffer once it has been held for at least 50 ticks (roughly 5/6 of a second). Once the direction is released, you will then have 35 ticks (a little more than half a second) to complete the charge motion. Finally, in your CMD file, locate the changestate for the special requiring the charge motion and add the lines noted below:

Code:
[State -1, Sonic Boom]
type = ChangeState
value = 1100
triggerall = (statetype != A)
triggerall = var(1)>16 ;ADD THIS LINE
triggerall = ctrl
trigger1 = command = "ChargeBF_X"

The above will limit the window to complete the charge motion to 19 (35-16) ticks, all you simply have to do is complete the motion. The 16 can be changed to a smaller value if you need more time to complete the motion, such as with a B,F,B,F motion. For vertical charge motions (D,U), simply repeat the above steps using two different variables and making necessary alterations to account for holding down rather than back. For motions that require a DB charge (such as Vega/Claw's Scarlet Terror and Flying Barcelona Special), simply use the variables for both horizontal and vertical charges.

(parts of code based on code used by P.o.t.S. and Jmorphman)
Last Edit: September 05, 2014, 09:20:01 pm by Ricepigeon
Re: Common char mistakes and how to solve them
#91  September 05, 2014, 08:18:37 pm
  • *****
  • Hedgehog Whisperer
  • Red Bull addict
    • Spain
    • xgargoyle.mgbr.net
Custom states:
- Do not forget to place Clsn2 boxes on them, even if you don't need specifically for that move
- Always add a selfstate controller with some kind of "safe escape" such as time>=X or !animtime even if you have a previous changestate within it that changes it to another custom state. If anything goes wrong during a fight, with the safe escape enabled, the character will regain control instead of being stuck in a custom state and forcing you to F1 or F4 the round.

Helpers:
- Always add a destroyself to every helper state, in the same way as the safe escape from the above example. It will remove the helper in the case that something fails or breaks, instead of hogging your memory.

XGargoyle: Battle posing since 1979
http://xgargoyle.mgbr.net
http://www.pandorabots.com/pandora/talk?botid=e71c0d43fe35093a  <-- Please click that link
http://paypal.me/XGargoyle  <-- Donations welcome!
Re: Common char mistakes and how to solve them
#92  September 05, 2014, 09:02:09 pm
  • ******
  • Portrait Prodigy EX+
    • mugenguild.com/forum/topics/saikoros-high-resolution-mugen-portraits-fatal-fury-full-set-145724.0.html
I think this topic should be stickied. Being one who is starting to dabble in coding ideals, this is a great thread. ;D
All of your Mugen Portrait needs may be found HERE.

I'd like to report two robots on the MFG forums: One is EXShadow. The other is Saikoro.
There should be a Saikoro plugin for Photoshop.
Re: Common char mistakes and how to solve them
#93  September 05, 2014, 09:03:03 pm
  • ******
Theres not a unique solution to that so I think it's better to say "Be cautious of this state" rather than "Delete that SCTRL" because what you do it's up to the game you are trying to simulate.

Take 3rd Strike as an example, where characters "reset" after some juggle hits and they don't have control to attack, but they can perform defensive actions:

After hitting you with Back+HP, Necro can reset you using some attacks, for example LP. After that, the opponent can't attack, but if Necro Performs a Magnetic Storm, they will be hit unless they parry.

You can parry when that happens? I suppose it's the same for one of Akuma's SA1 setups.

I can see why the state wouldn't be removed but ctrl would still have to be set to 0, no (otherwise p2 would still be free to attack and whatnot). Then a hitoverride would be used instead to activate the parry state.
Re: Common char mistakes and how to solve them
#94  September 05, 2014, 09:10:10 pm
  • ****
  • play more SNK games
  • I FUCKING LOVE PLATINUM!
    • South Africa
    • Skype - websta786
    • www.trinitymugen.net/
Using a hitoverride for a parry sounds a little sketchy. Why not simply make the attacks not trigger in state 5040 in the state -1
Re: Common char mistakes and how to solve them
#95  September 05, 2014, 09:15:18 pm
  • ******
Not that familiar with parry tbh. The one time I messed around with the concept involved hitoverrides along with variables and whatnot (although yeah it was in statedef -1 of course).
Re: Common char mistakes and how to solve them
#96  September 05, 2014, 09:19:54 pm
  • ****
  • Target Acquired.
    • Ukraine
    • mugencoder.com
Adding to XGargoyle's input about getting stuck in custom states:

There's also one other thing people should be aware of and use: !gethitvar(isbound). This should be used as a trigger for the SelfState if your binding the player. It's situational of course, but any actual throw or grab move will basically the mandate the use of this.

-[Все слова это только слова.]-
Re: Common char mistakes and how to solve them
#97  September 05, 2014, 09:29:23 pm
  • *****
  • Gaps? Where we're going, we don't need gaps...
    • USA
    • ricepigeon.neocities.org
Posting this one because, while it should be common sense not to, a ton of new authors still do it for some reason:

Supers that give back power.


Why this is wrong: Unless someone else knows otherwise, no fighting game does this. Period.

Solution: The most common source of this problem is that many new authors neglect to add the getpower parameter in their character's hitdefs, causing Mugen to use the default behavior of adding power equivalent to a fraction of the damage dealt, the exact amount being defined in the mugen.cfg file in Mugen's data folder. The solution is simple:

Code:
getpower = 0,0

By adding this to the hitdef, it will overwite Mugen's default behavior and cause the player to gain 0 power on hit and 0 power on block.
Re: Common char mistakes and how to solve them
#98  September 05, 2014, 09:29:55 pm
  • *****
    • Peru
Why this is wrong: Unless someone else knows otherwise, no fighting game does this. Period.
You are wrong! USF4 does this! :P (jk, its a glitch on some characters)

Quote
Not that familiar with parry tbh
I think we are derailing from the main topic here, which is how to handle control in that situation.

In my case when I wanted to program HitDefs that "Reset" the enemy I made a Custom HitState only triggered when the oponent was in the air in order to avoid modifying Custom.cns.

Using a hitoverride for a parry sounds a little sketchy. Why not simply make the attacks not trigger in state 5040 in the state -1
I'm curious. How do you that now in 1.0 and 1.1? HitOverrides were what cool kids used in my days.
Re: Common char mistakes and how to solve them
#99  September 05, 2014, 09:37:46 pm
  • ****
  • play more SNK games
  • I FUCKING LOVE PLATINUM!
    • South Africa
    • Skype - websta786
    • www.trinitymugen.net/
You can use a reversaldef :/ although things might get funky
Re: Common char mistakes and how to solve them
#100  September 05, 2014, 11:51:06 pm
  • ******
  • Loyal to the Game
  • I'M SHADYYYYYYYYYY
    • USA
    • http://jesuszilla.trinitymugen.net/

  • Online
Re: The greatest hits of character feedback
#101  August 27, 2015, 03:52:33 pm
  • ******
    • www.justnopoint.com/
http://mugenguild.com/forum/msg.2153816

cond() works similar to ifelse() in that it takes an expression, evaluates it, and then returns the value of the expression in the 2nd or 3rd parameter depending on whether the first expression (parameter #1) is true or false respectively.

These:
Code:
ifelse(life=lifemax, 1.0, 0.5)
cond(life=lifemax, 1.0, 0.5)
are logically equivalent and will return "1.0" as the value if your character is at max life.

The difference is that ifelse() will evaluate all expressions and cond() will not. For example:
Code:
ifelse(numhelper(30), helper(30),pos x, 0)
will actually cause debug flood if helper(30) doesn't exist. Why? Because with ifelse(), numhelper(30), helper(30),pos x, and "0" are all evaluated and then the result is of the final expression is returned. Using the same expressions with cond() will look like this:
Code:
cond(numhelper(30), helper(30),pos x, 0)
This will return the same result without the potential for debug flood. First numhelper(30) is evaluated. If it's true, only then will "helper(30),pos x" be evaluated and its result returned. If "numhelper(30)" is false, ie. "0," then "helper(30),pos x" won't ever be seen.

cond() is most synonymous to a ternary expression in actual programming and scripting languages, such as JavaScript and PHP. ifelse() is just a broken mess. I hope that helps to clear up any confusion you had about it, but I'm curious as to how you're trying to use it that it's crashing mugen.

Using IfElse, MUGEN will evaluate the entire code - both "true" and "false" statements.

Using Cond, MUGEN will ONLY evaluate one statement.

As far as I can tell, there is no reason to ever use IfElse... Cond works exactly the same, but prevents errors.


MUGEN will report errors if the code it is evaluating is invalid.  Such as, if you use a trigger redirection to a non-existent player.

EXAMPLE:

Code:
IfElse(PlayerIDExist(60),(PlayerID(60),Pos X - 100),ScreenPos X + 100))
If there is not a Player with ID 60, this will result in an error because the "false" code (PlayerID(60),Pos X - 100) is still being evaluated, even though it is not being triggered.

Code:
Cond(PlayerIDExist(60),(PlayerID(60),Pos X - 100),ScreenPos X + 100))
If the condition is "false" (there is not a Player with ID 60), the "true" code is completely ignored and is not evaluated - there will be no error.
Re: The greatest hits of character feedback
#102  September 19, 2015, 11:19:35 pm
  • ****
  • Frankenspriting is fun!!
    • Peru
So I know this is a pretty old thread, but since it's stickied I figured no harm done in asking here?

Anyway, just one small doubt I have about head and waist positions: If I scale a character, should I type in the end result coordinates or the default pre-scale coordinates? Like, say my character's head.pos by default is at -10,-100, but I scale him down to 0.8. Do I still type in -10,-100 or -8.-80?
Millie, "Ozy and Millie" said:
"I think there are really three types of people: "Glass is half-full" sorts of people, "Glass is half-empty" sorts of people,
and people who will spit into the glass until that's fixed."
Re: The greatest hits of character feedback
New #103  October 01, 2017, 07:46:01 am
  • ******
  • Loyal to the Game
  • I'M SHADYYYYYYYYYY
    • USA
    • http://jesuszilla.trinitymugen.net/

  • Online
Wasn't sure where to post this but I'll post it here as a lesson to all. This is probably explained in the docs but regardless, I want to make this clear to everyone.

This:
Code:
trigger1 = e|| (var(5)  := var(5)&1023)

Is not the same as this:
Code:
trigger1 = e|| (var(5)  := (var(5)&1023))

In the first instance, you're setting var(5) to itself, then taking the bitwise AND of the first 10 bits. This means you're setting var(5) to itself and essentially doing nothing. In the second instance, you're setting var(5) to the first 10 bits of var(5), like you were probably trying to do like I was.

This order of operations goes for any bitwise operand, including OR and XOR.


Do not make this mistake that I made.