Terrax Lighting system

Fitcher

Veteran
Veteran
Joined
May 3, 2015
Messages
50
Reaction score
7
First Language
Finnish
Primarily Uses
I want to thank Terrax for a great plugin. Amasing work !

I started to use this plugin in a dungeon of my game. I am currently using a  day/night system with different tint tones dependent on a variable in a paralell common event .

I want the variable to set the tint not the clock because it gives me more control over the different events i use at certain variable numbers.

Is it possible to use the day night tints/colors from this plugin instead of the in built tint screen in MV ?

Can i by that also when it dark in my other village, city or forest  maps use tourch or flashlight items? 

Sry my bad English.
I am actually trying to get the same thing working as you but at the moment it is possible but it will not be so smooth with the tint/collor change.

As i asked about a feature that will help with this and Terrax sad it will be in future updates.

But untill now you can make a map with DayNight in the event note.

Set an event to run "Daynight speed 0"

After that if you got the hours saved to a variable you can make a common even to run every hour with multiple Conditional Branch to check the hour variable and then use plugin command "Daynight hour x"

Where X is the number for the hour.

Its hard to explain but once i get this to work i might make a demo on it, if i get permission using two different plugins one for the time/date and terrax plugin for lights.
 

Vegnarus

Veteran
Veteran
Joined
Jan 15, 2015
Messages
103
Reaction score
23
Daynight tag in map's note.. sounds good, ill take a look

Daynight colors in file.. sure but i don't have a clue how to load save from files, so help would be needed.

Did take a look at terrain tags, but i couldn't figure out how each tile was encoded, if you have a page that explains it, please forward it.
Nice! DayNight in map notes will keep things tidy and you can keep the current event method for people to manually switch it on in maps. (after a point in the story or for whatever reason they may have in mind)

I'll send you a PM for the other two points.
 

Terrax

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

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

Version 1.1.8

Fixed : Lots of bug fixes for moving events.

           Non moving events can have flashlights now as well (extra option to set the direction until i can figure out the direction of non-moving events from the data)

           A bit of new code in the shrinking/growing orbs to control speed (thanks gattsbr)

           Daynight setting can be set in the note-tag of the map now, as well as in a note-tag on an event as before.

New : The Tint system.

 * As an alternative to the daynight cycle you can use the tint system. If you want to use another plugin for the day/night cycle, the tint option is probably best to use.

* The plugin command 'Tint set #333333' will make the room less dark (this replaces the lightsource with the very large radius for a not-so-dark effect.)

 * The plugin command 'Tint fade #777777 5' will fade the color from the current tint color to the new, the last number (5) is the speed of the fade, were 1 is a fast fade and 20 is a slow one.
 * If an map has a daynight cycle system, the tint system is disabled (they don't mix well).

Lots of changes this update, so i hope i didn't slip in to many new bugs.. let me know if you find any.
 
 

Fitcher

Veteran
Veteran
Joined
May 3, 2015
Messages
50
Reaction score
7
First Language
Finnish
Primarily Uses
Awesome update! i check it out right away and if i come up with any bugs i let you know.
 

Fitcher

Veteran
Veteran
Joined
May 3, 2015
Messages
50
Reaction score
7
First Language
Finnish
Primarily Uses
I just noticed that every time i use the light off plugin command i get a text "RESET3" where the daynight time debug would be.
 
Last edited by a moderator:

gattsbr

Villager
Member
Joined
May 3, 2015
Messages
10
Reaction score
0
First Language
english
Nevermind! already fixed! lol

 
I just noticed that every time i use the light off plugin command i get a text "RESET3" where the daynight time debug would be.
Comment out Line 406 

Code:
    $gameVariables.setLightArrayId(lightarray_id);    $gameVariables.setLightArrayState(lightarray_state);    Graphics.Debug('RESET3','RESET3');}
to :
Code:
    $gameVariables.setLightArrayId(lightarray_id);    $gameVariables.setLightArrayState(lightarray_state);    //Graphics.Debug('RESET3','RESET3'); // <---- this line}
At least until the next update ^.^
 
Last edited by a moderator:

Terrax

Veteran
Veteran
Joined
Oct 30, 2015
Messages
304
Reaction score
224
First Language
English
I just noticed that every time i use the light off plugin command i get a text "RESET3" where the daynight time debug would be.
:) Something leftover from a debugging session, its fixed now, just download 1.1.8 again.
 

gattsbr

Villager
Member
Joined
May 3, 2015
Messages
10
Reaction score
0
First Language
english
So it seems like if combat is entered, and then the command to turn off a light is sent, the light effect gets turned off, but the event's self switch D doesn't shut off.


--Nevermind, I've got something weird going on o_O
 
Last edited by a moderator:

