Game (functions)/Team
This page documents the ScriptGame class for Lua scripting.
As a singleton class, it can be accessed from Lua with GAME.
GetTeamLeaderIndex
GAME:GetTeamLeaderIndex()
Returns the index of the currently player controlled entity in the party.
Returns
| Type | Description |
|---|---|
| System.Int32 | Index of the currently player controlled entity in the party. |
SetTeamLeaderIndex
GAME:SetTeamLeaderIndex(idx)
Sets the leader to the chosen index within the party.
Parameters
| Name | Type | Description |
|---|---|---|
| System.Int32 | System.Int32 | The index of the team member within the team. |
SetCanSwitch
GAME:SetCanSwitch(canSwitch)
Prevents or allows the switching of leaders for the save file.
Parameters
| Name | Type | Description |
|---|---|---|
| System.Boolean | System.Boolean | Set to true to allow switching, set to false to prevent it. |
SetCanRecruit
GAME:SetCanRecruit(canRecruit)
Prevents or allows the joining of recruits for the save file.
Parameters
| Name | Type | Description |
|---|---|---|
| System.Boolean | System.Boolean | Set to true to allow recruit joins, set to false to prevent it. |
GetPlayerPartyCount
GAME:GetPlayerPartyCount()
Returns the player party count. Does not include guests.
Returns
| Type | Description |
|---|---|
| System.Int32 | The count of players |
GetPlayerPartyTable
GAME:GetPlayerPartyTable()
Return the party as a LuaTable. Does not include guests.
Returns
| Type | Description |
|---|---|
| NLua.LuaTable | A Lua Table of Characters |
GetPlayerPartyMember
GAME:GetPlayerPartyMember(index)
Gets the character at the specified index within the player's team.
Parameters
| Name | Type | Description |
|---|---|---|
| System.Int32 | System.Int32 | The specified index |
Returns
| Type | Description |
|---|---|
| RogueEssence.Dungeon.Character | The team member retrieved. |
AddPlayerTeam
GAME:AddPlayerTeam(character)
Adds a character to the player's team.
Parameters
| Name | Type | Description |
|---|---|---|
| RogueEssence.Dungeon.Character | RogueEssence.Dungeon.Character | The character to add. |
RemovePlayerTeam
GAME:RemovePlayerTeam(slot)
Removes the character from the team, placing its item back in the inventory.
Parameters
| Name | Type | Description |
|---|---|---|
| System.Int32 | System.Int32 | The slot of the player to remove. |
GetPlayerGuestCount
GAME:GetPlayerGuestCount()
Gets the number of guests currently in the player's party.
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of guests |
GetPlayerGuestTable
GAME:GetPlayerGuestTable()
Return the guests as a LuaTable
Returns
| Type | Description |
|---|---|
| NLua.LuaTable | A Lua Table of Characters |
GetPlayerGuestMember
GAME:GetPlayerGuestMember(index)
Gets the character at the specified index within the player's guests.
Parameters
| Name | Type | Description |
|---|---|---|
| System.Int32 | System.Int32 | The specified index |
Returns
| Type | Description |
|---|---|
| RogueEssence.Dungeon.Character | The team member retrieved. |
AddPlayerGuest
GAME:AddPlayerGuest(character)
Adds a character to the player's guests.
Parameters
| Name | Type | Description |
|---|---|---|
| RogueEssence.Dungeon.Character | RogueEssence.Dungeon.Character | The character to add. |
RemovePlayerGuest
GAME:RemovePlayerGuest(slot)
Removes the character from the team's guests, placing its item back in the inventory.
Parameters
| Name | Type | Description |
|---|---|---|
| System.Int32 | System.Int32 | The slot of the player to remove. |
GetPlayerAssemblyCount
GAME:GetPlayerAssemblyCount()
Gets the number of characters currently in the player's assembly.
Returns
| Type | Description |
|---|---|
| System.Object | The number of characters |
GetPlayerAssemblyTable
GAME:GetPlayerAssemblyTable()
Return the assembly as a LuaTable
Returns
| Type | Description |
|---|---|
| NLua.LuaTable | A Lua Table of Characters |
GetPlayerAssemblyMember
GAME:GetPlayerAssemblyMember(index)
Gets the character at the specified index within the player's assembly.
Parameters
| Name | Type | Description |
|---|---|---|
| System.Int32 | System.Int32 | The specified index |
Returns
| Type | Description |
|---|---|
| RogueEssence.Dungeon.Character | The assembly member retrieved. |
AddPlayerAssembly
GAME:AddPlayerAssembly(character)
Adds a character to the player's assembly.
Parameters
| Name | Type | Description |
|---|---|---|
| RogueEssence.Dungeon.Character | RogueEssence.Dungeon.Character | The character to add. |
RemovePlayerAssembly
GAME:RemovePlayerAssembly(slot)
Removes the character from the assembly, placing its item back in the inventory.
Parameters
| Name | Type | Description |
|---|---|---|
| System.Int32 | System.Int32 | The slot of the player to remove. |
References
https://github.com/RogueCollab/RogueEssence/blob/master/RogueEssence/Lua/ScriptGameTeam.cs
