CIV4RouteInfos.xml

As far as I can see, it defines the two types of routes buildable in the game, road and railroad.
 
I don't understand much of it, but each move is 60 points.
 
IVZanIV said:
As far as I can see, it defines the two types of routes buildable in the game, road and railroad.
I'd worked out that much :p

snako said:
I don't understand much of it, but each move is 60 points.
Right... given the 60 think I think I've managed to work out what <iValue> does. I'd guess that if iValue == 1 <iMovement> is used, while if iValue == 2 <iFlatMovement> is moved.

Does this mean that all the python functions use factors of 60? I supose this would be useful for setting half movement and suchlike, as they all take ints.
 
Code:
		<RouteInfo>
			<Type>ROUTE_ROAD</Type>
			<Description>TXT_KEY_ROUTE_ROAD</Description>
			<iValue>1</iValue>
			<iMovement>30</iMovement>
			<iFlatMovement>30</iFlatMovement>
			<BonusType>NONE</BonusType>
			<Yields>
        <iYield>0</iYield>
        <iYield>0</iYield>
        <iYield>1</iYield>
      </Yields>
			<TechMovementChanges>
				<TechMovementChange>
					<PrereqTech>TECH_ENGINEERING</PrereqTech>
					<iMovementChange>-10</iMovementChange>
				</TechMovementChange>
			</TechMovementChanges>
			<Button>Art/Interface/Buttons/Builds/BuildRoad.dds</Button>
		</RouteInfo>

Type : the route type
Description : the text description (translated) ie: 'road'
iValue : I believe an ai clue for pillaging, maybe other things
iMovement : movement cost over this. if a base cost is 60, and road is 30, road is twice as fast. railroad at 20 is three times as fast
iFlatMovement: same as movement but applied only to movement over flatlands (not hills)
BonusType: requires this bonus to build
Yields: adds these yields to the tile it is built on
TechMovementChanges: applies an adjustment to the movement rate based on some technology.
Button: the button to make workers build this
 
surt said:
iFlatMovement: same as movement but applied only to movement over flatlands (not hills)
Unfortunetly the logic you've used here doesn't work. Railroads give 10 movement no matter what the unit's movement - hence a "FlatMovement" of 6, as 6*10 = 60. This is my logic for thinking that iValue determines if it the movement is flat or not, unless there is some inbuilt logic to determine which would be more benificial.

On a similar note, anybody know what value CvRouteInfo.getValue() returns?
 
The Great Apple said:
On a similar note, anybody know what value CvRouteInfo.getValue() returns?

Given that there are functions for returning everything else I assume <iValue>.
 
snarko said:
Given that there are functions for returning everything else I assume <iValue>.
Me too! Though it might be the real value of the movement cost (be it flat or normal)... I'm going to have to test it :p
 
The Great Apple said:
Unfortunetly the logic you've used here doesn't work. Railroads give 10 movement no matter what the unit's movement - hence a "FlatMovement" of 6, as 6*10 = 60. This is my logic for thinking that iValue determines if it the movement is flat or not, unless there is some inbuilt logic to determine which would be more benificial.

On a similar note, anybody know what value CvRouteInfo.getValue() returns?

Ah, you're surely right. The game always becomes unplayably slow for me before railroads, so I don't have all that much experience using them. Baffles me why they'd include an adjustment to the non-flatmovement for railroad, though.
 
The Great Apple said:
Unfortunetly the logic you've used here doesn't work. Railroads give 10 movement no matter what the unit's movement - hence a "FlatMovement" of 6, as 6*10 = 60. This is my logic for thinking that iValue determines if it the movement is flat or not, unless there is some inbuilt logic to determine which would be more benificial.
You sure this isn't a setting for how much it costs to move over for units that have bFlatMovementCost set to 1?
 
i think they chose 60 because it's divisable by many small integers including 2, 3, 4, 5, 6, 10, 12, etc. So when Engineering modifies -10 for road, it really changes from 1/2 to 1/3.

Anyway, I think iMovement is for moving between different tiles, and iFlatMovement is for same tiles. Road to road is flat, as is RR to RR. Road to RR, RR to road, none to road or RR, or vice versa count as different, and the cost will be the higher value in iMovement. i.e. Road to RR or vice versa costs 30, unless Engineering is discovered, then it costs 20.

