Py Request with Unit

Epicurist

Chieftain
Joined
Dec 3, 2001
Messages
60
Can anyone help me work the python/sdk on having triremes/gallys work like they did in Civ II where they werent bound to the coast..but for every square in the ocean they risked x% sinking.

Would love to go back to that system..maybe set it up where a promotion can reduce that x% risk.

Any help would be appreciated..

thanks.
 
I made a simple Python model for that ages ago for my own personal mod, but it works for all ships really and risk of sinking is determined by the players level of technology. Of course, it would be fairly easy to restrict it to only work on specific ships.
 
I'm not sure if this works, but just an idea...

First make all Ships capable of moving coast and ocean in the XML.

Then use onUnitMove function in Eventmanagar.

Have it check if the unit is a ship (or limit it to specific ships).

If yes, have it check if you have Astronomy.

If no, have it check if it is an ocean tile.

If yes, do a random number and have the random number either kill the unit outright or do damage to the unit depending on how you want it to work.

If you want to add the promotion its relatively easy, just have it check the promotions of the unit before the random roll, if it has the promotion have the python do a separate random roll (or look at two or more numbers from the previous roll) to change chances.
 
Back
Top Bottom