Ryantheskinny said:
I have ships getting stuck randomly in corners now and some villagers go in a loop,one example slavers and travellers leaving dorestadt they randomly went south into a dead end river channel and just stayed there, still said they where travelling towards ribe, the two cities are connected by fords and other ships seem fine like fishers.
Any ideas why that may be happening? thanks in advance
deleted the fords, everything works the same, found the port of ribe in central Europe instead of by ribe. see pics, also note odd pathfinding of lords in second pic.
1) MBScript, not Python.
If Python is the car and you are a driver trying to go from A to B, MBScript and modding is the art of driving (know traffic law, signals, rules, how to control the car, move and stop, and all that). You dont need to know how the engine works, how to assemble the car, or how to make one. You only need basic knowledge like how to fill the tank and change tires.
And the game engine would be the roads. That is the stuff inside the warband.exe (plus .dll files) that you cant see or mess with. Black box.
2) Pathfinding is a mix. On the modsys side you give a destination. Go to A. That is it. The engine is the one that picks the path (move 1 km south, now another 1 km south, now turn west, ...).
Geometry of your map is the key for pathfinding. And the proper location of your centers (the terrain they are on). Bad terrain (vertex) and it is easy for the engine to get stuck trying to go somewhere.
Sea is not different from land. There was quite a lot of trial and error and changes on the engine side to make the VC map work. It was not unusual for ships to get stuck before RE edition.
You can use the tools like the TW devs to check for issues. So if a ship gets stuck somewhere you should review your map and see if you have issues with it on that location.
There is code that forces parties to change direction if they get stuck for some time (so test it out with quick time - ctrl space).
You will see in mods in general that parties just move towards the water (not a port city), change into a boat somehow, move towards their destination, and transform back into a land party. In this case the ship/horse icon is just a visual trick. If on water you are a boat. If on land you are a horse. So they dont need to make partial decisions to move between ports.
--> some mods will use the bridge terrain to create a sea road. That is the usual rule for the old mods (first generation).
--> other mods will have free navigation
3) That applies to fords. You cant tell a party in England to go to Paris. You need to tell it to go to port A, transport it to the water near port A, then to go to port B, then to enter port B, then to tranport it to the land near port B, then to Paris. See the VC code and how they handle fords AI decision when going from Ireland to England as a example.
Example of code
Code:
# VC auto travel system + NEW: AI landing in general
(0.7,
[