Skip to content

REDKIT: CPC Quest API functions

Nikita Grebenyuk edited this page Dec 15, 2024 · 4 revisions
  • latent quest function NR_SetNewPlayerAppearance_Q(playerType : ENR_PlayerType, headName : name, appearanceEntries : array<SNR_ApperanceEntry>)

Changes player entity to specified playerType, set head to headName (for custom types) and loads apperance from appearanceEntries (for custom types), and returns control to questgraph only when everything is ready. It is recommended function in most cases.


  • quest function NR_SaveAppearanceSet_Q()

Saves current appearance set, so later player can load it back in player setup scene.


  • quest function NR_SetPlayerTypeChangeLocked_Q(locked : bool, reason : String)

Adds/removes lock for player changing his type with player setup scene or hotkeys. Player can't change his type manually until there is at least one lock.


  • quest function NR_ResetAllAppearanceHeadHair_Q()

Resets all player appearance, including items (for custom types). It means player will have only head loaded after this function.


  • quest function NR_UpdateHead_Q(headName : name)

Updates head with specified headName (item name). It should start with nr_ prefix. List of all heads is in dlc\dlcnewreplacers\data\gameplay\items\nr_def_head_items.xml


  • quest function NR_UpdateAppearanceTemplate_Q(path : String, slot : ENR_AppearanceSlots)

Updates template under specified slot with specified path to w2ent. If path is empty or invalid, it only unloads old entity under slot.


  • quest function NR_UpdateAppearanceItem_Q(path : String, itemIndex : int)

Updates item (misc slot) template under specified itemIndex with specified path to w2ent. If itemIndex == -1 it adds item to the stack. If path is empty or invalid, it only unloads old item entity under this itemIndex.


  • quest function NR_IsPlayerCustom_Q() : bool

-> returns true if player type is custom (Witcher/Witcheress/Sorceress)


  • quest function NR_IsPlayerFemale_Q() : bool

-> returns true if player is Ciri/Witcheress/Sorceress type.


  • quest function NR_IsPlayerGeralt_Q() : bool

-> returns true if player is Geralt (vanilla) type.


  • quest function NR_IsPlayerCiri_Q() : bool

-> returns true if player is Ciri (vanilla) type.


  • quest function NR_IsPlayerWitcher_Q() : bool

-> returns true if player is Witcher (custom) type.


  • quest function NR_IsPlayerWitcheress_Q() : bool

-> returns true if player is Witcheress (custom) type.


  • quest function NR_IsPlayerSorceress_Q() : bool

-> returns true if player is Sorceress(custom) type.


  • quest function NR_IsModVersionEqualOrHigher_Q(minVersion : int) : bool

-> returns true if CPC mod version >= minVersion. Latest CPC version is 302 (v3.0.2).


  • quest function NR_IsPlayerTypeChangeLocked_Q() : bool

-> returns true if there is at least one lock for player type changing (player can't change his type manually, but quest function can).


  • quest function NR_HasPlayerReachedMagicLevel_Q(requiredLevel : ENR_MagicSkillLevel) : bool

-> returns true if Sorceress magic level >= requiredLevel (ENR_SkillNovice, ENR_SkillApprentice, ENR_SkillExperienced, ENR_SkillMistress, ENR_SkillArchMistress).


  • quest function NR_HasPlayerLearnedMagicAction_Q(magicAction : ENR_MagicAction, treatLearningAsLearned : bool) : bool

-> returns true if Sorceress magicAction (spell) is learned/learning.


  • quest function NR_HasPlayerUnlockedMagicActionAbility_Q(magicAction : ENR_MagicAction, abilityName : String) : bool

-> returns true if Sorceress magicAction ability with specified abilityName is unlocked. You can check spell ability names here.


  • latent quest function NR_ChangePlayerLatent_Q(newPlayerType : ENR_PlayerType)

Changes player entity to specified newPlayerType and returns control to questgraph only when everything is ready. It is recommended to use NR_SetNewPlayerAppearance_Q instead, for specifying appearance too.

Clone this wiki locally