RUGENDOCS
Creare contenuti

State controller

Ogni state controller di M.U.G.E.N 1.1 con i suoi parametri, un breve esempio e il suo stato in rugen, generato dal sorgente del motore.

Gli state controller sono i verbi di un char: ogni blocco [State] in uno stato ne nomina uno con type = e gli dà dei parametri. Questa pagina elenca ogni controller di M.U.G.E.N 1.1, raggruppato per ciò che fa. Per come funzionano in generale controller, trigger e persistent, vedi CNS: costanti, stati, espressioni.

I badge di stato vengono dal sorgente del motore:

  • Supported: rugen lo esegue e legge ogni parametro documentato.
  • Partial: gira, ma manca qualcosa; la nota dice cosa.
  • Not yet: rugen lo salta. rugen check elenca ogni controller di questo tipo usato dal tuo char, e rugen verify dà un verdetto warn.

Stato e controllo

Null Supported

Does nothing. Handy to switch a controller off without deleting it, or as a placeholder while you build a state.

No parameters.

[State 200, disabled for now]
type = Null
trigger1 = 1

ChangeState Supported

Leaves the current state and enters another one, running the new state from tick 0 in the same frame.

ParameterTypeDefaultMeaning
valueintrequiredState number to enter.
ctrlboolunchangedGive or take control on entry.
animintfrom the new [Statedef]Animation to switch to.
[State 210, recover]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

SelfState Supported

Like ChangeState, but always uses the player's own state files. Used to return from a custom state that an opponent put you in.

ParameterTypeDefaultMeaning
valueintrequiredState number to enter (from your own files).
ctrlboolunchangedGive or take control.
animintfrom the new [Statedef]Animation to switch to.
[State 8100, let go of the throw]
type = SelfState
trigger1 = Time >= 40
value = 5050

ChangeAnim Partial

Switches to another action from your own .air file.

  • Some value forms are reported as unsupported.
ParameterTypeDefaultMeaning
valueintrequiredAction number.
elemint1Element to start on.

An F prefix on value (fightfx animations) is reported by rugen check.

[State 200, swing]
type = ChangeAnim
trigger1 = Time = 0
value = 205
elem = 2

ChangeAnim2 Partial

Switches to an action from the .air file of the player whose state you are in. Use it in custom states you put an opponent into, so they play your throw animations with their sprites.

  • Some value forms are reported as unsupported.
ParameterTypeDefaultMeaning
valueintrequiredAction number, looked up in the state owner's .air.
elemint1Element to start on.
[State 810, thrown]
type = ChangeAnim2
trigger1 = Time = 0
value = 810

CtrlSet Supported

Gives or removes control. With control, the player can start moves from the command file.

ParameterTypeDefaultMeaning
valueboolrequired1 gives control, 0 removes it.
[State 52, landed]
type = CtrlSet
trigger1 = Time = 3
value = 1

StateTypeSet Supported

Changes state type, move type or physics in the middle of a state, without changing state.

ParameterTypeDefaultMeaning
statetypeS / C / A / LunchangedStanding, crouching, aerial or lying down.
movetypeI / A / HunchangedIdle, attacking or being hit.
physicsS / C / A / NunchangedPhysics model: stand friction, crouch friction, air gravity, or none.
[State 620, jump part]
type = StateTypeSet
trigger1 = AnimElem = 3
statetype = A
physics = A

Turn Supported

Flips the player to face the other way.

No parameters.

[State 300, cross-up turn]
type = Turn
trigger1 = Time = 0
trigger1 = P2Dist X < 0

AssertSpecial Supported

Sets special engine flags for one tick. Call it every tick (no trigger limit) to keep a flag on.

ParameterTypeDefaultMeaning
flagflag namerequiredFirst flag to set.
flag2flag namenoneSecond flag.
flag3flag namenoneThird flag.

rugen knows every flag: Intro, Invisible, RoundNotOver, NoBarDisplay, NoBG, NoFG, NoStandGuard, NoCrouchGuard, NoAirGuard, NoAutoTurn, NoJuggleCheck, NoKOSnd, NoKOSlow, NoShadow, GlobalNoShadow, NoMusic, NoWalk, TimerFreeze, Unguardable and NoKO.

[State 190, intro]
type = AssertSpecial
trigger1 = 1
flag = Intro
flag2 = NoBarDisplay

Pause Partial

Freezes the game for a while. The caller can keep moving for movetime ticks.

  • Ignored parameters: pausebg, endcmdbuftime.
ParameterTypeDefaultMeaning
timeintrequiredTicks to freeze.
movetimeint0Ticks the caller keeps moving during the pause.
pausebgnot yetbool1Also freeze the stage background.
endcmdbuftimenot yetint0Ticks before the end in which command input is buffered.
[State 1000, flash]
type = Pause
trigger1 = Time = 0
time = 20
movetime = 20

SuperPause Supported

The super-move freeze: darkens the screen, can show an effect and play a sound, and optionally adds power.

ParameterTypeDefaultMeaning
timeint30Ticks to freeze.
movetimeint0Ticks the caller keeps moving.
animint30 (fightfx)Effect animation. Prefix S to use your own .air; -1 for none.
posfloat, float0, 0Effect position relative to the caller.
soundgroup, numbernoneSound to play. Prefix S for your own .snd.
darkenbool1Darken the screen.
p2defmulfloatfrom mugen.cfg (1.5)Temporary defence multiplier for the opponents.
poweraddint0Power given to the caller.
unhittablebool1Caller cannot be hit during the pause.
[State 3000, super flash]
type = SuperPause
trigger1 = Time = 0
time = 40
anim = 100
sound = S20, 0
poweradd = -1000

Width Supported

Overrides the player's width boxes for one tick: the edge width (against the screen edges) and the player width (push against other players).

