Game (functions)/Character Control: Difference between revisions

From PMDOWiki
Imbion (talk | contribs)
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..."
 
Imbion (talk | contribs)
No edit summary
 
Line 1: Line 1:
== GAME:SetCharacterNickname(RogueEssence.Dungeon.Character,System.String) ==
== SetCharacterNickname ==
 
 
Sets a character's nickname


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
}}
|}


* <code>character</code>: The character to rename
== GetCharacterNickname ==
* <code>nickname</code>: The new name
 
== GAME:GetCharacterNickname(RogueEssence.Dungeon.Character) ==
 
 
Gets the character nickname


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
}}
|}


* <code>character</code>: The character to get the nickname from
== CanRelearn ==
 
=== Returns ===
 
The character's nickname
 
== GAME:CanRelearn(RogueEssence.Dungeon.Character) ==


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}}


Checks if the character can relearn any skills.
{| class="wikitable"
{{ArgHeader}}
{{ArgRow
|name=chara
|type=Dungeon Character
|techt=RogueEssence.Dungeon.Character
|purp=The character to check
}}


== CanForget ==


=== Arguments ===
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
}}


* <code>character</code>: The character to check
== CanLearn ==


== GAME:CanForget(RogueEssence.Dungeon.Character) ==


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
}}


Checks if the character can forget any skills.
== 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"
* <code>character</code>: The character to check
{{ArgHeader}}
 
{{ArgRow
== GAME:CanLearn(RogueEssence.Dungeon.Character) ==
|name=chara
 
|type=(Undocumented)
 
|techt=(Undocumented)
Checks if the character can learn any skills.
|purp=The character to prompt for learning.
 
}}
 
{{ArgRow
=== Arguments ===
|name=pastLevel
 
|type=Integer
* <code>character</code>: The character to check
|techt=System.Int32
 
|purp=The level that the character leveled up from.
== GAME:CheckLevelSkills ==
}}
 
|}rom.
 
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 ===
=== Example ===
Line 74: Line 102:
</pre>
</pre>


== GAME:TryLearnSkill ==
== 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.


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"
* <code>chara</code>: The character to learn the skill
{{ArgHeader}}
* <code>skill</code>: The skill to learn
{{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>


== GAME:LearnSkill(RogueEssence.Dungeon.Character,System.String) ==
== 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
}}
|}


* <code>chara</code>: The character to learn the skill
== ForgetSkill ==
* <code>skill</code>: The skill to learn
 
== GAME:ForgetSkill(RogueEssence.Dungeon.Character,System.Int32) ==
 
 
Removed a skill from the specified character.


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
}}
|}


* <code>chara</code>: The character to forget the skill
== LockSkill ==
* <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.


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
}}
|}


* <code>chara</code>: The character to lock the skill
== UnlockSkill ==
* <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.


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
}}
|}


* <code>chara</code>: The character to unlock the skill
== SetCharacterSkill ==
* <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.


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
}}
|}


* <code>character</code>: The character to learn the skill
== GetCharacterSkill ==
* <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.


Gets the skill from a specified character and specified slot. {{FuncUsage|nmspace=GAME|nm=GetCharacterSkill|args=chara, slot}}


=== Arguments ===
=== Arguments ===
 
{| class="wikitable"
* <code>chara</code>: The character to get the skill from.
{{ArgHeader}}
* <code>slot</code>: The slot to get the skill from.
{{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


== GAME:CanPromote(RogueEssence.Dungeon.Character) ==
== CanPromote ==
 
 
Checks if the character can be promoted to a new class.


Checks if the character can be promoted to a new class. {{FuncUsage|nmspace=GAME|nm=CanPromote|args=chara}}


=== Arguments ===
=== Arguments ===
 
{| class="wikitable"
* <code>character</code>: The character to check
{{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.


== GAME:GetAvailablePromotions(RogueEssence.Dungeon.Character,System.String) ==
== 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 prmote to.


=== 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"
}}
|}


* <code>character</code>: The character to check
== PromoteCharacter ==
* <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.


Promotes a character to a new class.


=== Arguments ===
=== Arguments ===


* <code>character</code>: The character to promote
{| class="wikitable"
* <code>branch</code>: The PromoteBranch to promote with
{{ArgHeader}}
* <code>bypassItem</code>: An exception item that can bypass checks for promotion
{{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"