[BTS][MODCOMP]Construction Mod

Fanatic Demon

Student in Wizardry
Joined
Aug 6, 2004
Messages
404
Location
The Netherlands
The Goal of this Mod is to allow modders to balance construction with quantative bonus resources.

Main Features:
- 3 Quantative resources: Stone, Iron and Oil which will each generate there own stockpiles
- XML tags for initial resource/gold/food or culture cost for Units and Buildings
- 4 XML tags for each resource that control production bonus, maximum resource bonus cost, maximum source limit and maximum stocpile limit
- 2 XML tags for controlling stockpile production and stockpile Ceiling for Bonus resources

the resource stockpiles are visible next to the gold reserve in top of mainscreen:



current production bonus is visible in city bars and popup:



the Current version 0.5 (made for bts 3.13) can be downloaded from: http://forums.civfanatics.com/uploads/49944/Construction_Mod_0.5.rar

Change Log:
Spoiler :

0.5
- Converted to 3.13
- Added City Bar support
- fixed rounding error
0.4
- Added Culture investment cost
- added maximum source limit usage
- added maximum stockpile limit usage
- added default values
- fixes rounding bug
0.3
- added production bonus for all resource, gold and food
- added maximum resource bonus cost for all resource, gold and food


Technical details:
Spoiler :
This mod will add the following optianly XML tags for CIV4UnitInfo.xml and CIV4BuildingsInfo.xml

iGoldCost - Gold investment cost
iGoldBonusMod - Gold production bonus modification
iGoldBonusMax - Gold production bonus requirement
iGoldBonusSourceLimit - Gold production source %limit default 50
iGoldBonusBufferLimit - Gold production stockpile % limit default 0
iCultureCost - Culture investment cost
iFoodCost - start Food cost
iFoodBonusMod - Food production bonus modification
iFoodBonusMax - Food production bonus modification
iFoodBonusSourceLimit - Food production city source % limit default 50
iFoodBonusBufferLimit - Food production city stockpile % limit default 0
iStoneCost - Stone investment cost
iStoneBonusMod - Stone production bonus modification
iStoneBonusMax - Stone production bonus modification
iStoneBonusSourceLimit - Stone production source % limit default 100
iStoneBonusBufferLimit - Stone production stockpile % limit default 100
iIronCost - Iron investment cost
iIronBonusMod - Iron production bonus modification
iIronBonusMax - Iron production bonus modification
iIronBonusSourceLimit - Iron production source % limit default 100
iIronBonusBufferLimit - Iron production stockpile % limit default 100
iOilCost - Oil investment cost
iOilBonusMod - Oil production bonus modification
iOilBonusMax - Oil production bonus modification
iOilBonusSourceLimit - Oil production source % limit default 100
iOilBonusBufferLimit - Oil production stockpile % limit default 100

Civ4BonusInfo.xml:

iResourceProduction - Maximum resource that is added to the stockpile each turn (default 1)
iResourceCeiling - Maximum bonus resource stockpile ceiling (defalut 10)
 
Joined
Jul 28, 2006
Messages
4,016
Very nice! Might you consider expanding this later on to allow user-defined quantified resources? That is, is it possible to arrange it so that in XML one could automatically set which resources are counted and which aren't?

How exactly does the AI handle trade under this new system? Does it recognize it needs stockpiles?
 

Fanatic Demon

Student in Wizardry
Joined
Aug 6, 2004
Messages
404
Location
The Netherlands
Very nice! Might you consider expanding this later on to allow user-defined quantified resources? That is, is it possible to arrange it so that in XML one could automatically set which resources are counted and which aren't?
Yes, I'm working on that, but it is kinda tricky. However, I will try to make it as easy as possible

How exactly does the AI handle trade under this new system? Does it recognize it needs stockpiles?
Not much. Trade is general the same as normal. If you are in possesion of a resources and haven't traded it, it will generate resource every turn which you can use for construction. The same goes for the AI, if he gains a trade resource by trade from you, it will autoamicly generate resources for him, as if he owned it. Resources bonuses, are like white holes in the sense who ever uses them, gains the benefits. The advantage of this that it won't require much modification of the AI except that he will want to have a buy resource bonuses more if he is low on stokepile, and will want to trade it, if he has it in abundance.

About trade, I could use some help, if anyone could tell me how to modify the trade screen to trade resource stockpiles, I would be very thankful
 
Joined
Jul 28, 2006
Messages
4,016
Can't you use the gold lump sum option as a base? I'm not too familiar with modding the trade screen.

These are all up-front costs, I presume, not per turn costs? The reason I ask is that I was thinking of combining this with the building resource converter mod, so you could take in 1 iron per turn and make it into 1 steel. Trouble is, what happens when your stockpile reaches zero?
 

Fanatic Demon

Student in Wizardry
Joined
Aug 6, 2004
Messages
404
Location
The Netherlands
No the Mods, currently support 2 methods of using resource Bonuses:
A: Initial cost, which have to be met, in order to start construction
B: Gradual resource cost based on the avialability on bonus resource stockpile

Let me clarify with an Example.

Let's say you want to build a Swordsmen, which has a Start cost of 10 iron (iIronCost = 10) and 100% production bonus (iIronBonusMod = 100) at a cost of 10 iron (iIronBonusMax = 10)
Then total Iron cost after you completed the unit and Iron supply was suficient, will be 10 Initial cost + 10 productivity bonus cost = 20 Iron cost.

