Ogłoszenie 

Uwaga! To forum jest w trybie offline.
Wszelką pomoc uzyskasz pod adresem
forum.ultimateam.pl


Administracja Forum


Poprzedni temat «» Następny temat
Jet's Time System
Autor Wiadomość
Vrona 




Preferowany:
RPG Maker VXAce

Pomógł: 26 razy
Dołączył: 25 Wrz 2011
Posty: 236
Skąd: ty się tu wziąłeś?
Wysłany: Sob 29 Paź, 2011 08:27
Jet's Time System
Jet's Time System

RPG Maker: VX

Skrypt wprowadzający system czasu i pór dnia i roku.


Autor: Jet

Skrypt:
Spoiler:

Kod:
#===============================================================================
# System Czasu
# By Jet10985 (Jet)
# Slight Help by: Mr. Anonymous, Mithran
# Tłumaczenie:Vrona
#===============================================================================
# Skrypt ten dodaje system czasu w grze.Jest bardzo rozbudowany,ma wile funkcji
# np. pory dnia,pory roku,dni,miesiące,pogoda...słowem full wypas!Ponato
# potężna koniguracja.
#
# Uwaga tłumacza:
# Nie przetłumaczyłem wszystkiego.Ten skrypt ma 500 linijek konfiguracji.
# WAŻNE!
# podczes tłumaczenia pomyliłem jesień z zimą.Dlatego do linijki 462 nazwy są
# pomylone.Sorry za problemy
#===============================================================================
# Overwritten Methods:
# None
#-------------------------------------------------------------------------------
# Aliased methods:
# Scene_Base: update
# Scene_Menu: start, update, terminate
# Scene_Map: start, update, terminate
# Scene_File: read_save_data, write_save_data
# Scene_Title: command_new_game
# Spriteset_Map: update_light_effects (if used with Thomas edison VX)
# Game_Battler: atk, def, spi, agi, make_obj_damage_value, calc_hit
# Game_Map: setup
# Scene_Battle: start, update, terminate
#===============================================================================

#===============================================================================
# Features
#===============================================================================
# CHECK means the script has the feature
# WIP means it is a future feature
#-------------------------------------------------------------------------------
# Thomas Edison Compat. CHECK
# Auto-Tint  CHECK
# Auto-Weather  CHECK
# Auto-Season  CHECK
# Time to variable/switch  CHECK
# Weather to switch CHECK
# Changable Days/Months  CHECK
# Military time  CHECK
# Real time option CHECK
# Resting  CHECK
# Map/Menu Windows CHECK
# Changable map encounters  CHECK
# Map labels  CHECK
# Alignment System compat.  CHECK
# Skill damage differences depending on time of day.  CHECK
# Update only on Map feature.  CHECK
# Turn time window on/off.  CHECK
# Stamina system compat.  CHECK
# Weather/time effects accuracy.  CHECK
# Hunger/Thirst compatability.  CHECK
#===============================================================================

=begin

Disable auto-tint and auto-weather on maps:

In the map name ex. MAP001, add [JDN] in the name. Like so

MAP001 [JDN]

to disable only auto-tint, put in [TDN]
to disable only auto-weather, put in [WDN]


Built-in script commands:

freeze_time(option)   <--------------- Script-time command only
option = true/false. true freeze's time, false unfreeze's it.

add_time(type, amount)   <------------------- Script-time command only
type = "minute", "hour", "day", "month", "year" according to what you want to add
amount = amount of that time you want to add.

sub_time(type, amount)   <------------------- Script-time command only
type = "minute", "hour", "day", "month", "year" according to what you want to sub
amount = amount of that time you want to subtract.

jump_to(type, amount)   <------------------- Script-time command only
type = "minute", "hour", "day", "month", "year" according to what you want to change
amount = what you want to change it to.

call_full_time_window
this will show a window with the FULL time until the player presses x.
full time meaning day, month, year and such.

reverse_time(option)   <------------------- Script-time command only
this will make time count down, instead of count up.
option = true/false. true reverses time, false makes it normal again.
--------------------------------------------------------------------------------
Compatability Instructions:

If you want compatability with Jet's Alignment system and/or Thomas Edison VX
and/or Jet's Stamina System and/or BulletXt's tileset swappping and/or
Jet's Hunger/Thirst factor place this script below all of them and toggle the
configuration for them below.

=end

#===============================================================================
# TU KONFIGURUJ
#===============================================================================

module Jet_DayNight # Dotknięcie grozi SyntaxError.
 
