Terrax Lighting system

Discussion in 'JS Plugin Releases (RMMV)' started by Terrax, Nov 5, 2015.

  1. suoma

    suoma Warper Member

    Messages:
    4
    Likes Received:
    0
    First Language:
    chinese
    Primarily Uses:
    RMMV
    The problem is solved, there is a conflict between the screen and the plug-in, with the "tint set #" instead of the screen will not be a problem, a very good plug-in, thank you!
    I am Chinese, English is very poor please forgive me!
     
  2. masterlobo

    masterlobo Veteran Veteran

    Messages:
    146
    Likes Received:
    77
    Location:
    Seattle, WA
    Hello,

    Has anyone found a way to make this script compatible with a map zoom script (such as MBS Map Zoom)?

    What currently happens is that if you zoom out, the lightning script only creates shadows and lights in the area that the camera would see without zoom out.

    Trying to find out how to make it work myself, but it doesn't hurt to ask :)
     
  3. Underserial

    Underserial Veteran Veteran

    Messages:
    81
    Likes Received:
    18
    First Language:
    German
    is there an option for ambient lighting? Can someone explain it?
     
  4. Terrax

    Terrax Veteran Veteran

    Messages:
    304
    Likes Received:
    223
    First Language:
    English
    What your seeing is probably because the script 'clips' out lightsources that are off screen. I can make the clipping optional, that should
    fix your issue. (i will turn the option on by default because it reduces lag on big maps).
    Can you give me the download page of the plugin so i can test it?

    There are several ways.
    Use plugin command : tint set #333333 for an overal less dark effect.
    Or use high radius lightsources with a non visual event. Something like 'Light 400 #444444' in the notetag of an invisibible event.
     
    masterlobo and Underserial like this.
  5. Underserial

    Underserial Veteran Veteran

    Messages:
    81
    Likes Received:
    18
    First Language:
    German
    Thanks for the infos =)

    But the "tint" command is not working when there is no "Light" Event on the map - do you notice that?
     
  6. Terrax

    Terrax Veteran Veteran

    Messages:
    304
    Likes Received:
    223
    First Language:
    English
    Yes, thats by design. You need at least one lightsource for the map to go dark. If you do not want a lightsource at all, create
    a small invisible lightsource : Light 1 #000000 in a note-tag.
     
  7. masterlobo

    masterlobo Veteran Veteran

    Messages:
    146
    Likes Received:
    77
    Location:
    Seattle, WA
    Wow Terrax, thanks a lot!

    Here's a script that deals with zooming, and it's also the one I'm using:

    https://forums.rpgmakerweb.com/index.php?threads/mbs-map-zoom.48267/

    Again, much appreciated :)
     
  8. KillerGin

    KillerGin Freddie Veteran

    Messages:
    311
    Likes Received:
    146
    Location:
    Boston, MA
    First Language:
    English
    Primarily Uses:
    N/A
    Hello,

    The newest MV update 1.4.1 broke the lighting script

    "Failed to execute 'createRadialGradient' on 'CanvasRenderingContext2D': float parameter 6 is non-finite"
     
  9. KillerGin

    KillerGin Freddie Veteran

    Messages:
    311
    Likes Received:
    146
    Location:
    Boston, MA
    First Language:
    English
    Primarily Uses:
    N/A
    Screen Shot 2017-04-27 at 8.53.41 PM.png
     

    Attached Files:

  10. Terrax

    Terrax Veteran Veteran

    Messages:
    304
    Likes Received:
    223
    First Language:
    English
    The plugin crashes on definition of a flashlight. The flashlights width is infinite. Are you sure you didn't make a mistake in
    a flashlight note-tag definition somewhere.
    notetag : flashlight 8 12 #888888 0 2 (the second parameter(12) is the width of the beam, maybe its missing somewhere).
     
    KillerGin likes this.
  11. KillerGin

    KillerGin Freddie Veteran

    Messages:
    311
    Likes Received:
    146
    Location:
    Boston, MA
    First Language:
    English
    Primarily Uses:
    N/A
    Hello Terrax,

    Thanks for the reply, you are absolutely right. I have been using an old version of your script by the way.

    I still have one problem.... the lights carried by NPC characters no longer work, the one designated by a number. So in the note tag I put "Light 120 #FFFFFF 3" and I use "plugin command: Light on 3". I cannot get the lights to turn on (my regular lights work just fine, just not the numbered ones).

    None of the lights using the numbers work anymore, did the syntax change?

    PS I looked through the help file and tried every combination to no avail.
     
    Last edited: Apr 29, 2017
  12. Terrax

    Terrax Veteran Veteran

    Messages:
    304
    Likes Received:
    223
    First Language:
    English
    No, the defintion didn't change at all. I copied your commands into a game and they work perfectly. I realy do not understand why they
    no longer work in your game. All i can think of is that some other addon intercepts the plugin commands in general, try moving/disabling some other addons.
     
    Last edited: Apr 29, 2017
  13. KillerGin

    KillerGin Freddie Veteran

    Messages:
    311
    Likes Received:
    146
    Location:
    Boston, MA
    First Language:
    English
    Primarily Uses:
    N/A
    I use a lot of yanfly scripts. Top or Bottom, no matter where I place the script the numbered lights do not work (I also not not use Moghunters scripts at all), I just want the lights to work. I did not go through the disable/enable process.

    I reverted back to my old version 1.3.1 and it works perfectly. I believe I will just stick with the old version (the only problem is when the screen shakes, there is a small visual hiccup, I am fine with that). I created my own time and day night system.

    Thanks for your time.
     
  14. Terrax

    Terrax Veteran Veteran

    Messages:
    304
    Likes Received:
    223
    First Language:
    English
    To make the zoom work, you only have to increase the area of the screen in the plugin's settings.
    Go to -> Plugin manager -> Double click the TerraxLighting plugin -> Scroll down -> Adjust ScreenSize X and ScreenSize Y
    (double the value's if you want to zoom out by 100%)
     
    masterlobo likes this.
  15. masterlobo

    masterlobo Veteran Veteran

    Messages:
    146
    Likes Received:
    77
    Location:
    Seattle, WA
    Yeah, that was enough to fix the issue.

    Is there any downside to this approach? Such as perf hit?

    It does the job though, so thanks a lot! :D
     
  16. Terrax

    Terrax Veteran Veteran

    Messages:
    304
    Likes Received:
    223
    First Language:
    English
    Well, its just a little more to draw but if you don't make huge maps with lots and lots of lightsources, you probably will not notice it.
     
    masterlobo likes this.
  17. AestheticGamer

    AestheticGamer Veteran Veteran

    Messages:
    54
    Likes Received:
    24
    Location:
    Portland, Oregon
    First Language:
    English
    I thank you for all of your hard work Terrax, this plug-in has been a godsend for me. I am running into an issue though.

    So I have the newest version (1.4.9) installed, and I'm running into issues with an autosave/autoload plug-in because of the Terrax Lighting. I might try and older version of Terrax Lighting after this as I had used these two plug-ins before and they had worked fine in the past, or maybe I have some setting wrong on some project now...

    To describe the issue, the game autosaves and autoload points. The plug-in works, and if I turn off Terrax the autoload works as intended, but with Terrax Lighting on the autoload command will always pop-up with this issue:

    "rpg_managers.js:1756 TypeError: Cannot read property 'note' of null
    at ReloadMapEvents ([Redacted]/js/plugins/TerraxLighting.js:1006:44)
    at Lightmask._updateMask ([Redacted]/js/plugins/TerraxLighting.js:1202:4)
    at Lightmask.update ([Redacted]/js/plugins/TerraxLighting.js:979:11)
    at f[Redacted]/js/rpg_core.js:3569:19
    at Array.forEach (native)
    at Spriteset_Map.Sprite.update ([Redacted]/js/rpg_core.js:3567:19)
    at Spriteset_Map.Spriteset_Base.update ([Redacted]/js/rpg_sprites.js:2141:29)
    at Spriteset_Map.update ([Redacted]/js/rpg_sprites.js:2271:37)
    at [Redacted]/js/rpg_scenes.js:112:19
    at Array.forEach (native)"

    Now I'm a bit dumb at Javascript, but I can tell that it's having some problem reading the note tags in events, but might you have any potential solutions? I might try an older version of Terrax Lighting again to see if the issue persists in older versions as these two plug-ins worked fine in the past, or it could very well be I'm fricking something up here.

    EDIT: I can confirm that older versions of Terrax Lighting work with the Autosave plug-in still. 1.4.5 did not, but I tried 1.3.9 and it worked fine with the autoload command. I'll see if there's anything to be done for newer versions but at least it does work with older versions.
     
    Last edited: May 3, 2017
  18. DK

    DK Veteran Veteran

    Messages:
    102
    Likes Received:
    92
    Location:
    Russia
    First Language:
    Russian
    Primarily Uses:
    RMMV
    "if (args.length = 7) {" on 420 line in Game_Interpreter. Version 1.4.9
     
  19. Terrax

    Terrax Veteran Veteran

    Messages:
    304
    Likes Received:
    223
    First Language:
    English
    No problem, easy to fix, i will fix it tonight.

    Yep, another bug, will be fixed as well.
     
    AestheticGamer likes this.
  20. Terrax

    Terrax Veteran Veteran

    Messages:
    304
    Likes Received:
    223
    First Language:
    English
    KaYsEr and masterlobo like this.

Share This Page