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

Offline ThallionDarkshine

  • Ethereal Devastator
  • ****
  • Posts: 268
  • LV: 55
  • Gender: Male
    • View Profile
[XP] Advanced Time and Environment System (ATES)
« on: February 13, 2013, 01:27:10 AM »
Advanced Time and Environment System (ATES)
Authors: Blizzard, ThallionDarkshine
Version: 1.02
Type: Time and Weather System
Key Term: Custom Environment System

Introduction

You all know Blizz's old time system, the ATES. Well, I saw it in his dev pack, and saw that he had never finished implementing all the planned features. So, I decided to finish it for him. This system adds a time and weather system to games that can be turned on and off at will. Many features of the script can be customized, including the clock display. In the clock you can display anything to the current hour, minute, day, weekday, month, weather, time period, and many more things. You can also modify the tints, and the script will automatically smoothly transition between the tints.

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

  • Adds a weather and time system to your game.
  • Disable several pieces of the system at will: the tinting, the weather, or the entire script.
  • Lock in any particular weather.
  • Jump quickly between time periods configured in the script.
  • Customize your own terrains, weather types, and time periods.

Screenshots

(click to show/hide)

Demo

https://www.box.com/s/vi3hqfkn2l8z0upnlx60

Script

(click to show/hide)

Instructions

All in the script.

Compatibility

None known, but may not work with other scripts that change the tint unless you turn tinting off.

Credits and Thanks

  • Blizzard
  • ThallionDarkshine

Author's Notes

This is a finished and rereleased version of the original ATES script found here. If you are having questions or problems, please first read the original topic!
« Last Edit: August 28, 2015, 06:33:01 AM by ThallionDarkshine »

Offline Zexion

  • Addicted to LoL
  • Chaos User
  • ******
  • Posts: 1511
  • LV: 69
  • Gender: Male
  • My anaconda don't...jk it does
    • View Profile
Re: [XP] Advanced Time and Environment System (ATES)
« Reply #1 on: February 13, 2013, 03:10:34 AM »
Really nice script! Now I definately need to get an SD reader..

Offline ThallionDarkshine

  • Ethereal Devastator
  • ****
  • Posts: 268
  • LV: 55
  • Gender: Male
    • View Profile
Re: [XP] Advanced Time and Environment System (ATES)
« Reply #2 on: February 13, 2013, 03:15:39 AM »
Thanks Zexion, I've had it for a while, I just was waiting for Blizz to give the main topic to me. But then he told me that it would be better to just make a new topic, so I did, and here it is.

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 19930
  • LV: 642
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: [XP] Advanced Time and Environment System (ATES)
« Reply #3 on: April 28, 2013, 08:59:16 PM »
There was a bug when using this with RMX-OS because you forgot to include RMX-OS in the check whether to enable the custom input module. I quickly fixed it and updated the script.
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 ThallionDarkshine

  • Ethereal Devastator
  • ****
  • Posts: 268
  • LV: 55
  • Gender: Male
    • View Profile
Re: [XP] Advanced Time and Environment System (ATES)
« Reply #4 on: April 28, 2013, 09:21:37 PM »
Thanks Blizz. I should have known that RMX-OS had a custom Input module too.

Offline whitespirits

  • Ethereal Devastator
  • ****
  • Posts: 318
  • LV: 2
    • View Profile
Re: [XP] Advanced Time and Environment System (ATES)
« Reply #5 on: June 17, 2014, 11:19:45 PM »
Im having an error using RMX-OS

(click to show/hide)

Offline KK20

  • Master Scripter Fixer
  • Global Moderator
  • Guardian of Chaos
  • ****
  • Posts: 3041
  • LV: 372
  • Gender: Male
  • Bringer of Salt
    • View Profile
Re: [XP] Advanced Time and Environment System (ATES)
« Reply #6 on: June 18, 2014, 01:46:40 AM »
It's, once again, loading a saved game and accessing a variable that is only created upon starting a new game.
Code: [Select]
class Game_Map
  alias setup_ates_later setup
  def setup(map_id)
    $game_system.ates ||= Game_ATES.new                 #<==
    $game_system.show_clock ||= (ATES::CFORMAT != [])   #<==
    $game_system.ates.update
#...and the rest of the code...
Add the two marked lines in this script. This will create the new variables in a saved game if they don't exist yet.
Other solution is to just wipe your saved data and start a new game.



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 whitespirits

  • Ethereal Devastator
  • ****
  • Posts: 318
  • LV: 2
    • View Profile
