Jump to content

Sonic the Hedgehog (2006) Script Functions: Difference between revisions

From HedgeDocs
Hyper (talk | contribs)
Document EndingMode functions
Hyper (talk | contribs)
Improve categorisation
Line 1: Line 1:
{{Notice|type=warn|content=This list is a work in progress!}}
{{Notice|type=warn|content=This list is a work in progress!}}
{{Notice|type=info|content=When actors are referenced by name, they can be targeted on specific layers when formatted as <code>{set_layer}:{actor_name}</code> (without the brackets, of course). Otherwise, the actor names can be provided as-is.}}
{{Notice|type=info|content=When actors are referenced by name, they can be targeted on specific layers when formatted as <code>{set_layer}:{actor_name}</code> (without the brackets, of course). Otherwise, the actor names can be provided as-is.}}
= Global Namespace =
= GameScript Subsystem =
These functions are provided as globals.
These functions are provided by <code>Sonicteam::GameScript</code>.


== Signal ==
== Signal ==
Line 66: Line 66:
None.
None.


== Text ==
== Game.Sleep ==


=== Description ===
=== Description ===
Creates a text entity for the staff roll.
Pauses script execution for the specified duration.


=== Signature ===
=== Signature ===
  Text(mode, unknown_1, text_card, unknown_2)
  Game.Sleep(duration)


==== Parameters ====
==== Parameters ====
Line 82: Line 82:
!Required?
!Required?
|-
|-
|mode
|duration
|Pointer
|A pointer to <code>Sonicteam::EndingMode</code>.
|✔️
|-
|unknown_1
|Number
|Number
|This parameter is unimplemented. Usually 0.5.
|The amount of time to sleep for.
|✔️
|✔️
|-
|text_card
|String
|The name of the text card in <code>staff.mst</code> to use.
|✔️
|-
|unknown_2
|Number
|This parameter is unimplemented. Usually 500.
|❌
|}
|}


Line 106: Line 91:
None.
None.


== Sprite ==
== Game.Log ==


{{Notice|type=warn|content=This function is unimplemented.}}
=== Description ===
=== Description ===
Creates a CSD resource for the staff roll and initialises the specified scene.
Logs text for debugging.


=== Signature ===
=== Signature ===
  Sprite(mode, unknown, csd_project, csd_scene)
  Game.Log(text)


==== Parameters ====
==== Parameters ====
Line 122: Line 108:
!Required?
!Required?
|-
|-
|mode
|text
|Pointer
|A pointer to <code>Sonicteam::EndingMode</code>.
|✔️
|-
|unknown
|Number
|Unknown. Always zero.
|✔️
|-
|csd_project
|String
|String
|The path to the CSD project to load. This parameter expects a path to a <code>*.xncp</code> file without a file extension.
|The text to log.
|✔️
|-
|csd_scene
|String
|The name of the CSD scene to use.
|✔️
|✔️
|}
|}


=== Results ===
=== Results ===
None.
Unknown.


== Space ==
== Game.Debug ==


{{Notice|type=warn|content=This function is unimplemented.}}
=== Description ===
=== Description ===
Adds a block of padding to the staff roll.
Unknown.


=== Signature ===
=== Signature ===
  Space(mode, offset)
  Game.Debug()
 
=== Results ===
Unknown.
 
== Game.ExecScript ==
 
=== Description ===
Loads and executes the specified Lua script. This function expects a path to a <code>*.lub</code> file with a <code>*.lua</code> file extension.
 
=== Signature ===
Game.ExecScript(path)


==== Parameters ====
==== Parameters ====
Line 162: Line 145:
!Required?
!Required?
|-
|-
|mode
|path
|Pointer
|String
|A pointer to <code>Sonicteam::EndingMode</code>.
|The path to the script to execute.
|✔️
|-
|offset
|Number
|The amount to offset the next text entity.
|✔️
|✔️
|}
|}
Line 176: Line 154:
None.
None.


== Section ==
== Game.CreateObject ==


=== Description ===
=== Description ===
Creates a text entity to denote a new section of the staff roll.
Unknown.


=== Signature ===
=== Signature ===
  Section(mode, unknown_1, text_card, unknown_2)
  Game.CreateObject(type, name, {})


==== Parameters ====
==== Parameters ====
Line 192: Line 170:
!Required?
!Required?
|-
|-
|mode
|type
|Pointer
|String
|A pointer to <code>Sonicteam::EndingMode</code>.
|The type of object to create.
|✔️
|✔️
|-
|-
|unknown_1
|name
|Number
|This parameter is unimplemented. Usually 0.5.
|✔️
|-
|text_card
|String
|String
|The name of the text card in <code>staff.mst</code> to use.
|The name of the object.
|✔️
|✔️
|-
|-
|unknown_2
|N/A
|Number
|Table
|This parameter is unimplemented. Usually 500.
|Unknown.
|❌
|❌
|}
|}


=== Results ===
=== Results ===
None.
A pointer to the object that was created.


== Subsection ==
== Game.GetPlatform ==


{{Notice|type=warn|content=This function is unused and has not been tested, information regarding it may be inaccurate.}}
=== Description ===
=== Description ===
Creates a text entity to denote a new subsection of the staff roll.
Gets the name of the platform the game is running on.


=== Signature ===
=== Signature ===
  Subsection(mode, unknown_1, text_card, unknown_2)
  Game.GetPlatform()
 
=== Results ===
A string storing the name of the platform; "xbox360" for Xbox 360, "ps3" for PlayStation 3 and "pc" for Windows.
 
== Game.LoadArc ==
 
{{Notice|type=warn|content=This function is unimplemented.}}
=== Description ===
Unknown.
 
=== Signature ===
Unknown.


==== Parameters ====
==== Parameters ====
{| class="wikitable"
Unknown.
|+
 
!Parameter
=== Results ===
!Type
Unknown.
!Description
 
!Required?
== Game.AttachArc ==
|-
 
|mode
{{Notice|type=warn|content=This function is unimplemented.}}
|Pointer
=== Description ===
|A pointer to <code>Sonicteam::EndingMode</code>.
Unknown.
|✔️
|-
|unknown_1
|Number
|This parameter is unimplemented.
|✔️
|-
|text_card
|String
|The name of the text card in <code>staff.mst</code> to use.
|✔️
|-
|unknown_2
|Number
|This parameter is unimplemented.
|❌
|}


=== Results ===
=== Signature ===
None.
Unknown.


= script Namespace =
==== Parameters ====
These functions are provided by the <code>script</code> library.
Unknown.


== script.reload ==
=== Results ===
Unknown.
 
== Game.DetachArc ==


{{Notice|type=info|content=This function is an alias of [[#Game.ExecScript|<code>Game.ExecScript</code>]].}}
{{Notice|type=warn|content=This function is unimplemented.}}
=== Description ===
=== Description ===
Loads and executes the specified Lua script. This function expects a path to a <code>*.lub</code> file with a <code>*.lua</code> file extension.
Unknown.


=== Signature ===
=== Signature ===
script.reload(path)
Unknown.


==== Parameters ====
==== Parameters ====
{| class="wikitable"
Unknown.
|+
!Parameter
!Type
!Description
!Required?
|-
|path
|String
|The path to the script to execute.
|✔️
|}


=== Results ===
=== Results ===
None.
Unknown.


= Game Namespace =
== Game.StateChangeCallback ==
These functions are provided by the <code>Game</code> library.
 
== Game.Sleep ==


=== Description ===
=== Description ===
Pauses script execution for the specified duration.
Unknown.


=== Signature ===
=== Signature ===
  Game.Sleep(duration)
  Game.StateChangeCallback()
 
==== Parameters ====
{| class="wikitable"
|+
!Parameter
!Type
!Description
!Required?
|-
|duration
|Number
|The amount of time to sleep for.
|✔️
|}


=== Results ===
=== Results ===
None.
None.


== Game.Log ==
== Game.SetPlayer ==


{{Notice|type=warn|content=This function is unimplemented.}}
=== Description ===
=== Description ===
Logs text for debugging.
Sets default player parameters for the stage. These are only used if the stage set does not provide player start objects.


=== Signature ===
=== Signature ===
  Game.Log(text)
  Game.SetPlayer(x, y, z, yaw, player_name, player_no, amigo)


==== Parameters ====
==== Parameters ====
Line 331: Line 272:
!Required?
!Required?
|-
|-
|text
|x
|String
|Number
|The text to log.
|The default X position of the player.
|✔️
|-
|y
|Number
|The default Y position of the player.
|✔️
|-
|z
|Number
|The default Z position of the player.
|✔️
|✔️
|}
|-
 
|yaw
=== Results ===
|Number
Unknown.
|The default yaw rotation of the player in degrees.
 
|✔️
== Game.Debug ==
|-
 
|player_name
{{Notice|type=warn|content=This function is unimplemented.}}
|String
=== Description ===
|The file name of the player script.
Unknown.
|✔️
 
|-
=== Signature ===
|player_no
Game.Debug()
|Number
 
|The identifier of the player object.
|❌
|-
|amigo
|Boolean
|Determines whether the player object is for an amigo.
|❌
|}
 
=== Results ===
=== Results ===
Unknown.
None.


== Game.ExecScript ==
== Game.StartEntityByName ==


=== Description ===
=== Description ===
Loads and executes the specified Lua script. This function expects a path to a <code>*.lub</code> file with a <code>*.lua</code> file extension.
Starts the specified entity that was spawned in as inactive.


=== Signature ===
=== Signature ===
  Game.ExecScript(path)
  Game.StartEntityByName(name)


==== Parameters ====
==== Parameters ====
Line 368: Line 327:
!Required?
!Required?
|-
|-
|path
|name
|String
|String
|The path to the script to execute.
|The name of the entity to start.
|✔️
|✔️
|}
|}
Line 377: Line 336:
None.
None.


