menyalin Posted January 8, 2016 Share Posted January 8, 2016 (edited) I think i found the cause why some story abilities (Half-Pirouette, Invincible and some others) 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' shield2) pack0.dzip/game/1_act1/q106_rishon.w2phase - it's about fight with Letho in first actOpen 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); } if (StrLeft(NameToString(abilityName), 5) == "story") { QAddStoryAbilityToPlayer(NameToString(abilityName)); }}And after this fix "Half-Pirouette" began adding to character after fight with Letho in first act. I didn't test this farther for now, so those who willing may test it themself and share the results here. If someone want make mod for that - do it, i am lazy for this.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 path3) \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 (except dialog ones) have name like "story_s[some_number]_1".PPPPS Sorry for bad endlish. Im russian and not native english speaker. UPDATECompleted game for both pathes, got almost all broken abilities (except "Child of the Night" in first chapter, see below for others).Found only one new bug (but major one) with overpowered "Battle Seasoned" ability. Howtofix: In the pack0.dzip\abilities\geralt_basic.xml: <ability name="story_s6_1" > <endurance_combat_regen mult="false" always_random="false" min="1.05" max="1.05"/>Must be "mult="true"".Thanks for reports. :smile:Now thinking about making completed mod for nexus. Will be good to do it not by whole dzip-archive, but with cmd-file and Gibbed Tools, for changing only needed files in archive and therefore better compatibility with other mods. Will be good if someone help to make readable and grammatically correct description in english. Edited June 29, 2016 by menyalin Link to comment Share on other sites More sharing options...
menyalin Posted January 9, 2016 Author Share Posted January 9, 2016 (edited) \game\2_act2\sq206i_fistfight.w2phase - story_s4 ("Invincible" ability, fistfighting in second act, Iorveth path)Checked, ability gained. Edited June 29, 2016 by menyalin Link to comment Share on other sites More sharing options...
Abhoras Posted January 19, 2016 Share Posted January 19, 2016 Cquest function QAddAbilityToPlayer(abilityName : name){if(!thePlayer.GetCharacterStats().HasAbility(abilityName)){thePlayer.GetCharacterStats().AddAbility(abilityName);}QAddStoryAbilityToPlayer(NameToString(abilityName)); //my addition} Hello thereI tried your fix and it worked for me. After the fight with Letho, I was awarded the Half-Piruethe ability. Thanks Link to comment Share on other sites More sharing options...
menyalin Posted January 20, 2016 Author Share Posted January 20, 2016 (edited) You are welcome. And thank you for report. Also: \game\2_act2\q209i_defending_vergen.w2phase - story_s6 ("Battle Seasoned", Vergen defence, Iorveth path) - checked, ability gained\game\3_act3\sq305_handwrestling.w2phase - story_s17 ("Healthy Diet", Mighty Numa in third act) - checked, gained for drinking anabolics during armwrestling quest Edited January 20, 2016 by menyalin Link to comment Share on other sites More sharing options...
menyalin Posted January 24, 2016 Author Share Posted January 24, 2016 The "Battle Seasoned" ability bugged (overpowered). In the pack0.dzip\abilities\geralt_basic.xml: <ability name="story_s6_1" > <endurance_combat_regen mult="false" always_random="false" min="1.05" max="1.05"/>Must be "mult="true"".Also:\game\3_act3\q305_dagger.w2phase - story_s29, "David", checked, gained for killing elemntal which guards philippa's dagger in "The Spellbreaker" quest. Link to comment Share on other sites More sharing options...
TheTrueCrippleX Posted March 31, 2016 Share Posted March 31, 2016 Just wanted to say Thank You. I implemented your fix and Half-Pirouette unlocked for me. Link to comment Share on other sites More sharing options...
Vazzil Posted May 31, 2016 Share Posted May 31, 2016 Cheers for the fix. I can confirm aswell Half-Pirouette and Battle Seasoned (Roche path). With regards to Invincible, I haven't got it after finishing "Against the Blue Stripes" (Roche path fist fight side quest); that is unless it was meant to unlock during some other quest. Link to comment Share on other sites More sharing options...
menyalin Posted June 29, 2016 Author Share Posted June 29, 2016 (edited) With regards to Invincible, I haven't got it after finishing "Against the Blue Stripes" (Roche path fist fight side quest); that is unless it was meant to unlock during some other quest.Strange. As i recall, i got it on Roche patch in second chapter. After beating Burton, may be. 3) \game\1_act1\q109_assassination.w2phase - story_s22 ("Child of the Night", Loredo assassination, Roche path) - can't gain it even with max stealth approach. Failed to find apropriate code in game scripts either.6) \game\2_act2\sq201_arena.w2phase - story_s6 ("Battle Seasoned", arena fights, second act, Roche path) - checked, got the ability Updated first post. Edited June 29, 2016 by menyalin Link to comment Share on other sites More sharing options...
robertdexter Posted October 12, 2016 Share Posted October 12, 2016 The q106_rishon file is a mess and has a bunch of null crap in it when I open it with Notepad++. Could someone upload that file with the corrections? Link to comment Share on other sites More sharing options...
Feregorn Posted April 20, 2017 Share Posted April 20, 2017 Guys, how can I edit the .w2phase files mentioned here? I open them with Notepad++ and they are a bunch of gibberish with very few legible words...I have extracted them from the latest 3.5 GoG EE of Witcher 2 Link to comment Share on other sites More sharing options...
Recommended Posts