Difference between revisions of "Osiris/API/CharacterAddToCharacterCreation"

From Divinity Engine Wiki
Jump to: navigation, search
(Documented CharacterAddToCharacterCreation)
 
m
Line 4: Line 4:
 
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
 
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
 
; 0 : initial character creation at the start of the game
; 1 : complete reset of the character (unused in DOS2, remnant of DOS1; should still work, but untested/unsupported in DOS2)
+
; 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
 
; 2 : partial respec, as used by the magic mirror on the Lady Vengeance
 
===== Return Values =====
 
===== Return Values =====

Revision as of 12:48, 3 November 2017

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

initial character creation at the start of the game
complete reset/respec of the character (unused in DOS2, remnant of DOS1; should still work, but untested/unsupported in DOS2)
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):
    if _Respec is 0 and the initial character creation for _Character has already been done once before (nothing else will happen).
    if this routine was called from the editor.
    if _Character is already in character creation.
    if _Character is a party follower.
    if trying to do a partial respec (_Respec is 1 or 2) on more than one character at the same time.
    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.
See Also