== Game.CreateObject ==
== Game.Signal ==


=== Description ===
=== Description ===
Unknown.
Sends a signal message to the specified entity.


=== Signature ===
=== Signature ===
  Game.CreateObject(type, name, {})
  Game.Signal(name)
Game.Signal(name, unknown)


==== Parameters ====
==== Parameters ====
Line 392: Line 352:
!Description
!Description
!Required?
!Required?
|-
|type
|String
|The type of object to create.
|✔️
|-
|-
|name
|name
|String
|String
|The name of the object.
|The name of the entity to signal.
|✔️
|✔️
|-
|-
|N/A
|unknown
|Table
|Number
|Unknown.
|This parameter is unimplemented. It was likely used for optional data to pass to the message receiver. It isn't used by any of the scripts in the game.
|❌
|❌
|}
|}


=== Results ===
=== Results ===
A pointer to the object that was created.
None.


== Game.GetPlatform ==
== Game.PlayBGM ==


=== Description ===
=== Description ===
Gets the name of the platform the game is running on.
Plays the specified sound bank entry from <code>bgm.sbk</code> as background music for the stage. This is overridden by <code>mission_bgm</code> in the [[Mission Parameters]].


=== Signature ===
=== Signature ===
  Game.GetPlatform()
  Game.PlayBGM(name)
 
==== Parameters ====
{| class="wikitable"
|+
!Parameter
!Type
!Description
!Required?
|-
|name
|String
|The name of the sound bank entry.
|✔️
|}


=== Results ===
=== Results ===
A string storing the name of the platform; "xbox360" for Xbox 360, "ps3" for PlayStation 3 and "pc" for Windows.
None.


== Game.LoadArc ==
== Game.StopBGM ==


{{Notice|type=warn|content=This function is unimplemented.}}
=== Description ===
=== Description ===
Unknown.
Stops the current background music in the stage.


=== Signature ===
=== Signature ===
Unknown.
Game.StopBGM()
 
==== Parameters ====
Unknown.


=== Results ===
=== Results ===
Unknown.
None.


== Game.AttachArc ==
== Game.SetGenArea ==


{{Notice|type=warn|content=This function is unimplemented.}}
=== Description ===
=== Description ===
Unknown.
Sets the bounding box for entities to spawn within.


=== Signature ===
=== Signature ===
Unknown.
Game.SetGenArea({})


==== Parameters ====
==== Parameters ====
Unknown.
{| class="wikitable"
 
|+
=== Results ===
!Parameter
Unknown.
!Type
 
!Description
== Game.DetachArc ==
!Required?
 
|-
{{Notice|type=warn|content=This function is unimplemented.}}
|N/A
=== Description ===
|Table
Unknown.
|
 
{| class="wikitable"
=== Signature ===
|+
Unknown.
!Field
 
!Type
==== Parameters ====
!Description
Unknown.
!Required?
 
|-
=== Results ===
|type
Unknown.
|Number
 
|Unknown.
== Game.StateChangeCallback ==
|❌
 
|-
=== Description ===
|size
Unknown.
|Table
 
|The size of the area.
=== Signature ===
|✔️
Game.StateChangeCallback()
|-
|offset
|Table
|The offset of the area.
|❌
|-
|border
|Number
|Unknown.
|❌
|-
|cameraoffset
|Table
|The offset of the area relative to the camera.
|❌
|}
|✔️
|}


=== Results ===
=== Results ===
None.
None.


== Game.SetPlayer ==
== Game.LoadTerrain ==


=== Description ===
=== Description ===
Sets default player parameters for the stage. These are only used if the stage set does not provide player start objects.
Loads all of the terrain models and collision from the specified directory. This is overridden by <code>mission_terrain</code> in the [[Mission Parameters]].


=== Signature ===
=== Signature ===
  Game.SetPlayer(x, y, z, yaw, player_name, player_no, amigo)
  Game.LoadTerrain(path)
Game.LoadTerrain(path, optimize_world)


==== Parameters ====
==== Parameters ====
Line 495: Line 477:
!Required?
!Required?
|-
|-
|x
|path
|Number
|String
|The default X position of the player.
|The path to load from.
|✔️
|✔️
|-
|-
|y
|optimize_world
|Number
|Boolean
|The default Y position of the player.
|This feature is unimplemented. It was likely intended for Havok optimizations.
|✔️
|-
|z
|Number
|The default Z position of the player.
|✔️
|-
|yaw
|Number
|The default yaw rotation of the player in degrees.
|✔️
|-
|player_name
|String
|The file name of the player script.
|✔️
|-
|player_no
|Number
|The identifier of the player object.
|❌
|-
|amigo
|Boolean
|Determines whether the player object is for an amigo.
|❌
|❌
|}
|}
Line 534: Line 491:
None.
None.


== Game.StartEntityByName ==
== Game.LoadSky ==


=== Description ===
=== Description ===
Starts the specified entity that was spawned in as inactive.
Loads the sky model from the specified directory.


=== Signature ===
=== Signature ===
  Game.StartEntityByName(name)
  Game.LoadSky(path)


==== Parameters ====
==== Parameters ====
Line 550: Line 507:
!Required?
!Required?
|-
|-
|name
|path
|String
|String
|The name of the entity to start.
|The path to load from.
|✔️
|✔️
|}
|}
Line 559: Line 516:
None.
None.


== Game.Signal ==
== Game.LoadStageSet ==


=== Description ===
=== Description ===
Sends a signal message to the specified entity.
Loads the specified stage set. This function expects a path to a <code>*.set</code> file with a <code>*.xml</code> file extension.


=== Signature ===
=== Signature ===
  Game.Signal(name)
  Game.LoadStageSet(path)
  Game.Signal(name, unknown)
  Game.LoadStageSet(path, layer)


==== Parameters ====
==== Parameters ====
Line 576: Line 533:
!Required?
!Required?
|-
|-
|name
|path
|String
|String
|The name of the entity to signal.
|The path to the file to load.
|✔️
|✔️
|-
|-
|unknown
|layer
|Number
|String
|This parameter is unimplemented. It was likely used for optional data to pass to the message receiver. It isn't used by any of the scripts in the game.
|The name of the set layer.
|❌
|❌
|}
|}


=== Results ===
==== Set Layers ====
None.
 
== Game.PlayBGM ==
 
=== Description ===
Plays the specified sound bank entry from <code>bgm.sbk</code> as background music for the stage. This is overridden by <code>mission_bgm</code> in the [[Mission Parameters]].
 
=== Signature ===
Game.PlayBGM(name)
 
==== Parameters ====
{| class="wikitable"
{| class="wikitable"
|+
|+
!Parameter
!Name
!Type
!Description
!Description
!Required?
|-
|-
|name
|default
|String
|The default layer used when no layer is specified.
|The name of the sound bank entry.
|-
|✔️
|design
|The layer used for additional details.
|-
|particle
|The layer used for particle effects.
|-
|test
|The layer used for testing purposes.
|-
|area
|The layer used for area design that is usually static between new layouts.
|-
|pathobj
|The layer used for <code>common_path_obj</code> objects.
|}
|}


Line 615: Line 572:
None.
None.


== Game.StopBGM ==
== Game.LoadPath ==


=== Description ===
=== Description ===
Stops the current background music in the stage.
Loads the specified spline path. This function expects a path to a <code>*.path</code> file without a file extension.


=== Signature ===
=== Signature ===
  Game.StopBGM()
  Game.LoadPath(path)
Game.LoadPath(path, layer)


=== Results ===
==== Parameters ====
None.
{| class="wikitable"
 
|+
== Game.SetGenArea ==
!Parameter
!Type
!Description
!Required?
|-
|path
|String
|The path to the file to load.
|✔️
|-
|layer
|String
|The name of the path layer.
|❌
|}


=== Description ===
==== Path Layers ====
Sets the bounding box for entities to spawn within.
 
=== Signature ===
Game.SetGenArea({})
 
==== Parameters ====
{| class="wikitable"
{| class="wikitable"
|+
|+
!Parameter
!Name
!Type
!Description
!Description
!Required?
|-
|-
|N/A
|(null)
|Table
|The default layer used when no layer is specified.
|
|-
|grind
|The layer used for grind rails.
|-
|guide
|The layer used for guide paths for loops and surfaces that move the player forwards only.
|-
|pathobj
|The layer used for <code>common_path_obj</code> objects.
|-
|physicspath
|The layer used for <code>physicspath</code> objects. This layer is unused and said objects tend to use the default layer.
|}
 
=== Results ===
None.
 
== Game.LoadParticle ==
 
=== Description ===
Loads the specified particle container. This function expects a path to a <code>*.plc</code> file.
 
=== Signature ===
Game.LoadParticle(path)
 
==== Parameters ====
{| class="wikitable"
{| class="wikitable"
|+
|+
!Field
!Parameter
!Type
!Type
!Description
!Description
!Required?
!Required?
|-
|-
|type
|path
|Number
|String
|Unknown.
|The path to the file to load.
|❌
|-
|size
|Table
|The size of the area.
|✔️
|-
|offset
|Table
|The offset of the area.
|❌
|-
|border
|Number
|Unknown.
|❌
|-
|cameraoffset
|Table
|The offset of the area relative to the camera.
|❌
|}
|✔️
|✔️
|}
|}
Line 683: Line 650:
None.
None.


== Game.LoadTerrain ==
== Game.LoadSceneParams ==


=== Description ===
=== Description ===
Loads all of the terrain models and collision from the specified directory. This is overridden by <code>mission_terrain</code> in the [[Mission Parameters]].
Loads the specified Lua script containing the necessary tables for [[Scene Parameters]]. This function expects a path to a <code>*.lub</code> file with a <code>*.lua</code> file extension.


=== Signature ===
=== Signature ===
  Game.LoadTerrain(path)
  Game.LoadSceneParams(path)
