Author Topic: [XP] Advanced Time and Environment System  (Read 55626 times)

Offline fugibo

  • World Conqueror
  • Chaos User
  • ******
  • Posts: 1966
  • LV: 44
    • View Profile
[XP] Advanced Time and Environment System
« on: March 10, 2008, 06:08:36 AM »
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
« Last Edit: February 13, 2013, 09:20:24 AM by Blizzard »

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 20015
  • LV: 651
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: [XP] Advanced Time and Environment System
« Reply #1 on: March 11, 2008, 12:39:20 PM »
Merge successful. :3
« Last Edit: March 11, 2008, 05:34:13 PM by BlizzHard »
Check out Daygames and our games:

King of Booze      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


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

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

Offline Nortos

  • Has earned a custom title
  • Chaos User
  • ******
  • Posts: 1303
  • LV: 20
  • Gender: Male
  • Celestial Bomb my Digital Ass
    • View Profile
Re: [XP] Advanced Time and Environment System
« Reply #2 on: March 11, 2008, 12:57:53 PM »
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 :)
(click to show/hide)
Nortos's Stealth System
UltaFlame's Storyline Service
Blizz ABS - The Ultimate ABS!
My Resources

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 20015
  • LV: 651
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: [XP] Advanced Time and Environment System
« Reply #3 on: March 11, 2008, 01:04:34 PM »
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      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


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

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

Offline Nortos

  • Has earned a custom title
  • Chaos User
  • ******
  • Posts: 1303
  • LV: 20
  • Gender: Male
  • Celestial Bomb my Digital Ass
    • View Profile
Re: [XP] Advanced Time and Environment System
« Reply #4 on: March 11, 2008, 01:10:01 PM »
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
(click to show/hide)
Nortos's Stealth System
UltaFlame's Storyline Service
Blizz ABS - The Ultimate ABS!
My Resources

Flermza

  • Guest
Re: [XP] Advanced Time and Environment System
« Reply #5 on: March 11, 2008, 02:38:37 PM »
New time system, awesome work!

Offline fugibo

  • World Conqueror
  • Chaos User
  • ******
  • Posts: 1966
  • LV: 44
    • View Profile
Re: [XP] Advanced Time and Environment System
« Reply #6 on: March 11, 2008, 02:49:30 PM »
: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...

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 20015
  • LV: 651
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: [XP] Advanced Time and Environment System
« Reply #7 on: March 11, 2008, 04:54:30 PM »
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      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


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

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

Offline fugibo

  • World Conqueror
  • Chaos User
  • ******
  • Posts: 1966
  • LV: 44
    • View Profile
Re: [XP] Advanced Time and Environment System
« Reply #8 on: March 11, 2008, 05:05:27 PM »
0_o

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

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 20015
  • LV: 651
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: [XP] Advanced Time and Environment System
« Reply #9 on: March 11, 2008, 05:15:35 PM »
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
« Last Edit: March 11, 2008, 05:35:57 PM by BlizzHard »
Check out Daygames and our games:

King of Booze      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


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

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

Offline Nortos

  • Has earned a custom title
  • Chaos User
  • ******
  • Posts: 1303
  • LV: 20
  • Gender: Male
  • Celestial Bomb my Digital Ass
    • View Profile
Re: [XP] Advanced Time and Environment System
« Reply #10 on: March 11, 2008, 11:37:18 PM »
lol anyway looking forward to it WcW
(click to show/hide)
Nortos's Stealth System
UltaFlame's Storyline Service
Blizz ABS - The Ultimate ABS!
My Resources

Gilmerrambo

  • Guest
Re: [XP] Advanced Time and Environment System
« Reply #11 on: July 18, 2008, 07:04:56 PM »
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:

Offline Starrodkirby86

  • Kirby de Varita Estelar
  • Guardian of Chaos
  • ********
  • Posts: 3281
  • LV: 194
  • Gender: Male
  • ~!
    • View Profile
    • The Archive of Starrodkirby86
Re: [XP] Advanced Time and Environment System
« Reply #12 on: July 18, 2008, 07:11:38 PM »
Did you enable tinting? I'll quote from the Instructions within the script:
(click to show/hide)
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?).



Offline TheHackMan

  • Awakened Visionist
  • **
  • Posts: 53
  • LV: 1
  • Gender: Male
    • View Profile
    • 9 Lord Rescue
Re: [XP] Advanced Time and Environment System
« Reply #13 on: August 15, 2008, 10:52:59 PM »
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:
Code: [Select]
NoMethodError on line 445
undefined method ` draw' for nil:NilClass
Line 445 is:
Code: [Select]
   @clock.draw if $game_system.ates.frame_count % 40 == 0
« Last Edit: August 15, 2008, 11:35:23 PM by TheHackMan »

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 20015
  • LV: 651
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: [XP] Advanced Time and Environment System
« Reply #14 on: August 16, 2008, 01:30:39 AM »
I put up a fixed version.
Check out Daygames and our games:

King of Booze      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


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

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

Offline TheHackMan

  • Awakened Visionist
  • **
  • Posts: 53
  • LV: 1
  • Gender: Male
    • View Profile
    • 9 Lord Rescue
Re: [XP] Advanced Time and Environment System
« Reply #15 on: August 16, 2008, 03:09:08 AM »
Awesome, clock is now not displaying as it should when its set to false with no errors :D

Offline happyman

  • Trained Member
  • *
  • Posts: 41
  • LV: 0
  • Gender: Male
    • View Profile
Re: [XP] Advanced Time and Environment System
« Reply #16 on: September 03, 2008, 10:33:18 PM »
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 :)

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 20015
  • LV: 651
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: [XP] Advanced Time and Environment System
« Reply #17 on: September 03, 2008, 10: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.
« Last Edit: September 03, 2008, 10:38:02 PM by Blizzard »
Check out Daygames and our games:

King of Booze      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


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

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

Offline happyman

  • Trained Member
  • *
  • Posts: 41
  • LV: 0
  • Gender: Male
    • View Profile
Re: [XP] Advanced Time and Environment System
« Reply #18 on: September 03, 2008, 10:50:40 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 :)

Offline Mightylink

  • Transcended Spirit
  • ***
  • Posts: 216
  • LV: 6
  • Gender: Male
  • There is no spoon...
    • View Profile
    • ZVC Studio's
Re: [XP] Advanced Time and Environment System
« Reply #19 on: October 12, 2008, 03:52:23 PM »
Sounds good, I been struggling with DDNS so I'm looking for something new to try, this one should be sweet.
« Last Edit: May 05, 2009, 10:13:52 AM by Mightylink »