Stadler

Villager
Member
Joined
Apr 23, 2020
Messages
5
Reaction score
1
First Language
German
Primarily Uses
RMMZ
Uhm, for exploring dark caves and so on I still want the in-game time to pass but without the tint changing aka it should stay pitch black there. How can I achieve this?
 

Aesica

undefined
Veteran
Joined
May 12, 2018
Messages
1,825
Reaction score
1,729
First Language
English
Primarily Uses
RMMV
Uhm, for exploring dark caves and so on I still want the in-game time to pass but without the tint changing aka it should stay pitch black there. How can I achieve this?
At the moment, you can't, but sometime within the next few weeks, I intend to make a few minor changes that I've been meaning to make for awhile, but haven't gotten around to. That's a relatively easy thing to add in, so I'll keep it in mind.
 

Alexandre

Veteran
Veteran
Joined
Jul 8, 2015
Messages
151
Reaction score
70
First Language
French
Primarily Uses
Uhm, for exploring dark caves and so on I still want the in-game time to pass but without the tint changing aka it should stay pitch black there. How can I achieve this?

Just use the 'Set Tint' plugin command when entering your cave, and set the tint to whatever nuance of black you want. As long as your cave map don't have any 'Daynight' notetag, it will not change the tint when the hour of the day change. The time will still flow while being in that cave, using the same speed as the previous one (or the default 10 if it was not modified).

It is true that in the demo we set the daynight speed to 0 to prevent the time to flow while in a building, but you don't have to do it.
 
Last edited:

Stadler

Villager
Member
Joined
Apr 23, 2020
Messages
5
Reaction score
1
First Language
German
Primarily Uses
RMMZ
As long as your cave map don't have any 'Daynight' notetag, it will not tint when the hour of the day change.
Yeah, that was it. I thought, that removing the map notetag would disable the time flow completely.

Another thing: Is there a way to always pause the timer, when a textbox is displayed or do I have to disable/enable the plugin for each individual event?
 

Alexandre

Veteran
Veteran
Joined
Jul 8, 2015
Messages
151
Reaction score
70
First Language
French
Primarily Uses
Yeah, that was it. I thought, that removing the map notetag would disable the time flow completely.

Another thing: Is there a way to always pause the timer, when a textbox is displayed or do I have to disable/enable the plugin for each individual event?

Correctly, there is no why to stop the time other than the plugin command, but it is quite easy to add (a simple if($gameMessage.isBusy()) at the right place)
 

DarkSearinox92

Veteran
Veteran
Joined
Jan 8, 2013
Messages
535
Reaction score
95
First Language
Italian
Primarily Uses
Hi guys, there are really some things I don't understand and I'm having a hard time understanding. Please help me understand <_>

1) Why if I don't insert <CL: DayNight [10]> in a map (In this case I don't activate DayNight in that map), does the night switch turn ON? In theory it shouldn't turn on ... even if the time is set to 0, since when you start the game, the variables are all at 0 (so midnight).
If I enter <CL: DayNight [10]>, however, everything works as it should. That is, the switch activates at night, and turns off during the day.
I just don't understand why it gets activated even though I don't put the note on the map. Basically, whether I put the parameter or not, time runs anyway, only the light doesn't change, BUT the Save Night switch activates.

2) I can't figure out how to use the Kill Switch feature. I swear, I really struggle to understand it.
For example, I have an event. A candle. In the notes I put the classic <cl: Fire 200 # FFCC00 D1>. On the first page I insert an unlit candle as an image and I do not set any activation conditions. On the second page, I insert the lit candle, and insert the Save Night Switch as an activation condition.

So far everything works. Now, what would Kill Switch, and Kill Switch Auto do then? In what context should I use it? Could you give me an example?

3) Would it be possible to set a plugin parameter in which you set that when you do a play test, the game directly sets a preset time? It would be handy. Otherwise I am forced to go and use the Yanfly script that allows you to set a common event at the start of the game, and in the common event enter the modification of the time variables, to set the time at midday: / Why when start the game, all variables being 0, it always starts at night: /
 

Aesica

