NEW MOTHOD!
This guide summarizes Steps 1–6 shown in the images to regenerate and install:
- the map (BMP),
- the collision map converted into
nav_matrix.dat, - the navigation points
nav_vec.dat, - the distance/connection matrix
matrix_int.dat, - and the city INI
StadtDaten.ini.
Important note: always make a backup of the original files before replacing them.
-
Patrician3\navdata\nav_vec.dat(new points)matrix_int.dat(new distance/connection matrix)nav_matrix.dat(converted collision map)
-
Patrician3\scripts\StadtDaten.ini(new city file generated by the tool)
- Prepare the new map image with size 2400×1800.
- Keep the 64px borders (frame) included in the image.
- Export as BMP.
- Starting from the same playable area, generate the collision map scaled down to 640×472.
- No borders (so do NOT include the 64px frame).
- Make sure you color as BLACK the Land, and as Blue the Water
✅ Expected output: a 640×472 collision image without borders.
- Run
ImgConv.pyon the 640×472 collision map. - The output must be
nav_matrix.dat.
Quick checklist:
- Is the source really 640×472?
✅ Expected output: nav_matrix.dat ready.
Inside the NavPointEditor.exe:
- Load the file using Load nav_matrix → click Generate Contour Points using the recommended settings (Spacing = 3, minDist from land = 4).
- Use Export nav_vec → generates
nav_vec.dat. - Use Export matrix_int → generates
matrix_int.dat. - Copy and replace in
Patrician3\navdata\:nav_vec.datmatrix_int.dat- and also replace
nav_matrix.dat(the one created in Step 3)
✅ Expected output: Patrician3\navdata\ contains all 3 updated files.
- Open CityMapEditor.exe.
- Load the BMP map (2400×1800) and the current INI (if you need it as a base).
- Move each city to the correct position.
**Note: ** all cities must be placed on water or on a non-collidable part of the map.
Practical tips:
- After each move, double-check that the icon/name is not placed on land/obstacles.
✅ Expected output: all cities correctly repositioned.
- From CityMapEditor (or equivalent tool), generate/export the new
StadtDaten.ini. - Copy it into
Patrician3\scripts\, replacing the existing one:Patrician3\scripts\StadtDaten.ini
✅ Expected output: an updated StadtDaten.ini consistent with the new map.
- The game starts without crashing.
- Cities are clickable
- Sea routes can find paths (no total blockage).
- If routes become impossible:
- check
nav_matrix.dat(collision), - make sure
nav_vec.datdoes not contain disconnected clusters, - regenerate
matrix_int.datafter any point edits.
- check
Before replacing files, save a copy of the originals:
Patrician3\navdata\nav_vec.datPatrician3\navdata\matrix_int.datPatrician3\navdata\nav_matrix.datPatrician3\scripts\StadtDaten.ini
You can store them in a folder like:
Patrician3\_backup_navdata_YYYYMMDD\
- 2400×1800 map with 64px borders (BMP) OK
- 640×472 collision map without borders OK
-
nav_matrix.datgenerated by ImgConv.py OK -
nav_vec.datexported and copied intonavdataOK -
matrix_int.datexported and copied intonavdataOK - Cities repositioned (on water/non-collidable) OK
- New
StadtDaten.inicopied intoscriptsOK
OLD METHOD [Python]!
This guide explains how to create a 2D navigation map system for water-based movement using the Nav Point Editor tool.
At the end of this process, you’ll have three essential binary files for your pathfinding system:
nav_matrix.dat→ the walkability map (land/water)nav_vec.dat→ the list of navigation points (nodes)matrix_int.dat→ the full connection and distance matrix between nodes
- Create a main map image 2400×1800 pixels.
- Add 64px borders on all four sides (usable area = 2272×1672).
- Save as
main_map.png.
- Create a 640×472 image.
- Use:
- Black (1) = Land
- Blue (0) = Water
- Exclude the 64px borders.
- Save as
collision_map.bmp.
- Use 'CompImage.py' tool to select the main map first, then the collision map, and overlay them to visually verify that both align correctly.
Use 'ImgConv.py' converter tool to transform each pixel into binary values:
First 4 bytes:
[2 bytes] → Width = 640
[2 bytes] → Height = 472
Then:
| Color | Binary |
|---|---|
| Black | 00 |
| Blue | 01 |
Output to be renamed in → nav_matrix.dat
- Launch Mapmaker.py.
- Click to place nodes on water only (blue).
- Default ~350 nodes.
- Right-click to remove or drag to move.
Click Save Points to generate nav_vec.dat.
Format:
[2 bytes] Number of points
[2 bytes] Padding
For each point:
[2 bytes] X coordinate
[2 bytes] Y coordinate
Click Generate Matrix to create matrix_int.dat using Dijkstra’s algorithm.
Each pair (i, j) contains:
[4 bytes] Distance
[2 bytes] Next Node
Use Verify All to ensure all nodes are reachable.
| Color | Meaning |
|---|---|
| 🔴 Red | Isolated node |
| 🟣 Purple | Unreachable node |
| 🟠 Orange | Weak connection |
If Everything is Okay nothing will happen,
| File | Description |
|---|---|
nav_matrix.dat |
Walkability (land/water) |
nav_vec.dat |
Node list |
matrix_int.dat |
Distance matrix |
Move those files in navdata
Enjoy!










