[XP] Advanced Time and Environment System

Started by fugibo, March 09, 2008, 11:08:36 pm

Previous topic - Next topic

fugibo

March 09, 2008, 11:08:36 pm Last Edit: February 13, 2013, 02:20:24 am by Blizzard
This script has been finished and rereleased! Please click here for the new version!


Advanced Time and Environment System (ATES)
Authors: Blizzard
Version: 0.4
Type: Autonomous Timeflow and Environment Controller
Key Term: Environment Add-on



Introduction

This Time System will make your game have daytime and nighttime periods. The screen will be tinted accordingly. You can set up the length of the day. Other features are explained below. Please be sure to configure this system appropriately.

This work is protected by the following license:
Quote
Creative Commons - Attribution-NonCommercial-ShareAlike 3.0 Unported
( http://creativecommons.org/licenses/by-nc-sa/3.0/ )

You are free:

to Share - to copy, distribute and transmit the work
to Remix -- to adapt the work

Under the following conditions:

Attribution. You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work).

Noncommercial. You may not use this work for commercial purposes.

Share alike. If you alter, transform, or build upon this work, you may distribute the resulting work only under the same or similar license to this one.

- For any reuse or distribution, you must make clear to others the license terms of this work. The best way to do this is with a link to this web page.

- Any of the above conditions can be waived if you get permission from the copyright holder.

- Nothing in this license impairs or restricts the author's moral rights.



Features


  • complete control over and easy manipulating of time
  • nice day and night tinting
  • HUD clock optional
  • easier to control and more powerful than DDNS



Screenshots

N/A for this sort of script


Demo

N/A


Script

Just make a new script above main and paste this code into it.
Script Download


Instructions

Inside the script in the first comment.


Compatibility

99% compatible with SDK v1.x. 90% compatible with SDK 2.x. WILL corrupt old savegames. Can cause incompatibilty issues with DNS-es.


Credits and Thanks


  • Blizzard



Author's Notes

Keep in mind that ATES is initially turned off, you need to turn it on by using the ATES.on and ATES.tint_on commands together.

If you find any bugs, please report them here:
http://forum.chaos-project.com

That's it! Enjoy! =D

EDIT:

Nice, Blizz  ;D

Blizzard

March 11, 2008, 05:39:20 am #1 Last Edit: March 11, 2008, 10:34:13 am by BlizzHard
Merge successful. :3
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Nortos

ohhhhh is this your new time system? I been waiting for this for ages I have to go in a sec though so cnt comment about it but looking now :)

Blizzard

It's a completely new code. But so far it only tints the screen. The full system will support stuff like calender, seasons bad weather probability, temperature... =X
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Nortos

wow i just looked through it and it looks good the code so small more than half of it alone is instructions :P gj on this when get time I'll get round to swapping to this instead DDNS

Flermza


fugibo

:P And I was gonna start working on my own full-blown Environmental Effects scripts, with water reflections, time, tints, weather, and everything, but you already beat me to it...

Blizzard

I can give you the code I have so far. I took out the planned options for this release. You can finish it instead. I barely have time to do it myself.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

fugibo

0_o

Okay, then, I'll do that. Thank you, Blizz!

Blizzard

March 11, 2008, 10:15:35 am #9 Last Edit: March 11, 2008, 10:35:57 am by BlizzHard
I just sent you a download via PM. Alright, I'll make something happen that this turns into YOUR topic... ;)

EDIT: I MADE IT HAPPEN!!!111oneonetwothreeeight
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Nortos


Gilmerrambo

I cannot figure out how to make the time of day stay the same from one room to another. The clock still works but the tinting stops. Will someone help? :plz:

Starrodkirby86

