[XP] Complete Climate and Time System (CCTS)

Started by ForeverZer0, May 12, 2010, 06:08:20 pm

Previous topic - Next topic

AliveDrive

i dont know coding at all.

that being said, what did you make that super fly gui out of?

'cause thats the stuff to learn right there kids.
Quote from: Blizzard on September 09, 2011, 02:26:33 am
The permanent solution for your problem would be to stop hanging out with stupid people.

ForeverZer0

I coding in C#, though the same thing can be done with about any language. Some languages are just better and easier to do it than others. Visual Studio makes it much easier and helps take away most of the tedious aspects of finding the exact coodinates and sizes to place the controls.
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

ForeverZer0

* double-posts *

I fixed the link to the .NET Framework download. I discovered that it does not work properly with the compact installation.  :P

I apologize to anyone who wasted there time downloaded that one, but the new link has been tested, and I guarantee 100% that the CCTS Configuration will work with it.
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

The Niche

That might explain why the BlizzABS configuration still isn't working...thanks for that, Zer0!
Level me down, I'm trying to become the anti-blizz!
Quote from: winkio on June 15, 2011, 07:30:23 pm
Ah, excellent.  You liked my amusing sideshow, yes?  I'm just a simple fool, my wit entertains the wise, and my wisdom fools the fools.



I'm like the bible, widely hated and beautifully quotable.

Dropbox is this way, not any other way!

ForeverZer0

I made a virtual machine that ran XP, where I have RMXP installed and all other related stuff. I attempted to run the CCTS Config after installing from the link I gave, and was surprised to see that it didn't work. I'd get this:

The application failed to initialize (0x0000135). Click to terminate.


After a little investigation, I came across the correct version, installed it, and it now works. I never tested it before.  :wacko:

I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

The Niche

Level me down, I'm trying to become the anti-blizz!
Quote from: winkio on June 15, 2011, 07:30:23 pm
Ah, excellent.  You liked my amusing sideshow, yes?  I'm just a simple fool, my wit entertains the wise, and my wisdom fools the fools.



I'm like the bible, widely hated and beautifully quotable.

Dropbox is this way, not any other way!

Xuroth

March 22, 2011, 11:20:58 am #146 Last Edit: March 22, 2011, 11:29:09 am by Xuroth
Zer0, I used your updated script/config program. I was browing the code when I noticed in the configuration for case climate, all the climates are "when 0 #climate" are they all supposed to be 0? Or am I missing something? its around line 390 - 480. in the hourly tints area

Also, tints seem to not update unless changing maps. did I configure it wrong?

ForeverZer0

I'll look into it a little later, at work at the second.  :P

What other scripts are you using?
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

Xuroth

Leon_Westbrooke's shop menu
LiTTleDRAgo's show event names
your cms
your advanced weather
this ccts
blizzard's pay to heal
Your add-ons (only below PTH for the scene converter)
tons 1-3

ForeverZer0

I fixed the configuration program and the link has been updated.
I mistakenly forgot to add one line in a constructor for Climates.

this.Id = id;


This constructor is only used in the program to set the default settings, so I apparently missed it while debugging. Either way, I apologize for the mistake, but it is working correctly now.  ;)
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

Xuroth

perhaps im not doing something correctly. the system still doesnt change tint by hour. Im using an event script call to jump the time forward by 3 hours and then I let it sit for a few minutes (in real time) and no tinting takes, place. however if I change maps... it suddenly tints...

it also doesnt tint if I just let it sit for a while so I dont think its a problem with the script call...

ForeverZer0

I will look into the script today, I really only looked at the config yesterday.  :P

Are you sure that "tinting" variables are set to true?
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

Xuroth

I'd imagine they were true. I looked through but couldnt find anything in the config that wasnt working.  also, the hourly tints work fine, but only if I change maps. changing scenes seems to have no effect...

ForeverZer0

Sorry for the bump.
Nothing has changed. I reorganized my dropbox and had to update the links so I can delete files that are out of place.
I fixed a few spelling errors in the main post, added a link to .Net Framework 4.0, and made a few other minor edits, as well.
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

winkio

