-
-
Notifications
You must be signed in to change notification settings - Fork 990
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WoF: In S09 Ancestor, Yetis Stop Pursuing When Their Target (Player's Leader) is on Unwalkable Terrain #8757
Comments
It sounds like when the AI can't find a path to Gorlack, it doesn't know where the yetis should move and thus gives up. CC: @Jonathan-Kelly |
I'm not sure where that is located. I only note that specific terrain is avoided in the general spawner macro. I'm not even sure what that terrain represents. wesnoth/data/campaigns/Winds_of_Fate/utils/macros.cfg Lines 105 to 110 in 0222fda
|
That should match only village terrain. Probably better done as |
The bats on the map - which can move on unwalkable terrain - do follow Gorlack. I assumed the Yetis have modified AI because they don't move on villages at all and their behaviour in this issue (I might doublecheck, but I don't think the AI in Dead Water just stops moving landbound units because the player's leader is in deep water). When the Yetis are Poisoned, they stop attacking even when flanked. AI leaders share this behaviour but regular recruits don't. In this scenario, a Poisoned AI unit just moves adjacent to Gorlack and hangs around. This might be a byproduct of avoiding villages, but it definitely isn't typical AI behaviour. |
Hmm, did you notice anything like this happening with the wildlife during scenarios 1 or 5? Those scenarios use the same village avoidance AI modification but their maps have healing oases which the creatures can retreat to. It is possible there are some bugs with the default AI when no healing tiles are available to it. |
I went back and checked. In S1 and S5, Poisoned units behave properly - they attempt to move towards an oasis and are still willing to attack. I tested S02 in WoF. As it turns out, the AI does actually does do nothing when the player's leader is on unwalkable terrain. The AI moves to capture villages, but then stops moving. Single units still move to attack, but once all villages are captured, anything that can't attack remains stationary. |
Alright, so then I guess either the Wyrms could lose their poison bite or the map could get a few healing oases to work around that limitation. Really wish we had more than one type of non-village healing terrain besides oases, but oases may not look too far out of place on this map given its volcanic microclimate...
Do you mean they will not pursue your units while your leader stays out over deep water? In my tests (of S02) enemy land units moved across the map to attack any player unit which moved onto land, regardless of whether the player's leader stayed out over the deep sea tiles. The enemy land units only stayed still if presented with zero reachable targets. Which seems like reasonable behavior (for scenario 2)? |
I've attached two replays of S2 (to be clear, the AI behaviour in this scenario isn't a real problem, it's just for demonstration). I debug killed the boats because they attack normally. In replay 2, I reduce the burner's max moves so it can't attack the AI leader. This leads to no response from that AI. The AI occupies villages and castles, but I believe only because those are where the unit stopped / was recruited. I think the issues with AI behaviour here are from the default AI, it's just that they are masked by other behaviours (village capture / defend leader). I don't think the Wyrm's Poison matters enough to modify the unit as the scenario is effectively won at that point. The player's only access to Poison is Water Serpents, which the Yetis can kill in one attack. Is it possible to "puppet" the Yetis and instruct them to attack adjacent units? In a similar vein, can the default AI be overidden and instructed to always move towards the closest hostile unit or a different hero? There's an Eastern Invasion scenario (13_Spoils_of_War) which implements custom AI like this. WoF-Reclamation replay 20240417-131112.gz |
Okay, after looking at your replays and digging further into how the AI works, it sounds like ordinary units are not considered I believe you can add all hostile units (or just the player's heroes) as Why the wildlife in S1 and S5 seem more dynamic is because they tend to have more enemies spawn or move inside their "hunting radius" of one move away (and to a lesser extent because they have healing oases to retreat to when injured.) |
I believe the AI can have fog enabled independently of the player, but it'll probably just make the AI stop moving until one of their units spots the player's leader, at which point they'll all start moving towards the player. The addon campaign Return From the Abyss (trial_of_arms) has a couple of Giant Spiders (controlled by an otherwise normal AI side) which randomly walk in a small area near where they start. I think this behaviour is set by a unit variable:
However, if the AI doesn't have a goal it proabably won't travel very far or be relatively easy to bypass or otherwise lure away. If the Yetis all spawn in the mountains and just roam around, the player might not even see them until the end. |
Yeah a lot of the Micro AIs have a random walk function. Among these the Big Animals Micro AI seems the most promising. In the past these AIs were buggy and limited but they have improved in recent years. At least the Goto Micro AI works fairly well in the new King of the Hill multiplayer scenario. So I have it on my todo list to test out how well Big Animals performs on this and the other two "wildlife" scenarios. Optimally, it would be the same as the default AI except that the usual |
Game and System Information
Description of the bug
In WoF S09 Ancestor, the main threats are multiple Yetis which spawn randomly on the map and pursue the player's leader, Gorlack.
They have simple modified AI:
When Gorlack is standing on unwalkable terrain, the Yetis stop moving towards Gorlack.
Steps to reproduce the behavior
Expected behavior
The Yetis should continue to path towards Gorlack, even if Gorlack is on unwalkable terrain.
Additional context
This is significant outside of exploits because of a vertical chasm in the middle of the map which Gorlack might fly through.
The text was updated successfully, but these errors were encountered: