Skip to content

State controllers (changed)

PotS edited this page Sep 20, 2024 · 58 revisions

The state controllers listed in this page already existed in Mugen, but were adjusted or expanded in Ikemen GO.

Use the sidebar for quick navigation.

palinvertblend = blend_mode (int)

Inverts current blend mode if enabled so Sub becomes Add and Add becomes Sub.

For PalFx it accepts 4 values:

  • 0 = Disabled (Mugen 1.0 blending behavior)
  • 1 = Enabled (Mugen 1.0 blending behavior)
  • -1 = Disabled (Mugen 1.1 blending behavior)
  • 2 = Enabled (Mugen 1.1 blending behavior)

If character MugenVersion is 1.1 and invertall = 1 and if invertblend param is omitted, it inverts blend by default. For all other MugenVersion invertblend is 0 if omitted.

invertblend = blend_mode (int)

Inverts current blend mode if enabled so Sub becomes Add and Add becomes Sub.

For AllPalFx it accepts 2 values:

  • 0 = Disabled (Mugen 1.0 blending behavior)
  • 1 = Enabled (Mugen 1.1 blending behavior)

Defaults to 0 if omitted. If 1 it inverts blending on chars "layer".

RescaleClsn (nightly build only)

This optional parameter makes the player's collision boxes be rescaled along with the player's sprites.

Example:

[State Test]
type = AngleDraw
trigger1 = 1
Scale = 0.5, 0.5
RescaleClsn = 1

RotateClsn (nightly build only)

[TODO] Makes Clsn boxes match the player's angle. Subject to change.

