Orange Time System

Whaaa, I just cant get the Self switch thing to work  ;_;


This is how I set the event up:

Spoiler
00LDx5u.png









And this is the error massage I get: Not only once but again and again!

Spoiler
 
0jJ8jaD.png







Please help me  🙁


Never mind, I placed the eventmanager wrong... Put it under the timesystem and now it works ... 
Also check if you have the latest EventManager, as that error shouldn't have happened. (You can see the version by opening the JS file in a text editor - the latest one is 1.2)
Downloading the newest version was the first thing I did when I got the error XD
Whaaa, I just cant get the Self switch thing to work  ;_;


This is how I set the event up:

Also, you dont have to put the command in a parralel page 2. In page one, after the harvest, insert the command at the end just before you turn the A self-switch ON., leave the page 2 blank, not on parallel, leave it at "action button".
Yes, if you use a parallel event, you'll be adding a new "disable self switch" command at every frame
Well that would explain why I got so damn many error massages XD
Having an issue with running a common event every x number of minutes...


I set up a test common event 28 that increases a variable by 1 point.


And then I had another event that contained the plugin commands, and in a test play I activated it one time:


RUN COMMON EVENT 28 ON MINUTE 0 SECOND 0
RUN COMMON EVENT 28 ON MINUTE 15 SECOND 0
RUN COMMON EVENT 28 ON MINUTE 30 SECOND 0
RUN COMMON EVENT 28 ON MINUTE 45 SECOND 0


(I don't know how else to get an event to run only 4 times per hour :/)


When common event 28 activates every 15 minutes, it actually runs many, many times. With my current plugin settings, it runs 15 times per execution, but on earlier settings it actually ran 30-35 times!


This is a problem, because instead of a variable increasing by 1 point every 15 minutes, it increases by 15 points every 15 minutes.


I feel like it has to do with the seconds being 0 (0 seconds could take up 15 frames, which is why the event runs 15 times) but I'm not really sure how else to do this without having common events run every minute and then check what the exact minute is, or something like that.


Having to have an event run every minute and then checking if the minute is a multiple of 15 feels like overkill to me, I already feel like I have too many events trying to process constantly.
I just made a quick change on the main plugin. It may have fixed your problem.


And another way to have the event running every 15 minutes is to use: "run common event 28 in 15 minutes" inside the common event itself, so that every time it's executed it already schedules the next execution.
It runs as intended with the fix now, thanks!
Hi Hudell, nice script man. You did a good job.


After the flattering, here comes the request (lol): how can i enable the time to pass on battle? If so, can i control how time passes on battle? I just need to control the time variables. It doesn´t have to tint the screen or run event, this all can wait after battle's end. Is it possible?


E sério, ótimo script. Vou mesclar ele com o teu Hudell Hud pra criar a hud de tempo. 
I forgot to add a param for that, but it's just one line to change in the script:


Line 952:


} else if (SceneManager._scene instanceof Scene_Map) {




change to:


} else if (SceneManager._scene instanceof Scene_Map || SceneManager._scene instanceof Scene_Battle) {




I'll include a param for this later
Hi. I am making a simple demo related to, but not actually part of my main game, just so I can work out any kinks with some major features that I need. One is specifically the rather complicated day/night system I need. Your plugin, (awesome work btw), while brilliant, and I will be using it, does not have one feature that I need. Basically, while in the towns and cities, day/night works as normal, but on the world map, it is all dark, apart from the place of about 4-5 tile raidius where the main character is.


For the sake of simplicity, the main character is of a race of light sources, and allows 'regular' time flow. Everywhere else is subject to eternal night. Towns and cities have a certain structure which acts as a member of the main character's race, but if that structure is damaged in anyway, it does not work. Time still flows, but the day/night does not. As an aside, caves and other places, ruins etc...also are subject to the eternal night. Temples, holy places and travelling merchants etc...generally have either the structure, or a mini-version of the structure to allow day/night. Otherwise monsters, who only come out at night would attack.


Alas, this is a major feature of the game, and without it, the whole plot will fall apart. Is there anyway this is possible?
Which lighting system are you using?
None yet. I'm still in the pre-planning stages atm. Doing research for everything I need. No use getting fully invested if I can't get basically the whole reason for the plot to work. I believe you have a lighting system as well? I haven't had a chance to look yet (am on my iPad in bed atm ^_^), but I will when I get up later.
I forgot to add a param for that, but it's just one line to change in the script:


Line 952:



} else if (SceneManager._scene instanceof Scene_Map) {




change to:



} else if (SceneManager._scene instanceof Scene_Map || SceneManager._scene instanceof Scene_Battle) {




I'll include a param for this later

 OK, i've changed to


if ($.Param.useRealTime) {
      $.loadRealTime();
      $._onUpdateTime();
    } else if (SceneManager._scene instanceof Scene_Map || SceneManager._scene instanceof Scene_Battle) {
      $.seconds += increment;
      $.updateTime();
      $._onChangeSecond();
      $._onChangeTime();
    }
  };




Hudell, i don't know if what i say is wrong, but the fact that it uses


$.Param.useRealTime


will only work for those who has the plugin option to use real time, turned on? Because i use a fantasy time where each day are 24 minutes of real time. Just to be sure.
It shouldn't be real-time only, it's actually checking in case you aren't using real time.
It shouldn't be real-time only, it's actually checking in case you aren't using real time.



OOps my bad. LOL i forgot the if else right there. Thanks @noctiluca


EDIT: 


Hudell, it works now. Even on battle the time passes and day night cycle works. It wasn't my intention to the cycle works on battle but i liked.


I was thinking here, i wanted the time on battle to pass slower than on map. I guess on a second if else the increment on second could be different or the updateTime event could check if it is on battle. Don't know, just some ideas. 
None yet. I'm still in the pre-planning stages atm. Doing research for everything I need. No use getting fully invested if I can't get basically the whole reason for the plot to work. I believe you have a lighting system as well? I haven't had a chance to look yet (am on my iPad in bed atm ^_^), but I will when I get up later.

My lighting system is just a rewrite of Terrax Lighting, made to be compatible with orange time system. I haven't updated it in a while so it may be lacking features. I'm not sure if I made any feature to help in your case, but it wouldn't be too hard to do so.

OOps my bad. LOL i forgot the if else right there. Thanks @noctiluca


EDIT: 


Hudell, it works now. Even on battle the time passes and day night cycle works. It wasn't my intention to the cycle works on battle but i liked.


I was thinking here, i wanted the time on battle to pass slower than on map. I guess on a second if else the increment on second could be different or the updateTime event could check if it is on battle. Don't know, just some ideas. 



Add this right after the line from before (inside that if):


if (SceneManager._scene instanceof Scene_Battle) {
increment /= 2;
}


This will make the time be two times slower in battles.
My lighting system is just a rewrite of Terrax Lighting, made to be compatible with orange time system. I haven't updated it in a while so it may be lacking features. I'm not sure if I made any feature to help in your case, but it wouldn't be too hard to do so.


Add this right after the line from before (inside that if):



if (SceneManager._scene instanceof Scene_Battle) {
increment /= 2;
}


This will make the time be two times slower in battles.



Ok, will do. So it's the increment that regulates time passage. So if i do


increment /= $gamesVariables(15)


 will it actually divide time passage on battle base on variable 15? If it is so, that will be awesome to do.
Yup.

Code:
increment /= $gameVariables.value(15)

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