Game.LoadTerrain(path, optimize_world)


==== Parameters ====
==== Parameters ====
Line 702: Line 668:
|path
|path
|String
|String
|The path to load from.
|The path to the file to load.
|✔️
|✔️
|-
|optimize_world
|Boolean
|This feature is unimplemented. It was likely intended for Havok optimizations.
|❌
|}
|}


Line 714: Line 675:
None.
None.


== Game.LoadSky ==
== Game.LoadLight ==


{{Notice|type=warn|content=This function is only used by a test stage and has not been tested, information regarding it may be inaccurate.}}
=== Description ===
=== Description ===
Loads the sky model from the specified directory.
Loads the specified Lua script containing the necessary tables for light parameters. This function expects a path to a <code>*.lub</code> file with a <code>*.lua</code> file extension.


=== Signature ===
=== Signature ===
  Game.LoadSky(path)
  Game.LoadLight(path)


==== Parameters ====
==== Parameters ====
Line 732: Line 694:
|path
|path
|String
|String
|The path to load from.
|The path to the file to load.
|✔️
|✔️
|}
|}
Line 739: Line 701:
None.
None.


== Game.LoadStageSet ==
== Game.LoadSceneEnvMap ==


=== Description ===
=== Description ===
Loads the specified stage set. This function expects a path to a <code>*.set</code> file with a <code>*.xml</code> file extension.
Loads the specified texture to use as the environment map for the stage. This function was superseded by the <code>EnvMap</code> table in the [[Scene Parameters]].


=== Signature ===
=== Signature ===
  Game.LoadStageSet(path)
  Game.LoadSceneEnvMap(path)
Game.LoadStageSet(path, layer)


==== Parameters ====
==== Parameters ====
Line 760: Line 721:
|The path to the file to load.
|The path to the file to load.
|✔️
|✔️
|-
|layer
|String
|The name of the set layer.
|❌
|}
|}


==== Set Layers ====
=== Results ===
None.
 
== Game.LoadReflectionAreas ==
 
{{Notice|type=warn|content=This function is unused and has not been tested, information regarding it may be inaccurate.}}
=== Description ===
Loads the specified reflection area. This function expects a path to a <code>*.rab</code> file. This function was superseded by the <code>ReflectionAreas</code> table in the [[Scene Parameters]].
 
=== Signature ===
Game.LoadReflectionAreas(path)
 
==== Parameters ====
{| class="wikitable"
{| class="wikitable"
|+
|+
!Name
!Parameter
!Type
!Description
!Description
!Required?
|-
|-
|default
|path
|The default layer used when no layer is specified.
|String
|-
|The path to the file to load.
|design
|✔️
|The layer used for additional details.
|-
|particle
|The layer used for particle effects.
|-
|test
|The layer used for testing purposes.
|-
|area
|The layer used for area design that is usually static between new layouts.
|-
|pathobj
|The layer used for <code>common_path_obj</code> objects.
|}
|}


Line 795: Line 752:
None.
None.


== Game.LoadPath ==
== Game.LoadSoundBank ==


=== Description ===
=== Description ===
Loads the specified spline path. This function expects a path to a <code>*.path</code> file without a file extension.
Loads the specified sound bank for stage-specific sound effects. This function expects a path to a <code>*.sbk</code> file without a file extension.


=== Signature ===
=== Signature ===
  Game.LoadPath(path)
  Game.LoadSoundBank(path)
Game.LoadPath(path, layer)


==== Parameters ====
==== Parameters ====
Line 816: Line 772:
|The path to the file to load.
|The path to the file to load.
|✔️
|✔️
|-
|layer
|String
|The name of the path layer.
|❌
|}
|}


==== Path Layers ====
=== Results ===
{| class="wikitable"
|+
!Name
!Description
|-
|(null)
|The default layer used when no layer is specified.
|-
|grind
|The layer used for grind rails.
|-
|guide
|The layer used for guide paths for loops and surfaces that move the player forwards only.
|-
|pathobj
|The layer used for <code>common_path_obj</code> objects.
|-
|physicspath
|The layer used for <code>physicspath</code> objects. This layer is unused and said objects tend to use the default layer.
|}
 
=== Results ===
None.
None.


== Game.LoadParticle ==
== Game.LoadVoiceBank ==


=== Description ===
=== Description ===
Loads the specified particle container. This function expects a path to a <code>*.plc</code> file.
Loads the specified sound bank for stage-specific voice clips. This function expects a path to a <code>*.sbk</code> file without the file extension. The specified sound bank must have a <code>_e</code> suffix, the game will automatically locate the Japanese sound bank if it's present.


=== Signature ===
=== Signature ===
  Game.LoadParticle(path)
  Game.LoadVoiceBank(path)


==== Parameters ====
==== Parameters ====
Line 873: Line 802:
None.
None.


== Game.LoadSceneParams ==
== Game.LoadCameraParam ==


=== Description ===
=== Description ===
Loads the specified Lua script containing the necessary tables for [[Scene Parameters]]. This function expects a path to a <code>*.lub</code> file with a <code>*.lua</code> file extension.
Loads the specified Lua script containing the necessary constants for camera parameters. This function expects a path to a <code>*.lub</code> file with a <code>*.lua</code> file extension.


=== Signature ===
=== Signature ===
  Game.LoadSceneParams(path)
  Game.LoadCameraParam(path)


==== Parameters ====
==== Parameters ====
Line 898: Line 827:
None.
None.


== Game.LoadLight ==
== Game.LoadRenderScript ==


{{Notice|type=warn|content=This function is only used by a test stage and has not been tested, information regarding it may be inaccurate.}}
=== Description ===
=== Description ===
Loads the specified Lua script containing the necessary tables for light parameters. This function expects a path to a <code>*.lub</code> file with a <code>*.lua</code> file extension.
Loads the specified Lua script containing the necessary functions and constants for a render script. This function expects a path to a <code>*.lub</code> file with a <code>*.lua</code> file extension.


=== Signature ===
=== Signature ===
  Game.LoadLight(path)
  Game.LoadRenderScript(path)


==== Parameters ====
==== Parameters ====
Line 924: Line 852:
None.
None.


== Game.LoadSceneEnvMap ==
== Game.LoadKynapse ==


=== Description ===
=== Description ===
Loads the specified texture to use as the environment map for the stage. This function was superseded by the <code>EnvMap</code> table in the [[Scene Parameters]].
Loads the specified Kynapse Big File for AI agent parameters, navigation meshes and spatial graphs. This function expects a path to a <code>*.kbf</code> file.


=== Signature ===
=== Signature ===
  Game.LoadSceneEnvMap(path)
  Game.LoadKynapse(path)


==== Parameters ====
==== Parameters ====
Line 949: Line 877:
None.
None.


== Game.LoadReflectionAreas ==
== Game.LoadTownsmanInfo ==


{{Notice|type=warn|content=This function is unused and has not been tested, information regarding it may be inaccurate.}}
=== Description ===
=== Description ===
Loads the specified reflection area. This function expects a path to a <code>*.rab</code> file. This function was superseded by the <code>ReflectionAreas</code> table in the [[Scene Parameters]].
Loads the specified Lua script containing the necessary tables and constants for NPC info. This function expects a path to a <code>*.lub</code> file with a <code>*.lua</code> file extension.


=== Signature ===
=== Signature ===
  Game.LoadReflectionAreas(path)
  Game.LoadTownsmanInfo(path)


==== Parameters ====
==== Parameters ====
Line 975: Line 902:
None.
None.


== Game.LoadSoundBank ==
== Game.LoadRaderMap ==


=== Description ===
=== Description ===
Loads the specified sound bank for stage-specific sound effects. This function expects a path to a <code>*.sbk</code> file without a file extension.
Loads the specified package for the radar model. This function expects a path to a <code>*.pkg</code> file without a file extension.


=== Signature ===
=== Signature ===
  Game.LoadSoundBank(path)
  Game.LoadRaderMap(path)


==== Parameters ====
==== Parameters ====
Line 1,000: Line 927:
None.
None.


== Game.LoadVoiceBank ==
== Game.LoadObjectPhysics ==


{{Notice|type=warn|content=This function is unused and has not been tested, information regarding it may be inaccurate.}}
=== Description ===
=== Description ===
Loads the specified sound bank for stage-specific voice clips. This function expects a path to a <code>*.sbk</code> file without the file extension. The specified sound bank must have a <code>_e</code> suffix, the game will automatically locate the Japanese sound bank if it's present.
Loads the specified object physics parameter list. This function was superseded by the game loading a static file from <code>object.arc</code> called <code>Common.bin</code>.


=== Signature ===
=== Signature ===
  Game.LoadVoiceBank(path)
  Game.LoadObjectPhysics(path)


==== Parameters ====
==== Parameters ====
Line 1,025: Line 953:
None.
None.


== Game.LoadCameraParam ==
== Game.LoadExplosion ==


{{Notice|type=warn|content=This function is unused and has not been tested, information regarding it may be inaccurate.}}
=== Description ===
=== Description ===
Loads the specified Lua script containing the necessary constants for camera parameters. This function expects a path to a <code>*.lub</code> file with a <code>*.lua</code> file extension.
Loads the specified object explosion parameter list. This function was superseded by the game loading a static file from <code>object.arc</code> called <code>Explosion.bin</code>.


=== Signature ===
=== Signature ===
  Game.LoadCameraParam(path)
  Game.LoadExplosion(path)


==== Parameters ====
==== Parameters ====
Line 1,050: Line 979:
None.
None.


== Game.LoadRenderScript ==
== Game.LoadEnemy ==


{{Notice|type=warn|content=This function is unused and has not been tested, information regarding it may be inaccurate.}}
=== Description ===
=== Description ===
Loads the specified Lua script containing the necessary functions and constants for a render script. This function expects a path to a <code>*.lub</code> file with a <code>*.lua</code> file extension.
Loads the specified enemy parameter list. This function was superseded by the game loading a static file from <code>enemy.arc</code> called <code>ScriptParameter.bin</code>.