ParameterTypeDefaultMeaning
edgefloat, floatsize constantsFront and back width used against the screen edges.
playerfloat, floatsize constantsFront and back width used for player push.
valuefloat, floatnoneSets both at once.
[State 1200, wide stance]
type = Width
trigger1 = 1
player = 30, 20

ScreenBound Supported

Decides for one tick whether the player is kept on screen and whether the camera follows them.

ParameterTypeDefaultMeaning
valuebool01 keeps the player inside the screen.
movecamerabool, bool0, 0Camera follows on x / on y.
[State 1500, off-screen dive]
type = ScreenBound
trigger1 = 1
value = 0
movecamera = 0, 0

PlayerPush Supported

Turns player-to-player pushing on or off for one tick.

ParameterTypeDefaultMeaning
valuebool10 lets the player overlap others.
[State 1100, pass through]
type = PlayerPush
trigger1 = 1
value = 0

SprPriority Supported

Changes the drawing layer of the player. Higher values draw in front.

ParameterTypeDefaultMeaning
valueintrequiredLayer, usually -5 to 5.
[State 800, throw in front]
type = SprPriority
trigger1 = Time = 0
value = 2

Movimento e posizione

VelSet Supported

Sets the velocity. x is relative to facing (positive is forward), y positive is down.

ParameterTypeDefaultMeaning
xfloatunchangedNew velocity on the x axis.
yfloatunchangedNew velocity on the y axis.
[State 40, jump]
type = VelSet
trigger1 = Time = 0
x = 2.5
y = -8

VelAdd Supported

Adds to the current velocity.

ParameterTypeDefaultMeaning
xfloat0Added to x velocity.
yfloat0Added to y velocity.
[State 1050, float]
type = VelAdd
trigger1 = 1
y = 0.2

VelMul Supported

Multiplies the current velocity.

ParameterTypeDefaultMeaning
xfloat1x velocity multiplier.
yfloat1y velocity multiplier.
[State 100, slow down]
type = VelMul
trigger1 = 1
x = 0.85

PosSet Supported

Moves the player to an absolute position: x from the screen centre, y from the floor.

ParameterTypeDefaultMeaning
xfloatunchangedNew position on the x axis.
yfloatunchangedNew position on the y axis.
[State 5900, land on the floor]
type = PosSet
trigger1 = Time = 0
y = 0

PosAdd Supported

Moves the player by an offset (x relative to facing).

ParameterTypeDefaultMeaning
xfloat0Forward offset.
yfloat0Downward offset.
[State 1100, teleport]
type = PosAdd
trigger1 = AnimElem = 4
x = 120

PosFreeze Supported

Keeps the player from moving this tick (velocity is not applied).

ParameterTypeDefaultMeaning
valuebool10 cancels the freeze.
[State 1300, hold still]
type = PosFreeze
trigger1 = AnimElem = 2, >= 0

Gravity Supported

Adds Const(movement.yaccel) to the y velocity. Use in states with physics = N that still need to fall.

No parameters.

[State 1400, custom fall]
type = Gravity
trigger1 = 1

Offset Not yet

Draws the player shifted by an offset without moving the actual position.

  • Not implemented yet: the controller is skipped and rugen check lists it.
ParameterTypeDefaultMeaning
xfloat0Horizontal draw offset.
yfloat0Vertical draw offset.
[State 1600, shake]
type = Offset
trigger1 = 1
x = ifelse(Time % 2, 2, -2)

BindToParent Supported

Helper only: pins the helper to its parent's position for a time.

ParameterTypeDefaultMeaning
timeint1Ticks to stay bound (0 releases).
facingint01 face the same way as the parent, -1 the opposite way, 0 keep own facing.
posfloat, float0, 0Offset from the parent.
[State 9000, shield follows]
type = BindToParent
trigger1 = 1
pos = 20, -40
facing = 1

BindToRoot Supported

Same as BindToParent, but binds to the root (the main player), however deep the helper chain.

ParameterTypeDefaultMeaning
timeint1Ticks to stay bound.
facingint0Facing rule, as in BindToParent.
posfloat, float0, 0Offset from the root.
[State 9100, aura]
type = BindToRoot
trigger1 = 1
time = -1

BindToTarget Not yet

Pins the player to one of their targets (someone they have hit).

  • Not implemented yet: the controller is skipped and rugen check lists it.
ParameterTypeDefaultMeaning
timeint1Ticks to stay bound.
idint-1 (all)Only targets hit by a HitDef with this id.
posfloat, float[, postype]0, 0Offset from the target; the optional third part picks Foot, Mid or Head.
[State 1700, ride the opponent]
type = BindToTarget
trigger1 = MoveHit
pos = 0, -60, Head

Variabili

VarSet Supported

Sets an int or float variable. Either v / fv plus value, or the short form var(n) = value.

ParameterTypeDefaultMeaning
vintnoneInt variable index (0 to 59).
fvintnoneFloat variable index (0 to 39).
valueint / floatrequiredValue to store.
[State 0, reset combo counter]
type = VarSet
trigger1 = Time = 0
var(10) = 0

VarAdd Supported

Adds to a variable. Same forms as VarSet.

ParameterTypeDefaultMeaning
vintnoneInt variable index.
fvintnoneFloat variable index.
valueint / floatrequiredAmount to add.
[State -2, meter tick]
type = VarAdd
trigger1 = RoundState = 2
fvar(3) = 0.25

VarRandom Supported

Stores a random int in an int variable.

ParameterTypeDefaultMeaning
vintrequiredInt variable index.
rangeint[, int]0, 1000One value N means 0 to N; two values mean min to max (inclusive).
[State 195, pick a taunt]
type = VarRandom
trigger1 = Time = 0
v = 5
range = 1, 3

VarRangeSet Supported

Sets a whole range of variables to one value. Use value for ints or fvalue for floats.

