[BNW] Getting a New Type of Water Terrain to Work

SidmanII

Chieftain
Joined
Jun 27, 2020
Messages
7
I'm in the process of creating a scenario and want to simulate how something like a navigable river becoming more shallow affects what kinds of ships are allowed to sail up into it. Think the reverse of oceans: A galleass or caravel can sail fully up the river, but not a destroyer or battleship.

I've created some xml code for the terrain, called TERRAIN_SHALLOW_WATER_SMII, and assigned a new promotion to destroyers that makes them unable to move onto them. These tiles can be placed in the middle of the ocean no problem and the destroys can't cross them. The problem comes from the map editor, which refuses to allow non-coastal water tiles to be placed next to land. It seems to be caused by SHALLOW_WATER_TERRAIN under PostDefines inside GlobalDefines.xml, since when I replace TERRAIN_COAST with my new terrain, the problem reverses and it turns all coast tiles placed next to land into TERRAIN_SHALLOW_WATER_SMII which goes too far. Broadening my search of SHALLOW_WATER_TERRAIN leads me to CvGameCore_Expansion2.dll, and that stumps me completely.

All I'm looking to do right now is get the game to recognize my TERRAIN_SHALLOW_WATER_SMII as equal to TERRAIN_COAST in terms of land adjacency. If that just isn't possible, please let me know. What I have so far is in the zip.
 

Attachments

Went about this all wrong. Simply renaming atolls, setting them as impassable, and giving a special promotion to ships works. By putting one atoll halfway up river, I can allow ships with the promotion to go all the way up while stopping ships without the promotion where I want them. No need to invent a new type of water tile, and certainly no need to mess with the .dll.
 
Back
Top Bottom