undefined
Veteran
Joined
May 12, 2018
Messages
1,825
Reaction score
1,729
First Language
English
Primarily Uses
RMMV
  1. It's still midnight (0) whether or not a map is using the daynight cycle
  2. The kill switch system is basically this: If you designate "D" as the kill switch in the plugin params, every time you set an event's self switch D to ON, the light turns off (self switch on => light off, and vise versa) Kill switch auto means that, if you use the id-based on/off system, a plugin command to turn an event's light off will also set the event's corresponding self switch to on. I'll explain how to do a fairly easy day = light off, night = light on setup further below.
  3. You can just use a self-erasing autorun event in your map's first screen that sets the time to the desired value.
Okay, regarding #2 in more detail, set up a self-erasing autorun event on any map with lights that you want on during the night and off during the day. Make note of the map's ID and the event's ID, and make sure you have a kill switch set in the plugin params (I like to use "D"

Now, in the autorun event, add a script line with the following:

Code:
$gameSelfSwitches.setValue([mapId, eventId, "D"], !$gameSwitches.value(nightLightId))

mapId is the map's id number, eventId is the event's id number, and nightLightId is the id of the switch assigned to be on when it's night time.

One of the things I mentioned above that I was going to add in the next few weeks is this functionality in an automatic fashion using simple note tags, but in the meantime, this solution should work.
 

DarkSearinox92

Veteran
Veteran
Joined
Jan 8, 2013
Messages
535
Reaction score
95
First Language
Italian
Primarily Uses
  1. It's still midnight (0) whether or not a map is using the daynight cycle
  2. The kill switch system is basically this: If you designate "D" as the kill switch in the plugin params, every time you set an event's self switch D to ON, the light turns off (self switch on => light off, and vise versa) Kill switch auto means that, if you use the id-based on/off system, a plugin command to turn an event's light off will also set the event's corresponding self switch to on. I'll explain how to do a fairly easy day = light off, night = light on setup further below.
  3. You can just use a self-erasing autorun event in your map's first screen that sets the time to the desired value.
Okay, regarding #2 in more detail, set up a self-erasing autorun event on any map with lights that you want on during the night and off during the day. Make note of the map's ID and the event's ID, and make sure you have a kill switch set in the plugin params (I like to use "D"

Now, in the autorun event, add a script line with the following:

Code:
$gameSelfSwitches.setValue([mapId, eventId, "D"], !$gameSwitches.value(nightLightId))

mapId is the map's id number, eventId is the event's id number, and nightLightId is the id of the switch assigned to be on when it's night time.

One of the things I mentioned above that I was going to add in the next few weeks is this functionality in an automatic fashion using simple note tags, but in the meantime, this solution should work.

I followed your explanetion. You said autorun event, but with autorun event it doesn't work.
I tried with parallel process and in fact, now, when it's "sunset", the light is off and when is night light appear.

However I do not understand the meaning of the lights "on" during the night and "off" during the day ... As I said, if obviously during the day there is a "white" tint, it is obvious that the lights are not seen. Is the fact of deactivating them going to lighten the work on the cpu?
Because they are always running, even if you don't see it?

One of the things I mentioned above that I was going to add in the next few weeks is this functionality in an automatic fashion using simple note tags, but in the meantime, this solution should work.

Ok, so it's much more efficient in this way, rather than putting all the strings for each light, in a parallel event... I'll wait this update!

Another thing. I tried the command "Daynight debug" plugin command but i received this:


1616959146300.png

i've setted the three variables Hours, Minutes and Seconds, of course... :/
 

Aesica

undefined
Veteran
Joined
May 12, 2018
Messages
1,825
Reaction score
1,729
First Language
English
Primarily Uses
RMMV
Okay so I finally got around to doing some things I wanted to do!
  • Updated the MV version to use the same note tag caching system used by the MZ version so it's not running a bunch of asinine note tag parses every frame. The note tag order is also more flexible and forgiving. They now both share the same version number (4.0 as of this post)
  • Added the event note tag paramters "night" and "day" which can be used to automatically switch a light off at night or on during the day. <cl: light 250 #ff0000 night> only comes on during the night hours, for example.
  • Got rid of the debug show time garbage because it doesn't work. In its place, the time can now be displayed as an actual game feature. In MZ, the plugin command is the formerly broken "Show Time" command. In MV, the plugin command is "daynight show", "daynight showseconds", or "daynight hide". The time window will display on the game map until dismissed by the appropriate plugin command
