one question on modding

anima36

Warlord
Joined
Aug 15, 2006
Messages
141
im thinkin of making a map for me and my friends to play on and there is one thing i would like to be able to add, can u make resources like wheat give your cities more bushels of food aswell as the health bonus. for example a city farms the surrounding squares to get 20 food per turn but can u make it so if it is supplied with grain it gets 22 food per turn.

thanks
 
yeah i have the xml up now but im trying to find out how do u just add a line saying

<iFood>2</iFood> in the appropiate resource
 
It depends. Is the <iFood> tag already present within that particular XML file? If not, then you will need to go into the CvInfos.cpp file of the SDK and add a Yield tag for bonus resources-and that is just for starters! If yes, then it should be just as easy as you described ;).

Aussie_Lurker.
 
you have to go to the <iYield change> line. There are three. The first for food, second one production and last commerce.
 
the <iYield> tags are for the bonuses they give to the land they are on i think. i will check this but i think i may have to do something in SDK which could be complicated.
 
you are right. but then I don't know what you want to do exactly?
to change the outcome of city farms you have to do something in SDK
as Aussie Lurker described, I think.
 
could anyone suggest where i could start with this will i have to download an sdk editor and which file needs changing if i can see how it is done with happiness and health i can work out how to do it with food.
 
you can change the values of food,production and commerce of each bonus in the CIV4BonusInfo.xml.there u go to the line as I described before.
If you want to change the profit of building a farm or building a farm on a rice bonus terrain, you have to go to the CIV4Improvement.xml.there you can change all improvement values.General improvement value changes at <PrereqNatureYields> and specific changes for bonuses at <BonusTypeStructs>.So for doing such things there is no need to change something in the SDK, is there?
 
im talking about an affect with food like the affects with happiness and health if u supply a city with incense it gets happier however far away it is from the source i wanted to create a similar affect with food when a city is supplied with wheat for example along with the already present health bonus.
 
anima36 said:
im talking about an affect with food like the affects with happiness and health if u supply a city with incense it gets happier however far away it is from the source i wanted to create a similar affect with food when a city is supplied with wheat for example along with the already present health bonus.

Well, I'm sure that for a quick and dirty approach if you modify in CvEventManager the doCityTurn function to count how many of those bonuses that a city has and change their total food (using changeFood) you could probably get the affect you want.

Of course, you'd be hard pressed to only use python to have these affects actually show up in any of the interfaces (such as being included into the calculation when showing the growth bar and determining turns until next city growth, etc.). In order to completely do that, you'd have to modify the SDK.
 
Back
Top Bottom