Announcement: Be excellent to each other.


Caravel Forum : DROD Boards : Bugs : Pathfinding and Move single step
New Topic New Poll Post Reply
Poster Message
Nuntar
Level: Smitemaster
Avatar
Rank Points: 4756
Registered: 02-20-2007
IP: Logged

File: pathfinding bug.hold (1.1 KB)
Downloaded 49 times.
License: Public Domain
icon Pathfinding and Move single step (+1)  
In the attached hold, the mud coordinator's script consists of "Move to (5,7) Single step" followed by a Speech command. He is completely blocked off, so he can't make a move.

The F1 in-game help says: "If no move can be made, the next script command is executed immediately." So you would expect him to make his speech on the first turn. He actually doesn't speak until the second turn, so the help is wrong and should be corrected.

The tar coordinator has the same script, but with Imperative Pathfinding. He doesn't reach the Speech command at all. This is definitely a bug; the whole point of "Single step" is that it doesn't keep a character occupied for more than one turn, making it possible to, for example, write loops that give characters regular behaviour such as trying to move every fifth turn.

____________________________
50th Skywatcher
05-09-2017 at 01:27 AM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
IQubic
Level: Delver
Avatar
Rank Points: 85
Registered: 11-22-2015
IP: Logged
icon Re: Pathfinding and Move single step (0)  
I have fixed this. There was a similar issue of move (relative version) waiting for an extra turn. These commands are now skipped if no move is made. If a move is made, then, just like always, that is the character's entire turn.

I'll make a PR as soon as I get git to work.

____________________________
Trans Woman (She/Her Pronouns)
119th Skywatcher

[Last edited by IQubic at 05-16-2017 07:53 AM]
05-16-2017 at 06:19 AM
View Profile Send Private Message to User Show all user's posts High Scores Quote Reply
skell
Level: Legendary Smitemaster
Avatar
Rank Points: 3764
Registered: 12-28-2004
IP: Logged
icon Re: Pathfinding and Move single step (0)  
IQubic wrote:
I have fixed this. There was a similar issue of move (relative version) waiting for an extra turn. These commands are now skipped if no move is made. If a move is made, then, just like always, that is the character's entire turn.

Unfortunately at this point we can't change that. This behavior has been in the game for the good part of the decade... Actually for 14 years now I guess? And it's more than likely it'll break thousands of demos and even make rooms impossible.

What we have to do in this task is:

1. Make Move+Single Step work fine with Imperative: Pathfinding, that is if no move is made the command is skipped.
2. Update the docs. I'll actually do it myself so, please do the thing from point #1.

____________________________
My website
05-21-2017 at 06:19 PM
View Profile Send Private Message to User Send Email to User Visit Homepage Show all user's posts High Scores This architect's holds Quote Reply
IQubic
Level: Delver
Avatar
Rank Points: 85
Registered: 11-22-2015
IP: Logged
icon Re: Pathfinding and Move single step (0)  
Skell, what would you like me to do? Can you explain more clearly?

____________________________
Trans Woman (She/Her Pronouns)
119th Skywatcher
05-22-2017 at 12:37 AM
View Profile Send Private Message to User Show all user's posts High Scores Quote Reply
skell
Level: Legendary Smitemaster
Avatar
Rank Points: 3764
Registered: 12-28-2004
IP: Logged
icon Re: Pathfinding and Move single step (0)  
IQubic wrote:
Skell, what would you like me to do? Can you explain more clearly?

Yes:

The tar coordinator has the same script, but with Imperative Pathfinding. He doesn't reach the Speech command at all. This is definitely a bug; the whole point of "Single step" is that it doesn't keep a character occupied for more than one turn, making it possible to, for example, write loops that give characters regular behaviour such as trying to move every fifth turn.
Make Move+Single Step work fine with Imperative: Pathfinding, that is if no move is made the command is skipped.

Basically, if a character has Imperative Pathfinding set, Move with Single Step should not wait until a move is available.

____________________________
My website
05-22-2017 at 07:32 AM
View Profile Send Private Message to User Send Email to User Visit Homepage Show all user's posts High Scores This architect's holds Quote Reply
skell
Level: Legendary Smitemaster
Avatar
Rank Points: 3764
Registered: 12-28-2004
IP: Logged
icon Re: Pathfinding and Move single step (0)  
And additionally I'd like you to write a test case to cover that, hit me on the chat if you need help with that.

____________________________
My website
05-22-2017 at 08:05 AM
View Profile Send Private Message to User Send Email to User Visit Homepage Show all user's posts High Scores This architect's holds Quote Reply
skell
Level: Legendary Smitemaster
Avatar
Rank Points: 3764
Registered: 12-28-2004
IP: Logged
icon Re: Pathfinding and Move single step (+2)  
Alright, this has been fixed:

* Pathmapping movement types should work correctly with Single Step in Move/MoveTo.
* Updated help to correctly indicate that single step that fails still consumes a turn.

____________________________
My website
10-15-2020 at 07:58 AM
View Profile Send Private Message to User Send Email to User Visit Homepage Show all user's posts High Scores This architect's holds Quote Reply
kieranmillar
Level: Smitemaster
Rank Points: 2847
Registered: 07-11-2014
IP: Logged
icon Re: Pathfinding and Move single step (+1)  
In 5.1.1.alpha.2020-10-16, in Nuntar's attached demonstration hold both characters speak on turn 2. This means the failing Move To Single Step is a blocking command. It is not clear to me reading the thread if this is intended or not, or if both characters should speak on turn 1.

I am unable to test if the help docs have been updated.
10-18-2020 at 11:16 AM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
skell
Level: Legendary Smitemaster
Avatar
Rank Points: 3764
Registered: 12-28-2004
IP: Logged
icon Re: Pathfinding and Move single step (+1)  
kieranmillar wrote:
In 5.1.1.alpha.2020-10-16, in Nuntar's attached demonstration hold both characters speak on turn 2. This means the failing Move To Single Step is a blocking command. It is not clear to me reading the thread if this is intended or not, or if both characters should speak on turn 1.

That's correct. Single Step should always be a blocking command if movement is impossible, the docs were incorrect in that regard. The bug was that when using pahtfinding movement Single Step would cause the command to never continue, as every turn it'd try to move again.

As for the docs, I'll change status to Fixed, Unreleased and change release version to 5.1.1 Release Candidate

____________________________
My website

[Last edited by skell at 10-18-2020 11:39 AM]
10-18-2020 at 11:38 AM
View Profile Send Private Message to User Send Email to User Visit Homepage Show all user's posts High Scores This architect's holds Quote Reply
New Topic New Poll Post Reply
Caravel Forum : DROD Boards : Bugs : Pathfinding and Move single step
Surf To:


Forum Rules:
Can I post a new topic? No
Can I reply? No
Can I read? Yes
HTML Enabled? No
UBBC Enabled? Yes
Words Filter Enable? No

Contact Us | CaravelGames.com

Powered by: tForum tForumHacks Edition b0.98.8
Originally created by Toan Huynh (Copyright © 2000)
Enhanced by the tForumHacks team and the Caravel team.