OcRam - Lights plugin (for MV)

Beachsidey0

Villager
Member
Joined
Jun 3, 2020
Messages
15
Reaction score
2
First Language
English
Primarily Uses
RMMV
So the fix would just be to edit the script in the WeightGainSystem.js plugin than right or is there a way to make the script call for it later. I made a clean project with just the WeightGainSystem.js in and the transfer event worked fine, than added Oc ram lights and same error. I than edited the WeightGainSystem plugin and just removed the Game_Event section and the transfer worked fine with your light plugin. I'm assuming when i make the transfer event I would need to just get the code to load after the light plugin and it should fix the problem or I could just not have that section of code.
 
Last edited:

OcRam

Servant of the Universe
Veteran
Joined
Aug 2, 2016
Messages
597
Reaction score
711
First Language
Finnish
Primarily Uses
RMMZ
So the fix would just be to edit the script in the WeightGainSystem.js plugin than right or is there a way to make the script call for it later. I made a clean project with just the WeightGainSystem.js in and the transfer event worked fine, than added Oc ram lights and same error. I than edited the WeightGainSystem plugin and just removed the Game_Event section and the transfer worked fine with your light plugin. I'm assuming when i make the transfer event I would need to just get the code to load after the light plugin and it should fix the problem or I could just not have that section of code.
I would make simple check just before line 749.

Code:
if (!page) return;
 

Roult

Veteran
Veteran
Joined
Oct 25, 2015
Messages
34
Reaction score
4
Hello Ocram,

Can I put a custom light on enemies and characters in battle?

Thank
 
Last edited:

OcRam

Servant of the Universe
Veteran
Joined
Aug 2, 2016
Messages
597
Reaction score
711
First Language
Finnish
Primarily Uses
RMMZ
Hello Ocram,

Can I put a custom light on enemies and characters in battle?

Thank
Hi and thank you for the message,

There are no individual lights in battle - only right and left light sources.
 

OpenTangent

Villager
Member
Joined
Mar 15, 2020
Messages
13
Reaction score
3
First Language
English
Primarily Uses
RMMV
How do I disable lighting during battle? I want full brightness
 

OcRam

Servant of the Universe
Veteran
Joined
Aug 2, 2016
Messages
597
Reaction score
711
First Language
Finnish
Primarily Uses
RMMZ
How do I disable lighting during battle? I want full brightness
Thank you for the message,

This should work at the start of the battle:
* Plugin command * light_bg #ffffffff

Then after battle restore original bg color.
 

Warpholomey

Villager
Member
Joined
Aug 19, 2020
Messages
6
Reaction score
3
First Language
Russian
Primarily Uses
RMMV
Hi, OcRam!
First of all, I want to thank you for the amazing plugin you made.

I think I found a bug with terrain lights. How to reproduce:

Create a new project.
Create two maps, make a transition between them.
Place the player on map 1 and any tile on map 2.
Change terrain tag of that tile to 1 and add terrain light to that tag via tileset's note:
<light1:5:256:#ccccff>
Tint the screen on the first map in any way.

Now, when you move from the first map to the second, the tile will not glow.
The problem is that the code $gameMap.initTerrainLights(); is called twice for some reason and the array _tileMapNotations is filled with nulls before it is filled with the correct elements. So the second condition inside setupTerrainLightByTag will always be false.