For option A, I could introduce a gold conversion change rate for Buildings (like the marketplace) which will allow you to pay the iron investment price with gold. That way, you can also start production without iron resource but at a considerable higher overal cost. Note that without iron you will neither benefit from the the iron resource bonus, making production also much slower. For example, that Swordsmen, which would take 5 turns to with sufficient access to iron (paying 2 iron each turn), will take 10 turns without iron and with a (1:2) market exchange rate for iron, it will cost you another 10 x 2 = 20 gold. :eek:
 

bergrar

Warlord
Joined
Apr 19, 2004
Messages
194
Location
italy
I thought long time ago, to ask for a mod about strategic resources, is very important in modern ages, and i thought at some strategic deposit for them, when i play in modern ages i feel that resources are undervalued a lot, your mod will solve it for sure.
but if you can add some buildings where resources could be stored, with a percentage of storing, more you store more building you will need,that will give a programmed time for a war.
If i know that i have iron or oil for 100 turns i have to make my battle plans according to them, till i don't get the resource that i am fighting for.
Thank anyway for your developing mods that help to make civ4 more great.
 

Fanatic Demon

Student in Wizardry
Joined
Aug 6, 2004
Messages
404
Location
The Netherlands
but if you can add some buildings where resources could be stored, with a percentage of storing, more you store more building you will need,that will give a programmed time for a war.
If i know that i have iron or oil for 100 turns i have to make my battle plans according to them, till i don't get the resource that i am fighting for.
Thank anyway for your developing mods that help to make civ4 more great.

I had already planned to introduce some XML resource tags for buildings, which allows it to increase the Resource stockpile ceiling. However, to implement it properly I would need some 3D models of buildings specificly for this goal, like Oil Silos and Warehouses.

What I also Like to introduce are More Mining Improvements which can generate improved output. For example, An Oil Drilling improvement with 2 or more pumps. This would players to increase Oil production.

Unfortunatly I can't do any 3D :( So I would realy appreciate if any gifted 3D artist would help me. :mischief:
 

bergrar

Warlord
Joined
Apr 19, 2004
Messages
194
Location
italy
hi
i can do 3d but i don't know if i know the way for make them usable in civ4.
can you show me a thread with a example of it, so i can see if i have the right tools for them, i can make easy animation for wonders and movies but i never tried to do a building
anyway what building do you need and which kind of format you need them.
 

bergrar

Warlord
Joined
Apr 19, 2004
Messages
194
Location
italy
i need to know if any1 knows a converter from obj 2 nif
 
Joined
Jul 28, 2006
Messages
4,016
Why do you need new building art? There are already great 3D models in the database of Oil Refineries and whatnot that would be perfect! ;)
 

Fanatic Demon

Student in Wizardry
Joined
Aug 6, 2004
Messages
404
Location
The Netherlands
Why do you need new building art? There are already great 3D models in the database of Oil Refineries and whatnot that would be perfect! ;)

Storing Oil near refineries? That's actualy a very good Idea. It's so simple I forgot all about it. similary I can use steel mills to store iron. and a construction yard to store stone.

However, I still could use a whole lot of extra models for improvment.

For exapmle I could use a modern day version of the water mill to generate electic power. But why stop there, shouldn't all power plant be build outside the city, like nuclear power plants. However, as your city increases, you need more power, and therefore larger power plants. It would therefore be helpfull to have multple levels of powerplants of the same type. For example, a level 1 coal plan would produce 10 MW, while a level 2 would producede 20MW and a level 3 coal plant 40MW. TO reprecent this effectivly we would need seperate models for each Power plant level, so it becomes visualy recognisable
 

Viniloss

Chieftain
Joined
Sep 11, 2007
Messages
49
What an amazing idea! =) Stockpiles! I hope you can make this works very well!!! I ll check it now.

Do you know if there is a possibility to make the resource one day finish?! Like, i have one source of iron, and this source has like 1000 units of iron. I can explore this and just that. Like in the real world... This probably woud create interesting wars... :)

Anyway, for the moment, Gratz! Very good work you done till now! :)
 

Fanatic Demon

Student in Wizardry
Joined
Aug 6, 2004
Messages
404
Location
The Netherlands
What an amazing idea! =) Stockpiles! I hope you can make this works very well!!! I ll check it now.

Do you know if there is a possibility to make the resource one day finish?! Like, i have one source of iron, and this source has like 1000 units of iron. I can explore this and just that. Like in the real world... This probably woud create interesting wars... :)

Anyway, for the moment, Gratz! Very good work you done till now! :)
To create a one turn finish unit simply set the unit production iCost> to 1 and add the desired resource xml tag like <iIroncost>
 

Fanatic Demon

Student in Wizardry
Joined
Aug 6, 2004
Messages
404
Location
The Netherlands
A, you mean realy deplete a resource. Well, the current version doesn't support that but it certainly could be implemented. The problem however, is that it will be kind of hard to balance. Because how to know how much a resource should deliver to prevent the world runs out of oil too soon? Then there is the problem that you do not want all oil resources being equal. A map maker, would therefore have to be able to set every oil resource maximum quantity. This could be done with python, if nessisary, at run time.
 
Joined
Nov 23, 2006
Messages
3,396
I thought last month that an event can help to balance this kind of thing i.e. when a resource is depleted there is a reasonable chance it respawns in the same tile provided you managed to get a technology like geology or steam power (if no new tech). The respawning can be delayed and nothing will happen after the delay expires.
What do you think ?
 
Top Bottom