#===============================================================================
# Detail Configuration
#===============================================================================

  # Używać czasu w komputerze?
  REAL_TIME = false
 
  # Numer switha właczającego realny czas.
  REAL_TIME_SWITCH = 35

  # Godzina startowa.
  STARTING_HOUR = 16
 
  # Minuta startowa.
  STARTING_MINUTE = 25
 
  # Dzień startowy.
  STARTING_DAY = 1
 
  # Rok startowy.
  STARTING_YEAR = 714
 
  # When year is displayed (in a menu or something), do you want the number plus
  # (AD if year is a positive number) or (BC if year is negative)?
  USE_AD_BC = true
 
  # Jezeli w 114 linacje wpisałes false,to tutaj musisz wpisać czas minuty w grze..
  # 60 klatek to jedna realna sekunda.
  MINUTE_LENGTH = 120
 
  # Szystem 12/24 godzinny.
  MILITARY_TIME = true
 
  # Should time only update on the map, and no where else?
  UPDATE_ONLY_ON_MAP = false
 
  # Automaticly change seasons? (This is auto-weather as well)
  AUTO_SEASONS = true
 
  # Automaticly tint according to time of day/weather?
  AUTO_TINT = true
 
  # Allows resting? Resting is the ability to call a scene that will allow
  # the player to "rest" for a certain amount of hours. Script time only.
  ALLOW_REST = false
 
  # The button to call the resting menu.
  REST_BUTTON = Input::F5
 
  # Include a window showing time of day, month, and day name in the menu?
  MENU_TIME_WINDOW = true
 
  # Include a window showing time of day and day name on the map?
  MAP_TIME_WINDOW = false
 
  # Include a window showing time stuff in battle?
  BATTLE_TIME_WINDOW = false
 
  # These are the X and Y coordinates of the map time window if you choose to
  # display the window on the menu.
  MENU_TIME_WINDOW_COORDS = [0, 304]
 
  # These are the X and Y coordinates of the map time window if you choose to
  # display the window on the map.
  MAP_TIME_WINDOW_COORDS = [384, 360]
 
  # These are the X and Y coordinates of the map time window if you choose to
  # display the window in battle.
  BATTLE_TIME_WINDOW_COORDS = [0, 0]
 
  # When this switch is on, the time window in both the menu and map will
  # become invisible, and when off, they will be visible, if the option to
  # display them is on in the first place.
  WINDOW_INVISIBLE_SWITCH = 37
 
  # Tutaj ustawiasz kompatylność z Tomas Edison.Światła wyłaczajace się w dzień.
  THOMAS_EDISON_COMPATABILITY = false
 
  # This will add Jet's Alignment System compatability. Meaning, if you
  # have negative alignment, dusk and night will give bonus stats, and
  # vice versa for dawn and day if you're good.
  ALIGNMENT_SYSTEM_COMPATABILITY = false
 
  # This is the positive alignment bonus in dawn/day. These are in decimals.
  # By default, all bonuses are 1.2, meaning 20% bonus.
  #               ATK  DEF  SPI  AGI
  GOOD_BONUSES = [1.2, 1.2, 1.2, 1.2]
 
  # This is the negative alignment bonus in dusk/night. These are in decimals.
  # By default, all bonuses are 1.2, meaning 20% bonus.
  #               ATK  DEF  SPI  AGI
  BAD_BONUSES = [1.3, 1.25, 1.15, 1.25]
 
  # Does you want the Time System's "Rest" option to restore stamina from
  # Jet's Stamina System? Put false if you don't use that script no matter what.
  RESTORE_STAMINA_WHEN_RESTING = false
 
  # Do you want to add to an actor's hunger/thirst rating per hour using
  # Jet's Hunger/Thirst factor script?
  HUNGER_THIRST_COMPATABILITY = false
 
  # How much you want to add to each factor.
  HUNGER_ADDED_PER_HOUR = 10
  THIRST_ADDED_PER_HOUR = 10

  # Do you want to effect any skill's damage by time of day?
  AFFECT_SKILL_DAMAGE = true
 
  #=============================================================================
  # These are the configurations for causing skill damage variation depending on
  # conditions that you may define. Look at instructions below.
  #=============================================================================
  # Types of conditions (place this number as the first in the array(second part))
  # 0 = time of day
  # 1 = day (sun, mon, tues, etc.)
  # 2 = month
  # 3 = season
  #=============================================================================
  # Setting the true conditionals (The second number in the array.)
  #=============================================================================
  # When you choose time of day:
  # 0 = dawn
  # 1 = day
  # 2 = dusk
  # 3 = night
  #-----------------------------------------------------------------------------
  # When you choose day:
  # 0 = first day in config below (Sunday by default)
  # 1 = second day
  # 2 = third day
  # These numbers can go as high as the DAYS config (6 by default)
  #-----------------------------------------------------------------------------
  # When you choose month:
  # Same rules as when you choose day, except about months.
  #-----------------------------------------------------------------------------
  # When you choose season:
  # "Summer" = summer
  # "Winter" = winter
  # "Spring" = spring
  # "Autumn" = autumn
  # You MUST put them in quotes, and have the first letter in capitals.
  # This is the only config you put in quotes AND the only with actual words.
  #=============================================================================
  # The after specifying what the conditional type is, and what the condition is
  # all together, you need to put the number the skill's power will be
  # multiplied by.
  #=============================================================================
  # Other notes:
  # When the condition is no longer met, the troop encounters will reset to
  # default by themselves.
  # You may set more than 1 condition per mskill, just add another object to the
  # configuration with the same skill id.
  # If you get an error, it is PROBABLY YOUR FAULT. Recheck the config again!
  #=============================================================================
 
  SKILL_DAMAGE_VARIATION = {
 
  85 => [0, 3, 2.0], # skill_id => [conditional_id, condition_to_be_met, number to multiply by if met]
  86 => [0, 3, 2.0], # skill_id => [conditional_id, condition_to_be_met, number to multiply by if met]
  }
 
  # Do you want time of day/weather to effect how accurate you and enemies are?
  # This will only effect physical attacks.
  AFFECT_ACCURACY = true
 
  # These are the effects according to time of day.
  #                                                   Dawn   Day      Dusk     Night
  ACCURACY_EFFECTS_DAY_TIMES = [1,     1.2,     1,       0.8]
 
  # These are the effects according to weather.
  #                                                 Clear   Rain     Snow      Storm
  ACCURACY_EFFECTS_WEATHERS = [1,      0.9,     0.75,      0.8]
 
  #=============================================================================
  # These are the configurations for changing map encounter depending on
  # conditions that you may define. Look at instructions below.
  #=============================================================================
  # Types of conditions (place this number as the first in the array(second part))
  # 0 = time of day
  # 1 = day (sun, mon, tues, etc.)
  # 2 = month
  # 3 = season
  #=============================================================================
  # Setting the true conditionals (The second number in the array.)
  #=============================================================================
  # When you choose time of day:
  # 0 = dawn
  # 1 = day
  # 2 = dusk
  # 3 = night
  #-----------------------------------------------------------------------------
  # When you choose day:
  # 0 = first day in config below (Sunday by default)
  # 1 = second day
  # 2 = third day
  # These numbers can go as high as the DAYS config (6 by default)
  #-----------------------------------------------------------------------------
  # When you choose month:
  # Same rules as when you choose day, except about months.
  #-----------------------------------------------------------------------------
  # When you choose season:
  # "Summer" = summer
  # "Winter" = winter
  # "Spring" = spring
  # "Autumn" = autumn
  # You MUST put them in quotes, and have the first letter in capitals.
  # This is the only config you put in quotes AND the only with actual words.
  #=============================================================================
  # The first array (the [] part) INSIDE the array:
  # You may fill these with troop database ids (starting at 1) that will
  # be ADDED to the map when the conditional is met.
  #-----------------------------------------------------------------------------
  # The second array (the [] part) INSIDE the array:
  # You may fill these with troop database ids (starting at 1) that will
  # be SUBTRACTED from the map when the conditional is met.
  #=============================================================================
  # Other notes:
  # When the condition is no longer met, the troop encounters will reset to
  # default by themselves.
  # You may set more than 1 condition per map, just add another object to the
  # configuration with the same map id.
  # If you get an error, it is PROBABLY YOUR FAULT. Recheck the config again!
  #=============================================================================
 
  MAP_ENCOUNTER_CHANGES = {
 
  #2 => [0, 3, [4, 6, 7], [1, 9]], # map_id => [conditional_id, condition_to_be_met, [troops_to_be_added], [troops_to_be_subtracted]]
 
  }
 
 
#===============================================================================
# Calendar Configuration (Script time only)
#===============================================================================

  # Mięsiące.
  MONTHS = {
 
  0 => ["Sty", 31],  # month number => ["Month name", days in month],
  1 => ["Lut", 28],  # month number => ["Month name", days in month],
  2 => ["Mar", 31],  # month number => ["Month name", days in month],
  3 => ["Kwi", 30],
  4 => ["Maj", 31],
  5 => ["Cze", 30],
  6 => ["Lip", 31],
  7 => ["Sie", 31],
  8 => ["Wrze", 30],
  9 => ["Paź", 31],
  10 => ["Lis", 30],
  11 => ["Gru", 31]  }
 
  # Dni.
  DAYS = {
 
  0 => "Pon",   # day number => day name
  1 => "Wt",   # day number => day name
  2 => "Śr",   # day number => day name
  3 => "Czw",
  4 => "Pt",
  5 => "So",
  6 => "Nd"  }
 
#===============================================================================
# Konfiguracja Switchw
#===============================================================================

  # Switch wiosny
  AUTUMN_SWITCH = 41
 
  # Zima.
  WINTER_SWITCH = 42
 
  # Lato.
  SUMMER_SWITCH = 43
 
  # Jesień.
  SPRING_SWITCH = 44
 
  # Deszczu.
  RAIN_SWITCH = 45
 
  # Śniegu.
  SNOW_SWITCH = 46
 
  # Burzy.
  STORM_SWITCH = 47
 
  # Nocy.
  NIGHT_SWITCH = 48
 
  # Poranka.
  DAWN_SWITCH = 49
 
  # Dzień.
  DAY_SWITCH = 50
 
  # Wieczór.
  DUSK_SWITCH = 51
 
#===============================================================================
# Konfiguracja Zmiennych
#===============================================================================

  # Zmienna godziny
  HOUR_VARIABLE = 21
 
  # Minut.
  MINUTE_VARIABLE = 22
 
  # Dni.
  DAY_VARIABLE = 23
 
  # Miesięcy.
  MONTH_VARIABLE = 24
 
  # Roku.
  YEAR_VARIABLE = 25
 
