Ikemen GO Lua Documentation

Details all lua functions that are registered from the engine itself.


addChar(c string)

Adds a character to the select pool.

addHotKey(key string, ctrl bool, alt bool, shift bool, pause bool, debugKey bool, script bool)

Returns true if key was added. Returns false if key wasn't recognized.

addStage(s string)

Adds a stage to the select pool.

animAddPos(anim userdata, x float, y float)

Adds (or substracts) (?) position to an animation.

animDraw(anim userdata)

Draws an animation.

animGetLength(anim userdata)

Returns length of an animation.

animGetPreloadedData()



animGetSpriteInfo()



animNew()



animReset()



animSetAlpha()



animSetColorKey()



animSetFacing()



animSetPalFX()



animSetPos()



animSetScale()



animSetTile()



animSetWindow()



animUpdate()



bgDraw()



bgNew()



bgReset()



charChangeAnim(player int, animNo int, animElem int, ffx int)

Changes player anim.

charChangeState(player int, stateNo int)

Changes player state.

charMapSet(player int, mapName string, value int/float, mapType string)

Tested
Sets (or adds) a number value to a player's map. MapType must be "set" or "add" (defaults to "set" if not specified).

charSndPlay(player int, group int, index int, volumeScale int, commonSnd bool, channel int, lowpriority bool, freqmul float, loop bool, panning float)

Plays a sound from a certain character. If commonSnd is true, sound will be searched in commonsnd file (?).

charSndStop(player int)

Stops player sounds. If a player isn't specified, it stops the sound from all players (?).

charSpriteDraw(player int, sprTbl table, x float, y float, scaleX float, scaleY float, facing int, windowX1 int, windowY1 int, windowX2 int, windowY2 int)

Draws a player sprite with specified parameters.

clear()

Clears debug clipboard text.

clearAllSound()

Clears sound from all players.

clearColor()



clearConsole()



clearSelected()



commandAdd(cmdList CommandList, name string, command string, time int, buffer int)

Adds a command to a CommandList.

commandBufReset()



commandGetState()



commandInput()



commandNew()

Returns a CommandList object as userdata.

commonLuaInsert(code string)

Inserts lua code to commonLua table.

commonLuaDelete(code string)

Deletes lua code from commonLua table.

commonStatesInsert(path string)

Inserts a CNS/ZSS/ST file path to commonStates table.

commonStatesDelete(path string)

Deletes a CNS/ZSS/ST file path from commonStates table.

connected()

Returns true if the engine is network mode.

dialogueReset()



endMatch()



enterNetPlay()



enterReplay()



esc()

Tested
Returns true if esc key was pressed, false otherwise.

exitNetPlay()



exitReplay()



fade()



fadeColor()



fillRect()



fontGetDef()



fontGetTextWidth()



fontNew()



game()

Launches a match. Returns winner team and gameStats table upon finish.

getAttachedCharInfo()



getCharFileName()



getCharInfo(charRef int)

Gets basic character info from select pool.

getCharDialogue(playerNo int)

Returns dialogue from desired player. if playerNo isn't specified, it also returns player number. (?)

getCharMoveList()



getCharFileName(charRef int)

Returns .def filename from a char in the select pool.

getCharRandomPalette()



getCharVictoryQuote()



getCommandLineFlags()



getCommandLineValue()



getConsecutiveWins()



getDirectoryFiles()



getFrameCount()



getJoystickName()



getJoystickPresent()



getJoystickKey()



getKey()

Returns pressed key.

getKeyText()



getListenPort()

Returns listening port.

getMatchMaxDrawGames()



getMatchWins()



getRoundTime()



getStageInfo(stageRef)

Returns basic stage info from select pool.

getStageNo()

Tested
Returns selected stage ref number.

getWaveData()



loadDebugFont()



loadDebugInfo()



loadDebugStatus()



loading()



loadLifebar()



loadStart()



numberToRune()



overrideCharData()



panicError()



playBGM()



playerBufReset()



preloadListChar()



preloadListStage()



printConsole()



puts()



