Mario_Dweller
It Wandered In From the Wastes
Is somehow possible to modify dude skills? There is an original FO2 function critter_mod_skill. But it does not work with negative values (-20, MAXINT - 20). They are treated as positive ones. I need to add +10 to all dude skills and then revert them back if some condition passes. And it is possible to modify only 2 skills per perk(using more perks causes they are all visible in the CHAR screen).
In sfall function list there is some function set_critter_skill_mod(CritterPtr, int max, int mod).
But it does not accept 3 arguments (script editor throws an error), it accept only first 2.
So i've found memory offsets of all skills via Cheat Engine. It changes skill values reliably.
Small guns are 0051C4AC and every next 4 bytes are next skills up to 0051C4F0 - Outdoorsman.
So I changed my ddraw.dll to debug one and added to ddraw.ini (is it really needed to use debug version of sfall?)
[Debugging]
...
AllowUnsafeScripting=1
...
And tried in critter_p_proc in obj_dude
write_int(5358764, 10); // should change Small Guns to minimum by SPECIAL + 10 but it does not work
display_msg("value: " + read_int(5358764)); // it does not display anything :-/
I've also tried read/write_byte. Does somebody(Timeslip? )) have an idea where the mistake is? Thanks.
EDIT: It seems those offset functions do not work for me. I have the latest sfall and script compiled with Script Editor from the latest modders pack.
EDIT2: I've compiled sfall and removed that #ifdef TRACE before bool AllowUnsafeScripting... and now it seems to work properly even in non debug version of sfall.
It seems that "AllowUnsafeScripting" options should be in the Misc section instead of Debug section as it is in ddraw.ini in debug version of sfall in modders pack.
In sfall function list there is some function set_critter_skill_mod(CritterPtr, int max, int mod).
But it does not accept 3 arguments (script editor throws an error), it accept only first 2.
So i've found memory offsets of all skills via Cheat Engine. It changes skill values reliably.
Small guns are 0051C4AC and every next 4 bytes are next skills up to 0051C4F0 - Outdoorsman.
So I changed my ddraw.dll to debug one and added to ddraw.ini (is it really needed to use debug version of sfall?)
[Debugging]
...
AllowUnsafeScripting=1
...
And tried in critter_p_proc in obj_dude
write_int(5358764, 10); // should change Small Guns to minimum by SPECIAL + 10 but it does not work
display_msg("value: " + read_int(5358764)); // it does not display anything :-/
I've also tried read/write_byte. Does somebody(Timeslip? )) have an idea where the mistake is? Thanks.
EDIT: It seems those offset functions do not work for me. I have the latest sfall and script compiled with Script Editor from the latest modders pack.
EDIT2: I've compiled sfall and removed that #ifdef TRACE before bool AllowUnsafeScripting... and now it seems to work properly even in non debug version of sfall.
It seems that "AllowUnsafeScripting" options should be in the Misc section instead of Debug section as it is in ddraw.ini in debug version of sfall in modders pack.