OcRam - Lights plugin [v2.06 updated 2020/05/21]

OcRam

Servant of the Universe
Veteran
Joined
Aug 2, 2016
Messages
472
Reaction score
563
First Language
Finnish
Primarily Uses
RMMV
@OcRam

Hello,

thank you for the great plugin.
I had previously used Khas Light Plugin. Unfortunately, it is apparently no longer compatible with the current MV version (bugs, also in the demo).

My question: I have not yet found an option for the walls here. So the light goes through the walls, or rather above.

Is there a chance that the light will be intercepted by the wall and maybe cast a shadow on the wall? Kha's plugin had such options.

If this option does not exist, will it be added to this great plugin? :)

Best regards
Feraleth
Thank you for the idea!

I'll see what can I do about it :)
 

jaxcap

Warper
Member
Joined
Nov 17, 2014
Messages
1
Reaction score
0
First Language
English
Primarily Uses
Awesome plugin, just letting you know that I found a possible bug: if your map's scroll type is set to loop in either direction, light sources near where the map loops turn off and then turn back on once you get far enough away from the loop point. This also happens with the light source around the player.
 

OcRam

Servant of the Universe
Veteran
Joined
Aug 2, 2016
Messages
472
Reaction score
563
First Language
Finnish
Primarily Uses
RMMV
Awesome plugin, just letting you know that I found a possible bug: if your map's scroll type is set to loop in either direction, light sources near where the map loops turn off and then turn back on once you get far enough away from the loop point. This also happens with the light source around the player.
Thank you for the report!

I'll fix this to next version.
 

Feraleth

Veteran
Veteran
Joined
Jun 19, 2019
Messages
51
Reaction score
8
First Language
German
Primarily Uses
RMMV
Thank you for the report!

I'll fix this to next version.
Cant wait for it! :)

Is it foreseeable whether the feature with the shadow will be included in the next version?
 

OcRam

Servant of the Universe
Veteran
Joined
Aug 2, 2016
Messages
472
Reaction score
563
First Language
Finnish
Primarily Uses
RMMV
Cant wait for it! :)

Is it foreseeable whether the feature with the shadow will be included in the next version?
Shadows are not in next version. Still figuring how I do it with minimal performance impact.
 

Faelim

Warper
Member
Joined
Mar 13, 2012
Messages
2
Reaction score
0
First Language
English
Primarily Uses
First off, just wanted to say that you've made an exceptional mod -- I'm definitely looking forward to using this in my future projects.

I wanted to reiterate the bug reported on Dec 21st. I had set up a scene where the player is a car, consistently moving towards the left on a scroll looped map while text plays (they just drive indefinitely). The light kept turning off and back on, so I believe it's the same issue as described by jaxcap.

As an aside, is there an ability to use the extra parameters on the player's light as well, or is that events only?
 

auxie

Warper
Member
Joined
Jun 25, 2017
Messages
2
Reaction score
2
First Language
English
Primarily Uses
RMMV
Hi OCram, your lighting plugin is awesome! Thank you, it has allowed me to implement a core mechanic that I otherwise wouldn't be able to do. I have one issue though... When using the light_player plugin command I can't turn the player light back on after turning it off.

I get the error:

TypeError: Cannot read property 'r' of null

the command that I am using is:

light_player 1 100 color:#444444ff

Thanks,
 

OcRam

Servant of the Universe
Veteran
Joined
Aug 2, 2016
Messages
472
Reaction score
563
First Language
Finnish
Primarily Uses
RMMV
Hi OCram, your lighting plugin is awesome! Thank you, it has allowed me to implement a core mechanic that I otherwise wouldn't be able to do. I have one issue though... When using the light_player plugin command I can't turn the player light back on after turning it off.

I get the error:

TypeError: Cannot read property 'r' of null

the command that I am using is:

light_player 1 100 color:#444444ff

Thanks,
Thank you for the report,

I think I've already fixed this on upcoming new update (v2.04). I hope I can release new version soon (need to to test it first).