More advanced stuff: Added a few functions to the Community.Lighting object that may be useful for certain things.
  • Community.Lighting.hours():Number // get current hours
  • Community.Lighting.minutes():Number // get current minutes
  • Community.Lighting.seconds():Number // get current seconds
  • Community.Lighting.time(showSeconds=true|false):String // get time in h:mm: (ss) format
  • Community.Lighting.isNight():Boolean // true if night time, false otherwise
Issues: Light cycling is borked in both versions due to how dreadful its note tag implementation was. I'll be fixing it (and improving it) within the next few days. My goals for the new version of light cycling includes able to use any number of colors instead of just 3 and getting rid of that annoying pause that happens when the cycle loops back to the beginning.

They're not up on the main repository yet, so until they are, you can get them from my github: https://github.com/Aesica/community_lights

Please let me know if I broke anything else. The MV changes in particular did a lot behind the scenes and as unstable as this plugin's base code can be, I wouldn't be surprised if I broke something.

Edit: God damned emoji... ;)

Edit2: @ImaginaryVillain I haven't made the pull request to your repo yet because I wanted to get the light cycling part done first. Just an FYI.
 
Last edited:

DarkSearinox92

Veteran
Veteran
Joined
Jan 8, 2013
Messages
535
Reaction score
95
First Language
Italian
Primarily Uses
You are the best... wow! I hope that it will be working without problems! I will try it, however i will wait your full release! (I didn't see any pause for the loop :/ really there is a pause when the loop restart, in the previous release?
Added the event note tag paramters "night" and "day" which can be used to automatically switch a light off at night or on during the day. <cl: light 250 #ff0000 night> only comes on during the night hours, for example.

So basically we can use more note tags in the same event, but on different pages?

Example, Event01, first page <cl: light 250 #ff0000 day> with a unlit candle, and in the second page <cl: light 250 #ff0000 night> with a lit candle?

Did i understand correctly?
 

Aesica

undefined
Veteran
Joined
May 12, 2018
Messages
1,825
Reaction score
1,729
First Language
English
Primarily Uses
RMMV
Note tags apply to every page on an event. What you'd do is make an unlit candle on page 1, then a lit candle on page 2 with the condition set to your night switch. the note tag would be like <cl: light 250 #ff0000 night>
 

Alexandre

Veteran
Veteran
Joined
Jul 8, 2015
Messages
151
Reaction score
70
First Language
French
Primarily Uses
Okay so I finally got around to doing some things I wanted to do!
  • Updated the MV version to use the same note tag caching system used by the MZ version so it's not running a bunch of asinine note tag parses every frame. The note tag order is also more flexible and forgiving. They now both share the same version number (4.0 as of this post)

Nice, I wanted to do it too, but I always procrastinated. Glad to see it in place.
 

DarkSearinox92

Veteran
Veteran
Joined
Jan 8, 2013
Messages
535
Reaction score
95
First Language
Italian
Primarily Uses
Note tags apply to every page on an event. What you'd do is make an unlit candle on page 1, then a lit candle on page 2 with the condition set to your night switch. the note tag would be like <cl: light 250 #ff0000 night>

Right, i forgot that the notetag of the event is always on every page.
Amazing, i will try it and i will do some test!!! You're the best!
 

Aesica

undefined
Veteran
Joined
May 12, 2018
Messages
1,825
Reaction score
1,729
First Language
English
Primarily Uses
RMMV
Okay so a few more things!
  • Light cycling is back, and it's more flexible than before! It can be applied to event lights, event fires, and now, even event flashlights. Unlike before, there's no limit to the number of colors you can use, so you can alternate between two different colored lights or you can go nuts and use 50 or more. <cl: light 250 cycle #ff0000 15 #00ff00 15 #0000ff 15 #ff00ff 15 #00ffff 15> for example
  • Fixed a bug where certain plugin commands were nitpicking about uppercase vs lowercase.
  • Added a few example note tags to the plugin help
Here's the link: https://github.com/Aesica/community_lights

I'm going to wait a few days before pull-requesting it over to main repo in case any bugs crop up, so please post any bugs that show up here.



Edit: Okay great images don't work on this forum anymore I guess. Changed to direct link.
 
Last edited:

ShadowDragon

Realist
Veteran
Joined
Oct 8, 2018
Messages
4,426
Reaction score
1,686
First Language
Dutch
Primarily Uses
RMMV
that's really cool, to bad, the flash light dont colide to the top wall
or retain 24 pixels below the top wall.

also a new demo of this feature would be nice so I can save it :)
nie work with the cycling though :)
 

