Difference between revisions of "Osiris/API/CharacterAddSkill"

From Divinity Engine Wiki
Jump to: navigation, search
(Documented CharacterAddSkill)
 
m
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 
===== Full Definition(s) =====
 
===== Full Definition(s) =====
* Helper proc '''CharacterAddSkill'''(''(CHARACTERGUID)'''''_Character''', ''(STRING)'''''_Skill''')
+
* (Shared Mod) call '''CharacterAddSkill'''(''(CHARACTERGUID)'''''_Character''', ''(STRING)'''''_Skill''')
 
* call '''CharacterAddSkill'''(''(CHARACTERGUID)'''''_Character''', ''(STRING)'''''_Skill''', ''(INTEGER)'''''_ShowNotification''')
 
* call '''CharacterAddSkill'''(''(CHARACTERGUID)'''''_Character''', ''(STRING)'''''_Skill''', ''(INTEGER)'''''_ShowNotification''')
 
===== Description =====
 
===== Description =====
Adds '''_Skill''' to '''_Character'''. If '''_ShowNotification''' is '''1''' and '''_Character''' did not yet know this skill (or only currently knew it because it was granted by e.g. an equipped item), then a notification will be shown that it has learned the skill. If '''_ShowNotification''' is '''0''', no notification will ever be shown.
+
Adds '''_Skill''' to '''_Character'''.
 +
 
 +
''(New parameter in DOS2 Patch 6)'' If '''_ShowNotification''' is '''1''' and '''_Character''' did not yet know this skill (or only currently knew it because it was granted by e.g. an equipped item), then a notification will be shown that it has learned the skill. If '''_ShowNotification''' is '''0''', no notification will ever be shown.
  
If '''_ShowNotification''' is not specified, it will default to '''1'''.
 
 
===== Notes =====
 
===== Notes =====
* The skill names are defined in the [[Skill_creation|stats]].
+
* If the skill to be added or the character are not valid, nothing happens.
* If the Talent to be added or the Character are not valid, nothing happens.
+
* If '''_ShowNotification''' is not specified, it will default to '''1'''.
* The '''_ShowNotification''' parameter is new in DOS2 Patch 6.
+
* The skill names are defined in the [[Skill_creation|stats]]. Do not forget add to the skill type prefix to the skill name, e.g. "Projectile_EnemyFireball" rather than just "EnemyFireball".
 
===== See Also =====
 
===== See Also =====
 
* [[Osiris/API/CharacterHasSkill|CharacterHasSkill]]
 
* [[Osiris/API/CharacterHasSkill|CharacterHasSkill]]
Line 28: Line 29:
 
* [[Osiris/API/SkillDeactivated|SkillDeactivated]]
 
* [[Osiris/API/SkillDeactivated|SkillDeactivated]]
 
    
 
    
[[Category:Osiris Calls|CharacterAddTalent]]
+
[[Category:Osiris Calls|CharacterAddSkill]]

Latest revision as of 09:44, 23 February 2018

Full Definition(s)
  • (Shared Mod) call CharacterAddSkill((CHARACTERGUID)_Character, (STRING)_Skill)
  • call CharacterAddSkill((CHARACTERGUID)_Character, (STRING)_Skill, (INTEGER)_ShowNotification)
Description

Adds _Skill to _Character.

(New parameter in DOS2 Patch 6) If _ShowNotification is 1 and _Character did not yet know this skill (or only currently knew it because it was granted by e.g. an equipped item), then a notification will be shown that it has learned the skill. If _ShowNotification is 0, no notification will ever be shown.

Notes
  • If the skill to be added or the character are not valid, nothing happens.
  • If _ShowNotification is not specified, it will default to 1.
  • The skill names are defined in the stats. Do not forget add to the skill type prefix to the skill name, e.g. "Projectile_EnemyFireball" rather than just "EnemyFireball".
See Also