State controllers (new) - ikemen-engine/Ikemen-GO GitHub Wiki

The state controller featured in this page are completely new to Ikemen GO.

Use the sidebar for quick navigation.

Both new and old state controllers can now take advantage of some global new features.

All the remaining CNS parameters used to assign character actions that didn't support the F prefix ([Statedef], ChangeState, SelfState, ChangeAnim, ChangeAnim2, Projectile) have access to loading animations from fightfx.air. The implementation is the same as in the Explod anim parameter.

[Statedef 1000]
anim = F 300

This feature can be utilized with all state controllers, including legacy ones. It is an optional parameter that sends the execution of the state controller to the player with the designated PlayerID. Unlike custom states, this parameter allows interfering with a player's behavior without putting them in another player's states.

For state controllers that normally stop state execution (ChangeState and SelfState), redirecting to an ID different from the owner will not stop the execution of the current state code.

Example of a poison effect that reduces life, applied without touching the opponent:

[State -2, Poison]
type = LifeAdd
trigger1 = <Is the enemy posioned? trigger>
value = -1
kill = 0
RedirectID = <Enemy id here>

Example of increasing a team leader's map, regardless of who is running it, if leader's map is < 10.

[State Test]
type = MapAdd
trigger1 = Player(TeamLeader), Map(SomeLeaderMap) < 10
Map = "SomeLeaderMap"
value = 1
RedirectID = Player(TeamLeader), ID

Due to limitations in how some logic must be handled, certain state controllers may not work with RedirectID. Usually because of the order the players are processed in.
TODO: list of sctrls that can't be redirected.

AssertCommand (nightly build only)

This controller allows (de)activating the player's commands without any button presses. If the player has multiple commands with the same name, the controller will affect all of them.

Required parameters:
name = command_name (string)
String specifying the command to assert.

Optional parameters:
buffer.time = time (int)
Number of ticks during which the command will be buffered. Defaults to 1.

[State Test]
type = AssertCommand
trigger1 = time = 10
name = "QCF_x"
buffer.time = 5

This controller allows you to assert up to three input flags simultaneously via single sctrl. Similarly to AssertSpecial, there is no limit how many times this controller is called. Each flag will be automatically "de-asserted" at every game tick, so you must assert a flag for each tick that you want it to be active. Ikemen interprets input flags the same was as if corresponding input keys were pressed.

Required parameters:
flag = flag_name (string)
String specifying the flag to assert.

Optional parameters:
flag2 = flag2_name (string)
An optional flag to assert.

flag3 = flag3_name (string)
Another optional flag to assert.

Details:
The flag name can be one of the following input keys (case sensitive):
U, D, L, R, a, b, c, x, y, z, s, d, w, m

Camera [EXPERIMENTAL]

This SCTRL is still experimental and subject to possible changes, there is no guarantee this will be supported as is in future IKEMEN Go versions.

Changes the camera position and the way players interact with screen and stage edges.

Required parameters:
view = "view_type" (string)
Specifies the type of view to implement.
Valid values are "Fighting", "Follow" or "Free". Fighting works like common MUGEN camera. Follow anchors the camera to a specific player/helper and follows it. Free is not bound to anything other than the own camera's limitations.

Optional parameters:
Pos: X (float), Y (float). This should be used during Free view, as it lets a character directly control the camera position values.
FollowID: ID (int). When in Follow view and a player/helper ID is specified in this parameter, camera will start following that player/helper.

Details:
When in Free view, Screenbound and Movecamera will not influence camera or char positions. Follow view will only be influenced by Screenbound/Movecamera from the player being followed (this might change in the future).

Depth (nightly build only)

Temporarily changes the depth size of the player's for 1 frame. Similar to Width in function.

Required parameters:
none

Optional parameters:
edge = edgedepth_front, edgedepth_back (int, int)
Sets the player's edge depth in front and behind. Edge depth determines how close the player can get to the topbound and botbound of the screen. These parameters default to 0,0 if omitted.

player = playdepth_front, playdepth_back (int, int)
Sets the player depth in front and behind. Player depth determines how close the player can get to other players depth and also determines the hitable depth area of a player. These parameters default to 0,0 if omitted

Alternate syntax:
value = value = depth_front, depth_back (int, int)
This is a shorthand syntax for setting both edge depth and player depth simultaneously. This may only be used if the edge and player parameters are not specified.

[State Test]
type = Depth
trigger1 = P2StateType = A
value = 0, 0
player = 40, 0
edge = 0, 0

Assigns dialogue data to be displayed either right before the lifebar calls the fight during first round (last frame of RoundState = 1) or at the last active frame of the final round (RoundState = 4, right before screen starts fading out). If more than 1 player calls this sctrl, who will end up initiating dialogue is chosen randomly.

Required parameters:
textX = "dialogue_info" (string)
String containing information needed for displaying dialogue. There can be multiple text parameters assigned, each suffixed with numbers in ascending order. The parameter stores both text, as well as optional tokens (enclosed in <> brackets) for controlling other aspects of dialogue (listed below).

Optional parameters:
hidebars = bars_flag (int)
Set to nonzero to hide lifebars as soon as the sctrl is called (by default lifebar is hidden only when actual dialogue starts).