New features so far:
  • OcRam core v1.04
  • Fixed bugs on load, when event/player lights were controlled via plugin commands
  • Done some optimizations >> pre-calculations + RMMV core function optimization (Game_Map.adjustX/Y and Game_CharacterBase.screenX/Y)
  • Battle light-ex plugin command (battle_light_ex)
  • Right light source offsetX in battle scene now works as intended (reversed offsetX)
  • Looped map bug is now fixed
 

auxie

Warper
Member
Joined
Jun 25, 2017
Messages
2
Reaction score
2
First Language
English
Primarily Uses
RMMV
Thanks OcRam,

I went through the plugin code with a friend who knows javascript (as I have no idea) and he found that it was the color: which didn't need to be there.

this appears to work:

light_player 1 100 #444444ff

maybe if you can put an example after each definition in the documentation that would help

like what you did for battle_light

appreciate all your efforts, amazing work!
 
Last edited:

OcRam

Servant of the Universe
Veteran
Joined
Aug 2, 2016
Messages
472
Reaction score
563
First Language
Finnish
Primarily Uses
RMMV
Thanks OcRam,

I went through the plugin code with a friend who knows javascript (as I have no idea) and he found that it was the color: which didn't need to be there.

this appears to work:

light_player 1 100 #444444ff

maybe if you can put an example after each definition in the documentation that would help

like what you did for battle_light

appreciate all your efforts, amazing work!
Thank you for the message,

Glad to hear you got it working! I have added examples in help section (examples will be in next version).
 

OcRam

Servant of the Universe
Veteran
Joined
Aug 2, 2016
Messages
472
Reaction score
563
First Language
Finnish
Primarily Uses
RMMV
Latest version - v2.04 (released 2020/03/14)
  • OcRam core v1.04 (requirement for all of my latest plugins)
    ...And prepares this plugin for OcRam demo project

  • Fixed bugs on load, when event/player lights were controlled via plugin commands.

  • Done some optimizations >> pre-calculations + RMMV core function optimization
    (Game_Map.adjustX/Y and Game_CharacterBase.screenX/Y)
  • Battle light-ex plugin command

  • Right light source offsetX in battle scene now works as intended (reversed offsetX)

  • Looped map bug is now fixed (Credits to: @jaxcap & @Faelim )
 

padr81

Guy whose game is taking too long.
Veteran
Joined
Apr 26, 2013
Messages
706
Reaction score
702
First Language
english
Primarily Uses
N/A
Hey dude, I can't find your core plugin anywhere to try this out. How does one get that.
 

OcRam

Servant of the Universe
Veteran
Joined
Aug 2, 2016
Messages
472
Reaction score
563
First Language
Finnish
Primarily Uses
RMMV
Hey dude, I can't find your core plugin anywhere to try this out. How does one get that.
Thank you for the message,

Core is included in Lights plugin itself. Just make sure if you use other my plugins that top most plugin has latest core.

ocram_core.png

Some people don't like to download any core plugins that's the only reason each of my plugins will include core also (only down-side is that you need to make sure top most plugin will have latest core code section).
 

pasunna

Veteran
Veteran
Joined
Feb 3, 2019
Messages
485
Reaction score
190
First Language
thai
Primarily Uses
RMMV
Thank you for the message,

Core is included in Lights plugin itself. Just make sure if you use other my plugins that top most plugin has latest core.


Some people don't like to download any core plugins that's the only reason each of my plugins will include core also (only down-side is that you need to make sure top most plugin will have latest core code section).
yes I don't like to download core
but doesn't this solution will cause bug or something
when it is too old version on top?
 

padr81

Guy whose game is taking too long.
Veteran
Joined
Apr 26, 2013
Messages
706
Reaction score
702
First Language
english
Primarily Uses
N/A
Thank you for the message,

Core is included in Lights plugin itself. Just make sure if you use other my plugins that top most plugin has latest core.


Some people don't like to download any core plugins that's the only reason each of my plugins will include core also (only down-side is that you need to make sure top most plugin will have latest core code section).
Ah cool I'll pop the plugin in and give it a try. Dunno why I never thought to try.
 

OcRam

