[MODCOMP] gordonthewhale's Agriculture Mod

gordonthewhale

Chieftain
Joined
Jan 8, 2006
Messages
33
Location
Oklahoma, USA
Agriculture mod based on Improvement, Feature, and Resource mod. You need the files in the SDK mod to make this one work!

This mod attempts to increase the strategic importance of domestic plants and animals in Civ4.

The Farm now behaves in a similar way to a pasture: it can be used only to harvest a resource, not to increase the food production of a plot.

There are now resource-specific improvements for each farm crop or pasture animal:
cornfield (corn)
paddy (rice)
wheat field (wheat)
ranch (cow)
paddock (horse)
pigpen (pig)
flock (sheep)

These improvements can be built on suitable squares even if the square does not provide the associated resource, but only if that resource is available in the nearest city. Thus, once a civilization finds wheat, it begins to plant wheatfields all over. These improvements also provide the associated resource. So, for instance, if you trade for corn from another civilization, you may plant cornfields if you have suitable land, and thus create a domestic supply.

The yield increases from the bonuses have been reduced, but the new improvements all have a total increase of 2 (or 3 for rice). This reduces the massive yields on the naturally occurring bonuses, but (more than) makes up for them by making non-bonus squares more profitable. The crops are each applicable to different locations: for instance, flocks can be built on hills, wheat fields can be built without irrigation, and corn can be planted on irrigated desert squares.

The graphics for the new improvements still need work.

The current version is compatible with Warlords v2.08.

v0.11
-Paddy graphics are as they should be. Wheat field isn't bad. Corn needs a little work. Animal improvements have changed from fence-with-no-animals to animals-with-no-fence.
-Forests now grow through three stages: young, mature, and old-growth. Old-growth forest is the same as vanilla Forest, but the graphic looks bigger. The others look smaller, and have lower defense bonus, chop time, chop production, health bonus, etc. Young forest does not provide a shield.
 
Some goals I have for this mod include:

short term:
  • Implementing the improvement graphics - partly done
  • Including some or all of the plantation crops
  • Adding more resources from other people's resource mods, such as potatoes, rye, barley, etc.
  • Balancing the improvements better. Currently they all seem too powerful. They need to provide less yield, and be more specialized in their possible locations.
  • Combine the features of the improvements into 1-3 improvements, one :food:-centered (farm), one :hammers:-centered(name?), one :commerce:-centered (plantation). The improvements would get different bonuses and be buildable in different locations depending upon the availability of domestic plants and animals.
  • make contact with resources required for research of enabling techs.

medium term: furthur broaden the agriculture model
  • convert food (and, while we're at it, shield and gold) production to floating-point, so that improvements could provide fractional increases. Depending on how easy this is, it might be easier to just multiply all current values by 10 and keep it integer.
  • move the bonus to farm production from Biology to Chemistry, and add a requirement for Oil (or Natural Gas). This would entail broadening the related XML data.
  • more generally, tie the yields of different features and improvements more closely to the terrains, landforms, and features they are on. For instance, potatoes might give +1 food on hills but +2 on flatlands.

long term: flesh out the Civ4 climate & ecology model
  • Refactor terrains to represent climate, not ecosystem. Use a version of Koeppen's climate classification system. I have made some re-colored graphics for these, but so far they aren't added my map generators and don't do anything special, so they aren't included in the release.
  • Add features to represent different vegetation types/ecosystems. This is already the case for Forest and Jungle, but Grassland would be another example. Possibly some others. Various stages of forest are already complete. Add some sort of natural progression from forest to grassland so that the world can begin in homeostasis.
  • Make a map generator that can intelligently deal with the new terrain and feature types. Use a sophisticated climate model.
  • Allow the realistic generation of totally non-Earthlike worlds, by changing parameters such as distance from sun, axial tilt, and so on.
  • This might entail a way to represent seasonal variation in climate. For instance, extreme axial tilt can result in zones with intense summer heat and equally intense winter cold.
  • (super long-term) Add in a comprehensive set of terrains for realistic Sci-Fi settings, such as Basalt, Regolith, Craters, Hydrocarbon Sea, Dry Ice, Lava, etc. Add map generation parameters like Atmoshpheric composition, and larger parameter ranges for other parameters.
 
It's about time! I didn't realize that this was where you were going with this, but bravo! :D

EDIT: I'm assuming that you've played through at least one game.. do you find that the ability to plant new farms that give additional bonuses in any way unbalances things since one bonus will satisfy the entire empire?
 
Sounds good. Maybe add some pre farming things like berry fetching.
 
Dom Pedro II said:
I'm assuming that you've played through at least one game.. do you find that the ability to plant new farms that give additional bonuses in any way unbalances things since one bonus will satisfy the entire empire?

One thing that is definitely an issue is resource trading. If I give an AI civ iron in exchange for horses, I can build a paddock and have a domestic supply in just a few turns, and then cancel the deal, leaving them with almost nothing. Adding some AI code would help that.

Honestly, I think that the huge number of resources you get is an aesthetic problem more than a gameplay one. It just looks silly to see on your city screen that you have tens or hundreds of wheat. The idea would mesh better with a Colonization style resource system, where a single resource isn't enough to satisfy an entire empire any more than a single shield or a single gold is. (I am guessing this is the goal of theLopez's dynamic resource mod?)
 
