[XP] Dynamic Time and Light System

Started by TimeKeeper, June 26, 2014, 07:31:07 pm

Previous topic - Next topic

TimeKeeper

June 26, 2014, 07:31:07 pm Last Edit: November 03, 2014, 12:25:11 pm by TimeKeeper
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

Spoiler: ShowHide



Spoiler: ShowHide



Spoiler: ShowHide





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.

KK20

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 Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

ArcaneAlchemy

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

TimeKeeper

June 26, 2014, 09:52:23 pm #3 Last Edit: July 31, 2014, 04:01:45 pm by TimeKeeper
I didn't thought of adding a day or night system but that a good idea.

TimeKeeper

Version 2.00 is up. I added a day and night system.  :D

ArcaneAlchemy

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

TimeKeeper

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.

schmoggi

September 16, 2014, 08:41:36 am #7 Last Edit: September 16, 2014, 08:43:35 am by schmoggi
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



TimeKeeper

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.

schmoggi

September 18, 2014, 04:22:25 pm #9 Last Edit: September 18, 2014, 04:33:16 pm by schmoggi
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


rpg_newbie

September 19, 2014, 01:59:10 pm #10 Last Edit: September 20, 2014, 04:21:31 am by rpg_newbie
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.

TimeKeeper

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.

rpg_newbie

September 24, 2014, 04:28:20 am #12 Last Edit: September 29, 2014, 11:06:59 am by rpg_newbie
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

TimeKeeper

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.

whitespirits

Is there anyway you could make this global with rmxos? Is been done with ates.

TimeKeeper

I don't know. I never use rmxos. I do know some weather script were made compatible, so I think it could be done.

schmoggi

Can a tint night be applied on the same map without reloading in this new version?

greetz

rpg_newbie

October 04, 2014, 07:35:05 am #17 Last Edit: October 18, 2014, 03:40:27 am by rpg_newbie
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.

TimeKeeper

Version 2.05 is up.

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

rpg_newbie

Getting this on starting the demo:

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

TimeKeeper