I cant move my skirmisher as I want

General feedback and discussion of the game.

Moderator: Forum Moderators

Post Reply
User avatar
tekelili
Posts: 1039
Joined: August 19th, 2009, 9:28 pm

I cant move my skirmisher as I want

Post by tekelili »

Hi, in a recent morituri game I had the next problem:

I had a fencer with 2 mp left, and I want to hit a wolf at just that distance, having two possible hexes as path to reach my target. One of those hexes is ocupied by one of my horses, and in the other one I know I will ambushed by a wose, so cant use it as path to reach wolf. My problem was I couldnt say my fencer: "hey dumb, go over horse to reach wolf", because ai only offered me the ambush hex as path. Is there any way I could have hited that damn wolf?

Using lotsofphil reply diagram, my fencer is in 11, hidden wose on 8, my horse on 10 and wolf in 5. 10, 7 and 6 are all flat terrain.
Last edited by tekelili on August 29th, 2009, 2:43 pm, edited 1 time in total.
Be aware English is not my first language and I could have explained bad myself using wrong or just invented words.
World Conquest II
Velensk
Multiplayer Contributor
Posts: 4002
Joined: January 24th, 2007, 12:56 am

Re: I cant move my skirmisher as I want

Post by Velensk »

In cases like that you simply have to guide your unit along the path you want it to take. Tell it to move one hex at a time if you have to (remember a units move isn't done till it runs out of movement points).
"There are two kinds of old men in the world. The kind who didn't go to war and who say that they should have lived fast died young and left a handsome corpse and the old men who did go to war and who say that there is no such thing as a handsome corpse."
User avatar
thespaceinvader
Retired Art Director
Posts: 8414
Joined: August 25th, 2007, 10:12 am
Location: Oxford, UK
Contact:

Re: I cant move my skirmisher as I want

Post by thespaceinvader »

Are you sure that the hex with the horse in it, or the one you're trying to move into using that direction, have only 1 MP movement cost? If either one has more, the fencer can't move there.
http://thespaceinvader.co.uk | http://thespaceinvader.deviantart.com
Back to work. Current projects: Catching up on commits. Picking Meridia back up. Sprite animations, many and varied.
lotsofphil
Posts: 128
Joined: March 27th, 2009, 4:45 pm

Re: I cant move my skirmisher as I want

Post by lotsofphil »

I can't picture what you are describing. How is the wose blocking you from the wolf but invisible (meaning not next to the horse)?

Can you say "wolf in 1, horse in 3, etc" based on this pic? Or, a better way, which must exist.
Attachments
hex.jpg
Exasperation
Posts: 462
Joined: June 8th, 2006, 3:25 am

Re: I cant move my skirmisher as I want

Post by Exasperation »

I don't know what particular configuration they saw, but Fencer in 1, Wose in 8, Horse in 2, Wolf in 7 would do it. I actually remember seeing a thread on this issue recently, where someone suggested that it would be a good idea for the pathing AI to slightly prefer moving through friendly units rather than open space - after all, you can always force the unit to move through the open space instead, and it isn't always possible to force a unit to move through a friendly-occupied space even though it's a legal move.
Soliton
Site Administrator
Posts: 1687
Joined: April 5th, 2005, 3:25 pm
Location: #wesnoth-mp

Re: I cant move my skirmisher as I want

Post by Soliton »

tekelili wrote:Is there any way I could have hited that damn wolf?
No.
"If gameplay requires it, they can be made to live on Venus." -- scott
lotsofphil
Posts: 128
Joined: March 27th, 2009, 4:45 pm

Re: I cant move my skirmisher as I want

Post by lotsofphil »

Exasperation wrote:I don't know what particular configuration they saw, but Fencer in 1, Wose in 8, Horse in 2, Wolf in 7 would do it. I actually remember seeing a thread on this issue recently, where someone suggested that it would be a good idea for the pathing AI to slightly prefer moving through friendly units rather than open space - after all, you can always force the unit to move through the open space instead, and it isn't always possible to force a unit to move through a friendly-occupied space even though it's a legal move.
Okay, I didn't know this critical part of ambush:
"Any enemy unit that first discovers this unit immediately loses all its remaining movement."
Max
Posts: 1449
Joined: April 13th, 2008, 12:41 am

Re: I cant move my skirmisher as I want

Post by Max »

Exasperation wrote:I don't know what particular configuration they saw, but Fencer in 1, Wose in 8, Horse in 2, Wolf in 7 would do it.
no - you can't attack the wolf without being ambushed. move the wose to the hex right above 8, you've got to possible paths: 1,2,4 and 1,3,4. one where you get ambushed, the other leading through your own unit (perfectly valid move).
Alink
Inactive Developer
Posts: 181
Joined: March 5th, 2007, 6:45 am
Location: Belgium

Re: I cant move my skirmisher as I want

Post by Alink »

The other thread about this pathfinding problem and ambush:
http://www.wesnoth.org/forum/viewtopic.php?t=26582
Where I explain why it's currently like that. And indeed, in that case, annoying. Need to be changed.
jmegner
Posts: 49
Joined: May 24th, 2009, 1:15 pm

Re: I cant move my skirmisher as I want

Post by jmegner »

Alink wrote:The other thread about this pathfinding problem and ambush:
http://www.wesnoth.org/forum/viewtopic.php?t=26582
Where I explain why it's currently like that. And indeed, in that case, annoying. Need to be changed.
Thanks for the very informative post on path-making rational. I really like that the devs post in the forum to say these sorts of things.

Are there plans for manual path-making in future versions? Perhaps if you click on a unit and continue to hold down, you can drag the mouse to manually forge a path?
Alink
Inactive Developer
Posts: 181
Joined: March 5th, 2007, 6:45 am
Location: Belgium

Re: I cant move my skirmisher as I want

Post by Alink »

Just committed a first basic prototype allowing to specify waypoints (with a hotkey for the moment). It works but need a lot of UI polishing to make it nice. I must admit that I am surprised by all the little UI details which was not obvious at first, even if it is often like that for this kind of stuff. Anyway, the plan is to start by one hotkey, maybe later also support "keeping the key pressed to draw a path" or use a toggle key, and then depending how things will work, try with more complex mouse inputs.

Some examples of possible future features which will modify what is handy or not:
- being able to erase a bad waypoint, but maybe still allow backwards moves
- solve the now sometimes confusing reachability black-stripes (showing what is reachable IF you use the shortest path, which is now not always the case when using waypoints)
- correctly draw these waypoints, possible crossing footsteps or conflicting turn-to-reach info when looping, etc...
- perhaps add a way to specify waypoint where we want to temporary end a turn (for village capture or defense)
- we save "goto" in unit WML, need to do the same for waypoints (needed for multi-turn moves anyway)

All of this need some UI thinking but it's mainly an implementation design problem. I want to keep the code simple because it's an advanced feature not strictly needed and I don't want to introduce too much complexity preventing other future pathfinding features.

@jmegner: you know that you can already move unit with drag&drop right? Maybe we will replace this normal move action by a path drawing, but not very nice for users liking drag&drop for normal moves, so a key or an option will probably still be needed.
Yoyobuae
Posts: 408
Joined: July 24th, 2009, 8:38 pm

Re: I cant move my skirmisher as I want

Post by Yoyobuae »

IIRC in the Advanced Wars games, you always are in a "drawing path" mode. As you move the cursor around (with the control pad in that case) the path follows the same squares as the cursor.

But if you go beyond the max MP of the unit, then the engine uses its path finding to get the unit to where the cursor is, clearing the path you had drawn before (if the path is possible at all).

This way there probably won't be a need for separate UI keys or anything to be used. Even if you draw a "inefficient" path, you can always go to any hex marked as reachable, with the path finding algorithm correcting your path if necessary.

The one issue might be that for short movements the player may unwillingly draw a valid path (the path finder is not triggered), but perhaps accidentally triggering an ambush (which may not have happened with the shortest path).

So probably this "drawing with auto-pathfinding" mode would be better if only used while either doing drag&drop, or the normal select-move-click.
jmegner
Posts: 49
Joined: May 24th, 2009, 1:15 pm

Re: I cant move my skirmisher as I want

Post by jmegner »

Alink wrote:@jmegner: you know that you can already move unit with drag&drop right? Maybe we will replace this normal move action by a path drawing, but not very nice for users liking drag&drop for normal moves, so a key or an option will probably still be needed.
I am aware. I was mostly just giving an example of the sort of thing that would make me happy. Your work sounds great and I am looking forward to experiencing your changes. Thanks so much for working on it.
Alink
Inactive Developer
Posts: 181
Joined: March 5th, 2007, 6:45 am
Location: Belgium

Re: I cant move my skirmisher as I want

Post by Alink »

Yoyobuae wrote: But if you go beyond the max MP of the unit, then the engine uses its path finding to get the unit to where the cursor is, clearing the path you had drawn before (if the path is possible at all).
Interesting and intuitive idea. Unfortunately, I really wish to make this work for multi-turn too, I think it may solve other interface problems there (precise goto path, fog patrol, planning a sequence of village grabbing...). That means allow to use long weird path regardless to the MP or turns needed. So, for the moment, I prefer keeping an interface being able to do whatever you want. After all, this feature exist mainly because the normal path system didn't do that ;). Later, if one frequent operation is painful to do, then we can still adapt it, and we will have a better idea which action we want to keep.

Btw, I managed to slip few temporary features for the 1.7.4 prototype (few hours before the release :P ): you can now remove last waypoints with the same hotkey, waypoint are visible and show a smaller def% and there is a placeholder icon (the waypoint from map stories, stupid but I had not time). All of this come mainly from the recycling of current code and is not planned to stay like this, I just wanted to better see things for experiment and debug. Also, be aware that multi-turn waypoints are not yet saved between turns.
Post Reply