help please

Nirran

Vault Senior Citizen
Modder
why isnt this working with critter as obj?works when i insert dude_obj

Code:
procedure Scrounger_Perks(variable critter)
begin
   critter_flags := get_proto_data(obj_pid(critter), 32);
   //display_msg("Fired");
   if (not(critter_flags bwand 32)) then begin
      if (has_fake_perk(ExtraGold) and (get_sfall_global_int(182) == 1)) then begin
         item_caps_adjust(critter, get_sfall_global_int(183) * has_fake_perk(ExtraGold));
         //add_mult_objs_to_inven(obj_dude */critter*/, create_object_sid(PID_BOTTLE_CAPS, 0, 0, -1), (get_sfall_global_int(183) * has_fake_perk(ExtraGold)));
         //display_msg("Settings : " + get_sfall_global_int(183) * has_fake_perk(ExtraGold));
      end
      if (has_fake_perk(ExtraAmmo)) then begin
         call has_weapon(critter);
      end
   end
end

and this is calling function

Code:
      critter := get_sfall_arg;
      ...
         call Scrounger_Perks(critter);

when set to add to dude it works correctly

edit : this is in an ondeath hook
 
Last edited:
I wish I could tell you... but you're the one who's always helping me out!

I'm not all that smart on sfall scripting/procedures. The code must be good. So, is that just a limitation of sfall: that perks can't be added to critters?

Can other extra perks be added to critters? Or, is it just this particular script which is not firing correctly?
 
found the problem,seems if the critter pro isnt set to be lootable and is set lootable with scripting,the adjust_caps function reads from the pro file and doesnt add the caps

Thank You Mibb
 
I'm glad you figured it out. I look forward to stealing... er, I mean, implementing your work into the MM. ;)
 
Screenshot 2023-02-02 091245.png
I'm glad you figured it out. I look forward to stealing... er, I mean, implementing your work into the MM. ;)
join the club,i am too

next problem,trying to set exit grids back and forth between 2 maps,mapper crashes with this message

when trying to move to map number 266,correctly set on the origin map,double checked

edit : this is the map txt file with 266 defined

edit : meh reverted my files to before the swap an dit crashes with files i know work

edit : is this a known limititation of the mapper?checking exit gridsa after a certain map num?

edit : whoops wrong ss,corrected
 

Attachments

Last edited:
View attachment 26862
join the club,i am too

next problem,trying to set exit grids back and forth between 2 maps,mapper crashes with this message

when trying to move to map number 266,correctly set on the origin map,double checked

edit : this is the map txt file with 266 defined

edit : meh reverted my files to before the swap an dit crashes with files i know work

edit : is this a known limititation of the mapper?checking exit gridsa after a certain map num?

edit : whoops wrong ss,corrected

I think 255 maps is the max.
 
Back
Top