belatucadrus

Veteran
Veteran
Joined
Mar 6, 2017
Messages
127
Reaction score
18
First Language
french
Primarily Uses
RMMV
Yeah sorry, I figured it out. Your plugin is amazing, and I'm trying my best to understand it.
I've read the help section multiple times but until now I've only used simple lights systems, yours looks very complete, and I'm sure I can achieve great things with it.

Sorry to bother you with another question but I think I understand your plugin command tints the entire screen with an absolute value rather than a relative one, but is there a workaround for overlays ? My fogs and overlays gets tinted too and I went from this :

To this :


Hi !

I'm still stuck with this issue, and while searching for a solution I have a suggestion

Do you have any plans to implement light overlays in your plugin ?

Say we could use monochromatic images like these :

lights.png

And we could use the white part as a light overlay using the same tinting process as your plugin. That would solve the light overlay getting tinted along with the screen. Would that be possible ? I don't know
 

OcRam

Servant of the Universe
Veteran
Joined
Aug 2, 2016
Messages
741
Reaction score
870
First Language
Finnish
Primarily Uses
RMMZ
Hi !

I'm still stuck with this issue, and while searching for a solution I have a suggestion

Do you have any plans to implement light overlays in your plugin ?

Say we could use monochromatic images like these :

View attachment 164566

And we could use the white part as a light overlay using the same tinting process as your plugin. That would solve the light overlay getting tinted along with the screen. Would that be possible ? I don't know
Thank you for the message,

How do you draw that overlay at the moment?
 

belatucadrus

Veteran
Veteran
Joined
Mar 6, 2017
Messages
127
Reaction score
18
First Language
french
Primarily Uses
RMMV
Thank you for the message,

How do you draw that overlay at the moment?

