[WIPZ] Realistic Economy & Caravanery!

Post » Wed Dec 07, 2011 1:09 pm

Double post (I didn't even hit the button twice, what gives?)
User avatar
Charlie Sarson
 
Posts: 3445
Joined: Thu May 17, 2007 12:38 pm

Post » Wed Dec 07, 2011 4:56 pm

I just found a way to continuously vary the inventories of vendors dynamically via script. Every vendor has a respawning vendor container stashed in a dummy cell and you can add entire leveled lists to them. If you also add a piece of non-playable dummy armor along with the rest of your stuff, you'll be able to tell when the container respawns by checking to see if its still there. If it isn't, re-add the leveled lists to restock your stuff. You could keep track of how much business a vendor has been doing lately, and stock more/better stuff (and caps) accordingly. It would work better with a faster vendor respawn time, maybe daily. There might also be a way to simulate and randomize the business that they get from NPCs.


Just curious but would the chest in Uncle Roe's house do the same? Since each of the caravan vendors (Crow, Wolfgang etc..) have a chest at his place?
User avatar
Solène We
 
Posts: 3470
Joined: Tue Mar 27, 2007 7:04 am

Post » Wed Dec 07, 2011 4:52 pm

Each vendor has two chests, for the most part. One respawning container is designated as their merchant container, and those are all located in a Vendor Chest dummy cell. Those are the ones you'd want to add your goods to. The other container is non-respawning, and it's usually located in the same cell as the vendor. Items in that container can only be bought once - once they leave the container they're gone for good. The caravan vendors move from cell to cell, so I'm pretty sure the containers at Uncle Roe's are never used for sales because they'd only be accessible if the trader in question was inside Uncle Roe's. The only buy-once item that those vendors sell, that I can think of, is the NukaGrenade schematics that Doc Hoff sells, and those are just an item in his own personal inventory, not in a container but on his person.

The local containers at Uncle Roe's are linked to the dummy cell merchant containers, which I think means that opening them gives you access to the linked merchant container. There's some code to remove ammo from the merchant containers in the event that you open the local containers, to prevent the player from getting too rich if they decide to steal the contents. There's also some code though to add a pencil to the local container so that the "[Empty]" tag doesn't show up on mouseover, so I don't think that items placed in the local containers will show up in the merchant containers (Lucky Harith doesn't sell pencils) - and since the local containers are never in the same cell as their caravan merchants, their contents will never show up on the merchant's barter list. So if you want to use this technique, you should probably just use the merchant containers. Single sale items can be added to stationary merchant's local containers, or directly to the inventories of caravan traders.


Regarding this economy overhaul, the OP mentioned going through and resetting the price of each individual item every time the player moved to a new location. Another way to handle this would be to make formlists containing similar items - meats, prewar foods, rare ammo, power armor, etc... You can step through a formlist and adjust all the similar items by the same amount (take the item value of each item in the list and multiply it by an adjustment factor, keeping track of what the current adjustment factor is for that category so that you don't compound adjustments). It's easier to drag and drop a bunch of items into a form list than it is to type each individual one into a script. Also, it might be better to make the adjustments when the player enters conversation with a given merchant, rather than when they enter a new location. It might be easier to keep track of, plus you might not want all vendors in a given cell to have the same prices.
User avatar
Toby Green
 
Posts: 3365
Joined: Sun May 27, 2007 5:27 pm

Previous

Return to Fallout 3