refresh()



reload()



remapInput()



removeDizzy()



replayRecord()



replayStop()



resetKey()



resetAILevel()



resetMatchData()



resetRemapInput()



resetScore(tn int)

Resets score for a desired teamside. tn must be 1 or 2.

roundReset()

Resets round.

screenshot()

Takes a screenshot that gets saved in screenshots folder.

searchFile(file string, dirs table)

Searches for a file in a list of directories and returns its first match. dirs must be a table containing strings only.

selectChar(teamSide int, charRef int, palette int)

Selects a character from the select pool.

selectStage(s int)

Selects a stage from the select pool.

selectStart()



sffNew()



selfState()



setAccel(a float)

Sets game acceleration.

setAILevel(ai float)

Sets AI level for the current selected character.

setAllowDebugKeys(dk bool)

Allows to use debug keys if true, false otherwise.

setAllowDebugMode(dm bool)

Allows using debug mode if true, false otherwise.

setAudioDucking(ad bool)

Activates audio ducking if true, false otherwise.

setAutoguard(playerNo int, ag bool)

Sets autoguard for desired player.

setAutoLevel(al bool)

Activates autolevel if true, false otherwise.

setCom(playerNo int, ai float)

Sets AI level for a certain player. If ai is greater than 0, that player becomes AI-controlled.

setConsecutiveWins(team int, cw int)

Sets consecutive wins for a team. Team must be 1 or 2.

setContinue(c bool)

Sets continue flag.

setDizzyPoints(dp int)

Sets dizzy points for the current selected player.

setGameMode(gm string)

Sets game mode.

setGameSpeed(gs int)

Sets game speed.

setGuardPoints(gp int)

Sets guard points for the current selected player.

setHomeTeam(teamSide int)

Sets which team side is home team. teamSide must be 1 or 2.

setKeyConfig(playerNo int, joystick int, keys table)

Sets key config for a desired player. If joystick is -1, keyboard is used.

setLife(l int)

Sets life for the current selected player.

setLifeShare(teamSide int, ls bool)

Sets if a teamside should share life. teamSide must be 1 or 2.

setLifebarElements(elements table)

Sets lifebar elements.

setLifebarLocalcoord(x int, y int)

Sets lifebar localcoord.

setLifebarOffsetX(x float)

Sets lifebar x offset.

setLifebarScale(s float)

Sets lifebar scale.

setLifebarPortraitScale(s float)

Sets lifebar portrait scale.

setLifebarScore(score1 float, score2 float)

Sets score for both teams.

setLifebarTimer()



setLifeMul()



setListenPort()



setLoseSimul()



setLoseTag()



setLuaLocalcoord()



setLuaPortraitScale()



setLuaSpriteOffsetX()



setLuaSpriteScale()



setMatchMaxDrawGames()



setMatchNo()



setMatchWins()



setMaxAfterImage()



setMaxExplod()



setMaxHelper()



setMaxPlayerProjectile()



setMotifDir()



setPanningRange()



setPlayers()



setPower()



setPowerShare()



setRedLife()



setRoundTime()



setStereoEffects()



setTeam1VS2Life()



setTeamMode()



setTime()



setTimeFramesPerCount()



setVolumeMaster()



setVolumeBgm()



setVolumeSfx()



setWinCount()



setZoom()



setZoomMax()



setZoomMin()



setZoomSpeed()



sleep()



sndGetLength()



sndNew()



sndPlay()



sndPlaying()



sndStop()



sszRandom()



step()



synchronize()



textImgDraw()



textImgNew()



textImgSetAlign()



textImgSetBank()



textImgSetColor()



textImgSetFont()



textImgSetPos()



textImgSetScale()



textImgSetText()



textImgSetWindow()



toggleClsnDraw()



toggleDebugDraw()



toggleDialogueBars()



toggleFullscreen()



toggleMaxPowerMode()



toggleNoSound()



togglePause()



togglePlayer()



togglePostMatch()



toggleStatusDraw()



toggleVsync()



updateVolume()



waveGetLength()



wavePlay()