Announcement
Announcement
| Crystal Fantasy takes 1st as the 2013 2nd Quarter Contest Winner!!! See the Community Announcements section. |
New threads (complete scripts) here will go into a moderation queue. You will not see your thread appear when you create it. A moderator will decide if it will be approved or denied.
![]() ![]() |
Dec 6 2010, 10:08 PM
Post
#1
|
|
![]() ![]() Type: Coder Alignment: Chaotic Good |
Lighting System For Caves and Spooky Areas by Raoul589 Introduction This script is used to create a dark ambience with light sources. Good for puzzles and atmosphere. Check the screenshots below. Features - Easy script methods for adding and removing light sources, and setting light level - Three types of light source: -> Attach a light source to the player (e.g. for a lantern) -> Attach a light source to an arbitrary location on the map -> Attach a light source to an event. The light source will move with the event. - Support for lightning effects - The size and shape of the light sources can be customised - Compatible with all menus and the standard battle system (quite possibly non-standard ones too) - Full and detailed usage documentation - If you are careful, compatible with most any other script Screenshots Spoiler: Spoiler: Spoiler: Spoiler: How to Install: This bit has a few instructions, but remain calm. They are individually quite simple, and we'll step through them. - Paste the main script code into the "materials" section of the script editor. Above Main and below the other stuff. - Bear with me here. We need to add 4 lines to the core classes. Don't worry, it won't hurt the engine in any way. Firstly, add the following lines to the Scene_Base script: Spoiler: Now, add the following lines to the Scene_File script: Spoiler: - Whew, we're through the tough part. Finally, put a file called "LightStamp.png" into the "Graphics/Pictures/" folder. This will determine the size and appearance of the lights in the game. If this picture is not in the folder, the script will still work, but the game will take about 30 seconds longer to start up as the game draws a default light stamp from scratch. Three sample light stamps are provided with the demo and the one used in the demo is attached. Once you have done these things, you can use the methods provided in the script whenever you want. Go for your life. Typically, the methods are called using the form $lights.methodname(arguments) A full description of how to install and use the script is given in a word document in the demo called 'Lighting System Specifications'. Demo A demo is provided in the attachments section. Script Spoiler: FAQ: Q: Where can I find out more information about this script? A: Have a look at the word document provided with the demo. Of course, you can always post something here. Q: Have you made any other awesome scripts? A: Well, you could always check out my other script. It's called 'Fine Character Control'. You could be the first to reply! Please download the latest demo if you plan to copy the script straight from the demo. Credits: - Original script written by Raoul589 - Thanks to Dizzie for providing the light stamp image Notes: - There are a few limitations with the script, outlined in the accompanying word document and demonstrated in the demo. The main thing to remember is that this, being a graphical script, is not a cheap script to run, and so you should be careful not to go overboard. - If you wish to make your own light stamps, and you have Windows, you can run the attached program 'CircleDrawer' to draw a new light stamp of specified size and opacity etc. This post has been edited by ???nOBodY???: Mar 22 2013, 08:56 AM
Attached File(s)
CircleDrawer__NOT_THE_DEMO_.zip ( 8.98MB )
Number of downloads: 273
Lighting_Demo.zip ( 836.22K )
Number of downloads: 419
Lighting_Demo_1.1.zip ( 838.07K )
Number of downloads: 811 |
|
|
|
Dec 7 2010, 08:45 PM
Post
#2
|
|
![]() Every Moogle's Worst Nightmare; plus ramen ![]() Type: Coder Alignment: Chaotic Neutral |
Very interesting. Reminds me of Golden Sun. XD Nice script you've got there!
-------------------- *It is time to update the Master Script List! Stop by and help out at the Master List Update Project.
*Oh? You have feedback for me? Take it to The Shadowed Topic. *By entering the RGSS2/Ruby Scripting section, you are agreeing to abide by The Coder's Creed. My Scripts Spoiler: ACK Script Requests Spoiler: My Heart (Resources) Spoiler: Projects Project AMBROSIA *something generically clever* Support Bars Spoiler: |
|
|
|
Dec 8 2010, 04:20 AM
Post
#3
|
|
![]() ![]() Type: Coder Alignment: Chaotic Good |
|
|
|
|
Dec 8 2010, 08:36 AM
Post
#4
|
|
![]() Pixel Thief ![]() Type: Spriter Alignment: Lawful Good |
Very good, now I don't have to use pictures...
Great job! This post has been edited by pjcr: Dec 8 2010, 08:37 AM -------------------- |
|
|
|
Dec 8 2010, 10:15 AM
Post
#5
|
|
![]() ![]() Type: Writer Alignment: Neutral Good |
Great! I really need this script!
Finally, I can darken my cave dungeon in my project. Thanks! -------------------- |
|
|
|
Dec 9 2010, 09:01 AM
Post
#6
|
|
![]() どのような ![]() Type: Writer Alignment: Chaotic Neutral |
I get an error every time I shut my project down after activating the script:
Script 'Lighting' line260: RGSSError occured. disposed sprite It happens when I play the demo as well. Don't know specifically what it means, but otherwise, the script works perfect. |
|
|
|
Dec 9 2010, 09:48 AM
Post
#7
|
|
![]() ![]() Type: Designer Alignment: Neutral Good |
Cool, I really like this!!! Thanks!
|
|
|
|
Dec 9 2010, 02:09 PM
Post
#8
|
|
![]() ![]() Type: Coder Alignment: Chaotic Good |
I get an error every time I shut my project down after activating the script: Script 'Lighting' line260: RGSSError occured. disposed sprite It happens when I play the demo as well. Don't know specifically what it means, but otherwise, the script works perfect. Thanks for reporting the error. I couldn't replicate it, but I made a small change to the script which should get rid of the problem. It is reflected in both the demo and the main post, so if you want to fix the problem, just try overwriting the Lighting script with the now changed one in my post. |
|
|
|
Dec 9 2010, 02:45 PM
Post
#9
|
|
![]() Type: Artist Alignment: Chaotic Evil |
Great! Now every time asks how to make a puzzle that includes the player holding a lantern and give light only around them, I'll just direct them to this script
|
|
|
|
Dec 9 2010, 11:37 PM
Post
#10
|
|
![]() ![]() Type: Undisclosed Alignment: Unaligned |
Hi... Guys!! I don't wannts to be a smart ass or something
but I think it's hard to add this script for the newbie because they are afraid to mess with the default script in script editor so I made a few edit about this script. . . . . . sso they can add this script on material section!! here it goes just add it below material and your good to gow Spoiler: By the way your script is awesome man . . .!!! |
|
|
|
Dec 10 2010, 12:44 PM
Post
#11
|
|
![]() ![]() Type: Coder Alignment: Chaotic Good |
Hi... Guys!! I don't wannts to be a smart ass or something but I think it's hard to add this script for the newbie because they are afraid to mess with the default script in script editor so I made a few edit about this script. . . . . . sso they can add this script on material section!! here it goes just add it below material and your good to gow Spoiler: By the way your script is awesome man . . .!!! Hey, thanks for your input. To be entirely honest, I *cough* haven't actually ever learned how to alias ruby methods in the way you have done... On a side note though, have you tried saving and loading with the script you posted? I don't know if it's just my project, but I get an error related to the alias when I try to save. If you could have a look again at the script, that would be helpful. And I would be happy to make your changes to my script if I was sure it would be stable. |
|
|
|
Dec 15 2010, 01:37 PM
Post
#12
|
|
![]() Type: Designer |
Hey, Raul589, awesome script man!
I have a problem with it tough. I have followed your instructions carefuly and implemented the script into my project, but for some reason when I test the map nothing happens. I took some events from your demo and still nothing. But when I place that chumby guy from the first map of your demo, who demonstrates one possibility of the script, and try to talk to him in my map I get the following error: ????? 'Lighning' ? 167 ??? NoMethodError ???????? undefined method 'real_x' for nil:NilClass I don't have much knowledge about scripting, so I can't really find what porblem is about or how to fix it. Could it be a compatibility issue? I have quite a lot of scripts in the project. If you have any idea how to make it work please let me know. |
|
|
|
Dec 19 2010, 11:59 AM
Post
#13
|
|
![]() Type: Coder |
Nice script, but it seems that in battles, the background is still black.
This post has been edited by Secretmapper: Dec 20 2010, 07:27 AM |
|
|
|
Dec 23 2010, 10:24 AM
Post
#14
|
|
![]() ![]() Type: Coder Alignment: Chaotic Good |
Hey, Raul589, awesome script man! I have a problem with it tough. I have followed your instructions carefuly and implemented the script into my project, but for some reason when I test the map nothing happens. I took some events from your demo and still nothing. But when I place that chumby guy from the first map of your demo, who demonstrates one possibility of the script, and try to talk to him in my map I get the following error: ????? 'Lighning' ? 167 ??? NoMethodError ???????? undefined method 'real_x' for nil:NilClass I don't have much knowledge about scripting, so I can't really find what porblem is about or how to fix it. Could it be a compatibility issue? I have quite a lot of scripts in the project. If you have any idea how to make it work please let me know. Hello Nexy, If you have a lot of scripts, what you have to be careful about is that the other scripts aren't simply overwriting the four changes you were instructed to make in the core scripts. If any of the other scripts implement the methods referred to, e.g. Scene_Base::update or Scene_Base::start, then you will need to make the instructed changes there instead. If you want to know if the other scripts are interfering with mine, a good start would be to go into them and do a ctrl-f (find) and look for "def start" and "def update". If you find them, that could well mean the changes made to the core code are being overwritten, and so the changes need to be made in the custom scripts instead. If you send me a link to a copy of your project, I would be happy to look through it; it would help for making my script more compatible with other random scripts. |
|
|
|
Dec 23 2010, 10:28 AM
Post
#15
|
|
![]() ![]() Type: Coder Alignment: Chaotic Good |
Nice script, but it seems that in battles, the background is still black. Hey, I'm not entirely sure what you mean, but the battle background should just be the standard one, i.e. a warped version of whatever was on the screen at the point when battle commenced. In the case that the lights were turned down very dark and not many lights were on the screen, the battle background would be pretty much black. If this is not what you meant, please tell me and maybe give a screenshot? |
|
|
|
Jan 1 2011, 07:28 PM
Post
#16
|
|
![]() Type: Undisclosed |
hi, thanks for the script. sorry me noob here. got a little problem.
i tried to off one of the static light. let say i on $lights.addstationarysource(10,8), so when i want to off the same source i call $lights.removesource(lights.addstationarysource(10,8)).. is it true the way i used? cause i got error message 'wrong number of arguments(0 for 1)'. i also tried $lights.removesource(10,8) but got another error. |
|
|
|
Jan 5 2011, 10:27 PM
Post
#17
|
|
![]() ![]() Type: Coder Alignment: Chaotic Good |
hi, thanks for the script. sorry me noob here. got a little problem. i tried to off one of the static light. let say i on $lights.addstationarysource(10,8), so when i want to off the same source i call $lights.removesource(lights.addstationarysource(10,8)).. is it true the way i used? cause i got error message 'wrong number of arguments(0 for 1)'. i also tried $lights.removesource(10,8) but got another error. That's a really good try at using it. Come back in a couple of days and I will have made the script do just what you wanted (because I think the way you tried to use it is a good idea). The intended way to do what you are trying to do is this: $mylight = $lights.addstationarysource(10,8) then $lights.removesource($mylight) As I said, I really like the way you used it. I think I will script in support for doing that in the next couple of days. EDIT: I made a few little changes to the script. If you copy the new script into your project again, you should be able to use $lights.removesource(10,8) as you initially tried to. This post has been edited by Raoul589: Jan 5 2011, 11:52 PM |
|
|
|
Jan 10 2011, 01:00 AM
Post
#18
|
|
![]() One man Pen ![]() Type: Undisclosed Alignment: Neutral Evil |
*Sigh* I must be a moron or something. Cuz I can only get the $lights.off command to work anything else Doesn't want to work like $lights.setlightlevel(50). Any help is great, Feel free to call me a Nub or Moron.
This post has been edited by -Ender©: Jan 10 2011, 01:01 AM -------------------- ![]() As a halo fan I am obligated to call you a Noob Biscuit and tell you to commit suicide for the blasphemy you just wrote |
|
|
|
Jan 11 2011, 03:59 AM
Post
#19
|
|
![]() ![]() Type: Coder Alignment: Chaotic Good |
*Sigh* I must be a moron or something. Cuz I can only get the $lights.off command to work anything else Doesn't want to work like $lights.setlightlevel(50). Any help is great, Feel free to call me a Nub or Moron. Hey, $lights.off activates the system itself. So you won't see any effect at all until you have called that. To put it another way, you can think of it as $lights.(turn darkness effect on). So if you want to set the light level to 50, try going $lights.off $lights.setlightlevel(50) What that would do is make the screen quite dark, but you still will be able to see a little. If the problem is deeper than this, feel free to give more details. |
|
|
|
Jan 13 2011, 01:29 AM
Post
#20
|
|
![]() One man Pen ![]() Type: Undisclosed Alignment: Neutral Evil |
Hey, $lights.off activates the system itself. So you won't see any effect at all until you have called that. To put it another way, you can think of it as $lights.(turn darkness effect on). So if you want to set the light level to 50, try going Thank you so much. I should have thought of that earlier. And... Is their anyway to make the circle of light bigger? **EDIT** Ok Thanks For Help any how It would be awesome if you did add the size chager into the script ** EDIT END** This post has been edited by -Ender©: Jan 13 2011, 06:55 PM -------------------- ![]() As a halo fan I am obligated to call you a Noob Biscuit and tell you to commit suicide for the blasphemy you just wrote |
|
|
|
![]() ![]() |
| Lo-Fi Version | Time is now: 20th June 2013 - 04:45 AM |
|
|