Author Topic: [XP] Dynamic Time and Light System  (Read 5956 times)

Offline TimeKeeper

  • Trained Member
  • *
  • Posts: 17
  • LV: 4
  • Gender: Male
    • View Profile
[XP] Dynamic Time and Light System
« on: June 27, 2014, 01:31:07 AM »
Dynamic Time and Light System
Authors: TimeKeeper
Version: 2.05
Type: Light Circle and Day and Night System
Key Term: Custom Environment System

Introduction

Formally: Advanced Dynamic Light System

This system add dynamic light circle including a time system which vary the tint of the night. The light circle can also be animated using a random pattern, a wave pattern or a combination of both.

The script is really fast. I found a 2 to 3 FPS drop with about 115 animated light circle in a 50x50 map.

Features

  • Really fast
  • Dynamic light circle for the events
  • Dynamic light circle for the player
  • All light circle can be turn off on on with switch
  • Time system which vary the night tint
  • Night tinting color base on time of year
  • Multiple night and time setting (climate)

Screenshots

(click to show/hide)
(click to show/hide)
(click to show/hide)

Demo

Demo V 2.05

Script

The script is in the demo.

Instructions

The instruction are in a manuel included with the demo.

Compatibility

Should be compatible with everything.

NOTE: Some change to improve the animation of the light circle make this version of the script incompatible with previous configuration.

Credits and Thanks

  • TimeKeeper
  • Fabien and kellessdee for the inspiration
  • ArcaneAlchemy for the idea of a Day and night system
  • schmoggi for the night transition idea

Author's Notes

I hope you will enjoy this script.
« Last Edit: November 03, 2014, 07:25:11 PM by TimeKeeper »

Offline KK20

  • Master Scripter Fixer
  • Global Moderator
  • Guardian of Chaos
  • ****
  • Posts: 3041
  • LV: 372
  • Gender: Male
  • Bringer of Salt
    • View Profile
Re: [XP] Advanced Dynamic Light System
« Reply #1 on: June 27, 2014, 03:09:28 AM »
I wouldn't exactly call it "advanced" (it's like 200 lines of code~), but that's just me :P

Kinda surprised how the numerous blts doesn't lag the game, even after I added a few more light sources and made the map 200x200.



Other Projects
RPG Maker XP AceUpgrade RMXP to RMVXA performance!
XPA TilemapTilemap rewrite with many features, including custom resolution!


NNID: KK20-CP
Discord: KK20 Tyler#8901
Join the CP Discord Server

Offline ArcaneAlchemy

  • Awakened Visionist
  • **
  • Posts: 97
  • LV: 6
  • Gender: Male
    • View Profile
Re: [XP] Advanced Dynamic Light System
« Reply #2 on: June 27, 2014, 03:25:45 AM »
Wow, this really would have helped a few days ago! I literally translated all of Fabien's French into English before I even tried my hand at reversing it. I have a ridiculously outstanding system now, but this would have likely been an easier place to start. Perhaps I could have gotten the same desired effect. Good job though. I would try and add a day/night/(maybe weather too) compatibility. You can simulate the changing of the day by altering the opacity of the overlayed picture that creates the darkness to get a day/night effect. Just a thought.
"Wait? Do I look like a waiter?" -Kefka

Offline TimeKeeper

  • Trained Member
  • *
  • Posts: 17
  • LV: 4
  • Gender: Male
    • View Profile
Re: [XP] Advanced Dynamic Light System
« Reply #3 on: June 27, 2014, 03:52:23 AM »
I didn't thought of adding a day or night system but that a good idea.
« Last Edit: July 31, 2014, 10:01:45 PM by TimeKeeper »

Offline TimeKeeper

  • Trained Member
  • *
  • Posts: 17
  • LV: 4
  • Gender: Male
    • View Profile
Re: [XP] Dynamic Time and Light System
« Reply #4 on: July 31, 2014, 10:03:12 PM »
Version 2.00 is up. I added a day and night system.  :D