Zuul said:
Sounds good. Maybe add some pre farming things like berry fetching.

I think that such gathering pursuits are best represented by the food produced on squares that have no bonus or improvements. Particularly good foraging areas might be represented by a bonus with no associated improvement, or with a bonus that yields food, that has an improvement that yields money. A good berry-producing area might be of great food value to a gathering society, but in an agricultural society, berries are more a luxury than a food source.
 
Dom Pedro II said:
I don't foresee a change in the current system for resources for quite some time unfortunately... :(

Agreed. That sort of massive refactoring takes a while. Still, I think there's enough interest that it will come about eventually.

Another, unrelated massive change I'd like to see is a hexagonal map geometry. I haven't looked enough into the SDK to determine whether that is hidden in the graphics engine or not.
 
Gordon, have you considered taking out the resource-production aspect of the improvements as a fix for the "horses for iron trade" sort of exploit?

Would it be possible to make it so that cornfields produce an extra food if you've got the Corn resource?

I really, really like the idea you're onto here, I just don't know if I'm in love with the idea of fifty thousand corn resources or horse resources floating around...
;)
 
It's a hard balance. On the one hand, you're absolutely right that having fifty-thousand corn resources is not desirable. On the other hand, having a corn field obviously produces corn, and that corn can be used to plant more cornfields, or traded to someone else so that they can plant corn fields. Maybe I could work something where the corn fields only produce corn resources up to a certain number. The number of civs in the game, maybe, or maybe just a set number, like 5. Or, perhaps, I could try to figure out a way that you would get a corn resource for every 5 fields.

As for the horses-for-iron trade, I was thinking that it would be interesting to make a non-reproducible version of each resource, which you could trade without giving away the ability to create new resources. In the case of horses, say that there's the "horse" resource, which lets you build all the horse units and also paddocks, and also a "gelding" resource, which lets you build horse units, but not paddocks. For corn, the equivalent could be corn meal, and so on.

I'm not sure that change is really worth the added complexity.

In any case, if you want to disable the resource production on the improvements in your copy, go to GordonTheWhaleAgriculture/Assets/XML/Terrain/CIV4ImprovementInfo.xml and delete all the lines that look like this:
<iBonusProduction>1</iBonusProduction>

It may be that that's the most elegant solution so far.
 
Interesting!

I thought of limiting the terrains where improvements can be built, and having different yields for different improvements. This way, you will need access to all the resources for maximum yield.

It could look something like this:
Paddy: +3 food, riverside only
Cornfield: +2 food, grassland only
Wheatfield: +2 food, plains & tundra only

Pigpen: +4 food, riverside & flat grassland only, requires some grain resource
Ranch: +1 food, +1 prod, flatland only
Sheepflock: +1 food, +1 commerce, can be built on hills too
 
I've been thinking about agriculture, and I have some new ideas.

