Events based on irl year

Hey, i was wondering how to make something like a conditional branch with (if irl year is 1983) do something.
i wanted to have events based on irl date.
if you want to irl based, it would be 2022, depending when the game is
downloaded, otherwise 2023++. so irl could be difficult.

however, there is a scriptcall you can use, but if it's only on the year,
you can save that on gameboot so it doesn't run constantly in parallel.

you can use it on autorun and set a variable to it to set the year on
everytime the game is started.

howeverever you use it is up to you.
if setting a variable to it, you use that variable to check for the year 🙂

JavaScript:
let date = new Date;
let year = date.getFullYear()
if you want to irl based, it would be 2022, depending when the game is
downloaded, otherwise 2023++. so irl could be difficult.

however, there is a scriptcall you can use, but if it's only on the year,
you can save that on gameboot so it doesn't run constantly in parallel.

you can use it on autorun and set a variable to it to set the year on
everytime the game is started.

howeverever you use it is up to you.
if setting a variable to it, you use that variable to check for the year 🙂

JavaScript:
let date = new Date;
let year = date.getFullYear()
thanks, i will try that. i don't think i will understand how the raw code works though
if you add on the bottom:

$gameVariable.setValue(x, year)

you can use \v[2] (if x = 2) to read year.

so in a event, you could use a conditional branch,
if: variable 2 = 2022 (the year value of it)
than do this
else
it is not the year 2022 anymore
end

while this is a basic setup, I dont know what exacly you want to achieve,
but in order to help you further, we need more details by than.
if you add on the bottom:

$gameVariable.setValue(x, year)

you can use \v[2] (if x = 2) to read year.

so in a event, you could use a conditional branch,
if: variable 2 = 2022 (the year value of it)
than do this
else
it is not the year 2022 anymore
end

while this is a basic setup, I dont know what exacly you want to achieve,
but in order to help you further, we need more details by than.
ok so what i'm trying to achieve is: i am making dsaf styled rpg (you can look up dayshift at freddy's gameplay, it's not a a regular rpg) and when you enter a room, you are in a normal room. but if you enter the room when year is 1983 you are in a different room with a boss.
That's not events based on IRL date though, is it? Because IRL it's 2022, not 1983. It can never be 1983 IRL from your game's perspective because that year is in the past. 😛

I think you want something other than this but haven't managed to convey it properly?
ok so what i'm trying to achieve is: i am making dsaf styled rpg (you can look up dayshift at freddy's gameplay, it's not a a regular rpg) and when you enter a room, you are in a normal room. but if you enter the room when year is 1983 you are in a different room with a boss.
For that you can use, variable, switches ect...
Just make a cond. branch if variable = .... ect...
I mean, you must somehow set the date in the game to 1983, so everytime its 1983 in your game you can set in the same event a switch wich switches it 1983 ON, then the branch, if year is 1983 ON then go to bossroom, else....
That's not events based on IRL date though, is it? Because IRL it's 2022, not 1983. It can never be 1983 IRL from your game's perspective because that year is in the past. 😛

I think you want something other than this but haven't managed to convey it properly?
i want the game to get the irl date from pc settings, so you can fool it by changing the pc date and time
For that you can use, variable, switches ect...
Just make a cond. branch if variable = .... ect...
I mean, you must somehow set the date in the game to 1983, so everytime its 1983 in your game you can set in the same event a switch wich switches it 1983 ON, then the branch, if year is 1983 ON then go to bossroom, else....

yeah ik but how to get the info about the date from the pc ?
yeah ik but how to get the info about the date from the pc ?
ShadowDragon told you how to do that in the first reply to this thread.

I'm not telling you not to do this, but I guarantee nobody is going to change their own PC date just to see an extra thing in your game.
ShadowDragon told you how to do that in the first reply to this thread.

I'm not telling you not to do this, but I guarantee nobody is going to change their own PC date just to see an extra thing in your game.
human curiosity > laziness
You'd have to tell them that something will happen if they do that though, which defeats the purpose of having it as an easter egg in the first place.
You'd have to tell them that something will happen if they do that though, which defeats the purpose of having it as an easter egg in the first place.
It will be hidden in the logs of the old freddy's locations, they will hint at changing the date on pc
Keep in mind, changing pc date (if they know how) breaks the certificates
of ALOT of sites if they browse and ask them to restore it.

if you really want to have an easter egg, you can best set a variable
based on year variable.

if: year = yearinput (so if you set it to 1983) (once found)
than you code here
else
normal year transfer
end

checking pc year can be usefull, but not for people doing game + social media
which wont work if you change the pc date.

same thing is in Terraria -> speed up to date to dec for easter eggs instead
of waiting till that date and it breaks certifcates on most sites.

it's best to avoid that and make a workaround with the input number,
save in variable and check that variable for the correct year.

Original thread: https://forums.rpgmakerweb.com/threads/events-based-on-irl-year.144444/