#===============================================================================
# Konfiguracja pogody
#-------------------------------------------------------------------------------
# Numery pór roku:
# 0 = Zima
# 1 = Wiosna
# 2 = Lato
# 3 = Jesień
#===============================================================================

  # Deszczowe pory roku.
  RAIN_SEASONS = [0, 1, 2, 3]
 
  # Pory roku,w których pada śnieg.
  SNOW_SEASONS = []
 
  # Burzliwe pory roku.
  STORM_SEASONS = [0, 1, 3]
 
#===============================================================================
# Konfiguracja Miesięcy
#===============================================================================

  # Miesiące letnie.
  SUMMER_MONTHS = [5, 6, 7]
 
  # Zimowe.
  WINTER_MONTHS = [11, 0, 1]
 
  # Wiosenne.
  AUTUMN_MONTHS = [8, 9, 10]
 
  # jesienne.
  SPRING_MONTHS = [2, 3, 4]
 
#===============================================================================
# Tint Configuration (Hours config for Script time only, tint for both.)
#===============================================================================

  # Godziny wieczorne.
  DUSK_HOURS = [17, 18, 19, 20,]
 
  # Godziny nocne.
  NIGHT_HOURS = [21, 22, 23, 24, 1, 2, 3, 4]
 
  # Poranne.
  DAWN_HOURS = [5, 6, 7, 8]
 
  # Dzienne.
  DAY_HOURS = [9, 10, 11, 12, 13, 14, 15, 16]
 
  # Odzcien ekranu podczes wieczoru.
  DUSK_TINT = Tone.new(17, -51, -102, 0)
 
  # Nocy.
  NIGHT_TINT = Tone.new(-190, -190, -85, 68)
 
  # Poranka.
  DAWN_TINT = Tone.new(17, -51, -102, 0)
 
  # Dni.
  DAY_TINT = Tone.new(0, 0, 0, 0)
 
  # A to to nie wiem co to jest.
  FADE_LENGTH = 350
 
end

#===============================================================================
# NIE DOTYKAJ!GROZI ŚMIERCIĄ LUB KALCSTWEM!:P
#===============================================================================

class Game_Temp
 
  attr_accessor :instant_tint, :light_switch, :first_weather, :no_time_continue
  attr_accessor :full_time_window
 
end

class RPG::MapInfo
 
  def name
    return @name.gsub(/\[WDN\]/) {""}.gsub(/\[JDN\]/) {""}.gsub(/\[TDN\]/) {""}
  end
 
  def indoors?
    return @name.scan(/\[JDN\]/).size > 0
  end
 
  def no_weather?
    return @name.scan(/\[WDN\]/).size > 0
  end
 
  def no_tint?
    return @name.scan(/\[TDN\]/).size > 0
  end
end

