Hi, I'm trying to set up an inn in my game that hooks into my day/night & time system. I want it so whenever a player pays for an inn's room, they get that room for exactly 24 hours in-game, and it also need's to work with things that skip time, since sleeping itself skips to morning or night, which can be a dynamic amount of hours skipped. I've tried everything I could think of and nothings worked because ultimately I can't find a way to connect it with my time system. I'm very new so I'm hoping I'm just missing some functionality knowledge, I'd appreciate any and all help.
Timed Inn Rental
RPG Maker MZ Supportto get 24 hours max in an INN would be easy, as that require
another variable in hours/min probably and add +1 to that variable.
the other thing that would get trouble is the left over.
like, you sleep and stay in the INN for 19 hours, want to sleep 8 hours.
this goes more than 24 hours, so you need something that it stops
at 23 hours and 40min to be leave, otherwise, you get kicked out.
that is the problem I dont get yet, as you want that to be included?
but why only 24 hours? and not more? but require extra charge?
another variable in hours/min probably and add +1 to that variable.
the other thing that would get trouble is the left over.
like, you sleep and stay in the INN for 19 hours, want to sleep 8 hours.
this goes more than 24 hours, so you need something that it stops
at 23 hours and 40min to be leave, otherwise, you get kicked out.
that is the problem I dont get yet, as you want that to be included?
but why only 24 hours? and not more? but require extra charge?
This might just be a case of overthinking it.
If the player rents a room, he wants to use it there and then, usually.
Forget the 24 hour clock, and just have the player rest when he rents the room.
If the player rents a room, he wants to use it there and then, usually.
Forget the 24 hour clock, and just have the player rest when he rents the room.
the easiest way in my opinion would be adding a "total day" variable to the time system for counting all days since game start (usable for a lot of things), and a "rented until" variable to the room.
when the player rents the room, the "rented until" variable is set to the current day +1, and the door to the room simply checks if the rented until variable is higher or equal to the total day variable.
if yes, allow access if not have the door blocked.
you might use a similar but more complex mechanism with one more variable if you want the access to terminate during the day instead of at midnight.
when the player rents the room, the "rented until" variable is set to the current day +1, and the door to the room simply checks if the rented until variable is higher or equal to the total day variable.
if yes, allow access if not have the door blocked.
you might use a similar but more complex mechanism with one more variable if you want the access to terminate during the day instead of at midnight.
I think I'm understanding what you mean, and I believe I already tried it. The issue derived from this is the fact that a player could rent a room at let's say, the 23rd hour, and then the new day comes along. If I read it right, this way would make it so they'd lose the room after that 24th hour as thats when the total day would get a +1
My plan is to have this rented room play a big part in some features as it'll act like a sort of "player home" (with more convenient options available when it comes to renting it) 24 hours is just a good starting point, but unfortunately it needs to be a more advanced system rather than simple
I tried this, and the hurdle I had was the dynamic times the player can sleep to skip time. There's 2 options at the moment, one to "sleep until morning" and another to "sleep until night" these are available within certain hours, so you can sleep until morning any time during night time, which goes from the 19th hour to 7th, etc. The problem with this is I was unable to find a way to keep the inn rental staying as 24 hours Maximum, while also accounting for that dynamic time skip.
this is probably the one thing I would keep it simple for, if they sleep towards the end of the rental time nothing happens, they just wake up and have lost access to the facilities inside the room.
there will be more options for a player to rent more than 24 hours, this is just a good and easy starting point for me to figure out how to make this work.
only if you made it a simple, unconditional +1
but that is why I added the last part - you can easily prevent that with a bit more complex eventing, namely checking the hour when they book.
and from there on there are several ways to proceed, for example using one variable for the day and one for the hour and checking the combined condition for both.
Guess it isn't what I tried then, I'm having a little trouble understanding what you mean. Is it possible to get an example?
Original thread: https://forums.rpgmakerweb.com/threads/timed-inn-rental.147119/