First, until modern times, farms have not been as specialized as I was making them. Farms grew diverse crops in rotation, and animal production was not seperate from plant production. It makes more sense to have just one farm improvement (until the modern era... combustion maybe, to enable the fertilizers and tractors) but to increase its effectiveness and applicability depending on the number and types of food resources available. It would not be buildable without at least one food resource, but each resource would allow the farm to be built in at least one situation.

For instance, perhaps rice allows farms on flood plain and grassland tiles with fresh water, and gives +1 food to those farms.

Wheat allows farms on grassland and plains tiles, +1 food even without fresh water.

Then, on a grassland with fresh water, if you had both rice and wheat, you would get +2 food.

This would have a tendency to explode if a wide variety of crops were added which could be stacked. Perhaps some bonuses would stack, and others wouldn't. For instance, having both rice and wheat might allow you to make farms in a wide variety of areas, but they would all be providing just +1 food.

Animals might add a % bonus to farm food production, or might produce hammers or trade.

The same would be true of non-food plant crops, like coffee, hemp, tobacco, cotton.

Second, regarding the 50-horses problem: The farms should not produce resources, because that gets ugly. However, once crops are domesticated, their point of wild origin needn't retain strategic importance. Maybe that independence could be represented by a building (project?) that requires the crop, but will create it once constructed. It could be called "Horse (or Wheat, Cattle, etc.) Breeding Center" or just "Horse Domestication."

Third, the starting techs should have a direct correlation to the starting location. Why would a new civilization start up with Agriculture and Fishing if it is in a landlocked area with no domesticable plants? It seems to me that those starting techs represent the germ of the new civilization: If a civilization starts with agriculture, that means that a hierarchically ordered system of settlement (aka civilization) came about as a result of the need to organize agricultural labor (or possibly as a means to divest workers of their harvests.) How could that happen when the new civilization has no farms, no domesticable crops, and no worker(s)?

Likewise for Mining, Animal Husbandry, Hunting, and Fishing. Civilizations starting with any of these four resource-harvesting techs should start with a worker, an appropriate bonus, and the improvement already built. This is a modification that would involve, at the least, a map generator and the Dawn of Man screen.

Mysticism also provides a good justification for the creation of a civilization. However, if the resource-gathering techs provide free workers, bonuses, and improvements, then mysticism should provide something as well. Maybe a free monument? Guaranteed proximity to stone or marble (but no free improvement, of course).

The Wheel doesn't fit with the other starting techs in this regard. It seems unlikely as a catalyst for civilization development. Giving some free roads would seem appropriate. It would be useful if the Civ also had one of the resource techs, but what about Mysticism and The Wheel (Vanilla Arabians)?
 
I left my reply window all night, so I didn't see those last two replies right away.

I have a big issue with the text who has disapeared.

I'm not sure what could have caused that. When did it happen? Did you get any kind of error message?

Just to make sure of installation things:
Are you using the newest version (v0.11) of both the DLL mod and the XML mod?
Are you using Warlords v2.08?

edit: Has anyone else had any problems with this?

Interesting!

I thought of limiting the terrains where improvements can be built, and having different yields for different improvements. This way, you will need access to all the resources for maximum yield.

This is already the case, although your specific numbers and locations aren't the same as mine. Also, mine do overlap a little more. I have:

Wheatfield: +2 food; grass, plains, or floodplains; flatlands only
Cornfield: +2 food; grass, plains, or desert; requires irrigation; flatlands only
Rice: +3 food; grass or floodplain; requires irrigation; flatlands only

Ranch: +1 food, +1 production; grass or plains, flatlands only.
Pig: +2 food; grassland only, flatlands only. Jungle okay.
Sheep: +1 food, +1 commerce; grass or plains, hills okay.

(Paddock): +1 hammer, +1 commerce; grass, plains, tundra, hills okay.

I'm inclined to say that I like your version better. However, I'm personally leaning away from the different improvements, and towards one improvement which changes its yield depending upon terrain type and available crops.
 
I'm not sure how possible this would be but, if you could implement a technology for cultivating a certain resource, which in order to research you would need access to that resource.

