gentlemen, we have time travel.

We are now able to ZIP (forward) and ZAP (backward) through the simulator world’s timeline. I’ll probably have to do something to ensure TADS keeps undo information back to the beginning of the game. But this works for small turn numbers.

The turn number is now part of the prompt, for better tracking.

The good parts of the transcript:

Now, with a bit of scanning back and forth, we can easily confirm that the user input identical commands at any given turn, and the simulator did different things all on its lonesome. Here, you’ll notice turn 12 panned out differently in each case.

The next step is to use our pseudo-random code to prevent that!

Conrad.

PS - The undo / zap and prompt code, for anyone interested. The Zap code is just the zip code with ‘undo’ as the core command. Yes, I know I should set this up really for GENERIC_VERB #, but it’s just not a priority right now.

I’m tucking the code away inside rant tags. It’s here for anyone who wants a copy to mess around with.

[rant]////////////////////////////////////////////////////////////////////////////////

modify libMessages
mainCommandPrompt(which)
{
“\b<<libGlobal.totalTurns>>>”;

}

;

////////////////////////////////////////////////////////////////////////////////

class WaitThing: object
testName = ‘Z-ing script’
testList = [ ‘z’ ]

run {
local temp = new TemporaryFile();
local out = File.openTextFile(temp, FileAccessWrite);
testList.forEach({x: out.writeFile(‘>’ + x + ‘\n’)});
out.closeFile();
setScriptFile(temp);
}
;

Z_ing : WaitThing

i = 0
n = 0

waitMany {
//local i = 0;
    for (i = 1 ; i <= n ; i++)  // begin with 2 because triggering the script is a turn!
    {
        run;
    }
    n = 0;
    return (i);
}    

;

DefineLiteralAction(Zip)
whatObj(which) {
return ‘how many turns’;
}
actionTime = 0
execAction()
{
Z_ing.n = toInteger(getLiteral());
mainReport(‘You are zipping ahead ’ + Z_ing.n
+ ’ turns
.’
//+ ‘\nTime passes…’
);
Z_ing.waitMany;
}
;

VerbRule(Zip)
‘zip’ singleLiteral
: ZipAction
verbPhrase = ‘zip/zipping (what)’
;

//////////////////////////////////////////////////////////////////////////////////

class UndoThing: object
testName = ‘Undoing script’
testList = [ ‘undo’ ]

run {
local temp = new TemporaryFile();
local out = File.openTextFile(temp, FileAccessWrite);
testList.forEach({x: out.writeFile(‘>’ + x + ‘\n’)});
out.closeFile();
setScriptFile(temp);
}
;

Un_ing : UndoThing

i = 0
n = 0

undoMany {
//local i = 0;
    for (i = 1 ; i <= n ; i++)  // begin with 2 because triggering the script is a turn!
    {
        run;
    }
    n = 0;
    return (i);
}    

;

DefineLiteralAction(Zap)
whatObj(which) {
return ‘how many turns’;
}
actionTime = 0
execAction()
{
Un_ing.n = toInteger(getLiteral());
mainReport(‘You are zapping back ’ + Un_ing.n
+ ’ turns
.’
//+ ‘\nTime passes…’
);
Un_ing.undoMany;
}
;

VerbRule(Zap)
‘zap’ singleLiteral
: ZapAction
verbPhrase = ‘zap/zapping (what)’
;

//////////////////////////////////////////////////////////////////////////////////[/rant]