Skip to content

feat: detect road tiles via crosser metadata for surface speed#225

Merged
plenarius merged 3 commits into
masterfrom
feat/surface-speed-crosser-detection
Apr 18, 2026
Merged

feat: detect road tiles via crosser metadata for surface speed#225
plenarius merged 3 commits into
masterfrom
feat/surface-speed-crosser-detection

Conversation

@plenarius

Copy link
Copy Markdown
Owner

Summary

  • Detects road tiles at runtime using tileset crosser edge metadata instead of requiring walkmesh repaints for every tileset
  • When a player steps on DIRT (1) or STONE (4), checks if the tile has crosser edges — if any edge is not in an exclusion list, promotes the surface to DIRTPATH/STONEPATH for the +33% speed bonus
  • Loads a configurable exclusion file at startup (NWNX_LAYONARA_CROSSER_EXCLUSIONS_FILE) listing non-road crosser names (streams, cliffs, walls) so they don't get false road speed

Test plan

  • Deploy to ee64, set NWNX_LAYONARA_CROSSER_EXCLUSIONS_FILE env var, place exclusions file on data mount
  • Walk on roads in Windjammer's Bay (ttz01) — should get +33% speed
  • Walk on roads in Dapplegreen Outskirts (wsf10) — should get +33% speed
  • Walk on forest floor next to a road — should NOT get speed boost
  • Walk along a stream — should NOT get speed boost (if stream crosser is in exclusions)
  • Verify areas with repainted DIRTPATH walkmeshes still work (e.g., ttu01 areas)

Instead of repainting every tileset's walkmesh to use DIRTPATH/STONEPATH,
detect road tiles at runtime by checking tile edge (crosser) metadata.
When a player steps on DIRT or STONE, the plugin checks if the tile has
crosser edges — if any edge is not in an exclusion list, the surface
material is promoted to DIRTPATH/STONEPATH for the speed lookup.

Exclusion list is loaded from a config file at startup, configurable via
NWNX_LAYONARA_CROSSER_EXCLUSIONS_FILE env var.
@plenarius
plenarius merged commit d87a249 into master Apr 18, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant