View Full Version : Modding the warehouse


woodelf
Oct 02, 2008, 06:48 AM
How would you mod the warehouse so it works properly? Right now the max on each item is simply stupid. There should be a max on total items. No warehouse in the world would fit 200 of item X and then refuse the rest because the other allocated space is for items A, B, and C.

Maybe have normal space be 1000 units, a warehouse goes to 2000, and then the expansion 3000?

Is this possible?

historix69
Oct 02, 2008, 08:03 AM
I remember in Col1 savefiles there was a value for each city holding the number of warehouse-extensions ... setting it to 18 or 19 gave you a storage capacity of 20 times the starting value (-> 2.000) for each commodity. However in game you could build only one extension, so this feature could only be used via a safe-game-editor. Eventually such a variable also exists for Civ4Col-warehouse-extensions ...

For Civ4Col I think it might be easiest to define a few more warehouse-extensions by reusing the graphics instead of changing the program code. Having a max on total items will not really improve gameplay in comparison with just upscaling the max for every item ... it is just a lot of more work to mod. If you just scale the building-costs and storage, it shouldn't be much work.

Example :
-----------
city...........100 -> .100
warehouse....+ 100 -> .200 (buildingcosts = 30)
ext #1.......+ 100 -> .300 (buildingcosts = 90 / 20)
ext #2.......+ 200 -> .500 (buildingcosts warehouse-ext#1 * 2 = 180 / 40)
ext #3.......+ 500 -> 1000 (buildingcosts warehouse-ext#1 * 5 = 450 / 100)
ext #4......+ 1000 -> 2000 (buildingcosts warehouse-ext#1 * 10 = 900 / 200)
(Note : The buildingcosts in this example are extreme. The last extension would cost you more than double the hammers needed for a Ship_of_the_Line (400/300/300). This seems only usefull if you play with unlimited turns. The stationary Wagon_Train instead is kind of really cheap (40/0/0) and gives 2 * +100. Maybe you should base the building costs for extensions more on the warehouse instead of ext#1 (e.g. multiples of 40/20).)

If you use the custom-house-mod you should also check if your new warehouse extensions work as expected with the custom-house.

Sarda3kaa
Oct 02, 2008, 09:13 AM
According to the CIV4BuildingInfos.xml the warehouse is listed as 100 storage, and the warehouse extension as 200 storage, so there must be some sort of multiplier somewere. I don't see any place the default storage amount is. >.>

Polobo
Oct 02, 2008, 09:49 AM
According to the CIV4BuildingInfos.xml the warehouse is listed as 100 storage, and the warehouse extension as 200 storage, so there must be some sort of multiplier somewere. I don't see any place the default storage amount is. >.>

Normal/Default storage is 0, but every colony automatically gets a basic warehouse so in effect the effective default is 100 (multiplied by game speed)

Ideally the SDK would be changed so that warehouse storage parameters would be defined per yield type, including a new yield called YIELD_ANY that would be able to store any overflow of specific goods until full. IF a specific yield storage is full AND the YIELD_ANY storage is full THEN the specific good is sold. Any time a specific storage has room any overflow currently stored in YIELD_ANY is moved to specific storage.

Dom Pedro II
Oct 02, 2008, 09:56 AM
I hadn't really thought about this, but it's a good point. Unfortunately, I'm not sure whether it'll make things better or worse. Because it's easy to say: Okay, I have a 200 unit limit on tobacco, I have 150 units stored, so I can store another 50. As opposed to saying, okay, i have 500 possible storage units, I have 150 units of tobacco, 100 units of coats, and 120 units of cotton, so I can potentially store another 130 units of tobacco (or something else).

And yes, we could add something that says the remaining units of space, but then you've also got to figure out about distributing the remainder across the other commodities you've got coming in.

So while I agree that it's silly for you to lose out if you reach the limit in one item, it seems like it'll actually be more work to manage your resources.

woodelf
Oct 02, 2008, 09:59 AM
I'm thinking guns and horses mostly, but I don't like having to move raw materials around just so I don't lose them before they get turned into commodities. And using wagons as warehouse extensions bugs me for some reason.

I'd like to try out a hard total cap to see if it made it easier/more fun, ect. Is this going to be SDK?

Polobo
Oct 02, 2008, 10:05 AM
*Interface face mod to show the limit for each type.
*Interface mod to show a storage bin for YIELD_ANY (hover over to show types currently in storage since only if a specific yield is full would any of them appear in the YIELD_ANY)
*You are unlike to ever have more production than specific yield storage so apply all negatives first to the specific yields
*Redistribute from YIELD_ANY to the specific yields where possible
*Apply net positives to specific yields
*Upon specific bin overflow try to add to the YIELD_ANY bin first (if it isn't already full - otherwise sell/dump)

The game would internally track total inventory for each specific yield type outside the warehouse so when loading up wagons/ships you would be able to load all goods regardless of their bin.

All the default buildings should provide their specific storage - at say 50 units - and a basic warehouse for 250 or something.

Dom Pedro II
Oct 02, 2008, 10:16 AM
I'd like to try out a hard total cap to see if it made it easier/more fun, ect. Is this going to be SDK?

Yes.

I've also been thinking of adding a "European Warehouse" where you can take goods and store there in the Europe screen. Maybe you could pay rent for it and potentially upgrade it to increase the storage capacity.