Pillage Routes ?

Pomphis

Warlord
Joined
Sep 22, 2010
Messages
294
Location
Berlin, Germany
HitM has a Pillage Route mission that destroys roads etc while leaving other improvements alone. I quite like it, as the AI often builds lots of routes I do not need and don´t like for asthetic reasons, so when I conquer something I like to remove for example all those roads from the Great Desert. Maybe this could be added ?
 
The AI does spam cart paths as barbarians, and spams paved roads as nations, or so i've noticed, a pillage route could keep certain areas free of that kind of mess. And, it would be nice to be able to *choose* what gets specifically pillaged when pillaging, is there a mod also for that?
 
I wrote and am working on a small script that adds road degradation based on a number of factors including the type of road, the ownership of the road, an approximation of the usage of the road based on owned units, and an approximation of maintenance based on the number of owned workers.

As far as implementation it seems to be working without issue, though I could use some help deciding what to do with notifications, as currently the roads are degrading silently without telling you.
As far as tuning, I'm playing with how much I want each player's unit support to affect their own roads vs unowned roads, and how much I want workers to offset that.

I wrote this script because I also dislike the route spam the barbarians do, I dislike the downtime that workers inevitably have late game, and I dislike the fact that routes have no maintenance costs. This script addresses these personal issues and forces players to route a little more strategically, and since AI does that anyway everyone's routes end up looking a lot more natural.

The reason I have routes downgrading rather than being destroyed is that I think symbolically about it. If a tile has a Railroad route on it then to me that says that the fastest available route in the area is the railroad, but if the rail line breaks and has to undergo maintenance then there are still backroads. I think the route shown on the tile represents the fastest available route on the tile, not the only one.

I dont have any special modifiers or conditions to do with mountains or rivers or terrain of any kind. I researched the issue but I wasnt sure what would be accurate, I wasnt sure it would look natural, and all challenging terrain types already have extra costs associated with roading them in terms of increased worker time to build the road.

I'm open to questions or suggestions, but I'm not really sure how I would go about handing this component to the community or if it would be wanted.
 
Last edited:
Well... I think it's a very good idea. I really like what you wrote above and hope that your script will make it into the mod as a BUG option.