I don't really mean to bother you, but battle test doesn't work (errors out after around 10 seconds) because of how you set up game screen.  While the functionality is great, it's not written very efficiently, and you broke a lot of the organizational barriers set up in RMXP.  Would you have time to make some changes to the script in the next few weeks?  If not, I'll probably just create my own modified version, so don't feel like you have to.

ForeverZer0

May 22, 2011, 06:33:18 pm #155 Last Edit: May 22, 2011, 06:56:14 pm by ForeverZer0
I have no doubt there is a some room to improve efficiency. I was not a huge fan of using floats myself, but it is needed to keep accuracy. I can think of a better way to actually use them. They don't need applied to the actual tone each frame, but just stored and apply the change once the float rolls over to an integer other than what it is.

As for the battle test, I don't really understand what you mean. I assumed at first that I had a major problem because I always use a little title skip script when testing, and that could have slipped by me if I had forgot to test it in an unedited project, but I placed it in a new project, and there were no problems with the battle test. I can't seem to get any "script is hanging" error. I assume you are testing in the SoD with a CBS, so it may be simply a clash between the two, though I have never seen the CBS to know, so its just a thought.

EDIT:
Either way, yes, I'll look into it to answer your question.
I guess I forgot to answer your actual question... :P



I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

winkio

well yeah, I first got the error with the battle system in SOD, but then I tested it with a new project, and I still got it:

Quoteline 1163: NoMethodError

Undefined method 'weather' for nil:NilClass


so obviously, the system is not fully initialized.

astheroth

May 31, 2011, 11:04:06 am #157 Last Edit: May 31, 2011, 11:08:10 am by astheroth
Hello,
I have a concern with this great script.
When the player goes to a "Outdoor" climate map, the game crash with a message:

and the log:
Spoiler: ShowHide
---------- Erreur de script : CCTS ----------
----- Type
Errno::ENOENT

----- Message
No such file or directory - Audio/BGS/

----- Position dans CCTS
Ligne 953

----- Backtrace
Script : CCTS | Ligne : 953 | Méthode : in `bgs_play'
Script : CCTS | Ligne : 953 | Méthode : in `change_bgs_volume'
Script : CCTS | Ligne : 974 | Méthode : in `update'
Script : Scene_Map | Ligne : 52 | Méthode : in `alias_update'
Script : Scene_Map | Ligne : 47 | Méthode : in `loop'
Script : Scene_Map | Ligne : 66 | Méthode : in `alias_update'
Script : MAPPANEL | Ligne : 90 | Méthode : in `update_passminimap'
Script : Minimap | Ligne : 44 | Méthode : in `zer0_clock_upd'
Script : CCTS | Ligne : 1290 | Méthode : in `update'
Script : Scene_Map | Ligne : 25 | Méthode : in `main_passminimap'
Script : Scene_Map | Ligne : 19 | Méthode : in `loop'
Script : Scene_Map | Ligne : 30 | Méthode : in `main_passminimap'
Script : Minimap | Ligne : 31 | Méthode : in `zer0_clock_main'
Script : CCTS | Ligne : 1281 | Méthode : in `main'
Script : Main | Ligne : 49


