Sea Tunnel question?

Rezca

The Greatest Jaggi
Joined
May 3, 2013
Messages
1,990
Location
United States
For a long time now I'd been wondering something... Is it possible to make certain features unable to be pillaged or only pillageable by certain units?

See, the Sea Tunnel lets land units travel across the ocean and lakes. It's supposedly highly advanced construction and takes ages to build... And gets pillaged in a single turn by any naval unit, including Triremes. The AI adores going out to pillage these routes in each other's territory the first chance they get, and of course any barbarian units will do so as well.


Later in the game, particularly on continental maps, I'll sometimes send my constructor ships to bridge a few landmasses the AI's declaring war on each other but doing nothing about it (Since despite the difference of just three to five tiles, they rarely mount up any transports and when they do it's an easily slain handful.). Bridging the gap they start shuffling their units over reliably...... Unless either side has a ship around in which case they beeline for the Tunnels on the other nation's side and pillage it immediately, which brings the war to a halt again.


If they can't be made unpillageable could they be something they need to try harder to do like how pillaging a city sometimes fails to reduce its population? Or is there some weighting on how willing they are to pillage certain features that can be reduced, so they're less likely to immediately go and destroy the tunnels and render themselves unable to finish their wars?

I'd probably go for a reduced weighting if that's a thing; they'd still pillage but be less likely to do so the moment a Tunnel is finished.
 
I don't think the XML code supports no-pillage routes. Routes and improvements have different XML schemes and so the number of options available to routes is much more limited. Improvements have a <bPermanent> tag that I believe makes them irreplaceable and un-pillagable. I used it with Machu Picchu.

I think the best you can do is set up a Python routine triggered by onUnitPillage to automatically replace a pillaged tunnel.
 
I don't think the XML code supports no-pillage routes. Routes and improvements have different XML schemes and so the number of options available to routes is much more limited. Improvements have a <bPermanent> tag that I believe makes them irreplaceable and un-pillagable. I used it with Machu Picchu.

I think the best you can do is set up a Python routine triggered by onUnitPillage to automatically replace a pillaged tunnel.

I see, that's interesting to know!

I don't know much about Python (Barely anything at all) but wouldn't that make a unit that's out pillaging the routes just sit there forever since the tile its trying to pillage keeps regenerating?
Seems this isn't as simple a matter as I was hoping it would be~
 
I see, that's interesting to know!

I don't know much about Python (Barely anything at all) but wouldn't that make a unit that's out pillaging the routes just sit there forever since the tile its trying to pillage keeps regenerating?
Seems this isn't as simple a matter as I was hoping it would be~

True. Python is powerful but falls flat whenever a choice is involved. Just one example: the conditions for quests are set in Python, so I'm not sure if the AI actually knows to go after them or just fulfills the quest accidentally and gets the bonus.
 
Does it matter how much gold the route costs? What if it cost 0:gold: (maybe it should consume the builder unit)? If the AI gains no :gold: for it maybe it will leave it alone.

Would it be possible to make it an Improvement instead, like Forts and etc? Then it could benefit from Permanent. I don't see the Tunnels as something that would need to be spammed like land routes, since the only benefit is really moving land units across water without transport ships (But also putting them at risk of being attacked by ships)

Alternatively, if Zeta's suggestion ends up dissuading AI from pillaging, then that'd be a nice alternative. Perhaps increase the build time as a result (I'd rather not consume the unit). Another idea I just had would probably be less appealing and that's have it be multi-stage, like Towns and Forts. So it takes more than one turn to pillage, but the consequence is the former "levels" of the Tunnel would simply be clutter in the Civopedia and World Builder, unless they could be hidden in some way. Benefits is that the Tunnels can still be pillaged if needed but it takes longer to do so. I'm not sure the AI wold understand the strategic benefit of the tunnels anyway though. I only really put them up so I don't need to waste time with transports - as well as reducing the effort the AI needs to put into such things too, they never really seemed to handle intercontinental assaults very well.
 
The <bSeaTunnel> tag only applies to Routes, not Improvements. Not even <bActsAsCity> allows land units to move across water tiles. Also, making sea tunnels improvements would mean they couldn't coexist with any other improvement. We'd have to rewrite DLL code and at that point we may as well add the no-pillage ability to the sea tunnel.
 
The <bSeaTunnel> tag only applies to Routes, not Improvements. Not even <bActsAsCity> allows land units to move across water tiles. Also, making sea tunnels improvements would mean they couldn't coexist with any other improvement. We'd have to rewrite DLL code and at that point we may as well add the no-pillage ability to the sea tunnel.

Yeah making them improvements doesn't sound like it'd be a good solution with that in mind. Putting No-Pillage on them would require DLL work too yes? Mm, and then there's the fact that they wouldn't be able to be removed afterwards.... It's honestly less that I don't want them pillaged at all, and more that I just don't like how the AI beeline for them once war breaks out. Since they struggle with transports its basically them shooting themselves in the foot and bringing whatever war they get involved with into a standstill.

If it was just as simple as the AI being less interested in pillaging them then that'd be great, but from what's been said so far I guess even that wouldn't be so easy :undecide:
 
Top Bottom