=== Signature ===
=== Signature ===
  Game.LoadRenderScript(path)
  Game.LoadEnemy(path)


==== Parameters ====
==== Parameters ====
Line 1,075: Line 1,005:
None.
None.


== Game.LoadKynapse ==
== Game.LoadShot ==


{{Notice|type=warn|content=This function is unused and has not been tested, information regarding it may be inaccurate.}}
=== Description ===
=== Description ===
Loads the specified Kynapse Big File for AI agent parameters, navigation meshes and spatial graphs. This function expects a path to a <code>*.kbf</code> file.
Loads the specified enemy shot parameter list. This function was superseded by the game loading a static file from <code>enemy.arc</code> called <code>ShotParameter.bin</code>.


=== Signature ===
=== Signature ===
  Game.LoadKynapse(path)
  Game.LoadShot(path)


==== Parameters ====
==== Parameters ====
Line 1,100: Line 1,031:
None.
None.


== Game.LoadTownsmanInfo ==
== Game.DebugCommand ==


{{Notice|type=warn|content=This function is only used by test stages and has not been tested, information regarding it may be inaccurate.}}
=== Description ===
=== Description ===
Loads the specified Lua script containing the necessary tables and constants for NPC info. This function expects a path to a <code>*.lub</code> file with a <code>*.lua</code> file extension.
Executes a debug command.


=== Signature ===
=== Signature ===
  Game.LoadTownsmanInfo(path)
  Game.DebugCommand(command)


==== Parameters ====
==== Parameters ====
Line 1,116: Line 1,048:
!Required?
!Required?
|-
|-
|path
|command
|String
|String
|The path to the file to load.
|The command to execute.
|✔️
|✔️
|}
==== Commands ====
{| class="wikitable"
|+
!Name
!Parameters
!Description
|-
|shadowcameradist
|Double
|Sets the shadow camera distance to the specified value.
|}
|}


Line 1,125: Line 1,069:
None.
None.


== Game.LoadRaderMap ==
== Game.LoadTimeLight ==


{{Notice|type=warn|content=This function is unused and has not been tested, information regarding it may be inaccurate.}}
=== Description ===
=== Description ===
Loads the specified package for the radar model. This function expects a path to a <code>*.pkg</code> file without a file extension.
Loads the specified Lua script containing the necessary tables and constants for time light parameters. This function expects a path to a <code>*.lub</code> file with a <code>*.lua</code> file extension.


=== Signature ===
=== Signature ===
  Game.LoadRaderMap(path)
  Game.LoadTimeLight(path)


==== Parameters ====
==== Parameters ====
Line 1,150: Line 1,095:
None.
None.


== Game.LoadObjectPhysics ==
== Game.ProcessMessage ==


{{Notice|type=warn|content=This function is unused and has not been tested, information regarding it may be inaccurate.}}
=== Description ===
=== Description ===
Loads the specified object physics parameter list. This function was superseded by the game loading a static file from <code>object.arc</code> called <code>Common.bin</code>.


=== Signature ===
=== Signature ===
  Game.LoadObjectPhysics(path)
  Game.ProcessMessage(actor_id, message_name)
Game.ProcessMessage(actor_id, message_name, {})
Game.ProcessMessage(actor_name, message_name)
Game.ProcessMessage(actor_name, message_name, {})


==== Parameters ====
==== Parameters ====
Line 1,167: Line 1,113:
!Required?
!Required?
|-
|-
|path
|actor_id
|Number
|The ID of the actor to send the message to.
|✔️
|-
|actor_name
|String
|The name of the actor to send the message to. Singletons for the level and player can be accessed by providing either <code>LEVEL</code> or <code>PLAYER</code> here.
|✔️
|-
|message_name
|String
|String
|The path to the file to load.
|The name of the message to send.
|✔️
|✔️
|}
|-
 
|N/A
=== Results ===
|Table
None.
|The message data to send, if required.
|❌
|}


== Game.LoadExplosion ==
==== Messages ====
 