force = force_flag (int)
Set to nonzero to force dialogue start immediately, ignoring normal rules.

How the rendered dialogue will look like (positioning, default face sprites, background definition, default time between text etc.) is controlled by [Dialogue Info] screenpack parameters (refer to system.def distributed with engine for a working example). By default player who called the state controller will use screenpack parameters prefixed with p1 and his enemy(0) will be assigned to use p2 parameters (this is adjustable via text tokens).

With appropriate screenpack parameters it's possible to skip to the next text parameter during dialogue via button press, without ending it all together. If this screenpack group is missing, dialogue won't be initiated at all (enabled parameter defaults to 0).

Optional text tokens

Tokens prefixed with pX (where X is 1 or 2) refers to screenpack [Dialogue Info] parameters prefixed the same way. Some tokens accepts redirection argument that points to which player assets (sprite, sound, anim, state) should be used.

Following redirection are supported:

  • self: redirects to player that called the sctrl
  • playerno(X): redirects to playerno X
  • enemy(X): redirects to enemy X of the player that called the sctrl (defaults to 0, the first enemy, if bracket is ommiteed)
  • partner(X): redirects to partner X of the player that called the sctrl (defaults to 0, the first partner, if bracket is ommiteed)
  • enemyname(name): redirects to the enemy with matching name (the internal name parameter specified in .DEF file)
  • partnername(name): redirects to the partner with matching name (the internal name parameter specified in .DEF file)

Token list:

  • <pX>: changes which dialogue box side (replace X with 1 or 2) should be used to render text. Defaults to p1 side.
  • <pXname=name>: changes pX side name displayed during dialogue to the string within quotation marks
  • <pXname=redirection>: changes pX side name displayed during dialogue to the redirected player displayname (as specified in displayname parameter within the .DEF file)
  • <pXface=redirection,group_no,sprite_no>: changes pX side sprite group and index that should be used to render face portrait. Defaults to sprite numbers assigned via screenpack (also defaults to these numbers if specified ones are missing, unless group_no is set to -1 - in such case face rendering is completely disabled).
  • <sound=redirection,group_no,sound_no,volumescale>: plays back a sound. volumescale argument is optional (defaults to 100).
  • <anim=redirection,anim_no>: changes the action number of the player's animation
  • <state=redirection,state_no>: changes the state number of the player
  • <map=redirection,map_name,value,map_type>: modifies player's map. map_type controls what kind of operation on map should be performed (set: equivalent of MapSet, add: equivalent of MapAdd),
  • <displayname=redirection>: part of the dialogue text replaced automatically with redirected player displayname (as specified in displayname parameter within the .DEF file)
  • <wait=ticks>: amount of ticks delay before sctrl resume further text parameter parsing

