Lights, Lighting, Dark, and Darkness (ACE)

Discussion in 'RGSSx Script Support' started by JLeeT82, Aug 18, 2012.

Thread Status:
Not open for further replies.
  1. JLeeT82

    JLeeT82 Villager Member

    Messages:
    23
    Likes Received:
    0
    Location:
    Raleigh, NC
    First Language:
    English
    Since this is my first post, please bear with me. It seemed like this was the best place to ask about this. If I am wrong please let me know. All I ask for is some assistance.

    So I've gone through many tutorials for the ACE editor, and I'm starting on my project (maybe a little too ambitious) and I noticed/realized that in the editor there is no real direct control over lighting conditions outside of a screen tint. Now I've done some digging around and I know there are scripts for this kind of thing, but scripting is something I don't have a lot of experience in (I am a Game Design & Game Art double major graduate). I have some programming knowledge and experience but nothing close to "ceritifed."

    Is there any straightforward (non-scripting) way to manipulate this outside of tinting the screen? Using this doesn't really "work" in the sense that it covers up all lighting effects since it's a "camera lense" affect. Outside of putting the shader pen to work on maps manually and only using stationary light sources (lamps/torches, anything affixed to a surface).

    So far in my reasearch I am really surprised to see that this editor really has everything you'd want.......except a straight forward lighting manipulation system. The project I am making will require me to utilize darkness and a lack of light in many different scenarios (kind of like "Sweet Home" meets "Earthbound" is what I am going for).

    I also dug around on the wiki and found many script links there, but as I said scripting is not my strong suit. I have (thus far) been doing well with the event editor just working on the fly. I did a lot of programming as a kid (from BasicA) through highschool (#C), but after that I stopped, and that was.....over 10 years ago. So I can recognize and see patterns in scripting, but manipulation is something I don't have a lot of "current" experience in.

    Any assistance on this would be an amazing help.

    Thanks to everyone!

    Sincerely,

    Jason Taylor
     
    Last edited by a moderator: Aug 18, 2012
    #1
  2. Lunarea

    Lunarea Artist Global Mod

    Messages:
    8,847
    Likes Received:
    7,835
    One of the ways to go about it is to use Show Picture command. It involves taking a screenshot and using a layers art program (such as Photoshop) to paint a layer over the screenshot - using low opacity "fill" for shadows and using a soft brush to erase portions that need to be lit. Then, you would delete the bottom (screenshot) layer and you would have a semi-transparent picture. Import it and display it via "Show picture", and you've got custom lighting. :)

    There are a couple of other things you may need with this method- such as a script to affix the lighting picture so it doesn't scroll with the screen when your map is larger than 17x13, and using parallel process to display the lighting image automatically. But the gist of it is just making your custom lighting in an art program.
     
    Last edited by a moderator: Aug 18, 2012
    #2
  3. Solistra

    Solistra Veteran Veteran

    Messages:
    593
    Likes Received:
    242
    Actually, you've pretty much listed the ways that you can easily manipulate lighting in any of the recent RPG Makers that I know of. None of them have a built-in lighting system, and there aren't any really easy ways to change that. Honestly, the easiest things that I can think of are using scripts (which really aren't that difficult to use, by the way), painting the light as a separate layer that's shown with the Show Picture command, or using character graphics as lights (if you're crazy enough to do that). I know that there are other methods of doing it, but those are the simplest to control in my experience.
     
    #3
  4. JLeeT82

    JLeeT82 Villager Member

    Messages:
    23
    Likes Received:
    0
    Location:
    Raleigh, NC
    First Language:
    English
    I've considered this approach but the problem that exists with this type of approach is that it would only work with static light fixtures. Any "living" light source that fluctuates (like the flicker of a candle for instance) should fluctuate. Even if it's only 8-16 frames of the same light radius repeating, it's still a "flicker" or a "fluctuating" light source, which makes it feel more realistic than let's say...the unnatural light of a flourescent light fixture you'd find in an office. So in some environments it could work, unless you want some kind of animation involved.
     
    #4
  5. Lunarea

    Lunarea Artist Global Mod

    Messages:
    8,847
    Likes Received:
    7,835
    There's quite a bit you can accomplish with "Move Picture" - effectively animating the light areas. I've done this myself with things like sun rays. It's a bit more involved than just a single event command, but it's possible. :)
     
    #5
  6. Solistra

    Solistra Veteran Veteran

    Messages:
    593
    Likes Received:
    242
    Just to elaborate a little bit, it's not too hard to create an event with the Parallel Process condition that would continually run, moving the pictures around. With Move Picture, you can adjust the X and Y positions of the light as well as the opacity pretty easily. Just keep in mind that you'll want to have a Wait command of at least 1 frame at the end of the Parallel Process event to keep it from chewing up resources by constantly updating, though.

    And I'm still going to mention that I believe it could be potentially much easier to use scripts for this, but that's up to you.
     
    #6
  7. JLeeT82

    JLeeT82 Villager Member

    Messages:
    23
    Likes Received:
    0
    Location:
    Raleigh, NC
    First Language:
    English
    I'm not against using scripts, I am just not "as" familiar with it. Custom scripts also have their own...let's say "touch" to them, the same way different authors have their own touches with their novels. You can have 8 scripts that all do the same thing, but written...slightly differently. So you kind of have to learn that author's way of accomplishing the same task. It's not impossible, it's just a different hurdle to cross over.
     
    #7
  8. Terloch

    Terloch Creative Worker. Member

    Messages:
    12
    Likes Received:
    0
    Location:
    The Netherlands
    First Language:
    Dutch
    Well I use everything through ace, getting night and day aswell.

    In my new project I had a campfire, I put everywhere shadows but not on and around the campfire

    it really looks like "night".

    Also there was a command where the screen goes in diffrent kind of way like "night" "day" "sunrise"

    Although I cannot find the command now, I am searching for it, if I found it I will tell you ^^
     
    #8
  9. JLeeT82

    JLeeT82 Villager Member

    Messages:
    23
    Likes Received:
    0
    Location:
    Raleigh, NC
    First Language:
    English
    That is the tint screen command in the 1st tab of the event editor.
     
    #9
  10. Monthigos

    Monthigos Tata Veteran

    Messages:
    53
    Likes Received:
    11
    Location:
    Somewhere
    First Language:
    English
    I'm with Solistra. There is a very simple script script I am thinking about that is less complicated and time consuming than eventing this would be. Installation involves copy the script over into the materials section; copying over a couple image files and then placing a couple notetags. All in all it's a lot less involved process then trying to work around the limitations of the eventing system and generally provides more flexibilty (like flickering light sources and light sources that are attached to the event / actor). As far as authors' own ways of doing things, there really isn't a whole lot of variance in how scripting calls are made. Either they are notetags in comment boxes or they are direct script snips. It's your choice really, but sooner or later the likelyhood of breaking the script barrier is high so you might as well start messing around sooner rather than later.
     
    #10
  11. JLeeT82

    JLeeT82 Villager Member

    Messages:
    23
    Likes Received:
    0
    Location:
    Raleigh, NC
    First Language:
    English
    What script did you have in mind? Link?
     
    #11
  12. Monthigos

    Monthigos Tata Veteran

    Messages:
    53
    Likes Received:
    11
    Location:
    Somewhere
    First Language:
    English
    #12
  13. Solistra

    Solistra Veteran Veteran

    Messages:
    593
    Likes Received:
    242
    I don't know which one they had in mind, but there are two that I know of that produce nice effects. Keep in mind that you will need to read the instructions for each to get them to function how you'd like them to -- but I don't foresee that being a problem with you, as you seem to have done your research so far (thank God).

    Anyway, these are the two that I know of: Victor Sant's Light Effects and Khas' Awesome Light Effects.

    Edit: Well, they beat me to it a minute or so before I hit "Submit." Oh, well -- I'm leaving this here anyway.
     
    Last edited by a moderator: Aug 19, 2012
    #13
  14. JLeeT82

    JLeeT82 Villager Member

    Messages:
    23
    Likes Received:
    0
    Location:
    Raleigh, NC
    First Language:
    English
    I've tried utilizing Khas' already to no avail, I am willing to bet it's some minute user error on my end, so I will give Victor's a shot now.

    Any basic info and/or advice (for stupid me)? :D
     
    #14
  15. JLeeT82

    JLeeT82 Villager Member

    Messages:
    23
    Likes Received:
    0
    Location:
    Raleigh, NC
    First Language:
    English
    I've got the Victor engine script set up. I've got the Victor lights script set up as well.

    So now I am trying to figure out exactly how to get it to work, as nothing will work for me here. I know the scripts are right though, and I have also correctly installed the proper "lights" graphic files and folders.. Here is the light script.

    So for example trying to use the lantern command on the main actor, the script says..

    # <actor lantern i: o># <event lantern i: o>

    # <vehicle lantern i: o>

    # Call a lantern on the target character, lanterns are effets that

    # lights the front of the character

    # i : actor index, event id or (0: boat, 1: ship, 2: airship)

    # o : light opacity (0-255)
    followed by

    # The actor lanter use the actor position in the party, NOT the actor ID.# So the if you want a lantern for the first character, use

    # <actor lantern 1: o> (o = opacity)
    When I follow these instructions, no light source is shown in front of the lead character.

    My example: # <actor lantern 1: 150>

    Nothing else should be needed unless I need to do it like this...

    # <actor lantern 1: 150>

    # </actor lantern>
     
    #15
  16. Lunarea

    Lunarea Artist Global Mod

    Messages:
    8,847
    Likes Received:
    7,835
    Remove #.

    # is used for commenting, so that the script doesn't try to run that line. :)
     
    #16
  17. Celianna

    Celianna Tileset artist Global Mod

    Messages:
    10,520
    Likes Received:
    5,531
    First Language:
    Dutch
    Primarily Uses:
    RMMV
    Moving this to script support.
     
    #17
  18. JLeeT82

    JLeeT82 Villager Member

    Messages:
    23
    Likes Received:
    0
    Location:
    Raleigh, NC
    First Language:
    English
    @Lunarea I actually did that by accident once, and this is the error I received - [​IMG]

    So what I may be "not getting" is the syntax system that Ruby uses.

    Edit: Also going back to the whole "scripter's touch" concept that I mentioned before, Yanfly's Party script was written in such a way that even I could very easily understand and implement the entire thing.

    Sample -

    module YEA module PARTY

    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

    # - General Party Settings -

    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

    # In this section, you can adjust the general party settings for your game

    # such as the maximum amount of members and whatnot, the EXP rate for

    # party members in the reserve, etc.

    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

    MAX_BATTLE_MEMBERS = 5 # Maximum party members. Default: 4

    SPLIT_EXP = false # Splits EXP with more members in the party.

    RESERVE_EXP_RATE = 0.50 # Reserve EXP Rate. Default: 1.00

    # If you wish to be able to change the maximum number of battle members

    # during the middle of your game, set this constant to a variable ID. If

    # that variable ID is a number greater than 0, that variable will determine

    # the current maximum number of battle members. Be cautious about using

    # this during battle.

    MAX_MEMBERS_VARIABLE = 0

    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

    # - Party Menu Settings -

    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

    # This section contains various menu settings for those who wish to use a

    # menu separate for the party system. Here, adjust the menu command order,

    # icons used, and other settings.

    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

    ENABLE_MENU = true # Enables party menu. Default: false

    COMMANDS =[ # The order at which the menu items are shown.

    # [:command, "Display"],

    [ :change, "Change",],

    [ :remove, "Remove",],

    [ :revert, "Revert",],

    [ :finish, "Finish",],

    ] # Do not remove this.

    COMMAND_ALIGN = 1 # 0:Left Align, 1:Center Align, 2:Right Align

    # These settings here are used for the upper right window: the Party Select

    # window where the player selects a member to swap out or remove.

    PARTY_FONT_SIZE = 20 # Font size used for party member names.

    LOCK_FIRST_ACTOR = false # Lock the first actor by default?

    LOCKED_ICON = 125 # Icon used for locked members.

    REQUIRED_ICON = 126 # Icon used for required members.

    EMPTY_TEXT = "-Empty-" # Text used when a member isn't present.

    DISPLAY_FACE = false # Display faces instead of sprites?

    # These settings here are used for the lower left window: the Party List

    # window where the player selects a member to replace.

    REMOVE_ICON = 185 # Icon used for removing members.

    REMOVE_TEXT = "-Remove-" # Text used for remove member command.

    ACTOR_Y_BUFFER = 12 # Amount the actor graphic be adjusted by.

    # These settings here are used for the lower right window: the Party Status

    # window where info about a selected actor is shown.

    NO_DATA = "- No Data -" # Text used for when no actor is shown.

    IN_PARTY_COLOUR = 6 # Text colour used for in party members.

    STAT_FONT_SIZE = 20 # Font size used for stats.

    EQUIP_TEXT = "Equipment" # Text used to display equipment.

    end # PARTY

    end # YEA
    Because of the format of how this was written, I was able to fully implement the entire script for it's original purpose, on the very first try, with no problems at all! Khas' and Victor Sant's scripts have been consistently causing me problems. To be fair though, Khas' and Victor's pages have segments that are not in english, even though their scripts can be found in english, so there may be a translation problem or a formatting problem there. It may also be the difference/reason behind why I am able to use the party script instantly, whereas with the lighting scripts, I've been running into issues, such as formatting and syntax.
     
    Last edited by a moderator: Aug 24, 2012
    #18
  19. JLeeT82

    JLeeT82 Villager Member

    Messages:
    23
    Likes Received:
    0
    Location:
    Raleigh, NC
    First Language:
    English
    Bump
     
    #19
  20. AzTech2064

    AzTech2064 Monster Post Veteran

    Messages:
    47
    Likes Received:
    1
    Location:
    Germany
    First Language:
    German
    wellll i dont know if this falls under necroposting but anyways^^

    as far as victor is concerned, it took me half a day to figure out what you have to do exactly, khaz was relatively simple, it took me a few copys from the demo he provided and about half an hour to understand what i can do with it.

    the problem with khaz is, as far as i got it figured, you can have only 1 moving light effect/lantern at a time, so if you want just a single lantern for your party and not have everyother moving guard have one too, khaz wont stand to the challenge. but khaz has some awesome pseude active shadow drawn and is easy to setup!

    with victor it needs more time, simply because you have to use more comment calls and such, and it provides more possible adjusting during events through calls. though its hard to understand how you have to type something^^

    lets start with khaz:

    basically you have to first initialize the script on a map using this commands in a script call:

    s = $game_map.effect_surfaces.change_color(120,0,0,0,200)where the first number is the frames needed for the change, than your average red green blue oppacity tones. easy enough to understand, just erase the event after the script^^

    the only thing left is to place all those light effects. simply place a comment with

    [light 0]or[light 1]or[light 2]or[light 3]in it. just try em out to figure what comment creates the light source you want!

    after that we have the lantern effect, i personally like the round one more so i will only explain this one.

    l = $game_map.lanternl.change_owner($game_player)l.set_graphic("torch_m")l.set_opacity(180,30)l.showthat would set the player up with a non-static lantern following em everywhere they go.

    and thats all you have to know for starting! well the problem with this is that you cant really make another lantern without deleting the first one... that sucks and was the reason i dropped this script yesterday and started with victors:

    first you have to have both the base engine script of him and the light effect script + those pictures

    after that you have to use a lot of script calls.

    <create shade>opacity: 200red: 0green: 0blue: 0</create shade>starting with this. this creates the actual darkness and has to always be called on a new map if you want it to be dark, this should be easy enough to understand^^

    after that it gets complicated, to figure out what he meant under the index part, i tried a variety but came to the conclusion that simple index is right and you dont have to type something like event id: 016 or so. it will loock like this if you create a static lightbulb at an event using a script call:

    <event light>id: 21name: "light"index: 001</event light>well here we have 2 varibs that got me confused. firstly the actual id: 21 part is just for references of the light effect itself. just assign any number you seem fit to remember, just dont use em twice on the same map, or else the first will disappear^^ than the before mentioned index: 001 this is the actual event id of the event you want to light up! the lines in the explanation would discribe the different numbers you have to use when using <actor light> ; <event light> or <vehicle light> the name section is the name of the picture of the light you want to use^^

    sooo what else... ah the lantern:

    simply useĀ  <actor lantern 1: 0> to hide it and <actor lantern 1: 255> to show it^^ how exactly i have to get those event lanterns to work, i dont know myself yet, but after figuring out this basic format of the script calls you should be able to figure out the rest with the explanation within the script itself^^ i know there are a lot more functions to this script than what i have covered, but most of the problem in my eyes lies within the understanding of the syntax of the calls and what you have to do, simply because there is no demo of this^^

    hope i could at least help a little bit on this old problem as it seems^^
     
    #20
Thread Status:
Not open for further replies.

Share This Page