SuperBlaze

Veteran
Veteran
Joined
Oct 29, 2015
Messages
29
Reaction score
10
First Language
Norwegian
Primarily Uses
RMMV
Thx for the update Terrax.

I can survive if the collors is not exacly the same as my tints as long as i can use the plugin comands on the different plugin/tints im my common event with my cycle variable. I just need to be able to use  the plugins  light object and tourch effect in my different maps all day long at all maps,Thats what i`v been strugling to cope.

I will check the update when i get home from work,
 

Fitcher

Veteran
Veteran
Joined
May 3, 2015
Messages
50
Reaction score
7
First Language
Finnish
Primarily Uses
Alright!, now i finally got my day and night plugin to work 100% perfect with your lights!

Thank you terrax!
 

SuperBlaze

Veteran
Veteran
Joined
Oct 29, 2015
Messages
29
Reaction score
10
First Language
Norwegian
Primarily Uses
RMMV
I would be delighted to look at your Demo Fitcher. I still have a issue on how to implement the plugin comands instead of the tints that I\v been using in my day/night common event.
 

Fitcher

Veteran
Veteran
Joined
May 3, 2015
Messages
50
Reaction score
7
First Language
Finnish
Primarily Uses
I would be delighted to look at your Demo Fitcher. I still have a issue on how to implement the plugin comands instead of the tints that I\v been using in my day/night common event.
I got the demo ready, hope you dont mind the bad spelling and explanation as english is not my main language.

But just by looking at what i done it should give you a pretty decent idea how i set it up.

I used a day/night plugin in the demo but as long as you get the hours saved to a variable you can do the same with only the light plugin.

Link to demo
 
Last edited by a moderator:

gattsbr

Villager
Member
Joined
May 3, 2015
Messages
10
Reaction score
0
First Language
english
Copypasta torches that have to be relit after X seconds... sorta.
 
 

So it seems like if combat is entered, and then the command to turn off a light is sent, the light effect gets turned off, but the event's self switch D doesn't shut off.

--Nevermind, I've got something weird going on o_O
 
What I attempted:

What I originally tried for was an event that I could literately just copy paste, and then when the player triggered it, it would turn that specific event light on, and then after 3 mins turn specific event light off. And it actually DID work... sorta.

What I tried to do, was grab the event ID of that event, get the note of that event, then strip out the switch number in the note, replacing it with the event ID, then call the Light on id plugin command using the event ID, followed by a timeout that would call the Light off id plugin command. This part worked completely fine.

Where this failed:
I was unaware that when you push escape(pull up menu), or enter combat, and prob some other things, that the $dataMap is repopulated with the original event info, so that note tag I modified to use the event id as the light id switch, was reset to whatever was originally typed in the event editor note box.
 
Effect of this failing:
When the $dataMap was repopulated, the light effect from any lights enabled this way would just not be active, self switch D on them would still be enabled, so graphically the event it self looked like it was turned on, but the light effect from the script wasn't present.
 
What I've done:
In view of the reason this failed, I simply decided that with the way things currently are, what I can do is set the light id switch on each event after copy paste to what ever the event id is. However failure to change this will result in turning on/off the wrong lights. So I added in NastyTextPop for a simple on screen message telling me I did something wrong.  This could also have been a Graphics.debug or console.log call as well. I just wanted something that would tell me things were wrong while testing. Also if things are wrong i'm calling the plugin command to deactivate the light script (Which btw is a great feature Terrax!). The way I'm checking if things are wrong is by grabbing the note field and comparing the event id to the id in the note field.
 
Script with Graphics.Debug error:
var time_ms = 180000;var id=this._eventId,noteSplit=($dataMap.events[id].note).split(" "),plug=new Game_Interpreter();var command=noteSplit[0].toLowerCase();var noteId=(command==='light'||command==='fire'?noteSplit[3]:command==='flashlight'?noteSplit[4]:-1);if(id!=noteId){plug.pluginCommand('light',['deactivate']);Graphics.Debug("ERROR!", 'Event ID:'+id+' has requested noteId:'+noteId+'.');}plug.pluginCommand('light',['on',id]);function timer(plug,id,ms){setTimeout(function(){plug.pluginCommand('light',['off',id]);},ms);}timer(plug,id,time_ms);
 
Script with console.log error:
Code:
var time_ms  =  180000;var id=this._eventId,noteSplit=($dataMap.events[id].note).split(" "),plug=new Game_Interpreter();var command=noteSplit[0].toLowerCase();var noteId=(command==='light'||command==='fire'?noteSplit[3]:command==='flashlight'?noteSplit[4]:-1);if(id!=noteId){plug.pluginCommand('light',['deactivate']);console.log('ERROR! Event ID:'+id+' has requested noteId:'+noteId+'.');}plug.pluginCommand('light',['on',id]);function timer(plug,id,ms){setTimeout(function(){plug.pluginCommand('light',['off',id]);},ms);}timer(plug,id,time_ms);
 
Script with NastyPopText error:
Code:
var time_ms  =  180000;var id=this._eventId,noteSplit=($dataMap.events[id].note).split(" "),plug=new Game_Interpreter();var command=noteSplit[0].toLowerCase();var noteId=(command==='light'||command==='fire'?noteSplit[3]:command==='flashlight'?noteSplit[4]:-1);if(id!=noteId){plug.pluginCommand('light',['deactivate']);this.NastyTextPop({text:'ERROR! Event ID:'+id+' has requested noteId:'+noteId+'.',id:-1,time:360,outlineColor:'#FF4444',outlineWidth: 2})}plug.pluginCommand('light',['on',id]);function timer(plug,id,ms){setTimeout(function(){plug.pluginCommand('light',['off',id]);},ms);}timer(plug,id,time_ms);
 Image in event editor:

Untitled-1.jpg
 
Last edited by a moderator:

Kirika

Villager
Member
Joined
Aug 12, 2014
Messages
23
Reaction score
1
First Language
na
Primarily Uses
N/A
Daynight setting in the note-tag of the map dont work if there present other arguments (i use it to control overlay plugin)
 

dancinhero

Cheese man
Member
Joined
Oct 15, 2012
Messages
11
Reaction score
1
First Language
English-arabic

EternalShadow

Veteran
Veteran
Joined
Sep 16, 2012
Messages
5,805
Reaction score
1,051
First Language
English
Primarily Uses
This is great.


When I'm using the flashlight though, it seems the radius around the player has to be at least 1 for the flashlight to work. However, if a game is being made where the player's only line of sight is actually within the flashlight, this is a bit of a downer given that they can see 1/2 of a tile around them with the light radius of 1!


Could it be set so that if the radius around the player is 0, they cannot see anything around them except what is in the flashlight?


Thanks.


EDIT: And also some sort of feature to prevent light passing through or onto ceilings (use a notetag for this perhaps) and events without (or with, depending on config, as some games may have more items to tag one way or another) a certain notetag?


EDIT 2: And also, what about a way to change a certain event's light radius, not just the player's?


And also a way to increase the severity of fire flickering, independently by event?


XD
 
Last edited by a moderator:

Eff-n-Geoff

Veteran
Veteran
Joined
Oct 26, 2015
Messages
182
Reaction score
7
First Language
English
Hi there, sorry to be so late in the game here - but i've downloaded the demo's and ran through everything in the help file but I can not seem to activate it

Basically what I need is a constant flashlight in the game projecting from the player - the minute the game starts it should set the map to black and activate the flashlight ... could somebody describe the steps as if they were speaking to an idiot (cos clearly I am one!)

Thank you in advance!
 

lillunatik

Villager
Member
Joined
Jan 23, 2014
Messages
6
Reaction score
1
First Language
English
Primarily Uses
I must be doing something wrong to get a SaveVariable Lighting error...after loading a game from a save point with lighting around.
 

goldenhades

Villager
Member
Joined
Feb 2, 2013
Messages
16
Reaction score
2
First Language
french
Primarily Uses
i really love that awesome plugin Terrax thanks a lot
i have an idea of a new feature that would be nice

if we could make either event or stuff to be able to stop the light of the torch.

Like in my image we saw that the fire on the wall light everything in his radius even the top of the wall , or a little of the other room where it did not connect.
http://www.mediafire.com/view/s2da1awty93ge6x/Sans%20titre.png#

Maybe i just miss something and we could already do that or its a new idea.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Fekken kill me. I unknowingly swapped out two important events's codes and saved the game to test it. I'm just doing this for fun and the fun has now been replaced with excruciating torture.
Is this how game developers feel all the time?

EDIT:
WAIT HOLY S***
MY LAST POST ASKING FOR HELP ON AN EVENT ACTUALLY SAVED IT
OH MY GOD
Coffee + Silk Coconut Milk + Splenda Zero = Not ..... awful :/ .
I was making a cutscene where Hero's dad got killed by the dragon but when he lose its say game over and send you to the tittle screen. How can remove game over for that cutscene
My new RPG Maker music pack, Emotional: Redemption, is now in progress and will be coming to RPG Maker soon. It is an album that focuses on emotional themes including the darker forms of sorrow and despair. Below is a demo of a composition from the album.

Please watch out for your hands when handling chests! XD Did this a few days ago, it was fun to animate

Forum statistics

Threads
94,445
Messages
920,978
Members
124,257
Latest member
Zookx1
Top