Improved AI Ally Control
Moderator: Forum Moderators
- beetlenaut
- Developer
- Posts: 2827
- Joined: December 8th, 2007, 3:21 am
- Location: Washington State
- Contact:
Improved AI Ally Control
Losing because the AI allied leader commits suicide is terribly frustrating. The mainline AI control macros don't prevent this in most cases, which is why I created my own menu items. I originally included them in The Founding of Borstep years ago, but these are newly refactored and now have icons and visual indicators. They only require a one-line macro call. Please use this macro if you include an AI side that isn't allowed to die!
This demo (based on WML Guide) allows you to try it.
These are the only files you actually need. The .cfg file has a usage note. The icons can be moved to a subfolder as long as the paths are changed in the .cfg file.
Notes: There is assumed to be only one human controller, but that wouldn't be too hard to change for multiplayer. Each AI side is also assumed to have only one controllable leader. This is also possible to change, but the macros would have to get much longer.
This demo (based on WML Guide) allows you to try it.
These are the only files you actually need. The .cfg file has a usage note. The icons can be moved to a subfolder as long as the paths are changed in the .cfg file.
Notes: There is assumed to be only one human controller, but that wouldn't be too hard to change for multiplayer. Each AI side is also assumed to have only one controllable leader. This is also possible to change, but the macros would have to get much longer.
Campaigns: Dead Water,
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide
- Lord-Knightmare
- Discord Moderator
- Posts: 2364
- Joined: May 24th, 2010, 5:26 pm
- Location: Somewhere in the depths of Irdya, gathering my army to eventually destroy the known world.
- Contact:
Re: Improved AI Ally Control
WOAH. Thank you so much for this!
these will be wonderful additions to mainline, but for the time being, I am shoving them into my campaign(s).
these will be wonderful additions to mainline, but for the time being, I am shoving them into my campaign(s).
Creator of "War of Legends"
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
Re: Improved AI Ally Control
Especially now that the AI controller option has been removed from the core, a very useful tool.
I'll use it in my campaign, thank you for sharing.
Are there any plans to add it to the Wesnoth core?
I'll use it in my campaign, thank you for sharing.
Are there any plans to add it to the Wesnoth core?
Author of Antar, Son of Rheor ( SP Campaign) | Development Thread + Feedback Thread + Replays of ASoR
- beetlenaut
- Developer
- Posts: 2827
- Joined: December 8th, 2007, 3:21 am
- Location: Washington State
- Contact:
Re: Improved AI Ally Control
I didn't realize that the original one had been removed from the core, but I can see why it wasn't very popular: the AI's behavior seemed to be changed only in very subtle ways. I can't add it to the core myself (I've been out of the loop too long), and I'm not sure it's even possible at this point. The way it is currently written involves some new strings.
Edit: However, adding the icons to the core to make this much easier to implement should be possible at any point. If you think that would be helpful, you could contact a developer. It would mean more coming from several UMC authors.
Edit: However, adding the icons to the core to make this much easier to implement should be possible at any point. If you think that would be helpful, you could contact a developer. It would mean more coming from several UMC authors.
Campaigns: Dead Water,
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide
Re: Improved AI Ally Control
I thought it was just deprecated, and not actually removed yet?
Wesnoth-related GitHub repos:
General mods collection, SotBEEE, AToTBWaTD, The Earth's Gut, A Little Adventure, FtF
Social media: Mastodon: @egallager@treehouse.systems, Steam: egallager
General mods collection, SotBEEE, AToTBWaTD, The Earth's Gut, A Little Adventure, FtF
Social media: Mastodon: @egallager@treehouse.systems, Steam: egallager
Re: Improved AI Ally Control
Yes you are right. I thought it will be removed with BfW 1.16.
But they removed the AI Controller from all mainline campaigns with BfW 1.15 , right?
changelogchangelog wrote: Version 1.15.0
Campaigns
Deprecate AI Controller and remove it from mainline campaign scenarios
discussion about the AI controllermattsc wrote: The AI controller is used in roughly 2 dozen mainline scenarios. It certainly has its uses, but it has a whole bunch of issues too.
If what Mattsc said is true, that the AI controller has been used in so many scenarios, I think it would be wrong to remove it without a replace. If one plays scenarios in which you are dependent on AI-controlled allies, then it can be quite useful if you as a player have the opportunity to at least protect the AI side leader from suicidal actions. Otherwise there is often nothing left but to play the scenario again from the start, which is annoying. Especially when this can easily be avoided with the help of this simple and self-explanatory tool from Beetlenaut.
It is simple, and not as complicated, and as inscrutable for the simple gamer as the old AI controller. And this simplicity is what defines it. Most of the time it doesn't take more than that. Very simple commands:
1. DO NOT commit suicide!
2. Go here!
3. Do what ever you want!
I am in favor of not removing the AI controller without replacement, but replacing it with the Beetlenaut tool.
Who else?
Author of Antar, Son of Rheor ( SP Campaign) | Development Thread + Feedback Thread + Replays of ASoR
- Lord-Knightmare
- Discord Moderator
- Posts: 2364
- Joined: May 24th, 2010, 5:26 pm
- Location: Somewhere in the depths of Irdya, gathering my army to eventually destroy the known world.
- Contact:
Re: Improved AI Ally Control
File a FR request at the wesnoth github repo. I can give a thumbs up. however, it can be for the 1.17/master one though.I am in favor of not removing the AI controller without replacement, but replacing it with the Beetlenaut tool.
Who else?
Creator of "War of Legends"
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
Re: Improved AI Ally Control
Author of Antar, Son of Rheor ( SP Campaign) | Development Thread + Feedback Thread + Replays of ASoR
- Lord-Knightmare
- Discord Moderator
- Posts: 2364
- Joined: May 24th, 2010, 5:26 pm
- Location: Somewhere in the depths of Irdya, gathering my army to eventually destroy the known world.
- Contact:
Re: Improved AI Ally Control
You may want to make a fresher one, as upon checking it, I see something went wrong...horribly.
Creator of "War of Legends"
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
- Celtic_Minstrel
- Developer
- Posts: 2230
- Joined: August 3rd, 2012, 11:26 pm
- Location: Canada
- Contact:
Re: Improved AI Ally Control
The old AI controller was not removed in 1.16. The plan was to remove it in 1.17. But yes, any uses of it in mainline have been removed as far as I know.
Re: Improved AI Ally Control
Sorry for that.Lord-Knightmare wrote: ↑June 30th, 2021, 9:42 am You may want to make a fresher one, as upon checking it, I see something went wrong...horribly.
Is at Github no moderator who can fix that?
I think I will not make a fresher one, I better keep my hands off it before I cause any more mischief.
Author of Antar, Son of Rheor ( SP Campaign) | Development Thread + Feedback Thread + Replays of ASoR
- Lord-Knightmare
- Discord Moderator
- Posts: 2364
- Joined: May 24th, 2010, 5:26 pm
- Location: Somewhere in the depths of Irdya, gathering my army to eventually destroy the known world.
- Contact:
Re: Improved AI Ally Control
I am currently testing this in a scenario of mine, and I have to say, it's quite nice. However, compared to the previous (now deprecated one), it lacks some things. These things are the modification of the AI aspects of aggression and caution and assigning protection and targeting details. Perhaps, they can be added in?
Creator of "War of Legends"
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
Re: Improved AI Ally Control
This is a well written mod, but as LK has said, it can't act as a drop in replacement for now.
I really hope beetlenaut expands it further. I love the target_x/y approach.
Personally I've already included beetlenaut's freezer/thaw code in my mod. In my case I had to complement it with a bunch of micro_ais to make it apply to all ally units instead of just the leader.
https://github.com/virtualghetto/Wild_F ... .cfg#L2286
Thank you for writing this
I really hope beetlenaut expands it further. I love the target_x/y approach.
Personally I've already included beetlenaut's freezer/thaw code in my mod. In my case I had to complement it with a bunch of micro_ais to make it apply to all ally units instead of just the leader.
https://github.com/virtualghetto/Wild_F ... .cfg#L2286
Thank you for writing this
Re: Improved AI Ally Control
The big advantage of Beetlenaut's AI controller is that it is not complicated. If I understood it correctly, the old AI controller was removed from the mainline campaigns because it was too complicated and not intuitive enough. If you make Beetlenaut's AI controller just as complicated, what have we gained? Couldn't we have kept the old Ai controller right away? The AI controller actually has everything it takes, the only concession I would add is to assign a goal to the AI.
Author of Antar, Son of Rheor ( SP Campaign) | Development Thread + Feedback Thread + Replays of ASoR
- Lord-Knightmare
- Discord Moderator
- Posts: 2364
- Joined: May 24th, 2010, 5:26 pm
- Location: Somewhere in the depths of Irdya, gathering my army to eventually destroy the known world.
- Contact:
Re: Improved AI Ally Control
Complicated Code is not the issue. It's the results from the code. If the improved one is doing way better than the predecessor, then yes. Everyone will enjoy it. Right now, the starting impression is very positive so addition of working functionality for modifiable aggression, caution, targeting and protecting will be even more appreicated.If I understood it correctly, the old AI controller was removed from the mainline campaigns because it was too complicated and not intuitive enough. If you make Beetlenaut's AI controller just as complicated, what have we gained? Couldn't we have kept the old Ai controller right away? The AI controller actually has everything it takes, the only concession I would add is to assign a goal to the AI.
Creator of "War of Legends"
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium