Fallout 2 mod How to make items add skills to the player

Bubbalicious

First time out of the vault
Hi, I'm trying to understand how to make item's give skills to the player. The motion sensor for example gives 20% of outdoor skills but I can't see this bonus in the Mapper editor.

In which file can I see this? I have no idea.

The line of code is this, but I'd like to see it applied to the motion sensor code and possibly reuse it for other items.

critter_mod_skill

int Critter

who (ObjectPtr)

skill (int)

amount (int)

Modifies a given skill in a given critter object (who) by a given amount. Note: this currently is only valid on the player (obj_dude) object.
 
Hi, I'm trying to understand how to make item's give skills to the player. The motion sensor for example gives 20% of outdoor skills but I can't see this bonus in the Mapper editor.
You won't. Many items, only the game engine is processed.
 
To add on that, with Sfall you can script most of such stuff more or less easily. It's a bit more advanced stuff, but not in the rocket science area.
 
Do you know where to find the scripts or files for items? Like the doctor's bag or the first Aid Kit?

They both give bonus skills to the player character.

If I can just find one such file I'll be ok to figure it out but can't seem to find it.

I am using sFall, it is awesome.
 
To add on that, with Sfall you can script most of such stuff more or less easily. It's a bit more advanced stuff, but not in the rocket science area.

Yes I found out how to add skills to an object for example with a use procedure, like in this instance:

procedure use_p_proc begin
display_mstr(100);
give_xp(EXP_NEW_RENO_USE_DERMAL);
critter_mod_skill(dude_obj, SKILL_CONVERSANT, 10);
dude_floater(200);
scr_return(1);
end

but I would like to find the files where I can modify the items so that just carrying the item will add skills to the player, and I haven't found it yet and don't have a clue yet!!! ;)

Need help!!!!
 
That either needs a global script, or you edit obj_dude. Maybe a simple check in the map_update procedure with a variable. So if item x is in dude's inventory, add +y skill and set a variable to remember that. If the item is not in the inventory anymore, reduce the skill and reset the variable. There's probably a couple other (worse and better) ways to handle such a situation.
I don't remember how it was done with the glasses item(s), so maybe a simple proto edit could work as well-- wouldn't work with every item, though. On the other hand, it might be possible to set these proto flags via Sfall.
 
Back
Top