Terrax Lighting system

KillerGin

Freddie
Veteran
Joined
Dec 18, 2015
Messages
426
Reaction score
299
First Language
English
Primarily Uses
N/A
Hello Terrax,

I really appreciate your awesome plugin and I would love to share what I have managed to pull off with your lighting script.

Killer Gin PC Demo Link: http://www.killergin.com/wp-content/uploads/2017/05/Killer-Gin-PC-Demo.zip

I would also like to point out that I use script version 1.3.1, I think you will love the intro! (uses your script brilliantly!) ;0)

Thanks,
Freddie
 

AestheticGamer

Veteran
Veteran
Joined
Dec 27, 2014
Messages
55
Reaction score
24
First Language
English
Primarily Uses
Thanks for the efforts, unfortunately it didn't quite fix the problem. It's about the same error code but some of the numbers jumped around so I'm guessing the errors are popping up in different parts of the code? I'll copy and paste the message here again.


rpg_managers.js:1756 TypeError: Cannot read property 'note' of undefined
at ReloadMapEvents ([Redacted]/js/plugins/TerraxLighting.js:1007:45)
at Lightmask._updateMask ([Redacted]/js/plugins/TerraxLighting.js:1203:4)
at Lightmask.update ([Redacted]/js/plugins/TerraxLighting.js:980:11)
at [Redacted]/js/rpg_core.js:3569:19
at Array.forEach (native)
at Spriteset_Map.Sprite.update ([Redacted]/js/rpg_core.js:3567:19)
at Spriteset_Map.Spriteset_Base.update ([Redacted]/js/rpg_sprites.js:2141:29)
at Spriteset_Map.update ([Redacted]/js/rpg_sprites.js:2271:37)
at f[Redacted]/js/rpg_scenes.js:112:19
at Array.forEach (native)

I do appreciate the efforts and I do know that at least 1.3.9 works with auto-load, but something around 1.4.5 broke it. I'll test some of the versions in-between those two to see which transition caused it to stop working.
 

Terrax

Veteran
Veteran
Joined
Oct 30, 2015
Messages
304
Reaction score
226
First Language
English
Hello Terrax,

I really appreciate your awesome plugin and I would love to share what I have managed to pull off with your lighting script.

Killer Gin PC Demo Link: http://www.killergin.com/wp-content/uploads/2017/05/Killer-Gin-PC-Demo.zip

I would also like to point out that I use script version 1.3.1, I think you will love the intro! (uses your script brilliantly!) ;0)

Thanks,
Freddie
I will most centainly take a look :)

Thanks for the efforts, unfortunately it didn't quite fix the problem. It's about the same error code but some of the numbers jumped around so I'm guessing the errors are popping up in different parts of the code? I'll copy and paste the message here again.

I do appreciate the efforts and I do know that at least 1.3.9 works with auto-load, but something around 1.4.5 broke it. I'll test some of the versions in-between those two to see which transition caused it to stop working.
Can you give me the download link to the non-compatible plugin, its easier to find the bugs :)
 

AestheticGamer

Veteran
Veteran
Joined
Dec 27, 2014
Messages
55
Reaction score
24
First Language
English
Primarily Uses
I will most centainly take a look :)



Can you give me the download link to the non-compatible plugin, its easier to find the bugs :)
Sure thing, this plug-in isn't from these forums, it's basically an autosave/autoload plug-in, the saving works fine the problem comes if you try to autoload the autosave, here's the plug-in code as the plug-in was distributed via this method rather than a direct download:

Code:
/*:
*    @plugindesc Allows creating, loading, and deleting save files with plugin commands.
*    @author Sabi
*
*    @help
*    Plugin Commands:
*
*AutoSave   <index> : Create a save game with index <index>
*LoadSave   <index> : Loads a save game with index <index>
*DeleteSave <index> : Deletes a save game with index <index>
*/

