Adding new created items to merchants/NPCs

Estacado

First time out of the vault
Hello there!

I've created some new items with f2wedit and want to bring them ingame. But not into specific places (so I think I don't have to change any maps) rather to NPCs (random encounters, traders).

How can I add items to a merchants "trade-list" or to NPCs Inventory generally? I think I have to change already existing scripts so I used the Fallout Script Editor and just opened the file "dctubby.ssl" cos I wanted to try add items to Tubby in Den. I've found several other features like requirements for special dialogs but nothing what has got anything to do with his offer.

Yep, I'm a newbe in modding and all that stuff but I thought I might give it a try.

Can somebody help me with my little problem?


PS: I've found another thread cutting my problem but all answers were very common in reference to scripting.

PPS: Please, don't complain about language, english isn't my native language ^^
 
The easiest way if you want to add object to npc is with the mapper.
Just select the critter you want to add the object to, click edit, add to inventory, and your object should be at the end of the list, if you barter with him, he will have it in his inventory

If you want to add it to trader, then you indeed have to use some box scripts, cause Trader use a different inventory than their own (stealing matter). With tubby, it is the script DITUBBOX, who looks like this:

procedure map_enter_p_proc begin
/* Set up the door state when the player first enters the map */
den_tubby_box_obj := self_obj;
if (is_loading_game == false) then begin
if (local_var(LVAR_RESTOCK_TIME) < game_time) then begin
item_caps_adjust(self_obj, random(151, 161) - self_caps);
check_restock_item(PID_JET, 5, 10, 100)
check_restock_item(PID_PSYCHO, 0, 2, 100)
check_restock_item(PID_BUFFOUT, 0, 1, 100)
check_restock_item(PID_10MM_PISTOL, 1, 2, 100)
check_restock_item(PID_10MM_JHP, 2, 4, 100)
check_restock_item(PID_10MM_AP, 0, 2, 100)
check_restock_item(PID_BRASS_KNUCKLES, 1, 1, 100)
check_restock_item(PID_LEATHER_JACKET, 1, 1, 100)
check_restock_item(PID_STIMPAK, 2, 5, 100)
check_restock_item(PID_10MM_SMG, 0, 1, 100)
check_restock_item(PID_DESERT_EAGLE, 1, 2, 100)
check_restock_item(PID_SLEDGEHAMMER, 0, 1, 100)
check_restock_item(PID_RADAWAY, 0, 3, 100)
set_local_var(LVAR_RESTOCK_TIME, (random(1, 2) * ONE_GAME_DAY) + game_time);
end
end
end



Just add your line at the end
check_restock_item(PID_Howessam_Weapon, 1, 2, 100).


Of course, for both methode, you must have created the weapon (written the PID_ in the PID list, etc, etc), or it won't work, but I suppose you 've done that.
 
Thanks for the answer! I've added an item to a NPC and a bookcase, I've saved the map, started Fallout and load a savegame but the items aren't there. How can I fix it?
 
By not loading a savegame.
To be sure, press f8 on the mapper, that would emulate the game and allow you to see the items are really there.
Or start a new game and check it out.
 
Okay, it works. But is there a way to adding items without starting a new game or rather get items available for current savegames?
 
Mmm...
You should check the download/files section, I think there is an Inventory Editor somewhere in the fallout 2 mod/util something.
 
Estacado said:
Okay, it works. But is there a way to adding items without starting a new game or rather get items available for current savegames?
Here is a way to test it:
1) Run F2, press Ctrl+R in the main menu;
2) Choose the map you want to investigate;
3) Save the game;
4) Press Ctrl +R;
5) Load the game you just saved and everything should work just as in any normal game;
 
Yes, that all works. But I want to use my current savegame/character and story/quest progress.

If I do it that way you mentioned above I start from zero with Narg.

And the Inventory Editor doesn't help cos it seems to only change my inventory, not those of NPCs or containers.
 
Estacado said:
Yes, that all works. But I want to use my current savegame/character and story/quest progress.

If I do it that way you mentioned above I start from zero with Narg.

And the Inventory Editor doesn't help cos it seems to only change my inventory, not those of NPCs or containers.
Try F2se.
 
Unfortunately it doesn't help. A good program, though (thanks for the link ;) ). I can nealy change every variable for the maps and for my character but nothing's fit.

I try to explain a concret example: I've created a new armor and put in a bookshelf (which I've looted in my savegame before) and also in the inventory of a trader. In testmode it works and the items are there. But I want this got to work for my savegame so I'm able to load my savegame, just right walk into the store, be able to loot the bookshelf and be also able to get that item from the NPC. But in my savegame neither the bookshelf nor the NPC got that item. (I think the reason is that every savegame got seperate saved maps in it, which I cannot change)

And F2se doesn't help me :(
 
Estacado said:
(I think the reason is that every savegame got seperate saved maps in it, which I cannot change)(
Yes you can. Just use gzip to decompress the *.sav maps and open them in the Mapper, do your changes and gzip it back up.

Or the easier but not really proper way: Start like hakimio said
1) Run F2, press Ctrl+R in the main menu;
2) Choose the map you have edited;
3) Save the game;
4) Exit.
5) Copy the *.sav map from the save you just made into the saveslot you want to have your updated map in. (Note that you should not be on that map in the save you want to change, so go leave the map first.)
 
Back
Top