Terrax Lighting system

Terrax

Veteran
Veteran
Joined
Oct 30, 2015
Messages
304
Reaction score
224
First Language
English
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.
Can you tell me exacly what your trying to accomplish.
 

Padramyr

Veteran
Veteran
Joined
May 22, 2017
Messages
94
Reaction score
75
First Language
German
Primarily Uses
RMMV
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
Thanks for this great plugin! It's working fine and I really like the lights. But I'm still struggling with the DayNight Circle as I don't understand how it works.

Do I have to put that script into a script event? And do I have to put this event into every map?
Unfortunately I don't know how to take a look at the demo. Inside that folder is just the js folder and the data folder.

I would be really happy if you could explain me what exactly I have to do in order to get the DayNight Circle to work :)
 

Terrax

Veteran
Veteran
Joined
Oct 30, 2015
Messages
304
Reaction score
224
First Language
English
Thanks for this great plugin! It's working fine and I really like the lights. But I'm still struggling with the DayNight Circle as I don't understand how it works.

Do I have to put that script into a script event? And do I have to put this event into every map?
Unfortunately I don't know how to take a look at the demo. Inside that folder is just the js folder and the data folder.

I would be really happy if you could explain me what exactly I have to do in order to get the DayNight Circle to work :)
1)
To set up the demo is easy. Just create a new game.
RPGMaker -> create new project.
Then find the new game on your harddisk, replace the JS and DATA folder with the folder from the demo.zip.

2) For the day-nightcycle to work on a map, all you need to do is put 'daynight' into the note-tag of that map.

3) The script i provided is for turning on lights at certain times, it has to be placed inside an event that runs paralel on
each map you want to turn lights on and off depending on the time of day.
 

Padramyr

Veteran
Veteran
Joined
May 22, 2017
Messages
94
Reaction score
75
First Language
German
Primarily Uses
RMMV
1)
To set up the demo is easy. Just create a new game.
RPGMaker -> create new project.
Then find the new game on your harddisk, replace the JS and DATA folder with the folder from the demo.zip.

2) For the day-nightcycle to work on a map, all you need to do is put 'daynight' into the note-tag of that map.

3) The script i provided is for turning on lights at certain times, it has to be placed inside an event that runs paralel on
each map you want to turn lights on and off depending on the time of day.
Thanks for the help. But I've got the same problem as Mesajia. The screen gets darker und brighter when time passes so the cycle works but
unfortunately the lights won't light up. I even copied one of your lights and all of your variables and switches just to be sure.

So my map has the "daynight" note-tag and my lights have the "Light 100 #FFFFFF 2" note. The script you posted is set to parallel. I provided some screenshots so maybe you can help me with that problem even though the words on the screenshots are sometimes in German. Am I missing something important?

ActualGame Pic.pngActualGame PicDay.png DayNightScript Pic.png Lamp Pic.png Map Pic.png Switches Pic.png TerraxLightning Pic.png TintScript Pic.png Variables Pic.png
 

Terrax

Veteran
Veteran
Joined
Oct 30, 2015
Messages
304
Reaction score
224
First Language
English
New version (1.5.1) now available

http://mvplugins.com/plugin/Terrax/Terrax Lighting System

or

https://github.com/Terraxz/TerraxLighting

Update : Fixed a bug in the script for turning lights on and off.


Thanks for the help. But I've got the same problem as Mesajia. The screen gets darker und brighter when time passes so the cycle works but
unfortunately the lights won't light up. I even copied one of your lights and all of your variables and switches just to be sure.
Fixed it (download the new version 1.5.1) :)

After installing the new script, use this event-script for turning on/off lights in the daynight cycle (slightly changed from previous version)

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

Padramyr

Veteran
Veteran
Joined
May 22, 2017
Messages
94
Reaction score
75
First Language
German
Primarily Uses
RMMV
New version (1.5.1) now available

http://mvplugins.com/plugin/Terrax/Terrax Lighting System

or

https://github.com/Terraxz/TerraxLighting

Update : Fixed a bug in the script for turning lights on and off.




Fixed it (download the new version 1.5.1) :)

After installing the new script, use this event-script for turning on/off lights in the daynight cycle (slightly changed from previous version)

Code:
◆If:HourofDay > 19
  ◆If:Self Switch A is OFF
    ◆Plugin Command:Light on 2
    ◆Control Self Switch:A = ON
    ◆
  :End
  ◆
:Else
  ◆If:HourofDay < 6
    ◆If:Self Switch A is OFF
      ◆Plugin Command:Light on 2
      ◆Control Self Switch:A = ON
      ◆
    :End
    ◆
  :Else
    ◆If:Self Switch A is ON
      ◆Plugin Command:Light off 2
      ◆Control Self Switch:A = OFF
      ◆
    :End
    ◆
  :End
  ◆
