|
|
| Line 1: |
Line 1: |
| {{Hat Note|More functions: [[Script Reference]]''}} | | {{Hat Note|More functions: [[Script Reference]]''}} |
|
| |
|
| {{Cleanup}} | | The '''game''' functions are used for various tasks across the game that happen in multiple contexts. Due to the size of the namespace, it is split into subpages based on what each function does. |
| == GAME:GroundSave ==
| | == Game Control == |
| | {{subpage|Game (functions)/Game Control}} |
| | {{:Ground (functions)/Game Control/Table}} |
|
| |
|
| | == Map and Adventure Control == |
| | {{subpage|Game (functions)/Map and Adventure Control}} |
| | {{:Game (functions)/Map and Adventure Control/Table}} |
|
| |
|
| Saves the game while in ground mode.
| | == Rescue Management == |
| | {{subpage|Game (functions)/Rescue Management}} |
| | {{:Game (functions)/Rescue Management/Table}} |
|
| |
|
| | == Camera & Scene Control == |
| | {{subpage|Game (functions)/Camera & Scene Control}} |
| | {{:Game (functions)/Camera & Scene Control/Table}} |
|
| |
|
| === Example === | | == Team Management == |
| | {{subpage|Game (functions)/Team Management}} |
| | {{:Game (functions)/Team Management/Table}} |
|
| |
|
| <pre>
| | === Party Management === |
| | {{subpage|Game (functions)/Party Management}} |
| | {{:Game (functions)/Party Management/Table}} |
|
| |
|
| GAME:GroundSave()
| | === Assembly Management === |
| | {{subpage|Game (functions)/Assembly Management}} |
| | {{:Game (functions)/Assembly Management/Table}} |
|
| |
|
| </pre>
| | === Guest Management === |
| | {{subpage|Game (functions)/Guest Management}} |
| | {{:Game (functions)/Guest Management/Table}} |
|
| |
|
| == GAME:GetModDiff(System.String) == | | == Character Control == |
| | {{subpage|Game (functions)/Character Control}} |
| | {{:Game (functions)/Character Control/Table}} |
|
| |
|
| | == Item Management == |
| | {{subpage|Game (functions)/Item Management}} |
| | {{:Game (functions)/Item Management/Table}} |
|
| |
|
| TODO
| | == Money == |
| | {{subpage|Game (functions)/Money}} |
| | {{:Game (functions)/Money/Table}} |
|
| |
|
| | == Inputs == |
| | {{subpage|Game (functions)/Inputs}} |
| | {{:Game (functions)/Inputs/Table}} |
|
| |
|
| === Arguments === | | == Dungeons == |
| | {{subpage|Game (functions)/Dungeons}} |
| | {{:Game (functions)/Dungeons/Table}} |
|
| |
|
| * <code>uuidStr</code>: None
| | == Direction == |
| | {{subpage|Game (functions)/Direction}} |
| | {{:Game (functions)/Direction/Table}} |
|
| |
|
| == GAME:GetCurrentGround == | | == Queuing == |
| | {{subpage|Game (functions)/Queuing}} |
| | {{:Game (functions)/Queuing/Table}} |
|
| |
|
|
| |
|
| Gets the current ground map.
| | [[Category:Scripting]] |
| | |
| | |
| == GAME:GetCurrentFloor ==
| |
| | |
| | |
| Gets the current dungeon map.
| |
| | |
| | |
| == GAME:GetCurrentDungeon ==
| |
| | |
| | |
| Gets the current zone, also known as dungeon.
| |
| | |
| | |
| == GAME:EnterGroundMap(System.Int32,System.Int32,System.Boolean) ==
| |
| | |
| | |
| Leave current map, and enter specified ground map within the current zone
| |
| | |
| | |
| === Arguments ===
| |
| | |
| * <code>id</code>: The index of the ground map in the zone
| |
| * <code>idxentrypoint</code>: The index of the entry point in the ground map
| |
| * <code>preserveMusic</code>: If set to true, does not change the music when moving to the new ground map.
| |
| | |
| == GAME:EnterGroundMap(System.String,System.String,System.Boolean) ==
| |
| | |
| | |
| Leave current map, and enter specified ground map within the current zone
| |
| | |
| | |
| === Arguments ===
| |
| | |
| * <code>name</code>: The name of the ground map. It must exist within in the zone.
| |
| * <code>entrypoint</code>: The name of the entry point in the ground map
| |
| * <code>preserveMusic</code>: If set to true, does not change the music when moving to the new ground map.
| |
| | |
| == GAME:EnterGroundMap(System.String,System.String,System.String,System.Boolean) ==
| |
| | |
| | |
| Leave current map, and enter specified ground map within a new zone.
| |
| | |
| | |
| === Arguments ===
| |
| | |
| * <code>zone</code>: The name of the destination zone.
| |
| * <code>name</code>: The name of the ground map. It must exist within in the zone.
| |
| * <code>entrypoint</code>: The name of the entry point in the ground map
| |
| * <code>preserveMusic</code>: If set to true, does not change the music when moving to the new ground map.
| |
| | |
| == GAME:EnterDungeon ==
| |
| | |
| | |
| Enters a zone and begins a new adventure.
| |
| | |
| | |
| === Arguments ===
| |
| | |
| * <code>dungeonid</code>: The id of the dungeon to travel to.
| |
| * <code>structureid</code>: The segment within the dungeon to start in. -1 represents ground maps.
| |
| * <code>mapid</code>: The id of the ground map or dungeon map within the dungeon segment.
| |
| * <code>entry</code>: The entry point on the resulting map
| |
| * <code>stakes</code>: Decides what happens when the adventure fails/succeeds.
| |
| * <code>recorded</code>: Record the adventure in a replay
| |
| * <code>silentRestrict</code>: Make the dungeon restrictions silently
| |
| | |
| === Example ===
| |
| | |
| <pre>
| |
| | |
| GAME:EnterDungeon(1, 0, 0, 0, RogueEssence.Data.GameProgress.DungeonStakes.Risk, true, false)
| |
| | |
| </pre>
| |
| | |
| == GAME:ContinueDungeon ==
| |
| | |
| | |
| Enters a zone and continues the current adventure.
| |
| | |
| | |
| === Arguments ===
| |
| | |
| * <code>dungeonid</code>: The id of the dungeon to travel to.
| |
| * <code>structureid</code>: The segment within the dungeon to start in. -1 represents ground maps.
| |
| * <code>mapid</code>: The id of the ground map or dungeon map within the dungeon segment.
| |
| * <code>entry</code>: The entry point on the resulting map
| |
| | |
| === Example ===
| |
| | |
| <pre>
| |
| | |
| GAME:ContinueDungeon(1, 1, 0, 0)
| |
| | |
| </pre>
| |
| | |
| == GAME:EndDungeonRun ==
| |
| | |
| | |
| Ends the current adventure, sending the player to a specified destination.
| |
| | |
| | |
| === Arguments ===
| |
| | |
| * <code>result</code>: The result of the adventure.
| |
| * <code>destzoneid</code>: The id of the dungeon to travel to.
| |
| * <code>structureid</code>: The segment within the dungeon to start in. -1 represents ground maps.
| |
| * <code>mapid</code>: The id of the ground map or dungeon map within the dungeon segment.
| |
| * <code>entryid</code>: The entry point on the resulting map
| |
| * <code>display</code>: Display an epitaph marking the end of the adventure.
| |
| * <code>fanfare</code>: Play a fanfare.
| |
| * <code>completedZone</code>: Zone to mark as completed. Defaults to current zone.
| |
| | |
| === Example ===
| |
| | |
| <pre>
| |
| | |
| GAME:EndDungeonRun(GameProgress.ResultType.Cleared, 0, -1, 1, 0, true, true)
| |
| | |
| </pre>
| |
| | |
| == GAME:EnterRescue ==
| |
| | |
| | |
| Enters a zone and begins a rescue adventure.
| |
| | |
| | |
| === Arguments ===
| |
| | |
| * <code>sosPath</code>: The path of the sos mail.
| |
| | |
| === Example ===
| |
| | |
| <pre>
| |
| | |
| GAME:EnterRescue("RESCUE/INBOX/SOS/example.sosmail")
| |
| | |
| </pre>
| |
| | |
| == GAME:AddAOKRemark(System.Int32) ==
| |
| | |
| | |
| TODO: WIP
| |
| | |
| | |
| === Arguments ===
| |
| | |
| * <code>remarkIndex</code>: None
| |
| | |
| == GAME:RestartToTitle ==
| |
| | |
| | |
| Leave current map and load up the title screen.
| |
| | |
| | |
| == GAME:RestartRogue(RogueEssence.Data.RogueConfig) ==
| |
| | |
| | |
| Restarts a Roguelocke run based on the configuration
| |
| | |
| | |
| === Arguments ===
| |
| | |
| * <code>config</code>: The configuration of the roguelocke run
| |
| | |
| == GAME:EnterZone(System.String,System.Int32,System.Int32,System.Int32) ==
| |
| | |
| | |
| Enters a zone and begins a new adventure.
| |
| | |
| | |
| === Arguments ===
| |
| | |
| * <code>dungeonid</code>: The id of the dungeon to travel to.
| |
| * <code>structureid</code>: The segment within the dungeon to start in. -1 represents ground maps.
| |
| * <code>mapid</code>: The id of the ground map or dungeon map within the dungeon segment.
| |
| * <code>entry</code>: The entry point on the resulting map
| |
| | |
| == GAME:FadeOut ==
| |
| | |
| | |
| Fade out the screen. Waits to complete before continuing.
| |
| | |
| | |
| === Arguments ===
| |
| | |
| * <code>white</code>: Fade to white if set to true. Fades to black otherwise.
| |
| * <code>duration</code>: The amount of time to fade in frames.
| |
| | |
| === Example ===
| |
| | |
| <pre>
| |
| | |
| GAME:FadeOut(false, 60)
| |
| | |
| </pre>
| |
| | |
| == GAME:FadeIn ==
| |
| | |
| | |
| Fade into the screen. Waits to complete before continuing.
| |
| | |
| | |
| === Arguments ===
| |
| | |
| * <code>duration</code>: The amount of time to fade in frames.
| |
| | |
| === Example ===
| |
| | |
| <pre>
| |
| | |
| GAME:FadeIn(60)
| |
| | |
| </pre>
| |
| | |
| == GAME:MoveCamera ==
| |
| | |
| | |
| Centers the camera on a position.
| |
| | |
| | |
| === Arguments ===
| |
| | |
| * <code>x</code>: X coordinate of the camera center
| |
| * <code>y</code>: Y coordinate of the camera center
| |
| * <code>duration</code>: The amount of time it takes ot move to the destination
| |
| * <code>toPlayer</code>: Destination is in absolute coordinates if false, and relative to the player character if set to true.
| |
| | |
| === Example ===
| |
| | |
| <pre>
| |
| | |
| GAME:MoveCamera(200, 240, 60, false)
| |
| | |
| </pre>
| |
| | |
| == GAME:MoveCameraToChara ==
| |
| | |
| | |
| Centers the camera on a character.
| |
| | |
| As we are simply moving the camera to a character, this will simply set ViewCenter and not ViewOffset.
| |
| | |
| | |
| === Arguments ===
| |
| | |
| * <code>x</code>: X coordinate of the camera center, as an offset for the chara
| |
| * <code>y</code>: Y coordinate of the camera center, as an offset for the chara
| |
| * <code>duration</code>: The amount of time it takes ot move to the destination
| |
| * <code>chara</code>: The character to center on.
| |
| | |
| === Example ===
| |
| | |
| <pre>
| |
| | |
| GAME:MoveCameraToChara(200, 240, 60, false)
| |
| | |
| </pre>
| |
| | |
| == GAME:GetCameraCenter ==
| |
| | |
| | |
| Gets the current center of the camera.
| |
| | |
| | |
| === Returns ===
| |
| | |
| A Loc object representing the center of the camera.
| |
| | |
| == GAME:IsCameraOnChar ==
| |
| | |
| | |
| Determines whether the camera is centered relative to the player.
| |
| | |
| | |
| === Returns ===
| |
| | |
| Returns true if the camera is relative to the player, false otherwise.
| |
| | |
| == GAME:HasSOSMail ==
| |
| | |
| | |
| TODO
| |
| | |
| | |
| == GAME:HasAOKMail ==
| |
| | |
| | |
| TODO
| |
| | |
| | |
| == GAME:GetTeamLeaderIndex ==
| |
| | |
| | |
| Returns the index of the currently player controlled entity in the party.
| |
| | |
| | |
| === Returns ===
| |
| | |
| Index of the currently player controlled entity in the party.
| |
| | |
| == GAME:SetTeamLeaderIndex(System.Int32) ==
| |
| | |
| | |
| Sets the leader to the chosen index within the party.
| |
| | |
| | |
| === Arguments ===
| |
| | |
| * <code>idx</code>: The index of the team member within the team.
| |
| | |
| == GAME:SetCanSwitch(System.Boolean) ==
| |
| | |
| | |
| Prevents or allows the switching of leaders for the save file.
| |
| | |
| | |
| === Arguments ===
| |
| | |
| * <code>canSwitch</code>: Set to true to allow switching, set to false to prevent it.
| |
| | |
| == GAME:SetCanRecruit(System.Boolean) ==
| |
| | |
| | |
| Prevents or allows the joining of recruits for the save file.
| |
| | |
| | |
| === Arguments ===
| |
| | |
| * <code>canRecruit</code>: Set to true to allow recruit joins, set to false to prevent it.
| |
| | |
| == GAME:GetPlayerPartyCount ==
| |
| | |
| | |
| Returns the player party count. Does not include guests.
| |
| | |
| | |
| === Returns ===
| |
| | |
| The count of players
| |
| | |
| == GAME:GetPlayerPartyTable ==
| |
| | |
| | |
| Return the party as a LuaTable. Does not include guests.
| |
| | |
| | |
| === Returns ===
| |
| | |
| A Lua Table of Characters
| |
| | |
| == GAME:GetPlayerPartyMember(System.Int32) ==
| |
| | |
| | |
| Gets the character at the specified index within the player's team.
| |
| | |
| | |
| === Arguments ===
| |
| | |
| * <code>index</code>: The specified index
| |
| | |
| === Returns ===
| |
| | |
| The team member retrieved.
| |
| | |
| == GAME:GetPlayerGuestCount ==
| |
| | |
| | |
| Gets the number of guests currently in the player's party.
| |
| | |
| | |
| === Returns ===
| |
| | |
| The number of guests
| |
| | |
| == GAME:GetPlayerGuestTable ==
| |
| | |
| | |
| Return the guests as a LuaTable
| |
| | |
| | |
| === Returns ===
| |
| | |
| A Lua Table of Characters
| |
| | |
| == GAME:GetPlayerGuestMember(System.Int32) ==
| |
| | |
| | |
| Gets the character at the specified index within the player's guests.
| |
| | |
| | |
| === Arguments ===
| |
| | |
| * <code>index</code>: The specified index
| |
| | |
| === Returns ===
| |
| | |
| The team member retrieved.
| |
| | |
| == GAME:GetPlayerAssemblyCount ==
| |
| | |
| | |
| Gets the number of characters currently in the player's assembly.
| |
| | |
| | |
| === Returns ===
| |
| | |
| The number of characters
| |
| | |
| == GAME:GetPlayerAssemblyTable ==
| |
| | |
| | |
| Return the assembly as a LuaTable
| |
| | |
| | |
| === Returns ===
| |
| | |
| A Lua Table of Characters
| |
| | |
| == GAME:GetPlayerAssemblyMember(System.Int32) ==
| |
| | |
| | |
| Gets the character at the specified index within the player's assembly.
| |
| | |
| | |
| === Arguments ===
| |
| | |
| * <code>index</code>: The specified index
| |
| | |
| === Returns ===
| |
| | |
| The assembly member retrieved.
| |
| | |
| == GAME:AddPlayerTeam(RogueEssence.Dungeon.Character) ==
| |
| | |
| | |
| Adds a character to the player's team.
| |
| | |
| | |
| === Arguments ===
| |
| | |
| * <code>character</code>: The character to add.
| |
| | |
| == GAME:RemovePlayerTeam(System.Int32) ==
| |
| | |
| | |
| Removes the character from the team, placing its item back in the inventory.
| |
| | |
| | |
| === Arguments ===
| |
| | |
| * <code>slot</code>: The slot of the player to remove.
| |
| | |
| == GAME:AddPlayerGuest(RogueEssence.Dungeon.Character) ==
| |
| | |
| | |
| Adds a character to the player's guests.
| |
| | |
| | |
| === Arguments ===
| |
| | |
| * <code>character</code>: The character to add.
| |
| | |
| == GAME:RemovePlayerGuest(System.Int32) ==
| |
| | |
| | |
| Removes the character from the team's guests, placing its item back in the inventory.
| |
| | |
| | |
| === Arguments ===
| |
| | |
| * <code>slot</code>: The slot of the player to remove.
| |
| | |
| == GAME:AddPlayerAssembly(RogueEssence.Dungeon.Character) ==
| |
| | |
| | |
| Adds a character to the player's assembly.
| |
| | |
| | |
| === Arguments ===
| |
| | |
| * <code>character</code>: The character to add.
| |
| | |
| == GAME:RemovePlayerAssembly(System.Int32) ==
| |
| | |
| | |
| Removes the character from the assembly, placing its item back in the inventory.
| |
| | |
| | |
| === Arguments ===
| |
| | |
| * <code>slot</code>: The slot of the player to remove.
| |
| | |
| == GAME:SetCharacterNickname(RogueEssence.Dungeon.Character,System.String) ==
| |
| | |
| | |
| Sets a character's nickname
| |
| | |
| | |
| === Arguments ===
| |
| | |
| * <code>character</code>: The character to rename
| |
| * <code>nickname</code>: The new name
| |
| | |
| == GAME:GetCharacterNickname(RogueEssence.Dungeon.Character) ==
| |
| | |
| | |
| Gets the character nickname
| |
| | |
| | |
| === Arguments ===
| |
| | |
| * <code>character</code>: The character to get the nickname from
| |
| | |
| === Returns ===
| |
| | |
| The character's nickname
| |
| | |
| == GAME:SetTeamName(System.String) ==
| |
| | |
| | |
| Sets the name of the player's team
| |
| | |
| | |
| === Arguments ===
| |
| | |
| * <code>teamname</code>: The new team name
| |
| | |
| == GAME:GetTeamName ==
| |
| | |
| | |
| Gets the name of the player's team
| |
| | |
| | |
| === Returns ===
| |
| | |
| The team's name
| |
| | |
| == GAME:CanRelearn(RogueEssence.Dungeon.Character) ==
| |
| | |
| | |
| Checks if the character can relearn any skills.
| |
| | |
| | |
| === Arguments ===
| |
| | |
| * <code>character</code>: The character to check
| |
| | |
| == GAME:CanForget(RogueEssence.Dungeon.Character) ==
| |
| | |
| | |
| Checks if the character can forget any skills.
| |
| | |
| | |
| === Arguments ===
| |
| | |
| * <code>character</code>: The character to check
| |
| | |
| == GAME:CanLearn(RogueEssence.Dungeon.Character) ==
| |
| | |
| | |
| Checks if the character can learn any skills.
| |
| | |
| | |
| === Arguments ===
| |
| | |
| * <code>character</code>: The character to check
| |
| | |
| == GAME:CheckLevelSkills ==
| |
| | |
| | |
| Checks the levels gained by a character and prompts to learn all skills along the levels.
| |
| Waits until all skills have been accepted or declined before continuing.
| |
| | |
| | |
| === Arguments ===
| |
| | |
| * <code>chara</code>: The character to prompt for learning.
| |
| * <code>oldLevel</code>: The level that the character leveled up from.
| |
| | |
| === Example ===
| |
| | |
| <pre>
| |
| | |
| GAME:CheckLevelSkills(player, 5)
| |
| | |
| </pre>
| |
| | |
| == GAME:TryLearnSkill ==
| |
| | |
| | |
| Attempts to give a new skill to the specified character, prompting to replace an old one if they are full.
| |
| Waits until all the skill has been accepted or declined before continuing.
| |
| | |
| | |
| === Arguments ===
| |
| | |
| * <code>chara</code>: The character to learn the skill
| |
| * <code>skill</code>: The skill to learn
| |
| | |
| === Example ===
| |
| | |
| <pre>
| |
| | |
| GAME:TryLearnSkill(player, "thunder")
| |
| | |
| </pre>
| |
| | |
| == GAME:LearnSkill(RogueEssence.Dungeon.Character,System.String) ==
| |
| | |
| | |
| Gives a new skill to a specified character.
| |
| Fails if the character's skills are full.
| |
| | |
| | |
| === Arguments ===
| |
| | |
| * <code>chara</code>: The character to learn the skill
| |
| * <code>skill</code>: The skill to learn
| |
| | |
| == GAME:ForgetSkill(RogueEssence.Dungeon.Character,System.Int32) ==
| |
| | |
| | |
| Removed a skill from the specified character.
| |
| | |
| | |
| === Arguments ===
| |
| | |
| * <code>chara</code>: The character to forget the skill
| |
| * <code>slot</code>: The slot of the skill to forget
| |
| | |
| == GAME:LockSkill(RogueEssence.Dungeon.Character,System.Int32) ==
| |
| | |
| | |
| Makes a skill impossible to forget or replace for the specified character.
| |
| Note that this only affects normal gameplay. Scripts can still freely get rid of the skill.
| |
| | |
| | |
| === Arguments ===
| |
| | |
| * <code>chara</code>: The character to lock the skill
| |
| * <code>slot</code>: The slot of the skill to lock
| |
| | |
| == GAME:UnlockSkill(RogueEssence.Dungeon.Character,System.Int32) ==
| |
| | |
| | |
| Unlocks a previously locked skill for the specified character, making it possible to be forgotten or replaced during normal gameplay.
| |
| | |
| | |
| === Arguments ===
| |
| | |
| * <code>chara</code>: The character to unlock the skill
| |
| * <code>slot</code>: The slot of the skill to unlock
| |
| | |
| == GAME:SetCharacterSkill(RogueEssence.Dungeon.Character,System.String,System.Int32,System.Boolean) ==
| |
| | |
| | |
| Gives a new skill to a specified character, replacing a specifically chosen slot.
| |
| | |
| | |
| === Arguments ===
| |
| | |
| * <code>character</code>: The character to learn the skill
| |
| * <code>skillId</code>: The skill to learn
| |
| * <code>slot</code>: The slot to replace
| |
| | |
| == GAME:GetCharacterSkill(RogueEssence.Dungeon.Character,System.Int32) ==
| |
| | |
| | |
| Gets the skill from a specified character and specified slot.
| |
| | |
| | |
| === Arguments ===
| |
| | |
| * <code>chara</code>: The character to get the skill from.
| |
| * <code>slot</code>: The slot to get the skill from.
| |
| | |
| === Returns ===
| |
| | |
| The ID of the skill in the slot
| |
| | |
| == GAME:CanPromote(RogueEssence.Dungeon.Character) ==
| |
| | |
| | |
| Checks if the character can be promoted to a new class.
| |
| | |
| | |
| === Arguments ===
| |
| | |
| * <code>character</code>: The character to check
| |
| | |
| === Returns ===
| |
| | |
| True if the character can be promoted, false otherwise.
| |
| | |
| == GAME:GetAvailablePromotions(RogueEssence.Dungeon.Character,System.String) ==
| |
| | |
| | |
| Gets a list of possible classes that the character can prmote to.
| |
| | |
| | |
| === Arguments ===
| |
| | |
| * <code>character</code>: The character to check
| |
| * <code>bypassItem</code>: An exception item that can bypass checks for promotion
| |
| | |
| === Returns ===
| |
| | |
| A lua table of PromoteBranch objects
| |
| | |
| == GAME:PromoteCharacter(RogueEssence.Dungeon.Character,RogueEssence.Data.PromoteBranch,System.String) ==
| |
| | |
| | |
| Promotes a character ot a new class.
| |
| | |
| | |
| === Arguments ===
| |
| | |
| * <code>character</code>: The character to promote
| |
| * <code>branch</code>: The PromoteBranch to promote with
| |
| * <code>bypassItem</code>: An exception item that can bypass checks for promotion
| |
| | |
| == GAME:FindPlayerItem(System.String,System.Boolean,System.Boolean) ==
| |
| | |
| | |
| Finds an item in the player's team and returns its slot within the inventory or among its team's equips.
| |
| | |
| | |
| === Arguments ===
| |
| | |
| * <code>id</code>: The item ID to search for.
| |
| * <code>held</code>: Check equipped items.
| |
| * <code>inv</code>: Check inventory items.
| |
| | |
| === Returns ===
| |
| | |
| The InvSlot of the item. Invalid if the item could not be found.
| |
| | |
| == GAME:GetPlayerEquippedCount ==
| |
| | |
| | |
| Get the number of items equipped by players. Does not include guests.
| |
| | |
| | |
| === Returns ===
| |
| | |
| The number of items.
| |
| | |
| == GAME:GetPlayerBagCount ==
| |
| | |
| | |
| Get the number of items in the bag.
| |
| | |
| | |
| === Returns ===
| |
| | |
| The number of items.
| |
| | |
| == GAME:GetPlayerBagLimit ==
| |
| | |
| | |
| Gets the maximum amount of item the player's team can carry.
| |
| | |
| | |
| === Returns ===
| |
| | |
| The number of items.
| |
| | |
| == GAME:GetPlayerEquippedItem(System.Int32) ==
| |
| | |
| | |
| Gets the equipped item for the character in the specified slot.
| |
| | |
| | |
| === Arguments ===
| |
| | |
| * <code>slot</code>: The team slot of the character to check
| |
| | |
| === Returns ===
| |
| | |
| The character's equipped item
| |
| | |
| == GAME:GetGuestEquippedItem(System.Int32) ==
| |
| | |
| | |
| Gets the equipped item for the character in the specified guest slot.
| |
| | |
| | |
| === Arguments ===
| |
| | |
| * <code>slot</code>: The guest slot of the character to check
| |
| | |
| === Returns ===
| |
| | |
| The character's equipped item
| |
| | |
| == GAME:GivePlayerItem(RogueEssence.Dungeon.InvItem) ==
| |
| | |
| | |
| Gives an item and adds it to the player team's bag.
| |
| | |
| | |
| === Arguments ===
| |
| | |
| * <code>item</code>: The item to give
| |
| | |
| == GAME:GivePlayerItem(System.String,System.Int32,System.Boolean,System.String) ==
| |
| | |
| | |
| Gives an item and adds it to the player team's bag.
| |
| | |
| | |
| === Arguments ===
| |
| | |
| * <code>id</code>: The ID of the item
| |
| * <code>count</code>: The amount to give. Default 1
| |
| * <code>cursed</code>: Whether the item is cursed. Default false.
| |
| * <code>hiddenval</code>: The hidden value of the item. Default empty string.
| |
| | |
| == GAME:GetPlayerBagItem(System.Int32) ==
| |
| | |
| | |
| Gets the item found at the specified slot of the player's bag.
| |
| | |
| | |
| === Arguments ===
| |
| | |
| * <code>slot</code>: The slot to check
| |
| | |
| === Returns ===
| |
| | |
| The item found in the slot
| |
| | |
| == GAME:TakePlayerBagItem(System.Int32,System.Boolean) ==
| |
| | |
| | |
| Remove an item from player inventory
| |
| | |
| | |
| === Arguments ===
| |
| | |
| * <code>slot</code>: The slot from which to remove the item
| |
| * <code>takeAll</code>: None
| |
| | |
| == GAME:TakePlayerEquippedItem(System.Int32,System.Boolean) ==
| |
| | |
| | |
| Remove the equipped item from a chosen member of the team
| |
| | |
| | |
| === Arguments ===
| |
| | |
| * <code>slot</code>: The slot of the character on the team from which to remove the item
| |
| * <code>takeAll</code>: None
| |
| | |
| == GAME:TakeGuestEquippedItem(System.Int32,System.Boolean) ==
| |
| | |
| | |
| Remove the equipped item from a chosen guest of the team
| |
| | |
| | |
| === Arguments ===
| |
| | |
| * <code>slot</code>: The slot of the character on the team's guest list from which to remove the item
| |
| * <code>takeAll</code>: None
| |
| | |
| == GAME:GetPlayerStorageCount ==
| |
| | |
| | |
| Get the amount of items in the player's storage
| |
| | |
| | |
| == GAME:GetPlayerStorageItemCount(System.String) ==
| |
| | |
| | |
| Get the amount of a specific item in the player's storage
| |
| | |
| | |
| === Arguments ===
| |
| | |
| * <code>id</code>: ID of the item ot check
| |
| | |
| === Returns ===
| |
| | |
| The amount of copies currently in storage
| |
| | |
| == GAME:GivePlayerStorageItem(RogueEssence.Dungeon.InvItem) ==
| |
| | |
| | |
| Gives an item and adds it to the player team's storage.
| |
| | |
| | |
| === Arguments ===
| |
| | |
| * <code>item</code>: The item to give
| |
| | |
| == GAME:GivePlayerStorageItem(System.String,System.Int32,System.Boolean,System.String) ==
| |
| | |
| | |
| Gives an item and adds it to the player team's storage.
| |
| | |
| | |
| === Arguments ===
| |
| | |
| * <code>id</code>: The ID of the item
| |
| * <code>count</code>: The amount to give. Default 1
| |
| * <code>cursed</code>: Whether the item is cursed. Default false.
| |
| * <code>hiddenval</code>: The hidden value of the item. Default empty string.
| |
| | |
| == GAME:TakePlayerStorageItem(System.String) ==
| |
| | |
| | |
| Takes an item from the storage
| |
| | |
| | |
| === Arguments ===
| |
| | |
| * <code>id</code>: The ID of the item to take
| |
| | |
| == GAME:DepositAll ==
| |
| | |
| | |
| Takes all items in the player team's bag and equipped items, and deposits them in storage.
| |
| | |
| | |
| == GAME:GetPlayerMoney ==
| |
| | |
| | |
| Gets the amount of money the player currently has on hand.
| |
| | |
| | |
| === Returns ===
| |
| | |
| The amount of money.
| |
| | |
| == GAME:AddToPlayerMoney(System.Int32) ==
| |
| | |
| | |
| Adds money to the player's wallet.
| |
| | |
| | |
| === Arguments ===
| |
| | |
| * <code>toadd</code>: The amount of money to add.
| |
| | |
| == GAME:RemoveFromPlayerMoney(System.Int32) ==
| |
| | |
| | |
| Removes money from the player's wallet.
| |
| | |
| | |
| === Arguments ===
| |
| | |
| * <code>toremove</code>: The amount of money to remove.
| |
| | |
| == GAME:GetPlayerMoneyBank ==
| |
| | |
| | |
| Gets the amount of money in the player's bank
| |
| | |
| | |
| === Returns ===
| |
| | |
| The amount of money.
| |
| | |
| == GAME:AddToPlayerMoneyBank(System.Int32) ==
| |
| | |
| | |
| Adds money to the player's bank.
| |
| | |
| | |
| === Arguments ===
| |
| | |
| * <code>toadd</code>: The amount of money to add.
| |
| | |
| == GAME:RemoveFromPlayerMoneyBank(System.Int32) ==
| |
| | |
| | |
| Removes money from the player's bank.
| |
| | |
| | |
| === Arguments ===
| |
| | |
| * <code>toremove</code>: The amount of money to remove.
| |
| | |
| == GAME:IsKeyDown(System.Int32) ==
| |
| | |
| | |
| Checks if a player is making a certain physical keyboard input.
| |
| | |
| | |
| === Arguments ===
| |
| | |
| * <code>keyid</code>: The ID of the input
| |
| | |
| === Returns ===
| |
| | |
| True if the button is currently pressed. False otherwise.
| |
| | |
| == GAME:IsInputDown(System.Int32) ==
| |
| | |
| | |
| Checks if a player is making a certain game input.
| |
| | |
| | |
| === Arguments ===
| |
| | |
| * <code>inputid</code>: None
| |
| | |
| === Returns ===
| |
| | |
| True if the input is currently pressed. False otherwise.
| |
| | |
| == GAME:CutsceneMode(System.Boolean) ==
| |
| | |
| | |
| Sets the game in cutscene mode. This prevents characters from taking idle action and hides certain UI.
| |
| | |
| | |
| === Arguments ===
| |
| | |
| * <code>bon</code>: If set to true, turns cutscene mode on. If set to false, turns it off.
| |
| | |
| == GAME:GetDailySeed ==
| |
| | |
| | |
| Gets the random seed for the current adventure.
| |
| | |
| | |
| === Returns ===
| |
| | |
| The current adventure's seed.
| |
| | |
| == GAME:UnlockDungeon(System.String) ==
| |
| | |
| | |
| Unlocks a specified dungeon.
| |
| | |
| | |
| === Arguments ===
| |
| | |
| * <code>dungeonid</code>: ID of the dungeon to unlock.
| |
| | |
| == GAME:DungeonUnlocked(System.String) ==
| |
| | |
| | |
| Checks if a dungeon is unlocked.
| |
| | |
| | |
| === Arguments ===
| |
| | |
| * <code>dungeonid</code>: ID of the dungeon to check
| |
| | |
| === Returns ===
| |
| | |
| True if unlocked, false otherwise.
| |
| | |
| == GAME:InRogueMode ==
| |
| | |
| | |
| Checks if the current game is in rogue mode.
| |
| | |
| | |
| === Returns ===
| |
| | |
| True if in rogue mode, false otherwise.
| |
| | |
| == GAME:HasServerSet ==
| |
| | |
| | |
| TODO: WIP
| |
| | |
| | |
| == GAME:GetRescueAllowed ==
| |
| | |
| | |
| Checks to see if rescue is allowed.
| |
| | |
| | |
| === Returns ===
| |
| | |
| True if rescues are allowed, false otherwise.
| |
| | |
| == GAME:SetRescueAllowed(System.Boolean) ==
| |
| | |
| | |
| Sets the value in the player's save file to determine if they can be rescued or not.
| |
| If rescue is possible on the Save File level, it can still be prevented by the map.
| |
| | |
| | |
| === Arguments ===
| |
| | |
| * <code>allowed</code>: Set to true to allow the player to be rescued. False otherwise.
| |
| | |
| == GAME:QueueLeaderEvent(System.Object) ==
| |
| | |
| | |
| Prepares an event to execute on the next frame.
| |
| | |
| | |
| === Arguments ===
| |
| | |
| * <code>obj</code>: None
| |
| | |
| == GAME:WaitFrames ==
| |
| | |
| | |
| Waits for a specified number of frames before continuing.
| |
| | |
| | |
| === Arguments ===
| |
| | |
| * <code>frames</code>: The number of frames ot wait. Each frame is 1/60th of a second.
| |
| | |
| === Example ===
| |
| | |
| <pre>
| |
| | |
| GAME:WaitFrames(60)
| |
| | |
| </pre>
| |
| | |
| == GAME:VectorToDirection(RogueElements.Loc) ==
| |
| | |
| | |
| Turns a vector (preferably a unit vector) into a cardinal or diagonal direction.
| |
| | |
| | |
| === Arguments ===
| |
| | |
| * <code>v</code>: The vector.
| |
| | |
| === Returns ===
| |
| | |
| The direction as one of 8 values.
| |
| | |
| == GAME:VectorToDirection(System.Double,System.Double) ==
| |
| | |
| | |
| Convenience function to get a vector's components from lua numbers(doubles)
| |
| | |
| | |
| === Arguments ===
| |
| | |
| * <code>X</code>: The X value of the vector
| |
| * <code>Y</code>: The Y value of the vector
| |
| | |
| === Returns ===
| |
| | |
| The direction the vector points to as one of 8 values.
| |
| | |
| == GAME:RandomDirection ==
| |
| | |
| | |
| Generates a random direction.
| |
| | |
| | |
| === Returns ===
| |
| | |
| An 8-directional direction.
| |
| | |
| == GAME:SetupLuaFunctions(RogueEssence.Script.LuaEngine) ==
| |
| | |
| | |
| Setups any extra functionalities for this object written on the lua side.
| |