Jump to content


Photo

Understanding Victor's Engine - Light Effects

light victor darthvollis tutorial help

  • Please log in to reply
45 replies to this topic

#1 DarthVollis

DarthVollis

    Moogle Master

  • + Premium Members
  • 371 posts
  • LocationSivart's Casino
  • RM Skill - Jack of All Trades

Posted 01 July 2012 - 12:25 AM

*Edit: With this I am using Victor Engine - Basic Module v1.20

I recently learned how to use Victor Sant's Light Effects and I thought everyone could use it.

I only know the Event Light effect at the moment and will post more in the future after I learn them.

Now for the tutorial.

Find and download Victor Engine - Basic Module This is a must.

Then download Victor Engine - Light Effects This is necessary for the lights and comment call to work.

Place these two new scripts in your scripts below material and above main.

From Victor's website or somewhere else download the Lights folder. This folder contains all the graphics for the lights. Put this folder in the graphics folder of your game.

 

Edit: To get the folder of your game simply start the editor with your game and click on the Game tab and click Open Game Folder.

Go to a map that you want lights in follow these steps.

1. Create an event. I call this event the control event for later reasons.
2. Set the event trigger to parallel process. All light events must be set this way if you want them to work in the "background".
3. In the code of the control event pick "comment".
4. For me the control event created my shade. Shade is what makes the screen darker.
5. In the "comment" of step 4 type this:

<create shade>
opacity: (0-255) Comma Here. Pick a number in this range. The larger the number the darker the shade.
blue: (0-255) Pick a number in this range. The larger the number the more "blue" the shade will be. This can be green, blue, or red. This is also optional. I changed my colon to a semi-colon.
</create shade>

6. Now you have your shade. You can continue on from here or create another event for your lights.
7. The lights. For now just going to explain the light events.
8. Just like the control event, the light event (which can be the control event too) is also set to parallel process.
9. The comment code is a little more complex than the shade code, but nothing to frown at.
10. Here is the code:

<event light>
id: 50 Comma Here (This is the light event id, not the event id! I started at 50. This may not be what the starting number is but it works for me.) (Every light event on the same map must have different id's. I made mine in a counting order.)
index: (This is the event id. It can be found in the top left corner of the event. For example, 004 is 4.) Comma Here
name: (This is the name of the light graphic found in the light folder at Graphics/Lights. For example, "light" or "lantern_down") (All the image names here must be enclosed with quotation marks.) Comma Here
opacity: (0-255) Pick a number in the range. The larger the number, the brighter the light will be.
</event light>


Edited by DarthVollis, 09 January 2013 - 01:36 PM.

MoogleFantasy_zpse4aab1d3.gif


#2 Sir

Sir

    Gentleman

  • Ace Member
  • 11 posts
  • LocationSouth Korea
  • RM Skill - Writer

Posted 05 July 2012 - 10:29 AM

This is great!
Im new to VX ace, so im still learning the new scripts and functions, but i know that this will help me immensely later on.
Thank you for this tutorial my good sir.
Indeed.

#3 Alazais

Alazais

    Member

  • Ace Member
  • 13 posts
  • LocationUK
  • RM Skill - Writer

Posted 26 December 2012 - 11:06 PM

I'm really interested in using this script, I want to add nice lighting effects but I can't seem to get it to work, I've created the shade, the map is dark but the light event seems to crash the game instantly giving the error: Line:1049: NoMethodError occured. Undefinied method '[]' for nil:NilClass

 

I'm new to the scripting so I'm not sure what's wrong with the line, I have installed the relevent scripts of Victor's and line 1049 in the lighting script reads:   @x = $game_map.adjust_x(@target[:x]) * 32 - width / 2  + @light.x + 16

 

I'm also not sure what to enter in "light id", the OP says 50 but 50 isn't neeeded? I've tried 50, any random custom number... i'm not entirely sure what i'm numbering here. Everything else is named corrrectly in the comment in the light event and the light.png files are also correctly placed in Graphics/Lights

 

Any suggestions? Thanks!



#4 DarthVollis

DarthVollis

    Moogle Master

  • + Premium Members
  • 371 posts
  • LocationSivart's Casino
  • RM Skill - Jack of All Trades

Posted 27 December 2012 - 02:45 PM

Okay here is the image of my event. All this must be enter as a comment or it will not work. You need one of the event to be the shade control event. As in the image I have the code for the shade. Pay close attention to mine because the place where it says blue has a semicolon. If you have a semicolon here the color will not be what you have here. It has to be a colon for that to work. I didn't won't it to work so I put a semicolon. Now the opacity is how dark it will be. The larger the number the darker it will be. It can go up to 255.

 

Next in that event if you want it to be a light ass will than you need the second part of the code I have up there. For this to work you need a folder in your graphics called "Lights". In this will be all the light images. Victor Sant's script should have this to download somewhere on that page. The ID number is the number of the light event. Every one of the light events need a different one. I like to start off at 50 because that works for me. Remember that once you use 50 that number is not usable again on this map for your lights. The next part is the index. Index is the event ID number. Refer to the top of the event page for this number. Each of your light events must have this and it must be the number of the event. For example in the image mine is 5. That is the event ID number of my event.  Name is the name of the image that is used from the Lights folder. Refer to this folder for all the correct names. Finally the last part is the opacity. This is how bright the light will be. The bigger the number the brighter the light. It can go up to 255.

 

I hope this helps.

 

VictorLight.png


MoogleFantasy_zpse4aab1d3.gif


#5 Alazais

Alazais

    Member

  • Ace Member
  • 13 posts
  • LocationUK
  • RM Skill - Writer

Posted 27 December 2012 - 06:38 PM

Thank you! I believe I was mistakenly writing the name of my event as the ID, as in whatever words I'd called it. After renaming it to the number it works perfectly.

 

The screenshot helped loads, Working perfectly now :)