DarkSearinox92

Veteran
Veteran
Joined
Jan 8, 2013
Messages
535
Reaction score
95
First Language
Italian
Primarily Uses
@Aesica Hello!

I've two question to ask:

1) If I use the command <cl: Daynight: 0>, the time in the map stops. But I have noticed that it is as if the whole cycle is disabled and does not set the switch of the night ON and OFF correctly.
It's a normal thing? Is there a way to stop time, keeping the check on the switch always active, based on the time in the variables?

2) I went crazy today. Unfortunately I noticed some slowdowns during the game, very small, but annoying. You know when you run left and right and see the image scroll smoothly? Perfect. I noticed a few times, some very slight lag and didn't understand what the hell it was. So I deactivated all the scripts and kept only the yanfly core engine and the Community Light active.

I start the game, the lights work. No problem. No lag.
I set the time at 10:00 am. The lights disappear, no problem, no lag.

I ACTIVATE THE BLOCK REGION, and here the lag appears.

I do further tests and found that this pretty much only happens in Test mode.
If I deploy the game, this lag is not present.

This is REALLY annoying. If you want, I'll make you a couple of videos for you to see.
After all the tests I have done, I can definitely confirm this for you.

I am using both on the test and on the prod, an updated version of nwjs. And it's the same.

What the hell could it be? Why does it only do this in test mode?
 
Last edited:

Aesica

undefined
Veteran
Joined
May 12, 2018
Messages
1,825
Reaction score
1,729
First Language
English
Primarily Uses
RMMV
that's really cool, to bad, the flash light dont colide to the top wall
or retain 24 pixels below the top wall.

also a new demo of this feature would be nice so I can save it :)
nie work with the cycling though :)
Stopping the flashlight from penetrating past regionblocks would be nice I agree, but it's a bit trickier than it sounds, especially given the current codebase. As for the demo, well it's probably easier to just paste the note tags I used in my gif:

Code:
<cl: light 100 cycle #f0f 10 #00f 10 #0ff 10 #0f0 10 #ff0 10 #f00 10>
<cl: Flashlight l8 w12 cycle #f00 15 #ff0 15 #0f0 15 #00f 15 #00f 15 #f0f 15 on asdf>

I've two question to ask:
1. Not sure how the night switch would even change when you have the time stopped. If you set the time manually via plugin command, the night switch should upate. It does for me, anyway.

2. RM's test mode is most likely just slower in general since it's doing a lot of back-end debug tool communication that isn't happening in the release version. Doesn't lag for me, so make sure you're not using too many events/parallel processes/etc.
 

Alexandre

Veteran
Veteran
Joined
Jul 8, 2015
Messages
151
Reaction score
70
First Language
French
Primarily Uses
1:
If the time speed is 0, all time variables and the day/night switch no longer updated, as you said.
If you change the hour manually, the switch should be changed as well. I would be very interested to know how you managed (step by step) to have the day/night switch inconsistent with the current time.
2:
I know what you are speaking about, it was a problem that occurred even with the original plugin,
but I never encounter it back since I changed computer roughly when MZ came back.

Any heavy plugin like a light system ou a custom battle system is likely to cause possibly huge frame-rate drops when the debug window is open (because of all the additional processing?), that is 'normal'. Do it happen when the debug window is off?
 

DarkSearinox92

