Saving a game's firsttime

I was reading Pixie's save library documentation here:
https://github.com/ThePix/quest/wiki/Library:-Save-and-Load
I noticed she says you cannot save firsttime with her library because
"The firsttime/otherwise script command saves deep in the underlyng code, inaccessible to Quest, and therefore cannot be saved. It is probably best avoided altogether. You can use the once text processor directive."
I want to create a game's room descriptions, and alias, using a firsttime variable that affects an attribute to each room visited that creates the game world. Is there a way I can save the game offline including both the visited rooms' attributes and the fact that the variable does not need to be created a second time? Is there something about the game saving room visited, by default, that would make it possible to create a variable script that would
Could I add a flag to the firsttime script, then add "if flag is set" to the top of the list of firsttime scripts? Would that work?
I am going to try it, but I won't know for a while. If anyone knows more about this, and can help me figure it out, I appreciate your reply, even if nothing helps. Everything is something to learn from.


Sounds very much like a riddle me.
Conditions:

  1. Saving firstime will not be saved in save file.
  2. Create room description and alias.
  3. Use a first time variable to determine changed contents.
  4. Save game offline.
  5. Dot no reuse variable a second time.
  6. Possible to use a flag script?

My untested pseudocode solution:

On first time enter room,
if
room22.saved = "true"
do nothing
else
room22.saved = "true"

if
room22.saved = "false"
room22.alias = "mega dungeon of the dolphins"
room22. description = "Many riddles in here, answer each riddle and unlock a waterway."


Except that the room would not be saved until the player presses the save button.
I may need to try, or even rework, multiple scripts, before I find it, but right now I'm looking at one possibility. I just haven't tested anything.

'''
firsttime {
if (GetBoolean(player.parent,made))
player
player.parent.X = GetRandomInt (1, 10)
Function
SetObjectFlagOn (player.parent, made)
}
else {
Function
}
'''
I think this ought to work because flags are saved from game to game, unless of course I misread that.


My

room22.saved = "true"

Is a fake attribute that I made up, I am not really saving the game.

But yours have more function than mine.

player.parent.X = GetRandomInt (1, 10)

Because your one code can be copied and pasted over multiple rooms, while mine can only be used for 1 room, nice code!


This topic is now closed. Topics are closed after 14 days of inactivity.

Support

Forums