Also, FlatMovement is multiplied by the unit's base moves. so a Scout with 2 base moves moving from RR to RR costs him 12; a Warrior with 1 base moves doing the same costs him 6. Don't forget that everything is counted from 60. So a scout actually starts with 120 MP and a Warrior 60. (the game shows everything divided by 60 so you only see 1s and 2s).
 
One thing I think I've seen (although I haven't tested it thouroughly) is that units only move 10 spaces on railroad, whether they have 1 movement point or two.

-RdF
 
roidesfoux said:
One thing I think I've seen (although I haven't tested it thouroughly) is that units only move 10 spaces on railroad, whether they have 1 movement point or two.

That is indeed correct. I did some testing of this and the following is true:

1. Rail movement is 10 regardless of base movent points

2. Hills or plains make no difference as such (they make a difference when entering a road/rail road as you pay the cost of the underlying terrain when entering that square if coming from an unroaded/railed square).

3. There seems no way of altering via tech the rail movement rate through XML as you can do with roads using the <TechMovementChanges> tag. I sure hope I&#8217;m wrong about this (anyone? :confused:) because this is exactly what I'm trying to do, but I&#8217;m fairly sure this is right.

J
 
Lord Olleus said:
What kind of retared programmer decided that you could change the movement along roads but not along railroads? This makes absolutely no sence to me

You can change movement of rail, you can't change movement of rail using a tech bonus (which I guess is what you mean) which yes seems a bit silly.

The underlying principle is good though, it basically means that units of any type, regardless of bass movement, have the same rail movement. It makes sense, rail moves tanks as fast (if not slower) than infantry in practice, its more 'realistic' as such, and certainly makes infantry just that slightly more viable in the later stages of the game.

Some clever python programmer may address this in time (I haven't had time to look at it myslef, look how long it took me to reply to this :(). For now we will just have to put up with it.
 
Each unit info has a "<bFlatMovementCost>0</bFlatMovementCost>" (they're all false). This must be related to the "<iFlatMovement>" in the route infos.
 
Not sure if anyone has wondered about this anymore or anything, but after a little experimenting I have concluded the following: Both Movement and Flat Movement are used by both rail and road. Whichever moves a unit farther is used. For road, both are 30, which means a unit with 1 movement point can use either since flat 30 * x = 60 and (60/30) * 1 = x, where x is the movement. For rail, most units use flat (that have 1, 2 or 3 movement), since even at 1/3 cost, 10 (6 * 10 = 60) is greater.

[Note: I was testing with Final Frontier]
I changed the 20 to 15 (1/3 to 1/4), for rail (jump) movement.

I took 3 cruisers and gave 1 a +1 movement promotion, and another +2 movement. The 1 and 2 movement used 10 for movement (10 > 4 & 8). The 3 movement however (since it is now 1/4 cost meaning 12) moved 12 times, even though the description also said 10 tiles.

Changing the rail to have 60 flat and road to 60 cost (leaving the 15 cost for rail and 30 flat for road) made the road say 2 tiles and the rail say 1/4th cost.

I would guess that which is displayed is what moves your slowest unit faster, i.e.: 1 (60 points). If it is a tie (cost is 1/10th and flat is 10/tiles), I conclude also that the fraction is shown instead of the flat.

EDIT: If a number does not divide nicely into 60, then the game will round up to the next whole number. I put 14 for flat movement and got 5 (60 / 14 = 4.2857...).
 
This thread is well over 3 years old.

and still useful! thanks all for the explanations... trying to use them to mod roads down to normal movement (but allow connections to resources) and using rail for "roads" in a medieval mod I am trying to work on...


My god, I remember The Great Apple. Where ever did he go off to?
was he the guy that did the great ai experiment?

yes! he was awesome...
http://forums.civfanatics.com/showthread.php?t=184128
 
Originally Posted by mechaerik
This thread is well over 3 years old.

and still useful! thanks all for the explanations... trying to use them to mod roads down to normal movement (but allow connections to resources) and using rail for "roads" in a medieval mod I am trying to work on...

Haha.. I was gonna reply with exact same quote "And still useful!" before I read further and 2 others said same thing.. btw it's now 5 years old and STILL VERY USEFUL!:D

Answered all my questions.. Couldn't get what I wanted for roads. BUMP!
 
Back
Top Bottom