RPG Maker Forums

So I just answered to a member of the forum, on a nice question.
"Hey I want the game to know the real date, cause I can do cool things with that, like a Christmas event if it's Christmas in real life".
How could I resist to such a clever idea.
Searched for a plugin, found nothing.
Go 0figure, it is super simple. OR NOT?
Here comes the code:

// The actual calculation part:
var dt = new Date();

// The grabbing part
m = dt.getMonth();
d = dt.getDay();
y = dt.getYear();

// The correction part:
m = m+1;
d = d+4;
y = y+1900;

// The show part:
$gameVariables.setValue(1, m);
$gameVariables.setValue(2, d);
$gameVariables.setValue(3, y);


Fact 1: Okay I get it. Year 1900 is equivalent to 0.

Question 1: Why should I have to add 1 to month?
Question 2: Why should I add +4 to the day?



Question3: Is it supposed to work like that?

Latest Threads

Latest Posts

Latest Profile Posts

He mad, but he cute :kaopride:

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.
Can someone recommend some fun story-heavy RPGs to me? Coming up with good gameplay is a nightmare! I was thinking of making some gameplay platforming-based, but that doesn't work well in RPG form*. I also was thinking of removing battles, but that would be too much like OneShot. I don't even know how to make good puzzles!

Forum statistics

Threads
106,035
Messages
1,018,459
Members
137,821
Latest member
Capterson
Top