Re: [XP] Advanced Time and Environment System (ATES)
« Reply #7 on: June 18, 2014, 01:48:28 AM »
Thank you KK20 your great help :)

Offline whitespirits

  • Ethereal Devastator
  • ****
  • Posts: 318
  • LV: 2
    • View Profile
Re: [XP] Advanced Time and Environment System (ATES)
« Reply #8 on: June 18, 2014, 12:04:50 PM »
How do i remove the hud? with time and date etc

Offline KK20

  • Master Scripter Fixer
  • Global Moderator
  • Guardian of Chaos
  • ****
  • Posts: 3041
  • LV: 372
  • Gender: Male
  • Bringer of Salt
    • View Profile
Re: [XP] Advanced Time and Environment System (ATES)
« Reply #9 on: June 18, 2014, 08:13:27 PM »
As explained in the configuration:
Code: [Select]
  # HUD clock format
  # default : ['%H:%M%s', '%A', '%d/%m/%Y', '%S']
  # use [] for no clock
Code: [Select]
CFORMAT = []



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 Tgkkiller102

  • Total Beginner
  • Posts: 5
  • LV: 0
    • View Profile
Re: [XP] Advanced Time and Environment System (ATES)
« Reply #10 on: June 25, 2014, 01:29:20 PM »
Time goes to fast!!! How to make it slow down? And when I in house, if it rain, rains indoor. How do I fix it?
ps: I'm a vietnamese so I don't know a lot of English,

Offline KK20

  • Master Scripter Fixer
  • Global Moderator
  • Guardian of Chaos
  • ****
  • Posts: 3041
  • LV: 372
  • Gender: Male
  • Bringer of Salt
    • View Profile
Re: [XP] Advanced Time and Environment System (ATES)
« Reply #11 on: June 25, 2014, 10:45:21 PM »
To change time speed:
Code: [Select]
  # length of a day in seconds in-game, can't be less than 36, is being
  # quantized into intervals of 36 seconds
  LENGTH = 144
Use this script call when going inside
Code: [Select]
ATES.go_inside
And this when going outside
Code: [Select]
ATES.go_outside



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 Tgkkiller102

  • Total Beginner
  • Posts: 5
  • LV: 0
    • View Profile
Re: [XP] Advanced Time and Environment System (ATES)
« Reply #12 on: June 26, 2014, 05:57:00 AM »
Thank to much!

treign

  • Guest
Re: [XP] Advanced Time and Environment System (ATES)
« Reply #13 on: March 20, 2015, 08:06:31 AM »
Been working on a game for a couple months. Been using this script, and got myself a bug.
First i'm running in this order,
Letter by Letter Message Window : Tons of Add-ons 7.65b : Easy LvlUp Notifier 1.21b : Stormtronics CMS 5,51b : ATES 1.01 : Battle Memory Commands v1.3
The issue is with ATES and with tone change i believe. The error i get is....

script 'interpreter 7' line 274: typeerror occurred.
can't convert FalseClass into tone

It happens when i'm in a town/map and the weather changes to clouds and i exit out to the world/map using the transfer player event.

If the weather don't change i don't get the error when i leave. I'm coping and pasting the script as it sits in my game below. I can't for the life of me figure this out and can't find a solution anywhere.

I was going to use the old 0.4 script i used back in the day but the script link as 404'd.