{| class="wikitable"
{{Notice|type=warn|content=This function is unused and has not been tested, information regarding it may be inaccurate.}}
|+
=== Description ===
!Name
Loads the specified object explosion parameter list. This function was superseded by the game loading a static file from <code>object.arc</code> called <code>Explosion.bin</code>.
!Description
 
!Data
=== Signature ===
|-
Game.LoadExplosion(path)
|Shoot
 
|Shoots an object towards the specified actor.
==== Parameters ====
|
{| class="wikitable"
{| class="wikitable"
|+
|+
!Parameter
!Field
!Type
!Type
!Description
!Description
!Required?
!Required?
|-
|-
|path
|target
|String
|User Data
|The path to the file to load.
|The actor to target.
|✔️
|✔️
|-
|type
|Unknown
|Unknown.
|❌
|}
|}
 
|-
=== Results ===
|GateOpen
None.
|Opens a gate.
 
| rowspan="2" |None.
== Game.LoadEnemy ==
|-
 
|GateClose
{{Notice|type=warn|content=This function is unused and has not been tested, information regarding it may be inaccurate.}}
|Closes a gate.
=== Description ===
|-
Loads the specified enemy parameter list. This function was superseded by the game loading a static file from <code>enemy.arc</code> called <code>ScriptParameter.bin</code>.
|CallEvent
 
|Calls a generic event handler function from the current area script.
=== Signature ===
|
Game.LoadEnemy(path)
 
==== Parameters ====
{| class="wikitable"
{| class="wikitable"
|+
|+
!Parameter
!Field
!Type
!Type
!Description
!Description
!Required?
!Required?
|-
|-
|path
|eventID
|String
|String
|The path to the file to load.
|The name of the function.
|✔️
|✔️
|-
|actorID
|User Data
|The actor that invoked the event handler.
|❌
|-
|otherID
|User Data
|The other actor to mutate within the function (usually the player).
|❌
|}
|}
 
|-
=== Results ===
|Switch
None.
|Calls a switch object event handler function from the current area script.
 
|
== Game.LoadShot ==
 
{{Notice|type=warn|content=This function is unused and has not been tested, information regarding it may be inaccurate.}}
=== Description ===
Loads the specified enemy shot parameter list. This function was superseded by the game loading a static file from <code>enemy.arc</code> called <code>ShotParameter.bin</code>.
 
=== Signature ===
Game.LoadShot(path)
 
==== Parameters ====
{| class="wikitable"
{| class="wikitable"
|+
|+
!Parameter
!Field
!Type
!Type
!Description
!Description
!Required?
!Required?
|-
|-
|path
|eventID
|String
|String
|The path to the file to load.
|The name of the function.
|✔️
|✔️
|}
|-
 
|actorID
=== Results ===
|User Data
None.
|The actor that invoked the event handler.
 
|❌
== Game.DebugCommand ==
|-
 
|otherID
{{Notice|type=warn|content=This function is only used by test stages and has not been tested, information regarding it may be inaccurate.}}
|User Data
=== Description ===
|The other actor to mutate within the function (usually the player).
Executes a debug command.
|❌
 
|-
=== Signature ===
|on
Game.DebugCommand(command)
|Boolean
 
|The state of the switch.
==== Parameters ====
|✔️
|}
|-
|FixCamera
|Sets a new camera origin and looks at a specific point.
|
{| class="wikitable"
{| class="wikitable"
|+
|+
!Parameter
!Field
!Type
!Type
!Description
!Description
!Required?
!Required?
|-
|-
|command
|eye
|String
|Vector3
|The command to execute.
|The origin of the camera.
|✔️
|-
|target
|Vector3
|The direction the camera should look towards.
|✔️
|✔️
|}
|}
 
|-
==== Commands ====
|ControlPause
|Determines whether the player can pause the game.
|
{| class="wikitable"
{| class="wikitable"
|+
|+
!Name
!Field
!Parameters
!Type
!Description
!Description
!Required?
|-
|-
|shadowcameradist
|enabled
|Double
|Boolean
|Sets the shadow camera distance to the specified value.
|The enabled state of the pause menu.
|✔️
|}
|}
 
|-
=== Results ===
|NotifyRestart
None.
|Notifies the actor that the stage has been restarted.
 
|None.
== Game.LoadTimeLight ==
|-
 
|PsiEffect
{{Notice|type=warn|content=This function is unused and has not been tested, information regarding it may be inaccurate.}}
|Determines whether the specified actor uses the psychokinesis effect.
=== Description ===
|
Loads the specified Lua script containing the necessary tables and constants for time light parameters. This function expects a path to a <code>*.lub</code> file with a <code>*.lua</code> file extension.
 
=== Signature ===
Game.LoadTimeLight(path)
 
==== Parameters ====
{| class="wikitable"
{| class="wikitable"
|+
|+
!Parameter
!Field
!Type
!Type
!Description
!Description
!Required?
!Required?
|-
|-
|path
|effect
|String
|Boolean
|The path to the file to load.
|The enabled state of the effect.
|✔️
|✔️
|}
|}
 
|-
=== Results ===
|TornadoShoot
None.
|Shoots an object towards the specified actor.
 
|
== Game.ProcessMessage ==
 
=== Description ===
 
=== Signature ===
Game.ProcessMessage(actor_id, message_name)
Game.ProcessMessage(actor_id, message_name, {})
Game.ProcessMessage(actor_name, message_name)
Game.ProcessMessage(actor_name, message_name, {})
 
==== Parameters ====
{| class="wikitable"
{| class="wikitable"
|+
|+
!Parameter
!Field
!Type
!Type
!Description
!Description
!Required?
!Required?
|-
|-
|actor_id
|shootindex
|Number
|Number
|The ID of the actor to send the message to.
|The type of object to shoot.
|✔️
|✔️
|-
|-
|actor_name
|target
|String
|User Data
|The name of the actor to send the message to. Singletons for the level and player can be accessed by providing either <code>LEVEL</code> or <code>PLAYER</code> here.
|The actor to target.
|✔️
|✔️
|-
|-
|message_name
|targetposition
|Vector3
|The position to target.
|❌
|-
|time
|Number
|Unknown.
|❌
|-
|targetname
|String
|String
|The name of the message to send.
|The name of the actor to target.
|✔️
|-
|N/A
|Table
|The message data to send, if required.
|❌
|❌
|}
|}
==== Messages ====
{| class="wikitable"
|+
!Name
!Description
!Data
|-
|-
|Shoot
|PlaySE
|Shoots an object towards the specified actor.
|Plays a sound effect.
|
|
{| class="wikitable"
{| class="wikitable"
Line 1,374: Line 1,329:
!Required?
!Required?
|-
|-
|target
|bank
|User Data
|String
|The actor to target.
|The name of the sound bank.
|✔️
|✔️
|-
|-
|type
|id
|Unknown
|String
|Unknown.
|The name of the sound to play.
|
|✔️
|}
|}
|}
|-
 
|GateOpen
=== Results ===
|Opens a gate.
None.
| rowspan="2" |None.
 
|-
== Game.InternalMessage ==
|GateClose
 
|Closes a gate.
{{Notice|type=warn|content=This function is unused and has not been tested, information regarding it may be inaccurate.}}
|-
=== Description ===
|CallEvent
Unknown.
|Calls a generic event handler function from the current area script.
 
|
=== Signature ===
Game.InternalMessage(unknown)
 
==== Parameters ====
{| class="wikitable"
{| class="wikitable"
|+
|+
!Field
!Parameter
!Type
!Type
!Description
!Description
!Required?
!Required?
|-
|-
|eventID
|unknown
|String
|String
|The name of the function.
|Unknown.
|✔️
|✔️
|-
|actorID
|User Data
|The actor that invoked the event handler.
|❌
|-
|otherID
|User Data
|The other actor to mutate within the function (usually the player).
|❌
|}
|}
|-
 
|Switch
=== Results ===
|Calls a switch object event handler function from the current area script.
None.
|
 
== Game.SeparateRenderAndExecute ==
 
=== Description ===
Unknown.
 
=== Signature ===
Game.SeparateRenderAndExecute(unknown)
 
==== Parameters ====
{| class="wikitable"
{| class="wikitable"
|+
|+
!Field
!Parameter
!Type
!Type
!Description
!Description
!Required?
!Required?
|-
|-
|eventID
|unknown
|String
|Boolean
|The name of the function.
|Unknown.
|✔️
|✔️
|-
|}
|actorID
 
|User Data
=== Results ===
|The actor that invoked the event handler.
None.
|❌
 
|-
== Game.SetAreaName ==
|otherID
 
|User Data
=== Description ===
|The other actor to mutate within the function (usually the player).
Sets the area name for the current stage. This is overridden by <code>mission_area</code> in the [[Mission Parameters]].
|❌
 
|-
=== Signature ===
|on
Game.SetAreaName(name)
|Boolean
 
|The state of the switch.
==== Parameters ====
|✔️
|}
|-
|FixCamera
|Sets a new camera origin and looks at a specific point.
|
{| class="wikitable"
{| class="wikitable"
|+
|+
!Field
!Parameter
!Type
!Type
!Description
!Description
!Required?
!Required?
|-
|-
|eye
|name
|Vector3
|String
|The origin of the camera.
|The area name to use for the current stage.
|✔️
|-
|target
|Vector3
|The direction the camera should look towards.
|✔️
|✔️
|}
|}
|-
 
|ControlPause
=== Results ===
|Determines whether the player can pause the game.
None.
|
 
{| class="wikitable"
== Game.LoadPEBank ==
|+
 
!Field
{{Notice|type=warn|content=This function is unimplemented.}}
!Type
=== Description ===
!Description
Unknown.
!Required?
 
|-
=== Signature ===
|enabled
Unknown.
|Boolean
 
|The enabled state of the pause menu.
==== Parameters ====
|✔️
Unknown.
|}
 
|-
=== Results ===
|NotifyRestart
Unknown.
|Notifies the actor that the stage has been restarted.
 
|None.
== Game.PreloadPlayer ==
|-
 
|PsiEffect
{{Notice|type=warn|content=This function is unimplemented.}}
|Determines whether the specified actor uses the psychokinesis effect.
=== Description ===
|
Unknown.
{| class="wikitable"
 
|+
=== Signature ===
!Field
Game.PreloadPlayer()
!Type
 
!Description
==== Parameters ====
!Required?
Unknown.
|-
 
|effect
=== Results ===
|Boolean
Unknown.
|The enabled state of the effect.
 
|✔️
== Game.LoadCameraLib ==
|}
 
|-
{{Notice|type=warn|content=This function is unimplemented.}}
|TornadoShoot
=== Description ===
|Shoots an object towards the specified actor.
Unknown.
|
 
=== Signature ===
Unknown.
 
==== Parameters ====
Unknown.
 
=== Results ===
Unknown.
 
== Game.LoadCameraSet ==
 
{{Notice|type=warn|content=This function is unimplemented.}}
=== Description ===
This function expects a path to a <code>*.xml</code> file.
 
=== Signature ===
Game.LoadCameraSet(path)
 
==== Parameters ====
{| class="wikitable"
{| class="wikitable"
|+
|+
!Field
!Parameter
!Type
!Type
!Description
!Description
!Required?
!Required?
|-
|-
|shootindex
|path
|Number
|String
|The type of object to shoot.
|The path to the file to load.
|✔️
|-
|target
|User Data
|The actor to target.
|✔️
|✔️
|-
|targetposition
|Vector3
|The position to target.
|❌
|-
|time
|Number
|Unknown.
|❌
|-
|targetname
|String
|The name of the actor to target.
|❌
|}
|-
|PlaySE
|Plays a sound effect.
|
{| class="wikitable"
|+
!Field
!Type
!Description
!Required?
|-
|bank
|String
|The name of the sound bank.
|✔️
|-
|id
|String
|The name of the sound to play.
|✔️
|}
|}
|}


=== Results ===
=== Results ===
None.
Unknown.
 
== Game.LoadEntityLib ==


== Game.InternalMessage ==
{{Notice|type=warn|content=This function is unimplemented.}}
 
{{Notice|type=warn|content=This function is unused and has not been tested, information regarding it may be inaccurate.}}
=== Description ===
=== Description ===
Unknown.
Unknown.


=== Signature ===
=== Signature ===
Game.InternalMessage(unknown)
Unknown.


==== Parameters ====
==== Parameters ====
{| class="wikitable"
Unknown.
|+
!Parameter
!Type
!Description
!Required?
|-
|unknown
|String
|Unknown.
|✔️
|}


=== Results ===
=== Results ===
None.
Unknown.


== Game.SeparateRenderAndExecute ==
== Game.CreateCameraTornado ==


{{Notice|type=warn|content=This function is unimplemented.}}
=== Description ===
=== Description ===
Unknown.
Unknown.


=== Signature ===
=== Signature ===
Game.SeparateRenderAndExecute(unknown)
Unknown.


==== Parameters ====
==== Parameters ====
{| class="wikitable"
Unknown.
|+
 
!Parameter
=== Results ===
!Type
Unknown.
!Description
 
!Required?
== Game.CreateObjInfo ==
|-
|unknown
|Boolean
|Unknown.
|✔️
|}
 
=== Results ===
None.
 
== Game.SetAreaName ==


{{Notice|type=warn|content=This function is unimplemented.}}
=== Description ===
=== Description ===
Sets the area name for the current stage. This is overridden by <code>mission_area</code> in the [[Mission Parameters]].
Unknown.


=== Signature ===
=== Signature ===
  Game.SetAreaName(name)
  Game.CreateObjInfo(actor_type)


==== Parameters ====
==== Parameters ====
Line 1,634: Line 1,538:
!Required?
!Required?
|-
|-
|name
|actor_type
|String
|String
|The area name to use for the current stage.
|The type of actor to create info for.
|✔️
|✔️
|}
|}


=== Results ===
=== Results ===
None.
Unknown.


== Game.LoadPEBank ==
== Game.NewActor ==


{{Notice|type=warn|content=This function is unimplemented.}}
{{Notice|type=warn|content=This function is unimplemented.}}
Line 1,650: Line 1,554:


=== Signature ===
=== Signature ===
Unknown.
Game.NewActor(actor_type, {})


==== Parameters ====
==== Parameters ====
Unknown.
{| class="wikitable"
|+
!Parameter
!Type
!Description
!Required?
|-
|actor_type
|String
|The type of actor to create.
|✔️
|-
|N/A
|Table
|The set parameters for the actor.
|✔️
|}


=== Results ===
=== Results ===
Unknown.
A pointer to the actor that was created.


== Game.PreloadPlayer ==
== Game.LoadEvent ==


{{Notice|type=warn|content=This function is unimplemented.}}
{{Notice|type=warn|content=This function is unimplemented.}}
Line 1,665: Line 1,585:


=== Signature ===
=== Signature ===
  Game.PreloadPlayer()
  Game.LoadEvent(name)


==== Parameters ====
==== Parameters ====
{| class="wikitable"
|+
!Parameter
!Type
!Description
!Required?
|-
|name
|String
|The name of the event.
|✔️
|}
=== Results ===
Unknown.
Unknown.


=== Results ===
== Game.ChangeArea ==
Unknown.
 
== Game.LoadCameraLib ==


{{Notice|type=warn|content=This function is unimplemented.}}
{{Notice|type=warn|content=This function is unimplemented.}}
Line 1,688: Line 1,619:
Unknown.
Unknown.


== Game.LoadCameraSet ==
== Game.SetupWorld ==