class Game_Time
 
  include Jet_DayNight
 
  attr_accessor :day
  attr_accessor :day_name
  attr_accessor :days_passed
  attr_accessor :month
  attr_accessor :month_name
  attr_accessor :month_day
  attr_accessor :hour
  attr_accessor :minute
  attr_accessor :seconds
  attr_accessor :minute_length
  attr_accessor :year
  attr_accessor :frozen_time
  attr_accessor :map_infos
  attr_accessor :got_initial_month
  attr_accessor :last_time_of_day
  attr_accessor :weather
  attr_accessor :reverse_time
 
  def initialize
    if REAL_TIME
      @day =  Time.now.strftime("%j").to_i
      @day_name = Time.now.strftime('%a')
      @month = Time.now.strftime("%m").to_i
      @month_name = Time.now.strftime("%b")
      @month_day = Time.now.strftime("%d")
      @hour = Time.now.hour
      @minute = Time.now.min
      @year = Time.now.strftime("%Y").to_i
    else
      @day =  STARTING_DAY % DAYS.keys.size
      @day_name = DAYS[@day]
      @days_passed = STARTING_DAY
      @hour = STARTING_HOUR
      @month = 0
      @minute = STARTING_MINUTE
      @year = STARTING_YEAR
    end
    @seconds = 0
    @frozen_time = false
    @map_infos = load_data("Data/MapInfos.rvdata")
    @minute_length = 0
    @got_initial_month = false
    @reverse_time = false
  end
 
  def screen
    if $game_temp.in_battle
      return $game_troop.screen
    else
      return $game_map.screen
    end
  end

  def update_time
    unless @got_initial_month || REAL_TIME
      loop do
        if @days_passed > MONTHS[@month][1]
          @days_passed -= MONTHS[@month][1]
          @month += 1
        elsif @days_passed < MONTHS[@month][1]
          @got_initial_month = true
          break
        end
      end
    end
    @day_name = DAYS[@day] unless REAL_TIME
    @map_infos = load_data("Data/MapInfos.rvdata")
    daytime = get_time_of_day
    unless $BTEST
      unless @map_infos[$game_map.map_id].indoors? || @map_infos[$game_map.map_id].no_tint? || @last_time_of_day == daytime
        @last_time_of_day = daytime
        case daytime
        when 2
          if !$game_temp.instant_tint
            screen.start_tone_change(DUSK_TINT, FADE_LENGTH) unless !AUTO_TINT
          else
            screen.start_tone_change(DUSK_TINT, 0)
            $game_temp.instant_tint = false
          end
        when 3
          if !$game_temp.instant_tint
            screen.start_tone_change(NIGHT_TINT, FADE_LENGTH) unless !AUTO_TINT
          else
            screen.start_tone_change(NIGHT_TINT, 0)
            $game_temp.instant_tint = false
          end
        when 0
          if !$game_temp.instant_tint
            screen.start_tone_change(DAWN_TINT, FADE_LENGTH) unless !AUTO_TINT
          else
            screen.start_tone_change(DAWN_TINT, 0)
            $game_temp.instant_tint = false
          end
        when 1
          if !$game_temp.instant_tint
            screen.start_tone_change(DAY_TINT, FADE_LENGTH) unless !AUTO_TINT
          else
            screen.start_tone_change(DAY_TINT, 0)
            $game_temp.instant_tint = false
          end
        end
      end
    end
    if REAL_TIME || $game_switches[REAL_TIME_SWITCH]
      @day =  Time.now.strftime("%j").to_i
      @day_name = Time.now.strftime('%a')
      @month = Time.now.strftime("%m").to_i
      @month_name = Time.now.strftime("%b")
      @month_day = Time.now.strftime("%d")
      @hour = Time.now.hour
      @minute = Time.now.min
      @seconds += 1
      @year = Time.now.strftime("%Y").to_i
    else
      @seconds += 1 unless @frozen_time
      if !@reverse_time
        @minute_length += 1 unless @frozen_time
        if @minute_length == MINUTE_LENGTH
          @minute += 1
          @minute_length = 0
        end
        if @minute == 60
          if HUNGER_THIRST_COMPATABILITY && !$game_party.members[0].hunger.nil?
            for i in 0...$game_party.members.size
              $game_party.members[i].hunger += HUNGER_ADDED_PER_HOUR if HungerThirst::USE_HUNGER
              $game_party.members[i].thirst += THIRST_ADDED_PER_HOUR if HungerThirst::USE_THIRST
              if $game_party.members[i].hunger > HungerThirst::MAX_HUNGER
                $game_party.members[i].hunger = HungerThirst::MAX_HUNGER
              elsif $game_party.members[i].hunger < 0
                $game_party.members[i].hunger = 0
              end
              if $game_party.members[i].thirst > HungerThirst::MAX_THIRST
                $game_party.members[i].thirst = HungerThirst::MAX_THIRST
              elsif $game_party.members[i].thirst < 0
                $game_party.members[i].thirst = 0
              end
            end
          end
          @hour += 1
          @minute = 0
        end
        if @hour == 25
          @day += 1
          @hour = 1
        end
        if @day == DAYS.keys.size
          @day = 0
          @days_passed += DAYS.keys.size
        end
        if @days_passed > MONTHS[@month][1]
          @days_passed = 0
          @month += 1
        end
        if @month == MONTHS.keys.size
          @year += 1
          @month = 0
        end
        @month_name = MONTHS[@month][0]
        @day_name = DAYS[@day]
      else
        if @minute_length == 0
          @minute -= 1
          @minute_length = MINUTE_LENGTH - 1
        end
        if @minute == 0
          @hour -= 1
          @minute = 59
        end
        if @hour == 0
          @day -= 1
          $game_time.hour = 24
        end
        if @day == -1
          @day = DAYS.keys.size - 1
          @days_passed -= DAYS.keys.size
        end
        if @days_passed < MONTHS[@month][1]
          @month -= 1
          @days_passed = MONTHS[@month][1] - 1
        end
        if @month == -1
          @year -= 1
          @month = MONTHS.keys.size - 1
        end
      end
    end
    $game_variables[MINUTE_VARIABLE] = @minute
    $game_variables[HOUR_VARIABLE] = @hour
    $game_variables[YEAR_VARIABLE] = @year
    $game_variables[DAY_VARIABLE] = @day
    $game_variables[MONTH_VARIABLE] = @month
    get_season if AUTO_SEASONS
    if @seconds % 999 == 0
      if @second == 9990
        get_weather unless @map_infos[$game_map.map_id].indoors? || @map_infos[$game_map.map_id].no_weather? || !AUTO_SEASONS
      else
        screen.weather(@weather, 4 || 5, 999) unless @map_infos[$game_map.map_id].indoors? || @map_infos[$game_map.map_id].no_weather? || !AUTO_SEASONS
      end
    end
  end
 
  def year=(amount)
    @year = amount
  end
   
  def year
    if !USE_AD_BC
      return @year
    end
    if @year > 0
      return @year.to_s + " AD"
    else
      return (@year * -1).to_s + " BC"
    end
  end
 
  def get_season
    if REAL_TIME
      if @month == 12 || 1 || 2
        $game_switches[AUTUMN_SWITCH] = false
        $game_switches[SPRING_SWITCH] = false
        $game_switches[SUMMER_SWITCH] = false
        $game_switches[WINTER_SWITCH] = true
        return "Winter"
      elsif @month == 3 || 4 || 5
        $game_switches[AUTUMN_SWITCH] = false
        $game_switches[SUMMER_SWITCH] = false
        $game_switches[WINTER_SWITCH] = false
        $game_switches[SPRING_SWITCH] = true
        return "Spring"
      elsif @month == 6 || 7 || 8
        $game_switches[AUTUMN_SWITCH] = false
        $game_switches[SPRING_SWITCH] = false
        $game_switches[WINTER_SWITCH] = false
        $game_switches[SUMMER_SWITCH] = true
        return "Summer"
      elsif @month == 9 || 10 || 11
        $game_switches[SPRING_SWITCH] = false
        $game_switches[SUMMER_SWITCH] = false
        $game_switches[WINTER_SWITCH] = false
        $game_switches[AUTUMN_SWITCH] = true
        return "Autumn"
      end
    else
      if SUMMER_MONTHS.include?(@month)
        $game_switches[SUMMER_SWITCH] = true
        $game_switches[AUTUMN_SWITCH] = false
        $game_switches[SPRING_SWITCH] = false
        $game_switches[WINTER_SWITCH] = false
        return "Summer"
      elsif WINTER_MONTHS.include?(@month)
        $game_switches[AUTUMN_SWITCH] = false
        $game_switches[SPRING_SWITCH] = false
        $game_switches[SUMMER_SWITCH] = false
        $game_switches[WINTER_SWITCH] = true
        return "Winter"
      elsif AUTUMN_MONTHS.include?(@month)
        $game_switches[SPRING_SWITCH] = false
        $game_switches[SUMMER_SWITCH] = false
        $game_switches[WINTER_SWITCH] = false
        $game_switches[AUTUMN_SWITCH] = true
        return "Autumn"
      elsif SPRING_MONTHS.include?(@month)
        $game_switches[AUTUMN_SWITCH] = false
        $game_switches[SUMMER_SWITCH] = false
        $game_switches[WINTER_SWITCH] = false
        $game_switches[SPRING_SWITCH] = true
        return "Spring"
      end
    end
  end
 
  def get_weather
    random_weather = get_season
    new_weather = []
    case random_weather
    when "Winter"
      new_weather.push("Clear")
      if RAIN_SEASONS.include?(0)
        new_weather.push("Rain")
      end
      if SNOW_SEASONS.include?(0)
        new_weather.push("Snow")
      end
      if STORM_SEASONS.include?(0)
        new_weather.push("Storm")
      end
      stuff = rand(new_weather.size - 1)
      @more_stuff = new_weather[stuff]
    when "Autumn"
      new_weather.push("Clear")
      if RAIN_SEASONS.include?(1)
        new_weather.push("Rain")
      end
      if SNOW_SEASONS.include?(1)
        new_weather.push("Snow")
      end
      if STORM_SEASONS.include?(1)
        new_weather.push("Storm")
      end
      stuff = rand(new_weather.size - 1)
      @more_stuff = new_weather[stuff]
    when "Summer"
      new_weather.push("Clear")
      if RAIN_SEASONS.include?(2)
        new_weather.push("Rain")
      end
      if SNOW_SEASONS.include?(2)
        new_weather.push("Snow")
      end
      if STORM_SEASONS.include?(2)
        new_weather.push("Storm")
      end
      stuff = rand(new_weather.size - 1)
      @more_stuff = new_weather[stuff]
    when "Spring"
      new_weather.push("Clear")
      if RAIN_SEASONS.include?(3)
        new_weather.push("Rain")
      end
      if SNOW_SEASONS.include?(3)
        new_weather.push("Snow")
      end
      if STORM_SEASONS.include?(3)
        new_weather.push("Storm")
      end
      stuff = rand(new_weather.size)
      @more_stuff = new_weather[stuff]
    end
    case @more_stuff
    when "Clear"
      screen.weather(0, 0, 0)
      @weather = 0
      $game_switches[RAIN_SWITCH] = false
      $game_switches[STORM_SWITCH] = false
      $game_switches[SNOW_SWITCH] = false
    when "Rain"
      screen.weather(1, 4 || 5, 999)
      @weather = 1
      $game_switches[RAIN_SWITCH] = true
      $game_switches[STORM_SWITCH] = false
      $game_switches[SNOW_SWITCH] = false
    when "Storm"
      screen.weather(2, 4 || 5, 999)
      @weather = 2
      $game_switches[RAIN_SWITCH] = false
      $game_switches[STORM_SWITCH] = true
      $game_switches[SNOW_SWITCH] = false
    when "Snow"
      screen.weather(3, 4 || 5, 999)
      @weather = 3
      $game_switches[RAIN_SWITCH] = false
      $game_switches[STORM_SWITCH] = false
      $game_switches[SNOW_SWITCH] = true
    end
  end

  def get_time_of_day
    if REAL_TIME
      if (18..21) === @hour
        $game_switches[DUSK_SWITCH] = true
        $game_switches[DAWN_SWITCH] = false
        $game_switches[DAY_SWITCH] = false
        $game_switches[NIGHT_SWITCH] = false
        $game_temp.light_switch = true
        return 2
      elsif (22..24) === @hour || (1..3) === @hour
        $game_switches[DUSK_SWITCH] = false
        $game_switches[DAWN_SWITCH] = false
        $game_switches[DAY_SWITCH] = false
        $game_switches[NIGHT_SWITCH] = true
        $game_temp.light_switch = true
        return 3
      elsif (4..7) === @hour
        $game_switches[DUSK_SWITCH] = false
        $game_switches[DAWN_SWITCH] = true
        $game_switches[DAY_SWITCH] = false
        $game_switches[NIGHT_SWITCH] = false
        $game_temp.light_switch = false
        return 0
      elsif (8..17) === @hour
        $game_switches[DUSK_SWITCH] = false
        $game_switches[DAWN_SWITCH] = false
        $game_switches[DAY_SWITCH] = true
        $game_switches[NIGHT_SWITCH] = false
        $game_temp.light_switch = false
        return 1
      end
    else
      if DUSK_HOURS.include?(@hour)
        $game_switches[DUSK_SWITCH] = true
        $game_switches[DAWN_SWITCH] = false
        $game_switches[DAY_SWITCH] = false
        $game_switches[NIGHT_SWITCH] = false
        $game_temp.light_switch = true
        return 2
      elsif DAWN_HOURS.include?(@hour)
        $game_switches[DUSK_SWITCH] = false
        $game_switches[DAWN_SWITCH] = true
        $game_switches[DAY_SWITCH] = false
        $game_switches[NIGHT_SWITCH] = false
        $game_temp.light_switch = false
        return 0
      elsif NIGHT_HOURS.include?(@hour)
        $game_switches[DUSK_SWITCH] = false
        $game_switches[DAWN_SWITCH] = false
        $game_switches[DAY_SWITCH] = false
        $game_switches[NIGHT_SWITCH] = true
        $game_temp.light_switch = true
        return 3
      elsif DAY_HOURS.include?(@hour)
        $game_switches[DUSK_SWITCH] = false
        $game_switches[DAWN_SWITCH] = false
        $game_switches[DAY_SWITCH] = true
        $game_switches[NIGHT_SWITCH] = false
        $game_temp.light_switch = false
        return 1
      end
    end
  end
 
  def map_encounter_changes(type)
    if type == 0
      added_enemies = []
      MAP_ENCOUNTER_CHANGES.each {|map_id, array|
      if map_id == $game_map.map_id
        case array[0]
        when 0
          if get_time_of_day == array[1]
            added_enemies += array[2]
          end
        when 1
          if @day == array[1]
            added_enemies += array[2]
          end
        when 2
          if @month == array[1]
            added_enemies += array[2]
          end
        when 3
          if get_season == array[1]
            added_enemies += array[2]
          end
        end
      end }
      return added_enemies
    else
      subtracted_enemies = []
      MAP_ENCOUNTER_CHANGES.each {|map_id, array|
      if map_id = $game_map.map_id
        case array[0]
        when 0
          if get_time_of_day == array[1]
            subtracted_enemies += array[3]
          end
        when 1
          if @day == array[1]
            subtracted_enemies += array[3]
          end
        when 2
          if @month == array[1]
            subtracted_enemies += array[3]
          end
        when 3
          if get_season == array[1]
            subtracted_enemies += array[3]
          end
        end
      end }
      return subtracted_enemies
    end
  end
 
  def skill_damage_variate?(skill)
    SKILL_DAMAGE_VARIATION.each {|skill_id, array|
    next if skill != skill_id
    case array[0]
    when 0
      if get_time_of_day == array[1]
        return true
      end
    when 1
      if @day == array[1]
        return true
      end
    when 2
      if @month == array[1]
        return true
      end
    when 3
      if get_season == array[1]
        return true
      end
    end }
  end