ParameterTypeDefaultMeaning
valueintone of value / fvalueValue for the int variables.
fvaluefloatone of value / fvalueValue for the float variables.
firstint0First index.
lastintlast slotLast index (inclusive).
[State 5900, round start]
type = VarRangeSet
trigger1 = RoundNo = 1
value = 0
first = 0
last = 29

ParentVarSet Supported

Helper only: sets a variable of the parent.

ParameterTypeDefaultMeaning
vintnoneParent int variable index.
fvintnoneParent float variable index.
valueint / floatrequiredValue to store.
[State 9200, tell parent I hit]
type = ParentVarSet
trigger1 = MoveHit = 1
v = 20
value = 1

ParentVarAdd Supported

Helper only: adds to a variable of the parent.

ParameterTypeDefaultMeaning
vintnoneParent int variable index.
fvintnoneParent float variable index.
valueint / floatrequiredAmount to add.
[State 9200, count hits]
type = ParentVarAdd
trigger1 = MoveHit = 1
v = 21
value = 1

Vita, power e scaling del danno

LifeAdd Partial

Adds to (or, with a negative value, removes from) the player's own life.

  • Ignored parameters: absolute.
  • The defence multiplier is not applied, so absolute makes no difference.
ParameterTypeDefaultMeaning
valueintrequiredAmount to add.
killbool10 keeps at least 1 life.
absolutenot yetbool01 ignores attack and defence multipliers.
[State 3500, blood price]
type = LifeAdd
trigger1 = Time = 0
value = -50
kill = 0

LifeSet Supported

Sets life to an exact value (clamped to 0 .. LifeMax).

ParameterTypeDefaultMeaning
valueintrequiredNew life.

A LifeSet in state -2 / -3 is a fairness cheat flag online; see Online-fair characters.

[State 9999, training refill]
type = LifeSet
trigger1 = Life < 100
value = LifeMax

PowerAdd Supported

Adds to the power bar.

ParameterTypeDefaultMeaning
valueintrequiredAmount to add (negative to spend).
[State 3000, spend a bar]
type = PowerAdd
trigger1 = Time = 0
value = -1000

PowerSet Supported

Sets the power bar (clamped to 0 .. PowerMax).

ParameterTypeDefaultMeaning
valueintrequiredNew power.
[State 5900, empty meter]
type = PowerSet
trigger1 = RoundNo = 1
value = 0

AttackMulSet Supported

Scales the damage of the player's attacks.

ParameterTypeDefaultMeaning
valuefloatrequiredMultiplier (1 is normal).
[State 3200, power up]
type = AttackMulSet
trigger1 = Time = 0
value = 1.2

DefenceMulSet Supported

Scales the damage the player takes. Bigger values mean less damage.

ParameterTypeDefaultMeaning
valuefloatrequiredDefence multiplier (1 is normal).
[State 3200, armour]
type = DefenceMulSet
trigger1 = Time = 0
value = 1.5

Attacco e rilevamento dei colpi

HitDef Partial

Defines an attack. While it is active, the player's Clsn1 boxes hit the first Clsn2 box they touch, and the HitDef decides damage, hit reaction, guard behaviour, effects and what the opponent does next. One HitDef hits once; re-run it (or use hitonce = 0 for multi-hit) for more hits.

  • Ignored parameters: palfx.time, palfx.mul, palfx.add.
