athosfranco

Regular
Regular
Joined
Apr 30, 2014
Messages
54
Reaction score
9
First Language
Portuguese
Primarily Uses
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.
 

OcRam

Servant of the Universe
Regular
Joined
Aug 2, 2016
Messages
954
Reaction score
1,118
First Language
Finnish
Primarily Uses
RMMZ
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.
 

Kirby44

Regular
Regular
Joined
Mar 6, 2017
Messages
164
Reaction score
25
First Language
french
Primarily Uses
RMMV
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
 

fizzly

Regular
Regular
Joined
Mar 23, 2012
Messages
1,705
Reaction score
1,294
First Language
Polish
Primarily Uses
RMMZ
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".
 

OcRam

Servant of the Universe
Regular
Joined
Aug 2, 2016
Messages
954
Reaction score
1,118
First Language
Finnish
Primarily Uses
RMMZ
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
 

fizzly

Regular
Regular
Joined
Mar 23, 2012
Messages
1,705
Reaction score
1,294
First Language
Polish
Primarily Uses
RMMZ
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!
 

Zaphitos

Villager
Member
Joined
Apr 25, 2021
Messages
16
Reaction score
4
First Language
English
Primarily Uses
RMMZ
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"
 

Attachments

  • Bildschirmfoto 2021-09-14 um 23.18.47.png
    Bildschirmfoto 2021-09-14 um 23.18.47.png
    164.9 KB · Views: 2
Last edited:

OcRam

Servant of the Universe
Regular
Joined
Aug 2, 2016
Messages
954
Reaction score
1,118
First Language
Finnish
Primarily Uses
RMMZ
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)
 
Last edited:

LMPGames

Regular
Regular
Joined
Nov 15, 2017
Messages
76
Reaction score
48
First Language
English
Primarily Uses
RMMV
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?
 

OcRam

Servant of the Universe
Regular
Joined
Aug 2, 2016
Messages
954
Reaction score
1,118
First Language
Finnish
Primarily Uses
RMMZ
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).
 

LMPGames

Regular
Regular
Joined
Nov 15, 2017
Messages
76
Reaction score
48
First Language
English
Primarily Uses
RMMV
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.
 

Godarkhaos

Regular
Regular
Joined
Oct 25, 2018
Messages
33
Reaction score
18
First Language
French
Primarily Uses
RMMV
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?
 

dragon1up

Regular
Regular
Joined
Sep 24, 2013
Messages
134
Reaction score
42
First Language
English
Primarily Uses
RMMV
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 :)
 

Attachments

  • issue one.png
    issue one.png
    768 KB · Views: 7
  • issue idefied.png
    issue idefied.png
    221.2 KB · Views: 7
  • works otherwise.png
    works otherwise.png
    1.6 MB · Views: 7

OcRam

Servant of the Universe
Regular
Joined
Aug 2, 2016
Messages
954
Reaction score
1,118
First Language
Finnish
Primarily Uses
RMMZ
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.
 

dragon1up

Regular
Regular
Joined
Sep 24, 2013
Messages
134
Reaction score
42
First Language
English
Primarily Uses
RMMV
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
 

OcRam

Servant of the Universe
Regular
Joined
Aug 2, 2016
Messages
954
Reaction score
1,118
First Language
Finnish
Primarily Uses
RMMZ
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)?
 

daisy_le_nerd

Villager
Member
Joined
Dec 9, 2019
Messages
10
Reaction score
2
First Language
portuguese
Primarily Uses
RMMV
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?
 

Attachments

  • imagem_2022-06-10_150007307.png
    imagem_2022-06-10_150007307.png
    231.7 KB · Views: 7
  • imagem_2022-06-10_150146330.png
    imagem_2022-06-10_150146330.png
    165.8 KB · Views: 6
  • imagem_2022-06-10_150214911.png
    imagem_2022-06-10_150214911.png
    179.6 KB · Views: 6

OpenTangent

Regular
Regular
Joined
Mar 15, 2020
Messages
50
Reaction score
15
First Language
English
Primarily Uses
RMMV
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.
 

Latest Threads

Latest Posts

Latest Profile Posts

Proper localization into several languages on a commercial rpg project might be one of the best signs that the developer is super invested into making the game something high effort, because it ain't cheap to hire good translators.
6 hour drive back from Florida and I was able to plan out 6 mini game Common Events for my Game Jam entry, including a new one I hadn't thought of before. Also had some new ideas to improve what I already have and the post game options to continuing playing the mini games that you liked or didn't get to try. Pretty productive drive.
Christmas decorations! !! :kaojoy:
20231209_114754.jpg
Sophie is already helping dismantle the tree...a month early, of course. Such a helpful kitten!
making horse character for game :D at the end it will have 8 directions puling wagon

2p8jdax

Forum statistics

Threads
136,878
Messages
1,270,973
Members
180,647
Latest member
jucarave
Top