{{Notice|type=warn|content=This function is unimplemented.}}
{{Notice|type=warn|content=This function is unimplemented.}}
=== Description ===
=== Description ===
This function expects a path to a <code>*.xml</code> file.
Unknown.


=== Signature ===
=== Signature ===
  Game.LoadCameraSet(path)
  Game.SetupWorld()


==== Parameters ====
==== Parameters ====
{| class="wikitable"
Unknown.
|+
 
!Parameter
=== Results ===
!Type
Unknown.
!Description
 
!Required?
== Game.DestroyWorld ==
|-
 
|path
{{Notice|type=warn|content=This function is unimplemented.}}
|String
=== Description ===
|The path to the file to load.
Unknown.
|✔️
 
|}
=== Signature ===
Game.DestroyWorld()
 
==== Parameters ====
Unknown.


=== Results ===
=== Results ===
Unknown.
Unknown.


== Game.LoadEntityLib ==
== Game.StartPlaying ==


{{Notice|type=warn|content=This function is unimplemented.}}
{{Notice|type=warn|content=This function is unimplemented.}}
Line 1,721: Line 1,656:


=== Signature ===
=== Signature ===
Unknown.
Game.StartPlaying()


==== Parameters ====
==== Parameters ====
Line 1,729: Line 1,664:
Unknown.
Unknown.


== Game.CreateCameraTornado ==
== Game.Retry ==


{{Notice|type=warn|content=This function is unimplemented.}}
{{Notice|type=warn|content=This function is unimplemented.}}
Line 1,736: Line 1,671:


=== Signature ===
=== Signature ===
Unknown.
Game.Retry()


==== Parameters ====
==== Parameters ====
Line 1,744: Line 1,679:
Unknown.
Unknown.


== Game.CreateObjInfo ==
== Game.End ==


{{Notice|type=warn|content=This function is unimplemented.}}
{{Notice|type=warn|content=This function is unimplemented.}}
Line 1,751: Line 1,686:


=== Signature ===
=== Signature ===
  Game.CreateObjInfo(actor_type)
  Game.End()


==== Parameters ====
==== Parameters ====
{| class="wikitable"
Unknown.
|+
!Parameter
!Type
!Description
!Required?
|-
|actor_type
|String
|The type of actor to create info for.
|✔️
|}


=== Results ===
=== Results ===
Unknown.
Unknown.


== Game.NewActor ==
= LuaSystem Subsystem =
These functions are provided by <code>Sonicteam::LuaSystem</code>.
 
== script.reload ==


{{Notice|type=warn|content=This function is unimplemented.}}
{{Notice|type=info|content=This function is an alias of [[#Game.ExecScript|<code>Game.ExecScript</code>]].}}
=== Description ===
=== Description ===
Unknown.
Loads and executes the specified Lua script. This function expects a path to a <code>*.lub</code> file with a <code>*.lua</code> file extension.


=== Signature ===
=== Signature ===
  Game.NewActor(actor_type, {})
  script.reload(path)


==== Parameters ====
==== Parameters ====
Line 1,787: Line 1,714:
!Required?
!Required?
|-
|-
|actor_type
|path
|String
|String
|The type of actor to create.
|The path to the script to execute.
|✔️
|✔️
|-
|}
|N/A
|Table
|The set parameters for the actor.
|✔️
|}


=== Results ===
=== Results ===
A pointer to the actor that was created.
None.
 
= EndingMode Subsystem =
These functions are provided by <code>Sonicteam::EndingMode</code>.


== Game.LoadEvent ==
== Text ==


{{Notice|type=warn|content=This function is unimplemented.}}
=== Description ===
=== Description ===
Unknown.
Creates a text entity for the staff roll.


=== Signature ===
=== Signature ===
  Game.LoadEvent(name)
  Text(mode, unknown_1, text_card, unknown_2)


==== Parameters ====
==== Parameters ====
Line 1,818: Line 1,742:
!Required?
!Required?
|-
|-
|name
|mode
|Pointer
|A pointer to <code>Sonicteam::EndingMode</code>.
|✔️
|-
|unknown_1
|Number
|This parameter is unimplemented. Usually 0.5.
|✔️
|-
|text_card
|String
|String
|The name of the event.
|The name of the text card in <code>staff.mst</code> to use.
|✔️
|✔️
|-
|unknown_2
|Number
|This parameter is unimplemented. Usually 500.
|❌
|}
|}


=== Results ===
=== Results ===
Unknown.
None.


== Game.ChangeArea ==
== Sprite ==


{{Notice|type=warn|content=This function is unimplemented.}}
=== Description ===
=== Description ===
Unknown.
Creates a CSD resource for the staff roll and initialises the specified scene.


=== Signature ===
=== Signature ===
Unknown.
Sprite(mode, unknown, csd_project, csd_scene)


==== Parameters ====
==== Parameters ====
Unknown.
{| class="wikitable"
 
|+
=== Results ===
!Parameter
Unknown.
!Type
 
!Description
== Game.SetupWorld ==
!Required?
 
|-
{{Notice|type=warn|content=This function is unimplemented.}}
|mode
|Pointer
|A pointer to <code>Sonicteam::EndingMode</code>.
|✔️
|-
|unknown
|Number
|Unknown. Always zero.
|✔️
|-
|csd_project
|String
|The path to the CSD project to load. This parameter expects a path to a <code>*.xncp</code> file without a file extension.
|✔️
|-
|csd_scene
|String
|The name of the CSD scene to use.
|✔️
|}
 
=== Results ===
None.
 
== Space ==
 
=== Description ===
=== Description ===
Unknown.
Adds a block of padding to the staff roll.


=== Signature ===
=== Signature ===
  Game.SetupWorld()
  Space(mode, offset)


==== Parameters ====
==== Parameters ====
Unknown.
{| class="wikitable"
|+
!Parameter
!Type
!Description
!Required?
|-
|mode
|Pointer
|A pointer to <code>Sonicteam::EndingMode</code>.
|✔️
|-
|offset
|Number
|The amount to offset the next text entity.
|✔️
|}


=== Results ===
=== Results ===
Unknown.
None.


== Game.DestroyWorld ==
== Section ==


{{Notice|type=warn|content=This function is unimplemented.}}
=== Description ===
=== Description ===
Unknown.
Creates a text entity to denote a new section of the staff roll.


=== Signature ===
=== Signature ===
  Game.DestroyWorld()
  Section(mode, unknown_1, text_card, unknown_2)


==== Parameters ====
==== Parameters ====
Unknown.
{| class="wikitable"
|+
!Parameter
!Type
!Description
!Required?
|-
|mode
|Pointer
|A pointer to <code>Sonicteam::EndingMode</code>.
|✔️
|-
|unknown_1
|Number
|This parameter is unimplemented. Usually 0.5.
|✔️
|-
|text_card
|String
|The name of the text card in <code>staff.mst</code> to use.
|✔️
|-
|unknown_2
|Number
|This parameter is unimplemented. Usually 500.
|❌
|}


=== Results ===
=== Results ===
Unknown.
None.


== Game.StartPlaying ==
== Subsection ==


{{Notice|type=warn|content=This function is unimplemented.}}
{{Notice|type=warn|content=This function is unused and has not been tested, information regarding it may be inaccurate.}}
=== Description ===
=== Description ===
Unknown.
Creates a text entity to denote a new subsection of the staff roll.


=== Signature ===
=== Signature ===
  Game.StartPlaying()
  Subsection(mode, unknown_1, text_card, unknown_2)


==== Parameters ====
==== Parameters ====
Unknown.
{| class="wikitable"
 
|+
=== Results ===
!Parameter
Unknown.
!Type
 
!Description
== Game.Retry ==
!Required?
 
|-
{{Notice|type=warn|content=This function is unimplemented.}}
|mode
=== Description ===
|Pointer
Unknown.
|A pointer to <code>Sonicteam::EndingMode</code>.
 
|✔️
=== Signature ===
|-
Game.Retry()
|unknown_1
 
|Number
==== Parameters ====
|This parameter is unimplemented.
Unknown.
|✔️
|-
|text_card
|String
|The name of the text card in <code>staff.mst</code> to use.
|✔️
|-
|unknown_2
|Number
|This parameter is unimplemented.
|❌
|}


=== Results ===
=== Results ===
Unknown.
None.
 
== Game.End ==
 
{{Notice|type=warn|content=This function is unimplemented.}}
=== Description ===
Unknown.
 
=== Signature ===
Game.End()
 
==== Parameters ====
Unknown.
 
=== Results ===
Unknown.

Revision as of 11:16, 14 April 2026

Warning
This list is a work in progress!
Info
When actors are referenced by name, they can be targeted on specific layers when formatted as {set_layer}:{actor_name} (without the brackets, of course). Otherwise, the actor names can be provided as-is.

GameScript Subsystem

These functions are provided by Sonicteam::GameScript.

Signal

Warning
This function is unused and has not been tested, information regarding it may be inaccurate.

Description

Unknown.

Signature

Signal({}, unknown)

Parameters

Parameter Type Description Required?
N/A Table Unknown. ✔️
unknown Number Unknown. Used as a message parameter.

Results

None.

Shoot

Warning
This function is unused and has not been tested, information regarding it may be inaccurate.

Description

Unknown.

Signature

Shoot({}, unknown)

Parameters

Parameter Type Description Required?
N/A Table Unknown. ✔️
unknown Unknown Unknown.

Results

None.

Game.Sleep

Description

Pauses script execution for the specified duration.

Signature

Game.Sleep(duration)

Parameters

Parameter Type Description Required?
duration Number The amount of time to sleep for. ✔️

Results

None.

Game.Log

Warning
This function is unimplemented.

Description

Logs text for debugging.

Signature

Game.Log(text)

Parameters

Parameter Type Description Required?
text String The text to log. ✔️

Results

Unknown.

Game.Debug

Warning
This function is unimplemented.

