Creating "SettleBoats"

donquixote235

Chieftain
Joined
Feb 3, 2003
Messages
48
You have workers and settlers, and workboats... why not "settleboats"?

One of my pipedreams with Civ 4 is to create a SMAC mod. One of the features of SMAC is the ability to settle water tiles. With that in mind, I set out to create a modified settler that travels sea squares rather than land squares. Unfortunately, although I can get him to move on ocean tiles, he can't actually settle on them. Does anybody know what I need to alter in order to allow for cities on the water?
 
Perhaps a terain editing that would allow settling on that terrain.

I recall that from civIII, and I doubt they changed that.

I think I may have found it, actually. Check out the C:\Program Files\Firaxis Games\Sid Meier's Civilization 4\Assets\XML\Terrain section and look at CivTerraininfos

In that search up the ocean terrain and whichever else there is you can't pass. On that section there is a value called found. I think that needs to be set to one. (It is on grasslands, so I assume that's what it is.)
 
TheFourGuardian said:
In that search up the ocean terrain and whichever else there is you can't pass. On that section there is a value called found. I think that needs to be set to one. (It is on grasslands, so I assume that's what it is.)

Nope... I just tried about every setting in that file; there's nothing that will let me settle.
 
It should be possible with python. I might do it myself sometime in the future if I can be bothered to.
 
For the time being, you may have to start thinking in terms of compromise by creating a "sea" tile that's really a land tile and would be accessible by ship and would require some kind of special aqua settler bot... but it might also be doable with the SDK too... or at least some real playing around with Python.
 
donquixote235 said:
Nope... I just tried about every setting in that file; there's nothing that will let me settle.

did you clear the cache? this is increasingly becoming the issue in these types of circumstances...

If that doesn't do it, you'll have to wait for the SDK, I can't find any code anywhere in the python that handles city building.
 
You don't have to wait for the SDK. You need to make an event which creates a city when a person press a certain key, have selected the right unit and can create a city in that square. It might be best to make the city square actually be a land square that looks like ocean. And when the city is razed turn it back into a water square.
 
Anything that brings us closer to SMAC2 is a great thing, but it all depends on how the AI would handle this option. Hopefully it could be made to use it as well as a human player, or better.
 
Well, I tried clearing the cache, but with the same problem. My knowledge of Python is nil (although I code in other languages for a living, I don't "get" Python just yet) so I guess I'll just wait for the SDK.

Ah, how I wish they chose a more mainstream language for their scripting... whether it was C-type or java-like, or even VB-like.
 
I haven't even researched it at all... like I said, I know squat about Python, so I wouldn't even know where to start. I suppose if I find time this weekend I could play around with it, though.
 
Hi there!

This Weekend (well, eastern is sooo boring) I managed to have settlerboats. After I made that new unit (mainly a workboat with <bFound>1</bFound> like a settler) and I also put <bFound> to 1 for coast and ocean, but nothing happend.
So, I took a look at the SDK and figured out, that there is a method called canfound(), which returns false, if the plot is water. After I changed this method, my settlerboats did want I wanted.
Well, the AI does not use them, so I have to spend some more work.
Also, there are much more things to do: more different terrain for the ocean, changing the tech-tree, new ressources for the ocean, new naval units, new terrain improvements etc.

Matze
 
You'll also want to find a way to change the city appearance as well since it would look very strange to have a normal-looking city in the middle of the ocean.
 
FYI, there is an active Civ4-SMAC mod community over at Apolyton, and woodelf, myself, and many others are working on a "SMAC Remix" of concepts from Civ4 and SMAC. The settleboat will be great for all of us!
 
TheFourGuardian said:
Perhaps a terain editing that would allow settling on that terrain.

I recall that from civIII, and I doubt they changed that.

I think I may have found it, actually. Check out the C:\Program Files\Firaxis Games\Sid Meier's Civilization 4\Assets\XML\Terrain section and look at CivTerraininfos

In that search up the ocean terrain and whichever else there is you can't pass. On that section there is a value called found. I think that needs to be set to one. (It is on grasslands, so I assume that's what it is.)


I do think this is correct however....

Ocean:
<bWater>1</bWater>
<bImpassable>0</bImpassable>
<bFound>0</bFound>

Grassland and most other settler types:
<bWater>0</bWater>
<bImpassable>0</bImpassable>
<bFound>1</bFound>

It might just be the bWater parameter that is preventing it from working. Maybe it overrules the Bfound parameter. IDK what would happen if you changed the value to 0 for Oceans however, you could try it out and see what happens. ;)

NOTE: I do anticipate it will work however, I feel it might also allow all unit types to traverse ocean tiles.
 
Change this function: bool CvPlayer::canFound(int iX, int iY, bool bTestVisible);

Look at CvPlayer.cpp line #4280 - 4282
 
Top Bottom