end

class Window_DayNight < Window_Base
 
  include Jet_DayNight
 
  def initialize
    super(0, 360, 160, 56)
    refresh
  end
 
  def refresh
    self.contents.clear
    self.contents.font.size = 19
    if MILITARY_TIME
      if $game_time.minute < 10
        self.contents.draw_text(0, 0, 140, WLH, $game_time.day_name + "  " + $game_time.hour.to_s + ":" + "0" + $game_time.minute.to_s)
      else
        self.contents.draw_text(0, 0, 140, WLH, $game_time.day_name + "  " + $game_time.hour.to_s + ":" + $game_time.minute.to_s)
      end
    else       
      if $game_time.minute < 10
        if $game_time.hour > 12
          self.contents.draw_text(0, 0, 140, WLH, $game_time.day_name + "  " + ($game_time.hour - 12).to_s + ":" + "0" + $game_time.minute.to_s + " " + "PM")
        else
          self.contents.draw_text(0, 0, 140, WLH, $game_time.day_name + "  " + $game_time.hour.to_s + ":" + "0" + $game_time.minute.to_s + " " + "AM")
        end
      else
        if $game_time.hour > 12
          self.contents.draw_text(0, 0, 140, WLH, $game_time.day_name + "  " + ($game_time.hour - 12).to_s + ":" + $game_time.minute.to_s + " " + "PM")
        else
          self.contents.draw_text(0, 0, 140, WLH, $game_time.day_name + "  " + $game_time.hour.to_s + ":" + $game_time.minute.to_s + " " + "AM")
        end
      end
    end
  end
 
  def update
    refresh
  end
end

class Scene_Base
 
  include Jet_DayNight
 
  alias jet8922_update update unless $@
  def update
    jet8922_update
    if !$scene.is_a?(Scene_Title) && !$scene.is_a?(Scene_File) && UPDATE_ONLY_ON_MAP
      $game_time.update_time if $scene.is_a?(Scene_Map)
    elsif !$scene.is_a?(Scene_Title) && !$scene.is_a?(Scene_File)
      $game_time.update_time
    end
  end
end

class Scene_Menu
 
  alias jet3922_start start unless $@
  def start
    jet3922_start
    @time_window = Window_DayNight.new if MENU_TIME_WINDOW
    @time_window.x = MENU_TIME_WINDOW_COORDS[0] if MENU_TIME_WINDOW
    @time_window.y = MENU_TIME_WINDOW_COORDS[1] if MENU_TIME_WINDOW
    @time_window.visible = !$game_switches[WINDOW_INVISIBLE_SWITCH] if MENU_TIME_WINDOW
  end
 
  alias jet3022_terminate terminate unless $@
  def terminate
    @time_window.dispose if MENU_TIME_WINDOW
    jet3022_terminate
  end
 
  alias jet3026_update update unless $@
  def update
    jet3026_update
    @time_window.update if MENU_TIME_WINDOW
  end
end

