Sonic Frontiers Script Functions
Functions are listed below in the following format:
Function(arguments, ...) : returnType
ποΈ AchivementUnlock(string, number)
Description
Unlocks an achievement.
Parameters
- (string, number): Name of the achievement to unlock
- (string, number): Unknown...
ποΈ ActivityComplete(number) : unknown
Description
This function has no callback function.
Parameters
Unknown...
Return Value
Unknown...
ποΈ ActivityStart(number) : unknown
Description
Parameters
Return Value
ποΈ ActivityTaskComplete(number, number) : unknown
Description
Parameters
Return Value
ποΈ ActivityTaskEnd() : unknown
Description
This function is unused and has no callback function.
Parameters
Unknown...
Return Value
Unknown...
ποΈ ActivityTaskStart(number, number) : unknown
Description
Parameters
Return Value
ποΈ AddPracticeNotifierPermissionDeny(string) : unknown
Description
Parameters
Return Value
ποΈ AutoSave(string)
Description
Saves the current game data into the autosave slot.
Parameters
- (string): Save mode
Mode | Description |
---|---|
forceimmediate | The most common and seemingly default save mode. |
immediate | Unknown... |
ποΈ BeginTalkMode(string) : unknown
Description
Parameters
Return Value
ποΈ ChangeEventCamera(string)
Description
Change to an event camera.
Parameters
- (string): Camera name
ποΈ ChangeMotion(string)
Description
Changes animations for dialogue events.
Parameters
- (string): Animation name
Name |
---|
happy |
no |
rod |
take |
talk |
talk_start |
think |
yes |
ποΈ ChangePlayerAnimInHold(string, number) : yield
Description
Plays an animation from an *.asm
file using the friendly (upper-case) name when the player is frozen using HoldPlayer().
Parameters
- (string, string): Animation name
- (string, number): Duration (seconds)
ποΈ ChangePlayerMotion(string, number) : yield
Description
Plays an animation from an *.asm
file using the friendly (upper-case) name where available.
Parameters
- (string, string): Animation name
- (string, number): Duration (seconds)
ποΈ ChangeSavePermission(string)
Description
Toggles whether the player has permission to save.
Parameters
- (string): Permission state
State |
---|
allow |
deny |
ποΈ ChangeWeather(number, string)
Description
Changes the current weather.
Parameters
- (number, string): Unknown...
- (number, string): Weather name
Name |
---|
Cloudy |
Rainy |
SandStorm |
Sunny |
ποΈ ClearIsland()
Description
Sets the cleared state of the current island and proceeds to the next.
ποΈ ClearObjectTarget() : unknown
Description
Parameters
Return Value
ποΈ ClearPracticeNotifier() : yield
Description
Clears the Training Simulator notification on the top-right of the heads-up display.
ποΈ ClearQuestTarget() : unknown
Description
Parameters
Return Value
ποΈ ClearTutorialUI(boolean) : unknown
Description
Parameters
Return Value
ποΈ ClearUserGuidUI() : yield
Description
Clears an input guide.
ποΈ DebugPrint() : number
Description
This function is unused and has a stripped callback function.
Parameters
Unknown...
Return Value
Unknown...
ποΈ DeletePracticeNotifierPermissionDeny(string) : unknown
Description
Parameters
Return Value
ποΈ EndLetterBoxUI() : unknown
Description
This function is unused.
Parameters
Unknown...
Return Value
Unknown...
ποΈ EndTalkMode() : unknown
Description
Parameters
Return Value
ποΈ EndTimeGimmick() : unknown
Description
Parameters
Return Value
ποΈ Exit()
Description
Ends the current script sequence.
ποΈ FadeIn(number)
Description
Fades the screen into gameplay from black within the specified duration.
Parameters
- (number): Duration (seconds) (optional)
ποΈ FadeOut(number, string) : yield
Description
Fades the screen out within the specified duration.
Parameters
- (number, string): Duration (seconds) (optional)
- (number, string): Colour type (optional)
Colours |
---|
black (default) |
white |
ποΈ GetBlock() : number
Description
Gets the current internal block ID for Lua conditions within update functions.
Return Value
The current block ID.
ποΈ GetChaosEmerald(string) : unknown
Description
Parameters
Return Value
ποΈ GetChaosEmeraldNum() : number
Description
Gets the total number of Chaos Emeralds.
Return Value
The total number of Chaos Emeralds.
ποΈ GetClearTowerNum() : unknown
Description
Parameters
Return Value
ποΈ GetDebugFlag(string) : number
Description
Gets the value of any flag Sonic Team wants to check within Lua scripts.
Parameters
- (string): Flag name
Name |
---|
isTutorialEnable |
Return Value
The value of the requested flag.
ποΈ GetGuardLevel(number) : number
Description
Parameters
Return Value
ποΈ GetHackingAliveEnemyNum() : unknown
Description
This function is unused.
Parameters
Unknown...
Return Value
Unknown...
ποΈ GetHackingCurrentWaveId() : unknown
Description
Parameters
Return Value
ποΈ GetHasChaosEmeraldNum() : number
Description
Gets the total number of currently obtained Chaos Emeralds.
Return Value
The total number of currently obtained Chaos Emeralds.
ποΈ GetMaxGuardLevel() : number
Description
Parameters
Return Value
ποΈ GetMaxPowerLevel(number) : number
Description
Parameters
Return Value
ποΈ GetMaxRingLevel() : number
Description
Parameters
Return Value
ποΈ GetMaxSpeedLevel() : number
Description
Parameters
Return Value
ποΈ GetMinigameQuestProgress(string) : unknown
Description
Parameters
Return Value
ποΈ GetObjStatus(string, number, number) : boolean
Description
Parameters
Return Value
ποΈ GetPinballStatus(string) : unknown
Description
Parameters
Return Value
ποΈ GetPlayerItemInfo(string) : number
Description
Parameters
Return Value
ποΈ GetPlayerStatus(string) : number
Description
Returns the value of status flags for the player.
Parameters
- (string): Flag name
Name | Description |
---|---|
Hold | Checks if the player is frozen via HoldPlayer() |
OnGround | Checks if the player is grounded |
Return Value
A 0/1 number representing the requested state.
ποΈ GetPowerLevel(number) : number
Description
Parameters
Return Value
ποΈ GetPowerupRequiredKodamaNum() : unknown
Description
This function is unused.
Parameters
Unknown...
Return Value
Unknown...
ποΈ GetRingLevel(number) : number
Description
Parameters
Return Value
ποΈ GetSelectResult(number) : number
Description
Parameters
Return Value
ποΈ GetSpeedLevel(number) : number
Description
Parameters
Return Value
ποΈ GetValue(string, number) : number
Description
Get the value of a flag based on the flag name and flag number.
Parameters
- (string, number): Flag name
- (string, number): Flag number
Return Value
The value of the requested flag.
ποΈ GiantOrbReleaseTemporarilyReset() : unknown
Description
Parameters
Return Value
ποΈ GiantOrbTemporarilyReset() : unknown
Description
Parameters
Return Value
ποΈ GoToCyberStage(string) : yield
Description
This function is unused.
Parameters
Unknown...
ποΈ HideObjectInEvent(string)
Description
Hides the specified object during an event.
Parameters
- (string): Object name
ποΈ HoldPlayer()
Description
Disables player movement.
ποΈ IsAvailableKodamaElderLvUp() : boolean
Description
Parameters
Return Value
ποΈ IsHackingCurrentWaveIdInRange(number, number) : unknown
Description
Parameters
Return Value
ποΈ IsInScreenView(string, number, number) : boolean
Description
Parameters
Return Value
ποΈ IsLoadingLevel() : number
Description
Returns whether a level is actively being loaded via the LoadLevel() function for pausing the script until it's finished.
Return Value
A 0/1 number representing if a level is being loaded.
ποΈ IsPlayingDiEvent(string) : number
Description
Returns whether the specified event is currently playing.
Parameters
- (string): Event name
Return Value
A 0/1 number representing if the specified event is currently playing.
ποΈ IsPlayingDiEventAll() : number
Description
Returns whether any event is playing.
Return Value
A 0/1 number representing if any event is playing.
ποΈ IsPlayingQuest() : unknown
Description
Parameters
Return Value
ποΈ KillPinballObjects() : unknown
Description
Parameters
Return Value
ποΈ LoadDiEvent(string) : unknown
Description
Parameters
Return Value
ποΈ LoadDiEventFrozen(string) : unknown
Description
Parameters
Return Value
ποΈ LoadLevel(string) : unknown
Description
Loads an archive (*.pac
) using its respective *.level
file.
Parameters
- (string): Level name
ποΈ MakeElectricLine(string) : unknown
Description
Parameters
Return Value
ποΈ MovedPlayer(string) : unknown
Description
Parameters
Return Value
ποΈ NextBlock(number) : unknown
Description
Parameters
Return Value
ποΈ NextSequence(number)
Description
Exits the current script sequence and loads the next one via the input ID.
Parameters
- (number): Sequence ID
ποΈ NotifyAction(string, string)
Description
Sends a message to the specified object in the *.gedit
files. Typically used to turn camera volumes on or off.
Parameters
- (string, string): Internal name of the object to signal.
- (string, string): Message to send to the object.
Name | Description |
---|---|
on | Activates the object. |
off | Deactivates the object. |
start | Unknown... |
ποΈ PlayDiEvent(string) : unknown
Description
Parameters
Return Value
ποΈ PlayDiEventFrozen(string) : unknown
Description
Parameters
Return Value
ποΈ PlayerGetItem(string, number)
Description
Gives the player a specific number of specific items.
Parameters
- (string, number): Item name
- (string, number): Item count
Name |
---|
Ring |
ExpPoint |
ποΈ PlayerNonOperation() : yield
Description
Disables player movement.
ποΈ PlayVoice(string) : unknown
Description
Parameters
Return Value
ποΈ QuitMinigameQuest() : unknown
Description
Parameters
Return Value
ποΈ ReleaseHoldPlayer()
Description
Enables player movement.
ποΈ ReleasePresentSkill(string) : unknown
Description
Parameters
Return Value
ποΈ ResetCamera()
Description
Restores the player-operated camera.
ποΈ ResetMenuDisabledMinigameQuest() : unknown
Description
Parameters
Return Value
ποΈ ResetPinball() : unknown
Description
Parameters
Return Value
ποΈ ResetWeather(number) : unknown
Description
Parameters
Return Value
ποΈ Save() : yield
Description
Parameters
ποΈ SetBossKnightLayerEnabled(boolean) : unknown
Description
Parameters
Return Value
ποΈ SetHackingBulletPatternGlobalVelTimes(number) : unknown
Description
Parameters
Return Value
ποΈ SetHackingBulletPatternVelRange(number, number) : unknown
Description
Parameters
Return Value
ποΈ SetHUDEnabled(string, boolean)
Description
Toggles whether certain menus are available to the player.
Parameters
- (string, boolean): Menu name
Name | Description |
---|---|
MainMenu | Toggles access to the pause menu. |
MapMenu | Toggles access to the map screen. |
- (string, boolean): Enabled
ποΈ SetLayerEnabled(string, boolean)
Description
Toggles whether an object layout layer is visible.
Parameters
- (string, boolean): Layer name
- (string, boolean): Enabled
ποΈ SetLayerEnabledInEvent(string, boolean)
Description
Toggles whether an object layout layer is visible during an event.
Parameters
- (string, boolean): Layer name
- (string, boolean): Enabled
ποΈ SetLookAt(number, number, number)
Description
Forces the camera to always look towards the specified position.
Parameters
- (number, number, number): X
- (number, number, number): Y
- (number, number, number): Z
ποΈ SetMenuDisabledMinigameQuest(string) : unknown
Description
Parameters
Return Value
ποΈ SetObjStatus(string, number, number) : unknown
Description
Parameters
Return Value
ποΈ SetPlayerAbilityEnabled(string, boolean)
Description
Toggles whether the specified ability can be used by the player.
Parameters
- (string, boolean): Ability name
Name | Description |
---|---|
Boost | Toggles the ability to boost. |
ComboAttack | Toggles the ability to perform combo attacks. |
ControlCamera | Toggles the ability to move the camera. |
Cyloop | Toggles the ability to perform Cyloop. |
HomingAttack | Toggles the ability to homing attack. |
Jump | Toggles the ability to jump. |
Lockon | Toggles the ability to lock onto enemies. |
Parry | Toggles the ability to parry. |
WallAction | Toggles the ability to climb walls. |
- (string, boolean): Value
ποΈ SetTime(number, number)
Description
Sets the current time.
Parameters
- (number, number): Hour
- (number, number): Minute
ποΈ SetTimePause(boolean)
Description
Toggles the passage of time.
Parameters
- (boolean): Enabled
ποΈ SetValue(string, number, number)
Description
Sets a value for the specified flag.
Parameters
- (string, number, number): Flag name
- (string, number, number): Flag number
- (string, number, number): Value
ποΈ SetVisibleKodama(string)
Description
This function does not work.
Parameters
- (string): Visibility state
States |
---|
hide |
show |
ποΈ ShootBulletPattern(string)
Description
Shoots a pre-defined pattern of bullets for the Hacking minigame.
Parameters
- (string): Pattern name
ποΈ ShowHeaderWindowUI(string, string)
Description
Displays a dialog using a caption and body entry from a *.cnvrs-text
file.
Parameters
- (string, string): Caption name
- (string, string): Body name
ποΈ ShowObjectTarget(string) : unknown
Description
Parameters
Return Value
ποΈ ShowPracticeNotifier(number, number, number) : unknown
Description
Parameters
Return Value
ποΈ ShowQuestTarget(string) : unknown
Description
Parameters
Return Value
ποΈ ShowRobberTargetUI() : unknown
Description
Parameters
Return Value
ποΈ ShowSelectBox(string, string, string, string) : unknown
Description
Parameters
Return Value
ποΈ ShowSelectBoxNoWaitVoice(string, string, string, string, string) : unknown
Description
Parameters
Return Value
ποΈ ShowSequenceUI(string)
Description
Displays a menu depending on the current sequence.
Parameters
- (string): Menu name
Name | Description |
---|---|
MainMenu | Unknown... |
MainMenu_ForTutorial | Displays the pause menu for highlighting the Cyloop skill. |
MapMenu | Unknown... |
PauseMenu | Unknown... |
ποΈ ShowTalkCaption(string)
Description
Parameters
ποΈ ShowTalkCaptionOverFade(string) : yield
Description
This function is unused.
Parameters
Unknown...
Return Value
Unknown...
ποΈ ShowToastUI(string) : unknown
Description
Parameters
Return Value
ποΈ ShowTutorialUI(string, string) : unknown
Description
Parameters
Return Value
ποΈ ShowUserGuidUI(string)
Description
Displays an input guide for the specified control method.
Parameters
- (string): Name
Notice
Only three of these are actually used, as Sonic Team moved to using internal methods for displaying these guides, rather than using Lua.
Some names are unknown as they use string hashes that have no source yet.
Name | Internal ID | Description |
---|---|---|
CameraControl | 0 | Displays a graphic for the right stick with the text "Camera". |
Unknown... | 1 | Displays a quad direction graphic with no text. |
Jump (unused) | 2 | Displays a graphic for the A button with no text. |
Boost (unused) | 3 | Displays a graphic for the right trigger with no text. |
HomingAttack | 4 | Displays a graphic for the X button with the text "Homing Attack". |
Lockon (unused) | 5 | Displays a graphic for the right stick button with the text "Lock On". |
Cyloop (unused) | 6 | Displays a graphic for the Y button with the text "Cyloop (while moving)". |
CyloopBattle | 7 | Displays a graphic for the Y button with the text "Cyloop (while moving)". |
Unknown... | 8 | Displays a graphic for the left bumper with no text. |
WallRun (unused) | 9 | Displays two graphics, one with a quad direction graphic with the text "Climb", and another with a graphic for the right trigger with the text "Wall Run (while climbing)". |
Boarding (unused) | 10 | Displays two graphics, one with a quad direction graphic with the text "Climb", and another with a graphic for the A button with no text. |
Unknown... | 11 | Displays two graphics, one with a left/right direction graphic with no text, and another with a graphic for the left trigger with no text. |
Diving (unused) | 12 | Displays a graphic for the right trigger with no text. |
Unknown... | 13 | Displays two graphics, one with a quad direction graphic with the text "Move the target", and another with a graphic for the A button with the text "Cast the line". |
Unknown... | 14 | Displays a graphic for the B button with the text "Quit". |
Unknown... | 15 | Displays a graphic for the A button with the text "Reel it in". |
Unknown... | 16 | Displays a graphic for the A button with the text "Hook the fish". |
Unknown... | 17 | Displays a graphic for the A button with no text. |
Unknown... | 18 | Displays a graphic for the A button with no text. |
Unknown... | 19 | Displays a graphic for the X button with the text "Place cannonball". |
Unknown... | 20 | Displays a graphic for the X button with the text "Load cannon". |
ποΈ ShowYesNoWindowUI(string, string) : yield
Description
Displays a Yes/No dialog using a caption and body entry from a *.cnvrs-text
file.
Parameters
- (string, string): Caption name
- (string, string): Body name
ποΈ SpawnHackingEnemy(string) : unknown
Description
Parameters
Return Value
ποΈ SpawnPinballObjects() : unknown
Description
Parameters
Return Value
ποΈ SpawnPinballObjectsAfterClearing() : unknown
Description
Parameters
Return Value
ποΈ StartClearCheck() : unknown
Description
Parameters
Return Value
ποΈ StartLetterBoxUI() : unknown
Description
This function is unused.
Parameters
Unknown...
Return Value
Unknown...
ποΈ StartMinigameQuest(string) : unknown
Description
Parameters
Return Value
ποΈ StartPinball() : unknown
Description
Parameters
Return Value
ποΈ StartTimeGimmick() : unknown
Description
Parameters
Return Value
ποΈ StartupGimmickInfo() : unknown
Description
This function is unused.
Parameters
Unknown...
Return Value
Unknown...
ποΈ StartWaitMinigameQuest() : unknown
Description
Parameters
Return Value
ποΈ UnloadDiEvent() : unknown
Description
This function is unused.
Parameters
Unknown...
Return Value
Unknown...
ποΈ UnloadLevel() : unknown
Description
This function is unused.
Parameters
Unknown...
Return Value
Unknown...
ποΈ WaitFromChaosEmeraldNum() : unknown
Description
This function is unused.
Parameters
Unknown...
Return Value
Unknown...
ποΈ WaitFromFlag() : unknown
Description
This function is unused.
Parameters
Unknown...
Return Value
Unknown...
ποΈ WaitTime(number)
Description
Waits for a specified amount of time (in seconds).
Parameters
- (number): Seconds