Hatake-hime

Squishy Cat Summoner
Veteran
Joined
Jul 12, 2013
Messages
48
Reaction score
16
First Language
English
Primarily Uses
^ Hey, thanks but the common event I have now works fine with the varible hours = 6, its just I want a script to change time when my player goes to bed.


I want them to wake up at like 5.59 so the event resets as soon as they wake basically.


However if I use the code mentioned before to change the time to 6am, it doesn't register it as a new day, it still considers it day 1.


I would like it to register that its a new day.


Heres my code: (super simple) (go to sleep, +1 day, go to six next day.)


but once it skips time, it reverts the day back to day 1.

feafe.png
 

Soulnet

Veteran
Veteran
Joined
Mar 10, 2014
Messages
198
Reaction score
98
First Language
English
Primarily Uses
Go back one page. I asked Hudell the same thing. The code is there in their answer! :)  
 
Last edited by a moderator:

Hatake-hime

Squishy Cat Summoner
Veteran
Joined
Jul 12, 2013
Messages
48
Reaction score
16
First Language
English
Primarily Uses
Go back one page. I asked Hudell the same thing. The code is there in their answer! :)  



You saved me an hour of frustration, thanks so much! :D   <3


This may be a harder question but, do you know how to have the time change time to like, 5:30 instead of just 6? Its okay if not!
 
Last edited by a moderator:

milk

Veteran
Veteran
Joined
Oct 18, 2015
Messages
44
Reaction score
45
First Language
english
Primarily Uses
can someone explain in noob terms how I change the clock to 12 hours? i downloaded the demo but i dont see where it explains how to do that....
 

dyaskur

Villager
Member
Joined
Jul 6, 2016
Messages
7
Reaction score
0
First Language
Java
Primarily Uses
this time system is very lag if use mobile android, any solutions?


i hope this system have lite version, which update every secon not microsec, i think that will make fast.
 

highlord90

Aspiring Creator
Veteran
Joined
Jun 30, 2014
Messages
32
Reaction score
12
First Language
English
Primarily Uses
I've downloaded the plugins reccomended to run a day and night cycle but I can't get it to work, I set it to real time and put my own clock forward but night never came :/ Any chance at a helping hand?
 

highlord90

Aspiring Creator
Veteran
Joined
Jun 30, 2014
Messages
32
Reaction score
12
First Language
English
Primarily Uses
I've downloaded the plugins reccomended to run a day and night cycle but I can't get it to work, I set it to real time and put my own clock forward but night never came :/ Any chance at a helping hand?



I used a clock hud to make sure time was passing and it is but night still doesn't happen :(
 

CyndaBytes

Creator and Destroyer of Worlds
Veteran
Joined
Aug 3, 2015
Messages
87
Reaction score
40
First Language
Italian
Primarily Uses
Now with plugin commands. Some example of commands:



run common event 10 every hour
run common event 1 every minute
run common event 2 every second
run common event 3 every day
run common event 4 every month
run common event 5 every year

Is it possible to stop this command?
 

BigToastie

Veteran
Veteran
Joined
Apr 2, 2014
Messages
311
Reaction score
162
Primarily Uses
and how do I edit the clock / clock window etc? to look more like a GUI clock rather than floating text in the left corner?
 
Last edited by a moderator:

DrunkNescafe

Villager
Member
Joined
Apr 14, 2016
Messages
13
Reaction score
0
First Language
norwegian
Primarily Uses
I’m currently using this add-on/plugin.


Yep-engiencore


Yep-savecore.


Orange hud


Orange Time System


Orange hud clock/date


Orange timesystem to variable.


At the start of my game I use the script OrangeTimeSystem.on('changeHour', 1); where once an hour some stat change. (Works perfectly) the problem is when I save a game the script won’t load when I load a game.  The Yep savecore isn’t the problem have turned it off and have the same problem when its off.


How can this be fixed?
 

Martin

Veteran
Veteran
Joined
Apr 8, 2015
Messages
192
Reaction score
47
First Language
swe
Primarily Uses
RMMV
Im getting a error of : Length Undefined. It is taking me to OrangeSystem.js line 1175: if (args.length < 4) return;


What can be the cause of this? It was working just minutes ago.

EDIT: I fixed it by putting it at top of my plugin list
 
Last edited by a moderator:

Maidlyn

Veteran
Veteran
Joined
Jun 9, 2016
Messages
354
Reaction score
115
First Language
English
Primarily Uses
RMMV
I feel amazingly stupid right now.  So, newbie question, but, does this actually display the time or no? :unsure:  
 

Martin

Veteran
Veteran
Joined
Apr 8, 2015
Messages
192
Reaction score
47
First Language
swe
Primarily Uses
RMMV
If you add the OrangeHud it can display your timevariables :)
 
Joined
Oct 1, 2016
Messages
35
Reaction score
7
First Language
Scottish
Primarily Uses
Thank you so much for creating this! I have been hunting for something like this for ages.
 
Joined
Oct 1, 2016
Messages
35
Reaction score
7
First Language
Scottish
Primarily Uses
Is there a video one could watch on how to use these amazing plugins? As I'd like a certain character to change dialogue and for a certain event to change with the time of day. For example in the morning he greets his wife with breakfast and at night dinner
 

Rivingtondown