Veteran
Veteran
Joined
Jan 8, 2013
Messages
535
Reaction score
95
First Language
Italian
Primarily Uses
1. Not sure how the night switch would even change when you have the time stopped. If you set the time manually via plugin command, the night switch should upate. It does for me, anyway.

2. RM's test mode is most likely just slower in general since it's doing a lot of back-end debug tool communication that isn't happening in the release version. Doesn't lag for me, so make sure you're not using too many events/parallel processes/etc.
1:
If the time speed is 0, all time variables and the day/night switch no longer updated, as you said.
If you change the hour manually, the switch should be changed as well. I would be very interested to know how you managed (step by step) to have the day/night switch inconsistent with the current time.
2:
I know what you are speaking about, it was a problem that occurred even with the original plugin,
but I never encounter it back since I changed computer roughly when MZ came back.

Any heavy plugin like a light system ou a custom battle system is likely to cause possibly huge frame-rate drops when the debug window is open (because of all the additional processing?), that is 'normal'. Do it happen when the debug window is off?

1) This is my fault.
I stopped at a simple and immediate start playtest, without changing the hours manually.
When you start the game, the variable is set to 0 and therefore I expected the lights to disappear automatically, along with the various events.
If I try to change time to 0 again manually, the switch works. I simply focused on "I start the game, the time is at 0, why are some events that shouldn't be there, since the switch is off, are there?" You told me to manually force the time change and actually if I change the time manually, AFTER the playtest start, everything starts to work.
I expected it to work when the playtest starts. So i understand now this thing.

2) Sincerly, i'm not using any parallel event. It's just a simple map 40x31, with some doors.
No parallel events, and i don't open the F12 console.
It's a simple fact... i start the game without Region block, i run right and left for sometimes and the game is very fluid. I activate region block and then i run again left and right and sometimes i see a very small lag, just like a frame. And this only happens in playtest.
Really annoying. Even in a map that is huge, with lots of effect, for example particles, the frps drops to 40. In deployed game, everything is just fine.... Bah. It's very ****ty.


P.S. Happy Easter!! :)
 

Aesica

undefined
Veteran
Joined
May 12, 2018
Messages
1,825
Reaction score
1,729
First Language
English
Primarily Uses
RMMV
2:
I know what you are speaking about, it was a problem that occurred even with the original plugin,
but I never encounter it back since I changed computer roughly when MZ came back.

Any heavy plugin like a light system ou a custom battle system is likely to cause possibly huge frame-rate drops when the debug window is open (because of all the additional processing?), that is 'normal'. Do it happen when the debug window is off?
You know, hearing it this way has me thinking--maybe it's just MV's internal throttling that happens when you do any number of things that make it think "this is too much to handle at 60fps" I know you could also trigger a laggy framerate drop just by spam opening/closing the menu a bunch of times.

1) This is my fault.
I stopped at a simple and immediate start playtest, without changing the hours manually.
When you start the game, the variable is set to 0 and therefore I expected the lights to disappear automatically, along with the various events.
I see what's happening now and it was very easy to reproduce. That's easy enough to fix, so I'll add it in next time I do plugin stuff. Thanks for catching it!
 
Last edited:

Latest Threads

Latest Profile Posts

seems absolutely WILD to me now all the hundreds of hours of work I used to do in 2k(3) over a decade ago with a resolution of 320x240. that seems so insanely TINY now, seemed so normal at the time!
Playing Aroma Indosiar theme song.
Aroma is an Indonesian TV show about cooking. :)
Working on a characteeer! (Why is it so hard to color hair?) ;-;
Silly-Sketches.png
Just finished eventing a couple simple puzzles in RMMV, for my very first game "Sample Quest." Just messing around, throwing things together, and calling it a story XD On a non-RM note, got my hair cut today!
I feel the need to inform everyone on the forums NOT to go with Web Hosting Canada for your hosting needs. It is by far the worst customer service and just overall experience I have ever had with hosting and I am Canadian...

Forum statistics

Threads
115,373
Messages
1,089,359
Members
150,071
Latest member
qwertyuiopasdfghjkl
Top