One suggestion that comes to my mind:
A route should not get downgraded more than to the second (or max the third) best available route. I think it would be good to encourage players to connect only their cities with the the best routes, while the rest of the tiles can have lesser back-roads - as you said. (I hope it's clear what I wanted to say).

As far as implementation it seems to be working without issue, though I could use some help deciding what to do with notifications, as currently the roads are degrading silently without telling you.
Yes, notification would be nice.

I dont have any special modifiers or conditions to do with mountains or rivers or terrain or any kind.
I don't think any is needed.

BTW having a programmer around: Do you think you could work on other mechanics too after finishing this one? Like fixing the "Resource Depletion" one - or rather creating a better, more predictable one?
 
One suggestion that comes to my mind:
A route should not get downgraded more than to the second (or max the third) best available route. I think it would be good to encourage players to connect only their cities with the the best routes, while the rest of the tiles can have lesser back-roads - as you said. (I hope it's clear what I wanted to say).

I certainly think thats possible, the only problem is the question of how neutral territory is handled.

BTW having a programmer around: Do you think you could work on other mechanics too after finishing this one? Like fixing the "Resource Depletion" one - or rather creating a better, more predictable one?

I need a senpai basically. I'm pretty young, my only paid experience is with javascript, php and databases. Python scripting is about the same level of work from what I can see, but there are a lot of Civ4 or mod specific functions and objects that aren't documented and I dont know how they work. A lot of stuff I can figure out by poking around and testing things, but its usually much faster and more reliable to be able to ask and benefit from another's experience.

I have 0 experience with anything that needs to be compiled. I'd love to learn and do grunt work, but I really shouldn't be allowed to touch that without supervision.
 
Last edited:
Hey Urza, sounds like a very interesting concept, especially if it can help to eliminate the barbarian wilderness path-spam problem (which I notice particularly since I like to play on totestra/perfect-mongoose maps with lots of desert and tundra and generally inhospitable areas). Question: are paths degraded to nothing? I would argue that in neutral (unowned) territory they should do so.

On second thought, perhaps all improvements in neutral territory should slowly degrade back to nature.

Looking forward to perhaps trying this mod of yours one day.

Cheers, A.
 
@Urza1234, I would absolutely love this type of mod making its way into my games!

Yes, i agree that routes should break and/or obviously need to get maintained either by funds or workers over time (they as mentioned start being useless late game), routes have two types of wear: nature & use, as far as mines and the like needing maintenance or depleting, i play my games with this mod, but i had no idea it was borked, too bad.

@Pomphis, are we taking your thread off-topic talking about all this here, let us know, i'm sure we can open a new thread at your bequest if you feel this is not another solution to the pillage discussion you started... ?
 
I certainly think thats possible, the only problem is the question of how neutral territory is handled.
Silk Road, Via Apia and The Golden Spike wonders come to my mind too. One of their effetcs is to build roads.
 
Hey Urza, sounds like a very interesting concept, especially if it can help to eliminate the barbarian wilderness path-spam problem (which I notice particularly since I like to play on totestra/perfect-mongoose maps with lots of desert and tundra and generally inhospitable areas). Question: are paths degraded to nothing? I would argue that in neutral (unowned) territory they should do so.

On second thought, perhaps all improvements in neutral territory should slowly degrade back to nature.
Yeah, they way I currently have it paths do eventually degrade.
The baseline rate of degradation is based on the number of units the player owns, calculated per end of player turn. I'm using that metric to calc the deg rate based on the assumption that the the number of units a Civ can support is a decent measure of their economy. I'd be up for trying to improve that mechanic if anyone has suggestions. I tested and rejected having roads degrade based on unit movement because it didnt feel natural to me, and honestly the units controllable in game dont really represent the bulk of actual road usage, so it also didnt feel symbolically appropriate to me. Idk if any of that reasoning is interesting to anyone, but there it is.

That background information was presented so that I can explain that, as-is, I have it so that each route has a chance to resist degradation based on the route type. These numbers are a big part of what I'm trying to balance and tune, but currently:
Jumplane -> Highway 70% resist chance
Gravtube -> Highway 50% resist chance
Electric Railroad -> Highway 25%
Railroad -> Paved Road 0% (this by no means suggests that railroads are degrading every turn, they just arent resisting the degrade check, every turn every tile has to pass two different rolls to degrade)
Highway -> Paved Road 60%
Paved Road -> Road 50%
Road -> Cart Path 37%
Cart Path -> Nothing 95%

I have two reasons that Cart Paths are so resistant to degredation. Firstly in terms of gameplay Cart Paths may be terrible for unit movement, but they connect resources and trade routes, its extremely jarring to have these disappearing all the time and suddenly be out of iron or something. Secondly it doesnt take much to maintain a Cart Path in real world terms, you pretty much just have to occasionally use it. I can potentially adjust this so that Cart Paths are more likely to disappear in neutral territory than in owned territory, but so far I have not felt the need to do so because the route spam seems to be under control.
I am also thinking of giving Railroad a tech-check so that if you have discovered Highway it will degrade into that rather than Paved.

@Pomphis, are we taking your thread off-topic talking about all this here, let us know, i'm sure we can open a new thread at your bequest if you feel this is not another solution to the pillage discussion you started... ?
Agreed, I apologize if I sidetracked, it may have been presumptuous of me to assume the solution to my needs would be the same as the solution to yours.
 
Good ideas but there's a catch: degradation chance might cause OOS in multiplayer, that's something I want to avoid at all costs. When I get back to my modding pc I see what I can do. I think I have an Idea for fixing Resources Depletion too.
 
It could be a SP option, yeah?

Of course, I can deactivate the code in MP. Actually I should make more clear which options can be used in MP and which can not.
 
There's something else: there might be troubles with path calculation. First, AI might run into troubles while moving an army if the route degrades, second, I fear that checking the routes on the map to see if they degrade or not might cause longer turn times due to calculation. Just think about performing a calculation each turn for each tile on the map. Maybe I could run the check every X turns and that would reduce the workload, but I need to run some test before adding this feature.
 
To the OP, yeah friendly pillage doesn't work on routes. It should.

But mind the tiny XP gained from pillage, and the obvious exploit. I'd rather see pillage XP removed anyway.


Urza's script sounds nice. There's a sandstorm or floods event that does that crudely also. I'm thinking Urza's could be packaged as an event.
 
Top Bottom