class Game_Interpreter
 
  include Jet_DayNight
 
  def call_full_time_window
    $game_temp.full_time_window = true
  end
 
  def jump_to(time, amount)
    case time
    when "minute"
      if amount > 59 || amount < 0
        p "Minute must be above 0 and below 60, please edit the command."
      else
        $game_time.minute = amount
      end
    when "hour"
      if amount > 24 || amount < 0
        p "Hour must be above 0 and below 60, please edit the command."
      else
        $game_time.hour = amount
      end
    when "day"
      if amount >= DAYS.keys.size || amount < 0
        p "Days must be above 0 and below #{DAYS.keys.size.to_s}, please edit the command."
      else
        $game_time.day = amount
      end
    when "month"
      if amount >= MONTHS.keys.size || amount < 0
        p "Minute must be above 0 and below #{MONTHS.keys.size.to_s}, please edit the command."
      else
        $game_time.month = amount
      end
    when "year"
      $game_time.year = amount
    end
  end
 
  def jump_to_hour(hour)
    if hour > 24 || hour < 0
      p "Hour must be above 0 and below 25, please edit the command."
    else
      $game_time.hour = hour
    end
  end
 
  def jump_to_year(year)
    $game_time.year = year
  end
 
  def sub_time(time, amount)
    case time
    when "minute"
      loop do
        $game_time.minute -= 1
        if $game_time.minute == 0
          $game_time.hour -= 1
          $game_time.minute = 59
        end
        if $game_time.hour == 0
          $game_time.day -= 1
          $game_time.hour = 24
        end
        if $game_time.day == -1
          $game_time.day = DAYS.keys.size - 1
          $game_time.days_passed -= DAYS.keys.size
        end
        if $game_time.days_passed < MONTHS[$game_time.month][1]
          $game_time.month -= 1
          $game_time.days_passed = MONTHS[$game_time.month][1] - 1
        end
        if $game_time.month == -1
          $game_time.year -= 1
          $game_time.month = MONTHS.keys.size - 1
        end
        amount -= 1
        if amount == 0
          daytime = $game_time.get_time_of_day
          unless $BTEST
            unless $game_time.map_infos[$game_map.map_id].indoors? || $game_time.map_infos[$game_map.map_id].no_tint? || $game_time.last_time_of_day == daytime
              $game_time.last_time_of_day = daytime
              case daytime
              when 2
                $game_time.screen.start_tone_change(DUSK_TINT, 0) unless !AUTO_TINT
                $game_time.last_time_of_day = 2
              when 3
                $game_time.screen.start_tone_change(NIGHT_TINT, 0) unless !AUTO_TINT
                $game_time.last_time_of_day = 3
              when 0
                $game_time.screen.start_tone_change(DAWN_TINT, 0) unless !AUTO_TINT
                $game_time.last_time_of_day = 0
              when 1
                $game_time.screen.start_tone_change(DAY_TINT, 0) unless !AUTO_TINT
                $game_time.last_time_of_day = 1
              end
            end
          end
          break
        end
      end
    when "hour"
      loop do
        $game_time.hour -= 1
        if $game_time.hour == 0
          $game_time.day -= 1
          $game_time.hour = 24
        end
        if $game_time.day == -1
          $game_time.day = DAYS.keys.size - 1
          $game_time.days_passed -= DAYS.keys.size
        end
        if $game_time.days_passed < MONTHS[$game_time.month][1]
          $game_time.month -= 1
          $game_time.days_passed = MONTHS[$game_time.month][1] - 1
        end
        if $game_time.month == -1
          $game_time.year -= 1
          $game_time.month = MONTHS.keys.size - 1
        end
        amount -= 1
        if amount == 0
          daytime = $game_time.get_time_of_day
          unless $BTEST
            unless $game_time.map_infos[$game_map.map_id].indoors? || $game_time.map_infos[$game_map.map_id].no_tint? || $game_time.last_time_of_day == daytime
              $game_time.last_time_of_day = daytime
              case daytime
              when 2
                $game_time.screen.start_tone_change(DUSK_TINT, 0) unless !AUTO_TINT
                $game_time.last_time_of_day = 2
              when 3
                $game_time.screen.start_tone_change(NIGHT_TINT, 0) unless !AUTO_TINT
                $game_time.last_time_of_day = 3
              when 0
                $game_time.screen.start_tone_change(DAWN_TINT, 0) unless !AUTO_TINT
                $game_time.last_time_of_day = 0
              when 1
                $game_time.screen.start_tone_change(DAY_TINT, 0) unless !AUTO_TINT
                $game_time.last_time_of_day = 1
              end
            end
          end
          break
        end
      end
    when "day"
      loop do
        $game_time.day -= 1
        if $game_time.day == -1
          $game_time.day = DAYS.keys.size - 1
          $game_time.days_passed -= DAYS.keys.size
        end
        if $game_time.days_passed < MONTHS[$game_time.month][1]
          $game_time.month -= 1
          $game_time.days_passed = MONTHS[$game_time.month][1] - 1
        end
        if $game_time.month == -1
          $game_time.year -= 1
          $game_time.month = MONTHS.keys.size - 1
        end
        amount -= 1
        if amount == 0
          break
        end
      end
    when "month"
      loop do
        $game_time.month -= 1
        if $game_time.month == -1
          $game_time.year -= 1
          $game_time.month = MONTHS.keys.size - 1
        end
        amount -= 1
        if amount == 0
          break
        end
      end
    when "year"
      loop do
        $game_time.year -= 1
        amount -= 1
        if amount == 0
          break
        end
      end
    end
  end
 
  def add_time(time, amount)
    case time
    when "minute"
      loop do
        $game_time.minute += 1
        if $game_time.minute == 60
          $game_time.hour += 1
          $game_time.minute = 0
        end
        if $game_time.hour == 25
          $game_time.day += 1
          $game_time.hour = 1
        end
        if $game_time.day == DAYS.keys.size
          $game_time.day = 0
          $game_time.days_passed += DAYS.keys.size
        end
        if $game_time.days_passed > MONTHS[$game_time.month][1]
          $game_time.days_passed = 0
          $game_time.month += 1
        end
        if $game_time.month == MONTHS.keys.size
          $game_time.year += 1
          $game_time.month = 0
        end
        amount -= 1
        if amount == 0
          daytime = $game_time.get_time_of_day
          unless $BTEST
            unless $game_time.map_infos[$game_map.map_id].indoors? || $game_time.map_infos[$game_map.map_id].no_tint? || $game_time.last_time_of_day == daytime
              $game_time.last_time_of_day = daytime
              case daytime
              when 2
                $game_time.screen.start_tone_change(DUSK_TINT, 0) unless !AUTO_TINT
                $game_time.last_time_of_day = 2
              when 3
                $game_time.screen.start_tone_change(NIGHT_TINT, 0) unless !AUTO_TINT
                $game_time.last_time_of_day = 3
              when 0
                $game_time.screen.start_tone_change(DAWN_TINT, 0) unless !AUTO_TINT
                $game_time.last_time_of_day = 0
              when 1
                $game_time.screen.start_tone_change(DAY_TINT, 0) unless !AUTO_TINT
                $game_time.last_time_of_day = 1
              end
            end
          end
          break
        end
      end
    when "hour"
      loop do
        $game_time.hour += 1
        if $game_time.hour == 25
          $game_time.day += 1
          $game_time.hour = 1
        end
        if $game_time.day == DAYS.keys.size
          $game_time.day = 0
          $game_time.days_passed += DAYS.keys.size
        end
        if $game_time.days_passed > MONTHS[$game_time.month][1]
          $game_time.days_passed = 0
          $game_time.month += 1
        end
        if $game_time.month == MONTHS.keys.size
          $game_time.year += 1
          $game_time.month = 0
        end
        amount -= 1
        if amount == 0
          daytime = $game_time.get_time_of_day
          unless $BTEST
            unless $game_time.map_infos[$game_map.map_id].indoors? || $game_time.map_infos[$game_map.map_id].no_tint? || $game_time.last_time_of_day == daytime
              $game_time.last_time_of_day = daytime
              case daytime
              when 2
                $game_time.screen.start_tone_change(DUSK_TINT, 0) unless !AUTO_TINT
                $game_time.last_time_of_day = 2
              when 3
                $game_time.screen.start_tone_change(NIGHT_TINT, 0) unless !AUTO_TINT
                $game_time.last_time_of_day = 3
              when 0
                $game_time.screen.start_tone_change(DAWN_TINT, 0) unless !AUTO_TINT
                $game_time.last_time_of_day = 0
              when 1
                $game_time.screen.start_tone_change(DAY_TINT, 0) unless !AUTO_TINT
                $game_time.last_time_of_day = 1
              end
            end
          end
          break
        end
      end
    when "day"
      loop do
        $game_time.day += 1
        if $game_time.day == DAYS.keys.size
          $game_time.day = 0
          $game_time.days_passed += DAYS.keys.size
        end
        if $game_time.days_passed > MONTHS[$game_time.month][1]
          $game_time.days_passed = 0
          $game_time.month += 1
        end
        if $game_time.month == MONTHS.keys.size
          $game_time.year += 1
          $game_time.month = 0
        end
        amount -= 1
        if amount == 0
          break
        end
      end
    when "month"
      loop do
        $game_time.month += 1
        if $game_time.month == MONTHS.keys.size
          $game_time.year += 1
          $game_time.month = 0
        end
        amount -= 1
        if amount == 0
          break
        end
      end
    when "year"
      loop do
        $game_time.year += 1
        amount -= 1
        if amount == 0
          break
        end
      end
    end
  end
 
  def freeze_time(option)
    if option || !option
      $game_time.frozen_time = option
    else
      p "The option you chose was neither true or false. Please error check and try again"
    end
  end
 
  def reverse_time(option)
    if option || !option
      $game_time.reverse_time = option
    else
      p "The option you chose was neither true or false. Please error check and try again"
    end
  end