ParameterTypeDefaultMeaning
attrS/C/A, classrequiredState type of the attack and its class, e.g. S, NA (standing normal attack). Classes: N / S / H (normal, special, hyper) followed by A / T / P (attack, throw, projectile).
hitflagflagsMAFWhat it can hit: H (standing), L (crouching), A (air), M (= H + L), F (falling), D (lying down), plus + (only get-hit states) or - (never get-hit states).
guardflagflagsnone (unblockable)How it can be guarded: H high, L low, A air, M mid (= H + L).
affectteamE / B / FEHit enemies, both teams, or friends only.
animtypestringLightReaction size on the ground: Light, Medium, Hard, Back, Up, DiagUp.
air.animtypestring= animtypeReaction animation in the air.
fall.animtypestringBack or UpReaction animation while falling.
priorityint[, Hit/Miss/Dodge]4, HitTrading rule when two attacks connect on the same tick.
damageint, int0, 0Damage on hit, damage on guard.
pausetimeint, int0, 0Hit pause for the attacker, hit shake for the defender.
guard.pausetimeint, int= pausetimeThe same, when guarded.
sparknointfrom the [Data] constantsHit spark action (prefix S for your own .air; -1 for none).
guard.sparknointfrom the [Data] constantsGuard spark action.
sparkxyfloat, float0, 0Spark position, relative to the opponent's front edge (x) and the attacker (y).
hitsoundgroup, numbernoneSound on hit (prefix S for your own .snd).
guardsoundgroup, numbernoneSound on guard.
ground.typeHigh / Low / Trip / NoneHighGround reaction kind.
air.typeHigh / Low / Trip / None= ground.typeAir reaction kind.
ground.slidetimeint0Ticks the opponent slides back after a ground hit.
guard.slidetimeint= ground.slidetimeSlide time on guard.
ground.hittimeint0Ticks the opponent stays in hit stun.
guard.hittimeint= ground.hittimeGuard stun.
air.hittimeint20Air stun when the hit does not make them fall.
guard.ctrltimeint= guard.slidetimeTicks until the guarding player regains control.
guard.distintfrom the [Size] constantsDistance at which the opponent starts guarding when holding back.
yaccelfloat0.35 (240p)Gravity applied to the opponent during the hit.
ground.velocityfloat, float0, 0Velocity given to a grounded opponent.
guard.velocityfloat= ground.velocity xPush-back on guard.
air.velocityfloat, float0, 0Velocity given to an airborne opponent.
airguard.velocityfloat, floatair.velocity x 1.5, / 2Velocity on air guard.
ground.cornerpush.velofffloatderivedPush-back on the attacker when the opponent is in the corner.
air.cornerpush.velofffloat= ground valueCorner push for air hits.
down.cornerpush.velofffloat= ground valueCorner push for down hits.
guard.cornerpush.velofffloat= ground valueCorner push on guard.
airguard.cornerpush.velofffloat= guard valueCorner push on air guard.
airguard.ctrltimeint= guard.ctrltimeControl delay after an air guard.
air.juggleint0Juggle points this hit costs.
mindistfloat, floatnoneMinimum distance the opponent is moved to.
maxdistfloat, floatnoneMaximum distance the opponent can be from the attacker.
snapfloat, floatnoneSnaps the opponent to this offset on hit.
p1sprpriorityint1Attacker drawing layer on hit.
p2sprpriorityint0Defender drawing layer on hit.
p1facingint0-1 turns the attacker around on hit.
p1getp2facingint01 or -1: attacker faces the same way / the opposite way as the defender.
p2facingint01 makes the defender face the attacker, -1 face away.
p1statenoint-1State the attacker enters on hit.
p2statenoint-1State the defender enters on hit (a custom state: throws).
p2getp1statebool1With p2stateno: the defender runs the attacker's state files.
forcestandbool0 (1 for high hits)Forces a crouching defender to stand.
fallbool0The hit knocks the defender down.
fall.xvelocityfloatunchangedx velocity when the fall starts.
fall.yvelocityfloat-4.5y velocity when the fall starts.
fall.recoverbool1The defender may recover in mid-air.
fall.recovertimeint4Ticks before a recovery is possible.
fall.damageint0Damage when the defender hits the floor.
air.fallbool= fallFall flag for air hits.
forcenofallbool0Cancels the fall of an already falling defender.
down.velocityfloat, float= air.velocityVelocity for hitting a lying-down opponent.
down.hittimeint0Stun when hitting a lying-down opponent.
down.bouncebool0A down hit bounces the opponent.
idint0Id written to the target list; read with NumTarget(id) and the Target* controllers.
chainidint-1Chain id the defender stores; used with nochainid.
nochainidint, int-1, -1This HitDef misses a defender whose last chain id is one of these.
hitoncebool0 (1 for throws)Hit only one opponent, then stop.
killbool10 cannot KO on hit.
guard.killbool10 cannot KO on guard.
fall.killbool10 cannot KO with fall damage.
numhitsint1Hits added to the combo counter.
getpowerint, intfrom the damagePower the attacker gains on hit / on guard.
givepowerint, intfrom the damagePower the defender gains on hit / on guard.
palfx.timenot yetint0Palette effect on the defender: duration.
palfx.mulnot yetint, int, int256, 256, 256Palette effect colour multiplier.
palfx.addnot yetint, int, int0, 0, 0Palette effect colour offset.
envshake.timeint0Screen shake on hit: duration.
envshake.freqfloat60Screen shake frequency.
envshake.amplint-4Screen shake amplitude.
envshake.phasefloat0Screen shake phase.
fall.envshake.timeint0Shake when the defender lands from the fall.
fall.envshake.freqfloat60Fall shake frequency.
fall.envshake.amplint-4Fall shake amplitude.
fall.envshake.phasefloat0Fall shake phase.
[State 200, jab]
type = HitDef
trigger1 = AnimElem = 3
attr = S, NA
damage = 25, 2
animtype = Light
guardflag = MA
hitflag = MAF
pausetime = 10, 11
sparkxy = -10, -70
hitsound = 5, 0
guardsound = 6, 0
ground.type = High
ground.slidetime = 6
ground.hittime = 10
ground.velocity = -4

ReversalDef Partial

A counter: while active, an incoming attack that matches reversal.attr touching your Clsn1 is reversed instead of hitting you. Accepts the HitDef parameters that describe what happens to the attacker (pausetime, sparks, sounds, p1stateno / p2stateno, and so on).

  • The MoveReversed trigger still returns 0 after a successful reversal.
ParameterTypeDefaultMeaning
reversal.attrattr stringrequiredWhich attacks it reverses, e.g. SCA, NA, SA.
[State 1300, parry]
type = ReversalDef
trigger1 = Time < 10
reversal.attr = SC, NA, SA
pausetime = 12, 12
p1stateno = 1310

Projectile Partial

Fires a projectile. Takes every HitDef parameter for the hit itself, plus the projectile parameters below.

  • Ignored parameters: projshadow.
  • afterimage.*, ownpal and remappal are accepted but have no effect.
ParameterTypeDefaultMeaning
projidint0Id for the Proj* triggers and NumProjID.
projanimint0Flying animation.
projhitanimint-1Animation played on hit.
projremanimint= projhitanimAnimation played when removed.
projcancelanimint= projremanimAnimation played when cancelled by another projectile.
projscalefloat, float1, 1Draw scale.
projremovebool1Remove after the last hit.
projremovetimeint-1 (never)Remove after this many ticks.
velocityfloat, float0, 0Starting velocity (x relative to facing).
remvelocityfloat, float0, 0Velocity while the remove animation plays.
accelfloat, float0, 0Acceleration.
velmulfloat, float1, 1Velocity multiplier per tick.
projhitsint1Hits before it is removed.
projmisstimeint0Ticks between hits for multi-hit projectiles.
projpriorityint1Strength against other projectiles; a stronger one survives.
projsprpriorityint3Drawing layer.
projedgeboundint40 (240p)How far past the screen edge it may fly before removal.
projstageboundint40 (240p)How far past the stage edge.
projheightboundint, int-240, 1 (240p)Lowest and highest y before removal.
offsetfloat, float0, 0Spawn offset.
postypep1 / p2 / front / back / left / rightp1What the offset is relative to.
projshadownot yetint[, int, int]0Shadow colour, -1 to use the stage shadow.
supermovetimeint0Ticks it moves during a SuperPause.
pausemovetimeint0Ticks it moves during a Pause.
afterimage.timeint0After-image trail duration (with other afterimage.* keys).
ownpalbool0Use its own copy of the palette (immune to later PalFX on the owner).
remappalint, int-1, 0Palette remap for the projectile.
[State 1000, fireball]
type = Projectile
trigger1 = AnimElem = 4
projid = 1000
projanim = 1005
projhitanim = 1006
velocity = 5
offset = 40, -60
attr = S, SP
damage = 60, 8
hitflag = MAF
guardflag = MA
pausetime = 0, 12
ground.velocity = -5

