Thank you Vegnarus that was that what I were looking for. Can I bind active and disable to key on keyboard?
Terrax Lighting system
● ARCHIVED · READ-ONLY
-
-
Not yet I'm afraid. Yanfly might release a plugin that activates common events soon so you could use that. But I'm not sure if the Torch can be deactivated through a plugin command. Light off only works on events as far as I'm aware. Terrax, can you shed some light on this? :guffaw:Thank you Vegnarus that was that what I were looking for. Can I bind active and disable to key on keyboard?
-
You can turn off the player light by using the plugin command : 'Light radius 1 #000000'Not yet I'm afraid. Yanfly might release a plugin that activates common events soon so you could use that. But I'm not sure if the Torch can be deactivated through a plugin command. Light off only works on events as far as I'm aware. Terrax, can you shed some light on this? :guffaw:
(it gives the player a lightradius of 1 pixel with a black color)
When its totaly dark, It could be better to use the plugin command 'Light radius 50 #CCCCCC' so you can still see the character. -
Okay, I tested it with 0 radius and it works too. Thanks for clearing that up Terrax.You can turn off the player light by using the plugin command : 'Light radius 1 #000000'
(it gives the player a lightradius of 1 pixel with a black color)
When its totaly dark, It could be better to use the plugin command 'Light radius 50 #CCCCCC' so you can still see the character.
So OneManArmy, with what Terrax said, if Yanfly decides to release that Common Event plugin you can make a Switch called Firefly Light and use two nested conditional branches to create that enable/disable effect.
The first branch will check the inventory for the item and the second one will check whether the Switch is ON or OFF to disable and enable the light accordingly. -
Hmmm I see so I still need to wait I think I understand how to do that when plugin will come out.
Thank you for you help
I would need some additional help -_- when I pick up the jar from the ground the light from it is left on the map even when I pick up the item and erase event. -
I ran a test and you can't currently turn off fire lights. You can do that with regular lights though so you can set the event to be a normal light with the color you want. Instead of Fire radius 100 #FFCC00 write Light 100 #FFCC00 1.Hmmm I see so I still need to wait I think I understand how to do that when plugin will come out.
Thank you for you help
I would need some additional help -_- when I pick up the jar from the ground the light from it is left on the map even when I pick up the item and erase event.
That "1" can be any number and is just used to tag certain lights so that you can use the plugin commands Light on 1 and Light off 1 to turn the lights tagged with "1" on and off. You simply execute a plugin command with Light off 1 after you pick it up and it should turn it off and remember the setting.
---------
Terrax, I think some basic on/off commands for the script should be in to avoid the roundabout way of adding a light tag to enable it. And an on/off command for player and fire lights. Or you can allow fires to use the number tag so that Light off X and Light on X can work on them too.
These are easy enough to implement and they help mitigate confusion and having to use workarounds. Plus it makes the script less sloppy and more refined and straight-forward! :) -
Yeh, that sounds right.. except for one thing... My script is like spagetti with meatballs.. there is no way to make it less sloppy and more refined ;)Terrax, I think some basic on/off commands for the script should be in to avoid the roundabout way of adding a light tag to enable it. And an on/off command for player and fire lights. Or you can allow fires to use the number tag so that Light off X and Light on X can work on them too.
These are easy enough to implement and they help mitigate confusion and having to use workarounds. Plus it makes the script less sloppy and more refined and straight-forward! :) -
I won't comment on the analogy 'cause it's pretty sloppy on its own (pun very intended! :p ) but you can actually do it if you want to. It's better to rewrite or improve the code in the beginning or rewrite it at some point before you keep adding things.Yeh, that sounds right.. except for one thing... My script is like spagetti with meatballs.. there is no way to make it less sloppy and more refined ;)
And a revised version might be a good idea if you don't have other pending projects. It's a great script and that's why I'd love to see it polished. :) -
:) Yeh, its getting a bit messy by adding all the requests. time to divide it up in smaller parts.. ill start on that after i finish the tile stuff.I won't comment on the analogy 'cause it's pretty sloppy on its own (pun very intended! :p ) but you can actually do it if you want to. It's better to rewrite or improve the code in the beginning or rewrite it at some point before you keep adding things.
And a revised version might be a good idea if you don't have other pending projects. It's a great script and that's why I'd love to see it polished. :) -
Nice! Give me a nudge when you're going to do that so we can list the commands the script has and find out where there are gaps or functions missing. And the help files can be rewritten too once everything's done.:) Yeh, its getting a bit messy by adding all the requests. time to divide it up in smaller parts.. ill start on that after i finish the tile stuff.
-
Hi Terrax. I'd like to thank you a lot for your plugin. I was wondering if it would be possible to turn on the light of an event created inside the game. I have a Plugin called Orange Custom Events that allows me to copy an event from one map to another during the gameplay. I use it to allow the main actor to creat a firecamp and place it wherever he wants. That works greatly but I can't find a way to turn the light on this recently created firecam event. Am I doing something wrong?
-
If it's the Fire variation of the light then those don't have switches (yet) I'm afraid. You could do that with regular lights and add a specific number at the end of the tag that is ONLY used by your firecamp event. For example, you can use Light 100 #FFB400 6.Hi Terrax. I'd like to thank you a lot for your plugin. I was wondering if it would be possible to turn on the light of an event created inside the game. I have a Plugin called Orange Custom Events that allows me to copy an event from one map to another during the gameplay. I use it to allow the main actor to creat a firecamp and place it wherever he wants. That works greatly but I can't find a way to turn the light on this recently created firecam event. Am I doing something wrong?
The number 6 here would be reserved for your firecamp throughout all your maps where you can camp. So you can set up lights with switch tags 1 to 5 and 7+ but NOT 6.
Then you can just use the Light on 6 command to turn on the light after you camp. The reservation is mainly to avoid turning on other lights tagged with 6 or whichever number you chose to tag your firecamp event with. -
Hi Vegnarus. Thank you for your reply. I've tried this before and it doesn't work. All events that were previously created together with the map can be lighted by the "Light on" command, but the event created inside the game using the Orange Custom Event Plugin is not lighted even with the "Light on" command. I don't understand much about plugins and scripts, but I think that the Terrax Plugin searches all events during the loading of a map. As the FireCamp is created after the loading of the map, I think that the Terrax Plugin doesn't recognize it as an event.
Sorry about my english. -
It's okay Gabriel, your thought process is spot on and very sensible actually. I thought that there could be a problem as well. Because it's a dynamic event it might not be recognized or read by the script since it's not a static event set on the map.Hi Vegnarus. Thank you for your reply. I've tried this before and it doesn't work. All events that were previously created together with the map can be lighted by the "Light on" command, but the event created inside the game using the Orange Custom Event Plugin is not lighted even with the "Light on" command. I don't understand much about plugins and scripts, but I think that the Terrax Plugin searches all events during the loading of a map. As the FireCamp is created after the loading of the map, I think that the Terrax Plugin doesn't recognize it as an event.
Sorry about my english.
Unless the script checks the events in real time when the plugin command is run, it won't work. I guess you'd have to see how Orange copies the event and modify the code in a way that searches in real time to accommodate new events being created. -
Unfortunantly I understand nothing about scripts and JS. I hope Terrax can fix this, if possible.
-
New version (1.2.0) now available
http://mvplugins.com...Lighting System
Version 1.2.0
New :
* TileLight and RegionLight settings
* To create lightsources without using events you can use the following plugin command.
* TileLight 1 ON #FFFFFF 150 Will create a lightsource (color #FFFFFF radius 150) on all tiles with tile-tag 1.
* TileRegion 1 ON #FFFFFF 150 Will create a lightsource on all tiles with region-number 1.
* TileLight 1 OFF will turn off the lights on tile-tag 1 again
* TileRegion 1 OFF will turn off the lights on region-number 1 again
* TileFire and RegionFire works the same as TileLight, but with fire effect.
* Make sure your map still has at least one event with lights in it, otherwise the script will not run.
*
* TileBlock and RegionBlock settings
* To block lights on certain tiles (roofs for instance) you can use the following plugin command.
* TileBlock 1 ON #000000 Will block light on tiles with tile-tag 1.
* RegionBlock 1 ON #000000 Will block lights on tiles with region-number 1.
* TileBlock 1 OFF and TileRegion 1 OFF turns off the blocking again.
* To darken but not completly block light use a slightly higher color setting (#333333) for instance.
* This function does not raytrace. If the players lightradius is bigger then the blocking tiles the
* light will show on the other side. For the best effect keep the lightradius a bit smaller then the block section.
-
Awesome! This is a great milestone on your script Terrax and it works really well. I also like how you figured out all the different functions you'd need to make in order to make the feature super flexible!
You added regions and terrain tags, you allowed colors for lighter shades, and you included the ability to turn both of these ON and OFF. This added feature has got to be the biggest and smoothest one you've released thus far! ;) -
I can't seem to get it to work no matter how excessive my tests go to meet the guidelines, could you provide me a step by step list on how to get it working a little more clear?
Do I need to add map note tags or anything else I may be missing. -
First of all, check out the demo, the portal to the south goes into an area setup with the tile and region tags.I can't seem to get it to work no matter how excessive my tests go to meet the guidelines, could you provide me a step by step list on how to get it working a little more clear?
Do I need to add map note tags or anything else I may be missing.
Step by step guide.
Regions:
Create a map
Put one event in it with a tag 'Light 100 #FFFFFF' -> this will make sure the script is running
Paint a few regions on the map with number 1
Put one event on the map that runs once with the plugin command 'TileRegion 1 ON #FFFFFF 150'
This will create lightsources on all tiles you painted wiht region 1.
Tile-tags:
Go into the database
Go to tileset
Click on 'Terrain tag'
Click on a certain tile you want to create a lightsource on and set its tag to 1.
Create a map
Put one event in it with a tag 'Light 100 #FFFFFF' -> this will make sure the script is running
Paint a few tiles on the map with terrain tag you just altered to 1
Put one event on the map that runs once with the plugin command 'TileLight 1 ON #FFFFFF 150'
This will create lightsources on all tiles you created with terrain tag 1.
Hope this helps! -
Well i've been on the demo and my own project and I understand it sorta, I've spent two hours trying to work my way through your steps.
How can I explain,
I'm looking to make map tiles automatically produce lights with designated sizes and colours so I can reduce the amount of events on a map.
However trying to give certain tile objects such as a street light the colour yellowy/white and an exit sign the colour green with say a terrain tag 3. The commands do not acknowledge them.
So far I'm not keen on experimenting further on light blocking, I got that part working but it seems to completely blacken the graphic regardless ( not sure if you are aware that other light sources outside the blocked tiles continue to lighten edges)
I'm sorry if I'm being a pain- I'm mostly focusing on trying to reduce the amount of events present on maps. NPC events could benefit better being placed on a spot rather than one that is stationary and only providing light sources.
EDIT
I don't know how I did it, I literally repeated the exact steps I took and it works now. Not sure what happened but it seems to work now.
One little extra thing I'd like to ask is there a way to have a light source have extra intensity? For example I have a street light 3 tiles high, while the ground below is lit up I was wondering if I could have a smaller yet brighter light on the light bulb itself.