Roads and Railroads

Tommerbob

Chieftain
Joined
Jan 29, 2009
Messages
22
So I'm trying to change how far units can travel along roads/railroads. I'm using vanilla civ4, not sure if it would be different for BtS or Warlords.

I've been looking through the XML files trying to find where I can alter them, but the only thing I've found is in Assets\XML\Misc\CIV4RouteInfo.xml.

First of all, is that the right file I'm looking for? I'm new to xml, so not sure which line I need to alter.
 
Yeah that's what I was thinking. But the digit doesn't make sense with the game. Movement along roads is 1/2 in-game, but that value = 30? Can anyone translate that?
 
For roads it's 60 / iMovement ie.

60 / 30 = 2 movement on roads
60 / 20 = 3 movement (after researching the tech that gives +1 extra road movement)
60 / 15 = 4 moves
60 / 12 = 5 moves
60 / 10 = 6 moves
etc.

If the value doesn't give integer result the game will crash. Also the tech tree doesn't show icon for +1 road movement on certain movement changes.

The default 60 value is defined somewhere else, if I recall it was in GameDefines.xml.
 
Does anyone know what the difference between these tags is? These are the values for RR.

<iMovement>20</iMovement>
<iFlatMovement>6</iFlatMovement>
 
not exactly sure but I think it goes like this

assuming for railroads its 60 / iMovement (it might be 120 or something else, not sure)

If iMovement = 20 then the unit can move 3 tiles (60/20 = 3)
If iFlatMovement = 6 then the unit can move 10 tiles (60/6 = 10) on flat tiles I presume (i.e. not on hills)

just a guesstimation. Best way is to plug in some numbers and see what happens... if you don't have it return a whole number it will crash though. so only use numbers that divide into 60 evenly to be sure.
 
not exactly sure but I think it goes like this

assuming for railroads its 60 / iMovement (it might be 120 or something else, not sure)

If iMovement = 20 then the unit can move 3 tiles (60/20 = 3)
If iFlatMovement = 6 then the unit can move 10 tiles (60/6 = 10) on flat tiles I presume (i.e. not on hills)
From my testing. "Flat" has nothing to do with the terrain. It appears that two calculations are done. Let's use as an example a mounted unit with two MP per turn. You start by multiplying that 2 MP by 60 and get 120 total iMovement points the unit can expend in that turn. Divide that by 20 and you figure that the "2 MP" unit can move 6 tiles along a road during a turn, which is twice as fast as a "1 MP" unit can move (60/20 = 3). But that's only the first calculation....

You also have 60 iFlatMovement points ("Flat" in that it is not multplied by the nominal MP of the unit). Regardless of how many MP a unit has, it can move 10 tiles along a railroad during its turn. Since 10 is more than 3, 6, or 9, units with 1, 2, or 3 MP would use the Flat calculation, as it's better.

But what if we had a unit with 4 MP, that still obeys terrain and benefits from routes (unlike choppers)? Well, 4 MP * 60 = 240 iMovement, and dividing that back by 20 gives 12. In that case, the unit should be able to move faster than the "Flat" 10 tiles/turn from the quoted calculation. The idea is that a Railroad automatically includes a road as well, as if a RR had an invisible frontage road running parallel to it. Any unit that would be able to move faster on a road than the train could carry it on the RR would then use its own native (non-flat) movement on the (implied) road, and leave the RR's "flat" movement for units that are slower than trains.


I'm interested in finding out how to make this implied road a bit more explicit. I'm trying to find out if there's a place where you can specify that building a railroad on a tile is faster if that road has already been built; it wouldn't have to be built along with the RR so it should slightly speed up the process. As it is, I often build roads on hills before I have RR just to get the worker up there a turn quicker once RRs can actually be built. It would be nice if they got an additional bonus for having some of the work already done.
 
Top Bottom