OcRam - Lights plugin (MZ/MV)

● ARCHIVED · READ-ONLY
Started by OcRam 300 posts Page 4 of 15 View original ↗
  1. Feraleth said:
    @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 :)
  2. 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.
  3. jaxcap said:
    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.
  4. OcRam said:
    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?
  5. Feraleth said:
    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.
  6. OcRam said:
    Shadows are not in next version. Still figuring how I do it with minimal performance impact.
    Okay, I hope you find a solution :)
  7. 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?
  8. 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,
  9. auxie said:
    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
  10. 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!
  11. auxie said:
    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).
  12. 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 )
  13. Hey dude, I can't find your core plugin anywhere to try this out. How does one get that.
  14. padr81 said:
    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.

    Screen shot
    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).
  15. OcRam said:
    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.

    Screen shot
    View attachment 138500

    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?
  16. OcRam said:
    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.

    Screen shot
    View attachment 138500

    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.
  17. pasunna said:
    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"
  18. 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);
  19. 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 :


    bazrat said:
    @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
  20. belatucadrus said:
    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.