Script that will display extra exp from swift learner perk

Nirran

Vault Senior Citizen
Modder
copy this into a sfall script(GL_Whatever) and compile,it will display the amount of experience gained from swiftlearner perk(s),currently set to the vanilla game swift_learner_mod of 5%,change "perk_mod := .05;" to what ever your mod is,sometimes will be 1 exp point off because of the ssl floor function,generally happens with small values

Code:
procedure start;

procedure start begin
variable math;
variable perk_mod := 0.0;
variable perk_mod_math := 0.0;
variable perk_math := 0.0;
   if(game_loaded) then begin
      set_global_script_repeat(1);
      set_global_script_type(1);
      set_sfall_global("EXP___01", get_pc_stat(2));
   end else begin
      if(get_pc_stat(2) != get_sfall_global_int("EXP___01")) and (has_trait(0, dude_obj, 50))then begin
         perk_mod := .05;
         perk_math := (has_trait(0, dude_obj, 50) * perk_mod);
         perk_mod_math := perk_math + 1;
         math := get_pc_stat(2) - get_sfall_global_int("EXP___01");
         math := math / perk_mod_math;
         math := math * perk_math;
         display_msg("You gain " + floor(math) + " experience from Swift Learner Perk.");
         set_sfall_global("EXP___01", get_pc_stat(2));
      end
   end
end
 
btw this script is included in my custom perks mod,though swift_learner_mod is different(20%)

Nirran
 
now the GL_Swift_Learner.int in my custom perks mod uses variables to determine if my custom perks swift learner perk is in use,in other words if all you want is the display of the extra xp but dont want the custom perks mod,download custom perks and use only GL_Swift_Learner.int,the script will do the rest

Nirran
 
Back
Top