Servant of the Universe
Veteran
Joined
Aug 2, 2016
Messages
472
Reaction score
563
First Language
Finnish
Primarily Uses
RMMV
yes I don't like to download core
but doesn't this solution will cause bug or something
when it is too old version on top?
Yes as said on previous post "only down-side is that you need to make sure top most plugin will have latest core code section"
 

PresaDePrata

Veteran
Veteran
Joined
Dec 4, 2014
Messages
83
Reaction score
16
First Language
Portuguese
Primarily Uses
RMMV
Really nice script. I'm using it in every way i can. Always loved light effects. By far the more performatic i've used - comparing to those in VxAce i've used.

By the way, i have a question: what script call can i use to check if a player or event is now absent of light? I'm trying to create a horror cave in which the player must keep adding fuel to her light source. If it runs out, something bad happens.

Two more things: can a player have light-ex effects? I checked in your code and it doesn't seem to allow, only to events. And what's the purpose of light's comentary last parameter?

<light:5:300:#ffdd00ff:360>

If i get it right, you only use 3 parameters to build your light class. As shown in:

ev._lightData = new Light_Data(ev, parseInt(args[1]), args[3], parseInt(args[2]) * 0.5);
 

belatucadrus

Veteran
Veteran
Joined
Mar 6, 2017
Messages
93
Reaction score
14
First Language
french
Primarily Uses
RMMV
Hi, I'm trying to figure out how to make your plugin work

I disabled how my plugins except yours, and I pasted this :

Code:
<light:5:300:#ffdd00ff:360>
In a comment of a torch event :

1587996634339.png

But it doesnt work. The map's still dark :(


EDIT : If it can help, I'm using RPGMV 1.5.1 (Tried to update my project and it ended very bad)
EDIT 2 : I just updated RPGMV to 1.6.1, created a fresh project, and pasted your plugin, but it still doesn't work :(
EDIT 3 : Solved the problem thanks to this post :


@miani

EDIT: So I found out why, it must be similar to terrax lightning where you have to control the background tint with the plugin first. So use ocrams 'light_bg' plugin command to set the background tint then you can use the various light comments/plugin commands.

EXAMPLE: Make an autorun/parallel page that runs something like this in a plugin command first:
Code:
light_bg #ffaa80ff 12
Your light comments and plugin commands should then begin working!
My question now is : Is there a way to replace the "tint screen" event function by OcRam's ?
Also, is there a way to easily understand how to go from RPGM format to Hex format ?

For example, What is -160,-160, -100, 0 in hex ? I have trouble with negative values which aren't a thing when dealing with hex colors
 
Last edited:

OcRam

Servant of the Universe
Veteran
Joined
Aug 2, 2016
Messages
472
Reaction score
563
First Language
Finnish
Primarily Uses
RMMV
Hi, I'm trying to figure out how to make your plugin work

I disabled how my plugins except yours, and I pasted this :

Code:
<light:5:300:#ffdd00ff:360>
In a comment of a torch event :

View attachment 141206

But it doesnt work. The map's still dark :(


EDIT : If it can help, I'm using RPGMV 1.5.1 (Tried to update my project and it ended very bad)
EDIT 2 : I just updated RPGMV to 1.6.1, created a fresh project, and pasted your plugin, but it still doesn't work :(
Hi,

You need to use "light_bg" command (see help section for more information) to darken environment bg light then you can use <light...> tags.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

I based this on the armor of Actor 1_7 of the RTP. Hair is from Derex and Sythian Bard.
Stream will be live shortly! Going to do another art stream tonight so that I can finish my Fauna Focus piece~ Feel free to drop by!
Humans are fallible creatures, we all know that. It's when we're forced to look at ourselves that we start to disagree. :p
Expectation: Working on boss battle.
Reality: "Look at how awful are these code and database organization. Let me clean this mess", *yet, casually adding more modules that I have no idea if I would use it later*
Trying to learn to read Japanese so I read my manga. I like to buy them without all the edits made during translation.

Forum statistics

Threads
97,865
Messages
947,458
Members
129,089
Latest member
candutekno
Top