Here the script with my config:
Spoiler: ShowHide
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
# Complete Climate and Time System (CCTS)
# Author: ForeverZer0
# Version: 1.2.3
# Date: 2.10.2011
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
#                             VERSION HISTORY
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
# v.1.0   5.12.2010
#   - Original Release
# v.1.1   5.26.2010
#   - Added an attr_reader I mistakenly placed in the debugger that would make
#     the debugger a requirement for the script to work.
#   - Added some commands for message text to display the time, day, month, etc.
# v.1.2   10.10.10
#   - Added the "Good Weather Switch" by popular demand.
#   - Added ability to have game variables set to the current time values.
#   - Fixed bug so that the map refreshes properly when switches change.
#   - Fixed it so that window returns when scene changes and returns.
#   - Cleaned up overall code and added comments to help follow the main flow
#     of the script and understand it better.
#   - Changed the debug. No longer just prints to the standard output, but now
#     displays all the same info on-screen in real-time as it occurs.
#   - Built the Missing Climate Logger into the script. Will create a text file
#     in the directory listing any errors every time the game is play-tested.
#   - Added configurable format for how time is displayed.
#   - Added configuration for the look of the clock's windowskin
#   - Added Analog Clock spriteset.
#   - Consolidated the scripts into one.
# v.1.2.1  10.12.10
#   - Fixed a syntax error (Thanks rim1000 for pointing out)
# v.1.2.2  10.16.10
#   - Actually fixed the bug I should have fixed in 1.2.1
#   - Altered 'calculate_time' method, which would not allow the switches to
#     refresh correctly until the next game hour passed. Switches will not
#     update each game minute as they were intended to.
# v.1.2.3  2.25.11
#   - Added configuration for setting bold and italic in the clock.
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
#
# Introduction:
#
#   This script will give you TOTAL control of weather and time in your game. It
#   will allow you to set up different climates that use different weather
#   patterns, tints, sounds, and effects. It is also a complete Time System that
#   gives you full control of, and keeps track of, time, with every possible
#   configuration at your disposal. Note this script comes with a preset config
#   that will be suitable for most's needs, but it can be configured to the most
#   extreme level if so desired, which will require more work. It is not
#   neccessary to do this, but the ability is there.
#
# Features:
#
#   - Automatic weather control with defined types, frequency, probabilities,
#     tints, and sounds for any and every map in your game.
#   - Weather tint and BGS will fade in/out smoothly with the weather for a very
#     realistic feel
#   - Configurable screen tints for every climate, month, and hour that will
#     smoothly transition over the course of each hour, not transition to day
#     or night in matter of seconds.
#   - Completely configurable calendar system that can use custom names for days
#     and months, custom month lengths, etc.
#   - Can easily use configurable switches and variables for event conditions
#     based off the hour of the day, the season of the year, or the current
#     weather.
#   - Comes with a clock that can be toggled on/off by the player, with custom
#     location, opacity, and font name/size options.
#   - Also have option to use an analog clock.
#   - Complete control to freeze the time, screen tone, weather, or time speed,
#     seperately or together, with simple script calls.
#   - Comes with error checking and a debugger for easily testing your own
#     customization, and to help understand the system.
#   - Short, simple script calls for easy manipulation
#   - Compatible with Zero Advanced Weather and MAWS (v.1.2 or higher)
#
# Instructions:
#
#   All instructions for configuration are explained below in each section.
#
#   ------------------------------------------------------------------------
#
#   Script Calls:
#
# * time.freeze(true/false)
#   time.freeze = true
#     - Will freeze/unfreeze time, tone, and weather.
#
# * time.tone_freeze(true/false)
#     - Will freeze/unfreeze the screen tone from updating automatically. Use
#       before you would like to set a custom screen tone, otherwise the system
#       will override it.
#
# * time.weather_freeze(true/false)
#     - Will freeze/unfreeze the weather from updating. Freeze if you would like
#       to manually set the weather and do not want the system to override it.
#
# * time.speed_freeze(true/false)
#     - Will keep the time speed set at a specific rate, and not change per each
#       map as the system usually does.
#
# * time.change_speed(SPEED)
#     - Will set the time speed to SPEED. Use time.speed_freeze if you would
#       would like to keep it there indefinitely
#
# * time.set(m, h, d, m, y)
#     - Sets the time to time defined in (minute, hour, day, month, year)
#       This will also allow you to 'go back' in time.
#
# * time.advance_minute(NUMBER)
#     - Advances minute by NUMBER
#
# * time.advance_hour(NUMBER)
#     - Advances hour by NUMBER
#
# * time.advance_day(NUMBER)
#     - Advances day by NUMBER
#
# * time.advance_month(NUMBER)
#     - Advances month by NUMBER
#
# * time.advance_year(NUMBER)
#     - Advances year by NUMBER
#
# * time.memorize(INDEX)
#     - Memorizes the current time to an array at INDEX. The INDEX can be any
#       integer you like, it is used to reference later if the time is restored.
#       This will allow for you to memorize as many 'times' as you need. Using
#       an existing INDEX will over-write the old one.
#
# * time.restore(INDEX)
#     - Sets the time to memorized time at INDEX. Does nothing if INDEX does not
#       exist. Obviously, you must have a memorized time before using.
#
# * time.clock(true/false)
#     - Enables/Disables player from toggling clock. Will dispose the clock
#       if disabled when clock is showing.
#
# * time.simple_clock(true/false)
#     - By default, the clock displays the time, day, and date. If this is true,
#       the clock will only display the time, nothing else.
#
# * time.analog_clock(true/false)
#     - Sets Analog Clock flag ON/OFF. If true, analog clock will be used,
#
# * time.clock_face(x, y, opacity, fontname, fontsize, bold, italic)
#     - Changes the clock settings to defined values. Can be called with any
#       number of arguments that you would like to change.
#
# * time.analog_face(filename, handoffset, x, y, opacity)
#     - Changes the settings for the analog clock. Can be called with any number
#       of arguments that you would like to change. (see note below for analog)
#
# * time.show_clock
#     - Forcibly toggles the clock ON. Used for showing the clock when it is
#       unknown if the player will have it ON or OFF at that time. The clock must
#       be enabled for this method to work. (Only during Scene_Map)
#
# * time.change_climate(MAP_ID, CLIMATE_ID)
#     - Will permanently change map with MAP_ID from its current climate to the
#       the one defined by CLIMATE_ID. Will not have an immediate effect on the
#       current map, but will be applied next time the player returns.
#
# * CCTS.debug
#     - Toggles the debug sprite ON/OFF. Shows almost every relevant variable
#       associated with the system and how it changes in real-time. See bottom
#       of script (around line 1500) for more information.
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
#                         BEGIN CONFIGURATION
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:

  #    ** Script Generated at 26/05/2011 00:45:31.

