Agriculture

civ4modnoob

Chieftain
Joined
Nov 8, 2007
Messages
4
Ok I have been playing Civ4 for some time now. One of the things that has really bugged me about the game is how it deals with agriculture.

My main gripe is that there should be a significant agricultural output advantage to a civilization that domesticates horses and cattle.

Now that I have downloaded the SDK and am ready to start coding, though there are two things that stop me:

1) where do I begin?
2) what is the best way to ensure that the balance of the game is not altered completely.

Thanks
 
Another idea would be to add buildings that have additional effects with cattle, or buildings / wonders / units (Burning Pigs :P) that require certain kind of cattle... This could be interesting, but does not need SDK work as well.
 
I've created a mod that gives yield bonuses to improvements when you have particular resources or resource classes (i.e. livestock as opposed to horses and cows specifically).
 
I guess if I were adding a bonus to obtaining livestock then it would simply be an xml tweak.

But to add an entire agricultural tech tree would be quite something else. I think I need to decide what I am going to do first!

Just a general question. Does anyone have any pointers on how to test mods? I mean, if I mod something that only takes effect later in the game does that mean I have to play all the way through just to test it?

Thanks.
 
Well, what is it that you want to do exactly? My understanding was that you wanted those with livestock to get a bonus.... so with this, you discover Domestication, create a Pasture on a Horse or Cow, and you get +1 X amount food to your Farms... This is currently not doable, but my mod allows it to be done.

If you want new techs, that's easy enough to do. The game already gives you that functionality. You can even make it so that the techs give additional yield output from your improvements.
 
If you want to add new techs, look in the Civ4TechInfos.xml. You'll need to add new entries here. If you want to add additional yield to your Farms with the discovery of new technologies, go to CIV4ImprovementInfos.xml and look for the tag <TechYieldChanges>. In the case of farms, it should already be getting +1 Food from Biology.

However, if you want to have it give an extra Food when you get a supply of Horses or Cows, there's currently no way to do this. Not without modding the SDK... which in this case I've already done because I really wanted a supply of draft animals to increase the yield output of Farms and Mines.

You could just give additional yield from Animal Husbandry, but that doesn't guarantee that you actually have Horses or Cows... just that if you did, you'd know how to make more of them. It would be like having Horse Archers coming with Horseback Riding but then not requiring a supply of Horses to build them.
 
Or simply make cattle/horses prerequisites for new terrain improvements.
A cattle farm might give a +1 bread without irrigation, and +2 bread with irrigation.

On horse resources, I always imagined the designers meant areas that implied initial domestication of horse ancestors, and then the breeding of top warhorse breeds. There are quite a spread of traits among horse breeds.
With horseback riding, I'd think that implies a lot of study about horses and breeding them, that I'd mod that stables double as horse resources (so perhaps +3 hammer for building a stable), so that there's then no longer a critical need to maintain the original horse pastures. Either that, or horse resources should become even more common with the discovery of horseback riding.

Another idea would be to add buildings that have additional effects with cattle, or buildings / wonders / units (Burning Pigs :P) that require certain kind of cattle... This could be interesting, but does not need SDK work as well.
 
There's all sorts of fun things you can do with the SDK. I have a little change in there that allows all health bonuses to be discovered in a tile with the appropriate improvement (much like mines discovering minerals) as long as you have access to the bonus. So, for instance, if you build a pasture on a tile with no livestock and then trade for horses there is a chance of them 'spreading' to your empty pastures.
 
Or simply make cattle/horses prerequisites for new terrain improvements.
A cattle farm might give a +1 bread without irrigation, and +2 bread with irrigation.

Well, among other things my mod does, is adds Resource prerequisites for build types (not improvement types though). I did this because I was annoyed by the fact that I need Iron Working to clear jungles, but I didn't actually need Iron. What's the point of that??

On horse resources, I always imagined the designers meant areas that implied initial domestication of horse ancestors, and then the breeding of top warhorse breeds. There are quite a spread of traits among horse breeds.
With horseback riding, I'd think that implies a lot of study about horses and breeding them, that I'd mod that stables double as horse resources (so perhaps +3 hammer for building a stable), so that there's then no longer a critical need to maintain the original horse pastures. Either that, or horse resources should become even more common with the discovery of horseback riding.

You could make it so that Stables give free horse resource... the problem I see with this is that you build 1 Stable, and it will satisfy your horse needs for all your cities. Build 2 Stables and you now have an additional horse to trade, and pretty soon, you're going to have 10 supplies of horses and it'll be pointless to have the Horse bonus in the game.