Unlike Mugen, Ikemen GO can use unlimited amount of numeric arguments. Also it supports format specifiers, e.g. %0.2f (prints float value truncated to 2 digits), %v (prints the value in a default format and optimal formatting, regardless if it's int, float or string).

AnimateHitpause (nightly build only)

While asserted, this flag makes the player's animation advance normally even during a hitpause.

While asserted, the player's animation will be frozen on the current frame.

While asserted, makes the player guard automatically, without need to press back direction. The player will also switch automatically between standing and crouching guard.

CornerPriority (nightly build only)

While asserted, makes the player have priority to push the enemy out of the stage's corners when their Pos X is the same.
If two players have this flag asserted, priority is handled as if neither of them had it.

DrawUnder (nightly build only)

While asserted, makes the player sprites be drawn with the same properties of Explod under parameter. That is, if the player is on layer 0, it will always be drawn behind lifebars and character shadows.

While asserted all players won't die from taking damage.

Immovable (nightly build only)

While asserted it will prevent the character from being moved when other characters push against it. If two characters with this flag move against each other, they will push each other normally.

While asserted, makes the player AILevel and AILevelF triggers return 0

Disables the hard-coded state transitions to State 45 when Ctrl=1 && StateType=A && Command="holdup" and AirJump.Num allows

Disables the hard-coded state transitions to State 0 when StateNo=20 && Command!="holdfwd" && Command!="holdback"

Disables the hard-coded state transitions to State 10 when Ctrl=1 && StateType=S && Command="holddown".

While asserted, player won't be affected by a HitDef's dizzypoints parameter.

Disables the hard-coded faster recover from lie down on key input mashing when StateType=L && GetHitVar(RecoverTime)>0.

Disables the hard-coded FallCount increment when StateNo=5070 || StateNo=5100.

Disables the hard-coded defence increase when StateNo=5070 || StateNo=5100.

NoFallHitflag (nightly build only)

While asserted, every HitDef will act as if its HitFlag has no F parameter. In other words, the player becomes unable to hit falling enemies.

Disables the hard-coded state transitions to State 5120 when StateNo=5110 && GetHitVar(RecoverTime)=0.

While asserted player won't die from taking chip damage.

While asserted, player won't be affected by HitDef damage guard_damage.

While asserted, player won't be affected by HitDef guardpoints.

NoFightDisplay (nightly build only)

While asserted, the "fight" announcement on round start will be skipped.

Disables the hard-coded state transitions when pressing directional keys (combination of NoJump, NoAirJump, NoCrouch, NoStand, NoWalk, NoBrake, NoStandGuard, NoCrouchGuard, NoAirGuard).

While asserted, player won't be affected by HitDef damage hit_damage.

While asserted, makes the player ignore any player/CPU inputs.

While asserted, prevents a player from being forced to their starting position after the round number announcement.

Disables the hard-coded state transitions to State 40 when Ctrl=1 && StateType=S && Command="holdup"

While asserted, the player won't die from taking damage.

Note: ikemenVersion changes default behaviour of this flag.

NoKoDisplay (nightly build only)

While asserted, the KO announcement on round end will be skipped.

While asserted, player won't be affected by HitDef velocity adjustments upon KO.

While asserted, the player does not generate hardcoded dust effects. The MakeDust state controller will also have no effect.

While asserted, disables displaying powerbars by this playerno (with team power share option enabled and/or lifebar design with only 1 powerbar per side, the flag has to be asserted on team leader to disable powerbar rendering for whole team).

NoRoundDisplay (nightly build only)

While asserted, the round number announcement on round start will be skipped.

Disables the hard-coded state transitions to State 12 when StateType=C && Command!="holddown".

While asserted, keeps the opponent from automatically turning to face the player.

NoWinDisplay (nightly build only)

While asserted, the winner announcement on round end will be skipped.

While asserted, player's inputs are not disabled post-match (RoundState>2 || RoundState=-1).

ProjTypeCollision (nightly build only)

While asserted, the player will clash with projectiles (and other players with the same flag) if their Clsn2 boxes overlap. This allows helpers to easily replicate this kind of projectile clashing.

While asserted, round related lifebar actions and internal timers are frozen (allows maintaining current roundstate).

Disables intro and victory pose skipping via button press.

RunFirst (nightly build only)

While asserted, makes the player code be processed before that of any other players.

RunLast (nightly build only)

While asserted, makes the player code be processed after all other players.

SizePushOnly (nightly build only)

In Ikemen, like Mugen, characters will push each other when both their size boxes (width * height) and their Clsn2 boxes overlap. Asserting this flag makes it so that only the size boxes are checked, as in most fighting games.

Value (nightly build only)

The value parameter now takes a second number. This number sets the distance that a player can attack behind the enemy and still allow them to enter proximity guard.

Example:

[State Test]
type = AttackDist
trigger1 = 1
value = 100, 50

Damage (nightly build only)

Sets an attack multiplier for regular damage only.

DizzyPoints (nightly build only)

Sets an attack multiplier for dizzy points only.

GuardPoints (nightly build only)

Sets an attack multiplier for guard points only.

RedLife (nightly build only)

Sets an attack multiplier for red life only.

Sets the attack multiplier for all types of damage.

Example:

[State Test]
type = AttackMulSet
trigger1 = 1
Damage = 0.50
RedLife = 2.00
DizzyPoints = 0.75
GuardPoints = 0.00

This parameter lets a character use the specified animation from another character, including their sprites.

ChangeAnim2 Parameters (nightly build only)

This parameter lets a character use the specified animation from another character, but maintaining their own sprites.

Continue (nightly build only)

Due to the way State -1 is normally used to read inputs and change states, Mugen had it so that using a ChangeState in a negative state would stop the execution of the rest of the code in that state. Setting Continue to 1 will disable this behavior.
When a ChangeState is redirected, Continue will default to 1.

Allows to scale the damage that the char receives or the defense stat of the character.
This scaling happens before fallDefence and superDefence buffs.

  • mulType int limit: >=0, <=1 default: 0
    If 0, it multiplies all damage by mulType. (Mugen default behaviour)
    If 1, it multiplies the defence by mulType.

Note: ikemenVersion changes default value of this parameter.

  • onHit bool default: true
    If false, defenceMulSet works without delay.
    If true, defenceMulSet effect is only active if the char is already in moveType = H. (Mugen default behaviour)

Note: ikemenVersion changes default value of this parameter.

For every EnvShake cycle, the amplitude is multiplied by this value. Defaults to 1. Cycle duration is determined by frequency, with a frequency of 180 needing two frames to complete one cycle.

Example:

[State 3051, Shake]
type = envshake
trigger1 = !time
time = 30
ampl = 5
freq = 180
mul = 0.9

In this case, the screen shakes 5 pixels in the first cycle, then 4.50 pixels, then 4.05 and so on.

animelem = elem_no (int)

Changes explod animation start frame. Defaults to 1.

Example:

[State 0, Explod]
type = Explod
trigger1 = !time
anim = 100
animelem = 3
ID = 1000
postype = none
pos = pos x+camerapos x,pos y
facing = 1
vfacing = 1
bindtime = 1
supermovetime = 0
pausemovetime = 0
scale = 1,1
sprpriority = 1
ontop = 0
shadow = 0,0,0
ownpal = 1
removetime = 10
removeongethit = 0
ignorehitpause = 1

In this case, when explod spawns its animation will start from the 3'rd frame.

[TODO] Update as AnimFreeze

animelemlooped = bvalue (boolean int)

Makes explod animation frame being looped to itself (animation freezing). Defaults to 0.

Example:

[State 0, Explod]
type = Explod
trigger1 = time%5=0
anim = anim
animelem = animelemno(0)
animelemlooped = 1
ID = 1000
postype = none
pos = pos x+camerapos x,pos y
facing = 1
vfacing = 1
bindtime = 1
supermovetime = 0
pausemovetime = 0
scale = 1,1
sprpriority = 10
ontop = 0
shadow = 0,0,0
ownpal = 1
trans = add
removetime = 40
palfx.time = 40
palfx.sinmul = -255,-255,-255,160
removeongethit = 0
ignorehitpause = 1

In this case, example of custom afterimage.

Focal Length of the projection. Does nothing when projection is not perspective or perspective2. This value is fixed in Mugen 1.1, the explods will look differently under different different resolution/loaclcoord/camera zoom. In Ikemen, this value scales internally like xy scales so that the explods will always look the same. Default value is 2048.

Interpolation (nightly build only)

Interpolation works just as the .air counterpart, interpolating linearly between 2 values.

The syntax is as follows: Interpolation. Where is one of: time, animElem, scale, alpha, angle, offset, focallenght

Interpolation.Time is required for any of the parameters to work.

Time = duration (int)

Specifies the time period of the animation (if omitted, defaults to 0).

AnimElem = elem_no (int)

Interpolation between AnimElem and Interpolation.AnimElem. if AnimElem is omitted, defaults to 1. AnimFreeze will stop the animation from going further than Interpolation.AnimElem.

Alpha = alpha_source, alpha_dest (int, int)

Interpolation between Alpha values and Interpolation.Alpha. Sub and Add1 are not supported.

Angle = angle, xangle, yangle (float, float, float)

Interpolation between Angle / XAngle / YAngle and Interpolation.Angle.

Offset = offset_x, offset_y (float, float)

Interpolation between Pos and Interpolation.Offset.

Scale= scale_x, scale_y (float, float)

Interpolation between Scale and Interpolation.Scale.

FocalLenght = value(float)

Interpolation between FocalLenght and Interpolation.FocalLenght.

Palfx is also compatible with the syntax:

Interpolation.PalFx.(type)

where (type) is one of: mul, add, hue, color

PalFx.Time and OwnPal = 1 is required for any of the parameters to work.

Mul = mul_r, mul_g, mul_b (int, int, int)

Interpolation between PalFx.Mul values and Interpolation.PalFx.Mul. If PalFx.Mul is omitted, defaults to 256, 256, 256.

Add = add_r, add_g, add_b (int, int, int)

Interpolation between PalFx.Add values and Interpolation.PalFx.Add. If PalFx.Add is omitted, defaults to 0, 0, 0.

Hue = value (int)

Interpolation between PalFx.Hue value and Interpolation.PalFx.Hue. If PalFx.Hue is omitted, defaults to 0.

Color = value (int)

Interpolation. between PalFx.Color value and Interpolation.PalFx.Color. If PalFx.Color is omitted, defaults to 256.

These parameters can be used interchangeably.

Examples:

  • Spinning object doing a full circle in a period of 60 ticks:
Angle = 0;
XAngle = 0;
YAngle = 0;
Interpolation.Time = 60;
Interpolation.Angle = 360, 0, 0;
  • Moving object from 0, 0 to 50, 0 in a period of 100 ticks:
Pos = 0, 0;
Interpolation.Time = 100;
Interpolation.OffSet = 50, 0;
  • Object fading out in 30 ticks:
Trans = AddAlpha;
Alpha = 256, 0;
Interpolation.Time = 30;
Interpolation.Alpha = 0, 256;
  • Object Changing from Blue to Red in 50 ticks:
PalFx.Time = 50;
PalFx.Mul = 0, 0, 256;
Interpolation.Time = 50;
Interpolation.PalFx.Mul = 256, 0, 0;

LayerNo (nightly build only)

Specify on which layer the explod should be drawn. Valid values are -1, 0 and 1. Defaults to the same layer as the player.
Layer number 1 is effectively the same as the legacy ontop parameter.

Apply palette effects on explods. The parameters are the same as in the HitDef controller. Requires ownpal to be a nonzero value.

Affect how the explod is drawn when xangle or yangle is not zero.

  • orthographic: The default value when Mugen version is not 1.1 or Ikemen version is not 0. The explod is drawn using orthographic projection.
  • perspective: The default value when Mugen version is 1.1 and Ikemen version is 0. The explod is drawn using perspective projection. Distortion is affected by the position of the sprite relative to the center of the screen.
  • perspective2: The explod is drawn using perspective projection. Distortion is affected by the position of the sprite relative to the center of the animation.

If set to 1, the Explod will be removed if the character changes state. Defaults to 0.

If set to 1 and the explod is on layer 0, it will always be drawn behind lifebars and character shadows.

window = x1, y1, x2, y2 (float)

This parameter takes four numbers (similar to the format of a Clsn box) which forms a rectangle outside of which the pixels will not be rendered.

If set to 1, the parent map is inherited by helper. Defaults to 0.

If set to 1, the helper's life can't be reduced to 0. Defaults to 0.

If set to 1, helper shares parent's sound channels. Setting it to 2 does the same thing but for root instead of parent. Defaults to 0.

If set to 1, helper's attacks also update parent's target list and add to the parent's juggle points. Also, the helper will inherit its parent's juggle points against attacked enemy. Setting it to 2 does the same thing but for root instead of parent. Defaults to 0.

In Mugen this parameter accepts a single boolean int value that makes the helper being able to read command input and inherit its root's State -1. In Ikemen GO, on top of this functionality, the parameter optionally accepts more values that enable additional root's negative state inheritance (2 means that helper inherit its root's State -2 and so forth).

keyctrl = 1, 3

If set to 1, the helper will be affected by increased KO Velocity (defeated character flying across the screen), just like normal player. Defaults to 0.

OwnClsnScale (nightly build only)

A helper with this parameter will have its collision box scale be based on its own size.xscale and size.yscale constants rather than its root's.

If set to 1, the helper won't be destroyed after skipping round 1 intro and will move over to the next round, just like normal player. Defaults to 0.

Helpers inherit standby flag from root characters. By using this parameter, a character can force a specific standby for its helper, regardless of the standby value of the character itself.

New syntax (nightly build only)

HitBy (and NotHitBy) now also accepts a syntax similar to HitOverride, using attr and slot instead of value. Every player has access to 8 individual slots (numbered 0 to 7).
This new syntax is required to use the new features.

Example of equivalent code in old and new syntax:

[State -3, Old Syntax]
type = hitby
trigger1 = 1
value = SC, AP
time = 1

[State -3, New Syntax]
type = hitby
trigger1 = 1
attr = SC, AP
slot = 0
time = 1

Stack (nightly build only)

stack = value (bool)

Using this parameter makes a vulnerability slot stack with other slots. This allows setting vulnerability combinations not previously possible in Mugen.

Example, make a player vulnerable to Standing Attacks and Air Projectiles:

[State -2, Test]
type = hitby
trigger1 = 1
value = S, AA
time = 1
stack = 1

[State -2, Test]
type = hitby
trigger1 = 1
value2 = A, AP
time = 1
stack = 1

PlayerNo (nightly build only)

playerno = player_number (int)

Using this parameter limits vulnerability to a specific player number.

PlayerID (nightly build only)

playerid = player_id (int)

Using this parameter limits vulnerability to a specific player ID.

dizzypoints = hit_value (int)

Specifies the amount of dizzy points to give P2 if this HitDef connects successfully. If omitted, it defaults to hit_damage (from "damage" parameter) multiplied by the value of Default.LifeToDizzyPointsMul / Super.LifeToDizzyPointsMul specified in data/common.const, scaled by the targets' defense multipliers if necessary.

Down.Recover (Nightly build only)

down.recover = recover_flag (bool)

This parameter controls the enemy's ability to use "fast recovery from lie down" after being hit.

Down.RecoverTime (Nightly build only)

down.recovertime = recover_time (int)

This parameter determines how long the enemy will stay down (in state 5110) after being knocked down. Defaults to the enemy's data.liedown.time constant. Together with down.recover, this allows one to effectively apply "hard knockdown" states on the enemy.

envshake.mul = envshake_mul (float)

For every envshake cycle, the envshake.ampl is multiplied by this value. Defaults to 1.

fall.envshake.mul = fall_envshake_mul (float)

For every fall.envshake cycle, the fall.envshake.ampl is multiplied by this value. Defaults to 1.

forcecrouch (nightly build only)

forcecrouch = bvalue (boolean int)

Forces a standing opponent to crouch upon hit. Similar to ForceStand. Defaults to 0.

guardpoints = hit_value (float)

Specifies the amount of guard points to give P2 if this HitDef is guarded. If omitted, it defaults to hit_damage (from "damage" parameter) multiplied by the value of Default.LifeToGuardPointsMul / Super.LifeToGuardPointsMul specified in data/common.const, scaled by the targets' defense multipliers if necessary.

guard.dist (nightly build only)

guard.dist = x_dist_front, x_dist_back (int, int)

This parameter now takes a second value. It specifies the distance that a player can attack behind the enemy and still allow them to enter proximity guard. Defaults to 0.

guard.sparkangle = angle_value (float)

Specifies the guard spark rotation directly from a Hitdef. Defaults to 0.

guardsound.channel = channel_no (int)

Specifies which of the player's sound channels the guardsound should play on. If omitted, channel_no defaults to -1, meaning the sound will play on any free channel.

hitsound.channel = channel_no (int)

Specifies which of the player's sound channels the hitsound should play on. If omitted, channel_no defaults to -1, meaning the sound will play on any free channel.

P2ClsnCheck (nightly build only)

p2clsncheck= clsn_type (string)

This parameter makes a hit be checked against a specific type of collision box. Valid parameters are Clsn1, Clsn2, Size and None.
Traditionally, fighting games check throws with the Size box.

P2ClsnRequire (nightly build only)

p2clsnrequire= clsn_type (string)

This parameter prevents a hit from happening if the enemy lacks a particular type of collision box, regardless of them overlapping or not with the player.

Note: All Mugen characters were created on the assumption that lacking Clsn2 makes them invulnerable. Therefore, if a character is designed for compatibility with other Mugen characters, this parameter should be used when checking hits against other types of collision boxes.

redlife = hit_value, guard_value (int)

Specifies the amount of red life to give P2 if this HitDef connects successfully. If omitted, it defaults to hit_damage (from "damage" parameter) multiplied by the value of Default.LifeToRedLifeMul / Super.LifeToRedLifeMul specified in data/common.const, scaled by the targets' defense multipliers if necessary. Additional second value is optional and assigns an amount of guard red life to P2.

score = p1_value, p2_value (float)

Specifies the score value added to P1 and P2 score count.

sparkangle = angle_value (float)

Specifies the hitspark rotation directly from a Hitdef. Defaults to 0.

Makes the HitDef be treated as an attack from the TeamSide you specify (similar to the trigger of TeamSide).

When used with Projectile, setting a teamside different from the player's will allow the projectile to hit its owner and interact with other projectiles from the same player. (nightlly build only)

xaccel (nightly build only)

xaccel = accel (float)

Specifies the x acceleration to impart to P2 if the hit connects. Defaults to 0.
For backwards compatibility reasons, this acceleration is not used by default, as it is not called by common1.cns.

KeepState (nightly build only)

If set to 1, the character will override a hit without changing states at all.

If a character has ikemenversion, modifying an explod timer such as bindtime or removetime will use the current frame as the reference time. For example, if removetime is modified to 10, the explod will be removed 10 frames later, regardless of what the original time was. (nightly build only)

Modifies the anim parameter of an existing Explod.

Modifies the ignorehitpause parameter of an existing Explod.

Modifies the space parameter of an existing Explod.

Modifies the under parameter of an existing Explod.

See HitBy.

invertblend = blend_mode (int)

Inverts current blend mode if enabled so Sub becomes Add and Add becomes Sub.

For PalFx it accepts 4 values:

  • 0 = Disabled (Mugen 1.0 blending behavior)
  • 1 = Enabled (Mugen 1.0 blending behavior)
  • -1 = Disabled (Mugen 1.1 blending behavior)
  • 2 = Enabled (Mugen 1.1 blending behavior)

If character MugenVersion is 1.1 and invertall = 1 and if invertblend param is omitted, it inverts blend by default. For all other MugenVersion invertblend is 0 if omitted.

hue (nightly build only)

hue = value (int)

This affects the hue level of the palette. Avaiable range is -256 to 256.

sinmul = ampl_r, ampl_g, ampl_b, period (int)

Similliar to "sinadd" parameter but instead it creates effect related to "mul" parameter.

sincolor= ampl, period (int)

Similliar to "sinadd" parameter but instead it creates effect related to "color" parameter.

sinhue (nightly build only)

sinhue= ampl, period (int)

Similliar to "sinadd" parameter but instead it creates effect related to "hue" parameter.

priority = snd_priority (int)

Sets the priority of the sound. Does nothing when channel is not specified. A sound with higher priority will not be interrupted by sounds with lower priority. Defaults to 0.

LoopStart (nightly build only)

loopstart = loop_start_sample (int)

Sets the sample to begin looping from.

LoopEnd (nightly build only)

loopend = loop_end_sample (int)

Sets the sample to end looping at.

StartPosition (nightly build only)

startposition = start_sample (int)

Sets the sample to begin playing from.

LoopCount (nightly build only)

loopcount = loop_count

If set, will play the sound loop_count number of times before stopping. Nonzero values take precedence over the loop parameter.

StopOnGetHit (nightly build only)

stopongethit = stop (bool)

This parameter makes the sound be interrupted if the player gets hit. Defaults to 1 if channel is set to 0.

StopOnChangeState (nightly build only)

stoponchangestate = stop (bool)

This parameter makes the sound be interrupted if the player changes states.

LayerNo (nightly build only)

Specify on which layer the projectile should be drawn. Valid values are -1, 0 and 1. Defaults to the same layer as the player.

ProjClsnAngle (nightly build only)

Defines the angle for the projectile's collision boxes. In degrees.

ProjClsnScale (nightly build only)

Defines the collision box scale for the projectile.

Specifies the angle to rotate the Projectile animation.

Lets a character bypass leftbound and rightbound from stage.

Change to the state of the character with the specified Player ID. If successful, it would take the character with the specified PlayerID to the selected state.

See also ChangeState.

LayerNo (nightly build only)

layerno = layer_number (int)

Change the layer number on which the player is drawn on. Valid values are -1, 0 and 1. Defaults to 0.
[TODO - Link to explanation on layer drawing order]

Example:

[State Test]
type = SprPriority
trigger1 = Time = 0
value = 5
layerno = -1

If set to 1, enables life to dizzy points conversion support using Default.LifeToDizzyPointsMul / Super.LifeToDizzyPointsMul const. Defaults to 1.

Zoom was a beta feature in Mugen 1.1. It is a fully functional state controller in Ikemen GO.

If set to 1, the zoom position is restricted to the current camera position. Defaults to 0.

Controls the smoothing effect for camera position and scale transitions during zoom, with smaller values leading to quicker adjustments and larger values causing more gradual changes. Defaults to 0 (camera snaps instantly)

The position on screen to bind the zoom, relative to the center of the screen. A value of Pos X, Pos Y will zoom in on P1.

The value by which to zoom in. A value of 1.0 or greater is required. A value of 2 will double the scale of all sprites.

If set to 1, the zoom position is restricted to the stage boundaries. Defaults to 1.

Countdown timer that controls how long zoom effects are applied, decreasing by 1 every frame. Once it reaches 0, the zoom stops, and the camera resets to its default behavior without any smoothing or zoom effects. Defaults to 1.

Clone this wiki locally