Lighting and Time Editor

Discussion in 'JS Plugin Releases (RMMV)' started by LevelNoMatter, Apr 11, 2017.

  1. LevelNoMatter

    LevelNoMatter Sebastián Cámara Member

    Messages:
    3
    Likes Received:
    24
    Location:
    Rosario, Argentina
    First Language:
    Spanish
    Primarily Uses:
    RMMV
    Lighting and Time Editor v1.00
    Level No Matter



    Due I haven't had time, Feelzor has offered to continue the plugin adding new features and fixing bugs.
    Download here


    Introduction
    I started making this plugin with the intention of giving a more professional look to my game, and the result was a lighting editor with night and day cycle, and some time control functions. Then I decided that it was good enough to share it :)

    Installation
      • Put the plugins in this order:
        1. LNM_GameEditorCore.js
        2. LNM_GameTime.js
        3. LNM_LightingTool.js
      • Insert the folders “editor” and “lights” in the "img" directory. That’s it.
    Lighting Tool (LNM_LightingTool.js)

    How to use
    You can add lights in two ways:
      • From the in-game editor.
      • From events.
    Adding lights in-game
    Press TAB and then press over the lamp icon. Then select the type of light you want to add. You can drag and edit your properties at any time.

    Adding custom lights from events
    Simply create an event and then in the field “Note” add the following line:

    Light(filename, scale, hue, alpha).addPulse(pulseMin, pulseMax, pulseSpeed).addFlick(flickIntensity, flickSpeed)
      • Filename: (string) Sprite used for the light, located in /img/lights/
      • Scale: (float) Scales the sprite (1.0 = 100%, 0.5 = 50%, etc)
    1. Hue: (integer) Tint scale for colors from 0 to 359. For more information visit https://en.wikipedia.org/wiki/File:HueScale.svg
    2. Alpha: (float) Transparency of the light, from 0.1 to 1.0
    3. pulseMin: (float) Minimum scaling for pulse animation
    4. pulseMax: (float) Maximum scaling for pulse animation
    5. pulseSpeed: (integer) Speed for pulse animation
    6. flickIntensity: (integer) Intensity for flick animation
    7. flickSpeed: (integer) Speed for flick animation
    Examples:

    Ambient
    Light(default, 5.0, 28, 1.0)

    Torch
    Light(default, 15, 1.0, 1.0).addPulse(0.98, 1.02, 7).addFlick(1, 3)

    Bonfire
    Light(default, 28, 1.3, 1.0).addPulse(1.1, 1.3, 15).addFlick(1, 3)

    Adding default lights from events
    You can also create default lights by simply typing Torch, Bonfire or Ambient in the field “Note”.

    Player torch
    You can activate or deactivate the player’s torch by simply activating or deactivating the corresponding switch. By default it is #0001, but you can change it from the Plugin Manager.

    Game Time (LNM_GameTime.js)

    Plugin commands

    Time PAUSE
    Stops time. This is useful for cutscenes.

    Time PLAY
    Reactivates time.

    Time SET hour minutes
    Sets game’s time to a specific time.
    Example:
    Time SET 15 0
    Sets game’s time to three in the afternoon.


    Time ADD hours minutes
    Advances time.
    Example:
    Time ADD 2 15
    Advances time by two hours and fifteen minutes.


    Notetags
    These must be set in the field Note in Map Properties.

    <Tint: R, G, B>
    Ignores time and sets the screen tone specified in RGB color (Red, Green, Blue). This is useful for darker dungeons or zones in which lighting is not time dependant.
    Example:
    <Tint: 0, 0, 0>
    Ignores time and sets the screen tone to black.


    <Tint: CustomTintID>
    Ignores time and sets the screen tone to a Custom Tint from the Plugin Manager.
    Example:
    <Tint: 8>
    Sets the screen tone of Custom Tint 8.


    Terms of use
    Free to use for both commercial and non-commercial games. You can credit me if you want as Sebastián Cámara or as Level No Matter.

    Special thanks to
    Xelion for helping me with the translations.

    Hope you find this useful or fun :)
     
    Last edited: Nov 5, 2017
    #1
  2. kovak

    kovak Silverguard Veteran

    Messages:
    1,248
    Likes Received:
    1,552
    Location:
    I'm from the Hu3
    First Language:
    PT - EN
    Primarily Uses:
    RMMV
    This is really a lifesaver, it will save time when makin paralax maps for sure.
    Does it consume lots of memory?
     
    #2
  3. IAmJakeSauvage

    IAmJakeSauvage Veteran Veteran

    Messages:
    417
    Likes Received:
    667
    Location:
    Hamilton, ON
    First Language:
    English
    Primarily Uses:
    RMMV
    This looks SO FRIGGIN' COOL! Do you have to use it with the time system - or can you leave the time system out?

    EDIT: Except when I do it in-editor rather than with events, after like 5+ items on the map it doesn't let me drag/click on them anymore.
     
    Last edited: Apr 15, 2017
    #3
  4. Farr

    Farr Veteran Veteran

    Messages:
    247
    Likes Received:
    92
    Location:
    C-bus, Ohio
    First Language:
    Portuguese
    Wooo!

    Is there a way to leave the time system out?
     
    #4
  5. LevelNoMatter

    LevelNoMatter Sebastián Cámara Member

    Messages:
    3
    Likes Received:
    24
    Location:
    Rosario, Argentina
    First Language:
    Spanish
    Primarily Uses:
    RMMV
    I don't think so. Probably less memory than parallax but more CPU.

    I don't know if I understood you correctly (sorry if I don't), but the lights created from events cannot be dragged.

    You can pause time anytime if you want to remove the night and day cycle, but remove the Game Time plugin is more complicated. I think there's not much point in doing that because the lights are mostly noticeable when it's dark. You have a new or different idea in how this plugin could be used?
     
    #5
  6. Farr

    Farr Veteran Veteran

    Messages:
    247
    Likes Received:
    92
    Location:
    C-bus, Ohio
    First Language:
    Portuguese
    I thought the light effects would work if I just tint my screen but I guess it runs around the time plugin.
    I tried to create a super dark area using Tint Screen, even thou time was [255, 255, 255], the screen gets dark but the light effects doesnt work.
    It works if I set the time to make everything look dark but I don`t have control over Gray, just RGB.

    It`s still an insanely great plugin.
     
    #6
  7. Psypix

    Psypix Warper Member

    Messages:
    4
    Likes Received:
    4
    Location:
    Prague
    First Language:
    Czech
    Primarily Uses:
    N/A
    Hello. Its amazing plugin!! Big up!! Can you help me please? Where i find or where i set variables for sec, min, hours? Thanks for answer and execuse me for my english :D
     
    #7
  8. Usaku-chan

    Usaku-chan Villager Member

    Messages:
    8
    Likes Received:
    1
    First Language:
    English
    Primarily Uses:
    N/A
    I do like how this plugin handles lighting, and the time system :) I'm just having a little issue with changing the hue of some of my lights.
    I'm trying to change the ambient light's hue. It's also happened with torches too. Not sure what's going on at all with it now. (Using the in game light editor thingie)
    The image below shows the error I get. (blocked out my details though lol)(
    http://imgur.com/oOZkU05.png
     
    #8
  9. BrelmineFR

    BrelmineFR Warper Member

    Messages:
    1
    Likes Received:
    0
    First Language:
    French
    Works perfectly so far, this is amazing. This script plus the doodad one are just insane to create a perfect map.
    Excellent, a real treasure. Thanks for sharing.
     
    #9
  10. Draconic_Story_Teller

    Draconic_Story_Teller Guardian of the Bookshelf Veteran

    Messages:
    34
    Likes Received:
    10
    Location:
    New York, United States of America
    First Language:
    English
    Primarily Uses:
    RMMV
    Love it, finally a commercially usable light tool I can get behind! My only question/request is if it is possible to have/add the ability to have a default time, for when the game first launches. It doesn't make a lot of sense for my heroes to get into port at midnight, afterall.

    Edit: Inb4 someone says be specific or there's a plugin command for that - I'm using the command currently, but how I am set up currently, I load in, get the navy blue of midnight, and flash quickly to the morning sunlight. Makes it look worse than leaving it at midnight alone....
     
    #10
  11. Moe_Lester13

    Moe_Lester13 Veteran Veteran

    Messages:
    72
    Likes Received:
    11
    Location:
    New Zealand
    First Language:
    English
    You can have your characters start off transparent on a black map, fade out and set up all of your Plugin commands before transporting to your actual starting map and fading back in. By doing that you can actually play other events like BGS/SE/Text etc and other events for the start of your game.
     
    #11
  12. SoulOfRock

    SoulOfRock Veteran Veteran

    Messages:
    38
    Likes Received:
    6
    First Language:
    Spanish
    Can you help me pls? this error appear when i try to start a new game

    -cannot read property ´checkPlayerTorch´ of null

    Developer Tools:

    TypeError: Cannot read property 'checkPlayerTorch' of null
    at Game_Map.refresh (/C:/Users/SiehHasen/Downloads/Devil%C2%B4s%20Heart/js/plugins/LNM_LightingTool.js:991)
    at Game_Map.setupEvents (/C:/Users/SiehHasen/Downloads/Devil%C2%B4s%20Heart/js/plugins/HIME_CustomPageConditions.js:171)
    at Game_Map.setup (rpg_objects.js:5413)
    at Game_Map.setup (/C:/Users/SiehHasen/Downloads/Devil%C2%B4s%20Heart/js/plugins/YEP_RegionRestrictions.js:269)
    at Game_Map.setup (/C:/Users/SiehHasen/Downloads/Devil%C2%B4s%20Heart/js/plugins/YEP_SaveEventLocations.js:159)
    at Game_Map.setup (/C:/Users/SiehHasen/Downloads/Devil%C2%B4s%20Heart/js/plugins/YEP_X_EventChaseStealth.js:322)
    at Game_Map.setup (/C:/Users/SiehHasen/Downloads/Devil%C2%B4s%20Heart/js/plugins/GALV_CamControl.js:193)
    at Game_Map.setup (/C:/Users/SiehHasen/Downloads/Devil%C2%B4s%20Heart/js/plugins/LNM_GameTime.js:428)
    at Game_Map.setup (/C:/Users/SiehHasen/Downloads/Devil%C2%B4s%20Heart/js/plugins/LNM_LightingTool.js:976)
    at Game_Player.performTransfer (rpg_objects.js:7448)

    Help pls D:!!!!
     
    #12
  13. Draconic_Story_Teller

    Draconic_Story_Teller Guardian of the Bookshelf Veteran

    Messages:
    34
    Likes Received:
    10
    Location:
    New York, United States of America
    First Language:
    English
    Primarily Uses:
    RMMV
    I'm no Java master, but I'll just ask a simple question off the bat: Did you unzip the provided master zip into your game's directory? The Zip contained js/plugins and also images/lights, so if you didn't unzip properly, that might be the problem. Can't read the properties of a nonexistent file, can you now?

    Alternatively, I'll ask if you're an administrator. Administrators don't give a poop about access perms, which if the prior idea was incorrect, might make a difference for some reason... although you're in your own home directory so i'm not sure...
     
    #13
  14. Draconic_Story_Teller

    Draconic_Story_Teller Guardian of the Bookshelf Veteran

    Messages:
    34
    Likes Received:
    10
    Location:
    New York, United States of America
    First Language:
    English
    Primarily Uses:
    RMMV
    A sloppy fix imo, but I guess I'll just leave in the metaphorical suggestion bin a 'default time parameter in the plugin' note.
    Soz for double post, just catching up on old posts i missed when away.
     
    #14
  15. SoulOfRock

    SoulOfRock Veteran Veteran

    Messages:
    38
    Likes Received:
    6
    First Language:
    Spanish
    Yup,im administrator,and yup i unzip all under the game folder,and i try copy one by one the js plugins,and lights,and is the same >n< thanks >n<
     
    #15
  16. Draconic_Story_Teller

    Draconic_Story_Teller Guardian of the Bookshelf Veteran

    Messages:
    34
    Likes Received:
    10
    Location:
    New York, United States of America
    First Language:
    English
    Primarily Uses:
    RMMV
    A question, is there a way to refer to the time this plugin creates in a script? Something like if time is or greater than 18:30, change event sheet to sheet 2 // change self switch B to active?
     
    #16
  17. DelphiniumVII

    DelphiniumVII Villager Member

    Messages:
    8
    Likes Received:
    1
    First Language:
    English
    So im getting these errors (Undefined is not a function) whenever I start my game. The plugins work when I create a brand new game but not on the one I'm currently working on. I disabled all other plugins and tried to run it and still get these errors. If anyone can help I'd appreciate it.

    EDIT: Turns out I just needed to update all of my core plugins.
     

    Attached Files:

    Last edited: May 11, 2017
    #17
  18. Draconic_Story_Teller

    Draconic_Story_Teller Guardian of the Bookshelf Veteran

    Messages:
    34
    Likes Received:
    10
    Location:
    New York, United States of America
    First Language:
    English
    Primarily Uses:
    RMMV
    @DelphiniumVII - consider running a fresh project with just these plugins and everything on default, I never had any errors with this plugin set per say, mostly problems with the in-game editor not wanting to work with me and needing me to reset my game instance. I'm going to wager you should start with a new project adn see if this happens again. If it does, be sure you're completely updated in terms of your RPGMV version and possibly Java. Don't think we are dependent on it, but worth a shot.
     
    #18
    DelphiniumVII likes this.
  19. DelphiniumVII

    DelphiniumVII Villager Member

    Messages:
    8
    Likes Received:
    1
    First Language:
    English
    So whenever I set the map tint for example <Tint: 225, 114, 54> in the Map Properties Section. When I access the menu and close it, it resets the tint to the current time. Is anyone else having this issue?
     
    #19
  20. serbyk

    serbyk Warper Member

    Messages:
    1
    Likes Received:
    0
    First Language:
    Romanian
    Amazing job, simply amazing ... congratulations ... but i have a little sugestion ... can you add a RealTime option ??
    because i was using DaimoniousTails's gametime plugin in combination with another plugin to display the time on the gameplay screen.

    And maybe a copy-paste or duplicate option
     
    Last edited: May 29, 2017
    #20

Share This Page