Can you post a screenshot and you code? maybe there is a way
OcRam - Lights plugin (MZ/MV)
● ARCHIVED · READ-ONLY
-
-
Here you have 2 light sources with similar configuration
The fire is: <light:5:400:#ffe1a3>
and the cow is <light:5:400:#ffe1a3><light-ex:0,0:60:0:0>
I think the cow looks like brighter because of the visual effect of the segment of the circle, but the radius and the gradient are similar.
Then: I think your flashlight is using a bigger radius than your fire. Try using the same for both
--- EDITED LATER ---
Wait, I realised that you can play with the intensity of the light tricking with the startAt of the gradient and combining two light effects
Brown cow is
<light:5:400:#ffe1a3>
<light-ex:0,0:60:0:0:0.5>
<light:5:400:#ffe1a3>
<light-ex:0,0:60:0:0:0>
And white cow is
<light:5:400:#ffe1a3>
<light-ex:0,0:60:0:0:0>
That means that you can create a 360º flashlight this way and combine them, look how much brighter is the second fire now:
First fire is:
<light:5:400:#ffe1a3>
And second one is:
<light:5:400:#ffe1a3>
<light-ex:0,0:360:0:0:0.5>
<light:5:400:#ffe1a3>
<light-ex:0,0:360:0:0:0> -
Now I have a question.
I want a window white light to fade to red and stay like that until it become night and then fades. Im trying something like this, having in my system 6000 frames per hour:
Page 1 condition: hour >= 9
<light:1:550:#ece4b2>
<light-ex:0,-38:60:0:0>
Page 2 condition: hour >= 19
<light:1:550:[1000,#ece4b2,#F5801F,#F5801F,#F5801F,#F5801F]>
<light-ex:0,-38:60:0:0>
Page 3 condition: hour >= 20
<light:1:550:#F5801F>
<light-ex:0,-38:60:0:0>
Page 4 condition: hour >= 21
<light:1:550:[1000,#F5801F,#000000,#000000,#000000,#000000]>
<light-ex:0,-38:60:0:0>
Page 5 condition: hour >= 22
<light:1:550:#000000>
<light-ex:0,-38:60:0:0>
This is definitely not clean code and also it doesn't works well, at 20:00 the light becomes #ece4b2 again for some reason. Is there any other way to make it better? Thanks a lot in advance for you answers and thanks @OcRam for the amazing plugins -
Hey thats a nice trick, thanks ill use it! Btw I thought that StartAt meant the to choose a point to start a rotation for the light (rotate like a lighthouse). Thats what i had understood based on the plugin's Help description.Here you have 2 light sources with similar configuration
The fire is: <light:5:400:#ffe1a3>
and the cow is <light:5:400:#ffe1a3><light-ex:0,0:60:0:0>
I think the cow looks like brighter because of the visual effect of the segment of the circle, but the radius and the gradient are similar.
Then: I think your flashlight is using a bigger radius than your fire. Try using the same for both
--- EDITED LATER ---
Wait, I realised that you can play with the intensity of the light tricking with the startAt of the gradient and combining two light effects
Brown cow is
<light:5:400:#ffe1a3>
<light-ex:0,0:60:0:0:0.5>
<light:5:400:#ffe1a3>
<light-ex:0,0:60:0:0:0>
And white cow is
<light:5:400:#ffe1a3>
<light-ex:0,0:60:0:0:0>
View attachment 256689
That means that you can create a 360º flashlight this way and combine them, look how much brighter is the second fire now:
View attachment 256690
First fire is:
<light:5:400:#ffe1a3>
And second one is:
<light:5:400:#ffe1a3>
<light-ex:0,0:360:0:0:0.5>
<light:5:400:#ffe1a3>
Now I have a question.
I want a window white light to fade to red and stay like that until it become night and then fades. Im trying something like this, having in my system 6000 frames per hour:
Page 1 condition: hour >= 9
<light:1:550:#ece4b2>
<light-ex:0,-38:60:0:0>
Page 2 condition: hour >= 19
<light:1:550:[1000,#ece4b2,#F5801F,#F5801F,#F5801F,#F5801F]>
<light-ex:0,-38:60:0:0>
Page 3 condition: hour >= 20
<light:1:550:#F5801F>
<light-ex:0,-38:60:0:0>
Page 4 condition: hour >= 21
<light:1:550:[1000,#F5801F,#000000,#000000,#000000,#000000]>
<light-ex:0,-38:60:0:0>
Page 5 condition: hour >= 22
<light:1:550:#000000>
<light-ex:0,-38:60:0:0>
This is definitely not clean code and also it doesn't works well, at 20:00 the light becomes #ece4b2 again for some reason. Is there any other way to make it better? Thanks a lot in advance for you answers and thanks @OcRam for the amazing pluginsHere you have 2 light sources with similar configuration
The fire is: <light:5:400:#ffe1a3>
and the cow is <light:5:400:#ffe1a3><light-ex:0,0:60:0:0>
I think the cow looks like brighter because of the visual effect of the segment of the circle, but the radius and the gradient are similar.
Then: I think your flashlight is using a bigger radius than your fire. Try using the same for both
--- EDITED LATER ---
Wait, I realised that you can play with the intensity of the light tricking with the startAt of the gradient and combining two light effects
Brown cow is
<light:5:400:#ffe1a3>
<light-ex:0,0:60:0:0:0.5>
<light:5:400:#ffe1a3>
<light-ex:0,0:60:0:0:0>
And white cow is
<light:5:400:#ffe1a3>
<light-ex:0,0:60:0:0:0>
View attachment 256689
That means that you can create a 360º flashlight this way and combine them, look how much brighter is the second fire now:
View attachment 256690
First fire is:
<light:5:400:#ffe1a3>
And second one is:
<light:5:400:#ffe1a3>
<light-ex:0,0:360:0:0:0.5>
<light:5:400:#ffe1a3>
<light-ex:0,0:360:0:0:0> -
No, actually startAt makes the light to start far from source, to make more realistic flashlights, try it
The starting position of rotation is angle
This is startAt 0.2
-
Ah cool, its kinda like the OffsetX.No, actually startAt makes the light to start far from source, to make more realistic flashlights, try it
The starting position of rotation is angle
This is startAt 0.2
View attachment 256812
Would you happen to know how to make a gunflash occur when a weapon shoots? I've been looking for a way to do this with other lighting plugins but cant find the solution. -
I would definitely use the native animations for that, you can use them centered on an event or on a specific point in the screen
-
Thank you for the message and compliments,Now I have a question.
I want a window white light to fade to red and stay like that until it become night and then fades. Im trying something like this, having in my system 6000 frames per hour:
Page 1 condition: hour >= 9
<light:1:550:#ece4b2>
<light-ex:0,-38:60:0:0>
Page 2 condition: hour >= 19
<light:1:550:[1000,#ece4b2,#F5801F,#F5801F,#F5801F,#F5801F]>
<light-ex:0,-38:60:0:0>
Page 3 condition: hour >= 20
<light:1:550:#F5801F>
<light-ex:0,-38:60:0:0>
Page 4 condition: hour >= 21
<light:1:550:[1000,#F5801F,#000000,#000000,#000000,#000000]>
<light-ex:0,-38:60:0:0>
Page 5 condition: hour >= 22
<light:1:550:#000000>
<light-ex:0,-38:60:0:0>
This is definitely not clean code and also it doesn't works well, at 20:00 the light becomes #ece4b2 again for some reason. Is there any other way to make it better? Thanks a lot in advance for you answers and thanks @OcRam for the amazing plugins
At 20:00 it becomes #ece4b2 again probably because "[1000,#ece4b2,#F5801F,#F5801F,#F5801F,#F5801F]" will rotate these colors and every 5th time it's #ece4b2
I will try to make proper light color fading feature to next release after I've finished dynamic shadows, but sadly ATM I have zero dev time due IRL things.
Syntax probably will be something like this:
<light:type:radius:color-or-colors:fade-in-time>
example <light:1:550:#F5801F:1000> -
You mean the animations that come with the game? I tried with a Common Event but the animations have no lightingI would definitely use the native animations for that, you can use them centered on an event or on a specific point in the screen
-
Is it ok for you if I suggest some changes? I know this it not the most clean code possible and probably I'm stepping into what I was not called to.Thank you for the message and compliments,
At 20:00 it becomes #ece4b2 again probably because "[1000,#ece4b2,#F5801F,#F5801F,#F5801F,#F5801F]" will rotate these colors and every 5th time it's #ece4b2
I will try to make proper light color fading feature to next release after I've finished dynamic shadows, but sadly ATM I have zero dev time due IRL things.
Syntax probably will be something like this:
<light:type:radius:color-or-colors:fade-in-time>
example <light:1:550:#F5801F:1000>
But, something like [1000,#ff0000,#00ff00,#0000ff,hold]
could be a nice feature because you mantain the fading feature but deciding when to break it.
Then, something like this in the constructor to accept the parameter
Code:class Light_Data { constructor(light_type, light_color, radius, ex_params, terrain_light_obj, update_type) { // Init some stuff... let color = light_color; this._originalColor = color; this._colorIndex = 1; this._cycleCounter = 0; this._cycleFader = 0; if (light_color.indexOf("]") > 0) { this._multipleColors = []; light_color = light_color.replace("[", ""); light_color = light_color.replace("]", ""); const arr_tmp = light_color.split(","); color = arr_tmp[1]; for (let i = 1; i < arr_tmp.length; i++) { if(arr_tmp[i].toLowerCase()=="hold"){ this._multipleColors.push("hold"); }else{ this._multipleColors.push(OcRam.hexToRGBA(arr_tmp[i])); }
and then in the updateColorCycle, to stop the cycle
Code:updateColorCycle() { if (this._colorCount > 1) { // Pre-calculate color steps for faster processing! if (this._cycleCounter > this._cycleFader) { let target_color = this._multipleColors[this._colorIndex]; this._preCalcColorSteps = [ (target_color.r - this._currentColor.r) / this._cycleFader, (target_color.g - this._currentColor.g) / this._cycleFader, (target_color.b - this._currentColor.b) / this._cycleFader, (target_color.a - this._currentColor.a) / this._cycleFader ]; if(this._multipleColors[this._colorIndex]=="hold"){ this._colorCount=1; return; }
Sorry if this is not welcomed. Again, your plugins are amazing and I don't know how you find time to maintain them all. Congrats!!! -
Hi there! First thanks for the plugin!
Just a few questions.
First, how do i take off the water ligths?
Second, i have time and weather too, when i am indoors ligths work good when i tint the screen, and battle ligths too.
Overworld, same, all work fine
Then in a map that is just an normal outside, ligth work food, but battle ligth is not on, all is dark, even with a background.
How do i fix it?
Thanks!! -
I don't understand what you ar asking, if you want ask me via PM in spanish (preguntame por mensaje privado en español))
-
Hi, how can I use both the light plugin and time plugin at the same time? I want everything to pitch black using tintscreen -255 -255 -255 because I want night time to be like that while I have some light on, but is turning the light to black too?
Can someone help me how to make everything pitch black but the light still work? -
Hi,Hi, how can I use both the light plugin and time plugin at the same time? I want everything to pitch black using tintscreen -255 -255 -255 because I want night time to be like that while I have some light on, but is turning the light to black too?
Can someone help me how to make everything pitch black but the light still work?
If you want lights as clear as possible do not use OcRam_Time_System tinting at all. Instead use OcRam_Light BG #000000ff (for pitch black bg).
OcRam_Time_System tint is mainly used if there's no lights plugin involved, BUT you can use it conjuction with lights, if you wish to create subtle color effects on lights (like in my demo project). -
Alright, been struggling to find out if this is possible.
I want to completely negate the light around the edges. Any clear space as well as anything beyond the ceiling tiles basically. Is there a way to stop light from going beyond boundaries? Or a way to set areas to a black light overriding places I don't want the light to touch?
I know I have seen some variations of it in other plugins like this:
-
Thank you for the message,Alright, been struggling to find out if this is possible.
I want to completely negate the light around the edges. Any clear space as well as anything beyond the ceiling tiles basically. Is there a way to stop light from going beyond boundaries? Or a way to set areas to a black light overriding places I don't want the light to touch?
View attachment 321584
I know I have seen some variations of it in other plugins like this:
View attachment 321585
Yea this can be done easily, and actually I have already done this!
I'm making new plugin to extend OcRam_Lights called OcRam_Shadows. I have planned dynamic shadows AND sprite shadows in it!
Roof shadowing was the first thing I did there. If you wish I could release 0.1 version for you to test roof shadows only? And if you wish to use CUSTOM roof shadow masks (instead of automatic tile based ones) for each map I could prioritize that over other features.
And if you wish to test this it will require also beta versions for OcRam_Core and OcRam_Lights (maybe some others also, but I will send them all together if you are interested).
Commercial usage for OcRam_Shadows is planned to 5 EUR price category. -
Oh, cool, yeah! I'd be up for that! Been trying to get lighting just right and shadows have been the point i was struggling with because of how I'm doing the main large map haha. I'd certainly be interested in giving that a go!Thank you for the message,
Yea this can be done easily, and actually I have already done this!
I'm making new plugin to extend OcRam_Lights called OcRam_Shadows. I have planned dynamic shadows AND sprite shadows in it!
Roof shadowing was the first thing I did there. If you wish I could release 0.1 version for you to test roof shadows only? And if you wish to use CUSTOM roof shadow masks (instead of automatic tile based ones) for each map I could prioritize that over other features.
And if you wish to test this it will require also beta versions for OcRam_Core and OcRam_Lights (maybe some others also, but I will send them all together if you are interested).
Commercial usage for OcRam_Shadows is planned to 5 EUR price category. -
Experiencing a lot of lag during fights. I believe there is a conflict with either Orange Overlay or Yanfly Autosave.
As far as I can figure, the repro is something like this:
1. Load into a map that changes light_bg
2. Make a valid autosave
3. F5 (or restart)
4. Load that autosave
5. Get into battle scene
It persists through new reloads. I haven't seen any errors show up in the log with the debug option turned on. It seems to go away if I load into a new map that has different light_bg setting, from what I can tell. So I'm not sure if the save file is getting corrupted in some way.
My work around is that I made the event that sets the bg light a parallel event that switches between two imperceptibly different light settings every 5 ticks (#aaaaaaff and #aaaaaafe). That seems to work unless the player is trying to break saves by saving and loading super fast like some kind of QA tester. -
Hi,Experiencing a lot of lag during fights. I believe there is a conflict with either Orange Overlay or Yanfly Autosave.
As far as I can figure, the repro is something like this:
1. Load into a map that changes light_bg
2. Make a valid autosave
3. F5 (or restart)
4. Load that autosave
5. Get into battle scene
It persists through new reloads. I haven't seen any errors show up in the log with the debug option turned on. It seems to go away if I load into a new map that has different light_bg setting, from what I can tell. So I'm not sure if the save file is getting corrupted in some way.
My work around is that I made the event that sets the bg light a parallel event that switches between two imperceptibly different light settings every 5 ticks (#aaaaaaff and #aaaaaafe). That seems to work unless the player is trying to break saves by saving and loading super fast like some kind of QA tester.
I tried to repeat this on my demo -project, but everything worked smoothly. So if you turn off "Yanfly Autosave" and "Orange Overlay" it works in your project also? -
After a bit of testing it looks like it can be reproduced using Yanfly Save Core, and I can't seem to get the repro when that is disabled. I thought Autosave was the culprit but I guess it's just the base Save Core.Hi,
I tried to repeat this on my demo -project, but everything worked smoothly. So if you turn off "Yanfly Autosave" and "Orange Overlay" it works in your project also?
EDIT: I've been trying to reconstruct the conditions in a fresh project, adding plugins one by one. So far, no luck at all. Sorry this is a bit of a tangled mess for me.