(function() {
var Sabi_Game_Interpreter_pluginCommand = Game_Interpreter.prototype.pluginCommand;
    Game_Interpreter.prototype.pluginCommand = function(command, args){
        Sabi_Game_Interpreter_pluginCommand.call(this, command, args);

        if(command === 'AutoSave'){
            var f_index = Number(args[0]);
            $gameSystem.onBeforeSave();
            DataManager.saveGame(f_index);
        }
       
        if (command === 'LoadSave'){
            var f_index = Number(args[0]);
            if(DataManager.loadGame(f_index)){
                if ($gameSystem.versionId() !== $dataSystem.versionId){
                    $gamePlayer.reserveTransfer($gameMap.mapId(), $gamePlayer.x, $gamePlayer.y);
                    $gamePlayer.requestMapReload();
                }
                $gameSystem.onAfterLoad();
                SceneManager.goto(Scene_Map);
            }
        }
       
        if(command === 'DeleteSave'){
            var f_index = Number(args[0]);
            StorageManager.remove(f_index);
        }
    };
}) ();
Hope it helps. It works with earlier versions of the Lighting Plug-in, and it works if I disable Terrax for the time. To note they work fine together until the plug-in tries to initiate the autoload plug-in command, it gives the error message when it loads.
 

Terrax

Veteran
Veteran
Joined
Oct 30, 2015
Messages
304
Reaction score
226
First Language
English
Hope it helps. It works with earlier versions of the Lighting Plug-in, and it works if I disable Terrax for the time. To note they work fine together until the plug-in tries to initiate the autoload plug-in command, it gives the error message when it loads.
I've fixed the problem, just download the 1.5.0 version again (i didn't change the version number because the fix was very small).
You will notice that the lightsoures have a small lag when the map is loaded. I'm afraid this cannot be fixed.
 

AestheticGamer

Veteran
Veteran
Joined
Dec 27, 2014
Messages
55
Reaction score
24
First Language
English
Primarily Uses
I've fixed the problem, just download the 1.5.0 version again (i didn't change the version number because the fix was very small).
You will notice that the lightsoures have a small lag when the map is loaded. I'm afraid this cannot be fixed.
Thank you very much! The slight lag doesn't bother me too much, I first thought you meant like it would lag the game but you meant it takes a second for Terrax Lighting to kick in. It's very brief and is 100% better than not loading the game at all, so I think it's certainly a solution. I thank you for your constant efforts on improving this, Terrax!
 
Joined
Feb 21, 2017
Messages
95
Reaction score
1
First Language
English
Primarily Uses
RMMV
How do you change the color for it? And as well as apply it to all the maps in the game? Cause after an event the game turns to night in one map, but then when I get to another it looks like it's day. Also is it possible to attatch a light to something like a lantern and have the player pick it up. giving off the player radius light after they pick it up.
 
Joined
Feb 21, 2017
Messages
95
Reaction score
1
First Language
English
Primarily Uses
RMMV
Like for a campfire I want the glow to be orange, but it won't let me do so. And flickering too, so how do I do this?
 

Terrax