#6 ShinGamix

ShinGamix

    delinquent but not a law-breaker

  • April Fool Group- gotcha
  • PipPipPip
  • 666 posts
  • LocationAlien Ship
  • RM Skill - Designer

Posted 29 December 2012 - 08:04 PM

I never did get it work right. I finally gave up.


The Topic of Battle Dungeons!!

sg_bar10.png


 

userlo10.png

 

 


#7 Alazais

Alazais

    Member

  • Ace Member
  • 13 posts
  • LocationUK
  • RM Skill - Writer

Posted 31 December 2012 - 05:03 PM

I never did get it work right. I finally gave up.

Literally copy Darth's event line for line, I myself made two events (one for shade and each subsequent one for a light source) but he's shown you can do it with one. You can't go wrong then. Since then I've always copied + pasted the event, updating the light ID and event ID as I go, and each light works fine. It's complicated stuff for me still though :P



#8 DarthVollis

DarthVollis

    Moogle Master

  • + Premium Members
  • 371 posts
  • LocationSivart's Casino
  • RM Skill - Jack of All Trades

Posted 31 December 2012 - 09:43 PM

I took some time to find out what the problem was with ShinGamix's Script or event. He did every thing right, but it wasn't his fault. It turns out that he had a script conflict. The problem is that if you have many scripts as in his case you may have such a conflict. That is a pain.


MoogleFantasy_zpse4aab1d3.gif


#9 Schloops

Schloops

    Going on an Adventure!

  • Ace Member
  • 2 posts
  • LocationThe Shire
  • RM Skill - Artist

Posted 01 January 2013 - 12:22 AM

Does this only work with one event per map?

I am trying to use this event for several torches in one room, but only one will light up, even if I change each of the indexes to match the event. :/


10.jpg

 

 

 


#10 Alazais

Alazais

    Member

  • Ace Member
  • 13 posts
  • LocationUK
  • RM Skill - Writer

Posted 01 January 2013 - 03:28 AM

It can be used as many times as you like, within reason I'd imagine, my first attempt at it that I got working was with 6 torches + a light source between them:

 

Lights.jpg

 

 

I've since been experimenting with dynamic lighting, as in a cutscene with a fire that spreads throughout a town. It's a lot of fun, easily one of my fav scripts.



#11 Victor Sant

Victor Sant

    Advanced Member

  • Ace Member
  • 778 posts

Awards Bar:

Users Awards

Posted 01 January 2013 - 09:30 AM

Does this only work with one event per map?

I am trying to use this event for several torches in one room, but only one will light up, even if I change each of the indexes to match the event. :/

 

Reading the instructions on the script helps a lot:

#  The IDs of the light effects are used as identifiers. Don't use the
#  same value for different light spots, if you do so, one light will
#  replace the other. Also the IDs are used as referece to when
#  removing lights and changing light opacity.

Posted Image


#12 Schloops

Schloops

    Going on an Adventure!

  • Ace Member
  • 2 posts
  • LocationThe Shire
  • RM Skill - Artist