HitBy Supported

Makes the player hittable only by the listed attack types for a while. Everything else misses.

ParameterTypeDefaultMeaning
valueattr stringone of value / value2Attacks that may hit, e.g. SCA, NA, SA. Uses slot 1.
value2attr stringone of value / value2The same, in slot 2 (the slots are independent).
timeint1Ticks it stays active.
[State 1400, only throws connect]
type = HitBy
trigger1 = 1
value = SCA, AT

NotHitBy Supported

The opposite of HitBy: the listed attack types miss the player for a while. The usual way to give invincibility frames.

ParameterTypeDefaultMeaning
valueattr stringone of value / value2Attacks that miss. SCA alone means everything.
value2attr stringone of value / value2Second, independent slot.
timeint1Ticks it stays active.

Permanent NotHitBy in state -2 / -3 is a fairness cheat flag; see Online-fair characters.

[State 1100, invincible startup]
type = NotHitBy
trigger1 = AnimElemTime(4) < 0
value = SCA

HitOverride Supported

When an attack matching attr hits, send the player to stateno instead of the normal get-hit state. Used for armour, counters and custom reactions.

ParameterTypeDefaultMeaning
attrattr stringrequiredAttacks it reacts to.
statenointrequiredState to enter instead.
slotint0Slot 0 to 7; each holds one override.
timeint1Ticks it stays active (-1 forever).
forceairbool0Treat the hit as an air hit for the stored hit data.
forceguardbool0Treat the hit as guarded.
[State 1500, counter stance]
type = HitOverride
trigger1 = Time = 0
attr = SC, NA, SA
stateno = 1510
time = 20

AttackDist Not yet

Changes the guard.dist of the current HitDef: how close the opponent must be to start guarding.

  • Not implemented yet: the controller is skipped and rugen check lists it.
ParameterTypeDefaultMeaning
valueintrequiredNew guard distance.
[State 1200, long reach]
type = AttackDist
trigger1 = Time = 0
value = 220

MoveHitReset Supported

Resets MoveHit, MoveGuarded and MoveContact to 0, so a later check sees only new contact.

No parameters.

[State 1000, reset for second hit]
type = MoveHitReset
trigger1 = AnimElem = 6

HitAdd Supported

Adds to the combo counter without a hit.

ParameterTypeDefaultMeaning
valueintrequiredHits to add.
[State 3100, cinematic hits]
type = HitAdd
trigger1 = AnimElem = 5
value = 3

Subire un colpo

HitVelSet Supported

In a get-hit state: sets velocity from the stored hit velocity.

ParameterTypeDefaultMeaning
xbool01 applies the stored x velocity.
ybool01 applies the stored y velocity.
[State 5000, apply knockback]
type = HitVelSet
trigger1 = Time = 0
x = 1

HitFallSet Supported

Changes the fall flag and the fall velocities stored from the last hit.

ParameterTypeDefaultMeaning
valueint-1 (unchanged)1 sets the fall flag, 0 clears it.
xvelfloatunchangedNew fall x velocity.
yvelfloatunchangedNew fall y velocity.
[State 5100, softer bounce]
type = HitFallSet
trigger1 = Time = 0
yvel = -3

HitFallVel Supported

If the fall flag is set, applies the stored fall velocities. common1 uses it when the player hits the floor.

No parameters.

[State 5100, bounce up]
type = HitFallVel
trigger1 = Time = 0

HitFallDamage Supported

Applies the stored fall.damage once, when the falling player hits the floor.

No parameters.

[State 5100, floor damage]
type = HitFallDamage
trigger1 = Time = 0

FallEnvShake Supported

Shakes the screen using the stored fall.envshake.* values, once per fall.

No parameters.

[State 5100, ground shake]
type = FallEnvShake
trigger1 = Time = 0

Target

TargetState Supported

Puts your targets into one of your states (they run your state code).

ParameterTypeDefaultMeaning
valueintrequiredState number.
idint-1 (all)Only targets hit by a HitDef with this id.
[State 800, throw connects]
type = TargetState
trigger1 = MoveHit
value = 820

TargetLifeAdd Supported

Changes your targets' life.

ParameterTypeDefaultMeaning
valueintrequiredAmount (negative for damage).
killbool10 keeps them at 1 life or more.
absolutebool01 ignores attack and defence multipliers.
idint-1 (all)Only targets hit by a HitDef with this id.
[State 820, slam damage]
type = TargetLifeAdd
trigger1 = AnimElem = 5
value = -90

TargetPowerAdd Supported

Changes your targets' power.

ParameterTypeDefaultMeaning
valueintrequiredAmount.
idint-1 (all)Only targets hit by a HitDef with this id.
[State 1600, drain meter]
type = TargetPowerAdd
trigger1 = MoveHit
value = -300

TargetVelSet Supported

Sets your targets' velocity (x relative to the target's facing).

ParameterTypeDefaultMeaning
xfloatunchangedx velocity.
yfloatunchangedy velocity.
idint-1 (all)Only targets hit by a HitDef with this id.
[State 820, toss]
type = TargetVelSet
trigger1 = AnimElem = 6
x = -3
y = -6

