Maybe you know the answer(s) ? Time/Variable?Persistent data?

Hey hey. I'm not sure if this is something that I need to pay somebody to create or if I'm not familiar enough with the correct terminology in order to find the answers online and figure it out myself... so I'm gunna try to be as clear and descriptive as possible here and maybe one of you with more experience can help me!! Because that would be amazing. 🙂


In my project I have a hotel. I want the player to be able to go to sleep at which point, they will have the option to save their game. Upon waking up, I want the player to retain all the items they have collected, I want the game to know which doors have been unlocked, and I want the NPCs to have new dialogue that will continue the story... i.e. not repeat the things that they said the previous day.

I've looked into Day/Night cycles and whatnot but I'm not sure that this is what I'm looking for exactly. Is it something to do with permanent variables?

Am I supposed to create a new map of the entire hotel and transfer the player to this new map each time that they save...?
I'm open to paid/free plugins or hiring someone and whatnot that might help.
Many thanks if you can help me. 🙂

-Dave
You dont need plugins for any of that*

I want the player to be able to go to sleep at which point, they will have the option to save their game.
create a map for your player's room with an event that has the event command to open the save menu. then make sleeping progress time in whatever way you deem is necessary.

Upon waking up, I want the player to retain all the items they have collected, I want the game to know which doors have been unlocked
that is what saving the game does. unless youve been manually wiping the player's inventory and game switches, all of that is saved into the file.

and I want the NPCs to have new dialogue that will continue the story... i.e. not repeat the things that they said the previous day.
use a variable to represent what day it is, add to that variable when the player sleeps, and then make your events say different things based on the day's value. you could also use different maps entirely for each day, but whatever approach would be better is is up to you and depends on what youre doing there.

*
Am I supposed to create a new map of the entire hotel and transfer the player to this new map each time that they save...?
what do you mean by this? I thought you wanted for saving to be done within the hotel as if the hotel is a place the player chooses to go to and contains a save point. did you mean that you wanted the save option in the menu to transfer the player to the hotel room where they can then save at the bed or something?
I think you are making it harder to wrap your head around than it actually is.


First things first, you want to save the game upon sleeping, there are multiple ways to do that, the easiest one is to add a "Save Game" push into your event.

Then, you want the player to have all their items, know the doors that have been opened and have new dialogues.
Items do not dissapear magically, unless you specify it somewhere, the items are persistent.
Doors that have been opened, stay opened, again unless specified otherwise. (If you want to know which ones specifically, you can add switches to them, but it depends why you need to know)
New dialogues is a bit more complex, but nothing to shady either.
You want to implement a day/night system and track which day it is, this can be done via plugin, or it can be evented fairly easily.
Then, based on what day it is, you can have the npc change their dialogues using conditionnal branching "If day == monday => Hello!", "If day == tuesday => Welcome back!", etc... (again, there are many ways of doing this, but for a beginner, condtionnal branching seems good enough)


Permanent variables are usually variables you want to use in "Cross save files", for example having a new game launched, playing it and then saving, then launching a new game and still have access to the data from the previous game.

Other than that, variable are never really "permanent", they always evolve during gameplay, which is why they are called variables.


So bottomline, I think you are overthinking the process too much.
There is no need for plugins at this point (everything can be evented) and it's a matter of conditionnal branching.


Feel free to go more in depth with your idea, maybe I'm understanding this wrong 🙂
I think you are making it harder to wrap your head around than it actually is.


First things first, you want to save the game upon sleeping, there are multiple ways to do that, the easiest one is to add a "Save Game" push into your event.

Then, you want the player to have all their items, know the doors that have been opened and have new dialogues.
Items do not dissapear magically, unless you specify it somewhere, the items are persistent.
Doors that have been opened, stay opened, again unless specified otherwise. (If you want to know which ones specifically, you can add switches to them, but it depends why you need to know)
New dialogues is a bit more complex, but nothing to shady either.
You want to implement a day/night system and track which day it is, this can be done via plugin, or it can be evented fairly easily.
Then, based on what day it is, you can have the npc change their dialogues using conditionnal branching "If day == monday => Hello!", "If day == tuesday => Welcome back!", etc... (again, there are many ways of doing this, but for a beginner, condtionnal branching seems good enough)