My suggestion is another SDK change where buildings can be made to give the bonus only in that city. Corporations have led to new code for limiting resources on a city by city basis, so it shouldn't be too difficult to add the ability for buildings to limit free resources to the cities they're built in.
 
I think that that's actually ok, given that horse use has spread much farther than their initial environment at the time of their initial domestication. Horse precursors evolved in the Americas, but became extinct, yet horses are used all over the Americas. Horses are one resource in which is it reasonable for them to spread, they are living and reproducible, unlike ores.
A similar model for the crop resources would actually be reasonable as well, but isn't needed since the health they give is a generalized effect. A similar model would be reasonable for the plantation luxuries, though perhaps Biology should be the requirement for that.
Although reproducing resources defeats the power that the possessor has, it's not game-breaking or unhistorical to allow cultivated spread of reproducible resources. For instance during the silk road days, the process of making silk was highly guarded by the Chinese, and something that the Europeans tried to steal through espionage.

You could make it so that Stables give free horse resource... the problem I see with this is that you build 1 Stable, and it will satisfy your horse needs for all your cities. Build 2 Stables and you now have an additional horse to trade, and pretty soon, you're going to have 10 supplies of horses and it'll be pointless to have the Horse bonus in the game.
 
I think that that's actually ok, given that horse use has spread much farther than their initial environment at the time of their initial domestication. Horse precursors evolved in the Americas, but became extinct, yet horses are used all over the Americas. Horses are one resource in which is it reasonable for them to spread, they are living and reproducible, unlike ores.
A similar model for the crop resources would actually be reasonable as well, but isn't needed since the health they give is a generalized effect. A similar model would be reasonable for the plantation luxuries, though perhaps Biology should be the requirement for that.
Although reproducing resources defeats the power that the possessor has, it's not game-breaking or unhistorical to allow cultivated spread of reproducible resources. For instance during the silk road days, the process of making silk was highly guarded by the Chinese, and something that the Europeans tried to steal through espionage.


The problem is that resources in the game are unlimited. One source satisfies every city. If you build multiple Stables, there would be zero opportunity for the enemy to be able to cut off your supply of horses. I find it very useful in my games to be able to prevent the training of Knights/Cavalry by my enemies.

Horses might have been somewhat ubiquitous in societies with horses, but there was a finite number of them. In the Civil War, for example, the availability of horses and other draft animals impacted the war in the favor of the North which had far more of such animals than the South. So I should be able to reduce the enemy's capacity to field cavalry just like any other unit.

If Stables limit Horses to the specific city they're built in, this would mean that only certain cities would have stables, and if the Horse improvement is lost to the enemy, no more Stables will be able to built in other cities. So it prevents a total stoppage of cavalry unit production, but it allows for the attacker to limit it.

I think it would also be a good tool to use for Bronze, which I would like to see as it's own resource. You could build a Bronzesmith that would convert Copper into Bronze, but that supply of Bronze would only apply to that city, and so you would actually need more than one.
 
A similar model for the crop resources would actually be reasonable as well, but isn't needed since the health they give is a generalized effect. A similar model would be reasonable for the plantation luxuries, though perhaps Biology should be the requirement for that.
Although reproducing resources defeats the power that the possessor has, it's not game-breaking or unhistorical to allow cultivated spread of reproducible resources. For instance during the silk road days, the process of making silk was highly guarded by the Chinese, and something that the Europeans tried to steal through espionage.
I can tell you exactly how the spreading crops works in the game, well as I have it setup anyway. The biggest impact it has on human players is that it makes you want to trade for them so you can produce your own even if you really have no real need for the health bonus. Since it's a 'discovery' chance per tile it doesnt happen instantly, in fact it may not happen at all. I only allow corn and wheat to spread like this so the effect is a bit limited, but at the end of the game the amount of corn and wheat on the map is about equal to the number of clams, crabs & fish on the map. This has the effect of making cereal mills a viable corporation for a change too, as well as adding a bit to the bonus for standard ethanol.

Doing the same for horses, cows, sheep and pigs isn't difficult. If you stick to using the built-in discovery chance function and add something like I did requiring you to have access to the resource before being able to discover it the spread isn't as wild as you may think and the most common result would be the people that have it at the start would have more than anyone else throughout the game.
 
Back
Top Bottom