In this case you could build an improvement on the resource without the technology in order to get that resource. You then research the skills to replant and regrow them elsewhere.

In addition, a city would get a health bonus for working different food tiles (if you work 2 rice you get +1:health:, but if you work rice and corn you get +2:health:). You would not get any health for having the resource, but not working the tile until a mid game transportation technology is researched.

E.g.

If you are working a rice tile you get +2:health:

If you are not working the rice tile and are simply "importing" rice you only get +1:health: since home grown stuff is better than imported stuff.
 
BTW, i didn't get any error message ... it's just the display.
I'm using Warlords 2.08, is this the reason ?
I've tried the Improvement mod separately and it works well even if I don't see the purpose of it. Did I miss some merging of ImpMod into Agriculture mod ?
Thanks - I have a modpack I'm designing at this time and I think you could help at the time I decide to go and develop it.
 
I'm not sure how possible this would be but, if you could implement a technology for cultivating a certain resource, which in order to research you would need access to that resource.

In this case you could build an improvement on the resource without the technology in order to get that resource. You then research the skills to replant and regrow them elsewhere.

I had also thought about adding a requirement for a certain resource to some technologies. There are multiple cases where this would make sense; in fact, it would make sense for essentially every resource-harvesting tech.

There are a few ways I have thought of to do it, with various degrees of SDK modding required. The most elegant would involve the following two mods:
  • add a "BonusPreReq" tag to CIV4TechInfos.xml, which can go inside "AndBonusPreReqs" or "OrBonusPreReqs" tags. This would involve some funny business, since the technology infos are loaded before the bonus infos. The funny business would be doable, though. Presumably, the logic affecting this would be that the resource must be available at the capital, though it could alternatively be implemented that it needed to be available in at least one city, that it must exist in the empire with an improvement, or even that it just must exist in the empire. This might be switchable.
  • add a "TechEnabled" tag to CIV4BonusInfos.xml, which would define a tech that is required to build units, buildings, projects, wonders, improvements, or whatever using that resource. This, again, could be broken down to different tags for more flexibility: TechEnabledTrain, TechEnabledConstruct, TechEnabledBuild, TechEnabledCreate, and so on.

In addition, a city would get a health bonus for working different food tiles (if you work 2 rice you get +1:health:, but if you work rice and corn you get +2:health:). You would not get any health for having the resource, but not working the tile until a mid game transportation technology is researched.

E.g.

If you are working a rice tile you get +2:health:

If you are not working the rice tile and are simply "importing" rice you only get +1:health: since home grown stuff is better than imported stuff.
My feeling is that this is already addressed by the extra :food: production. In fact, I was thinking of taking away all food-related :health: bonuses (except from granaries, groceries, etc.). After all, in many ways, +1 :food: and +1 :health: are the same thing. To give both seems like overkill.
 
BTW, i didn't get any error message ... it's just the display.
I'm using Warlords 2.08, is this the reason ?
I've tried the Improvement mod separately and it works well even if I don't see the purpose of it. Did I miss some merging of ImpMod into Agriculture mod ?
Thanks - I have a modpack I'm designing at this time and I think you could help at the time I decide to go and develop it.

Warlords 2.08 is the version I used in development, so it should work fine.

The improvement mod on its own does nothing. It just enables new XML mods to be made, including those in my Agriculture mod.

I'm sorry, but I really have no idea what the problem is. All I can do is ask questions.

Does it happen right away, or at a certain point in the game? Is it predictable, or does it just randomly crop up?

Do you have logs and python exception popups enabled? If so, can you give me your logs?
 
It happens from the very beginning :
mod loaded the Warlord screen didn't displayed the menu but I could start the mod by clicking "&#224; t&#226;tons", then the choice screens following didn't show any text. I was able to choose Louis with his face. for these steps I didn't pick any screenshots, but in game there was no way to play without the text, so I took screenies to report you my misadventure. Could it be a language problem ? May I set the ini to play this mod in english ?
I must play other games as I have done just this one.
logs : I don't know what is it ?
I have no python excep. AFAK !
 
Top Bottom