[engine] Stop when attacked

Brainstorm ideas of possible additions to the game. Read this before posting!

Moderators: Forum Moderators, Developers

Forum rules
Before posting a new idea, you must read the following:
Post Reply
peterbill
Posts: 1
Joined: April 26th, 2019, 3:44 am

[engine] Stop when attacked

Post by peterbill » April 26th, 2019, 3:52 am

Would it be possible to have unit to stop the automatic movement after some lurker attacks it? This is really big deal in big maps with fast or ambush units and shroud (or something else that prevents undo). I have a unit that needs to travel a long way. Then, some lurker comes and attacks the unit. My unit keeps on traveling and I lose the chance to attack back. It would be really great that I could choose an option (although I don't see why I wouldn't want it to be chosen) that would forget the path and make the unit to stop if it's been attacked.

User avatar
beetlenaut
Developer
Posts: 2335
Joined: December 8th, 2007, 3:21 am
Location: Washington State
Contact:

Re: [engine] Stop when attacked

Post by beetlenaut » May 1st, 2019, 8:12 am

Load the autosave of the turn with "Cancel orders" checked in the load dialog. That will prevent automatic movement at the beginning of the turn right after it loads.
Campaigns: Dead Water,
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide

Tad_Carlucci
Developer
Posts: 382
Joined: April 24th, 2016, 4:18 pm

Re: [engine] Stop when attacked

Post by Tad_Carlucci » May 1st, 2019, 2:00 pm

I've not looked, but it seems to me that it is actually a good idea to offer a Settings option (default: No) to Automatically Cancel Orders When Attacked. Having to load an autosave seems to support the idea that Wesnoth depends upon reloading.
I forked real life and now I'm getting merge conflicts.

User avatar
WhiteWolf
Forum Regular
Posts: 470
Joined: September 22nd, 2009, 7:48 pm
Location: Hungary

Re: [engine] Stop when attacked

Post by WhiteWolf » May 1st, 2019, 3:41 pm

I'm seconding the idea of having the feature available as a settings option.

In the meantime, this can actually be done already in a half-minute-to-write mod with a simple attack end event that resets the attacked unit's gotos.
So if anyone wants this available now, feel free to download the new Cancel the Preset Unit-Course if Attacked mod from the add-ons server... :D
Author of the Underness Series, consisting of V parts: The Desolation of Karlag, The Blind Sentinel, The Stone of the North, The Invasion Of The Western Cavalry, Fingerbone of Destiny
Standalone works: The Ravagers - now for 1.14, with new bugs!

User avatar
josteph
Developer
Posts: 520
Joined: August 19th, 2017, 6:58 pm

Re: [engine] Stop when attacked

Post by josteph » May 6th, 2019, 5:04 pm

peterbill wrote:
April 26th, 2019, 3:52 am
It would be really great that I could choose an option (although I don't see why I wouldn't want it to be chosen) that would forget the path and make the unit to stop if it's been attacked.
The potential problem with such an option is that it discards user data. In general, when a program is dealing with data the user may have spent time creating, that data should not be deleted except by explicit user request. Maybe in this case it'd be fine...? :hmm:
WhiteWolf wrote:
May 1st, 2019, 3:41 pm
feel free to download the new Cancel the Preset Unit-Course if Attacked mod from the add-ons server... :D
Kudos! :)

User avatar
WhiteWolf
Forum Regular
Posts: 470
Joined: September 22nd, 2009, 7:48 pm
Location: Hungary

Re: [engine] Stop when attacked

Post by WhiteWolf » May 10th, 2019, 8:55 pm

Just letting everyone know - the mod has been renamed to Advanced Order Cancelling, and now also supports issue https://github.com/wesnoth/wesnoth/issu ... -408765480 to have the ability to quickly unset a unit's orders through a right-click menu item or hotkey :)
Author of the Underness Series, consisting of V parts: The Desolation of Karlag, The Blind Sentinel, The Stone of the North, The Invasion Of The Western Cavalry, Fingerbone of Destiny
Standalone works: The Ravagers - now for 1.14, with new bugs!

Post Reply