Skip to content

Feature request: per-party world pathfinding cost (NavCost) hook #499

Description

@Suor

MSU added a per-party movement-speed pipeline (m.MovementSpeedMultFunctions, origin/retinue/item getMovementSpeedMult), so a mod can make a party move faster on certain terrain. But the world pathfinding that picks the route does not see any of that.

Both player routing calls in states/world_state.nut (onUpdate and onMouseInput) hardcode navSettings.ActionPointCosts = ::Const.World.TerrainTypeNavCost, a single global array derived once from ::Const.World.TerrainTypeSpeedMult. There's no per-party / per-origin override, and the per-asset Assets.m.TerrainTypeSpeedMult array isn't consulted either.

Consequence: a party that is genuinely faster on, say, forest tiles (whether via the new movement-mult API or the vanilla per-asset terrain array) still auto-routes around forests, because routing weights forests by the global cost. The speed bonus applies once you're on the tile, but the navigator never prefers those tiles.

This is vanilla behavior, not an MSU regression — filing here because MSU already owns the per-party movement-speed abstraction, so a matching per-party routing-cost hook would be the natural home.

Request: a way to override the ActionPointCosts used for a given party's pathfinding (e.g. a party.getNavigationCosts() / getActionPointCosts() overridable, consulted by the player routing in world_state), so a mod can keep routing consistent with the movement-speed mults it applies.

MSU 1.8.0.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions