Ok. Let me know if you can repeat this in fresh project.
You mentioned something about parallel event I have seen many lags caused by these. Even if it runs every 5 frames it can cause severe lag (depending on what it does).
Ok. Let me know if you can repeat this in fresh project.
So if you turn off OcRam_Lights -plugin it doesn't happen?
for (let i = 1; i <= DataManager.maxSavefiles(); i++) {
if (!DataManager.isThisGameFile(i)) {
$gameSwitches.setValue(41, true);
$gameSystem.onBeforeSave();
if (DataManager.saveGame(i)) { StorageManager.cleanBackup(i);
if (DataManager.loadGame(i)) {$gamePlayer.reserveTransfer($gameMap.mapId(), $gamePlayer.x, $gamePlayer.y);$gamePlayer.requestMapReload();SceneManager.goto(Scene_Map);}}
break;}
if (i === DataManager.maxSavefiles()) {
$gameMessage.setPositionType(1);
$gameMessage.add("No save slots available! Please delete a save and try again.");
this.setWaitMode("message");
$gameTemp.pickSlot = true;}}
if ($gameTemp.pickSlot) {
$gameTemp.pickSlot = false;
SceneManager.push(Scene_Save);
}
YEP_CoreEngine.js:1098 TypeError: $gamePlayer._lightData.update is not a function
at OcRam_Light_Layer.updateMapLights (OcRam_Lights.js:1411)
at Spriteset_Map.<anonymous> (OcRam_Lights.js:1077)
at Spriteset_Map.c.(anonymous function) [as update] (chrome-extension://odlameecjipmbmbejkplpemijjgpljce/js/plugins/OcRam_Lights.js:28:135)
at rpg_scenes.js:262
at Array.forEach (<anonymous>)
at Scene_Map.Scene_Base.updateChildren (rpg_scenes.js:260)
at Scene_Map.Scene_Base.update (rpg_scenes.js:113)
at Scene_Map.update (rpg_scenes.js:596)
at Scene_Map.update (YEP_CoreEngine.js:1425)
at Scene_Map.update (ReloadWindow2.js:76)
Hi,
I can't seem to find a place where this eliminates the issue. I put it in my script, and I also put it in Yanfly's Autosave in both the StorageManager.performAutosave = function() and DataManager.loadGameWithoutRescue = function(savefileId). I even put it in the map as a parallel event that runs every 10 frames to make sure it happens. I can still get hit with 20fps combat after a load.
I would put it here:
for (let i = 1; i <= DataManager.maxSavefiles(); i++) {
if (!DataManager.isThisGameFile(i)) {
$gameSwitches.setValue(41, true);
$gameSystem.onBeforeSave();
if (DataManager.saveGame(i)) { StorageManager.cleanBackup(i);
if (DataManager.loadGame(i)) { $gameSystem.loadLightData(); // <== HERE // I'd also check that this actually happens after auto save
$gamePlayer.reserveTransfer($gameMap.mapId(), $gamePlayer.x, $gamePlayer.y);$gamePlayer.requestMapReload();SceneManager.goto(Scene_Map);}}
break;}
if (i === DataManager.maxSavefiles()) {
$gameMessage.setPositionType(1);
$gameMessage.add("No save slots available! Please delete a save and try again.");
this.setWaitMode("message");
$gameTemp.pickSlot = true;}}
if ($gameTemp.pickSlot) {
$gameTemp.pickSlot = false;
SceneManager.push(Scene_Save);
}
$gameSystem.loadLightData(); on turn 0 of a fight but I'm still able to get it to happen.Bummers.
You must be using MV then, "onAutosaveSuccess" is a MZ function...
forums.rpgmakerweb.com
OcRam_Shadows is still WIP. Already done auto floor plans (ray casting points), roof masking (and custom roof bitmap masks) and ray casting. TODO: Light mask clipping, custom floor plans and sprite shadows. It will be MZ only release (don't yet know how it will be RETRO'able (shouldn't be a problem), but one step at the time).
If I use the "<trigger_var:3>" 3 being day phase variable, It should only run one time when the variable changes right?, it seems to keep repeating itself over and over and the weather gets stuck in the top left corner.
Indeed you need to add last : for it to work as intended example <trigger_var:#:>
Oh this should help then, any other light advice ? I.e lights not being too big or clipping over tilesets
Original thread: https://forums.rpgmakerweb.com/threads/ocram-lights-plugin-mz-mv.108614/