Talk:Character attributes/@comment-5.167.172.54-20160108122326

I think i found the cause why some story abilities (Half-Pirouette, Invincible and some thers) don't apply to player correctly. It's because function mismatch in game scripting. There is two quest functions for adding abilities in "base_scripts.dzip\game\quests\quest_functions.ws": "QAddAbilityToPlayer" and "QAddStoryAbilityToPlayer". For adding story abilities MUST be used "QAddStoryAbilityToPlayer" (because of "_1" adding to ability name needed) but in some quests used "QAddAbilityToPlayer" instead, so adding that current ability just don't work. If you want to verify this, look, for examle, in two files:

1) pack0.dzip\game\1_act1\q101_landing.w2phase - it's about first act landing and going under Triss' shield 2) pack0.dzip\game\1_act1\q106_rishon.w2phase - it's about fight with Letho in first act

Open these files with some text editor (i used Notepad++) and search for string "story_s". You will find string "story_s5" (it's "Cover") in first file close to "QAddStoryAbilityToPlayer" function call (we know, that it's working) and "story_s25" (it's "Half-Pirouette") in second file close to "QAddAbilityToPlayer" (we know, that it's NOT working).

So, i fixed the problem by changing the "QAddAbilityToPlayer" into:

quest function QAddAbilityToPlayer(abilityName : name) { if(!thePlayer.GetCharacterStats.HasAbility(abilityName)) { thePlayer.GetCharacterStats.AddAbility(abilityName); } QAddStoryAbilityToPlayer(NameToString(abilityName)); //my addition }

And after this fix "Half-Pirouette" began adding to character after fight with Letho in first act.

PS For unpacking and packing .dzip files (CookedPC folder) use Gibbed RED Tools (download it from nexusmods.com). For applying fix you need to unpack base_scripts.dzip, edit quest_functions.ws script, save it, pack base_script back and replace old .dzip file with new one.

PPS Other files with possible broken ability addings (al in the pack0.dzip): 1) \game\2_act2\sq206i_fistfight.w2phase - story_s4 ("Invincible" ability, fistfighting in second act, Iorveth path) 2) \game\2_act2\sq206r_fistfight.w2phase - same as above but Roche path 3) \game\1_act1\q109_assassination.w2phase - story_s22 ("Child of the Night", Loredo assassination, Roche path) 4) \game\2_act2\q209i_defending_vergen.w2phase - story_s6 ("Battle Seasoned", Vergen defence, Iorveth path) 5) \game\3_act3\q305_dagger.w2phase - story_s29 ("David", some third act quest) 6) \game\2_act2\sq201_arena.w2phase - story_s6 ("Battle Seasoned", arena fights, second act, Roche path) 7) \game\3_act3\sq305_handwrestling.w2phase - story_s17 ("Healthy Diet", Mighty Numa in third act)

PPPS Story abilities defined in pack0.dzip\abilities\geralt_basic.xml. Thay all have name like "story_s[some_number]_1".

PPPPS Sorry for bad endlish. Im russian and not native english speaker.