• 📚 A new project from the admin: Check out PictureBooks.io, an AI storyteller that lets you create personalized picture books for kids in seconds. Give it a try and let me know what you think!

Making peaks passable - but only with roads

richarnd

Chieftain
Joined
Mar 20, 2004
Messages
43
I'm working on a mod that makes some changes to terrain, and one thing I'd like to do is make peaks passable - but only when a road has been built. I think this would require:

a) making peaks initially passable to workers, but no other units, then
b) making them passable again once roads have been built

If that's possible, one could make things even fancier by requiring a certain tech level before workers could enter peaks, and possibly giving some units (a la Civ 2 Alpine troops) the ability to enter even non-roaded peaks.

Has this or something similar been done (I searched but found no evidence)? If not, could it be done in XML? If python would be needed, do you think the mod could be made without significant overhead?
 
The first step would be making peaks "impassable" instead of "water." Check the terrain XML file. Then you'd need to set workers to canmoveimpassible. I'm not certain but I'll bet you could also allow roads to be built on those tiles with a little more XML tinkering (although, I'm not sure how that would work graphically.)

Getting the tile's property to be changed to passable would require python, but I don't know how you'd do that. I'm still learning myself.
 
I'm not exactly sure why or what it does, but it might also be noted that the peaks entry in xml is set to be "graphical only". On or off, however, I found that nothing I did in xml had any effect on peaks.

If you do turn it off, you will have a little surprise. Without making any other changes, if you turn the graphic-only off, you will now see in worldbuilder two types of mountain terrain, named "Peaks" and "Mountains".
 
I'm not exactly sure why or what it does, but it might also be noted that the peaks entry in xml is set to be "graphical only". On or off, however, I found that nothing I did in xml had any effect on peaks.

If you do turn it off, you will have a little surprise. Without making any other changes, if you turn the graphic-only off, you will now see in worldbuilder two types of mountain terrain, named "Peaks" and "Mountains".

That's odd. I'm not sure what to make of it. Maybe "mountains" are editable in XML, but peaks are not?

So you were unable to make peaks passable using XML?
 
Back
Top Bottom