Villager
Member
Joined
Mar 14, 2016
Messages
13
Reaction score
4
Primarily Uses
var TimeSystemExtensions = {};

(function($){
$.registerCommand = function(variableId, switchId, hours) {
var time = OrangeTimeSystem.getDateTime();
time.hour += hours;
OrangeTimeSystem.validateDateTimeValues(time);

var timestamp = OrangeTimeSystem.convertConfigToTimestamp(time);

time.callback = 'S' + switchId + ',FALSE';
OrangeTimeSystem.registerAfterTimeEvent(time);

$gameVariables.setValue(variableId, timestamp);
};

$.getTimeLeft = function(variableId) {
var currentTimestamp = OrangeTimeSystem.convertConfigToTimestamp(OrangeTimeSystem.getDateTime());

return timestamp - currentTimestamp;
};

$.splitTimeDifference = function(variableId, daysVariable, hoursVariable, minutesVariable, secondsVariable) {
var timestamp = $.getTimeLeft(variableId);
var data = OrangeTimeSystem.convertTimestampToConfig(timestamp);

if (daysVariable > 0) {
$gameVariables.setValue(daysVariable, data.day);
}
if (hoursVariable > 0) {
$gameVariables.setValue(hoursVariable, data.hour);
}
if (minutesVariable > 0) {
$gameVariables.setValue(minutesVariable, data.minute);
}
if (secondsVariable > 0) {
$gameVariables.setValue(secondsVariable, data.seconds);
}

return timestamp;
};
})(TimeSystemExtensions);



I'd love to take advantage of this script to return the time different to the player, but instead of changing a Switch in X amount of hours I'd like to use it to change a Self Switch.


Unfortunately I'm having a hard time figuring out what the time.callback in the above script should be set to, after digging through Orange Time System js and Orange Event Manager, I'm guessing something like this:


Change:


time.callback =  'S' + switchId + ',FALSE';


To


time.callback =  'SS' + mapID + ',' + eventID + ',' + switchLetter + ',TRUE';


Obviously while also passing eventID, mapID, and switchLetter variable as a parameter into the function. Is that incorrect? Am I missing something else?


Any guidance would be greatly appreciated.
 
Last edited by a moderator:

Hudell

Dog Lord
Veteran
Joined
Oct 2, 2014
Messages
3,604
Reaction score
3,859
First Language
Java's Crypt
Primarily Uses
RMMZ
Change:


time.callback =  'S' + switchId + ',FALSE';


To


time.callback =  'SS' + mapID + ',' + eventID + ',' + switchLetter + ',TRUE';



That's right. Did you get any error when you tried?
 

Rivingtondown

Villager
Member
Joined
Mar 14, 2016
Messages
13
Reaction score
4
Primarily Uses
That's right. Did you get any error when you tried?



Well, I was getting a "timestamp not defined" error but I found you hadn't actually set that variable in the $.getTimeLeft function. I took the liberty to just set that value to the variableID value and it fixed that issue.

Then, instead of using the plugin command "disable switch 14 in 168 hours", use the following script call:


Correct me if I'm wrong but I was under the assumption the $.registerCommand could be run in-place of the plugin command due to your above instructions. However, I'm still required to use the plugin command in addition to that script if I hope of the switch to actually toggle. At least after making the minor change I mentioned above.


Thanks for your help Hudell :)
 
Last edited by a moderator:

Hudell

Dog Lord
Veteran
Joined
Oct 2, 2014
Messages
3,604
Reaction score
3,859
First Language
Java's Crypt
Primarily Uses
RMMZ
Well, I was getting a "timestamp not defined" error but I found you hadn't actually set that variable in the $.getTimeLeft function. I took the liberty to just set that value to the variableID value and it fixed that issue.

Oh right, it was missing this line:


var timestamp = $gameVariables.value(variableId);



Correct me if I'm wrong but I was under the assumption the $.registerCommand could be run in-place of the plugin command due to your above instructions.

Yes, it's supposed to be run in-place of the plugin command. But if it didn't work, you can use the plugin command and remove those two lines instead:

Code:
    time.callback = 'S' + switchId + ',FALSE';
    OrangeTimeSystem.registerAfterTimeEvent(time);
 

luiscesjr

Veteran
Veteran
Joined
Jun 26, 2014
Messages
117
Reaction score
11
First Language
Portuguese
Hudell, could you help another fellow brazilian? Lol


I simply can't download your demo, could you have it uploaded to another mirror?


Your server does not support resuming and it always breaks. 


I've been trying to download it for 5 days now, it's the only reason I'm asking.


Or maybe someone who has the latest demos, if anybody could upload it...


Obrigado!
 

Latest Threads

Latest Posts

Latest Profile Posts

Apparently MZ lets you preview move routes in the move route editor without having to start up test game. That could save a lot of time during development compared to MV, especially for a long game that uses a lot of event movement for cutscenes.
A repost of an old meme I had made, now with music

I have a really hard time keeping all these goodies secret til December... but I swear, it is worth the wait!
Working on a Premium version of my minimap plugin that will have advanced functionalities such as drawing a Terrain map based completely on the users tilesets, whatever they may be, and drawing minimap radar icons automatically based on texture of the event the note is applied to.

Forum statistics

Threads
115,859
Messages
1,093,529
Members
151,081
Latest member
MOLLARTA
Top