Following up on this thread, I've begun work on a plugin to improve customizability of the pathfinding. Currently I'm focused on the pathfinding for touch/mouse movement, but it could theoretically be used for events too.
I currently have the following customizations working:
I'm currently working on detection of "teleporters", which are map transfer events that don't change the current map. This is proving to be especially hard, because I wanted to include ones placed on otherwise impassable spaces.
I've attached the current version, if anyone wants to play around with it. It's still a bit rough, so I'd prefer if you don't use it in a real project yet.
If anyone can think of other improvements for touch/mouse movement, feel free to say mention them. I'm sure there are quite a few things I haven't thought of.
I currently have the following customizations working:
- Easier for other plugins to substitute in custom behaviour
- Avoid damage floors unless there's no other path
- Avoid zigzagging on diagonal stairs using Cae_SlopeMove
- Avoid map transfer events unless you click directly on them
- Better pathing around complex obstacles (by increasing the search limit)
I'm currently working on detection of "teleporters", which are map transfer events that don't change the current map. This is proving to be especially hard, because I wanted to include ones placed on otherwise impassable spaces.
I've attached the current version, if anyone wants to play around with it. It's still a bit rough, so I'd prefer if you don't use it in a real project yet.
If anyone can think of other improvements for touch/mouse movement, feel free to say mention them. I'm sure there are quite a few things I haven't thought of.