TargetVelAdd Supported

Adds to your targets' velocity.

ParameterTypeDefaultMeaning
xfloat0Added x velocity.
yfloat0Added y velocity.
idint-1 (all)Only targets hit by a HitDef with this id.
[State 820, gravity on target]
type = TargetVelAdd
trigger1 = 1
y = 0.4

TargetFacing Supported

Turns your targets.

ParameterTypeDefaultMeaning
valueintrequired1 faces the same way as you, -1 the opposite way.
idint-1 (all)Only targets hit by a HitDef with this id.
[State 820, face me]
type = TargetFacing
trigger1 = Time = 0
value = -1

TargetBind Supported

Pins your targets to an offset from you.

ParameterTypeDefaultMeaning
timeint1Ticks to stay bound.
posfloat, float0, 0Offset from you.
idint-1 (all)Only targets hit by a HitDef with this id.
[State 810, hold]
type = TargetBind
trigger1 = AnimElem = 2, >= 0
pos = 30, -20

TargetDrop Supported

Removes players from your target list.

ParameterTypeDefaultMeaning
excludeidint-1Keep targets hit by this HitDef id; drop the rest.
keeponebool1Keep only one target of the kept ones.
[State 900, single grab]
type = TargetDrop
trigger1 = Time = 0
excludeid = 900

Helper ed explod

Helper Partial

Spawns a helper: a full extra player that runs your state code from stateno, owned by you. Helpers can attack, spawn projectiles and other helpers.

  • Ignored parameters: name, ownpal, remappal, size.xscale.
  • The helper always uses the owner's name and [Size] constants.
ParameterTypeDefaultMeaning
helpertypenormal / playernormalplayer makes it count as a player (camera, screen bound). Avoid unless needed.
namenot yetstringowner's nameName used by the Name trigger.
idint0Id for NumHelper / Helper(id) redirection.
posfloat, float0, 0Spawn offset.
postypep1 / p2 / front / back / left / rightp1What the offset is relative to.
facingint11 same facing as the owner, -1 opposite.
statenoint0State the helper starts in.
keyctrlbool0The helper reads the owner's command input.
ownpalnot yetbool0Use its own copy of the palette.
remappalnot yetint, int-1, 0Palette remap for the helper.
supermovetimeint0Ticks it moves during a SuperPause.
pausemovetimeint0Ticks it moves during a Pause.
size.xscalenot yetfloatowner valueOverrides a [Size] constant for the helper (all size.* keys work the same way).
[State 1200, summon]
type = Helper
trigger1 = AnimElem = 3
helpertype = normal
name = "Hawk"
id = 1201
stateno = 1250
pos = 40, -80
postype = p1

DestroySelf Supported

Helper only: removes the helper. Code after it in the same state does not run.

ParameterTypeDefaultMeaning
recursivebool0Also remove the helper's own helpers.
removeexplodsbool0Also remove its explods.
[State 1250, vanish]
type = DestroySelf
trigger1 = AnimTime = 0

Explod Partial

Spawns a visual-only animation (effects, dust, auras). Explods never hit or get hit.

  • Ignored parameters: xangle, yangle, shadow, ownpal, remappal.
ParameterTypeDefaultMeaning
animintrequiredAction to play; prefix F for fightfx.air.
idint-1Id for NumExplod / ModifyExplod / RemoveExplod.
posfloat, float0, 0Offset.
postypep1 / p2 / front / back / left / rightp1What the offset is relative to.
spacescreen / stagefrom postypeCoordinate space (MUGEN 1.1).
facingint11 same facing, -1 flipped.
vfacingint1-1 flips it vertically.
bindtimeint0Ticks it follows the bind point (-1 forever).
velfloat, float0, 0Velocity.
accelfloat, float0, 0Acceleration.
randomint, int0, 0Random spread added to the position.
removetimeint-2Ticks until removal; -1 never, -2 when the animation ends.
supermovebool0Old form of supermovetime.
supermovetimeint0Ticks it moves during a SuperPause.
pausemovetimeint0Ticks it moves during a Pause.
scalefloat, float1, 1Draw scale.
anglefloat0Rotation in degrees.
xanglenot yetfloat03D tilt around the x axis.
yanglenot yetfloat03D tilt around the y axis.
sprpriorityint0Drawing layer.
ontopbool0Draw above everything (hit-spark layer).
shadownot yetint, int, int0, 0, 0Shadow colour; -1 uses the stage shadow.
ownpalnot yetbool0Use its own copy of the palette.
remappalnot yetint, int-1, 0Palette remap.
removeongethitbool0Remove when the owner is hit.
ignorehitpausebool1Keep animating during the owner's hit pause.
transstringfrom the .airTransparency: none, add, add1, addalpha, sub.
alphaint, int256, 256Source / destination alpha with addalpha.

rugen also reads the Ikemen keys removeonchangestate, under, animelem, animfreeze and friction.

[State 1000, muzzle flash]
type = Explod
trigger1 = AnimElem = 4
anim = 1010
id = 1010
pos = 50, -62
postype = p1
sprpriority = 3
removetime = -2

ModifyExplod Supported

Changes explods that are already on screen. Takes the Explod parameters; only the ones you write are changed.

ParameterTypeDefaultMeaning
idint-1 (all)Which explods to change.
[State 1000, fade the flash]
type = ModifyExplod
trigger1 = AnimElem = 6
id = 1010
trans = add

RemoveExplod Supported

Removes explods.

ParameterTypeDefaultMeaning
idint-1 (all)Which explods to remove.
[State 0, cleanup]
type = RemoveExplod
trigger1 = Time = 0
id = 1010

ExplodBindTime Supported

Changes how long explods stay bound to their bind point.