Posted 01 January 2013 - 09:44 AM

Yeah, I actually just figured that out.
I knew it was probably in the instructions somewhere, and I had missed it.
Thanks.

Dang, it was really specific about that, too.
*fails* OTL
I feel silly, now.

Edited by Schloops, 01 January 2013 - 09:46 AM.

10.jpg

 

 

 


#13 DarthVollis

DarthVollis

    Moogle Master

  • + Premium Members
  • 371 posts
  • LocationSivart's Casino
  • RM Skill - Jack of All Trades

Posted 01 January 2013 - 11:35 AM

Don't feel silly. It happens to everyone sooner or later. That is the reason that I wrote this tutorial so that people could benefit for what I have learned. Now I have lights in every single house, dungeon, and anywhere else I want in my game. It is almost unlimited.


MoogleFantasy_zpse4aab1d3.gif


#14 Keith_Nicolas

Keith_Nicolas

    Newbie

  • Ace Member
  • 3 posts

Posted 02 January 2013 - 10:19 PM

I copied Darth's script and pasted it onto my even light but i recieved an error before entering my game

 

Script "Lights" line 1049: NoMethodError occured.

undefined method `[]' for nil:NilClass

 

Help. :/



#15 DarthVollis

DarthVollis

    Moogle Master

  • + Premium Members
  • 371 posts
  • LocationSivart's Casino
  • RM Skill - Jack of All Trades

Posted 02 January 2013 - 11:10 PM

First off, it isn't my script. It belongs to Victor Sant. I wrote this to help people who are using it.

 

Second, do you have both scripts that are needed? If so, do you have a folder called "lights" in your Graphics directory?

 

Third, don't just copy my event. You must make the index the same number as your event. Ergo, if your event is number 118 then the index is 118. If you are still having trouble post a picture here and I will help.


MoogleFantasy_zpse4aab1d3.gif


#16 Karay68

Karay68

    Newbie

  • Ace Member
  • 2 posts

Posted 13 February 2013 - 03:07 AM

Hi, i've got trouble with this script.

I followed step by step your tutorial(Event light with my event ID,Lights folder in Graph folder etc..)

but when i launch the game i get an error:

 

Script "victor engine light effects" line 734:ArgumentError occured.

wrong number of arguments (1or 0)

 

Thats the line in the script:

727 class Spriteset_Map

728    #--------------------------------------------------------------------------
729    # * Alias method: initialize
730    #--------------------------------------------------------------------------
731    alias :initialize_ve_light_effects :initialize
732    def initialize
733        initialize_ve_light_effects
734        2.times { update_light(true) }
735  end

 

All Victor's script i took are updated

Sorry i'm a real noob it's my first game and when i watch a script i see hieroglyph and get headaches

PLEASE HELP :'(



#17 Titanhex

Titanhex

    Academy Headmaster

  • + Premium Members
  • 1,361 posts
  • LocationHeadmaster's Office
  • RM Skill - Jack of All Trades

Posted 13 February 2013 - 03:30 AM

Common error.

 

I actually had to tweak it to figure it out.

 

Mine had to do with how I was setting the index to 1 instead of 0 for the index of the actor light. Set it to 0 and it worked.

 

If you continue to have problems, post your comment here.


Edited by Titanhex, 13 February 2013 - 03:30 AM.

Ace Academy: Practice Through Roleplay
Ace-Academy.gif

Come Join!


#18 Karay68

Karay68

    Newbie

  • Ace Member
  • 2 posts

Posted 13 February 2013 - 04:59 AM

Hi Titan

Humm.. how and where can i set that, please?



#19 DarthVollis

DarthVollis

    Moogle Master

  • + Premium Members
  • 371 posts
  • LocationSivart's Casino
  • RM Skill - Jack of All Trades

Posted 16 February 2013 - 04:20 PM

I have seen this a lot and I was also wondering where do you set that?


MoogleFantasy_zpse4aab1d3.gif


#20 woutor

woutor

    Newbie

  • Ace Member
  • 1 posts

Posted 19 August 2013 - 07:49 AM

Hello,

I have  some issues with the lighting effect.

The shades are working perfectly, but the lighting just won't do.

 

Do you guys know what i did wrong?

 

 

 

<event light>
id: 50, index: 4, name: ''light'', opacity: 160
</event light>
 
id of event is 004
paralell procces is on.






Also tagged with one or more of these keywords: light, victor, darthvollis, tutorial, help

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users