module CCTS

  # The names for your days. Use as many as you want.
  DAYS = ['Lundi', 'Mardi', 'Mercredi', 'Jeudi', 'Vendredi', 'Samedi',
          'Dimanche']

  # The name for your months. Use as many as you want.
  MONTHS = ['Janvier', 'Février', 'Mars', 'Avril', 'Mai', 'Juin', 'Juillet',
            'Août', 'Septembre', 'Octobre', 'Novembre', 'Décembre']

  # How many days in a month? (Per each index above)
  MONTH_LENGTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]

  # Set up as follows: [Minute, Hour, Day, Month, Year]
  START_DATE = [30, 21, 6, 11, 1003]

  # Button used to toggle clock ON/OFF (if enabled). This is the game button,
  # not just the key on your keyboard.
  CLOCK_BUTTON = Input::Z

  # Default settings for the clock.
  # Set up using this pattern. [X, Y, OPACITY, FONTNAME, FONTSIZE, BOLD, ITALIC]
  # All can be changed in-game with a script call at any time.
  CLOCK_FACE = [1, 1, 100, 'Pokemon DP', 16, false, true]

  # Default settings for the analog clock.
  # Set up using this pattern: ['FILENAME', HAND_OFFSET, X, Y, OPACITY]
  # Can be changed at any time during the game with a script call.
  ANALOG_FACE = ['square', 0, 0, 0, 0]

  # Set the skin for the clock (normal). Configure like one of the following:
  #   Set to nil to not use a skin
  #   Set to 'DEFAULT SKIN' to use whatever the player is using.
  #   Set to 'FILENAME' of the skin. Must be in Windowskins folder of game.
  CLOCK_SKIN = 'DEFAULT SKIN'

  # If true, the analog clock will be used by default. Can be changed later.
  ANALOG_CLOCK = false

  # Configure how the time will be displayed. Ignore this if you are unsure of
  # how to set this up. Look up "sprintf Format" in the Help File of the game to
  # learn more of how it works.
  TIME_FORMAT = '%2d:%02d'

  # The minimun/maximum number of seconds before the system re-calculates what
  # weather pattern will be used. The number will be randomly selected from
  # within the defined range.
  WEATHER_WAIT = [5, 10]

  # This variable will be always be equal to the weather type. Lets you create
  # event conditions based off the weather. (must be raining to do this, etc...)
  # If using Zer0 Advanced Weather, just set to same as "Weather_Type_Variable"
  WEATHER_VARIABLE = 307

  # This switch will only be ON during "bad" weather effects (below). Used for
  # event conditions. (Villagers go inside if it is raining, storming, etc...)
  # If using Zer0 Advanced Weather, just set to same as "Adverse_Weather_Switch"
  BAD_WEATHER_SWITCH = 23
  # This switch will always be the opposite of the BAD_WEATHER_SWITCH.
  GOOD_WEATHER_SWITCH = 24

  # Include all "bad" weather types in this array. The above switch will only
  # be on when one of them is occurring
  # Same as from Zer0 Advanced Weather, if using.
  BAD_WEATHER_TYPES = [1, 2, 4, 5, 9, 16, 35]

  # This variable will be set by the "season" of the year. This can also be used
  # as a condition in events.
  SEASON_VARIABLE = 306
  # 0 = Summer
  # 1 = Autumn
  # 2 = Winter
  # 3 = Spring
  # Define the months for each season.
  SEASON_MONTHS = [ [5, 6, 7],   # Summer
                    [8, 9, 10],   # Autumn
                    [0, 1, 11],   # Winter
                    [2, 3, 4]]   # Spring

  # These switches will be used as conditions for events, etc. They will only
  # be ON during the hours defined below.
  DAY_SWITCH = 40
  NIGHT_SWITCH = 41

  # Define the hours that are considered "Day" and "Night". The respective
  # switch above will be ON/OFF depending on the hour of the day.
  DAY_START_HOUR = 6
  NIGHT_START_HOUR = 20

  # IDs of variables that will be equal to their named value. They can be used
  # for eventing, etc. Set any to nil that you do not want to use.
  MINUTE_VARIABLE = 301
  HOUR_VARIABLE = 302
  DAY_VARIABLE = 303
  MONTH_VARIABLE = 304
  YEAR_VARIABLE = 305

  # If true, and $DEBUG, a text file will be created each load in the games
  # directory that lists maps that do not have a climate defined, or those that
  # are defined more than once.
  WRITE_MISSING_DATA =
  #-----------------------------------------------------------------------------
  # Weather Tints
  #   Set the tint influence for each weather type. These are NOT the values
  #   the screen tint will be, rather they are the amount applied to whatever
  #   the current screen tint already is. They will transition in/out at the
  #   same rate of the weather transition.
  #-----------------------------------------------------------------------------
  def self.weather_tint(type)
    case type
  # when WEATHER_TYPE then return [RED, GREEN, BLUE, GRAY]
    when 1, 2, 4  # Rain
      return [-20, -20, -15, 10]
    when 5, 9, 35  # Storm
      return [-30, -30, -20, 15]
    when 3, 16  # Snow
      return [-15, -15, -15, 20]
    end
    return [0, 0, 0, 0]
  end
  #-----------------------------------------------------------------------------
  # Weather BGS
  #   Define the BGS used for each weather type. They BGS will fade in/out at
  #   the same rate of the weather's transition. Volume will be 50% for maps
  #   that do not have weather, but still have weather sound.
  #-----------------------------------------------------------------------------
  def self.weather_BGS(type)
    case type
  # when WEATHER_TYPE then return ['FILENAME', VOLUME, PITCH]
    when 1  # Rain
      return ['005-Rain01', 80, 100]
    when 2  # Heavy Rain
      return ['006-Rain02', 80, 100]
    when 3  # Snow
      return ['001-Wind01', 80, 100]
    when 4  # Hail
      return ['005-Rain01', 60, 75]
    when 5, 9, 35  # Thunder Storm
      return ['007-Rain03', 80, 100]
    when 6, 7  # Blowing Leaves
      return ['003-Wind03', 80, 100]
    when 8, 16  # Swirling Leaves
      return ['004-Wind04', 80, 100]
    when 22  # Falling Rocks
      return ['015-Quake01', 100, 125]
    end
  end
  #-----------------------------------------------------------------------------
  # Weather Probability
  #   Define the weather probabilities for each climate. The climate ID and the
  #   month are passed as arguments for branching. This will allow you to make
  #   it snow in the winter, storm in the summer, etc.
  #
  #   Set up like this:
  #
  #   case climate_id
  #   when CLIMATE_ID
  #     case month
  #     when MONTH then return [[TYPE, PROB], [TYPE, PROB], [TYPE, PROB], etc]
  #
  #   If you are using Zer0 Advanced Weather or MAWS (v.1.2 or >) where the
  #   "variation" is used, just add the variation value into the respective
  #   array, like this:
  #                     [TYPE, PROBABILITY, VARIATION]
  #
  #   You need not define a probability for 0, or no weather. It is the default
  #   value used for undefined weather and when the weather probability is not
  #   high enough when the system calculates it.
  #
  #   The actual weather will be chosen randomly from all types that have a
  #   probability above the randomly chosen 'chance' at each weather update.
  #-----------------------------------------------------------------------------
  def self.weather_prob(climate_id, month)
    case climate_id
    when 0  # Outdoor
      case month
      when 1, 2, 12
        return [[1, 15], [2, 15], [3, 10], [4, 5], [9, 10], [35, 25]]
      when 3, 4, 5
        return [[1, 10], [2, 20], [9, 15]]
      when 6, 7, 8
        return [[1, 10], [2, 20], [35, 10]]
      when 9, 10, 11
        return [[1, 15], [9, 15], [2, 25], [6, 20, 3]]
      end
    when 1  # Indoor
      case month
      when 1, 2, 12
        return [[1, 15], [2, 15], [3, 10], [4, 5], [9, 10], [16, 5], [35, 25]]
      when 3, 4, 5
        return [[1, 10], [2, 20], [9, 15]]
      when 6, 7, 8
        return [[1, 10], [2, 20], [35, 10]]
      when 9, 10, 11
        return [[1, 15], [9, 15], [2, 25], [6, 20, 3]]
      end
    when 2  # Snow
      return [[3, 80], [16, 50]]
    when 3  # Desert
      return [[1, 5]]
    end
  end
  #-----------------------------------------------------------------------------
  # Hourly Tints
  #   Define the target tints for each hour of the day, for each climate.
  #   The month, hour, and climate_id are all passed as arguments so you can
  #   create as in-depth of a configuration as you like. Just create branches
  #   within branches using the climate, month, and hour as conditions to define
  #   the desired screen tone. There will be no tint (0, 0, 0, 0) for anything
  #   left undefined. (see presets below for examples)
  #
  #   Setup: [RED, GREEN, BLUE, GRAY]
  #-----------------------------------------------------------------------------
  def self.time_tint(climate_id, hour, month)
    case climate_id
    #-------------------------------------------------------------------
    when 0  # Outdoor
      case month
      when 1, 2, 12
        case hour
        when 0, 1, 2, 3, 4, 5, 6, 19, 20, 21, 22, 23
          return [-100, -100, -20, 15]
        when 7
          return [-15, -15, -25, 10]
        when 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18
          return [-10, -10, -10, 10]
        end
      when 3, 4, 5
        case hour
        when 0, 1, 2, 3, 4, 5, 20, 21, 22, 23
          return [-100, -100, -20, 10]
        when 6
          return [-5, -5, -20, 0]
        when 18
          return [0, 0, -15, 5]
        when 19
          return [-15, -15, -30, 10]
        end
      when 6, 7, 8
        case hour
        when 0, 1, 2, 3, 4, 5, 20, 21, 22, 23
          return [-100, -100, -20, 15]
        when 6
          return [10, 10, -10, 0]
        when 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17
          return [5, 5, -5, 0]
        when 18
          return [-25, -25, -10, 5]
        when 19
          return [-50, -50, -15, 10]
        end
      when 9, 10, 11
        case hour
        when 0, 1, 2, 3, 4, 5, 20, 21, 22, 23
          return [-100, -100, -20, 10]
        when 6
          return [10, 5, -10, 10]
        when 18
          return [5, 5, -20, 0]
        when 19
          return [-5, -5, -25, 10]
        end
      end
    #-------------------------------------------------------------------
    when 0  # Snow
      case month
      when 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12
        case hour
        when 0, 1, 2, 3, 4, 5, 6, 19, 20, 21, 22, 23
          return [-100, -100, -20, 15]
        when 7
          return [-15, -15, -25, 10]
        when 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18
          return [-10, -10, -10, 10]
        end
      end
    #-------------------------------------------------------------------
    when 0  # Desert
      case month
      when 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12
        case hour
        when 0, 1, 2, 3, 4, 5, 20, 21, 22, 23
          return [-100, -100, -20, 15]
        when 6
          return [10, 10, -10, 0]
        when 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17
          return [5, 5, -5, 0]
        when 18
          return [-25, -25, -10, 5]
        when 19
          return [-50, -50, -15, 10]
        end
      end
    #-------------------------------------------------------------------
    when 0  # Underground
      case month
      when 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12
        case hour
        when 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23
          return [-20, -20, -20, 0]
        end
      end
    #-------------------------------------------------------------------
    end
    # Default return value for undefined time/climate (Don't edit)
    return [0, 0, 0, 0]
  end