Veteran
Veteran
Joined
Oct 30, 2015
Messages
304
Reaction score
226
First Language
English
How do you change the color for it? And as well as apply it to all the maps in the game? Cause after an event the game turns to night in one map, but then when I get to another it looks like it's day. Also is it possible to attatch a light to something like a lantern and have the player pick it up. giving off the player radius light after they pick it up.
Each map needs at least one lightsource event in the map to make the plugin work, if you do not place a lightsource in it, the map will remain light.
If you want a map to be completely dark without any lightsources place a dummy lightsource by using 'Light 1 #000000' in an event notetag (if will produce a black light with a radius of 1 (invisible).

If you want to mimic a player picking up a lantern, first reduce the player radius to 1 (Plugin command : Light radius 1). Then when the player picks up the lantern set the radius to 100 (Plugin command: Light radius 100)

Like for a campfire I want the glow to be orange, but it won't let me do so. And flickering too, so how do I do this?
For an orange fire use 'Fire 100 #FF6600' in the note-tag of the campfire event.
 
Joined
Feb 21, 2017
Messages
95
Reaction score
1
First Language
English
Primarily Uses
RMMV
Each map needs at least one lightsource event in the map to make the plugin work, if you do not place a lightsource in it, the map will remain light.
If you want a map to be completely dark without any lightsources place a dummy lightsource by using 'Light 1 #000000' in an event notetag (if will produce a black light with a radius of 1 (invisible).

If you want to mimic a player picking up a lantern, first reduce the player radius to 1 (Plugin command : Light radius 1). Then when the player picks up the lantern set the radius to 100 (Plugin command: Light radius 100)



For an orange fire use 'Fire 100 #FF6600' in the note-tag of the campfire event.
What about other colors for a light?
 

Terrax

Veteran
Veteran
Joined
Oct 30, 2015
Messages
304
Reaction score
226
First Language
English

Mesajia

Veteran
Veteran
Joined
Aug 14, 2014
Messages
81
Reaction score
50
First Language
German
Primarily Uses
RMMV
Hey together,
I got this script today, because I need some small light effects like glowing lamps. I wrote "Light 400 #F9FCB6 B70" in a note tag for testing purpose, but nothing happend. The screen I try it on is tinted with the default maker function.
Do I need another plugin for making it run?
 

Gonor

Veteran
Veteran
Joined
Oct 15, 2012
Messages
140
Reaction score
68
First Language
German
Primarily Uses
RMMV
I think you need to use the plugin's tint function instead of the maker's default.
That should do the trick.
I just can't pinpoint you to the correct setup right now, but the notetags for that should go into the map settings.
There should be something in the plugin's help file.
 

Terrax

Veteran
Veteran
Joined
Oct 30, 2015
Messages
304
Reaction score
226
First Language
English
Hey together,
I got this script today, because I need some small light effects like glowing lamps. I wrote "Light 400 #F9FCB6 B70" in a note tag for testing purpose, but nothing happend. The screen I try it on is tinted with the default maker function.
Do I need another plugin for making it run?
You have to turn off the default tint functions, because they do not work together with this plugin.
Put 'Light 400 #F9FCB6' in the notetag of an event.
(i don't think you need to increase the brightness for a glowing lamp effect, so leave out the B70)
If you find the room to black use 'Plugin command : Tint set #333333' in an
parallel event that runs once for a less dark room.
 

Mesajia

Veteran
Veteran
Joined
Aug 14, 2014
Messages
81
Reaction score
50
First Language
German
Primarily Uses
RMMV
You have to turn off the default tint functions, because they do not work together with this plugin.
Put 'Light 400 #F9FCB6' in the notetag of an event.
(i don't think you need to increase the brightness for a glowing lamp effect, so leave out the B70)
If you find the room to black use 'Plugin command : Tint set #333333' in an
parallel event that runs once for a less dark room.
Sadly it does not work. The screen is not colored at all, starting a new game wasn't the solution. Do you know about conflicts with other plugins? I'm using Kaus Ultimate Overlay, some LTN scripts (including the Core-Mod) and some of the Yanfly family.

The script should automatically tint the screens - without any commands, right? I didn't saw something like that in the help file.
 

Terrax

Veteran
Veteran
Joined
Oct 30, 2015
Messages
304
Reaction score
226
First Language
English
Sadly it does not work. The screen is not colored at all, starting a new game wasn't the solution. Do you know about conflicts with other plugins? I'm using Kaus Ultimate Overlay, some LTN scripts (including the Core-Mod) and some of the Yanfly family.

The script should automatically tint the screens - without any commands, right? I didn't saw something like that in the help file.
Kaus Overlay and the Lighting system both overwrite the same core script, there is a solution however. You can find it in this post

https://forums.rpgmakerweb.com/index.php?threads/terrax-lighting-system.49339/#post-489359
 

Mesajia

Veteran
Veteran
Joined
Aug 14, 2014
Messages
81
Reaction score
50
First Language
German
Primarily Uses
RMMV
Hello Terrax,
it's me again. I'm working with your Plugin a lot and most parts are working well. But I don't understand how the set variables of the DayNight-Cycles work in events.
I try to light the laterns, when the evening starts. For that I have a parallel event with two pages. Page 1 is active when it's 19 o'clock and above. It contains the Plugin Command "Light on 1", the second page is active when it's 6 clock and contains the plugin command "Light off 1". All light events have the "1" and the end and they have two pages aswell. One without switch and the other one with selfswitch D - the set killswitch. Both pages trigger a different graphic, so that I can see if the kill switch is working.

Well. The light effect does not work, when I have the "1" at the end of the note tag. But without it, the light glows all the time. Do you can help me with that? The demo is no help at this point.
 

Terrax

Veteran
Veteran
Joined
Oct 30, 2015
Messages
304
Reaction score
226
First Language
English
Hello Terrax,
it's me again. I'm working with your Plugin a lot and most parts are working well. But I don't understand how the set variables of the DayNight-Cycles work in events.
I try to light the laterns, when the evening starts. For that I have a parallel event with two pages. Page 1 is active when it's 19 o'clock and above. It contains the Plugin Command "Light on 1", the second page is active when it's 6 clock and contains the plugin command "Light off 1". All light events have the "1" and the end and they have two pages aswell. One without switch and the other one with selfswitch D - the set killswitch. Both pages trigger a different graphic, so that I can see if the kill switch is working.

Well. The light effect does not work, when I have the "1" at the end of the note tag. But without it, the light glows all the time. Do you can help me with that? The demo is no help at this point.

The first thing you should do is go to the settings of the plugin (Plugin manager -> TerraxlightingSystem -> doubleclick).
There is a setting there called 'Save DaynightHours'. This setting will save the current daynight hour in the specified game-variable.
So for this example i will set it to 10.
Game-variable 10 will now change each time an hour passes.
Now we can write an eventscript that turns lights on and off depending on that variable (I've called the variable 'HourofDay')

Code:
◆If:HourofDay > 19
  ◆If:Self Switch A is ON
    ◆Plugin Command:Light on 1
    ◆Control Self Switch:A = OFF
    ◆
  :End
  ◆
:Else
  ◆If:HourofDay < 6
    ◆If:Self Switch A is ON
      ◆Plugin Command:Light on 1
      ◆Control Self Switch:A = OFF
      ◆
    :End
    ◆
  :Else
    ◆If:Self Switch A is OFF
      ◆Plugin Command:Light off 1
      ◆Control Self Switch:A = ON
      ◆
    :End
    ◆
  :End
  ◆
:End
 

Mesajia

Veteran
Veteran
Joined
Aug 14, 2014
Messages
81
Reaction score
50
First Language
German
Primarily Uses
RMMV
I did that before and the screen was tinted, so the variables do work. I can alter this variable with an event. Only the light won't work.
The code you posted is from the demo and it didn't help me, when I put it in a parallel event.
 

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

Latest Threads

Latest Profile Posts

Welp, ended up at the hospital with the oldest so mebbe might make the game jam's deadline. Maybe not. Regardless, really digging MZ.
I had lots of fun! Kids loved me, and some took pictures. Unfortunately, the videos didn't send... but you'll see Chica in action when I do a trailer for Fandom Scouts!
Dama wrote on akoniti's profile.
Hi
Thanks for your review.
I was checking the trailer for details and as the woman shut the door at the exact moment the song I was hearing said "you slim the door" and I couldn't resist to add it there. :D And I used this idea one more time on another scene.
Just doing some tileset tinkering again...

Forum statistics

Threads
104,693
Messages
1,008,178
Members
136,189
Latest member
MalaacSoran
Top