Movement on slopes
Penalties for unit movement on slopes, depending on the direction (uphill or downhill), are configured in the pather.set
file. The slope angle of a map cell affects movement speed, which is critical for heavy units such as tanks.
Key parameters
SlopeDown
- defines penalties for moving downhill. This is similar to theHeight
parameter from Men of War.SlopeUp
- defines penalties for moving uphill.
Settings examples
Downhill movement penalties
The following is an example of penalties for moving downhill:
In this configuration:
cost < 0
- movement is prohibited.cost = 0
- movement occurs without penalties.cost > 0
- movement incurs a penalty, and the total path cost is calculated as follows:
Uphill movement penalties
The following is an example of penalties for moving uphill:
Upon loading the SlopeDown
table, it automatically applies to SlopeUp
unless a separate SlopeUp
table is specified.
To configure different penalties for uphill movement, a distinct SlopeUp
table should be provided after SlopeDown
.
Debugging
Quantized slope angles used for pathfinding can be displayed with the heightmap grid. Enable this view by pressing Alt+H
or checking the heightmap
option in the Heights tab of the Heights Editor.
For example, if the heightmap grid shows a value of 5, the angle corresponds to 30 degrees, using the 5th entry in the table.
Configuration recommendations
Vehicle units Vehicle units should descend directly downhill without special path recalculations. For uphill movement, the system should prioritize alternative routes.
Infantry units Infantry units should not attempt to traverse cliffs. They should always select bypass routes when necessary.
Usage notes
In multiplayer mod (mod_mp
), human units do not support the SlopeUp
parameter for pathfinding. Movement penalties for these units are controlled through the Height\SlopeDown
table.
For vehicle units, both SlopeDown
and SlopeUp
must be configured to ensure proper movement behavior on slopes.
Map requirements
For slope movement to function correctly, ensure that relevant areas on the map are not marked with the no_pass
flag.
Last updated