Offline ArcaneAlchemy

  • Awakened Visionist
  • **
  • Posts: 97
  • LV: 6
  • Gender: Male
    • View Profile
Re: [XP] Dynamic Time and Light System
« Reply #5 on: August 01, 2014, 09:06:28 PM »
That's cool. It just makes sense. Mine is wrapped around ForeverZero's CCTS and that's something to think about. Either compatibility with that or add a time element and a weather element sense you're going for environments. Version 3.o lol.
"Wait? Do I look like a waiter?" -Kefka

Offline TimeKeeper

  • Trained Member
  • *
  • Posts: 17
  • LV: 4
  • Gender: Male
    • View Profile
Re: [XP] Dynamic Time and Light System
« Reply #6 on: August 02, 2014, 05:09:55 AM »
I am planning to add weather to the script but I don't have a lot of free time right now so I will add the feature later.

Offline schmoggi

  • Trained Member
  • *
  • Posts: 37
  • LV: 1
    • View Profile
Re: [XP] Dynamic Time and Light System
« Reply #7 on: September 16, 2014, 02:41:36 PM »
Wonderful Script! Actually, i think you dont know how much you help people using the XP with the Script ;).
There are some Scripts like this (i'm mainly talking about the multiple Light Effects on the Map) already out there like Khas one for the Ace or the old Brasilian one from Victors Legacy Engine (this one was for XP but the Forum is closed, luckily i have a copy of the script) but, at least for the XP, it is very rar and hard to find smth like this, so again .. thank you!

One suggestion:

Could you please make a Version without the whole Time/Day/Night System or post a Instruction to disable it so People can just use the Multiple Light Effects? That would be cool!

greetz


« Last Edit: September 16, 2014, 02:43:35 PM by schmoggi »

Offline TimeKeeper

  • Trained Member
  • *
  • Posts: 17
  • LV: 4
  • Gender: Male
    • View Profile
Re: [XP] Dynamic Time and Light System
« Reply #8 on: September 18, 2014, 05:09:24 AM »
New version: 2.01

I updated the script and the instruction to better enable or disable part of the script. I added a system to do that before but i didn't give instruction.

I also added an actication part to the configuration.

Offline schmoggi

  • Trained Member
  • *
  • Posts: 37
  • LV: 1
    • View Profile
Re: [XP] Dynamic Time and Light System
« Reply #9 on: September 18, 2014, 10:22:25 PM »
Wonderful!

Thats what i wanted, thanks :).

I had to Edit two Lines though, maybe you were a bit in a rush.

Right after the start of the module DTLS in the Configuration the first Entry should be Activate instead of ActivateTime !?
And in the clas Game_System at the End under Object initializing the first parameter for activation had to be changed in @activate_dtls = DTLS::Activate

Maybe you could update that. And with that i have two other and hopefully last questions.

1. When i set a Tint with the set_map and night command the change is first updated after a map change and/or at the start of the game. How can i update/swith the tint on the same map?

2. Can you make it possible to get a night/tint screen in a amount of frames or provide instruction how to do it when using this script with deactivated Time System? That would make a nice Transition possible.

For Example:

set_map
night 100 100 100 255 40

The 40 at the End is the amount of frames it takes to get the Tint? That would be great, thanks :).

greetz

« Last Edit: September 18, 2014, 10:33:16 PM by schmoggi »

Offline rpg_newbie

  • Total Beginner
  • Posts: 8
  • LV: 0
    • View Profile
Re: [XP] Dynamic Time and Light System
« Reply #10 on: September 19, 2014, 07:59:10 PM »
What I could figure out works awesome! Thank you very much. One thing though: the fire switch causes a crash in the original demo.

> Script DTLS - V2.01 line 1117: TyperError occurred. nil can't be coerced into Fixnum

Is it just me? F me. Would be awesome if someone could help me with this.
« Last Edit: September 20, 2014, 10:21:31 AM by rpg_newbie »

