Is it possible to randomize something upon restoring, instead of when play begins?
This code (obviously) works:
when play begins:
if a random chance of 1 in 5 succeeds:
now werewolf by night is in glass case;
if a random chance of 1 in 2 succeeds:
now Marvin watch is in glass case;
This code compiles but does not work:
carry out restoring the game:
if a random chance of 1 in 5 succeeds:
now werewolf by night is in glass case;
if a random chance of 1 in 2 succeeds:
now Marvin watch is in glass case;
Anyway, it’s a Pawn Shop. Every time the story restores I’d like to randomize what’s in the pawn shop for sale.
Is it because it is a carry out statement? Usually that is used for defining a new action (e.g. carry out taping). Maybe in this case the restore command is overriding your carry out code? What if you used an after statement instead (i.e. after restoring the game)?
Yeah, out-of-world actions don’t run through the Before, Instead, and After rulebooks. And restoring the game in particular usually doesn’t run through the Report rulebook either. Why? Well, if the Carry Out rulebook does its job, the game’s running some totally different code now—it restored back to an earlier point!
So any code to run after restoring has to actually be put in the saving the game action, since that’s the action the game is finishing after a restore. The easiest way to do this is kind of a hack, but you can put this code in an “after issuing the response text” rule for the response saying the game was restored successfully.
from a game design perspective, I’m perplexed about re-randomising a shop’s content at restoring, it’s the perfect application of “save scumming”, in this case, reloading until the desired item appears in that shop…
They are all distractor items – that is, they’re not crucial to the story. So there’s no need to save scam, the items are useless. I just saw it a way of capturing reality.