Orange Time System

Nevermind, I just tested my question out for myself. It works 🙂  placed it in my "newgame" map that handles all the setup/transfer stuff from the Title Menu map and the actual starting area. Works 100% 🙂 Thanks Hudell! Once again you save my a$$ lol


Hory sheet that fixed the initial problem lol. Now to refresh it when a player selects "New game"... would I be able to just put all that into a script call? or would it throw up errors?

Edit: I say/ask this ^  because the time still resumes from its last position. (ie. when the time hits: 8:05pm, I go to menu -> Title screen -> New Game again, the time starts off at 8:05pm again instead of resetting.


Add this inside the "skipNewGame" method (at the end of it):

Code:
OrangeTimeSystem.setDateTime({
  seconds : OrangeTimeSystem.Param.initialSecond,
  minute : OrangeTimeSystem.Param.initialMinute,
  hour : OrangeTimeSystem.Param.initialHour,
  day : OrangeTimeSystem.Param.initialDay,
  month : OrangeTimeSystem.Param.initialMonth,
  year : OrangeTimeSystem.Param.initialYear
});
OrangeTimeSystem.refreshTimeSystem();
Is it possible to let time go on during battle?
A video tutorial explaining how  all your adds work would be greatly appreciated. (or at least a more detailed written explication)


I think speak in name of a lot of people when I say that Its a lot confusing, and thats a shame cuz we all know the amazing of this pluggings


Petition aside, I have an issue here;


I have and indoor event intended to dissapear at x time (22h 00m as example), and indeed it does it when the player is indoor as well.


But if the player goes indoors a bit later it doesnt dissapears (22h 01m as example).


I know that the RPG maker doesnt execute events in other maps aside of your actual one but isnt there any smart (and no so messy) idea  to get ride of that guy after that time?
Is it possible to let time go on during battle?

It should by default.

A video tutorial explaining how  all your adds work would be greatly appreciated. (or at least a more detailed written explication)


I think speak in name of a lot of people when I say that Its a lot confusing, and thats a shame cuz we all know the amazing of this pluggings


Petition aside, I have an issue here;


I have and indoor event intended to dissapear at x time (22h 00m as example), and indeed it does it when the player is indoor as well.


But if the player goes indoors a bit later it doesnt dissapears (22h 01m as example).


I know that the RPG maker doesnt execute events in other maps aside of your actual one but isnt there any smart (and no so messy) idea  to get ride of that guy after that time?

You can use a switch to control if the event is visible, then turn it off at 22:00
It should by default.

Maybe i did something wrong but i really think it's not counting time in battle. I it work for someone, let me know ! 
Maybe i did something wrong but i really think it's not counting time in battle. I it work for someone, let me know ! 



Just checked the code, and there's nothing pausing the flow of time at any point, so in theory nothing could stop it.


Are you sure that it's the time that isn't progressing? Maybe the problem is elsewhere. Try pressing F8 to open the console window and then type this on it:


OrangeTimeSystem.getDateTime();


Type that and press Enter multiple times to see if the time is changing.


Are you showing the time on a hud or something like that? maybe it's the hud that isn't refreshing.
Just checked the code, and there's nothing pausing the flow of time at any point, so in theory nothing could stop it.


Are you sure that it's the time that isn't progressing? Maybe the problem is elsewhere. Try pressing F8 to open the console window and then type this on it:



OrangeTimeSystem.getDateTime();


Type that and press Enter multiple times to see if the time is changing.


Are you showing the time on a hud or something like that? maybe it's the hud that isn't refreshing.

I tried with and without yanfly battle engine, the time stop while in battle. I used your command in the console to verify, the time do not move, not even a second.


EDIT: I tried turning off all your plugin leaving time system only, same thing.


EDIT 2 : By the way, your plugins are awesome!!!! I'm really having fun playing with them, hud, weather, night and day, very nice work!
Hm, that's weird. I'll debug the script here to see if I find anything.
Sorry to bother you, but I got a problem with this Script and the OrangeTimeSystemEvents add-on.


If I try to run both, with UseRealTime set to true I get the following error:


Uncaught TypeError: Cannot read property 'reserveCommonEvent' of null
When does this error shows up? Is there anything else on the console?
The error appears when I start the Playtest.


Here's the screen of what appears on the console:

Spoiler
error.PNG
What version of the timesystem are you using? (you can see the version if you open the JS file)


Try including OrangeEventManager before the time system to see if the problem stops:


http://download.hudell.com/OrangeEventManager.js
I'm using version 2.0


Same error, the console message slightly changed:

Spoiler
error2.PNG
I'm not sure why it happened, but I know what happened. I'll fix it tonight.
Maybe someone can help me with that...


I use the Sn0wCrack Gathring plugin and it's respawn note tag only work if i stay in game until it respawn (ex: metal nod), but if after gathering i log out the game i load it again, the respawn timer get lost and the gathering source never respawn. I found a temporary solution but it's bad. Before i start creating a lot of event that calculate each gathering source timer, is there a script line i can use with Orange time system for each gathering source? Exemple, on page 2(despawned), using self-switch A, on parallel process, i put a conditional branch with a line of script in that calculate if it's 3 hours later, it turn self-switch A off.(respawn)


Thank you for your help!
Yup. I'm including a new feature on it to help you now, along with the fix from the previous post. I'll update the script with both of those changes in a couple of hours.


Edit: Updated the plugin and the main thread.


To enable a self switch after 3 hours, you can use the following plugin command:

Code:
enable self switch A in 3 hours
Awesome! This is such a great thing to have you in the rm community! Can we also disable that self switch replacing the word enable by disable?
Awesome! This is such a great thing to have you in the rm community! Can we also disable that self switch replacing the word enable by disable?

Yup. And you can also use the word toggle to enable when disabled and disable when enabled.


Edit: Updated the plugin again. Now you can use variables inside plugin commands.


Any plugin command like this:


enable self switch A in 3 hours


If you want to use a variable number of hours, you can use this to pick the value from variable 10 (You can use any variable):

Code:
enable self switch A in [10] hours
I'm testing it right now. I tried many things and i always get that error:


file:///C:....../plugins/OrangeEventManader.js


98


Uncaught TypeError: undefined is not a function       OrangeEventManager.js:98


Uncaught TypeError: undefined is not a function    rpg_managers.js:1692


Uncaught TypeError: undefined is not a function    rpg_managers.js:1693


Unfortunatly, i don't know what that mean.


EDIT:


I tried putting EventManager below Timesystem, that error do not occur anymore, but, nothing happen (won't disable self switch)


Here is the plugin command i use  : 

disable self switch A in 3 hours
Did you update both?
You can remove the event manager plugin, as the time system includes it automatically.

Original thread: https://forums.rpgmakerweb.com/threads/orange-time-system.46509/