Editing perks with sfall

Magnus

Water Chip? Been There, Done That
Modder
All right! I would like power armors to give 2 and 3 points to Strength instead of 3 and 4, and I'd like to do that with a global script. Here it is:

Code:
//gl_F2WRPowArmorNerf.int

procedure start;
#include "..\sfall.h"

procedure start begin
 if(game_loaded) then begin
  set_global_script_repeat(2);
  set_global_script_type(1);
 end else begin
  //maybe this works?
  set_perk_stat_mag(68, 2);
  set_perk_stat_mag(69, 3);
  //or maybe this works?
  set_perk_str(68, 2);
  set_perk_str(69, 3);
 end
end

It doesn't work. Does anyone have an idea why? I haven't tried editing Perks.ini, but I'd rather not do that for compatibility reasons.
 
set_perk_*stat* is requierment for the perk,not sure about the rest,im sure the engine is adding the str

edit : also those types of functions do not need to be reset,they need to be set once on game load,then just turn the script off(set repeat to 0)

edit : it is possible to simply disable those 2 perks and write a global script that adds and removes str dependant on armor pid,thats what i would do

Nirran
 
Well, I played around with that and you *could* add in the dude_obj script that if the player is wearing PA\APA then you substract points of strenght

so it goes like

Code:
procedure critter_p_proc begin
if (obj_pid(critter_inven_obj(dude_obj, 0)) == 3) then begin
set_critter_stat(dude_obj, STAT_st, -1);
end
end

Where 0 is armor slot and 3 (in the if-then begin line) is Power Armor's PID (if I checked correctly)

Of course it's not so simple, because you may set strenght to a lower level than intended, you'd need to set a variable to ensure that the change is done only when the player is wearing armor and add a line that'll restore the strenght after taking off the armor etc. but it's a start :D
 
I thought it was REALLY easy to change the strength bonus from PA/APA. Anyway, the least you can do it to change APA's perk to the +3 str bonus. I think.

I also thought that it's incredibly easy to have ANY armor with a bonus to any amount of SPECIAL from +1 to +9.
 
Loads of other mods change the Dude's script, I'll try to avoid doing that. If the perks really are impossible to change, I'll use a global script that adds a fake perk combined with a ST reduction instead.
 
Back
Top