Changing Valid Terrain

Thorwing

Chieftain
Joined
Jun 18, 2014
Messages
7
Hey guys,

somewhat new to modding in civ 5, I've been steadily working on a mod for an already existing civilization: The Netherlands. I want farms to be buildable on marshes for the dutch only. Updating the Farm.xml is a no go, since that'll work for every civ. Updating Trait.xml and I can't access Improvement_ValidTerrains.

Am I missing something here? Thanks for the help.
 
I believe farms are pretty difficult to mod, for a variety of reasons. The last time I tried modifying them, they came up invisible, largely due to an older bug that Firaxis kind of half-assed a fix for.

The simplest solution I think would be to create a new farm improvement unique to your Dutch Civ, and alter the settings for those (but you can't use the standard farm graphics -- they'll appear invisible.)
 
Make a Unique Improvement that's identical to the Farm, but able to be built on Marshes, and give it to the Dutch.

EDIT: Sheesh, for some reason I missed the last half of DarkScythe's comment, which was the same suggestion. XD

You can't use the normal Farm art defines for a UI? Or the it won't appear over a Marsh?
 
You can use the art defines for a UI, and the game will seem to accept it, and really, it does work -- you get the yields and such.

The problem is that the graphics don't actually render, so you have invisible farms, and it'll just look like you have tiles that suddenly have more yields than they're supposed to. If you hover over the tile, it will still say the name of whatever replacement farm you set, though.

I disabled it in Holo's Beta since it didn't work (and prompted me to start writing her Lua code in order to handle it instead) and removed it for the public release, but if you have access to my Beta version, check out XML/Terrain/HoloFarm.xml and try to hook it back up -- you'll see that the farms come up invisible if you try to build them.

I believe if you needed to add a new farm, you generally needed to include a new "farm model" to go with it, but it obviously is static, whereas Civ5's farms sort of adapt to the terrain. I believe this is also why some people generally just use the Polder instead.
 
Yeah, sounds good. The art of farms are indeed a problem since they overlap and farms still bug in unmodded BNW to begin with. The reason why I want to do this is because I want to remove Polders as an unique improvement and somewhat implement them in the trait of the dutch where farms with special conditions get boni. e.g: Farms on marshes get the polder yield changes. This also includes the 2 polder UI with those special condition farms, which all add to the difficulty of implementing.

The problem is that I'm still learning how to mod and changing the XML databases is a breeze, just update existing values or add in new, those are easy. Implementing and removing actual improvements are still a step too far. But at least now I know the direction in which I can tackle this problem. Thanks!
 
Top Bottom