Osiris/API/CharacterAddToCharacterCreation
From Divinity Engine Wiki
Full Definition(s)
- query CharacterAddToCharacterCreation([in](CHARACTERGUID)_Character, [in](INTEGER)_Respec,[out](INTEGER)_Success)
Description
Adds _Character to either the initial character creation flow, or allows the controlling player to change the attributes of _Character. Valid values for _Respec are
- 0
- initial character creation at the start of the game
- 1
- complete reset/respec of the character (unused in DOS2, remnant of DOS1; should still work, but untested/unsupported in DOS2)
- 2
- partial respec, as used by the magic mirror on the Lady Vengeance
Return Values
- Success/Failure: Fails if _Character is NULL, otherwise succeeds.
- _Success (order in which the tests are performed):
- 1
- if _Respec is 0 and the initial character creation for _Character has already been done once before (nothing else will happen).
- 0
- if this routine was called from the editor.
- 0
- if _Character is already in character creation.
- 0
- if _Character is a party follower.
- 0
- if trying to do a partial respec (_Respec is 1 or 2) on more than one character at the same time.
- 1
- in all other cases.
Notes
- A character creation level needs to contain specific triggers, see Windemere's tutorial for more information.
- If you wish to use the complete or partial respec functionality, the level in which this happens must also contain the same triggers as a regular character creation level.
- As mentioned above, respec'ing more than one character at the same time is not supported.
- You may wish to disable teleport pyramids in the inventory of characters that are getting respec'ed, both at the time they enter the respec and when pyramids are added to their inventory afterwards.
- If a player is feigning death (status PLAY_DEAD) when they use the respec mirror, remove that status before adding them to the character creation or otherwise you will get visual artifacts.