Did you enable tinting? I'll quote from the Instructions within the script:
Call Script: ShowHide
# - Basic manipulation of ATES:
#
#   This system is based upon your eventing. It will work basically if you
#   want, but with a little bit of using the "Call Script" event command you
#   are able to control this system fully. You can call following commands:
#
#     ATES.on
#   Turns ATES on.
#
#     ATES.off
#   Turns ATES off.
#
#     ATES.tint_on
#   Turns ATES's screen tinting on.
#
#     ATES.tint_off
#   Turns ATES's screen tinting off.
#
#     ATES.active?
#   Returns true if ATES is turned on, otherwise false.
#
#     ATES.tinting?
#   Returns true if ATES tinting is turned on, otherwise false.
#
#     ATES.day?
#   Returns true if it's day, otherwise false. Alternatively you can check the
#   assigned switch instead.
#
#     ATES.night?
#   Returns true if it's night, otherwise false. Alternatively you can check
#   the assigned switch instead.
#   
#     ATES.advance(M, H)
#   This will make the time advanced by M minutes and H hours. Any negative
#   value used will cancel the execution of this command.
#   
#     ATES.make_it_day
#   This is a feature from DDNS which allows you to quickly jump to the
#   daytime.
#   
#     ATES.make_it_night
#   This is a feature from DDNS which allows you to quickly jump to the
#   nighttime.
Turn it on through a Call script command and insert ATES.tint_on

Make sure the time system is already on, but I'm sure it is considering time is moving. xD

What's osu!? It's a rhythm game. Thought I should have a signature with a working rank. ;P It's now clickable!
Still Aqua's biggest fan (Or am I?).




TheHackMan

August 15, 2008, 04:52:59 pm #13 Last Edit: August 15, 2008, 05:35:23 pm by TheHackMan
I just tried out the script and whenever I have it turn on with
Call Script: ATES.on
I end up with ArgumentError on line 353
"wrong number of arguments(5 for 2)"

It would seem line 353 is:
      ATES.advance(1, 0, 0, 0, 0) if @frame_count % (ATES::LENGTH / 36) == 0

When I change it to:
      ATES.advance(1, 0) if @frame_count % (ATES::LENGTH / 36) == 0
Then it works without any problems


Now I have run into a second problem, whenever I set the clock display to false(so it wont show) I get an error that says:
NoMethodError on line 445
undefined method ` draw' for nil:NilClass

Line 445 is:
   @clock.draw if $game_system.ates.frame_count % 40 == 0

Blizzard

Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

TheHackMan

Awesome, clock is now not displaying as it should when its set to false with no errors :D

happyman

Hello.  I know nothing of RGSS, but I like this script a lot.
I have a question though.  How do I make it so things happen at certain times of the day.
All I really need is some sort of "Condition Branch" for my eventing.

I ask because I'm making a Harvest Moon kind of game, and it would be cool if I could have townsfolk be in one place at 4:00 and a different place at 6:00.

Thanks, and this script is pretty cool :)

Blizzard

September 03, 2008, 04:36:47 pm #17 Last Edit: September 03, 2008, 04:38:02 pm by Blizzard
Look in the script. Day and Night trigger switches which you can use to determine the daytime. You can obtain the hour by using "$game_system.ates.time.hour" (without the double quotes).
Your best idea would be to assign the value to a variables (using "$game_variables[ID_NUMBER] = $game_system.ates.time.hour") and adding that to the event's precondition.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

happyman

Quote from: Blizzard on September 03, 2008, 04:36:47 pm
Look in the script. Day and Night trigger switches which you can use to determine the daytime. You can obtain the hour by using "$game_system.ates.time.hour" (without the double quotes).
Your best idea would be to assign the value to a variables (using "$game_variables[ID_NUMBER] = $game_system.ates.time.hour") and adding that to the event's precondition.


Thanks!  That sounds like a good idea, and it actually makes sense to me.
This helps a lot :)

Mightylink

October 12, 2008, 09:52:23 am #19 Last Edit: May 05, 2009, 04:13:52 am by Mightylink
Sounds good, I been struggling with DDNS so I'm looking for something new to try, this one should be sweet.