ParameterTypeDefaultMeaning
idint-1 (all)Which explods.
timeint0New bind time (-1 forever).
[State 1000, release]
type = ExplodBindTime
trigger1 = AnimElem = 5
id = 1010
time = 0

GameMakeAnim Supported

Old way to show a fightfx.air animation. New code should use Explod with an F prefix.

ParameterTypeDefaultMeaning
valueint0fightfx action.
underbool0Draw behind the players.
posfloat, float0, 0Offset.
randomint0Random spread.
[State 1000, old spark]
type = GameMakeAnim
trigger1 = AnimElem = 2
value = 2
pos = 30, -50

MakeDust Partial

Puts dust puffs (fightfx action 120) at one or two points. Used for running and landing.

  • Ignored parameters: spacing.
ParameterTypeDefaultMeaning
posint, int0, 0First dust point.
pos2int, intnoneSecond dust point.
spacingnot yetint1Ticks between puffs.
[State 100, run dust]
type = MakeDust
trigger1 = Time % 6 = 0
pos = -10, 0

Effetti visivi

PalFX Supported

Tints the player's palette for a while: multiply, add, a sine-pulsing add, colour (saturation) and invert. The final colour is (colour + add + sinadd) x mul / 256.

ParameterTypeDefaultMeaning
timeint0Ticks (-1 forever).
addint, int, int0, 0, 0Added to red, green, blue.
mulint, int, int256, 256, 256Multiplier for red, green, blue (256 = unchanged).
sinaddr, g, b, period0, 0, 0, 0Pulsing add; the fourth value is the period in ticks.
invertallbool0Invert the colours.
colorint256Saturation: 0 is greyscale, 256 full colour.

rugen also reads the Ikemen keys sinmul and sincolor.

[State 3000, glow]
type = PalFX
trigger1 = Time = 0
time = 30
add = 80, 20, 0
sinadd = 60, 30, 0, 12

AllPalFX Supported

PalFX for everything on screen: all players, the stage and the lifebars. Same parameters as PalFX.

ParameterTypeDefaultMeaning
timeint0Ticks (-1 forever).
addint, int, int0, 0, 0Colour offset.
mulint, int, int256, 256, 256Colour multiplier.
sinaddr, g, b, period0, 0, 0, 0Pulsing add.
invertallbool0Invert.
colorint256Saturation.
[State 3000, world goes grey]
type = AllPalFX
trigger1 = Time = 0
time = 40
color = 0

BGPalFX Supported

PalFX for the stage background only. Same parameters as PalFX.

ParameterTypeDefaultMeaning
timeint0Ticks (-1 forever).
addint, int, int0, 0, 0Colour offset.
mulint, int, int256, 256, 256Colour multiplier.
sinaddr, g, b, period0, 0, 0, 0Pulsing add.
invertallbool0Invert.
colorint256Saturation.
[State 3000, red sky]
type = BGPalFX
trigger1 = Time = 0
time = 60
mul = 256, 120, 120

AfterImage Supported

Leaves a trail of fading copies of the player. Each copy's palette is processed with the pal* parameters step by step.

ParameterTypeDefaultMeaning
timeint1Ticks the trail is recorded (-1 forever).
lengthint20Number of frames kept in the trail buffer.
timegapint1Ticks between recorded frames.
framegapint4Draw every n-th recorded frame.
palcolorint256Saturation of the copies.
palinvertallbool0Invert the copies.
palbrightint, int, int30, 30, 30Added before contrast.
palcontrastint, int, int255, 255, 255Contrast multiplier.
palpostbrightint, int, int0, 0, 0Added after contrast.
paladdint, int, int10, 10, 25Added per step down the trail.
palmulfloat, float, float0.65, 0.65, 0.75Multiplied per step down the trail.
transstringaddBlend mode of the copies.
[State 1100, dash trail]
type = AfterImage
trigger1 = Time = 0
time = 20
length = 12
paladd = 0, 0, 40
palmul = 0.7, 0.7, 0.9

AfterImageTime Supported

Changes how long the current after-image keeps recording.

ParameterTypeDefaultMeaning
timeintrequiredNew duration; 0 stops it.
[State 1100, stop trail]
type = AfterImageTime
trigger1 = AnimElem = 6
time = 0

Trans Supported

Overrides the player's transparency for one tick.

ParameterTypeDefaultMeaning
transstringdefaultdefault, none, add, add1, addalpha or sub.
alphaint, int256, 256Source and destination alpha for addalpha.
[State 1700, ghost]
type = Trans
trigger1 = 1
trans = addalpha
alpha = 128, 128

AngleDraw Supported

Draws the player rotated (by the angle set with AngleSet / AngleAdd / AngleMul) and optionally scaled, for one tick.

ParameterTypeDefaultMeaning
valuefloatcurrent angleAngle to draw with.
scalefloat, float1, 1Draw scale.
[State 1800, spin]
type = AngleDraw
trigger1 = 1
value = Time * 12

AngleSet Supported

Sets the drawing angle in degrees (counter-clockwise). Shown only while AngleDraw runs.

ParameterTypeDefaultMeaning
valuefloatrequiredAngle.
[State 1800, start angle]
type = AngleSet
trigger1 = Time = 0
value = 0

AngleAdd Supported

Adds to the drawing angle.

ParameterTypeDefaultMeaning
valuefloatrequiredDegrees to add.
[State 1800, keep spinning]
type = AngleAdd
trigger1 = 1
value = 15

AngleMul Supported

Multiplies the drawing angle.

ParameterTypeDefaultMeaning
valuefloatrequiredMultiplier.
[State 1800, slow the spin]
type = AngleMul
trigger1 = Time > 20
value = 0.9

EnvShake Supported

Shakes the screen vertically.

