Macromanagement possibilities
Moderator: Forum Moderators
-
Krzysztof-H
- Posts: 16
- Joined: January 20th, 2024, 11:05 pm
Macromanagement possibilities
Dear fellow Wesnothians,
Thank you for all the effort put into developing and maintaining this game, for free. It is truly wonderful and one of the best games I've played.
I wish to ask about one aspect of the game, because over time, it really puts me off it. It's micromanagement, or in other words, the dozens of clicks necessary to start and progress through a scenario. I really wish there was an option to automate the deployment and movement of my army when I want it. Of course, there absolutely are moments when I need the fine control to execute a tactic. I imagine an expert player who knows how the AI works will want to micromanage most or all movements. For an average player like me though, I wish I could focus more on the strategy with some macro gameplay, saving some real life time. Especially when there are several turns before I get in contact with the enemy.
I searched the forums and add-ons, but haven't found anything relevant. So my question is, do you know of anything like I'm describing?
EDIT: I realized I haven't mentioned an important caveat. I do know there is an auto-move feature in Battle for Wesnoth. However, this feature can easily break down when it is used with more than 1 unit. Two scenarios I remember:
So essentially, BfW has auto-move for individual units. My request is auto-move for groups of units. I see two possibilities how this could work:
Best regards,
Christopher
Thank you for all the effort put into developing and maintaining this game, for free. It is truly wonderful and one of the best games I've played.
I wish to ask about one aspect of the game, because over time, it really puts me off it. It's micromanagement, or in other words, the dozens of clicks necessary to start and progress through a scenario. I really wish there was an option to automate the deployment and movement of my army when I want it. Of course, there absolutely are moments when I need the fine control to execute a tactic. I imagine an expert player who knows how the AI works will want to micromanage most or all movements. For an average player like me though, I wish I could focus more on the strategy with some macro gameplay, saving some real life time. Especially when there are several turns before I get in contact with the enemy.
I searched the forums and add-ons, but haven't found anything relevant. So my question is, do you know of anything like I'm describing?
EDIT: I realized I haven't mentioned an important caveat. I do know there is an auto-move feature in Battle for Wesnoth. However, this feature can easily break down when it is used with more than 1 unit. Two scenarios I remember:
- Your units have different movement calculations. All it takes is for one unit to have the "quick" trait.
- The units do not account for blocking each other. Especially frustrating in narrow pathways or caves.
So essentially, BfW has auto-move for individual units. My request is auto-move for groups of units. I see two possibilities how this could work:
- Literally "group" units, like you can do in RTS games with control groups. Then they would move in the same formation they were originally grouped in.
- Paint a formation on the map, optionally select which unit should take which place in it. In an ideal world, you could select whether they should enter this formation immediately or focus on getting there faster.
Best regards,
Christopher
Re: Macromanagement possibilities
Well, you could type
However, this is mostly intended as a debugging tool rather than an aid for the player - I'm not sure how well this would work in practice.
:droid 1 on when you want to hand over control to the AI, and then type :droid 1 off when you want to re-take command.However, this is mostly intended as a debugging tool rather than an aid for the player - I'm not sure how well this would work in practice.
-
Krzysztof-H
- Posts: 16
- Joined: January 20th, 2024, 11:05 pm
Re: Macromanagement possibilities
Sounds like a great workaround! Thanks for the tip, I'll give it a try.gnombat wrote: January 4th, 2025, 4:19 pm Well, you could type:droid 1 onwhen you want to hand over control to the AI, and then type:droid 1 offwhen you want to re-take command.
However, this is mostly intended as a debugging tool rather than an aid for the player - I'm not sure how well this would work in practice.
- Atreides
- Posts: 1252
- Joined: March 30th, 2019, 10:38 pm
- Location: On the 2nd story of the centre village in Merwuerdigliebe turning the lights on and off
Re: Macromanagement possibilities
One add on that you might like is called Advanced Order Cancelling. It automatically cancels orders for units that have been given long treks if they are attacked on the way. I know, it's not exactly what you're looking for but it sounds like it might help a little.
Re: Macromanagement possibilities
Some ideas that are easy to implement
1) select hex, command all your units to move towards it in unspecified order
2) select start hex and end hex, command all your units move from their position with that vector at same pace, so slowest unit will slow everyone
With some effort it can be adjusted to request selection of units instead of all.
3) select line of units, by moving first unit in line, entire line follows
1) select hex, command all your units to move towards it in unspecified order
2) select start hex and end hex, command all your units move from their position with that vector at same pace, so slowest unit will slow everyone
With some effort it can be adjusted to request selection of units instead of all.
3) select line of units, by moving first unit in line, entire line follows
-
Krzysztof-H
- Posts: 16
- Joined: January 20th, 2024, 11:05 pm
Re: Macromanagement possibilities
That's a startAtreides wrote: January 4th, 2025, 5:12 pm One add on that you might like is called Advanced Order Cancelling. It automatically cancels orders for units that have been given long treks if they are attacked on the way. I know, it's not exactly what you're looking for but it sounds like it might help a little.
-
Krzysztof-H
- Posts: 16
- Joined: January 20th, 2024, 11:05 pm
Re: Macromanagement possibilities
Does sound easy indeed. I might try to program it. Can you recommend any WML examples to get me started?Ravana wrote: January 4th, 2025, 8:00 pm Some ideas that are easy to implement
1) select hex, command all your units to move towards it in unspecified order
2) select start hex and end hex, command all your units move from their position with that vector at same pace, so slowest unit will slow everyone
With some effort it can be adjusted to request selection of units instead of all.
3) select line of units, by moving first unit in line, entire line follows
Re: Macromanagement possibilities
It was interesting idea so I tried 3)
Seems that path should be specified with middle locations as well. Currently follower2 falls behind when leader moves multiple hexes at once. Created https://github.com/wesnoth/wesnoth/issues/9699
Code: Select all
# alias e=lua wesnoth.require("wml-utils").handle_event_commands(wml.load("~add-ons/EventLoader/event.cfg"))
[remove_event]
id=Rav_EventLoader_Event_1
[/remove_event]
[remove_event]
id=Rav_EventLoader_Event_2
[/remove_event]
[unit]
side=1
type=Horseman
x=10
y=10
id=leader
canrecruit=yes
[/unit]
[unit]
side=1
type=Blood Bat
x=10
y=9
id=follower
canrecruit=yes
[/unit]
[unit]
side=1
type=Vampire Bat
x=10
y=8
id=follower2
canrecruit=yes
[/unit]
[modify_unit]
[filter]
id=leader
[/filter]
x=10
y=10
[set_variable]
name=follower_id
value=follower
[/set_variable]
[/modify_unit]
[modify_unit]
[filter]
id=follower
[/filter]
x=10
y=9
[set_variable]
name=follower_id
value=follower2
[/set_variable]
[/modify_unit]
[modify_unit]
[filter]
id=follower2
[/filter]
x=10
y=8
[/modify_unit]
[event]
name=moveto
first_time_only=no
# id is needed to not load multiple versions of event at once and to be able to remove it
id=Rav_EventLoader_Event_1
[filter]
[not]
[filter_wml]
[variables]
name=follower_id
equals=$empty
[/variables]
[/filter_wml]
[/not]
[/filter]
[store_unit]
[filter]
id=$unit.variables.follower_id
[/filter]
variable=follower
[/store_unit]
[do_command]
[move]
x="$follower.x,$unit.variables.follower_to_x"
y="$follower.y,$unit.variables.follower_to_y"
[/move]
[/do_command]
[modify_unit]
[filter]
id=$unit.id
[/filter]
[set_variable]
name=follower_to_x
value=-999
[/set_variable]
[set_variable]
name=follower_to_y
value=-999
[/set_variable]
[/modify_unit]
[/event]
[event]
name=enter_hex
first_time_only=no
# id is needed to not load multiple versions of event at once and to be able to remove it
id=Rav_EventLoader_Event_2
[filter]
[not]
[filter_wml]
[variables]
name=follower_id
equals=$empty
[/variables]
[/filter_wml]
[/not]
[/filter]
[modify_unit]
[filter]
id=$unit.id
[/filter]
[set_variable]
name=follower_to_x
value=$x2
[/set_variable]
[set_variable]
name=follower_to_y
value=$y2
[/set_variable]
[/modify_unit]
[/event]
-
Krzysztof-H
- Posts: 16
- Joined: January 20th, 2024, 11:05 pm
Re: Macromanagement possibilities
Thanks for the effort! WML looks quite convoluted to me, but I get the gist of it.Ravana wrote: January 4th, 2025, 9:11 pm It was interesting idea so I tried 3)
Seems that path should be specified with middle locations as well. Currently follower2 falls behind when leader moves multiple hexes at once. Created https://github.com/wesnoth/wesnoth/issues/9699Code: Select all
# alias e=lua wesnoth.require("wml-utils").handle_event_commands(wml.load("~add-ons/EventLoader/event.cfg")) [remove_event] id=Rav_EventLoader_Event_1 [/remove_event] [remove_event] id=Rav_EventLoader_Event_2 [/remove_event] [unit] side=1 type=Horseman x=10 y=10 id=leader canrecruit=yes [/unit] [unit] side=1 type=Blood Bat x=10 y=9 id=follower canrecruit=yes [/unit] [unit] side=1 type=Vampire Bat x=10 y=8 id=follower2 canrecruit=yes [/unit] [modify_unit] [filter] id=leader [/filter] x=10 y=10 [set_variable] name=follower_id value=follower [/set_variable] [/modify_unit] [modify_unit] [filter] id=follower [/filter] x=10 y=9 [set_variable] name=follower_id value=follower2 [/set_variable] [/modify_unit] [modify_unit] [filter] id=follower2 [/filter] x=10 y=8 [/modify_unit] [event] name=moveto first_time_only=no # id is needed to not load multiple versions of event at once and to be able to remove it id=Rav_EventLoader_Event_1 [filter] [not] [filter_wml] [variables] name=follower_id equals=$empty [/variables] [/filter_wml] [/not] [/filter] [store_unit] [filter] id=$unit.variables.follower_id [/filter] variable=follower [/store_unit] [do_command] [move] x="$follower.x,$unit.variables.follower_to_x" y="$follower.y,$unit.variables.follower_to_y" [/move] [/do_command] [modify_unit] [filter] id=$unit.id [/filter] [set_variable] name=follower_to_x value=-999 [/set_variable] [set_variable] name=follower_to_y value=-999 [/set_variable] [/modify_unit] [/event] [event] name=enter_hex first_time_only=no # id is needed to not load multiple versions of event at once and to be able to remove it id=Rav_EventLoader_Event_2 [filter] [not] [filter_wml] [variables] name=follower_id equals=$empty [/variables] [/filter_wml] [/not] [/filter] [modify_unit] [filter] id=$unit.id [/filter] [set_variable] name=follower_to_x value=$x2 [/set_variable] [set_variable] name=follower_to_y value=$y2 [/set_variable] [/modify_unit] [/event]
-
Krzysztof-H
- Posts: 16
- Joined: January 20th, 2024, 11:05 pm
Re: Macromanagement possibilities
I tried using that command. It's a bit hit-or-miss. Sometimes it works great, but sometimes it breaks down, because the AI just pushes evenly in all directions, instead of focusing on one direction or defending. But even then, it can automate recruitment/recalls, which I really appreciate.gnombat wrote: January 4th, 2025, 4:19 pm Well, you could type:droid 1 onwhen you want to hand over control to the AI, and then type:droid 1 offwhen you want to re-take command.
However, this is mostly intended as a debugging tool rather than an aid for the player - I'm not sure how well this would work in practice.
Re: Macromanagement possibilities
The auto-move is helpful, but totally falls apart with more than one unit, like you said. A proper group movement option would be awesome, either the control group thing or the formation painter would be a huge improvement.