:End
Now it's working! Thank you very much! ^.^
You're great :D
 

Mesajia

Veteran
Veteran
Joined
Aug 14, 2014
Messages
81
Reaction score
49
First Language
German
Primarily Uses
RMMV
New version (1.5.1) now available

http://mvplugins.com/plugin/Terrax/Terrax Lighting System

or

https://github.com/Terraxz/TerraxLighting

Update : Fixed a bug in the script for turning lights on and off.




Fixed it (download the new version 1.5.1) :)

After installing the new script, use this event-script for turning on/off lights in the daynight cycle (slightly changed from previous version)

Code:
◆If:HourofDay > 19
  ◆If:Self Switch A is OFF
    ◆Plugin Command:Light on 2
    ◆Control Self Switch:A = ON
    ◆
  :End
  ◆
:Else
  ◆If:HourofDay < 6
    ◆If:Self Switch A is OFF
      ◆Plugin Command:Light on 2
      ◆Control Self Switch:A = ON
      ◆
    :End
    ◆
  :Else
    ◆If:Self Switch A is ON
      ◆Plugin Command:Light off 2
      ◆Control Self Switch:A = OFF
      ◆
    :End
    ◆
  :End
  ◆
:End
Okay, I must do something seriously wrong. It's totally embrassing, but it wont't work for me. I will attach some screenshots of my event setup and a list with my plugins, maybe you can help me. As you can see the screen tints correctly, but there's no light. The effect is working on other maps, where the light is always on. So I guess it's how I set up the event... I tried to put the code in a loop, but that won't work for me.

I'm so sorry, that I have to bother you again :/
LaterneSeite1.PNG LaterneSeite2.PNG LaterneAbend.PNG
I have them in this order:
TerrayLightning
SRD_SuperToolsEngine
SRD_PluginUpdater
SRD_HUDMaker
LTN_Core
LTN_QuestJournal
CP_Star_Passability_Fix
NoAutoshadow
YEP_RegionRestrictions
YEP_BattleEngineCore
YEP_X_Animated_SV_Enemies
YEP_X_ActSeqPack1
YEP_X_ActSeqPack2
YEP_X_ActSeqPack3
OrangeMapshot
Kaus_Ultimate_Overlay
OuterSelfSwitch
 

Terrax

Veteran
Veteran
Joined
Oct 30, 2015
Messages
304
Reaction score
224
First Language
English
Okay, I must do something seriously wrong. It's totally embrassing, but it wont't work for me. I will attach some screenshots of my event setup and a list with my plugins, maybe you can help me. As you can see the screen tints correctly, but there's no light. The effect is working on other maps, where the light is always on. So I guess it's how I set up the event... I tried to put the code in a loop, but that won't work for me.
Can you give me a screenshot of the variables and terrax lighting plugin-settings?
 

Mesajia

Veteran
Veteran
Joined
Aug 14, 2014
Messages
81
Reaction score
49
First Language
German
Primarily Uses
RMMV
Sure.
LaternePlugin1.PNG LaternePlugin2.PNG LaterneVariablen.PNG
 

Terrax

Veteran
Veteran
Joined
Oct 30, 2015
Messages
304
Reaction score
224
First Language
English
Everything seems to be set right, I've uploaded a new version with an improved daynight debug screen.
Download 1.5.1 again, and install the script.
Then in the game put a event with :

◆Plugin Command:daynight debug

This should show a screen with the current daynight time, and the variables and the value of those variables. They
should run with the time if all goes well.
 

Diretooth