end

class Window_NumberInput
 
  def index=(new_index)
    @index = new_index
  end
end

class Scene_Rest < Scene_Base
 
  def start
    super
    create_menu_background
    if $game_time.frozen_time
      @notification_window = Window_Help.new
      @notification_window.y = 188
      @notification_window.set_text("Time is frozen, so you may not rest. Press enter to continue.", 1)
    else
      @number_window = Window_NumberInput.new
      @number_window.digits_max = 3
      @number_window.x = 210
      @number_window.y = 190
      @number_window.index = 2
      @number_window.active = true
      @description_window = Window_Help.new
      @description_window.set_text("How many hours would you like to rest?", 1)
      @decoration_window = Window_Base.new(210, 190, 120, 56)
    end
  end
 
  def terminate
    super
    if $game_time.frozen_time
      @notification_window.dispose
      dispose_menu_background
    else
      @number_window.dispose
      @description_window.dispose
      @decoration_window.dispose
      dispose_menu_background
    end
  end
 
  def update
    if $game_time.frozen_time
      if Input.trigger?(Input::C)
        $scene = Scene_Map.new
      end
    else
      @number_window.update
      if Input.trigger?(Input::C)
        loop do     
          $game_temp.instant_tint = true
          $game_time.hour += 1
          $game_time.update_time
          @number_window.number -= 1
          @number_window.update
          Graphics.wait(10)
          if @number_window.number == 0
            break
          end
        end
        $game_stamina.stamina = $game_stamina.get_max_stamina if RESTORE_STAMINA_WHEN_RESTING
        $scene = Scene_Map.new
      end
      if Input.trigger?(Input::B)
        $scene = Scene_Map.new
      end
    end
  end
end
       
class Scene_Map
 
  include Jet_DayNight
 
  alias jet3829_start start unless $@
  def start
    if $game_temp.no_time_continue
      if $game_time.map_infos[$game_map.map_id].indoors? || $game_time.map_infos[$game_map.map_id].no_tint?
        $game_time.screen.start_tone_change(Tone.new(0, 0, 0), 0)
        $game_time.screen.weather(0, 0, 0)
        $game_time.update_time
      else
        $game_time.last_time_of_day = nil
        $game_temp.instant_tint = true
        $game_time.get_weather unless $game_temp.first_weather || $game_time.map_infos[$game_map.map_id].no_weather?
        $game_temp.first_weather = true unless $game_temp.first_weather
        $game_time.update_time
      end
      $game_temp.no_time_continue = false
    end
    @time_window = Window_DayNight.new if MAP_TIME_WINDOW
    @time_window.x = MAP_TIME_WINDOW_COORDS[0] if MAP_TIME_WINDOW
    @time_window.y = MAP_TIME_WINDOW_COORDS[1] if MAP_TIME_WINDOW
    @time_window.visible = !$game_switches[WINDOW_INVISIBLE_SWITCH] if MAP_TIME_WINDOW
    jet3829_start
  end
 
  alias jet3023_update update unless $@
  def update
    if @message_window.openness > 0 && MAP_TIME_WINDOW or $game_switches[WINDOW_INVISIBLE_SWITCH] && MAP_TIME_WINDOW
      @time_window.visible = false
    elsif MAP_TIME_WINDOW
      @time_window.visible = true
    end
    @time_window.update if MAP_TIME_WINDOW
    update_rest if ALLOW_REST
    if $game_temp.full_time_window
      @time_window2 = Window_Help.new
      @time_window2.y = 208 - (@time_window2.height / 2)
      @time_window2.z = 101
      @time_window2.opacity = 0
      @blank_window = Window_Base.new(100, @time_window2.y, 344, 54)
      @time_window2.set_text("#{$game_time.day_name}  #{$game_time.month_name} #{$game_time.day}, #{$game_time.year}", 1)
      loop do
        Graphics.update
        Input.update
        break if Input.trigger?(Input::B)
      end
      Input.update
      @blank_window.dispose
      @time_window2.dispose
      $game_temp.full_time_window = false
    end
    jet3023_update
  end
 
  alias jet6454_terminate terminate unless $@
  def terminate
    @time_window.dispose if MAP_TIME_WINDOW
    jet6454_terminate
  end
 
  def update_rest
    if Input.trigger?(REST_BUTTON)
      snapshot_for_background
      $scene = Scene_Rest.new
    end
  end
end
     
class Scene_File
 
  alias jet3890_write_save_data write_save_data unless $@
  def write_save_data(file)
    jet3890_write_save_data(file)
    Marshal.dump($game_time, file)
  end
 
  alias jet5935_read_save_data read_save_data unless $@
  def read_save_data(file)
    jet5935_read_save_data(file)
    $game_time = Marshal.load(file)
  end
end

class Scene_Title
 
  alias jet7382_command_new_game command_new_game unless $@
  def command_new_game
    $game_time = Game_Time.new
    jet7382_command_new_game
  end
 
  alias jet4683_create_game_objects create_game_objects unless $@
  def create_game_objects
    jet4683_create_game_objects
    if $BTEST
      $game_time = Game_Time.new
    end
  end
end

class Spriteset_Map
 
  include Jet_DayNight
 
  if THOMAS_EDISON_COMPATABILITY && !$bulletxt_day_check.nil?
    alias jet3422_update_light_effects update_light_effects unless $@
    def update_light_effects
      if $game_temp.light_switch || $game_time.map_infos[$game_map.map_id].indoors?
        jet3422_update_light_effects
      else
        for effect in @light_effects
          effect.light.visible = false
        end
      end
    end
  end
end

