ADRIFT Forum


The place to discuss the ADRIFT Interactive Fiction toolkit

Skip Turns not working

This forum is the place to learn about and discuss ADRIFT 5. Feel free to mention any bugs you find here, but please also add these to the Bugs & Enhancements list.

Please also refer to the ADRIFT 5 Wiki for more information.

Skip Turns not working

Postby RenatoDias » Sat Feb 01, 2020 10:47 pm

I made a turn skip task to skip 24 turns using the time tab on the actions menu. But, when I play the game and use the command, the skip doesn't work, the turn counter doesn't increase by the amount I chose.
RenatoDias
 
Posts: 122
Joined: Sat Dec 03, 2011 10:56 pm
Points: 13

Re: Skip Turns not working

Postby Lazzah » Sat Feb 01, 2020 10:57 pm

RenatoDias wrote:I made a turn skip task to skip 24 turns using the time tab on the actions menu. But, when I play the game and use the command, the skip doesn't work, the turn counter doesn't increase by the amount I chose.

What command are you using? It would be helpful to get all relevant information about your problem if we are to help you. :)
The Axe of Kolt, The Spectre of Castle Coris, The Fortress of Fear, Die Feuerfaust, The Lost Children, Run, Bronwynn, Run, The Call of the Shaman, The Lost Labyrinth of Lazaitch, Magnetic Moon, Starship Quest, Revenge of the Space Pirates
User avatar
Lazzah
Moderator
 
Posts: 2329
Joined: Thu Mar 31, 2011 4:54 am
Location: Dagenham, Essex
Points: 65

Re: Skip Turns not working

Postby RenatoDias » Sat Feb 01, 2020 11:05 pm

I'm using sleep on bed as a general task, it should skip 24 turns. And I set wait to skip 3 turns, but it skips 1 also.
About the task, the debugger doesn't give any indication about that.
RenatoDias
 
Posts: 122
Joined: Sat Dec 03, 2011 10:56 pm
Points: 13

Re: Skip Turns not working

Postby Denk » Sun Feb 02, 2020 1:11 am

RenatoDias wrote:I'm using sleep on bed as a general task, it should skip 24 turns. And I set wait to skip 3 turns, but it skips 1 also.
About the task, the debugger doesn't give any indication about that.
I just tested it and to begin with I thought the same as you: That the action "Skip __24__ turns" wasn't working and the Wait command only waited one turn even though it was set to wait 3 turns.

Then I made a turn-based event to check if turns were passing even though the variable %turns% wasn't updated correctly.

Conclusion: 24 turns ARE skipped when you apply the action "Skip __24__ turns", and the command "WAIT" DO skips 3 turns when the wait command is set to pass 3 turns. BUT unfortunately, the variable %turns% is not updated, so it appears as if only one turn has passed.

Unfortunately, we cannot access the %turns% variable to adjust it. Thus if you want a reliable turn counter you have to create a new variable, e.g. %newturns% and use that one instead.

But if you are also using the built-in system variable %score%, whenever the game ends, ADRIFT will tell you how many %turns% have passed, which is an incorrect number. The only way I know to "get rid" of that message is to open up the pane "Introduction & End of Game". In here, you must go to the "End of Game"-pane and set the font colour equal to the background colour. Then this message will be invisible.

The background colour is usually black. In that case use: <font color = black>
----------------------------------------------------------------------
The Bash Saga:
1. The Dragon Diamond 2. The Way Home 3. Stone of Wisdom
----------------------------------------------------------------------
Denk
 
Posts: 399
Joined: Mon Feb 22, 2016 6:21 pm
Location: Hjørring, Denmark
Points: 111

Re: Skip Turns not working

Postby RenatoDias » Sun Feb 02, 2020 1:57 am

So, a good workaround on that issue is to update the library tasks with a new turns variable?
RenatoDias
 
Posts: 122
Joined: Sat Dec 03, 2011 10:56 pm
Points: 13

Re: Skip Turns not working

Postby Denk » Sun Feb 02, 2020 9:01 am

The variable %turns% is nowhere used in the standard library, so you do not need to modify the standard library.

Basically, all you have to do is to create an event, which takes 1 turn, and which increments your variable %newturns% with 1 every turn. When you then apply actions like "skip _24_ turns", the new turns-counter will increment with 24. The same with WAIT if it is set to pass more than one turn.

I attach a small demo which shows how to do it.

It furthermore demonstrates the differences between a custom turns-counter and the built-in %turns%-variable.
Attachments
Custom turns counter.taf
(15.99 KiB) Downloaded 33 times
----------------------------------------------------------------------
The Bash Saga:
1. The Dragon Diamond 2. The Way Home 3. Stone of Wisdom
----------------------------------------------------------------------
Denk
 
Posts: 399
Joined: Mon Feb 22, 2016 6:21 pm
Location: Hjørring, Denmark
Points: 111


Return to ADRIFT 5.0

Who is online

Users browsing this forum: No registered users and 3 guests