Help is appreciated. Ill check back tomorrow night for any reply's
Code: [Select]
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# Advanced Time and Environment System (ATES) by Blizzard and ThallionDarkshine
# Version: 1.01
# Type: Autonomous Timeflow and Environment Controller
# Date v0.3: 11.3.2008
# Date v0.31: 8.4.2009
# Date v0.32: 13.4.2009
# Date v0.33: 4.5.2009
# Date v0.34: 5.5.2009
# Date v1.0: 12.2.2013
# Date v1.01: 28.4.2013
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#  
#  This work is protected by the following license:
# #----------------------------------------------------------------------------
# #  
# #  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.
# #  
# #----------------------------------------------------------------------------
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# Compatibility:
#
#   99% compatible with SDK v1.x. 90% compatible with SDK 2.x. WILL corrupt old
#   savegames. Can cause incompatibilty issues with DNS-es.
#
#
# Features:
#
#   - complete control over and easy manipulating of time and weather
#   - customizable day and night tinting
#   - HUD clock optional
#   - easier to control and more powerful than DDNS
#
#
# IMPORTANT NOTES:
#
# - This system has a working preconfiguration, be aware that a custom setup
#   will need you to understand what each option does, so please read the
#   configuration instructions.
# - Why does this system use switches to determine whether it's day or night?
#   Simple: You can use conditions in enemy attacks to determine whether an
#   attack should be used only at night or only at day.
#
#
# Instructions:
#
# - Explanation:
#
#   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.
#
#
# - 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.clock_on
#   Turns ATES's clock display on.
#
#     ATES.clock_off
#   Turns ATES's clock display 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.
#  
#     ATES.weather_on
#   This allows you to turn on the weather system.
#
#     ATES.weather_off
#   This allows you to turn off the weather system.
#
#     ATES.lock_weather
#   This allows you to lock the current weather in place without disabling the
#   weather system entirely.
#
#     ATES.unlock_weather
#   This command unlocks the current weather.
#
#     ATES.weather_active?
#   Returns true if the weather system is turned on, otherwise false.
#
#     ATES.set_time(TIME_INDEX or TIME_NAME)
#   Sets the current time to the time at the index of TIME_INDEX or with the
#   name of TIME_NAME. Its better to use TIME_NAME because some bugs may occur
#   from using TIME_INDEX.
#
#     ATES.go_inside
#   A feature from the DDNS which allows you to change the lighting mode to
#   inside.
#
#     ATES.go_inside_dark
#   A feature from the DDNS which allows you to change the lighting mode to
#   inside dark.
#
#     ATES.go_outside
#   A feature from the DDNS which allows you to change the lighting mode to
#   outside.
#
#     ATES.set_weather(INDEX)
#   Sets the current weather to the weather at index INDEX.
#
#     ATES.terrain=(TERRAIN_NAME)
#   Sets the terrain to the terrain named TERRAIN_NAME.
#
#     ATES.time_name
#   Returns the name of the current time of day.
#
# - Enhancement hints:
#
#   If you wish to implement the DDNS further into your game and e.g. allow
#   different behavious of monsters during day and night, you only need to
#   check the the state of the appropriate switch. e.g. If NSWITCH is turned
#   on inflict "Sleep" on one enemy.
#
#
# Additional info:
#
#   The daytime and nighttime tintings were tested appropriately and optimal
#   tinting is being used.
#   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
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=

