It worked!!!!! I did it all wrong. I put on parallel in page 2 the plugin command (it was always pushing 3 hours later the action). Now i put on page one, after the harvest and the self-switch A: ON, the plugin command, and it work flawlessly. I'm sorry for this, it was stupid, i should be ashame, i did a 30 hours game with RM and i do that haha. Thank you anyway!
Orange Time System
JS Plugin Releases (RMMV)It worked!!!!! I did it all wrong. I put on parallel in page 2 the plugin command (it was always pushing 3 hours later the action). Now i put on page one, after the harvest and the self-switch A: ON, the plugin command, and it work flawlessly. I'm sorry for this, it was stupid, i should be ashame, i did a 30 hours game with RM and i do that haha. Thank you anyway!
Hudell, i notice a typo error on your main thread. you forgot to put a "s" to the word hours (last plugin command) I guess it won't work without the "s" and people will post about this.
Both "in 1 hours" and "in 1 hour" will work. I check for both so it feels more natural when it's 1 hour.
Hi Hudell. I notice something. When many events in the same map have different "disable self-switch" time. For exemple, if i have many blueberry tree with a 3 hours respawn time and many rasberry trees with a respawn time of 4 hours, the shortest respawn event (disable self-switch") will respawn and the longest (disable self switch in 4 hours) will never respawn. Same thing with the variable (disable self-switch in [v] hours. I tried a random timer system using a random variable between 3 and 6, the shortest one respawn and the other never. If all the events of that map have the same value, for exemple, disable self-switch A in 3 hours, it will work flawlessly!
Thank you for reading!
Thank you for reading!
Does it only happen with hours, or also minutes/seconds and so on?
I'll try to make some tests here.
Ok i did more tests.
I did 3 harvesting events (using the same exemple as before) one with 3 hours respawn, second 4 hours respawn and third with 5 hours respawn. When i harvest the 3 hours one, then the 4 hours and finally the 5 hours, they all reapper correctly at the right time. BUT, if i do it revers, the 5 hours, 4 hours and 3 hours, only the 3 hours respawn, the 4 and 5 never.
I did many events respawning at 180 minutes, and many others respawning at 240 minutes. If i collect them all, only the 180 minutes ones respawn, the other at 240 minutes never respawn again.
Obrigado !!!
EDIT:
I did some more tests.
I tried using random variables, this time in minutes, for each events (all harvesting event add a random 180 to 300 value. Plugin command used : disable self-switch A in [v] minutes. it does not work properly, all events but one stop respawning.
I also tried using to different random variable ID for two harvest events. Unfortunatly, the higher random number stop respawning too, even if it's not the same variable ID. Hope it help!
Note: i deleted the EventManager when you told me it was not necessary. All my test are done without it.
There is no "-" in my test, sorry, my mistake, i put a - in the message (was not a copy and paste)
Today i test it again with 15 events on the map. They all have the disable self switch command after 180 minutes. For i reason i don't know, the first one a i collected never disabled, all the others did. Also, i had another event with the run common event x after one day, sometimes it work, sometimes it doesn't. It's hard to tell why sometimes it fail, make me wonder if there is a compatibility issue or if there is a problem with the order of your plugins. Here is how they are set :
MVCommons
Orange Time
Orangre time variable
orange time event
day and night
hud
hud line
hud gold
hud variable icon
hud script icon
hud clock
hud date
weather
antilag
autosave
mapshot
MVCommons
Orange Time
Orangre time variable
orange time event
day and night
hud
hud line
hud gold
hud variable icon
hud script icon
hud clock
hud date
weather
antilag
autosave
mapshot
It apparently doesn't work when the event that calls the plugin command is a parallel process. I'm fixing it here.
Edit: Done. Please try again.
If you still see the problem happening, try making an empty game with the issue so I can debug it. It's unlikely to be a compatibility issue.
Edit: Done. Please try again.
If you still see the problem happening, try making an empty game with the issue so I can debug it. It's unlikely to be a compatibility issue.
I will test it as soon as possible.
About parallel process, all my test was done with a "on touch" event. On page 1, on touch, harvest, self-switch A ON and your plugin command that disable self switch A after x time. The page 2 is empty and untouched exept the graphic (that is a bush with no fruits)
Ok Hudell, You can download this test wich is a new project. It's the cleaner possible :
https://onedrive.live.com/redir?resid=621575A879FB0EFC!14864&authkey=!AA_E6dBVb__AeT4&ithint=folder%2cjson
I put somes explanations inside of it.
EDIT : I noticed that when i use that plugin : OrangeTimeSystem.runInDays(17, 1); before using another event with plugin command disable self switch A in 3 hours, the event with the run common event 17 in one days never happen. So it's not just with the self switch command. I believe the problem occur in the core time system calculation. Somehow, when a long timer is calculated and then, a short one occur after, the longer get interupted for some reason.
https://onedrive.live.com/redir?resid=621575A879FB0EFC!14864&authkey=!AA_E6dBVb__AeT4&ithint=folder%2cjson
I put somes explanations inside of it.
EDIT : I noticed that when i use that plugin : OrangeTimeSystem.runInDays(17, 1); before using another event with plugin command disable self switch A in 3 hours, the event with the run common event 17 in one days never happen. So it's not just with the self switch command. I believe the problem occur in the core time system calculation. Somehow, when a long timer is calculated and then, a short one occur after, the longer get interupted for some reason.
The problem should be fixed now.
I can confirm! Everything works fine now! Grats!!! 🙂
Happy i could help on this one.
Obrigado!
EDIT:
I'm sorry to advise you that the problem still occur but in a different way. It felt for a while that everything was fixed, then some event started to never respawn.
Here's what i do to make the problem occur :
I created 3 events, one disable switch after 3 hours, second after 4 hours, and third after 5 hours. If i activate the 5 hours, then the 4 hours, and finally the 3 hours, they all respawn. But, if i do it reverse, activate de 3 first, 4 and 5, the 5 hours never activate. After that i played with the 3 and 4, they still respawn, no matter the order, but the event with disable awitch after 5hours never.
Hope it help!
Nice work, Thanks you Hudell! I wanna to add a day night cycle to my game. But, Will the current time in game be saved if I saved game?
Great! I will use your plugins. Keep working in your projects, both games and plugin 😀 👍
Hey Hudell, one question, if I want to put these plugins commands:
toggle self switch A in 10 seconds
toggle self switch B every second
enable switch 40 on hour 10 minute 20
disable self switch D in 1 hour
to a script command, how do I do this?
toggle self switch A in 10 seconds
toggle self switch B every second
enable switch 40 on hour 10 minute 20
disable self switch D in 1 hour
to a script command, how do I do this?
Those are more complicated than other script calls from my plugins because you need to build a "config string" with the switch data.
If you need, I can add extra methods to make this process simpler
Code:
OrangeTimeSystem.runInSeconds('SS' + $gameMap._mapId + ',' + this._eventId + ',A,TOGGLE', 10);
OrangeTimeSystem.on('changeSecond', 'SS' + $gameMap._mapId + ',' + this._eventId + ',B,TOGGLE');
OrangeTimeSystem.onTime('S40,ENABLE', 10, 20);
OrangeTimeSystem.runInHours('SS' + $gameMap._mapId + ',' + this._eventId + 'D,FALSE', 1);
Tks Hudell, It loved the script because this way I can execute it from the movement of an event as form of script. Thank you very much! 😀
PD: I understand the meaning of the script and to modify it to my taste, but if more persons need to execute it from a script, it would be a good idea to simplify it. 😉
Original thread: https://forums.rpgmakerweb.com/threads/orange-time-system.46509/