ParameterTypeDefaultMeaning
timeintrequiredTicks.
freqfloat60Frequency (0 to 180).
amplint-4Amplitude in pixels; negative starts upward.
phasefloat0 (90 for high freq)Starting phase.
[State 3100, impact]
type = EnvShake
trigger1 = AnimElem = 4
time = 20
ampl = 6

EnvColor Not yet

Fills the screen with a flat colour (hit sparks and on-top explods stay visible).

  • Not implemented yet: the controller is skipped and rugen check lists it.
ParameterTypeDefaultMeaning
valueint, int, int255, 255, 255Colour.
timeint1Ticks (-1 forever).
underbool01 draws the colour behind the players.
[State 3100, white flash]
type = EnvColor
trigger1 = AnimElem = 4
time = 3

RemapPal Not yet

Swaps one palette of the player for another (from the SFF palette table).

  • Accepted but has no effect yet.
ParameterTypeDefaultMeaning
sourceint, int-1, 0Palette group and number to replace.
destint, int-1, 0Palette to use instead.
[State 3000, dark form]
type = RemapPal
trigger1 = Time = 0
source = 1, 1
dest = 1, 4

Suono

PlaySnd Partial

Plays a sound from your .snd (or, with an F prefix, from common.snd / fight.snd).

  • Ignored parameters: lowpriority, freqmul, loop, pan, abspan.
ParameterTypeDefaultMeaning
valuegroup, numberrequiredSound to play; F5, 0 for the common sounds.
channelint-1Channel; a new sound replaces the old one on the same channel. 0 is the voice channel.
lowprioritynot yetbool0Do not interrupt a sound already playing on the channel.
volumescalefloat100Volume in percent.
freqmulnot yetfloat1Pitch multiplier.
loopnot yetbool0Loop until stopped.
pannot yetint0Pan relative to the player (positive is forward).
abspannot yetintnonePan relative to the screen centre.
[State 200, swing sound]
type = PlaySnd
trigger1 = Time = 2
value = 0, 1

StopSnd Supported

Stops the sound on a channel, or all of the player's sounds with -1.

ParameterTypeDefaultMeaning
channelintrequiredChannel to stop (-1 all).
[State 0, stop the loop]
type = StopSnd
trigger1 = Time = 0
channel = 3

SndPan Not yet

Moves a playing sound left or right.

  • Not implemented yet: the controller is skipped and rugen check lists it.
ParameterTypeDefaultMeaning
channelintrequiredChannel.
panintone of pan / abspanPan relative to the player.
abspanintone of pan / abspanPan relative to the screen centre.
[State 1000, follow the projectile]
type = SndPan
trigger1 = 1
channel = 4
pan = Time * 2

Sistema e debug

VictoryQuote Not yet

Picks which quote from the [Quotes] section of your .cns is shown on the victory screen.

  • Not implemented yet: the controller is skipped and rugen check lists it.
ParameterTypeDefaultMeaning
valueint-1 (random)Quote index 0 to 99.
[State 180, win pose]
type = VictoryQuote
trigger1 = Time = 0
value = 3

ForceFeedback Partial

Rumble for controllers that support it.

  • Accepted and ignored: rugen has no rumble output yet.
ParameterTypeDefaultMeaning
waveformsine / square / sinesquare / offsineMotor pattern.
timeint60Ticks.
freqint, float, float, float128, 0, 0, 0Frequency curve.
amplint, float, float, float128, 0, 0, 0Strength curve.
selfbool11 rumbles your pad, 0 the opponent's.
[State 5000, rumble on hit]
type = ForceFeedback
trigger1 = Time = 0
time = 10

AppendToClipboard Not yet

Debug: adds a formatted line to the player's clipboard text. Same parameters as DisplayToClipboard.

  • Not implemented yet: the controller is skipped and rugen check lists it.
ParameterTypeDefaultMeaning
textstringrequiredprintf-style format string in double quotes (%d, %f, \n).
paramsexpr listnoneUp to six values for the format string.
[State -1, debug]
type = AppendToClipboard
trigger1 = 1
text = "vel %f\n"
params = Vel X

ClearClipboard Not yet

Debug: empties the player's clipboard text.

  • Not implemented yet: the controller is skipped and rugen check lists it.

No parameters.

[State -1, debug]
type = ClearClipboard
trigger1 = Time = 0

DisplayToClipboard Not yet

Debug: replaces the player's clipboard text with a formatted line.

  • Not implemented yet: the controller is skipped and rugen check lists it.
ParameterTypeDefaultMeaning
textstringrequiredprintf-style format string in double quotes.
paramsexpr listnoneUp to six values.
[State -1, debug]
type = DisplayToClipboard
trigger1 = 1
text = "state %d, var(5) = %d"
params = StateNo, var(5)

Aggiornare i dati di stato

I badge sono generati, non scritti a mano. scripts/gen-support.mjs nel repository della documentazione legge il sorgente del motore:

  • crates/sim/src/sctrl.rs: i nomi dei controller che rugen compila, i parametri che ognuno legge (comprese le chiavi di HitDef usate in crates/sim/src/collision.rs) e quali vengono accettati come no-op;
  • crates/sim/src/world.rs: parametri che un controller compila ma non usa mai;
  • crates/cns/src/parser.rs e crates/sim/src/context.rs: i nomi dei trigger e i trigger che rispondono sempre con un valore fisso.

Lo confronta con gli elenchi di parametri di questa pagina e scrive src/data/support.json, che è committato così il sito si compila senza il motore. Le note scritte a mano per ciò che l’analisi statica non vede stanno in src/data/controllers.mjs e src/data/triggers.mjs. Per aggiornare:

node scripts/gen-support.mjs ../rugen   # path to an engine checkout
git diff src/data/support.json

Riferimento originale: elecbyte.com/mugendocs-11b1.

Qualcosa non va in questa pagina? Modificala su GitHub.

CERCA !!

    ↑↓ per spostarti, Invio per aprire