- Joined
- Oct 8, 2020
- Messages
- 46
- Reaction score
- 5
- First Language
- English
- Primarily Uses
- RMVXA
Can you post a screenshot and you code? maybe there is a way
Can you post a screenshot and you code? maybe there is a way
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>
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
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
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>
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]));
}
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;
}