Lv. 23 Werewolf
Veteran
Joined
Mar 10, 2013
Messages
1,199
Reaction score
435
First Language
English
Primarily Uses
RMMV
I'm having trouble understanding the Tint Set command, particularly the significance of the numbers. Right now, the darkest tint I want is 'Tint set #111111', but when I go to '#222222', it seems like a large leap in lighting to me. Is there a way to create a series of tint settings that more effectively transition from #1-> to #2->?
(The reason why I'm not doing a fadein is because I'm using the lighting system for a horror game, and want the tint to change from lighter (#2->) to darker (#1->). What I want, particularly, is four in-between commands between the two.)
If I can't do this, would you have any suggestions for how to achieve something similar to what I want?
 

Terrax

Veteran
Veteran
Joined
Oct 30, 2015
Messages
304
Reaction score
224
First Language
English
I'm having trouble understanding the Tint Set command, particularly the significance of the numbers. Right now, the darkest tint I want is 'Tint set #111111', but when I go to '#222222', it seems like a large leap in lighting to me. Is there a way to create a series of tint settings that more effectively transition from #1-> to #2->?
(The reason why I'm not doing a fadein is because I'm using the lighting system for a horror game, and want the tint to change from lighter (#2->) to darker (#1->). What I want, particularly, is four in-between commands between the two.)
If I can't do this, would you have any suggestions for how to achieve something similar to what I want?
For pure gray values, there is no real in between, but i've noticed that the color-jump realy depends a lot on the monitors brightness/contrast settings.
Depending on the monitors settings cit can be between #1 and #2 or #2 and #3.
As to a solution, a small work around could be to use dark-purple values to get some colors in between #1 and #2.
Tint set #111111
Tint set #2A112A 'This should be a pretty good in between value.
Tint set #222222
 

Diretooth

Lv. 23 Werewolf
Veteran
Joined
Mar 10, 2013
Messages
1,199
Reaction score
435
First Language
English
Primarily Uses
RMMV
Hmm... That didn't work, the second one is just a more purple version of the third, but I appreciate the attempt. If I can't have in-betweens, then it's not the end of the world. I'll probably figure out a workaround. I actually have an idea that might work.
Thanks for your prompt response.

EDIT:
By using the native tint function of RMMV and setting the darkest needed tint at the 'dark' preset, then making it lighter first by eight, then by fives, I've made it so that it achieves what I needed.
 
Last edited:
Joined
Jul 24, 2016
Messages
403
Reaction score
259
First Language
Dutch
Primarily Uses
@Terrax: I have a switch to turn on/off a light. But the light itself doesn't show? No clue where to look to find the bug. The lighting that is prefixed when entering the map does work so I am at an end of my wits.

*Edit* Alright really weird but in the note tag of the switch I put B50-90 and then it shows. This is weird because I do not have to add B# to any lights that are permanently on the same map with the same note tag. Possible bug? At least it works so I am happy again :mrsatan:
 
Last edited:

Terrax

Veteran
Veteran
Joined
Oct 30, 2015
Messages
304
Reaction score
224
First Language
English
@Terrax: I have a switch to turn on/off a light. But the light itself doesn't show? No clue where to look to find the bug. The lighting that is prefixed when entering the map does work so I am at an end of my wits.
To make a light that you can turn on and off use : Light 100 #FFFFFF 1
When you use this note-tag, the light will be off by default. So for the light to show up, you will need to call
Plugin command : Light on 1
 
Joined
Jul 24, 2016
Messages
403
Reaction score
259
First Language
Dutch
Primarily Uses
@Terrax: Yeah that's already done it's really the B50-90 that needs to be added to make it work for me. Probably some compatibility issue with one of the other plugins, but again already got a workaround so thanks for replying!
 

Xine

Villager
Member
Joined
Oct 31, 2015
Messages
11
Reaction score
0
First Language
English
Hey Terrax,

Awesome plug-in! I've already been using it heavily in my project. I just recently was using 1.5 and updated to 1.5.1, but I'm running into the same issue where the light doesn't move around events correctly. The strange thing is that sometimes the light moves for events as intended, and sometimes it kind of lags behind and catches up, but will lag behind if a character/event stops moving and then resumes movement once again. I'm more-so seeing this during auto-run cut scene events than during free-roaming game play.
 

Terrax

Veteran
Veteran
Joined
Oct 30, 2015
Messages
304
Reaction score
224
First Language
English
Hey Terrax,

Awesome plug-in! I've already been using it heavily in my project. I just recently was using 1.5 and updated to 1.5.1, but I'm running into the same issue where the light doesn't move around events correctly. The strange thing is that sometimes the light moves for events as intended, and sometimes it kind of lags behind and catches up, but will lag behind if a character/event stops moving and then resumes movement once again. I'm more-so seeing this during auto-run cut scene events than during free-roaming game play.
Because big map with lots of events caused to much lag, the plugin loads all events on map-change. If an event is removed its reloaded also, the events are also reloaded every 200 frames. So what your seeing is events catching up after 200 frames.

The only way this can happen, is when the event-count on the map remains the same, but events are moved by some way other then the default move-script. If your moveing events with a script some way you can manualy reload the events with 'plugin command : reload events'

I hope that command can fix your problems.
 

RHachicho

Veteran
Veteran
Joined
Jan 16, 2016
Messages
264
Reaction score
126
First Language
English
I'm having a bit of trouble. I actually was using a very old version of you're plugin. 1.3.1 However you're latest versions appear not to work ... Not sure what to do at this stage. Other than perhaps get my plugin dude to design me a lighting plugin that works with my setup. But if you can give me a clue as to why this might be happening I would be most grateful. Like something major that changed between 1.3.1 and 1.5.1?
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Trauma, drama, llamas--sadly the only one of those things I'm not experiencing RN is the camelids.
Do you ever just write or say nonsense? String together words to make a sentence that sounds pretty but is meaningless?
Writing down my ideas for my next game during break times at work XD I need to finish my current one very soon.
I survived Baudelaire and Bukowski, but I can't face C. Lispector. :kaoswt:

Forum statistics

Threads
93,658
Messages
914,363
Members
123,245
Latest member
putdhikrit
Top