end

  #-----------------------------------------------------------------------------

class Climate

  attr_accessor :maps

  def initialize
    @climate = []
  #-----------------------------------------------------------------------------
  # Initialize New Climates
  #   Simply follow the same pattern for each new climate you create.
  #-----------------------------------------------------------------------------
    @climate[0] = Game_Climate.new(0)
    @climate[1] = Game_Climate.new(1)
    @climate[2] = Game_Climate.new(2)
    @climate[3] = Game_Climate.new(3)
    @climate[4] = Game_Climate.new(4)
  #-----------------------------------------------------------------------------
  # Climate Names
  #   Create names for the different climates.
  #-----------------------------------------------------------------------------
    @climate[0].name = 'Outdoor'
    @climate[1].name = 'Indoor'
    @climate[2].name = 'Snow'
    @climate[3].name = 'Desert'
    @climate[4].name = 'Underground'
  #-----------------------------------------------------------------------------
  # Weather for this Climate?
  #   If false, no weather will be shown for climate, although weather sound and
  #   tinting can still be used if desired.
  #-----------------------------------------------------------------------------
    @climate[0].weather = true
    @climate[1].weather = false
    @climate[2].weather = true
    @climate[3].weather = true
    @climate[4].weather = false
  #-----------------------------------------------------------------------------
  # Weather Tinting?
  #   If true, different weather patterns will influence the screen tint
  #-----------------------------------------------------------------------------
    @climate[0].tinting = true
    @climate[1].tinting = false
    @climate[2].tinting = true
    @climate[3].tinting = true
    @climate[4].tinting = true
  #-----------------------------------------------------------------------------
  # Weather Sound?
  #   If true, weather BGS will be played automatically for that climate
  #-----------------------------------------------------------------------------
    @climate[0].sound = true
    @climate[1].sound = true
    @climate[2].sound = true
    @climate[3].sound = true
    @climate[4].sound = false
  #-----------------------------------------------------------------------------
  # Time Speed
  #   This will be the default time speed used for the climate. It can be
  #   overridden with script calls in-game if needed. "1" is real-time, and
  #   any other number is multiples of real-time, so "5" is 5 times as fast as
  #   the real world. (unless you live in a videogame)
  #-----------------------------------------------------------------------------
    @climate[0].speed = 8
    @climate[1].speed = 10
    @climate[2].speed = 8
    @climate[3].speed = 8
    @climate[4].speed = 15
  #-----------------------------------------------------------------------------
  # Maps for each climate
  # Include IDs of maps that use each respective climate.
  #-----------------------------------------------------------------------------
    @climate[0].maps = [2, 3, 9, 11, 13, 20, 21, 22, 23, 24, 25, 26, 29, 30, 32, 35, 37, 41, 45]
    @climate[1].maps = [12, 15, 16, 17, 18, 19, 27, 28, 31, 34, 36, 42, 43, 44, 46, 50, 51]
    @climate[2].maps = []
    @climate[3].maps = []
    @climate[4].maps = [10, 39, 40, 47]
  #-----------------------------------------------------------------------------
  end
#-------------------------------------------------------------------------------
  def map_climate(map_id)
    @climate.each {|climate| return climate if climate.maps.include?(map_id)}
    # Returns a dummy climate with empty settings if not defined.
    return Game_Climate.new(-1, 'DUMMY', false, false, false, 5, [])
  end
end


I've tried to look for the error for a few days.
The directory seems correct :
Name of my game/Audio/BGS 

and the config too.

I hope you can help me find this error and sorry for my poor English expression  :wacko:

Blizzard

You tried playing a BGS file with no filename.
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.

astheroth

Thanx for the reply but i don't understand. Where am i playing a BGS file with no filename?

In the script there is one line here: (953, the line, where is the bug)
#-------------------------------------------------------------------------------
 def change_bgs_volume(volume)
   # Changes the BGS volume to VOLUME. Does not change the BGS name.
   return if @playing_bgs == nil
   bgs = @playing_bgs
   Audio.bgs_play('Audio/BGS/' + bgs.name, volume, bgs.pitch)
 end

But this isn't configurable, is it?