I'm using Victor Engine's Fog & Overlay plugin. The plugin lets me set the depth of the overlay (from "above parallaxes" to "above animations". But even if I set my overlay depth tp 0 (above animations) the Light Layer is on top of that, resulting in what you see
 

OcRam

Servant of the Universe
Veteran
Joined
Aug 2, 2016
Messages
741
Reaction score
870
First Language
Finnish
Primarily Uses
RMMZ
I'm using Victor Engine's Fog & Overlay plugin. The plugin lets me set the depth of the overlay (from "above parallaxes" to "above animations". But even if I set my overlay depth tp 0 (above animations) the Light Layer is on top of that, resulting in what you see
I used engines own "Show picture" command and it was looking really good. Didn't mess any original colors I had.

Blend mode "Additive" is crucial for this also changed opacity and then tinted it to desired color.
 

tenac666

Veteran
Veteran
Joined
Apr 11, 2020
Messages
77
Reaction score
6
First Language
English
Primarily Uses
RMMV
I downloaded this big project with all scripts by OcRam but it unfortunetly it still dosent help becouse Im interesing only on lighting system but in this demo it dosent work without time system and I don't now how to delate that. I think better will if every script will by on one map with full view of possibilites. Anyonehave some demo only with lighting system?
 

OcRam

Servant of the Universe
Veteran
Joined
Aug 2, 2016
Messages
741
Reaction score
870
First Language
Finnish
Primarily Uses
RMMZ
I downloaded this big project with all scripts by OcRam but it unfortunetly it still dosent help becouse Im interesing only on lighting system but in this demo it dosent work without time system and I don't now how to delate that. I think better will if every script will by on one map with full view of possibilites. Anyonehave some demo only with lighting system?
Thank you for the message,

There is "Cellar" map in demo project which doesn't care about Time_System. 1st thing is to set light_bg without it lights won't show up (since it's kind of day time and you can't see lights at day light).
 

Moon_Haven

Veteran
Veteran
Joined
May 5, 2020
Messages
191
Reaction score
85
First Language
French
Primarily Uses
RMMV
I've just installed this plugin, please bear with me as I'm learning how it works and will probably have lots of noob questions.

Is there a way to set a default indoor light instead of having an event for each indoor map that calls Plugin Command: light_bg #333541? Reasons I'm asking are:

1- Every interior in my game will be very dark (almost pitch black) and I'd prefer not having to call an event every time a player transition to an indoor map.

2- I have a lot of transfer player event inside the same indoor map. Going from main floor of an inn to its basement for instance, will transfer the player after they open the door. It seems that transferring the player resets the bg_light, so I have to have a Plugin Command on every door... this is going to be a bit tedious, but not impossible.

Thanks in advance!
 
Last edited:

belatucadrus

Veteran
Veteran
Joined
Mar 6, 2017
Messages
127
Reaction score
18
First Language
french
Primarily Uses
RMMV
I used engines own "Show picture" command and it was looking really good. Didn't mess any original colors I had.

Blend mode "Additive" is crucial for this also changed opacity and then tinted it to desired color.

Sorry for the late reply. I'm more active on discord than on the forums. I managed to make it work using your advice and some GIMP filters, thank you.

I came back here for another reason though. I discovered something odd while making my game. It looks like your plugin keeps light data from the previous save when starting a new game.

To make it short, I am testing a sewer map, started a new game, spawned outside the sewer (forest, daylight), I died in the sewer, so I started a new game again, and the forest was dark, like if I were in the sewer

I could reproduce the bug in your demo project by starting a project, changing the lights (e.g pulsating light player), returning to Title and start a new game again.
 

OcRam

Servant of the Universe
Veteran
Joined
Aug 2, 2016
Messages
741
Reaction score
870
First Language
Finnish
Primarily Uses
RMMZ
Sorry for the late reply. I'm more active on discord than on the forums. I managed to make it work using your advice and some GIMP filters, thank you.

I came back here for another reason though. I discovered something odd while making my game. It looks like your plugin keeps light data from the previous save when starting a new game.



I could reproduce the bug in your demo project by starting a project, changing the lights (e.g pulsating light player), returning to Title and start a new game again.
Thank you for the report!

Issue you described has been now fixed in OcRam_Lights v2.14 (resets player and follower light data properly after game over, goto title etc...)


I've just installed this plugin, please bear with me as I'm learning how it works and will probably have lots of noob questions.

Is there a way to set a default indoor light instead of having an event for each indoor map that calls Plugin Command: light_bg #333541? Reasons I'm asking are:

1- Every interior in my game will be very dark (almost pitch black) and I'd prefer not having to call an event every time a player transition to an indoor map.

2- I have a lot of transfer player event inside the same indoor map. Going from main floor of an inn to its basement for instance, will transfer the player after they open the door. It seems that transferring the player resets the bg_light, so I have to have a Plugin Command on every door... this is going to be a bit tedious, but not impossible.

Thanks in advance!

@Moon_Haven this is a good idea! I will add this to my todo list.
 
Last edited:

Moon_Haven

Veteran
Veteran
Joined
May 5, 2020
Messages
191
Reaction score
85
First Language
French
Primarily Uses
RMMV
Hi @OcRam, I'm wondering how much trouble would it be to change the way the day-->night transition works (and if you would even consider working on it).

What I have found is that the transition is tied to a timer. This means if you are outside, you will see the transition happen over the course of the set duration of that timer. However, if you are to walk inside and then back outside while this timer is going on, then it seems the transition timer is lost (reset or completed).

Is there a way to tie the transition directly to the timer, so that if the player goes in and out of a building, it will not affect the timer, and the transition will resume where it should?

English is not my first language, so it's a bit hard for me to explain. Let me try to illustrate.


Currently, we have a transition (let's say 1000 ticks) that spans from night (dark) to dawn (light)
1606904216776.png


If the character walks inside, then walks outside while the timer is going, we would expect the transition to resume back (bar at the top). But what really happens is that the transition seems to be already completed (bar below).
1606904385596.png

Hope this makes sense?

Cheers!
 
Last edited:

OcRam

Servant of the Universe
Veteran
Joined
Aug 2, 2016
Messages
741
Reaction score
870
First Language
Finnish
Primarily Uses
RMMZ
Hi @OcRam, I'm wondering how much trouble would it be to change the way the day-->night transition works (and if you would even consider working on it).

What I have found is that the transition is tied to a timer. This means if you are outside, you will see the transition happen over the course of the set duration of that timer. However, if you are to walk inside and then back outside while this timer is going on, then it seems the transition timer is lost (reset or completed).

Is there a way to tie the transition directly to the timer, so that if the player goes in and out of a building, it will not affect the timer, and the transition will resume where it should?

English is not my first language, so it's a bit hard for me to explain. Let me try to illustrate.


Currently, we have a transition (let's say 1000 ticks) that spans from night (dark) to dawn (light)
View attachment 169569


If the character walks inside, then walks outside while the timer is going, we would expect the transition to resume back (bar at the top). But what really happens is that the transition seems to be already completed (bar below).
View attachment 169570

Hope this makes sense?

Cheers!
Thank you for the message,

I thought that myself when integrated with time system, but then considered amount of work vs. gain it would provide - I decided to clear all timers on scene terminate to avoid all kind of problems.

I know it would be doable with saving timers to variables etc., but like said work vs. gain was no go for this feature.
 

belatucadrus

Veteran
Veteran
Joined
Mar 6, 2017
Messages
127
Reaction score
18
First Language
french
Primarily Uses
RMMV
Hi @OcRam, I'm wondering how much trouble would it be to change the way the day-->night transition works (and if you would even consider working on it).

What I have found is that the transition is tied to a timer. This means if you are outside, you will see the transition happen over the course of the set duration of that timer. However, if you are to walk inside and then back outside while this timer is going on, then it seems the transition timer is lost (reset or completed).

Is there a way to tie the transition directly to the timer, so that if the player goes in and out of a building, it will not affect the timer, and the transition will resume where it should?

English is not my first language, so it's a bit hard for me to explain. Let me try to illustrate.


Currently, we have a transition (let's say 1000 ticks) that spans from night (dark) to dawn (light)
View attachment 169569


If the character walks inside, then walks outside while the timer is going, we would expect the transition to resume back (bar at the top). But what really happens is that the transition seems to be already completed (bar below).
View attachment 169570

Hope this makes sense?

Cheers!


Why not keep all the time system stuff but do the screen tinting yourself with common event?

You'd need two common events : One common event for a classic tinting system (variables for hours, and process tint transitions on specific hours). Except for that when a tinting process starts, you call Date.now(), you add the duration of your transition in miliseconds and store it into a variable.


The second common event, you call it everytime you change maps. It saves the current tint screen EXCEPT IF IT IS INDOORS and It checks if Date.now() is still inferior to the variable, and if it is, tints immediately the screen with the sored tint, and resume the tinting based on the difference between Date.now(),and your variable

I bet there's a script call where you can call OcRam's tint screen function. The duration may be in frames, your custom duration being in miliseconds, to convert to frames should be T x 0.06

Don't forget to floor, and it should be working

There would be some adjustment to do, but overall this seems to be a working trick
 

Moon_Haven

Veteran
Veteran
Joined
May 5, 2020
Messages
191
Reaction score
85
First Language
French
Primarily Uses
RMMV
I'm just dropping by to share that I've fixed my issue by manually setting up my light transition, instead of having the plugin handling them.

The way I have it working now is starting a transition when getting out, but adjusting the color and duration of that transition depending on time. If we're right at 6am, do a full 100% transition. If we're getting out at 6:30am, do half a transition (half the color already gone, and half the time).

I'm doing this by checking what time it is when getting outside, then apply a light transition depending on the minutes of the hour. With some quick math, I'm able to replicate the duration left of the transition.

6:00 am - This is 100% of transition (60 minutes), so a transition of 120 seconds.
6:10 am - This is 83% of transition (50 minutes), so a transition of 100 seconds.
6:20 am - This is 67% of transition (40 minutes), so a transition of 80 seconds.
6:30 am - This is 50% of transition (30 minutes), so a transition of 60 seconds.
6:40 am - This is 33% of transition (20 minutes), so a transition of 40 seconds.
6:50 am - This is 17% of transition (10 minutes), so a transition of 20 seconds.


I've then hard coded the color transition where it should be at. Finding the coloring for each slice of time was a bit tricky, but in a nutshell, I used this website to create my shades of transition.

1610453299307.png



Then I simply applied the hex color for each transition. It's not overly complex, just tedious:

1610453421623.png1610453421623.png
 
  • Like
Reactions: id0

OpenTangent

Veteran
Veteran
Joined
Mar 15, 2020
Messages
31
Reaction score
10
First Language
English
Primarily Uses
RMMV
Hi OcRam
At the start of a battle I use [light_bg #ffffffff] to fully light the battle, but after the battle ends the time system lighting no longer works until I change map. What code can I use to refresh the time system lighting after battle?
 

OcRam

Servant of the Universe
Veteran
Joined
Aug 2, 2016
Messages
741
Reaction score
870
First Language
Finnish
Primarily Uses
RMMZ
Thank you for the message,

Never thought forced light should be auto tinted... This is great idea and will add to next version. Add this function to OcRam_Lights somewhere plugins anonymous scope before last line: }.bind(OcRam.Lights)());
Code:
this.forceDayPhase = instant => {
    _prevDayPhase = -1; $gameMap._forcedTint_OC = false;
    triggerDayPhase(instant);
};

// Usage would be (instant tint): OcRam.Lights.forceDayPhase(true)
// Usage would be (faded tint): OcRam.Lights.forceDayPhase(false)
 

OpenTangent

Veteran
Veteran
Joined
Mar 15, 2020
Messages
31
Reaction score
10
First Language
English
Primarily Uses
RMMV
I was very confused for a minute and realised that you were not responding to me. Is there any way to return to day/night cycle after using [light_bg #ffffffff]?
 

OcRam

Servant of the Universe
Veteran
Joined
Aug 2, 2016
Messages
741
Reaction score
870
First Language
Finnish
Primarily Uses
RMMZ
I was very confused for a minute and realised that you were not responding to me. Is there any way to return to day/night cycle after using [light_bg #ffffffff]?
Hi, sorry for the confusion, actually I ment to respond so check my previous post. :kaoblush:
 

OpenTangent

Veteran
Veteran
Joined
Mar 15, 2020
Messages
31
Reaction score
10
First Language
English
Primarily Uses
RMMV
Oh you were responding to me :eswt:
I couldn't get it to work at first which is why I was confused, but found my error and it's working now. Thanks OcRam, really appreciate it
 

OpenTangent

Veteran
Veteran
Joined
Mar 15, 2020
Messages
31
Reaction score
10
First Language
English
Primarily Uses
RMMV
Thanks for the forceDayPhase() function, it gave me an idea to create a nightvision ability and it's working really well. However, it would be nice to explicitly set the fade speed in forceDayPhase() since my dayphase effect transition time is set to 960 frames which is far too long for turning night vision off. This isn't absolutely needed but would be nice to have a smooth transition between darkness and nightvision.

On another topic I am using isPlayerInLightRadius() as the basis of a thieving system. At the moment it is triggered before the player is lit. I would like to have it be more lenient so that it only returns true if the player is fully lit. Is there a way for me to do that? See example below:

LightRadius.png
 

Latest Threads

Latest Posts

Latest Profile Posts

having anxiety during all this virus stuff is the absolute worst. I'm the only one missing out on my friend's wedding in Sept. because I can't be in large groups of people anymore due to anxiety.
Well... I just spent most of the day making something I cant even use xD

Hero_1.png
The idea was to look at the original but at a medium distance.
In hindsight, I might as well have just edited the original lol... I didn't intend for it to end up so similar.
does anyone else feel tired after completing a sprite?
Fun fact: I always lower every tileset saturation (about 15%-25% of it) in my projects.
My today's performance in janitor work was so insane that my colleague suspected I was high on something.

Forum statistics

Threads
113,901
Messages
1,078,298
Members
147,998
Latest member
Deparchator3000
Top