OcRam - Lights plugin

Beachsidey0

Villager
Member
Joined
Jun 3, 2020
Messages
9
Reaction score
1
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
570
Reaction score
685
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
33
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
570
Reaction score
685
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
10
Reaction score
1
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
570
Reaction score
685
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

Warper
Member
Joined
Aug 19, 2020
Messages
4
Reaction score
0
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
570
Reaction score
685
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‍
Veteran
Joined
Jul 5, 2017
Messages
1,782
Reaction score
1,793
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
570
Reaction score
685
First Language
Finnish
Primarily Uses
RMMZ

Warpholomey

Warper
Member
Joined
Aug 19, 2020
Messages
4
Reaction score
0
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
197
Reaction score
52
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
570
Reaction score
685
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

Warper
Member
Joined
Aug 19, 2020
Messages
4
Reaction score
0
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
570
Reaction score
685
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
197
Reaction score
52
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 Posts

Latest Profile Posts

Recent threads, and my very poor algorithm for my minimap plugin have made me face the fact that I need to review algorithms and such.

Going through Cracking the Coding Interview now. I am so excited.
Kes
I've seen a reference to a Community Lighting plugin for MZ, but cannot find it. Is it still in beta?

Todo:
Add fog of war
Add enemy indicators
Make window draggable
Optimise map drawing algorithm (5 seconds to load the map you see, so it's a... poo-poo algorithm)

Any suggestions? :kaoblush:
bleh studio hell job haha at least they like it didnt had time to do much laundry tho ;w;'....YES I DO AT LEAST TAKE A SHOWER everyday!
Ami
--- Food Ingredients ---

Hero: Since the Chef are in Hospital,we can't eat his Dish in 3 Days.
F.Mage: What we have to Eat?
M.Healer: Don't worry,we can Eat the Food Ingredients.
Hero & F.Mage
: Really?

(3 Days Later)

Chef: Hi,Guys. I'm Ba---
(Entire Party Collapse After Eat Raw Meat)
Chef: Wha...WHAT GOING ON HERE!!!!!!

Forum statistics

Threads
102,913
Messages
995,914
Members
134,361
Latest member
cribo65
Top