As an example, below code showcases Symphony of the Night (in)famous cutscene recreated with Dialogue sctrl, using various advanced tokens (keep in mind that in most cases, when you don't have to switch face sprites, play voiceovers or adjust timings, the only commonly used text token is <pX>)

Click on the image to watch the video corresponding to below code.

IMAGE ALT TEXT

[State 191, Dialogue]
type = Dialogue
trigger1 = enemy,Name="Demitri Maximoff"
hidebars = 1
text1 = "<p1><p1face=self,9100,0><p2face=enemy,9100,4><sound=self,9100,0>Die monster.<wait=60> You don't belong in this world!"
text2 = "<p2><sound=enemy,9100,0>It was not by my hand that I am once again given flesh.<wait=120> I was called here by humans, who wish to pay me tribute.<wait=170>"
text3 = "<p1><p1face=self,9100,1><sound=self,9100,1>Tribute!?!<wait=30> You steal men's souls, and make them your slaves!<wait=90>"
text4 = "<p2><p2face=enemy,9100,2><sound=enemy,9100,1>Perhaps the same could be said of all religions...<wait=30>"
text5 = "<p1><p1face=self,9100,7><sound=self,9100,2>Your words are as empty as your soul!<wait=80><p1face=self,9100,4> Mankind ill needs a savior such as you!<wait=70>"
text6 = "<p2><p2face=enemy,9100,5><sound=enemy,9100,2>What is a man?<wait=75><p1face=self,9100,2> A miserable little pile of secrets!<wait=75> But enough talk...<wait=30> Have at you!"

[State 180, Dialogue]
type = Dialogue
trigger1 = Win && enemy,Name="Demitri Maximoff"
text1 = "<p2><p1face=self,9100,6><p2face=enemy,9100,3><sound=enemy,9200,0><anim=self,0><state=enemy,5500>How?<wait=120> How is that I have been so defeated?<wait=120>"
text2 = "<p1><p1face=self,9100,3><sound=self,9200,0><displayname=enemy>, you have been doomed ever since you lost the ability to love.<wait=20>"
text3 = "<p2><p2face=enemy,9100,0><sound=enemy,9200,1>Ah...<wait=90> sarcasm.<p1face=self,9100,5><wait=40><state=self,186>"

Sets the player's Dizzy flag. For the duration that this flag is set, combo hit counter does not reset and the combo count lifebar text will stay on screen.

Required parameters:
value = dizzy_flag (int)
Set to nonzero to add Dizzy flag, or 0 to remove it.

Adds the specified amount to the player's dizzy points.

Required parameters:
value = add_amt (int)
add_amt is the number to add to the player's dizzy points.

Sets the amount of dizzy points that the player has.

Required parameters:
value = set_amt (int)
set_amt is the new value to set the player's dizzy points to.

GetHitVarSet (nightly build only)

[TODO]

Changes a player's GetHitVar directly, without requiring a hit.

Supported parameters: airtype, animtype, attr, chainid, ctrltime, fall, fall.damage, fall.envshake.ampl, fall.envshake.freq, fall.envshake.mul, fall.envshake.phase, fall.envshake.time, fall.kill, fall.recover, fall.recovertime, fall.xvel, fall.yvel, fallcount, groundtype, guarded, hitshaketime, hittime, ID, playerno, recovertime, slidetime, xvel, yaccel, yvel

GroundLevelOffset (nightly build only)

Applies a temporary offset to the player's ground level, which is otherwise 0. This makes the player treat a different position as pos y = 0, and therefore allows coding features such as platforms.

Required parameters:
value = offset (float)

[State Test]
type = GroundLevelOffset
trigger1 = Pos X + CameraPos X = [-160, 0]
trigger1 = Pos Y + GroundLevel <= -60
value = -60

Sets the player's Guard Break flag.

Required parameters:
value = break_flag (int)
Set to nonzero to add Guard Break flag, or 0 to remove it.

Adds the specified amount to the player's guard points.

Required parameters:
value = add_amt (int)
add_amt is the number to add to the player's guard points.

Sets the amount of guard points that the player has.

Required parameters:
value = set_amt (int)
set_amt is the new value to set the player's guard points to.

Height (nightly build only)

Temporarily changes the vertical size of the player's "push box" for 1 frame. Similar to Width in function: the values are added to the height, as defined in the player's constants file—they do not override them. A positive value will make the box larger, and a negative one will make it smaller.

Required parameters:
value = top_extra_size, bottom_extra_size (int)

[State Test]
type = Height
trigger1 = P2StateType = L
value = 0, -30

Displays text/sprites/anims synchronized with each other, using lifebar data. The intended use case is implementation of messages, often found in commercial fighting games.

Required parameters:
none

Optional parameters:
top = top_flag (int)
Set to nonzero to move the message on top of the messages queue (by default new messages is appended as the end).

time = time_set (int)
Specifies how long in ticks the message should be displayed. Defaults to time assigned by lifebar DEF file.

timemul = time_mul (float)
Specifies the desired time multiplier. For instance, time_mul of 0.5 halves the time in which the message is displayed.

anim = anim_no (int)
Specifies the number of the animation that should be used as a message (declared in lifebar DEF file).

spr = group_no, sprite_no (int, int)
Values correspond to the identifying pair assigned to sprite in the lifebar sff file.

snd = group_no, sound_no (int, int)
Values correspond to the identifying pair assigned to sound in the lifebar snd file.

text = "message" (string)
Text to be rendered as a message.

Refer to data/action.zss file and default lifebar distributed with engine for a working example.

Loads the specified data and overrides the data of the execution character. Note that all the data before reading will disappear.

Required parameters:
savedata = var_type (string)
Specifies the data type that should be read. Valid values for var_type are "var", "fvar", and "map".

path = "save_path" (string)
Specifies the path of the file to be read (relative to the character folder). An error occurs if you make a mistake in the path.

[State Test]
type = LoadFile
trigger1 = time = 10
savedata = var
path = "kfm.gob"

Adds value to player's map.

Required parameters:
map = "map_name" (string)
Specifies a name of the map that we add value to.

value = expr (int or float)
expr is the value to add to the map.

Sets value to player's map. This state controller can be used to change a number that has already been set via character's DEF file or to set a new map.

Required parameters:
map = "map_name" (string)
Specifies a name of the map that we assign value to.

value = expr (int or float)
expr is the value to assign to the map.

Reset the round or match and resume. By default (when no optional parameters are set) has the same effect as F4 debug key (round restart). Optionally allows characters and stage reloading, which also changes the state controller functionality to work like shift+F4 debug key (match restart).

Required parameters:
none

Optional parameters:
pXdef = "char_path" (string)
Path of the def file to read when reloading player 1-8 (replace X with player number). char_path can be relative to the folder of character that triggered MatchRestart or top ikemen directory.

stagedef = "stage_path" (string)
Path of the stage def file to read when reloading. stage_path can be relative to the folder of character that triggered MatchRestart or top ikemen directory.

reload = p1, p2, p3, p4, p5, p6, p7, p8 (int)
This parameter specifies whether to reload particular character. Defaults to 0 (round is reset without characters reloading)

[State Test]
type = MatchRestart
trigger1 = time = 10
p1def = "kfm.def"
p2def = "../suavedude/suavedude.def"
stagedef = "stages/stage0.def"
reload = 1, 1

Modifies the parameters of an existing stage background controller.

Required parameters:
id = sctrlid (int)
Specifies which controllers should be modified (all BGCtrl marked with sctrlid will be affected)

Optional parameters:
time = start_time, end_time, looptime (int)
time values that should modify background controller time parameter.

value = value_1, value_2, value_3 (int)
values that should modify background controller value parameter (used by following BGCtrl types: Visible, Enabled, Anim, SinX, SinY; only SinX and SinY use more than 1 value).

x = value_x (float)
x value that should modify background controller x parameter (used by following BGCtrl types: VelSet, VelAdd, PosSet, PosAdd).

y = value_y (float)
y value that should modify background controller y parameter (used by following BGCtrl types: VelSet, VelAdd, PosSet, PosAdd).

Notes:
This state controller affects background controllers marked with sctrlid, which is normally not known by individual characters. For this reason the best way to use this sctrl is through AttachedChar associated with particular stage.

[State Test]
trigger1 = 1
type = ModifyBGCtrl
sctrlID = 1
value = 0

ModifyBGCtrl3D (nightly build only)

Modifies the parameters of an existing 3D stage background controller.

Required parameters:
id = sctrlid (int)
Specifies which controllers should be modified (all BGCtrl marked with sctrlid will be affected)

Optional parameters:
time = start_time, end_time, looptime (int)
time values that should modify background controller time parameter.

value = value_1, value_2, value_3 (int)
values that should modify background controller value parameter (used by following BGCtrl types: Visible, Enabled, Anim).

Notes:
This state controller affects background controllers marked with sctrlid, which is normally not known by individual characters. For this reason the best way to use this sctrl is through AttachedChar associated with particular stage.

[State -2, Test]
type = ModifyBGCtrl3d
trigger1 = MoveType = A && Time = 1
id = 17
time = 0
value = 1

ModifyBgm (nightly build only)

Modifies currently playing music.

Required parameters:
none

Optional parameters:
volume = volume_scale (int)
volume_scale alters volume for currently playing bgm.

loopstart = start_sample (int)
Loop start position sample number.

loopend = end_sample (int)
Loop end position sample number.

position = sample_point (int)
Sample point to where the music should seek.

freqmul = freqmul (float)
Frequency multiplier of the BGM (control pitch & tempo).

loopcount = loop_count (int)
Changes the number of times this BGM should loop.

ModifyHitDef (nightly build only)

Using this state controller will update the specified parameters of the player's currently active HitDef. Has no effect if no HitDef is active.

Required parameters:
none

Optional parameters:
same as HitDef

[State Test]
type = ModifyHitdef
trigger1 = AnimElem = 5
hitFlag = MA
damage = 100, 25

ModifyPlayer (nightly build only)

Allows changing some player parameters that are otherwise out of reach, or don't justify having their own dedicated state controllers. Some parameters should be used with care.

Note: This state controller was briefly named ModifyChar during development. A previous nightly state controller named MoveHitSet was also integrated into it.

Required parameters:
none

Optional parameters:

displayname = name(string)
Changes the character's displayname.

lifebarname = name (string)
Changes the character's lifebarname.

lifemax = points (int)
Changes the character's maximum life points.

powermax = points (int)
Changes the character's maximum life points.

dizzypointsmax = points (int)
Changes the character's maximum dizzy points.

guardpointsmax = points (int)
Changes the character's maximum guardpoints.

teamside = side (int)
Changes the character's team side.

helperID = id (int)
Changes a helper's helper ID.

helpername = name (string)
Changes a helper's name.

movehit = time (int)
Sets the player's MoveHit timer to the specified value.

moveguarded = time (int)
Sets the player's MoveGuarded timer to the specified value.

movereversed = time (int)
Sets the player's MoveReversed timer to the specified value.

movecountered = flag (bool)
Toggles the player's MoveCountered flag on or off.

hitpausetime = time (int)
Sets the player's hitpausetime to the specified value.

pausemovetime = time (int)
Sets the player's pausemovetime to the specified value.

supermovetime = time (int)
Sets the player's supermovetime to the specified value.

[State Test]
type = ModifyPlayer
trigger1 = time = 0
displayname = "Suave Dude"
lifemax = 2000
teamside = 2

ModifyProjectile (nightly build only)

Using this state controller will update the specified parameters for the projectiles with the specified ID. Syntax is essentially the same as for Projectile.

Required parameters:
none

Optional parameters:
ID = projectile_ID (int)
The ID of the projectiles to modify. Defaults to -1 (all the player's projectiles)

index = projectile_index (int)
The index of the projectile to modify. Defaults to -1 (all the player's projectiles)

[State Test]
type = ModifyProjectile
trigger1 = AnimElem = 4
ID = 1005     ; Modify the projectile with this ID
index = 0     ; Modify the first instance of this projectile
projID = 1010 ; Replace their ID with this one
accel = -0.1, -0.1
teamside = 2

ModifyReversalDef (nightly build only)

Using this state controller will update the specified parameters of the player's currently active ReversalDef. Has no effect if no ReversalDef is active.

Required parameters:
none

Optional parameters:
same as ReversalDef

[State Test]
type = ModifyReversalDef
trigger1 = AnimElem = 4
reversal.attr = S, AA
fall = 0

ModifySnd (nightly build only)

Modifies the following sound parameters on-the-fly. This cannot modify the lowpriority parameter. If you need your sound to be low priority, call PlaySnd with the respective parameter set.

Required parameters:
none

Optional parameters:

channel = channelNo (int)
The sound channel to modify. Use -1 to modify all sound channels on the entity.

volume = volume (int)
Changes the volume of the specified sound channel.

volumescale = scale (int)
Changes the volume scale of the specified sound channel.

freqmul = freqmul (float)
Changes the sound channel's frequency multiplier.

pan = pan (float)
Changes the sound channel's pan.

abspan = abspan (float)
Changes the sound channel's absolute pan.

priority = priority (int)
Changes the sound channel's priority.

loopstart = loop_start_sample (int)
Changes the sound's loop start point.

loopend = loop_end_sample (int)
Changes the sound's loop end point.

position = new_position_sample (int)
Changes the position of the currently playing sound. Behavior is undefined when the channel is unspecified (-1).

loop = new_loop_value (bool)
Changes whether or not this sound should loop forever (nonzero) or not at all (0). This parameter is ignored if loopcount is nonzero.

loopcount = new_loop_count (int)
Changes the number of times this sound should loop.

[State Test]
type = ModifySnd
trigger1 = FightTime
channel = 5
volumescale = floor(50*(1 + cos(pi*fightTime/256)))
freqmul = 1 + cos(pi*fightTime/256)

ModifyStageBG (nightly build only)

This state controller allows modifying the stage's BG elements. Refer to stage documentation for more information.

Required parameters:

At least one parameter modification

Optional parameters:

ID = stagebg_ID (int)
The ID of the BG to modify. Defaults to -1 (all)

index = stagebg_index (int)
The index of the BG to modify. Defaults to -1 (all)

actionno = anim (int)
Changes the animation for anim type elements.

alpha = source, destination (int, int)
Changes the transparency's alpha parameters.

delta.x = delta (float)
Changes the X delta.

delta.y = delta (float)
Changes the Y delta.

layerno = layer (int)
Changes the layer number.

pos.x = position (float)
Changes the X position in relation to the starting position.

pos.y = position (float)
Changes the Y position in relation to the starting position.

spriteno = group, image (int, int)
Changes the sprite number for normal type elements.

start.x = position (float)
Changes the X starting position.

start.y = position (float)
Changes the Y starting position.

trans = trans_type (string)
Changes the transparency type.

velocity.x = velocity (float)
Changes the X velocity.

velocity.y = velocity (float)
Changes the Y velocity.

Example:

[State Test]
type = ModifyStageBG
trigger1 = time = 0
ID = 3
index = -1
velocity.x = 4

This SCTRL lets a character modify basic stage parameters or "stage vars", as declared in the stage .def file. Not all parameters are modifable for now, but the SCTRL could be expanded in the future to allow it.

Required parameters:
none

Optional parameters:
camera.ytension.enable = enable_flag (bool)
camera.boundleft = bound_left (int)
camera.boundright = bound_right (int)
camera.boundhigh = bound_high (int)
camera.boundlow = bound_low (int)
camera.verticalfollow = vertical_follow (float)
camera.floortension = floor_tension (int)
camera.tensionhigh = tension_high (int)
camera.tensionlow = tension_low (int)
camera.tension = tension (int)
camera.startzoom = start_zoom (float)
camera.zoomout = zoom_in (float)
camera.zoomin = zoom_out (float)
camera.zoomindelay = zoom_in_delay (float) (nightly build only)
camera.zoominspeed = zoom_in_speed (float) (nightly build only)
camera.zoomoutspeed = zoom_out_speed (float) (nightly build only)
camera.tensionvel = tension_vel (float) (nightly build only)
camera.cuthigh = cut_high (float) (nightly build only)
camera.cutlow = cut_low (float) (nightly build only)
camera.yscrollspeed = y_scroll_speed (float) (nightly build only)
camera.ytension.enable = enable_flag (bool) (nightly build only)
camera.autocenter = enable_flag (bool) (nightly build only)
playerinfo.leftbound = left_bound (float)
playerinfo.rightbound = right_bound (float)
playerinfo.topbound = top_bound (float) (nightly build only)
playerinfo.botbound = bot_bound (float) (nightly build only)
scaling.topscale = top_scale (float) (<mugen 1.0)
bound.screenleft = screen_left (int)
bound.screenright = screen_right (int)
stageinfo.zoffset = zoffset (int)
stageinfo.zoffsetlink = zoffset_link (int)
stageinfo.xscale = xscale (float)
stageinfo.yscale = yscale (float)
shadow.intensity = intensity (int)
shadow.color = r (int), g (int), b (int) (<mugen 1.1)
shadow.yscale = yscale (float)
shadow.fade.range = end (int), begin (int)
shadow.xshear = xshear (float)
shadow.offset = xoff (float), yoff (float) (nightly build only)
shadow.window = x1 (float), y1 (float), x2 (float), y2 (float) (nightly build only)
reflection.intensity = intensity (int)
reflection.yscale = yscale (float) (nightly build only)
reflection.offset = xoff (float), yoff (float) (nightly build only)
reflection.window = x1 (float), y1 (float), x2 (float), y2 (float) (nightly build only)

Details:
camera.ytension.enable is enabled by default when a stage uses tensionhigh and tensionlow

If the player is a helper, adds value to parent's map. If the player is not a helper, this controller does nothing. Parent refers to the instance that spawned the helper.

Required parameters:
map = "map_name" (string)
Specifies a name of the map that we add value to.

value = expr (int or float)
expr is the value to add to the map.

If the player is a helper, sets value to parent's map. If the player is not a helper, this controller does nothing. Parent refers to the instance that spawned the helper.

Required parameters:
map = "map_name" (string)
Specifies a name of the map that we assign value to.

value = expr (int or float)
expr is the value to assign to the map.

Plays back a music. Supported file formats: mp3, ogg, wav.

Required parameters:
none

Optional parameters:
bgm = "bgm_path" (string)
Path of the music file to play. Leave it blank if you want to stop current music. bgm_path file lookup starts relative to character's directory, followed by checking path relative to top ikemen directory, finally the file existance is checked in sound directory.

loop = loop_flag (int)
Set loop_flag to a nonzero value to have the bgm loop over and over, or 0 to disable looping. Defaults to 1.

volume = volume_scale (int)
Adjust the volume. 100 is for 100%. Defaults to 100. If bgm_path is not specified, volume_scale alters volume for currently playing bgm.

loopstart = start_sample (int)
Loop start position sample number.

loopend = end_sample (int)
Loop end position sample number.

startposition = sample_point (int)
Sample point where the music should start playing.

freqmul = freqmul (float)
Frequency multiplier of the BGM (control pitch & tempo).

loopcount = loop_count (int)
Changes the number of times this BGM should loop.

This controller is only useful for debugging. PrintToConsole prints a specified message to debug mode console, as well as terminal / command line window, if it's opened.

The syntax is the same as DisplayToClipboard:

Required parameters:
text = "format_string" (string)
format_string must be encased in double-quotes. It is a printf format string, so if you know about printf, you can skip this description. The format string contains any text you wish to display. You can also use \n to generate a line break, and \t to generate a tab character (tab width is equivalent to 4 characters). To display the value of an arithmetic expression, you can put a %d (for ints) or a %f (for floats) in the format string, then specify the expression in the params list. To display a % character, you must put %% in the format string.

Following format specifiers are accepted: %v (any type), %d, %i, %f, %F, %e, %E, %g, or %G. Format specifier syntax such as %0.2f is also supported. Recognized escape sequences are \n, \t, \, and ".

Optional parameters:
params = exp_1, exp_2, (...)
Unlimited amount of numeric arguments can be specified in the format string. These should be listed under the params item, in order. The type of each parameter must match its format specifier. You cannot specify more or less parameters than are called for in the format string.

If there is a type mismatch between the format specifier and the parameter actually provided, then the actual value of the parameter will be shown in an appropriate form for that type, using default formatting options.

[State Test]
type = PrintToConsole
text = "The value of var(17) is %d, which is %f%% of 23.\n\t--Kiwi."
params = var(17):=1,var(17)/.230

; prints the following to console:
;The value of var(17) is 1, which is 4.347826% of 23.
;	--Kiwi.

Adds the specified amount to the player's red life, scaled by the player's defense multiplier if necessary.

Required parameters:
value = add_amt (int)
add_amt is the number to add to the player's red life.

Optional parameters:
absolute = abs_flag (int)
If abs_flag is 1, then add_amt will not be scaled (i.e. attack and defense multipliers will be ignored). Defaults to 0.

Sets the amount of red life that the player has.

Required parameters:
value = set_amt (int)
set_amt is the new value to set the player's red life to.

Remaps one sprite with another (or does this for multiple sprites at once, based on character's CNS RemapPreset data)

Required parameters:
none

Optional parameters:
reset = reset_flag (int)
Set to 1 to reset all existing sprite remaps. Defaults to 0.

preset = "preset_name" (string)
Name of the character's CNS RemapPreset data.

source = src_spr_grp, src_spr_item (int, int)
See below.

dest = dst_spr_grp, dst_spr_item (int, int)
Any animation that references source sprite will be drawn using the dest sprite instead. Note that the dest sprite group number and item refers to an unmapped sprite numbers.

[State Test]
type = RemapSprite
trigger1 = var(10)=1
preset = "MyTransformation"
reset = 1

Removes all of a player's texts, or just the texts with a specified ID number.

Required parameters:
none

Optional parameters:
ID = remove_id (int)
remove_id is the ID number of the texts to remove. If omitted, removes all texts owned by the player.

[State Test]
type = RemoveText
trigger1 = time = 30
ID = 10

If the player is a helper, adds value to root's map. If the player is not a helper, this controller does nothing. Root refers to the main player.

Required parameters:
map = "map_name" (string)
Specifies a name of the map that we add value to.

value = expr (int or float)
expr is the value to add to the map.

If the player is a helper, sets value root's map. If the player is not a helper, this controller does nothing. Root refers to the main player.

Required parameters:
map = "map_name" (string)
Specifies a name of the map that we assign value to.

value = expr (int or float)
expr is the value to assign to the map.

If the player is a helper, adds value to root's working variables. Either a float variable or an int variable can be added by this controller. If the player is not a helper, this controller does nothing. Root refers to the main player.

Required parameters (int version):
v = var_no (int)
var_no should evaluate to an integer between 0 and 59.

value = int_expr (int)
int_expr is the value to add to the int variable indicated by var_no.

Required parameters (float version):
fv = var_no (int)
var_no should evaluate to an integer between 0 and 39.

value = float_expr (float)
float_expr is the value to add to the float variable indicated by var_no.

Alternate syntax:
var(var_no) = int_expr (int version)
fvar(var_no) = float_expr (float version)

If the player is a helper, sets value root's working variables. Either a float variable or an int variable can be set by this controller. If the player is not a helper, this controller does nothing. Root refers to the main player.

Required parameters (int version):
v = var_no (int)
var_no should evaluate to an integer between 0 and 59.

value = int_expr (int)
int_expr is the value to assign to the int variable indicated by var_no.

Required parameters (float version):
fv = var_no (int)
var_no should evaluate to an integer between 0 and 39.

value = float_expr (float)
float_expr is the value to assign to the float variable indicated by var_no.

Alternate syntax:
var(var_no) = int_expr (int version)
fvar(var_no) = float_expr (float version)

Add specified amount of ticks into round time.

Required parameters:
value = add_ticks (int)
add_ticks specifies the number of ticks that should be added to round time.

Set round time to specified amount of ticks.

Required parameters:
value = set_ticks (int)
set_ticks specifies the number of ticks that should be set as a current round time.

Put specified data together and save it as binary. It uses gob, which is a serialized format for Go language, as the storage format. All characters specified by the character or helper who executed the function are stored at that time.

Required parameters:
savedata = var_type (string)
Specifies the data type that should be saved. Valid values for var_type are "var", "fvar", and "map".

path = "save_path" (string)
Specifies the save destination file path (relative to the character folder). Can use any extension (.gob is recommended)

[State Test]
type = SaveFile
trigger1 = time = 10
savedata = var
path = "kfm.gob"

Adds the specified amount of points to P1 current score counter.

Required parameters:
value = expr (float)
expr is the the number of score points to add to the P1 current score counter.

[State Test]
type = ScoreAdd
trigger1 = AnimElem = 21
value = 100

ModifyShadow (nightly build only)

This state controller allows modifying parameters of a char's Shadow

Required parameters:
none

Optional parameters:
color = r, g, b (int), (int), (int)
intensity = intensity (int)
offset = x, y (float), (float)
window = x1, y1, x2, y2 (float), (float), (float), (float)
xshear = xshear (float)
yscale = yscale (float)

ModifyReflection (nightly build only)

This state controller allows modifying parameters of a char's Reflection

Required parameters:
none

Optional parameters:
color = r, g, b (int), (int), (int)
intensity = intensity (int)
offset = x, y (float), (float)
window = x1, y1, x2, y2 (float), (float), (float), (float)
xshear = xshear (float)
yscale = yscale (float)

Makes the P1 and/or the specified partner exit Standby state. If no parameters are given it affects the player that called it. (Also affects helpers)

Required parameters:
none

Optional parameters:
All TagOut parameters work with some extra ones specified bellow
ctrl = "ctrl_flag" (int)
Sets the P1 control flag.

leader = leader_playerno (int)
Sets the player who is considered a team leader to the specified playerno.

partnerctrl = partnerctrl_flag (int)
Sets the partner_no control flag.

Example:

[State]
type = TagIn
trigger1 = Time = 0
leader = PlayerNo
stateno = 5600

Makes the the player and/or the specified partner enter Standby state. If no parameters are given it affects the player that called it.
The main purpose of the Standby flag is to put a player away so it won't interfere in a Tag match. For that reason it carries several special properties:

  • The player becomes unhittable
  • The player cannot hit or push other players
  • The camera will not follow the player
  • Enemy and P2 families of triggers will not pick up the player

Required parameters:
none

Optional parameters:
self = self_flag (int)
Set to 0 to not affect P1. Defaults to 1.

partner = partner_no (int)
Specifies what teammate is afected.

stateno = state_no (int)
The number of the state to change P1 to.

partnerstateno = partnerstate_no (int)
The number of the state to change partner_no to.

Example:

[State]
type = TagOut
trigger1 = Time = 0

TargetAdd (nightly build only)

Adds the player with the specified ID to the original player's target list.
Do not confuse this player ID with a target ID. Target ID can be assigned with chainID parameter of GetHitVarSet.

Required parameters:
PlayerID = ID (int)
ID of player to be added.

Adds the specified amount to all targets' dizzy points.

Required parameters:
value = add_amt (int)
add_amt is added to each target's dizzy points.

Optional parameters:
ID = target_id (int)
Specifies the desired target ID to affect. Only targets with this target ID will be affected. Defaults to -1 (affects all targets.)

Adds the specified amount to all targets' guard points.

Required parameters:
value = add_amt (int)
add_amt is added to each target's guard points.

Optional parameters:
ID = target_id (int)
Specifies the desired target ID to affect. Only targets with this target ID will be affected. Defaults to -1 (affects all targets.)

Adds the specified amount to all targets' red life, scaled by the targets' defense multipliers if necessary.

Required parameters:
value = add_amt (int)
add_amt is added to each target's red life.

Optional parameters:
ID = target_id (int)
Specifies the desired target ID to affect. Only targets with this target ID will be affected. Defaults to -1 (affects all targets.)

absolute = abs_flag (int)
If abs_flag is 1, then add_amt will not be scaled (i.e. attack and defense multipliers will be ignored). Defaults to 0.

Adds the specified amount of points to targets' current score counter.

Required parameters:
value = expr (float)
expr is the the number of score points to add to the target's current score counter.

Optional parameters:
ID = target_id (int)
Specifies the desired target ID to affect. Only targets with this target ID will be affected. Defaults to -1 (affects all targets.)

Adds value to all team members maps.

Required parameters:
map = "map_name" (string)
Specifies a name of the map that we add value to.

value = expr (int or float)
expr is the value to add to the map.

Sets value to all team members maps.

Required parameters:
map = "map_name" (string)
Specifies a name of the map that we assign value to.

value = expr (int or float)
expr is the value to assign to the map.

Text controller is used for displaying text on screen.

Required parameters:
none

Optional parameters:
removetime = rem_time (int)
The text will be removed after having been displayed for rem_time number of game ticks. Defaults to 1.

layerno = layer_no (int)
Sets the layer to which the text will be drawn on. 0 is in front of the background, but behind the players. 1 is in front of the players, but behind the foreground. 2 is in front of the foreground. Defaults to 1.

localcoord = coord_x, coord_y (int, int)
Sets custom localcoord. If omitted, lifebar font defaults to the lifebar localcoord, character font and debug font defaults to the screen localcoord.

text = "format_string" (string)
Text to be rendered. Defaults to "%v" (rendering first params argument of any type). format_string must be encased in double-quotes. It is a printf format string. You can use \t to generate a tab character (tab width is equivalent to 4 characters) and \n to break lines (nightly build only). To display the value of an arithmetic expression, you can put a %d (for ints) or a %f (for floats) in the format string, then specify the expression in the params list. To display a % character, you must put %% in the format string. Accepted format specifiers: %v (any type), %d, %i, %f, %F, %e, %E, %g, or %G. Syntax such as %0.2f is also supported.

params = exp_1, exp_2, (...)
Unlimited amount of numeric arguments can be specified in the format string. These should be listed under the params item, in order. The type of each parameter must match its format specifier.

font = [F]font_no (int)
font_no specifies the number of the font to use for text rendering. The 'F' prefix is optional: if included, then the text is rendred using lifebar (fight.def) fonts. Otherwise font declared in character's DEF file is used. If specified font doesn't exist than the debug font is used. Defaults to debug font.

bank = bank_no (int)
Color bank of the font to use. Refer to the font for what color banks it has. Defaults to 0.

align = alignment (int)
alignment is a number representing the text alignment. 1 is left, 0 means center, and -1 is for right-alignment. Defaults to 1.

pos = off_x, off_y (int, int)
Specify the offset at which to create the text. Defaults to 0,0.

scale = x_scale, y_scale (float, float)
Specify the scaling factors to apply to the text in the horizontal and vertical directions. Defaults to 1,1.

color = r, g, b (int, int, int)
Color adjustment values for the font. Defaults to 256,256,256 (no color adjustment).

id = id_no (int) (nightly build only)
Specifies an ID number for this text. Used to identify particular text in numText trigger and removeText sctrl.

linespacing = y_spacing (float) (nightly build only)
Specify the spacing between lines, if \n is used to break lines.

textdelay = time (float) (nightly build only)
Adjusts the text typing time, the longer the time the longer the delay between each letter typed.

velocity = vel_x, vel_y (float, float) (nightly build only)
Applies speed to text on the defined axis.

accel = accel_x, accel_y (float, float) (nightly build only)
Applies acceleration to text on the defined axis.

friction = friction_x, friction_y (float, float) (nightly build only)
Applies friction to text on the defined axis (Friction value example: 0.95).

xshear = xshear (float) (nightly build only)
Specifies the amount of horizontal shearing to apply to the text (only for sprite fonts). Defaults to 0.

palfx.key = the text sctrl can accept all the same key values from PalFX state controller (only for sprite fonts) (nightly build only)

TransformClsn (nightly build only)

Changes the geometry or certain properties of the player's collision boxes.

Required parameters:
At least one of the optional parameters

Optional parameters:
scale = x_scale, y_scale (float, float)
Applies a scale multiplier to the boxes

angle = angle (float)
Changes the angle of the boxes. In degrees

TransformSprite (nightly build only)

Apply certain deformations to the char's sprite.

Required parameters:
At least one of the optional parameters

Optional parameters:
window = x, y, width, height (float, float, float, float)
The window parameter forms a rectangle relative to the char, outside of which pixels will not be drawn.

xshear = xshear (float)
Specifies the amount of horizontal shearing to apply to the char. Defaults to 0.

⚠️ **GitHub.com Fallback** ⚠️