Chaos Project

RPG Maker => RPG Maker Scripts => RMXP Script Database => Topic started by: TimeKeeper on June 26, 2014, 07:31:07 pm

Title: [XP] Dynamic Time and Light System
Post by: TimeKeeper on June 26, 2014, 07:31:07 pm
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




Screenshots

Spoiler: ShowHide

(http://i.imgur.com/hjMfLUM.png)

Spoiler: ShowHide

(http://i.imgur.com/8d4TftA.png)

Spoiler: ShowHide

(http://i.imgur.com/KmtzqnX.png)



Demo

Demo V 2.05 (https://dl.dropboxusercontent.com/u/17791910/RMXP%20Release/DTLS%20Demo.rar)


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




Author's Notes

I hope you will enjoy this script.
Title: Re: [XP] Advanced Dynamic Light System
Post by: KK20 on June 26, 2014, 09:09:28 pm
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.
Title: Re: [XP] Advanced Dynamic Light System
Post by: ArcaneAlchemy on June 26, 2014, 09:25:45 pm
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.
Title: Re: [XP] Advanced Dynamic Light System
Post by: TimeKeeper on June 26, 2014, 09:52:23 pm
I didn't thought of adding a day or night system but that a good idea.
Title: Re: [XP] Dynamic Time and Light System
Post by: TimeKeeper on July 31, 2014, 04:03:12 pm
Version 2.00 is up. I added a day and night system.  :D
Title: Re: [XP] Dynamic Time and Light System
Post by: ArcaneAlchemy on August 01, 2014, 03: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.
Title: Re: [XP] Dynamic Time and Light System
Post by: TimeKeeper on August 01, 2014, 11:09:55 pm
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.
Title: Re: [XP] Dynamic Time and Light System
Post by: schmoggi on September 16, 2014, 08:41:36 am
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


Title: Re: [XP] Dynamic Time and Light System
Post by: TimeKeeper on September 17, 2014, 11:09:24 pm
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.
Title: Re: [XP] Dynamic Time and Light System
Post by: schmoggi on September 18, 2014, 04: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

Title: Re: [XP] Dynamic Time and Light System
Post by: rpg_newbie on September 19, 2014, 01: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.
Title: Re: [XP] Dynamic Time and Light System
Post by: TimeKeeper on September 21, 2014, 11:33:02 pm
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.
Title: Re: [XP] Dynamic Time and Light System
Post by: rpg_newbie on September 24, 2014, 04: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
Title: Re: [XP] Dynamic Time and Light System
Post by: TimeKeeper on September 29, 2014, 11:54:31 pm
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.
Title: Re: [XP] Dynamic Time and Light System
Post by: whitespirits on September 30, 2014, 03:17:43 am
Is there anyway you could make this global with rmxos? Is been done with ates.
Title: Re: [XP] Dynamic Time and Light System
Post by: TimeKeeper on September 30, 2014, 10:09:50 am
I don't know. I never use rmxos. I do know some weather script were made compatible, so I think it could be done.
Title: Re: [XP] Dynamic Time and Light System
Post by: schmoggi on October 01, 2014, 12:12:02 pm
Can a tint night be applied on the same map without reloading in this new version?

greetz
Title: Re: [XP] Dynamic Time and Light System
Post by: rpg_newbie on October 04, 2014, 07:35:05 am
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.
Title: Re: [XP] Dynamic Time and Light System
Post by: TimeKeeper on November 03, 2014, 12:27:50 pm
Version 2.05 is up.

I made the system more customisable in game. I also added a instruction manual.
Title: Re: [XP] Dynamic Time and Light System
Post by: rpg_newbie on November 04, 2014, 07:52:32 am
Getting this on starting the demo:

Script 'DTLS - V2.05' line 826: SystemStackError occurred.
stack level too deep
Title: Re: [XP] Dynamic Time and Light System
Post by: TimeKeeper on November 05, 2014, 12:32:28 pm
I corrected the stack level error.