module ATES
  
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# START Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  # switch ID of the "day" switch
  DSWITCH = 51
  # switch ID of the "night" switch
  NSWITCH = 52
  # variable ID of the temperature
  TVARIABLE = 53
  # length of a day in seconds in-game, can't be less than 36, is being
  # quantized into intervals of 36 seconds
  LENGTH = 288
  # the amount to multiply weather sound by when inside
  INSIDE_SOUND = 0.5
  # the amount to multiply tone red, green, blue and gray by when inside
  INSIDE_TONE = 0.0
  # the tone for dark interiors
  DARK_INSIDE_TONE = Tone.new(-85, -85, -85, 85)
  # weather setup, create new types of weather here
  #  note - if you don't want a certain effect such as weather, fog, or sound,
  #    just leave the array for that effect empty
  #          ['NAME', WEATHER_SEVERITY, [WEATHER_TYPE, LOW_STRENGTH..HIGH_STRENGTH],
  #            [SOUND_NAME, SOUND_VOLUME_MIN..SOUND_VOLUME_MAX, SOUND_PITCH], [FOG_NAME, FOG_OPACITY, FOG_HUE,
  #            FOG_ZOOM, FOG_SX, FOG_SY, [TONE_RED, TONE_GREEN, TONE_BLUE, TONE_GRAY]],
  #            [SOUND_EFFECT_NAME, SOUND_VOLUME_MIN..SOUND_VOLUME_MAX, SOUND_PITCH, EFFECT_PROBABILITY,
  #            FLASH_DURATION, [FLASH_COLOR_RED, FLASH_COLOR_GREEN, FLASH_COLOR_BLUE]]]
  WEATHER = [['Drizzling', 0, 1..4, [1], ['005-Rain01', 65..80, 100], [], []],
             ['Raining', 0, 5..8, [1], ['006-Rain02', 75..90, 100], [], ['061-Thunderclap01', 60..85, 100, 0.07, 4, [255, 255, 255]]],
             ['Storm', 1, 9..10, [1], ['007-Rain03', 80..100, 100], [], ['061-Thunderclap01', 70..95, 110, 0.08, 6, [255, 255, 255]]],
             ['Cloudy', 0, 1..1, [], [], ['002-Clouds01', 60, 0, 200, 4, 3, [0, 0, 0, 0]], []],
             ['Raining', 0, 1..4, [2], ['006-Rain02', 70..85, 100], [], ['061-Thunderclap01', 65..90, 110, 0.08, 6, [255, 255, 255]]],
             ['Storm', 1, 5..8, [2], ['007-Rain03', 75..90, 100], [], ['061-Thunderclap01', 70..95, 110, 0.09, 7, [255, 255, 255]]],
             ['Storm', 2, 9..10, [2], ['007-Rain03', 90..100, 100], [], ['061-Thunderclap01', 85..100, 110, 0.11, 7, [255, 255, 255]]],
             ['Flurry', 1, 1..4, [3], ['002-Wind02', 70..85, 100], [], []],
             ['Snowing', 1, 5..8, [3], ['003-Wind03', 80..95, 100], [], []],
             ['Blizzard', 2, 9..10, [3], ['004-Wind04', 85..100, 100], [], []]]
  # normal weather duration in seconds
  WEATHER_DURATION = 128
  # variance of the weather duration in seconds
  WEATHER_VARIANCE = 32
  # the name of the default weather type (what gets shown in the clock when
  #   there is no weather)
  DEFAULT_WEATHER_NAME = 'Sunny'
  # season setup, create a new season by using this template
  #          ['NAME', START_DAY, START_MONTH, MIN_TEMP..MAX_TEMP, WEATHER_PROBABILITY,
  #            BAD_WEATHER_PROBABILITY, VERY_BAD_WEATHER_PROBABILITY, WEATHER_POSSIBILITIES]
  SEASONS = [
             ['Spring', 22,  3,   0..25, 0.003, 0.3, 0.05, [0, 1, 2, 3, 4, 5]] ,
             ['Summer', 21,  6,  20..35, 0.003, 0.1, 0.2, [0, 1, 3, 4, 5, 6]]  ,
             ['Autumn', 20,  9,   0..25, 0.003, 0.2, 0.1, [0, 2, 3, 4, 5, 7]]  ,
             ['Winter', 21, 12, -20..5, 0.003, 0.5, 0.1, [0, 2, 3, 4, 7, 8, 9]]
            ]
  # terrain setup, create a new terrain by using this template
  #          ['NAME', MIN_TEMP..MAX_TEMP, WEATHER_EXCLUSIONS]
  TERRAINS = [
              ['Forest', -7..0, [3]],
              ['Desert', 11..16, [8, 9]],
              ['Mountain', -9..-4, []],
              ['Plains', -2..0, []],
              ['Beach', -5..-2, [8, 9]]
             ]
  # longest day date, the longest night date is half a year later/earlier
  LONGEST = [21, 6]
  # the tone at which day starts
  DAY_START = "Sunrise"
  # the tone at which night starts
  NIGHT_START = "Dusk"
  # the different screen tones and temperature modifiers at certain points during the day on the longest and shortest days
  # to make a new time of day, add this into TIMES: NAME => [RED, GREEN, BLUE, GRAY, TEMPERATURE_MODIFIER]
  TIMES = {
           "Dawn" => [-17, -17, 17, 0, -4],
           "Sunrise" => [48, 30, 30, 0, -2],
           "Noon" => [24, 10, 10, 0, 5],
           "Sunset" => [57, -17, -17, 0, 1],
           "Dusk" => [-17, -17, 17, 0, -3],
           "Night" => [-150, -120, -120, 200, -8]
          }
  # once you have customized the tones, put the tones into LONG_TIMES and SHORT_TIMES with [name_of_time, hour, minute]
  LONG_TIMES = [["Dawn", 4, 30],
                ["Sunrise", 5, 30],
                ["Noon", 13, 00],
                ["Sunset", 21, 00],
                ["Dusk", 22, 00],
                ["Night", 1, 30]]
  SHORT_TIMES = [["Dawn", 6, 30],
                ["Sunrise", 7, 30],
                ["Noon", 13, 00],
                ["Sunset", 16, 30],
                ["Dusk", 17, 00],
                ["Night", 23, 30]]
  # makes the screen brighter during "summer" days
  OVERLIGHTING = true
  # makes the screen darker during the night, not recommended
  OVERDARKENING = false
  # the first year in your calender, the player can't scroll further back
  FYEAR = 1980
  # the last year in your calender, the player can't scroll further forth
  LYEAR = 2599
  # the suffix for temperature
  TEMP_SUFFIX = "°C"
  # the different holidays and their dates
  #   the format for adding a new holiday is:
  #     [NAME, SETUP_TYPE, MONTH, (DAY or WEEKDAY, NUMBER)]
  #   whether to use DAY or WEEKDAY, NUMBER depends on SETUP_TYPE:
  #     (0 - DAY; 1 - WDAY, NUMBER)
  # note - the current holiday will replace the weekday in the clock if it is a
  #   holiday
  HOLIDAYS = [
               ["Christmas", 0, 11, 24],
               ["New Year's Day", 0, 0, 0],
               ["Thanksgiving", 1, 10, 4, 4],
               ["Groundhog Day", 0, 1, 1],
               ["Valentine's Day", 0, 1, 13],
               ["Earth Day", 0, 3, 21],
               ["Arbor Day", 1, 3, 5, -1],
               ["Mother's Day", 1, 2, 7, 2],
               ["Father's Day", 1, 5, 7, 3],
               ["Halloween", 0, 9, 30],
             ]
  # HUD clock format
  # default : ['%H:%M%s', '%A', '%d/%m/%Y', '%S']
  # use [] for no clock
  # it means: 1st row - "HOURS:MINUTES SUFFIX"
  #           2nd row - "WEEKDAY"
  #           3rd row - "DAY/MONTH/YEAR"
  #           4th row - "SEASON"
  # different combinations to input ATES information into the clock
  #   %H - Hour
  #   %M - Minute
  #   %s - Suffix (AM or PM) (only if not using 24 hour time)
  #   %A - Weekday
  #   %d - Day of the Month
  #   %D - Day of the Year
  #   %m - Month
  #   %n - Month Name
  #   %l - Month Length
  #   %Y - Year
  #   %L - Year Length
  #   %S - Season
  #   %w - Weather  #   %t - Terrain
  #   %T - Temperature
  #   %p - Time of Day
  CFORMAT = ['%H:%M %s']
  # the width of the clock
  CWIDTH = 180
  # names of your days, automatically sets up a week's length
  WEEKDAYS = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday',
              'Saturday']
  WEEKDAY_ABBREVIATIONS = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']
  # names of your months, automatically sets up a year's length
  MONTHS = ['January', 'February', 'March', 'April', 'May', 'June', 'July',
            'August', 'September', 'October', 'November', 'December']
  # abbreviations for month names
  MONTH_ABBREVIATIONS = ['Jan', 'Feb', 'March', 'Apr', 'May', 'June', 'July',
                         'Aug', 'Sept', 'Oct', 'Nov', 'Dec']
  # days in each month
  MONTHDAYS = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
  # the first day in the game [DAY, MONTH, YEAR, WEEKDAY]
  # set this option to [] if you want the game to start "now"
  START = [23, 03, 1980, 7]
  # set this option to true to turn on military time (24 hour time)
  HOUR24 = false
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# END Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
« Last Edit: March 20, 2015, 08:25:57 AM by KK20 »