Description

Unknown.

Signature

Game.Debug()

Results

Unknown.

Game.ExecScript

Description

Loads and executes the specified Lua script. This function expects a path to a *.lub file with a *.lua file extension.

Signature

Game.ExecScript(path)

Parameters

Parameter Type Description Required?
path String The path to the script to execute. ✔️

Results

None.

Game.CreateObject

Description

Unknown.

Signature

Game.CreateObject(type, name, {})

Parameters

Parameter Type Description Required?
type String The type of object to create. ✔️
name String The name of the object. ✔️
N/A Table Unknown.

Results

A pointer to the object that was created.

Game.GetPlatform

Description

Gets the name of the platform the game is running on.

Signature

Game.GetPlatform()

Results

A string storing the name of the platform; "xbox360" for Xbox 360, "ps3" for PlayStation 3 and "pc" for Windows.

Game.LoadArc

Warning
This function is unimplemented.

Description

Unknown.

Signature

Unknown.

Parameters

Unknown.

Results

Unknown.

Game.AttachArc

Warning
This function is unimplemented.

Description

Unknown.

Signature

Unknown.

Parameters

Unknown.

Results

Unknown.

Game.DetachArc

Warning
This function is unimplemented.

Description

Unknown.

Signature

Unknown.

Parameters

Unknown.

Results

Unknown.

Game.StateChangeCallback

Description

Unknown.

Signature

Game.StateChangeCallback()

Results

None.

Game.SetPlayer

Description

Sets default player parameters for the stage. These are only used if the stage set does not provide player start objects.

Signature

Game.SetPlayer(x, y, z, yaw, player_name, player_no, amigo)

Parameters

Parameter Type Description Required?
x Number The default X position of the player. ✔️
y Number The default Y position of the player. ✔️
z Number The default Z position of the player. ✔️
yaw Number The default yaw rotation of the player in degrees. ✔️
player_name String The file name of the player script. ✔️
player_no Number The identifier of the player object.
amigo Boolean Determines whether the player object is for an amigo.

Results

None.

Game.StartEntityByName

Description

Starts the specified entity that was spawned in as inactive.

Signature

Game.StartEntityByName(name)

Parameters

Parameter Type Description Required?
name String The name of the entity to start. ✔️

Results

None.

Game.Signal

Description

Sends a signal message to the specified entity.

Signature

Game.Signal(name)
Game.Signal(name, unknown)

Parameters

Parameter Type Description Required?
name String The name of the entity to signal. ✔️
unknown Number This parameter is unimplemented. It was likely used for optional data to pass to the message receiver. It isn't used by any of the scripts in the game.

Results

None.

Game.PlayBGM

Description

Plays the specified sound bank entry from bgm.sbk as background music for the stage. This is overridden by mission_bgm in the Mission Parameters.

Signature

Game.PlayBGM(name)

Parameters

Parameter Type Description Required?
name String The name of the sound bank entry. ✔️

Results

None.

Game.StopBGM

Description

Stops the current background music in the stage.

Signature

Game.StopBGM()

Results

None.

Game.SetGenArea

Description

Sets the bounding box for entities to spawn within.

Signature

Game.SetGenArea({})

Parameters

Parameter Type Description Required?
N/A Table
Field Type Description Required?
type Number Unknown.
size Table The size of the area. ✔️
offset Table The offset of the area.
border Number Unknown.
cameraoffset Table The offset of the area relative to the camera.
✔️

Results

None.

Game.LoadTerrain

Description

Loads all of the terrain models and collision from the specified directory. This is overridden by mission_terrain in the Mission Parameters.

Signature

Game.LoadTerrain(path)
Game.LoadTerrain(path, optimize_world)

Parameters

Parameter Type Description Required?
path String The path to load from. ✔️
optimize_world Boolean This feature is unimplemented. It was likely intended for Havok optimizations.

Results

None.

Game.LoadSky

Description

Loads the sky model from the specified directory.

Signature

Game.LoadSky(path)

Parameters

Parameter Type Description Required?
path String The path to load from. ✔️

Results

None.

Game.LoadStageSet

Description

Loads the specified stage set. This function expects a path to a *.set file with a *.xml file extension.

Signature

Game.LoadStageSet(path)
Game.LoadStageSet(path, layer)

Parameters

Parameter Type Description Required?
path String The path to the file to load. ✔️
layer String The name of the set layer.

Set Layers

Name Description
default The default layer used when no layer is specified.
design The layer used for additional details.
particle The layer used for particle effects.
test The layer used for testing purposes.
area The layer used for area design that is usually static between new layouts.
pathobj The layer used for common_path_obj objects.

Results

None.

Game.LoadPath

Description

Loads the specified spline path. This function expects a path to a *.path file without a file extension.

Signature

Game.LoadPath(path)
Game.LoadPath(path, layer)

Parameters

Parameter Type Description Required?
path String The path to the file to load. ✔️
layer String The name of the path layer.

Path Layers

Name Description
(null) The default layer used when no layer is specified.
grind The layer used for grind rails.
guide The layer used for guide paths for loops and surfaces that move the player forwards only.
pathobj The layer used for common_path_obj objects.
physicspath The layer used for physicspath objects. This layer is unused and said objects tend to use the default layer.

Results

None.

Game.LoadParticle

Description

Loads the specified particle container. This function expects a path to a *.plc file.

Signature

Game.LoadParticle(path)

Parameters

Parameter Type Description Required?
path String The path to the file to load. ✔️

Results

None.

Game.LoadSceneParams

Description

Loads the specified Lua script containing the necessary tables for Scene Parameters. This function expects a path to a *.lub file with a *.lua file extension.

Signature

Game.LoadSceneParams(path)

Parameters

Parameter Type Description Required?
path String The path to the file to load. ✔️

Results

None.

Game.LoadLight

Warning
This function is only used by a test stage and has not been tested, information regarding it may be inaccurate.

Description

Loads the specified Lua script containing the necessary tables for light parameters. This function expects a path to a *.lub file with a *.lua file extension.

Signature

Game.LoadLight(path)

Parameters

Parameter Type Description Required?
path String The path to the file to load. ✔️

Results

None.

Game.LoadSceneEnvMap

Description

Loads the specified texture to use as the environment map for the stage. This function was superseded by the EnvMap table in the Scene Parameters.

Signature

Game.LoadSceneEnvMap(path)

Parameters

Parameter Type Description Required?
path String The path to the file to load. ✔️

Results

None.

Game.LoadReflectionAreas

Warning
This function is unused and has not been tested, information regarding it may be inaccurate.

Description

Loads the specified reflection area. This function expects a path to a *.rab file. This function was superseded by the ReflectionAreas table in the Scene Parameters.

Signature

Game.LoadReflectionAreas(path)

Parameters

Parameter Type Description Required?
path String The path to the file to load. ✔️

Results

None.

Game.LoadSoundBank

Description

Loads the specified sound bank for stage-specific sound effects. This function expects a path to a *.sbk file without a file extension.

Signature

Game.LoadSoundBank(path)

Parameters

Parameter Type Description Required?
path String The path to the file to load. ✔️

Results

None.

Game.LoadVoiceBank

Description

Loads the specified sound bank for stage-specific voice clips. This function expects a path to a *.sbk file without the file extension. The specified sound bank must have a _e suffix, the game will automatically locate the Japanese sound bank if it's present.

Signature

Game.LoadVoiceBank(path)

Parameters

Parameter Type Description Required?
path String The path to the file to load. ✔️

Results

None.

Game.LoadCameraParam

Description

Loads the specified Lua script containing the necessary constants for camera parameters. This function expects a path to a *.lub file with a *.lua file extension.

Signature

Game.LoadCameraParam(path)

Parameters

Parameter Type Description Required?
path String The path to the file to load. ✔️

Results

None.

Game.LoadRenderScript

Description

Loads the specified Lua script containing the necessary functions and constants for a render script. This function expects a path to a *.lub file with a *.lua file extension.

Signature

Game.LoadRenderScript(path)

Parameters

Parameter Type Description Required?
path String The path to the file to load. ✔️

Results

None.

Game.LoadKynapse

Description

Loads the specified Kynapse Big File for AI agent parameters, navigation meshes and spatial graphs. This function expects a path to a *.kbf file.

Signature

Game.LoadKynapse(path)

Parameters

Parameter Type Description Required?
path String The path to the file to load. ✔️

Results

None.

Game.LoadTownsmanInfo

Description

Loads the specified Lua script containing the necessary tables and constants for NPC info. This function expects a path to a *.lub file with a *.lua file extension.

Signature

Game.LoadTownsmanInfo(path)

Parameters

Parameter Type Description Required?
path String The path to the file to load. ✔️

Results

None.

Game.LoadRaderMap

Description

Loads the specified package for the radar model. This function expects a path to a *.pkg file without a file extension.

Signature

Game.LoadRaderMap(path)

Parameters

Parameter Type Description Required?
path String The path to the file to load. ✔️

Results

None.

Game.LoadObjectPhysics

Warning
This function is unused and has not been tested, information regarding it may be inaccurate.

Description

Loads the specified object physics parameter list. This function was superseded by the game loading a static file from object.arc called Common.bin.

Signature

Game.LoadObjectPhysics(path)

Parameters

Parameter Type Description Required?
path String The path to the file to load. ✔️

Results

None.

Game.LoadExplosion

Warning
This function is unused and has not been tested, information regarding it may be inaccurate.

Description

Loads the specified object explosion parameter list. This function was superseded by the game loading a static file from object.arc called Explosion.bin.

Signature

Game.LoadExplosion(path)

Parameters

Parameter Type Description Required?
path String The path to the file to load. ✔️

Results

None.

Game.LoadEnemy

Warning
This function is unused and has not been tested, information regarding it may be inaccurate.

Description

Loads the specified enemy parameter list. This function was superseded by the game loading a static file from enemy.arc called ScriptParameter.bin.

