Game (functions)/Character Control

From PMDOWiki
Revision as of 21:05, 17 January 2026 by 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...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

GAME:SetCharacterNickname(RogueEssence.Dungeon.Character,System.String)

Sets a character's nickname


Arguments

  • character: The character to rename
  • nickname: The new name

GAME:GetCharacterNickname(RogueEssence.Dungeon.Character)

Gets the character nickname


Arguments

  • character: The character to get the nickname from

Returns

The character's nickname

GAME:CanRelearn(RogueEssence.Dungeon.Character)

Checks if the character can relearn any skills.


Arguments

  • character: The character to check

GAME:CanForget(RogueEssence.Dungeon.Character)

Checks if the character can forget any skills.


Arguments

  • character: The character to check

GAME:CanLearn(RogueEssence.Dungeon.Character)

Checks if the character can learn any skills.


Arguments

  • character: 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

  • chara: The character to prompt for learning.
  • oldLevel: The level that the character leveled up from.

Example


GAME:CheckLevelSkills(player, 5)

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

  • chara: The character to learn the skill
  • skill: The skill to learn

Example


GAME:TryLearnSkill(player, "thunder")

GAME:LearnSkill(RogueEssence.Dungeon.Character,System.String)

Gives a new skill to a specified character. Fails if the character's skills are full.


Arguments

  • chara: The character to learn the skill
  • skill: The skill to learn

GAME:ForgetSkill(RogueEssence.Dungeon.Character,System.Int32)

Removed a skill from the specified character.


Arguments

  • chara: The character to forget the skill
  • slot: 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

  • chara: The character to lock the skill
  • slot: 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

  • chara: The character to unlock the skill
  • slot: 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

  • character: The character to learn the skill
  • skillId: The skill to learn
  • slot: The slot to replace

GAME:GetCharacterSkill(RogueEssence.Dungeon.Character,System.Int32)

Gets the skill from a specified character and specified slot.


Arguments

  • chara: The character to get the skill from.
  • slot: 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

  • character: 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

  • character: The character to check
  • bypassItem: 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

  • character: The character to promote
  • branch: The PromoteBranch to promote with
  • bypassItem: An exception item that can bypass checks for promotion