Game (functions)/Character Control: Difference between revisions
Created page with "== 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:CanRelearn(RogueEssence.D..." |
No edit summary |
||
| Line 1: | Line 1: | ||
== | == SetCharacterNickname == | ||
Sets a character's nickname. {{FuncUsage|nmspace=GAME|nm=SetCharacterNickname|args=chara}} | |||
=== Arguments === | === Arguments === | ||
{| class="wikitable" | |||
{{ArgHeader}} | |||
{{ArgRow | |||
|name=chara | |||
|type=Dungeon Character | |||
|techt=RogueEssence.Dungeon.Character | |||
|purp=The character to rename | |||
}} | |||
{{ArgRow | |||
|name=name | |||
|type=String | |||
|techt=System.String | |||
|purp=The new name | |||
}} | |||
|} | |||
== GetCharacterNickname == | |||
== | |||
Returns the nickname of the passed character. {{FuncUsage|nmspace=GAME|nm=GetCharacterNickname|args=chara}} | |||
=== Arguments === | === Arguments === | ||
{| class="wikitable" | |||
{{ArgHeader}} | |||
{{ArgRow | |||
|name=chara | |||
|type=Dungeon Character | |||
|techt=RogueEssence.Dungeon.Character | |||
|purp=The character to get the nickname of | |||
}} | |||
|} | |||
== CanRelearn == | |||
== | |||
Checks if the character can relearn any skills. Returns true if they can, false if they can't.{{FuncUsage|nmspace=GAME|nm=CanRelearn|args=chara}} | |||
{| class="wikitable" | |||
{{ArgHeader}} | |||
{{ArgRow | |||
|name=chara | |||
|type=Dungeon Character | |||
|techt=RogueEssence.Dungeon.Character | |||
|purp=The character to check | |||
}} | |||
== CanForget == | |||
=== | Checks if the character can forget any skills. {{FuncUsage|nmspace=GAME|nm=CanForget|args=chara}} | ||
{| class="wikitable" | |||
{{ArgHeader}} | |||
{{ArgRow | |||
|name=chara | |||
|type=Dungeon Character | |||
|techt=RogueEssence.Dungeon.Character | |||
|purp=The character to check | |||
}} | |||
== CanLearn == | |||
Checks if the character can learn any skills. {{FuncUsage|nmspace=GAME|nm=CanLearn|args=chara}} | |||
{| class="wikitable" | |||
{{ArgHeader}} | |||
{{ArgRow | |||
|name=chara | |||
|type=Dungeon Character | |||
|techt=RogueEssence.Dungeon.Character | |||
|purp=The character to check | |||
}} | |||
== 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. {{FuncUsage|nmspace=GAME|nm=CheckLevelSkills|args=chara, pastLevel}} | |||
=== Arguments === | === Arguments === | ||
{| class="wikitable" | |||
{{ArgHeader}} | |||
{{ArgRow | |||
== | |name=chara | ||
|type=(Undocumented) | |||
|techt=(Undocumented) | |||
|purp=The character to prompt for learning. | |||
}} | |||
{{ArgRow | |||
|name=pastLevel | |||
|type=Integer | |||
|techt=System.Int32 | |||
|purp=The level that the character leveled up from. | |||
}} | |||
|}rom. | |||
== | |||
=== Example === | === Example === | ||
| Line 74: | Line 102: | ||
</pre> | </pre> | ||
== | == 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. {{FuncUsage|nmspace=GAME|nm=TryLearnSkill|args=chara, skill}} | |||
=== Arguments === | === Arguments === | ||
{| class="wikitable" | |||
{{ArgHeader}} | |||
{{ArgRow | |||
|name=chara | |||
|type=Dungeon Character | |||
|techt=RogueEssence.Dungeon.Character | |||
|purp= The character to learn the skill | |||
}} | |||
{{ArgRow | |||
|name=skill | |||
|type=String | |||
|techt=System.String | |||
|purp=The skill to learn | |||
}} | |||
|} | |||
=== Example === | === Example === | ||
| Line 94: | Line 131: | ||
</pre> | </pre> | ||
== | == LearnSkill == | ||
Gives a new skill to a specified character. | Gives a new skill to a specified character. Fails if the character's skills are full. {{FuncUsage|nmspace=GAME|nm=LearnSkill|args=chara, skill}} | ||
Fails if the character's skills are full. | |||
=== Arguments === | === Arguments === | ||
{| class="wikitable" | |||
{{ArgHeader}} | |||
{{ArgRow | |||
|name=chara | |||
|type=Dungeon Character | |||
|techt=RogueEssence.Dungeon.Character | |||
|purp= The character to learn the skill | |||
}} | |||
{{ArgRow | |||
|name=skill | |||
|type=String | |||
|techt=System.String | |||
|purp=The skill to learn | |||
}} | |||
|} | |||
== ForgetSkill == | |||
== | |||
Removes a skill from the specified character. {{FuncUsage|nmspace=GAME|nm=ForgetSkill|args=chara, slot}} | |||
=== Arguments === | === Arguments === | ||
{| class="wikitable" | |||
{{ArgHeader}} | |||
{{ArgRow | |||
|name=chara | |||
|type=Dungeon Character | |||
|techt=RogueEssence.Dungeon.Character | |||
|purp= The character to forget the skill | |||
}} | |||
{{ArgRow | |||
|name=Slot | |||
|type=Integer | |||
|techt=System.Int32 | |||
|purp=The slot of the skill to forget | |||
}} | |||
|} | |||
== LockSkill == | |||
== | |||
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. {{FuncUsage|nmspace=GAME|nm=LockSkill|args=chara, slot}} | |||
=== Arguments === | === Arguments === | ||
{| class="wikitable" | |||
{{ArgHeader}} | |||
{{ArgRow | |||
|name=chara | |||
|type=Dungeon Character | |||
|techt=RogueEssence.Dungeon.Character | |||
|purp= The character to lock the skill of | |||
}} | |||
{{ArgRow | |||
|name=Slot | |||
|type=Integer | |||
|techt=System.Int32 | |||
|purp=The slot of the skill to lock | |||
}} | |||
|} | |||
== UnlockSkill == | |||
== | |||
Unlocks a previously locked skill for the specified character, making it possible to be forgotten or replaced during normal gameplay. {{FuncUsage|nmspace=GAME|nm=UnlockSkill|args=chara, slot}} | |||
=== Arguments === | === Arguments === | ||
{| class="wikitable" | |||
{{ArgHeader}} | |||
{{ArgRow | |||
|name=chara | |||
|type=Dungeon Character | |||
|techt=RogueEssence.Dungeon.Character | |||
|purp= The character to unlock the skill of | |||
}} | |||
{{ArgRow | |||
|name=Slot | |||
|type=Integer | |||
|techt=System.Int32 | |||
|purp=The slot of the skill to unlock | |||
}} | |||
|} | |||
== SetCharacterSkill == | |||
== | |||
Gives a new skill to a specified character, replacing a specifically chosen slot. {{FuncUsage|nmspace=GAME|nm=SetCharacterSkill|args=chara, skillID, slot}} | |||
=== Arguments === | === Arguments === | ||
{| class="wikitable" | |||
{{ArgHeader}} | |||
{{ArgRow | |||
|name=chara | |||
|type=Dungeon Character | |||
|techt=RogueEssence.Dungeon.Character | |||
|purp=The character to learn the skill | |||
}} | |||
{{ArgRow | |||
|name=skillID | |||
|type=String | |||
|techt=System.String | |||
|purp=The skill to learn | |||
}} | |||
{{ArgRow | |||
|name=slot | |||
|type=Integer | |||
|techt=System.Int32 | |||
|purp=The slot to replace | |||
}} | |||
|} | |||
== GetCharacterSkill == | |||
== | |||
Gets the skill from a specified character and specified slot. {{FuncUsage|nmspace=GAME|nm=GetCharacterSkill|args=chara, slot}} | |||
=== Arguments === | === Arguments === | ||
{| class="wikitable" | |||
{{ArgHeader}} | |||
{{ArgRow | |||
|name=chara | |||
|type=Dungeon Character | |||
|techt=RogueEssence.Dungeon.Character | |||
|purp=The character to get the skill from. | |||
}} | |||
{{ArgRow | |||
|name=slot | |||
|type=Integer | |||
|techt=System.Int32 | |||
|purp=The slot to get the skill from. | |||
}} | |||
|} | |||
=== Returns === | === Returns === | ||
| Line 167: | Line 269: | ||
The ID of the skill in the slot | The ID of the skill in the slot | ||
== | == CanPromote == | ||
Checks if the character can be promoted to a new class. {{FuncUsage|nmspace=GAME|nm=CanPromote|args=chara}} | |||
=== Arguments === | === Arguments === | ||
{| class="wikitable" | |||
{{ArgHeader}} | |||
{{ArgRow | |||
|name=chara | |||
|type=Dungeon Character | |||
|techt=RogueEssence.Dungeon.Character | |||
|purp=The character to check | |||
}} | |||
|} | |||
=== Returns === | === Returns === | ||
| Line 181: | Line 288: | ||
True if the character can be promoted, false otherwise. | True if the character can be promoted, false otherwise. | ||
== | == GetAvailablePromotions == | ||
Gets a list of possible classes that the character can promote to. Returns a lua table of PromoteBranch objects. | |||
Gets a list of possible classes that the character can | |||
=== Arguments === | === Arguments === | ||
{| class="wikitable" | |||
{{ArgHeader}} | |||
{{ArgRow | |||
|name=chara | |||
|type=Dungeon Character | |||
|techt=RogueEssence.Dungeon.Character | |||
|purp=The character to check | |||
}} | |||
{{ArgRow | |||
|name=bypassItem | |||
|type=String | |||
|techt=System.String | |||
|purp=An exception item that can bypass checks for promotion, for "evolution item" | |||
}} | |||
|} | |||
== PromoteCharacter == | |||
== | |||
Promotes a character to a new class. | |||
=== Arguments === | === Arguments === | ||
{| class="wikitable" | |||
{{ArgHeader}} | |||
{{ArgRow | |||
|name=chara | |||
|type=Dungeon Character | |||
|techt=RogueEssence.Dungeon.Character | |||
|purp=The character to check | |||
}} | |||
{{ArgRow | |||
|name=branch | |||
|type=Promote Branch | |||
|techt=RogueEssence.Data.PromoteBranch | |||
|purp=The branch of promotion to use. | |||
}} | |||
{{ArgRow | |||
|name=bypassItem | |||
|type=String | |||
|techt=System.String | |||
|purp=An exception item that can bypass checks for promotion, for "evolution item" | |||
}} | |||
|} | |||
Latest revision as of 22:56, 17 January 2026
SetCharacterNickname
Sets a character's nickname. Argument order is GAME:SetCharacterNickname(chara).
Arguments
| Name | Type | Technical Type | Purpose |
|---|---|---|---|
| chara | Dungeon Character | RogueEssence.Dungeon.Character
|
The character to rename |
| name | String | System.String
|
The new name |
GetCharacterNickname
Returns the nickname of the passed character. Argument order is GAME:GetCharacterNickname(chara).
Arguments
| Name | Type | Technical Type | Purpose |
|---|---|---|---|
| chara | Dungeon Character | RogueEssence.Dungeon.Character
|
The character to get the nickname of |
CanRelearn
Checks if the character can relearn any skills. Returns true if they can, false if they can't.Argument order is GAME:CanRelearn(chara).
CanForget
Checks if the character can forget any skills. Argument order is GAME:CanForget(chara).
| Name | Type | Technical Type | Purpose |
|---|---|---|---|
| chara | Dungeon Character | RogueEssence.Dungeon.Character
|
The character to check |
CanLearn
Checks if the character can learn any skills. Argument order is GAME:CanLearn(chara).
| Name | Type | Technical Type | Purpose |
|---|---|---|---|
| chara | Dungeon Character | RogueEssence.Dungeon.Character
|
The character to check |
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. Argument order is GAME:CheckLevelSkills(chara, pastLevel).
Arguments
| Name | Type | Technical Type | Purpose |
|---|---|---|---|
| chara | Dungeon Character | RogueEssence.Dungeon.Character
|
The character to check |
| Name | Type | Technical Type | Purpose |
|---|---|---|---|
| chara | (Undocumented) | (Undocumented)
|
The character to prompt for learning. |
| pastLevel | Integer | System.Int32
|
The level that the character leveled up from. |
rom.
Example
GAME:CheckLevelSkills(player, 5)
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. Argument order is GAME:TryLearnSkill(chara, skill).
Arguments
| Name | Type | Technical Type | Purpose |
|---|---|---|---|
| chara | Dungeon Character | RogueEssence.Dungeon.Character
|
The character to learn the skill |
| skill | String | System.String
|
The skill to learn |
Example
GAME:TryLearnSkill(player, "thunder")
LearnSkill
Gives a new skill to a specified character. Fails if the character's skills are full. Argument order is GAME:LearnSkill(chara, skill).
Arguments
| Name | Type | Technical Type | Purpose |
|---|---|---|---|
| chara | Dungeon Character | RogueEssence.Dungeon.Character
|
The character to learn the skill |
| skill | String | System.String
|
The skill to learn |
ForgetSkill
Removes a skill from the specified character. Argument order is GAME:ForgetSkill(chara, slot).
Arguments
| Name | Type | Technical Type | Purpose |
|---|---|---|---|
| chara | Dungeon Character | RogueEssence.Dungeon.Character
|
The character to forget the skill |
| Slot | Integer | System.Int32
|
The slot of the skill to forget |
LockSkill
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. Argument order is GAME:LockSkill(chara, slot).
Arguments
| Name | Type | Technical Type | Purpose |
|---|---|---|---|
| chara | Dungeon Character | RogueEssence.Dungeon.Character
|
The character to lock the skill of |
| Slot | Integer | System.Int32
|
The slot of the skill to lock |
UnlockSkill
Unlocks a previously locked skill for the specified character, making it possible to be forgotten or replaced during normal gameplay. Argument order is GAME:UnlockSkill(chara, slot).
Arguments
| Name | Type | Technical Type | Purpose |
|---|---|---|---|
| chara | Dungeon Character | RogueEssence.Dungeon.Character
|
The character to unlock the skill of |
| Slot | Integer | System.Int32
|
The slot of the skill to unlock |
SetCharacterSkill
Gives a new skill to a specified character, replacing a specifically chosen slot. Argument order is GAME:SetCharacterSkill(chara, skillID, slot).
Arguments
| Name | Type | Technical Type | Purpose |
|---|---|---|---|
| chara | Dungeon Character | RogueEssence.Dungeon.Character
|
The character to learn the skill |
| skillID | String | System.String
|
The skill to learn |
| slot | Integer | System.Int32
|
The slot to replace |
GetCharacterSkill
Gets the skill from a specified character and specified slot. Argument order is GAME:GetCharacterSkill(chara, slot).
Arguments
| Name | Type | Technical Type | Purpose |
|---|---|---|---|
| chara | Dungeon Character | RogueEssence.Dungeon.Character
|
The character to get the skill from. |
| slot | Integer | System.Int32
|
The slot to get the skill from. |
Returns
The ID of the skill in the slot
CanPromote
Checks if the character can be promoted to a new class. Argument order is GAME:CanPromote(chara).
Arguments
| Name | Type | Technical Type | Purpose |
|---|---|---|---|
| chara | Dungeon Character | RogueEssence.Dungeon.Character
|
The character to check |
Returns
True if the character can be promoted, false otherwise.
GetAvailablePromotions
Gets a list of possible classes that the character can promote to. Returns a lua table of PromoteBranch objects.
Arguments
| Name | Type | Technical Type | Purpose |
|---|---|---|---|
| chara | Dungeon Character | RogueEssence.Dungeon.Character
|
The character to check |
| bypassItem | String | System.String
|
An exception item that can bypass checks for promotion, for "evolution item" |
PromoteCharacter
Promotes a character to a new class.
Arguments
| Name | Type | Technical Type | Purpose |
|---|---|---|---|
| chara | Dungeon Character | RogueEssence.Dungeon.Character
|
The character to check |
| branch | Promote Branch | RogueEssence.Data.PromoteBranch
|
The branch of promotion to use. |
| bypassItem | String | System.String
|
An exception item that can bypass checks for promotion, for "evolution item" |
