Page 1 of 1
Problem with "unavoidable" wolf holes
Posted: Sun May 10, 2020 6:07 pm
by phoenixffyrnig
Just had a situation when I could not use a unit as desired because it's route shown would take it into a horribly painful death. I could see the enemy wolf hole (thanks to my spy nearby), but the path shown by the dots (1 tile up then 2 tiles right) would have killed my man, even though 2 tiles right THEN 1 tile up would have taken me to exactly the same place but avoided the wolfhole...but I could not do that.
Is there anyway of getting the route finding logic to automatically avoid visible traps, (caltrops also I imagine would be the same) because Aaaaaarrrrrrggggghhh! that completely messed up my turn!
Cheers folks

Re: Problem with "unavoidable" wolf holes
Posted: Mon May 11, 2020 1:57 pm
by AgentA
A move command similar to Advance Wars and Fire Emblem will be nice. In there you can specify which tiles a unit will step on with each step.
Or maybe disable auto-select movement route when we increment the steps by click per tile? That way we can move in desired tiles.
Re: Problem with "unavoidable" wolf holes
Posted: Mon May 11, 2020 4:21 pm
by phoenixffyrnig
What a coincidence! It was your bogging wolf hole that caused all my problems, AgentA

Re: Problem with "unavoidable" wolf holes
Posted: Wed May 13, 2020 11:59 am
by Endru1241
I moved it to more appropriate forum.
Especially because I believe, that AI would probably do the same - go right into seen trap.
It is however non-trivial algorithm problem.
If AI were to avoid traps - how to weight the slow-down of making a detour to avoid it vs the damage received from trap?
@Stratego (dev) - that's probably engine issue.
Re: Problem with "unavoidable" wolf holes
Posted: Wed Apr 14, 2021 5:40 pm
by phoenixffyrnig
Revived.
Sorry, this happened again today. Forewarned, I even used a foot unit to attack the visible wolfhole, but still I could not avoid it with a hussar even though he had enough movement to get around it.
"Bog it!" thought I to myself, and decided to charge forward and over aforementioned obstacle - no dice! But that made me think... can the miss chance of a wolf hole be inverted somehow @Endru1241? Because at the moment, with a miss chance of 0.1, a slow unit has a better chance of escape than a quick unit. For a hidden trap, surely it is the fast units who are most likely to fall in?
But back to original point, we do need to be able to avoid seen traps somehow.
Re: Problem with "unavoidable" wolf holes
Posted: Wed Apr 14, 2021 5:49 pm
by phoenixffyrnig
Ditto caltrops and floating petard re miss chance.
Re: Problem with "unavoidable" wolf holes
Posted: Thu Apr 15, 2021 11:02 am
by Endru1241
phoenixffyrnig wrote: ↑Wed Apr 14, 2021 5:40 pm
can the miss chance of a wolf hole be inverted somehow? Because at the moment, with a miss chance of 0.1, a slow unit has a better chance of escape than a quick unit. For a hidden trap, surely it is the fast units who are most likely to fall in?
I don't know any way to reverse it.
But I also don't agree with reversing it.
Traps are not moving. Being faster only makes turning/evasion harder and impact worse, so probably traps to be more effective.
Besides I think miss chance is not even a case if there is a bonus damage.
Although, we could just remove the chance.
Re: Problem with "unavoidable" wolf holes
Posted: Sat Aug 14, 2021 10:32 pm
by phoenixffyrnig
This is still an issue, a unit will sometimes voluntarily hit a trap even when it is visible and a clear alternate path exists.
Endru1241 wrote: ↑Thu Apr 15, 2021 11:02 am
But I also don't agree with reversing it.
Traps are not moving. Being faster only makes turning/evasion harder and impact worse, so probably traps to be more effective.
As to this, miss chance is multiplied by speed, right? So a fast unit currently has a better chance of avoiding traps than a slow unit, whereas reality suggests it should be the opposite.
Re: Problem with "unavoidable" wolf holes
Posted: Sun Aug 15, 2021 8:27 am
by Endru1241
I'm removing this miss chance.
As for paths - it's much more complicated engine problem.
There is no way to tell if it will be changed anywhere near.
Re: Problem with "unavoidable" wolf holes
Posted: Sun Aug 15, 2021 8:49 am
by Stratego (dev)
maybe shall i consider in pathfinding a visible hole as a blockade like a wall?
Re: Problem with "unavoidable" wolf holes
Posted: Sun Aug 15, 2021 10:33 am
by makazuwr32
If it will not interfere with movement logic when it is invisible than yes, please.
Also i'd say in general this must be how all invisible units must act when visible for enemy.
Re: Problem with "unavoidable" wolf holes
Posted: Sun Aug 15, 2021 10:46 am
by Endru1241
Stratego (dev) wrote: ↑Sun Aug 15, 2021 8:49 am
maybe shall i consider in pathfinding a visible hole as a blockade like a wall?
I'd say it may be too much.
It should only be detrimental, but not complete blockade.
So it could be counted as something with lowest priority.
If there is another path it should always be used instead, if it takes the same number of movement points on pathfinding.
For AI/waypoints it should probably be counted as 3 moves or something, so that even if another path takes 2 more move points it should be used instead.
makazuwr32 wrote: ↑Sun Aug 15, 2021 10:33 am
If it will not interfere with movement logic when it is invisible than yes, please.
Also i'd say in general this must be how all invisible units must act when visible for enemy.
No. Why would pathfinding avoid e.g. revealed enemy spy or assasin?
This should only avoid those with explode_on_step.