Warpholomey

Villager
Member
Joined
Aug 19, 2020
Messages
8
Reaction score
5
First Language
Russian
Primarily Uses
RMMV
Can you confirm it's working on your environment?
Yes, everything works in this project. To reproduce the bug you need to change the tileset of the starting map to any other than the tileset on which the light is declared.
 

Attachments

  • 01.png
    01.png
    130.7 KB · Views: 14
  • 02.png
    02.png
    229.3 KB · Views: 15
  • 03.png
    03.png
    308.3 KB · Views: 15

OcRam

Servant of the Universe
Veteran
Joined
Aug 2, 2016
Messages
728
Reaction score
853
First Language
Finnish
Primarily Uses
RMMZ
Yes, everything works in this project. To reproduce the bug you need to change the tileset of the starting map to any other than the tileset on which the light is declared.
Thanks for the clarification!
I will try to fix it later today.
 

OcRam

Servant of the Universe
Veteran
Joined
Aug 2, 2016
Messages
728
Reaction score
853
First Language
Finnish
Primarily Uses
RMMZ
Latest version of OcRam_Lights is now available!

v2.11 Terrain lights are now properly initialized (Credits to @Warpholomey )
 

kakatototo

Warper
Member
Joined
Sep 14, 2020
Messages
4
Reaction score
0
First Language
japan
Primarily Uses
RMMZ
First: Thanks for the great plugin.

My request is that it would be nice to be able to set the Z axis for Lighting. Because sometimes I want a light in the background of the actor.
If you already have that feature, please let me know how.

Also, I'm setting Layer to Highest in the YEP_GridFreeDoodads plugin, but this Lighting plugin comes up higher.
 

Warpholomey

