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: 2977
Registered: 02-20-2007
IP: Logged

File: pathfinding bug.hold (1.1 KB)
Downloaded 2 times.
License: Public Domain
icon Pathfinding and Move single step (0)  
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
Rank Points: 65
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.

____________________________
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: 2314
Registered: 12-28-2004
IP: Logged
icon Re: Pathfinding and Move single step (0)  
quote:
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.

____________________________
I am a skelliopath.
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
Rank Points: 65
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?

____________________________
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: 2314
Registered: 12-28-2004
IP: Logged
icon Re: Pathfinding and Move single step (0)  
quote:
IQubic wrote:
Skell, what would you like me to do? Can you explain more clearly?


Yes:

quote:
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.

quote:
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.

____________________________
I am a skelliopath.
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: 2314
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.

____________________________
I am a skelliopath.
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
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.