Orange Time System - Variables

Orange Time System Variables 1.0
Hudell
​
Introduction
This plugin will export the data from the Orange Time System to variables, so you can use them to create a HUD, conditional branches or anything else.


Params

secondVariable:
The variable in which you want to store the current second of the clock

minuteVariable:
The variable in which you want to store the current minute of the clock

hourVariable:
The variable in which you want to store the current hour of the clock

dayVariable:
The variable in which you want to store the current day of the calendar

monthVariable:
The variable in which you want to store the current month of the calendar

yearVariable:
The variable in which you want to store the current year of the calendar

weekDayVariable:
The variable in which you want to store the current weekDay

dayPeriodVariable:
The variable in which you want to store the current day Period

dayNameVariable:
The variable in which you want to store the current day name

dayShortNameVariable:
The variable in which you want to store the current day short name

monthNameVariable:
The variable in which you want to store the current month name

monthShortNameVariable:
The variable in which you want to store the current month short name


Plugin
Get it from here

Dependencies
Orange Time System

FAQ
I'll keep a small FAQ here for easy reference.

Credit and Thanks
- Hudell
You possibly saw my post in the request section, but anywho, is it possible to sync up the time in the system to the system clock? (Just a suggestion)

Either way, it's a great script!

EDIT: Wrong Post. I have both the main script and this one open and got confused. ;^;
You possibly saw my post in the request section, but anywho, is it possible to sync up the time in the system to the system clock? (Just a suggestion)

Either way, it's a great script!

EDIT: Wrong Post. I have both the main script and this one open and got confused. ;^;
Yup, I just updated the main script adding a new param to enable real time.
has this one had mvcommons removed as dependancy yet?
has this one had mvcommons removed as dependancy yet?
Yes.
awsome and thank you for all your hard work, btw where do i find your terms of use
awsome and thank you for all your hard work, btw where do i find your terms of use
I still have to add it to the threads, but all my plugins are free for both free and commercial games.
I downloaded the Demo you made for setting up a HUD... I have it set exactly the same as your demo's in a brand new project, but my clock sits there at 0:00:00 indefinately..

I have also managed to accidentally reproduce the issue in your demo, while trying to modify the clock and time progression. reverting back to the default settings do not fix it unless i delete the project and re-extract.
I downloaded the Demo you made for setting up a HUD... I have it set exactly the same as your demo's in a brand new project, but my clock sits there at 0:00:00 indefinately..

I have also managed to accidentally reproduce the issue in your demo, while trying to modify the clock and time progression. reverting back to the default settings do not fix it unless i delete the project and re-extract.
Did you set a switch number on the mainSwitchId param? If you do, you need to turn that switch ON for the time to run.
Did you set a switch number on the mainSwitchId param? If you do, you need to turn that switch ON for the time to run.
I have never changed that switch yet. It's at 0, and nothing ever changes. Variables are all labeled the same as well. the plugins.js which stores your plugin's settings were copied over to my test project as well.. and it does not function for my project..
I have never changed that switch yet. It's at 0, and nothing ever changes. Variables are all labeled the same as well. the plugins.js which stores your plugin's settings were copied over to my test project as well.. and it does not function for my project..
Hmmm.. Can you add the following script call on an event and run it?

alert(OrangeTimeSystem._intervalHandler);
It will show a popup message. Ths message should be a number, if it's something else, please tell me what it shows.
Hmmm.. Can you add the following script call on an event and run it?

alert(OrangeTimeSystem._intervalHandler);It will show a popup message. Ths message should be a number, if it's something else, please tell me what it shows.
It outputs a 1.
It outputs a 1.
That means the timesystem itself is running. You can use this script call to check if the values are changing internally:

alert(JSON.stringify(OrangeTimeSystem.getDateTime()));Also, can you paste your plugins.js file here?
Well that's interesting.. The plugin IS working.. the clock just refuses to update..

Spoiler
var $plugins =
[
{"name":"OrangeTimeSystem","status":true,"description":"Adds a time system to your game","parameters":{"useRealTime":"true","secondLength":"1000","minuteLength":"6","hourLength":"6","dayLength":"24","weekLength":"7","monthLength":"31","yearLength":"4","dayPeriod1Hour":"6","dayPeriod2Hour":"9","dayPeriod3Hour":"18","dayPeriod4Hour":"20","mainSwitchId":"0","pauseClockDuringConversations":"true"}},
{"name":"OrangeTimeSystemVariables","status":true,"description":"Exports Orange Time System data to variables","parameters":{"secondVariable":"1","minuteVariable":"2","hourVariable":"3","dayVariable":"4","monthVariable":"5","yearVariable":"6","weekDayVariable":"8","dayPeriodVariable":"7"}},
{"name":"OrangeHud","status":true,"description":"Creates a custom HUD based on the params","parameters":{"DefaultFontFace":"Verdana","DefaultFontSize":"18","DefaultFontColor":"#FFFFFF","DefaultFontItalic":"false","HudWidth":"0","HudHeight":"0","HudX":"0","HudY":"0","HudOpacity":"0","SwitchId":"0"}},
{"name":"OrangeHudClock","status":true,"description":"Adds a new Variable to Orange Hud","parameters":{"Pattern":"%1:%2:%3","VariableHour":"3","VariableMinute":"2","VariableSecond":"1","SwitchId":"0","X":"","Y":"","FontFace":"","FontSize":"30","FontColor":"","FontItalic":"","ScriptPattern":""}}
];
And if you press F9 to see the variable values, are they changing?
Actually, those aren't... That's odd..
So the issue is on the "Variables" plugin. Try running this one last script call:
 

Code:
OrangeTimeSystem.on('changeSecond', OrangeTimeSystemVariables.configureVariables);
Nothing pops up when I use either script call or plugin command with that line. Which is strange, since the plugins I'm using in my projects are copy-pastes from the ones in your demo..
Try adding this plugin:

http://forums.rpgmakerweb.com/index.php?/topic/46504-orange-event-manager/

Add it at the top of the list, before Orange Time System.
Added it to the top. I do not see anything when running the script nor does the clock change... Has this never happened to anyone else before?

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