class Game_Battler
 
  include Jet_DayNight
 
  alias jet9802_atk atk unless $@
  def atk
    n = jet9802_atk
    if self.actor?
      if ALIGNMENT_SYSTEM_COMPATABILITY
        if $game_system.alignment < 0 && $game_temp.light_switch
          n *= BAD_BONUSES[0]
        elsif $game_system.alignment > 0 && !$game_temp.light_switch
          n *= GOOD_BONUSES[0]
        end
      end
    end
    return n.round
  end

  alias jet2980_def def unless $@
  def def
    n = jet2980_def
    if self.actor?
      if ALIGNMENT_SYSTEM_COMPATABILITY
        if $game_system.alignment < 0 && $game_temp.light_switch
          n *= BAD_BONUSES[1]
        elsif $game_system.alignment > 0 && !$game_temp.light_switch
          n *= GOOD_BONUSES[1]
        end
      end
    end
    return n.round
  end

  alias jet7821_spi spi unless $@
  def spi
    n = jet7821_spi
    if self.actor?
      if ALIGNMENT_SYSTEM_COMPATABILITY
        if $game_system.alignment < 0 && $game_temp.light_switch
          n *= BAD_BONUSES[2]
        elsif $game_system.alignment > 0 && !$game_temp.light_switch
          n *= GOOD_BONUSES[2]
        end
      end
    end
    return n.round
  end
   
  alias jet7821_agi agi unless $@
  def agi
    n = jet7821_agi
    if self.actor?
      if ALIGNMENT_SYSTEM_COMPATABILITY
        if $game_system.alignment < 0 && $game_temp.light_switch
          n *= BAD_BONUSES[3]
        elsif $game_system.alignment > 0 && !$game_temp.light_switch
          n *= GOOD_BONUSES[3]
        end
      end
    end
    return n.round
  end
 
  if AFFECT_SKILL_DAMAGE
    alias jet2942_make_obj_damage_value make_obj_damage_value unless $@
    def make_obj_damage_value(user, obj)
      jet2942_make_obj_damage_value(user, obj)
      if obj.is_a?(RPG::Skill) && SKILL_DAMAGE_VARIATION.include?(obj.id)
        skill_time = SKILL_DAMAGE_VARIATION.keys.index(obj.id)
        if $game_time.skill_damage_variate?(obj.id)
          if obj.damage_to_mp
            @mp_damage *= SKILL_DAMAGE_VARIATION.values[skill_time][2]
            @mp_damage = @mp_damage.round
          else
            @hp_damage *= SKILL_DAMAGE_VARIATION.values[skill_time][2]
            @hp_damage = @hp_damage.round
          end
        end
      end
    end
  end
 
  if AFFECT_ACCURACY
    alias jet0323_calc_hit calc_hit unless $@
    def calc_hit(user, obj = nil)
      hit = jet0323_calc_hit(user, obj)
      if obj.nil?
        hit *= ACCURACY_EFFECTS_DAY_TIMES[$game_time.get_time_of_day]
        case $game_time.get_weather
        when "Clear"
          hit *= ACCURACY_EFFECTS_WEATHER[0]
        when "Rain"
          hit *= ACCURACY_EFFECTS_WEATHER[1]
        when "Storm"
          hit *= ACCURACY_EFFECTS_WEATHER[3]
        when "Snow"
          hit *= ACCURACY_EFFECTS_WEATHER[2]
        end
      end
      return hit.round
    end
  end
end

class RPG::Map
 
  def encounter_list
    new_encounters = []
    new_encounters = new_encounters + @encounter_list
    new_encounters = new_encounters + $game_time.map_encounter_changes(0)
    for element in $game_time.map_encounter_changes(1)
      new_encounters.delete(element) if new_encounters.include?(element)
    end
    return new_encounters
  end
end

class Game_Map
 
  alias jet5902_setup setup unless $@
  def setup(*args)
    jet5902_setup(*args)
    $game_temp.no_time_continue = true if $game_time.nil?
    unless $game_temp.no_time_continue
      $game_time.screen.weather(0, 0, 0) if $game_time.map_infos[@map_id].indoors? || $game_time.map_infos[@map_id].no_weather?
      if $game_time.map_infos[@map_id].indoors? || $game_time.map_infos[@map_id].no_tint?
        $game_time.screen.start_tone_change(Tone.new(0, 0, 0), 0)
        $game_time.update_time
      else
        $game_time.last_time_of_day = nil
        $game_temp.instant_tint = true
        $game_time.get_weather unless $game_temp.first_weather || $game_time.map_infos[@map_id].no_weather? || $game_time.map_infos[@map_id].indoors?
        $game_temp.first_weather = true unless $game_temp.first_weather
        $game_time.update_time
      end
    end
  end
end

class Scene_Battle
 
  alias jet8923_start start unless $@
  def start
    jet8923_start
    @time_window = Window_DayNight.new if BATTLE_TIME_WINDOW
    @time_window.x = BATTLE_TIME_WINDOW_COORDS[0] if BATTLE_TIME_WINDOW
    @time_window.y = BATTLE_TIME_WINDOW_COORDS[1] if BATTLE_TIME_WINDOW
  end
 
  alias jet9213_update update unless $@
  def update
    @time_window.update if BATTLE_TIME_WINDOW
    jet9213_update
  end
 
  alias jet0134_terminate terminate unless $@
  def terminate
    @time_window.dispose if BATTLE_TIME_WINDOW
    jet0134_terminate
  end
end



Dodatkowe informacje:
Proszę przeczytać sekcję UWAGA!
________________________
Pomogłem daj "Pomógł",BIJAAACZ!



 
 
tracersgta 




Preferowany:
RPG Maker VX

Pomógł: 45 razy
Dołączył: 10 Sty 2011
Posty: 612
Skąd: mam wiedzieć?
Wysłany: Sob 29 Paź, 2011 09:36
Prosiłbym o demko :)
________________________
I'm a tiger! I roar. I hunt, I climb, I eat, I wash, I sleep!

Gość, jeżeli pomogłem daj "Pomógł" ;-)
 
 
 
Angius 

Nie wkurzać



Preferowany:
RPG Maker VX

Pomógł: 104 razy
Dołączył: 30 Paź 2010
Posty: 1276
Skąd: wROCK
Wysłany: Sob 29 Paź, 2011 11:44
Skoro - jak sam piszesz, nazwy są pomylone i ty o tym wiesz - to czemu ich nie "odmyliłeś", tylko wysłałeś niekompletnie i błędnie przetłumaczony?
________________________
"Na trolla pewne są tylko dwie pewne metody, jedna samopowtarzalna i druga, wymagająca przeładowania ręcznego."


 
 
Tjef 




Preferowany:
RPG Maker VX

Pomógł: 12 razy
Dołączył: 21 Wrz 2010
Posty: 163
Skąd: Wolsztyn
Wysłany: Pon 31 Paź, 2011 11:29
To jest wszystko pomylone.. I nie mówię tylko o tłumaczeniu. Jest pełno błędów w samym skrypcie -,- A bardzo chciałem z niego skorzystać .. Ale w sumie jednak nie wiem dlaczego, bo w TS jest tylko noc ;PP
________________________
SAGA TS ( ThiefStory )
Rozdział I: Same Game http://www.ultimateam.pl/viewtopic.php?t=4978
Rozdział II: Terror http://www.ultimateam.pl/...p?p=64366#64366
Pozostałe rozdziały mogą nawet nie wyjść :P
Lista elity: http://i.imgur.com/Li9fU.jpg
 
 
misterbanan 



Preferowany:
RPG Maker VX

Dołączył: 07 Kwi 2013
Posty: 8
Skąd: Zamość
Wysłany: Nie 14 Kwi, 2013 08:35
Nawet skrypt niezły ale pełno błędów :-(
 
 
makerowiec64 




Preferowany:
RPG Maker 95

Pomógł: 2 razy
Dołączył: 02 Wrz 2012
Posty: 181
Skąd: się tu wziąłem?
Wysłany: Nie 14 Kwi, 2013 12:19
Jak każdy na górze już mówił:Pełno błędów.Jednak sam pomysł jest fajny.

No i w skrypcie coś dziwnego w pewnej linijce:

Spoiler:

NIE DOTYKAJ!GROZI ŚMIERCIĄ LUB KALCSTWEM!:P :shock:

________________________
99 % świrów czyta mój podpis z ręką na myszce.
Nie odchylaj ręki - jest już za późno :haha:

Wiem,to mogłem zrobić w większym rozmiarze.Przypatrz się bardziej!
 
 
 
Wyświetl posty z ostatnich:   
Odpowiedz do tematu
Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Nie możesz załączać plików na tym forum
Możesz ściągać załączniki na tym forum
Dodaj temat do Ulubionych
Wersja do druku

Skocz do:  

Powered by phpBB modified by Przemo © 2003 phpBB Group | Template Klam by Ayene