Offline TimeKeeper

  • Trained Member
  • *
  • Posts: 17
  • LV: 4
  • Gender: Male
    • View Profile
Re: [XP] Dynamic Time and Light System
« Reply #11 on: September 22, 2014, 05:33:02 AM »
Version 2.02 is up.

I corrected both the missing activation configuration and the adding light circle bug.

I also added a transition time when the night color is set.

I plan to add a command to modified the night color with a transition in the futur.

Offline rpg_newbie

  • Total Beginner
  • Posts: 8
  • LV: 0
    • View Profile
Re: [XP] Dynamic Time and Light System
« Reply #12 on: September 24, 2014, 10:28:20 AM »
Sweet. Thank you.

Edit: I'm trying to figure out how to set NIGHT/DAY/... switches that I could use outside the script... Not seeing anything built in. Is there a better place than Frame_Update to put such a thing in?

Also, the time window is always visible even if you set it to false. I assume cause of the && in here.

if $game_system.activate_time_window == false && $game_system.activate_time == false
      @time_window.visible = false
« Last Edit: September 29, 2014, 05:06:59 PM by rpg_newbie »

Offline TimeKeeper

  • Trained Member
  • *
  • Posts: 17
  • LV: 4
  • Gender: Male
    • View Profile
Re: [XP] Dynamic Time and Light System
« Reply #13 on: September 30, 2014, 05:54:31 AM »
Version 2.03 is up.

I forgot to hide the window when it's deactivate. Now it work correctly.

I also added two switch that tell you if it is the day or the night and variable that tell you wat time it is.

Offline whitespirits

  • Ethereal Devastator
  • ****
  • Posts: 318
  • LV: 2
    • View Profile
Re: [XP] Dynamic Time and Light System
« Reply #14 on: September 30, 2014, 09:17:43 AM »
Is there anyway you could make this global with rmxos? Is been done with ates.

Offline TimeKeeper

  • Trained Member
  • *
  • Posts: 17
  • LV: 4
  • Gender: Male
    • View Profile
Re: [XP] Dynamic Time and Light System
« Reply #15 on: September 30, 2014, 04:09:50 PM »
I don't know. I never use rmxos. I do know some weather script were made compatible, so I think it could be done.

Offline schmoggi

  • Trained Member
  • *
  • Posts: 37
  • LV: 1
    • View Profile
Re: [XP] Dynamic Time and Light System
« Reply #16 on: October 01, 2014, 06:12:02 PM »
Can a tint night be applied on the same map without reloading in this new version?

greetz

Offline rpg_newbie

  • Total Beginner
  • Posts: 8
  • LV: 0
    • View Profile
Re: [XP] Dynamic Time and Light System
« Reply #17 on: October 04, 2014, 01:35:05 PM »
Yay, so the switches went where I put them on my own, too. Thanks for the update.

I do have another question though... Is there a way to introduce a timeskip/manually change the time? (For example for sleeping or skipping the night when no lantern is available.) Thought maybe AddHour/Day/etc were for that but they error me out. Whatever else I try manually also results in nil errors.

Edit: I guess it was because of the attributes in the time class. So hopefully changing those doesn't break the script in some other process.
« Last Edit: October 18, 2014, 09:40:27 AM by rpg_newbie »

Offline TimeKeeper

  • Trained Member
  • *
  • Posts: 17
  • LV: 4
  • Gender: Male
    • View Profile
Re: [XP] Dynamic Time and Light System
« Reply #18 on: November 03, 2014, 07:27:50 PM »
Version 2.05 is up.

I made the system more customisable in game. I also added a instruction manual.

Offline rpg_newbie

  • Total Beginner
  • Posts: 8
  • LV: 0
    • View Profile
Re: [XP] Dynamic Time and Light System
« Reply #19 on: November 04, 2014, 02:52:32 PM »
Getting this on starting the demo:

Script 'DTLS - V2.05' line 826: SystemStackError occurred.
stack level too deep