Permanent variables are usually variables you want to use in "Cross save files", for example having a new game launched, playing it and then saving, then launching a new game and still have access to the data from the previous game.

Other than that, variable are never really "permanent", they always evolve during gameplay, which is why they are called variables.


So bottomline, I think you are overthinking the process too much.
There is no need for plugins at this point (everything can be evented) and it's a matter of conditionnal branching.


Feel free to go more in depth with your idea, maybe I'm understanding this wrong 🙂
Thank you that was very helpful... I think I AM definitely overthinking.
@Artille @Robro33

What if they are not basic NPCs but main characters? Say there are 24 chapters to my story and each
chapter is a day in the life of the game. Would I need to create 24 different variables/conditional branches... in order to have the game display the corresponding text for that chapter?
What if they are not basic NPCs but main characters?
an event is an event. if theres supposed to be a functional distinction between a "regular" npc and a "main character" then you need to outline it

Would I need to create 24 different variables/conditional branches... in order to have the game display the corresponding text for that chapter?
you wouldnt need 24 different variables, but you would have to do something to make them different day to day.

As ive already said, you can use just one variable for the current chapter with a value of 1-24 and then base your events off of its value. but to make Harold say something different on day 6 as opposed to day 11, you would necessarily have to do something like give him different event pages for those days, use conditional branches for the corresponding day, or send the player to a different map based on the day with an event with Harold's sprite.
@Artille @Robro33

What if they are not basic NPCs but main characters? Say there are 24 chapters to my story and each
chapter is a day in the life of the game. Would I need to create 24 different variables/conditional branches... in order to have the game display the corresponding text for that chapter?
As Robro mentionned, you would want to regroup stuff you know are going to evolve.

In your case, you know there are going to be 24 chapters, hence you can have a variable called "Chapter" or "Current Chapter".
When you go to sleep, you add 1 to the chapter variable.

Then, based on the chapter value, you can adapt your event.
There are multiple ways to structure you events based on current chapter. All of which Robro said is a good point to start. ^^


The point of a variable is to change value, and make events react differently based on their values.
So, if you know a specific value is going to evolve, like the amount of doors opened, the number of times you went to a shop, or anything you want to count or keep track of, you use a variable. 🙂

In your event, you can then use conditionnal branching to check the current value of said variable, and build the event based on that value.
Thank you @Robro33 and @Artille
🙂

I've created a self switch and here are some photos.. I just want to make sure this looks correct.
It SEEMS to be working so far... I sleep, it advances the "day".
I just want to make sure that I'm not missing something and that there isn't a cleaner or easier way or a plugin or something that is more efficient.

Switch1.jpg
Switch2.jpg
Switch3.jpg
I've created a self switch and here are some photos.. I just want to make sure this looks correct.
It SEEMS to be working so far... I sleep, it advances the "day".
I just want to make sure that I'm not missing something and that there isn't a cleaner or easier way or a plugin or something that is more efficient.

There is always a more efficient way, javascript is usually much more efficient than eventing (but more difficult)

Judging by your screen, it's a good start, but there is no need for multiple parallel events for the chapter part (unless they are on different maps, which probably isn't the case)
You can structure it the same way by putting both conditions in the same event as you cannot fill in multiple conditions (you can't have chapter = 2 AND chapter = 3, so it's going to be either one or the other)
Instead of using selfswitches, you can use "erase event" (but this depends on how you build it, erase event is non-persistent, while selfswitches are)

You could achieve same result with code, but I'm not sure you want to start with this at this point.

These are not required though, they won't affect the gameplay, so use whatever makes you most comfortable.

Original thread: https://forums.rpgmakerweb.com/threads/maybe-you-know-the-answer-s-time-variable-persistent-data.175876/