Offline KK20

  • Master Scripter Fixer
  • Global Moderator
  • Guardian of Chaos
  • ****
  • Posts: 3041
  • LV: 372
  • Gender: Male
  • Bringer of Salt
    • View Profile
Re: [XP] Advanced Time and Environment System (ATES)
« Reply #14 on: March 20, 2015, 08:29:45 AM »
First off, use code tags when pasting any code at all. Secondly, there really was no point to post the entire script when it's already provided in the OP. Besides, it's a huge script--you can't even fit the entire thing in a message post. I edited your post to reflect these changes.

The error message is stating that a Script event command is acting weird. Do you have any events, probably parallel process or autorun, that uses a script call? If so, post it.



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

treign

  • Guest
Re: [XP] Advanced Time and Environment System (ATES)
« Reply #15 on: March 20, 2015, 06:52:59 PM »
Yes i do have a parallel process using a call script, on both the map transferring from and one on the map transferring too.
Blown away you got that from the info i provided, anyways here are how each are set up.

TOWN
Parallel Process
Change Actor Graphic .....
Change Actor Graphic Slot 2....
Change Actor Graphic Slot 3....
Change Actor Graphic Slot 4....
Set Move Route : player / Change Speed :4
Change Save Access: Enabled
Script: ATES.on
Script: ATES.tint_on
Script: ATES.weather_on
Script: ATES.clock.on
Text: \p\map\%[015]
Erase Event