As a quick patch, you can add _tileMapNotations.length = 0; before for (var i = 0; i < 8; i++) { on line 1525, but you certainly know better why the double call occurs.

If necessary, I can attach an archive with the project here. RPG Maker MV version 1.6.2.
 
Last edited:

OcRam

Servant of the Universe
Veteran
Joined
Aug 2, 2016
Messages
597
Reaction score
711
First Language
Finnish
Primarily Uses
RMMZ
Hi, OcRam!
First of all, I want to thank you for the amazing plugin you made.

I think I found a bug with terrain lights. How to reproduce:

Create a new project.
Create two maps, make a transition between them.
Place the player on map 1 and any tile on map 2.
Change terrain tag of that tile to 1 and add terrain light to that tag via tileset's note:
<light1:5:256:#ccccff>
Tint the screen on the first map in any way.

Now, when you move from the first map to the second, the tile will not glow.
The problem is that the code $gameMap.initTerrainLights(); is called twice for some reason and the array _tileMapNotations is filled with nulls before it is filled with the correct elements. So the second condition inside setupTerrainLightByTag will always be false.

As a quick patch, you can add _tileMapNotations.length = 0; before for (var i = 0; i < 8; i++) { on line 1525, but you certainly know better why the double call occurs.

If necessary, I can attach an archive with the project here. RPG Maker MV version 1.6.2.
Thank you for the message,

Are you using light_bg plugins command for tint? Because built-in tint won't show any kind of light sources. And thank you for the compliments :)
 

Kupotepo

Fantasy realist/ Forum Reactor‍/ Advocatus Diaboli
Veteran
Joined
Jul 5, 2017
Messages
1,908
Reaction score
1,981
First Language
Thai
Primarily Uses
RMMV
Would you consider converting your light plugin into MZ? I do not see the light effect plugin yet. Thank you for considering.
 

OcRam

Servant of the Universe
Veteran
Joined
Aug 2, 2016
Messages
597
Reaction score
711
First Language
Finnish
Primarily Uses
RMMZ

Warpholomey

Villager
Member
Joined
Aug 19, 2020
Messages
6
Reaction score
3
First Language
Russian
Primarily Uses
RMMV
Are you using light_bg plugins command for tint?
Yes of course. It is very easy to reproduce. If you start on a map with light sources declared through tiles, and then go to another map without them, then there will be light on the first map. If you start on a map without light sources, and then go to a map with them, then they will not work.

It looks exactly like the list of terrain light sources (declared through note field of tileset) is not updated correctly when switching between maps.
 

41728280

Veteran
Veteran
Joined
May 31, 2020
Messages
239
Reaction score
71
First Language
Chinese
Primarily Uses
RMMV
hi, OcRam. Will you make a compatible patch for Ultra Mode 7?
 

OcRam

Servant of the Universe
Veteran
Joined
Aug 2, 2016
Messages
597
Reaction score
711
First Language
Finnish
Primarily Uses
RMMZ
hi, OcRam. Will you make a compatible patch for Ultra Mode 7?
Thank you for the message,

I took a look at this and it would require understanding UltraMode7 script quite deeply. I simply don't have time for this at the moment.

@Warpholomey what version of OcRam_Lights -plugin you are using? Because I couldn't re-produce that in my demo -project for some reason.
 

Warpholomey

Villager
Member
Joined
Aug 19, 2020
Messages
6
Reaction score
3
First Language
Russian
Primarily Uses
RMMV
what version of OcRam_Lights -plugin you are using? Because I couldn't re-produce that in my demo -project for some reason.
Version 2.10. Here, I reproduced this in an empty project that I attach to the post (you just need to add the standard /img/ and /audio/ folders from RPG Maker MV 1.6.2).

Go from map one to map two: stained-glass window will not glow, although it has a terrain tag and the tileset has a note with lighting settings.
Try adding _tileMapNotations.length = 0; before for (var i = 0; i < 8; i++) { on line 1525 in OcRam_Lights.js — everything will work as it should.
 

Attachments

OcRam

Servant of the Universe
Veteran
Joined
Aug 2, 2016
Messages
597
Reaction score
711
First Language
Finnish
Primarily Uses
RMMZ
Version 2.10. Here, I reproduced this in an empty project that I attach to the post (you just need to add the standard /img/ and /audio/ folders from RPG Maker MV 1.6.2).

Go from map one to map two: stained-glass window will not glow, although it has a terrain tag and the tileset has a note with lighting settings.
Try adding _tileMapNotations.length = 0; before for (var i = 0; i < 8; i++) { on line 1525 in OcRam_Lights.js — everything will work as it should.
Thank you for the message,

Here is also empty project (RMMV 1.6.2) with OcRam_Lights v2.10 and terrain lights works without any problems... Can you confirm it's working on your environment?

Edit: Also requires audio, img etc... default media folders
 

Attachments

41728280

Veteran
Veteran
Joined
May 31, 2020
Messages
239
Reaction score
71
First Language
Chinese
Primarily Uses
RMMV
Thank you for the message,

I took a look at this and it would require understanding UltraMode7 script quite deeply. I simply don't have time for this at the moment.
Oh, this is really sad, hope it will come true one day!
 

Users Who Are Viewing This Thread (Users: 0, Guests: 2)

Latest Threads

Latest Profile Posts

I'm back from my visit to my family. Was really great to see them again after a year even if I had to get tested for covid for the visit.
Sometimes... I do absolutely genius things... But then I counteract that by spending all day trying to figure out what's wrong with my event creator... Only to learn I commented out some lines in MV... Not even in my plugin. This must be why villains "true heroes" don't win in the end. :kaoswt:
Procrastination at it's finest.
annnnd after 2 days lol... and I still feel I need to work out a few kinks

Forum statistics

Threads
104,262
Messages
1,005,061
Members
135,772
Latest member
changefly
Top