OcRam - Lights plugin (MZ/MV)

● ARCHIVED · READ-ONLY
Started by OcRam 300 posts Page 12 of 15 View original ↗
  1. Awesome plugin.

    I have a question: I also use OcRam Time System to create a day and night effect. I would like to know how I make the light that emanates from the player only appear during the NIGHT period, in an instantaneous way? As if the player had just turned on a torch or other light source.
  2. athosfranco said:
    Awesome plugin.

    I have a question: I also use OcRam Time System to create a day and night effect. I would like to know how I make the light that emanates from the player only appear during the NIGHT period, in an instantaneous way? As if the player had just turned on a torch or other light source.
    Thank you for the message,

    I would do it with common event and set player default light to 'none' in plugin parameters.
  3. My game reloads automatically the last accessed save file after a Game Over.

    But when it happens, I get this error message :

    1624485070351.png

    Details :
    1624485208903.png
  4. belatucadrus said:
    My game reloads automatically the last accessed save file after a Game Over.

    But when it happens, I get this error message :

    View attachment 193199

    Details :
    View attachment 193200
    Thank you for the message,

    Does this autoload functionality trigger $gameSystem.onAfterLoad()?
  5. I have no idea why, but after updating all the scripts I bought (weather, time system, lights) and addidin Core, which is necessery now, lights and clock does not work ... :( When I turn off the core, it works but says "Core 1.05 is required".
  6. fizzly said:
    I have no idea why, but after updating all the scripts I bought (weather, time system, lights) and addidin Core, which is necessery now, lights and clock does not work ... :( When I turn off the core, it works but says "Core 1.05 is required".
    Thank you for the message,

    Make sure that you are using only MV plugins or MZ plugins (mixing them could cause weird issues). In MV -plugins Core is always embedded in each plugin. In MZ core is separate plugin.

    In both cases make sure all plugins are up-to-date (if any plugin is updated it is recommended to update all OcRam -plugins like you apparently did).

    Also if plugin comes with new parameters it requires parameter validation do this by going to "Plugin Manager" >> Click updated plugin(s) >> Click Ok for each new parameter
  7. OcRam said:
    Thank you for the message,

    Make sure that you are using only MV plugins or MZ plugins (mixing them could cause weird issues). In MV -plugins Core is always embedded in each plugin. In MZ core is separate plugin.

    In both cases make sure all plugins are up-to-date (if any plugin is updated it is recommended to update all OcRam -plugins like you apparently did).

    Also if plugin comes with new parameters it requires parameter validation do this by going to "Plugin Manager" >> Click updated plugin(s) >> Click Ok for each new parameter
    oh god, i downloaded mz for mv...so sorry, and thank you for fast help!
  8. fizzly said:
    oh god, i downloaded mz for mv...so sorry, and thank you for fast help!
    No problem at all. Happy RPG Making!
  9. OcRam said:
    Thank you for the message,

    Following snippet gets everything in light radius:
    Code:
    this.event().getObjectsInLightRadius().forEach(obj => {
    console.log(obj);
    });

    Hello :)

    I tried this now a little with MZ. Is this not implemented in MZ yet?
    I even tried it in your demo with the sentries, but all I get is a crash with the message
    "Cannot read property 'degrees' of undefined"
  10. Zaphitos said:
    Hello :)

    I tried this now a little with MZ. Is this not implemented in MZ yet?
    I even tried it in your demo with the sentries, but all I get is a crash with the message
    "Cannot read property 'degrees' of undefined"
    Thank you for the report!

    I have now fixed and released OcRam_Lights v1.09 (requires OcRam_Core v1.10).

    Following changes were made:
    • Added battler lights (inherited from map event (enemy) and player lights (actor))!
    • MPP_Pseudo3DBattle support!
    • PIXI.Container is no longer used - using only PIXI.Sprite as light layer (1 "layer" less stuff)
    • event.getObjectsInLightRadius and isPlayerInLightRadius now works as intended! (Credits to Zaphitos)
    EDIT: WHOOPS this was MV thread! (update is for MZ)
  11. Hello OcRam! Recently found your plugin when looking for a lighting plugin to replace Terrax's.

    Running into an issue dealing with switches. If I turn a light source on for an event using the light_event plugin command, then a switch changes the event page, the light source is turned off.

    If this a known limitation or is there a workaround?
  12. LMPGames said:
    Hello OcRam! Recently found your plugin when looking for a lighting plugin to replace Terrax's.

    Running into an issue dealing with switches. If I turn a light source on for an event using the light_event plugin command, then a switch changes the event page, the light source is turned off.

    If this a known limitation or is there a workaround?
    Thank you for the message,

    Everytime event page is changed light event comments are scanned. If light sources are not found, lights will be turned off. This can be overwritten via JS/plugin commands (while this page is active).

    If comment is used then it is supposed to be event PAGE specific. Event notetag takes effect in ALL pages (unless overwritten by JS/plugin command).
  13. OcRam said:
    Thank you for the message,

    Everytime event page is changed light event comments are scanned. If light sources are not found, lights will be turned off. This can be overwritten via JS/plugin commands (while this page is active).

    If comment is used then it is supposed to be event PAGE specific. Event notetag takes effect in ALL pages (unless overwritten by JS/plugin command).

    Ah, so even if I use the plugin command, page changes will reset the lighting. So sounds like I would be better off either using comments specifically on each page or in the event note tag to fix this issue then.

    Thanks.
  14. Hiyaah!
    Do you know if it would be complicated to add light to objects other than events, player and followers? I'm using QABS and I'd like to add light to the projectiles.. I've managed to get the lightData onto them by using the same setupLightData method as followers but it doesn't seem to do anything. Am I missing something obvious?
  15. Was using the plugin without any issues and updated a whole bunch of maps and then ran into this issue, any help would be greatly appreciated :)
  16. dragon1up said:
    Was using the plugin without any issues and updated a whole bunch of maps and then ran into this issue, any help would be greatly appreciated :)
    Does this occur only when old save file is used (saved before changes to map)?

    EDIT:
    @Godarkhaos Light data needs to be updated in OcRam_Light_Layer.updateMapLights and in updateBattleLights.
  17. OcRam said:
    Does this occur only when old save file is used (saved before changes to map)?

    EDIT:
    @Godarkhaos Light data needs to be updated in OcRam_Light_Layer.updateMapLights and in updateBattleLights.
    Not using any old saves due to testing things out, but for some reason, the game does not go dark sometimes and the field of view isn't limited at all but sometimes it does and fov is limited like the third image. Unsure where the lack of compatibility is coming from honestly. Just confused as sometimes the engine is fine lights up and fov is limited but sometimes not at all.

    Load order : Terrax (for neon lights)
    Limited sight ex (can turn off but think I need to delete otherwise game does not like it)
    MOG Limted sight (off)
    example.png
    Oc-time (off) due to using mog still but plan to change over
    Oc lights

    Just tested with both limited sights turned off but didn't work at all, so that was strange
  18. dragon1up said:
    Not using any old saves due to testing things out, but for some reason, the game does not go dark sometimes and the field of view isn't limited at all but sometimes it does and fov is limited like the third image. Unsure where the lack of compatibility is coming from honestly. Just confused as sometimes the engine is fine lights up and fov is limited but sometimes not at all.

    Load order : Terrax (for neon lights)
    Limited sight ex (can turn off but think I need to delete otherwise game does not like it)
    MOG Limted sight (off)
    View attachment 220452
    Oc-time (off) due to using mog still but plan to change over
    Oc lights

    Just tested with both limited sights turned off but didn't work at all, so that was strange
    If I understood this correctly it's autotint feature that we are talking about?

    If that's the case, OcRam_Time_System is required for "auto tint" feature to work. Other wise light layer bg must be set manually via JS call or plugin command. Though it doesn't explain why tint is sometimes done... Maybe some maps have light bg command made (just a guess)?
  19. so i really love this plugin but im having a really big issue, im trying to use it to make stealth section using the ".isPlayerInLightRadius()" script but my npcs keep getting alerted even when it looks like im nowhere near their cone of vision, ive attached some examples of what im saying, am i missing something? how can i fix this?
  20. David_Ribeiro said:
    so i really love this plugin but im having a really big issue, im trying to use it to make stealth section using the ".isPlayerInLightRadius()" script but my npcs keep getting alerted even when it looks like im nowhere near their cone of vision, ive attached some examples of what im saying, am i missing something? how can i fix this?
    There seems to be a bug in the IsPlayerInLightRadius function: Change Math.ceil to Math.floor.
    I posted about this previously: https://forums.rpgmakerweb.com/index.php?threads/ocram-lights-plugin-for-mv.108614/post-1186342

    Also if you move the light source using a "light-ex" comment, that doesn't appear to be taken into account when running IsPlayerInLightRadius. That could also be triggering an alert when in darkness or conversely not triggering when lit since the light radius is different to the visible light.