Signature

Game.LoadEnemy(path)

Parameters

Parameter Type Description Required?
path String The path to the file to load. ✔️

Results

None.

Game.LoadShot

Warning
This function is unused and has not been tested, information regarding it may be inaccurate.

Description

Loads the specified enemy shot parameter list. This function was superseded by the game loading a static file from enemy.arc called ShotParameter.bin.

Signature

Game.LoadShot(path)

Parameters

Parameter Type Description Required?
path String The path to the file to load. ✔️

Results

None.

Game.DebugCommand

Warning
This function is only used by test stages and has not been tested, information regarding it may be inaccurate.

Description

Executes a debug command.

Signature

Game.DebugCommand(command)

Parameters

Parameter Type Description Required?
command String The command to execute. ✔️

Commands

Name Parameters Description
shadowcameradist Double Sets the shadow camera distance to the specified value.

Results

None.

Game.LoadTimeLight

Warning
This function is unused and has not been tested, information regarding it may be inaccurate.

Description

Loads the specified Lua script containing the necessary tables and constants for time light parameters. This function expects a path to a *.lub file with a *.lua file extension.

Signature

Game.LoadTimeLight(path)

Parameters

Parameter Type Description Required?
path String The path to the file to load. ✔️

Results

None.

Game.ProcessMessage

Description

Signature

Game.ProcessMessage(actor_id, message_name)
Game.ProcessMessage(actor_id, message_name, {})
Game.ProcessMessage(actor_name, message_name)
Game.ProcessMessage(actor_name, message_name, {})

Parameters

Parameter Type Description Required?
actor_id Number The ID of the actor to send the message to. ✔️
actor_name String The name of the actor to send the message to. Singletons for the level and player can be accessed by providing either LEVEL or PLAYER here. ✔️
message_name String The name of the message to send. ✔️
N/A Table The message data to send, if required.

Messages

Name Description Data
Shoot Shoots an object towards the specified actor.
Field Type Description Required?
target User Data The actor to target. ✔️
type Unknown Unknown.
GateOpen Opens a gate. None.
GateClose Closes a gate.
CallEvent Calls a generic event handler function from the current area script.
Field Type Description Required?
eventID String The name of the function. ✔️
actorID User Data The actor that invoked the event handler.
otherID User Data The other actor to mutate within the function (usually the player).
Switch Calls a switch object event handler function from the current area script.
Field Type Description Required?
eventID String The name of the function. ✔️
actorID User Data The actor that invoked the event handler.
otherID User Data The other actor to mutate within the function (usually the player).
on Boolean The state of the switch. ✔️
FixCamera Sets a new camera origin and looks at a specific point.
Field Type Description Required?
eye Vector3 The origin of the camera. ✔️
target Vector3 The direction the camera should look towards. ✔️
ControlPause Determines whether the player can pause the game.
Field Type Description Required?
enabled Boolean The enabled state of the pause menu. ✔️
NotifyRestart Notifies the actor that the stage has been restarted. None.
PsiEffect Determines whether the specified actor uses the psychokinesis effect.
Field Type Description Required?
effect Boolean The enabled state of the effect. ✔️
TornadoShoot Shoots an object towards the specified actor.
Field Type Description Required?
shootindex Number The type of object to shoot. ✔️
target User Data The actor to target. ✔️
targetposition Vector3 The position to target.
time Number Unknown.
targetname String The name of the actor to target.
PlaySE Plays a sound effect.
Field Type Description Required?
bank String The name of the sound bank. ✔️
id String The name of the sound to play. ✔️

Results

None.

Game.InternalMessage

Warning
This function is unused and has not been tested, information regarding it may be inaccurate.

Description

Unknown.

Signature

Game.InternalMessage(unknown)

Parameters

Parameter Type Description Required?
unknown String Unknown. ✔️

Results

None.

Game.SeparateRenderAndExecute

Description

Unknown.

Signature

Game.SeparateRenderAndExecute(unknown)

Parameters

Parameter Type Description Required?
unknown Boolean Unknown. ✔️

Results

None.

Game.SetAreaName

Description

Sets the area name for the current stage. This is overridden by mission_area in the Mission Parameters.

Signature

Game.SetAreaName(name)

Parameters

Parameter Type Description Required?
name String The area name to use for the current stage. ✔️

Results

None.

Game.LoadPEBank

Warning
This function is unimplemented.

Description

Unknown.

Signature

Unknown.

Parameters

Unknown.

Results

Unknown.

Game.PreloadPlayer

Warning
This function is unimplemented.

Description

Unknown.

Signature

Game.PreloadPlayer()

Parameters

Unknown.

Results

Unknown.

Game.LoadCameraLib

Warning
This function is unimplemented.

Description

Unknown.

Signature

Unknown.

Parameters

Unknown.

Results

Unknown.

Game.LoadCameraSet

Warning
This function is unimplemented.

Description

This function expects a path to a *.xml file.

Signature

Game.LoadCameraSet(path)

Parameters

Parameter Type Description Required?
path String The path to the file to load. ✔️

Results

Unknown.

Game.LoadEntityLib

Warning
This function is unimplemented.

Description

Unknown.

Signature

Unknown.

Parameters

Unknown.

Results

Unknown.

Game.CreateCameraTornado

Warning
This function is unimplemented.

Description

Unknown.

Signature

Unknown.

Parameters

Unknown.

Results

Unknown.

Game.CreateObjInfo

Warning
This function is unimplemented.

Description

Unknown.

Signature

Game.CreateObjInfo(actor_type)

Parameters

Parameter Type Description Required?
actor_type String The type of actor to create info for. ✔️

Results

Unknown.

Game.NewActor

Warning
This function is unimplemented.

Description

Unknown.

Signature

Game.NewActor(actor_type, {})

Parameters

Parameter Type Description Required?
actor_type String The type of actor to create. ✔️
N/A Table The set parameters for the actor. ✔️

Results

A pointer to the actor that was created.

Game.LoadEvent

Warning
This function is unimplemented.

Description

Unknown.

Signature

Game.LoadEvent(name)

Parameters

Parameter Type Description Required?
name String The name of the event. ✔️

Results

Unknown.

Game.ChangeArea

Warning
This function is unimplemented.

Description

Unknown.

Signature

Unknown.

Parameters

Unknown.

Results

Unknown.

Game.SetupWorld

Warning
This function is unimplemented.

Description

Unknown.

Signature

Game.SetupWorld()

Parameters

Unknown.

Results

Unknown.

Game.DestroyWorld

Warning
This function is unimplemented.

Description

Unknown.

Signature

Game.DestroyWorld()

Parameters

Unknown.

Results

Unknown.

Game.StartPlaying

Warning
This function is unimplemented.

Description

Unknown.

Signature

Game.StartPlaying()

Parameters

Unknown.

Results

Unknown.

Game.Retry

Warning
This function is unimplemented.

Description

Unknown.

Signature

Game.Retry()

Parameters

Unknown.

Results

Unknown.

Game.End

Warning
This function is unimplemented.

Description

Unknown.

Signature

Game.End()

Parameters

Unknown.

Results

Unknown.

LuaSystem Subsystem

These functions are provided by Sonicteam::LuaSystem.

script.reload

Info
This function is an alias of Game.ExecScript.

Description

Loads and executes the specified Lua script. This function expects a path to a *.lub file with a *.lua file extension.

Signature

script.reload(path)

Parameters

Parameter Type Description Required?
path String The path to the script to execute. ✔️

Results

None.

EndingMode Subsystem

These functions are provided by Sonicteam::EndingMode.

Text

Description

Creates a text entity for the staff roll.

Signature

Text(mode, unknown_1, text_card, unknown_2)

Parameters

Parameter Type Description Required?
mode Pointer A pointer to Sonicteam::EndingMode. ✔️
unknown_1 Number This parameter is unimplemented. Usually 0.5. ✔️
text_card String The name of the text card in staff.mst to use. ✔️
unknown_2 Number This parameter is unimplemented. Usually 500.

Results

None.

Sprite

Description

Creates a CSD resource for the staff roll and initialises the specified scene.

Signature

Sprite(mode, unknown, csd_project, csd_scene)

Parameters

Parameter Type Description Required?
mode Pointer A pointer to Sonicteam::EndingMode. ✔️
unknown Number Unknown. Always zero. ✔️
csd_project String The path to the CSD project to load. This parameter expects a path to a *.xncp file without a file extension. ✔️
csd_scene String The name of the CSD scene to use. ✔️

Results

None.

Space

Description

Adds a block of padding to the staff roll.

Signature

Space(mode, offset)

Parameters

Parameter Type Description Required?
mode Pointer A pointer to Sonicteam::EndingMode. ✔️
offset Number The amount to offset the next text entity. ✔️

Results

None.

Section

Description

Creates a text entity to denote a new section of the staff roll.

Signature

Section(mode, unknown_1, text_card, unknown_2)

Parameters

Parameter Type Description Required?
mode Pointer A pointer to Sonicteam::EndingMode. ✔️
unknown_1 Number This parameter is unimplemented. Usually 0.5. ✔️
text_card String The name of the text card in staff.mst to use. ✔️
unknown_2 Number This parameter is unimplemented. Usually 500.

Results

None.

Subsection

Warning
This function is unused and has not been tested, information regarding it may be inaccurate.

Description

Creates a text entity to denote a new subsection of the staff roll.

Signature

Subsection(mode, unknown_1, text_card, unknown_2)

Parameters

Parameter Type Description Required?
mode Pointer A pointer to Sonicteam::EndingMode. ✔️
unknown_1 Number This parameter is unimplemented. ✔️
text_card String The name of the text card in staff.mst to use. ✔️
unknown_2 Number This parameter is unimplemented.

Results

None.

Cookies help us deliver our services. By using our services, you agree to our use of cookies.