Villager
Member
Joined
Aug 19, 2020
Messages
8
Reaction score
5
First Language
Russian
Primarily Uses
RMMV
@OcRam, hi again!
Is it possible to make background light is not applied to parallax?
I'm working on a night map (which itself is quite dark and illuminated by lanterns), but I use a city panorama as a parallax — I wish the background light didn't affect it (didn't make it darker), so that I can manually draw bright lights on it.
Is it possible to achieve this somehow?
 

OcRam

Servant of the Universe
Veteran
Joined
Aug 2, 2016
Messages
728
Reaction score
853
First Language
Finnish
Primarily Uses
RMMZ
First: Thanks for the great plugin.

My request is that it would be nice to be able to set the Z axis for Lighting. Because sometimes I want a light in the background of the actor.
If you already have that feature, please let me know how.

Also, I'm setting Layer to Highest in the YEP_GridFreeDoodads plugin, but this Lighting plugin comes up higher.
@OcRam, hi again!
Is it possible to make background light is not applied to parallax?
I'm working on a night map (which itself is quite dark and illuminated by lanterns), but I use a city panorama as a parallax — I wish the background light didn't affect it (didn't make it darker), so that I can manually draw bright lights on it.
Is it possible to achieve this somehow?
Thank you for the messages,

Light layer is indeed highest of 'em all and there's little I can do about it with out breaking things up. This is also the case with parallax backgrounds. I have solved this issue (too dark backgrounds) with editing backgrounds brightness to brighter.
 

Warpholomey

Villager
Member
Joined
Aug 19, 2020
Messages
8
Reaction score
5
First Language
Russian
Primarily Uses
RMMV
Thank you for the messages,

Light layer is indeed highest of 'em all and there's little I can do about it with out breaking things up. This is also the case with parallax backgrounds. I have solved this issue (too dark backgrounds) with editing backgrounds brightness to brighter.

I was able to achieve the effect I wanted by adding a custom mask to the darkening code.
Something like this:

JavaScript:
    OcRam_Light_Layer.prototype.updateMapLights = function () {

        this.clearLightLayer(); // Remove old sprites (light sources)
        if (_tintBG === '') return; // No lights...

        // Draw light layer background
        var c = this._bg.canvas; var ctx = c.getContext("2d");
        ctx.globalCompositeOperation = 'copy';
        this._bg.fillRect(0, 0, this._width, this._height, _tintBG);

        // ===============
        // Applying masks:
        // ===============
        ctx.globalCompositeOperation = "source-over";
        $gameMap._events.forEach(ev => {
            if (ev !== null) {
                if (ev._lightningMaskBitmap === undefined) {
                    const e = ev.event();
                    if (e.note.match(/<(?:MASK):(.*)>/i)) {
                        ev._lightningMaskBitmap = ImageManager.loadPicture(RegExp.$1);
                    } else {
                        ev._lightningMaskBitmap = "";
                    }
                }

                if (ev._lightningMaskBitmap !== undefined && ev._lightningMaskBitmap !== "") {
                    this._bg.bltImage(
                        ev._lightningMaskBitmap,
                        0,
                        0,
                        ev._lightningMaskBitmap.width,
                        ev._lightningMaskBitmap.height,
                        _margin + Math.round($gameMap.adjustX_OC(ev._realX) * OcRam.twh[0]),
                        _margin + Math.round($gameMap.adjustY_OC(ev._realY) * OcRam.twh[1]));
                }
            }
        });

This allows to put an event on the map, which will apply the specified mask to the darkened area, so that some part remains light.

I don't think that should be added to the plugin itself — it's still a very specific task, but if it seems like a good idea to you, it would be great if you make it a built-in feature.
 

Attachments

  • Mask01.png
    Mask01.png
    289.4 KB · Views: 17

41728280

Veteran
Veteran
Joined
May 31, 2020
Messages
240
Reaction score
73
First Language
Chinese
Primarily Uses
RMMV
Hi! OcRam.
I use the plugin command light_followers 5 150 #ffeeaa88
The follower’s lighting control is processed in parallel through public events, but there is a bug,
I changed the maximum battle member and follower member to 5 through YEP_PartySystem (to be precise, or change the Max Battle Members to more than 4 through any code or plugin)
When you save the file when the lighting system is started, and then read the file, an error will occur. It seems that the follower’s lights cannot be updated correctly. This is also true in your demo. Can you fix it? Or can you add the control of the follower's light in the plug-in parameters?

·Error screenshot
QQ截图20200921210424.png
 

Flanxei

Veteran
Veteran
Joined
Apr 27, 2015
Messages
36
Reaction score
12
First Language
English
Primarily Uses
RMMV
I'm not sure if anyone has pointed it out yet, but Light option number 4 doesn't seem to be flickering at all. I've tried it out on the demo, a new project, and a current project I'm working on. 4 just seems to work the same as option 1.
 

OcRam

Servant of the Universe
Veteran
Joined
Aug 2, 2016
Messages
728
Reaction score
853
First Language
Finnish
Primarily Uses
RMMZ
Hi! OcRam.
I use the plugin command light_followers 5 150 #ffeeaa88
The follower’s lighting control is processed in parallel through public events, but there is a bug,
I changed the maximum battle member and follower member to 5 through YEP_PartySystem (to be precise, or change the Max Battle Members to more than 4 through any code or plugin)
When you save the file when the lighting system is started, and then read the file, an error will occur. It seems that the follower’s lights cannot be updated correctly. This is also true in your demo. Can you fix it? Or can you add the control of the follower's light in the plug-in parameters?

·Error screenshot
View attachment 161396
I'm not sure if anyone has pointed it out yet, but Light option number 4 doesn't seem to be flickering at all. I've tried it out on the demo, a new project, and a current project I'm working on. 4 just seems to work the same as option 1.
First of all thank you for your messages!

And sorry for the late answer - I have been busy with my RMMZ demo project, but now that it's done I can focus to MV again.

I need download links to plugins which needs compatibility patch. Then I take look at it. Usually compatibility patches ain't that hard to do, but if it takes longer than 4-6 hours I prefer to use that time on my MZ -plugins.

@Flanxei I'll take look at this bug ASAP
EDIT: And it's now updated to v2.12 ;p
 
Last edited:

41728280

Veteran
Veteran
Joined
May 31, 2020
Messages
240
Reaction score
73
First Language
Chinese
Primarily Uses
RMMV
It is not related to any plug-ins, I just made a simple code. Make the fighting members more than 4.
JavaScript:
Game_Party.prototype.maxBattleMembers = function() {
return 5;
};

Then turn on the lights of all followers, and after saving, an error will occur when reading.
It does not seem to support follower lights with more than 4 people
 

Chaos17

Dreamer
Veteran
Joined
Mar 13, 2012
Messages
1,311
Reaction score
486
First Language
French
Hello @OcRam

I just tried your plugin in a new project and I got this error when I tried the command to darken my map.

Bbs7Rnc.png

2gLaJzQ.png

.
i2iy7W0.png
 
Last edited:

NBGDani

Villager
Member
Joined
Dec 24, 2016
Messages
19
Reaction score
0
Primarily Uses
N/A
Have the same Problem. Plugin is on, did the Plugin Command with light_bg and then on a event <light...> but nothing happen :(
 

OcRam

Servant of the Universe
Veteran
Joined
Aug 2, 2016
Messages
728
Reaction score
853
First Language
Finnish
Primarily Uses
RMMZ
It is not related to any plug-ins, I just made a simple code. Make the fighting members more than 4.
JavaScript:
Game_Party.prototype.maxBattleMembers = function() {
return 5;
};

Then turn on the lights of all followers, and after saving, an error will occur when reading.
It does not seem to support follower lights with more than 4 people
Hello @OcRam

I just tried your plugin in a new project and I got this error when I tried the command to darken my map.

Bbs7Rnc.png

2gLaJzQ.png

.
i2iy7W0.png
Have the same Problem. Plugin is on, did the Plugin Command with light_bg and then on a event <light...> but nothing happen :(
Thank you for the messages,

I have tried this plugin in new project without any of mentioned problems. What is the version of rpg_core.js in it?
 

OcRam

Servant of the Universe
Veteran
Joined
Aug 2, 2016
Messages
728
Reaction score
853
First Language
Finnish
Primarily Uses
RMMZ
1.6.2 - its the newest one.
Can you send screen shot of light_bg event and the light source event where <light...> tag is?
 

41728280

Veteran
Veteran
Joined
May 31, 2020
Messages
240
Reaction score
73
First Language
Chinese
Primarily Uses
RMMV
It is not related to any plug-ins, I just made a simple code. Make the fighting members more than 4.
JavaScript:
Game_Party.prototype.maxBattleMembers = function() {
return 5;
};

Then turn on the lights of all followers, and after saving, an error will occur when reading.
It does not seem to support follower lights with more than 4 people
I am using 1.6.1
And it's experimented in your demo. As long as maxBattleMembers exceeds 4
At night, use the plug-in command light_followers 5 150 #ffeeaa88 to turn on the lights of all followers. And save the game at this time. Then read this archive, an error will occur.
In addition, I did not have the problem mentioned by the above friends, I used the plug-in command light_bg #303040ff 1 to change the light background without any errors. But after using the plug-in command to replace the background light, the background light no longer automatically switches according to the time systemo_O
 

OcRam

Servant of the Universe
Veteran
Joined
Aug 2, 2016
Messages
728
Reaction score
853
First Language
Finnish
Primarily Uses
RMMZ
I am using 1.6.1
And it's experimented in your demo. As long as maxBattleMembers exceeds 4
At night, use the plug-in command light_followers 5 150 #ffeeaa88 to turn on the lights of all followers. And save the game at this time. Then read this archive, an error will occur.
In addition, I did not have the problem mentioned by the above friends, I used the plug-in command light_bg #303040ff 1 to change the light background without any errors. But after using the plug-in command to replace the background light, the background light no longer automatically switches according to the time systemo_O
Thank you for the additional info. I will re-check maxBattleMembers case.

And if light_bg is used it will override any tints made by time system (until player is transfered to another map).
 

OcRam

Servant of the Universe
Veteran
Joined
Aug 2, 2016
Messages
728
Reaction score
853
First Language
Finnish
Primarily Uses
RMMZ
Ok now I managed to replicate "maxBattleMembers" issue and its now fixed in OcRam_Lights v2.13!

I actually had to add 1 extra member :rolleyes:

Thank you @41728280 for reporting this!
 

41728280

Veteran
Veteran
Joined
May 31, 2020
Messages
240
Reaction score
73
First Language
Chinese
Primarily Uses
RMMV
Thanks for your fix, the archive can now be read correctly:thumbsup-left:
 

Latest Threads

Latest Posts

Latest Profile Posts

*le typical company rebranding that changes and adds absolutely nothing has arrived
Degica Games has become Komodo! Be sure to read more at the link below.

DarkAdria wrote on  Masked 's profile.
Hello, sorry to bother you. I have tried to send you a private message, but it indicates that due to the privacy settings it is not possible.
Some time ago, I finished my project and made a port for Android. Because the original idea was to play the game with a keyboard on PC, playing it with a mouse caused some bugs. (max 420 characters)...
Another day, Another migraine, I found out that the game is broken about the .... Stuff.... Im not best at coding and, I got this billion error, so no choice, I think the error is from Yanfly's SkillMastery...... Fixing it...

Forum statistics

Threads
112,385
Messages
1,067,972
Members
146,039
Latest member
soniapunch
Top