RPG Maker VX Ace

RPG Maker VX Ace

Vlue's Script Compilation
Time related stuff.
So I am new to coding, but I would love to learn how to have certain time-based things in my game. These are the features I would like to learn how to put into my game:

Automatically Play "MapBGM_Day" between 5am and 7pm, and then play "MapBGM_Night" between 7:01pm and 4:59am. It'd be cool if there was a fade-out, fade-in period during the minute that the change happens if you are in the same map during the transition period....

Creating Events that occur only between "Time X" and "Time Y"

Field abilities that can be used only during Night or only during Day (Like an ability to draw healing power from the Sun or the Moon) Specific depending on the Lead Character

Month-related events (Enemies that are around in November but not in December or October, etc) Or it would be to figure out specific days, for instance, an enemy that is around from the 5th of november til the 12th of December but not any other time and is replaced by another from the 13th Dec to 23rd of January etc

Creating Holidays/One Day Annual Events, Birthdays, etc.

I would like help understanding how to do these things using your "#Advanced Game Time + Night/Day v1.5.2" and if there are any other updates I might have missed that would make my goals easier to reach. I appreciate your help! Thanks.

EDIT: After much messing around, I have figured out a way to make Month based and Time (like Day and Night) based events via Conditional Branches in a Common Event triggered by a switch. But, I still have questions. Plus I am sure others have similar questions, so if someone could help me, it may help a lot of other people too, at least I hope so. Anyway, my questions now are:

- How do I make an annual event?

- How do I make certain "skills" only usable during certain times? (day or night, or by months)

- When using the command " GameTime.set("addmonth",1) the day does not change to correspond with the calendar day it would have actually been for that month. Is there a way to fix this problem? Do I have to use "addhour" instead or something?
Last edited by theorangesunflower; 7 Jan, 2015 @ 6:02am
< >
Showing 1-4 of 4 comments
Starlight  [developer] 7 Jan, 2015 @ 1:02pm 
For Annual Events you can do the same you did for other events, by checking either the current day of the year (GameTime.day_year?) or month and day of the month, and go from there.

There's not much you can do to make skills only usable based on script conditions, without a bit of editting to scripts. Though you can use the GameTime script calls in the damage formula. (But that could get messy)

Hrm, it just adds a month, the day of the week would get a little messed up then. In the meantime you could do GameTime.set("addday"MONTHS[GameTime.month?]) and that should work out nicely.
Thanks for the quick reply :) I appreciate it. I will try the things you have suggested, thanks again for answering my previous post! Just to clarify, the annual event would be created like this:

GameTime.day_year? >= 123 and GameTime.day_year? < 124

And that code will give me the 123rd day of the year?? Just want to make sure I understand.
Last edited by theorangesunflower; 8 Jan, 2015 @ 1:07pm
Starlight  [developer] 8 Jan, 2015 @ 5:32pm 
Technically yes, but it'd be easier to just do:
GameTime.day_year? == 123
Thanks!
< >
Showing 1-4 of 4 comments
Per page: 1530 50