WORLD MAP
Parallel Process
Change Actor Graphic .....
Change Actor Graphic Slot 2....
Change Actor Graphic Slot 3....
Change Actor Graphic Slot 4....
Set Move Route : player / Change Speed :3
Change Save Access: Enabled
Script: ATES.on
Script: ATES.tint_on
Script: ATES.weather_on
Script: ATES.clock.on
Text: \p\map\%[015]
Erase Event

I know its basically the same thing besides the speed change, and the reason behind me doing it that way was because if a player saved the game and i had manually set tint options and disabled the ATES i wanted to make sure everything weather related stayed on when he returned. I have parallel events on every map setting up the conditions of each. I'm guessing you will tell me to remove the script calls which i will be doing if necessary.

Oh and sorry for ticking ya off with the script paste....new as you can tell. That being said i used too talk with blizzard back on rpgmaker rmx or something back in 07. Decided i wanted to finish at least one game before i kick the bucket. Take care and thanks for replying.

Offline KK20

  • Master Scripter Fixer
  • Global Moderator
  • Guardian of Chaos
  • ****
  • Posts: 3041
  • LV: 372
  • Gender: Male
  • Bringer of Salt
    • View Profile
Re: [XP] Advanced Time and Environment System (ATES)
« Reply #16 on: March 20, 2015, 10:11:13 PM »
I've noticed a pattern in the code...line 395 in OP
Code: [Select]
  def self.on
    $game_system.ates.active = true
    return true
  end
 
  def self.off
    $game_system.ates.active = false
    return true
  end
 
  def self.tint_on(frames = 0)
    $game_screen.start_tone_change($game_system.ates.get_environment[0], frames)
    $game_system.ates.tinting = true
    return true
  end
 
  def self.tint_off(reset = true)
    $game_screen.start_tone_change(Tone.new(0, 0, 0, 0), 0) if reset
    $game_system.ates.tinting = false
    return true
  end
 
  def self.weather_off
    $game_system.ates.weather.weather_enabled = false
    $game_system.ates.weather.pause_weather(0) if $game_system.ates.weather.current_weather and $game_system.ates.weather.current_weather != -1
  end
 
  def self.weather_on
    $game_system.ates.weather.weather_enabled = true
    $game_system.ates.weather.resume_weather(0) if $game_system.ates.weather.current_weather and $game_system.ates.weather.current_weather != -1
  end
Notice how the last two don't have a 'return true' at the end of them? So I went spelunking and
Code: [Select]
  def resume_weather(speed = -1)
  #...
  if weather[5].length > 0
    #...
    $game_map.start_fog_tone_change(Tone.new(*weather[5][6]), 0)
  end
end
That last line is returning a Tone object, which is then returned to the Interpreter and compared with false, which gives us our error.

So yeah, just put return true in those two methods and it should be good.



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

treign

  • Guest
Re: [XP] Advanced Time and Environment System (ATES)
« Reply #17 on: March 21, 2015, 06:53:41 AM »
That did the trick......thank you kindly. Greatly appreciate your time, Though my game won't be as crazy as some of the others i saw i'm going to finish it. I think the biggest thing i got going for mine is i'm doing all the music for it. Take care and hope you have a great weekend.

Travis

Offline KK20

  • Master Scripter Fixer
  • Global Moderator
  • Guardian of Chaos
  • ****
  • Posts: 3041
  • LV: 372
  • Gender: Male
  • Bringer of Salt
    • View Profile
Re: [XP] Advanced Time and Environment System (ATES)
« Reply #18 on: March 21, 2015, 07:23:02 AM »
Script now updated to v1.02.

Oh a music man huh? I'd like to hear them :)

And thanks for confirming the solution. Fixed in OP.
There were actually a couple more script calls that didn't have any return statements in them so I fixed those other ones too, just in case.
(Scary thing is this has not been reported nor touched on for around 2 years. Maybe it's because those who used this also have Interpreter Script Call Fix.)
« Last Edit: March 21, 2015, 07:29:33 AM by KK20 »



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

Krozandir

  • Guest
Re: [XP] Advanced Time and Environment System (ATES)
« Reply #19 on: August 14, 2015, 03:34:59 PM »
I'm having an error when using ATES.advance (0, 2, 0, 0, 0) I want the time to advance 2 hours and instead of that, it always advance 24 hours.
(click to show/hide)
« Last Edit: August 14, 2015, 03:36:21 PM by Krozandir »