Modding road movement cost

Trying to find the file to do this..

I haven't done any modding yet for LH, so I've only gleemed over some of the files. I see one called TerrainTypes, and it has movement costs listed for terrain, but it seems to have every terrain type.. except roads..

I also see a file called RoadLevelDefs, but this doesn't list any movement cost variables..

I'd like to slow movement down on roads a notch. I find it feels wrong the way it is, where units can travel 2 spaces across grassy plains but as soon as they hit roads, which are in represented terms likely compressed dirt, their movement quadruples. Plus, the tactical impact of them is like having warp speed on the map - and though I guess it serves as beneficial, it is too much of a difference. I'd like it to drop the movement boost to double that of plains.

Can anyone point me in the right direction?

Thanks.

8,239 views 13 replies
Reply #2 Top

Thanks Primal_Savage!

I'm trying to understand how to apply it though. Sorry, I'm new to modding FE.

I understand there is XML code, and I think I understand how that works. Create a new XML file and put it in the mod folder, where the new code overrides the regular code.

But I'm not clear on how to apply the string you referenced. You say To Outposts. Can you expand a bit on this?

Reply #4 Top

Thanks! 

I see this reduces movement around the ZOC of Outposts. Which helps. Is there a way to reduce the movement speed of roads regardless of outposts? I'd like to drop the 4x base modifier to 2x.

Reply #6 Top

I kinda found a work around..

As road movement speed is hard-coded, and cannot be modded, I decided to reduce the movement cost of everything else. Using the TerrainTypes .xml file. (Everything but swamp tiles, these I kept as is because to me they should be very hard to traverse through).

Though I wasn't originally intending on speeding up movement in the game overall, it actually feels good imo.

I like how I can traverse plain-tiles 4 at a time instead of 2. And forests and hills 2 at a time instead of 1. My turns feel more accomplished; that plodding feeling is gone. Plus, roads now provide double the movement bonus to plains, not 4x. This transition feels much better imo.

I use your monster movement mod as well Primal_Savage, the one which gives monsters extra moves as turns pass. It adapts well to these new movement costs and gives the neutral mobs the ability to move around on equal footing as the game progresses.

It's still early and I need to push through some more games, but thought I'd post my thoughts. Maybe I'm alone on this, but the game has become more enjoyable since I made the change.

 

Reply #9 Top

The terrain around the cities ZOC? Do you mean the city terrain? All terrains are actually in TerrainTypes.xml

Reply #10 Top

There appears to be another kind of plains tile that isn't in the TerrainTypes.xml. Because I've modded everything to have reduced movement cost, but there are still some plains tiles which have the original cost.

At first I thought they were the tiles around cities ZOC, but they are elsewhere too. Weird.

So some Plains say 2x movement cost, which are the modded ones. Then there are others which say 1x movement cost. They aren't as common, but they're around.

Reply #11 Top

There are 3 plains tiles...

Land, Rugged_Land, Fertile_Land

Chasm (which one may not walk)

Chasm Edge (which one cannot walk)

Desert Terrain

Hills Terrain

Swamp Terrain

Arctic Terrain

MountainRange (which one may not walk)

MountainSide (which one may not walk)

Forest

Beach

Cliff (which one may not walk)

River (which ends movement)

City (where one moves instantly)

Submerged (which one cannot walk)

BurningLands

Fissure

Curgens Tomb

Imperium

Scrapyard

Cavewall (which one cannot walk)

Unknown (Cannot move upon)

Tomb (Used mostly for tactical battles)

--- Are you sure your hit up the first 3 plains tiles? ---

These tiles are all defined in any map (open up a map and you'll see these tile defined there), there might be the definition of -1 which refers to no particular tile, but probably defaults to plains, and that might be the problem...

Reply #12 Top

Thanks parrottmath - this helped me track down the problem. There is actually an error in the original scripting by Stardock.

In the TerrainType.xml file, under fertile land - here is a cut and paste of the problem area, and I've bolded the specific part which is incorrect:

</TerrainType>
  <TerrainType InternalName="Fertile_Land">
    <DisplayName>Plains</DisplayName>
    <MaxHeight>60</MaxHeight>
    <MinHeight>45</4</MovementCost>
    <TerrainMovementNote>1x Movement</TerrainMovementNote>

That bolded line should be broken down into 2 lines - as per how the script is written for the other land tiles. It's supposed to be:

<MinHeight>45</MinHeight>
    <MovementCost>4</MovementCost>

Note, my value for movement cost is 4 which is modded from the default of 8.

I guess when the game encountered the broken code, it reverted to a default value likely hardcoded elsewhere. With this code changed, the game is now acknowledging all plains tiles with reduced movement cost.