Announcement: Be excellent to each other.


Caravel Forum : DROD RPG Boards : RPG Bugs : Undoing seems to cause problems with scripts
New Topic New Poll Post Reply
Poster Message
Dragon Fogel
Level: Smitemaster
Rank Points: 882
Registered: 06-21-2014
IP: Logged
icon Undoing seems to cause problems with scripts (0)  
I'm not sure of the exact cause, but when I was testing Hold Anonymous with the disarm token script, I heard error beeps if I tried to undo or use the R key after the script activated.

The script in question resets a disarm token in the room if it's active on Turn 0. However, when I hit R, the script didn't activate again. Also, when I killed a Soulless with my sword, and started undoing a few turns later, the Soulless came back to life on a turn after the one where I'd killed it.

What's more, the disarm script stopped working entirely after this. Then again, this bug might have meant that I wasn't triggering it properly any more.

I can't find an error log in my Steam files, unfortunately. It would probably be useful, since I heard a number of error beeps.
12-04-2016 at 06:36 AM
View Profile Send Private Message to User Show all user's posts High Scores Quote Reply
Dragon Fogel
Level: Smitemaster
Rank Points: 882
Registered: 06-21-2014
IP: Logged
icon Re: Undoing seems to cause problems with scripts (0)  
Tested my hold with the disarm token script (downloadable here) and the bug happens there, too. This might be useful for finding the problem.
12-04-2016 at 06:39 AM
View Profile Send Private Message to User Show all user's posts High Scores Quote Reply
kieranmillar
Level: Smitemaster
Rank Points: 1306
Registered: 07-11-2014
IP: Logged
icon Re: Undoing seems to cause problems with scripts (0)  
Mike, this appears to be a problem with using "Activate Item At" onto a token on turn 0. This applies to all tokens (so vision, tarstuff switcher etc. too) but not to activating other items, like doors.

The tokens will be activated and the script appear to run fine until you try to undo or reset the room, at which points the scripts still execute but the activating of tokens seems to get queued up until the next turn. Script commands after the Activate Item At commands will still run on turn 0 as expected. When this happens, you get the following error message:

Assertion error in line 2190 of .\CurrentGame.cpp: "this->pendingTokenActivations.empty()"


Note that if you undo back to turn 0 and then press R when on turn 0, the activating of the tokens will fail completely on the next turn and none of them will activate.

If you undo back to turn 0 and then leave the room, the following error message gets posted 4 times (and the activations will not happen):

Assertion error in line 8177 of .\DbRooms.cpp: "GetTSquare(wX,wY) == T_OBSTACLE || bIsLight(GetTSquare(wX,wY))
 || GetTSquare(wX,wY) == T_TOKEN || GetTSquare(wX,wY) == T_KEY || bIsEquipment(GetTSquare(wX,wY))"


EDIT: Just to confirm there are no issues if you start the player on a token, it appears to be using the script command that's causing problems.

____________________________
(07:23 PM) Pearls: Kieran is correct.

[Last edited by kieranmillar at 12-04-2016 12:13 PM]
12-04-2016 at 12:11 PM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
New Topic New Poll Post Reply
Caravel Forum : DROD RPG Boards : RPG Bugs : Undoing seems to cause problems with scripts
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.