Sorry for this long question, I've tried to make it as quick as possible but I have to clarify a few things not to be misunderstood.
In brief: I'm trying to discourage (or encourage) the entities that use pathfind from travelling through certain zones, while still allowing to use them if other paths are blocked or too long.
Long version: I'm making a 2d isometric rogue-like game with randomly generated maps. The terrain will often be covered by a sticky substance (that i call "blob") which halves the speed of any entity, and I want enemies to act as if they knew that. Since a longer route may actually be completed in a shorter time (i.e. by circumventing the blob), enemies should choose their path considering not only the distance travelled but also the slow-down effect.
If i were to code a pathfinder by myself, I would use a graph and place a node on every tile. The nodes with blob would have a different (bigger) "weight", as if they were put farther away from the others: the algorithm would still choose the shortest path... but this way it would also take into consideration the slow-down.
Anyway Godot already has a nice pathfinding algorithm and I thought it would be better to use what I have rather than reinventing the wheel.
Just as a reference, this is my general level setup.
I need to keep separated the three tilemaps (the tiles have different dimensions and should be drawn in that order). According to this question, to add the pathfind I should
basically make a new scene and add sprites the way you normally make a tileset, then you can attach NavPolyInstances to each tile. Then in your map scene, make the TileMap a child of a Navigation2D and all the NavPolyInstances on the tiles will combine.
In my case, I should use the "blob" tilemap. But here's my problem:
If I'm not mistaken, the Navpoly simply says "you can travel here" or "nope, not here". I'm looking for something in between, like "you can travel here... but you shouldn't".
Do you think there's a way to use the Navigation2D to make the entities act as I described, or is it better to create a new pathfinder from scratch using weighted nodes in a graph? (...or... something else, maybe?)
(On a side note: my problem is actually more complicated... There are actually two types of blob, A and B, and two types of enemies: "A" enemies are slowed by "B" blob and accelerated by "A" blob, and vice versa. So they should avoid the enemy blob and stick close to their own. Anyway I suppose I can manage on my own if you help me solve the one I described. )