Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - Exiled_by_choise

1
Script Requests / [VX] Convert Blizzard ATES to VX
November 01, 2009, 01:17:57 am
I got a new computer and now I have windows 7 which wont allow me to install and run RPG Maker Xp :( and I want to create a new game using VX and some of the scripts I had in my Xp game I liked especially Blizzards Advanced Time and Environment System. So I was wondering if anyone could convert Blizzards script to VX?

Type of script: Autonomous Timeflow and Environment Controller

Scripts I have:
I don't have many other scripts yet because I only just started but the ones I do have only affect the menu screen,
I also have KGC's mini script
The script I have already to change the tinting is KGC's daynight, here is the script
Spoiler: ShowHide
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
#_/    ◆              Day-to-Night Phases - KGC_DayNight                ◆ VX ◆
#_/    ◇                   Last Update: 02/15/09                             ◇
#_/    ◆                  Translated by Mr. Anonymous                        ◆
#_/    ◆ KGC Site:                                                           ◆
#_/    ◆ http://ytomy.sakura.ne.jp/                                          ◆
#_/    ◆ Translator's Blog:                                                  ◆
#_/    ◆ http://mraprojects.wordpress.com                                    ◆
#_/----------------------------------------------------------------------------
#_/  This script adds the concept of Day-to-Night phase shifting to your game.
#_/  Events that only occur during certain phase shifts, such as night, can be
#_/  created as well.
#_/============================================================================
#_/  Note: The event command "Tint Screen" doesn't function normally while this
#_/  script is running a phase shift. To use the Tint Screen function properly,
#_/  please refer to the directions.
#_/============================================================================
#_/ Installation: Insert above Main.
#_/----------------------------------------------------------------------------
#_/  Terminology: Phase refers to the current state of the day, such as "Noon".
#_/                         ◆ Instructions For Usage ◆
#_/  
#_/                           ◆ Stop Day-to-Night ◆
#_/  When [DN_STOP] is inserted into a Map's name (after its given name), the
#_/  Day-to-Night change stops, the timer does not stop however, and if a phase
#_/  is currently active, such as "Night", the tint remains on the map.
#_/  
#_/                 ◆ Stop Day-to-Night and Time, Cancel Phase ◆
#_/  
#_/  When [DN_VOID] is inserted into a Map's name (after its given name), the
#_/  Day-to-Night change stops, the timer is effectively frozen, and if a phase
#_/  is currently active, such as "Night", the tint is reverted back to normal.
#_/  
#_/                       ◆ Phase-Specific Encounters ◆
#_/  
#_/  When [DN Phase#](Where Phase# refers to the phase. 0 = Noon, 1 = Evening,
#_/   2 = Night, 3 = Morning) is inserted into a specified Troop's "Notes" box
#_/   in the Troops tab of the database, the specified Troop will only appear
#_/   under those conditions.
#_/  
#_/                         ◆ Event Script Functions ◆
#_/  The following commands are available using the "Script" item in events.
#_/  
#_/  * stop_daynight
#_/     Day to Night change is stopped.
#_/  
#_/  * start_daynight
#_/     Day to Night change is started.
#_/  
#_/  * get_daynight_name
#_/     Name of present phase is acquired. This function only works in other
#_/      scripts.
#_/  
#_/  * get_daynight_week (variable_id)
#_/     Appoints the day of the week to the given variable.
#_/  
#_/  * get_daynight_week_name
#_/     Name of the present day is aquired. This function only works in other
#_/      scripts.
#_/  
#_/  * change_daynight_phase(phase, duration, pass_days)
#_/     Changes the current phase to a new one. Handy for Inns and the like.
#_/     Example: change_daynight_phase (3, 1, 1)
#_/       This would make one day pass, change the phase to morning, with a
#_/       duration of one frame. Duration must be set to a minimum of 1.
#_/  
#_/   * transit_daynight_phase(duration)
#_/      Forces the phase to change at the very moment you call this.
#_/       This appears to be bugged. No matter how I've called it, I get errors.
#_/  
#_/   * set_daynight_default(duration)
#_/      Forces the tint of the current phase to reset to the initial phase.
#_/  
#_/   * restore_daynight_phase(duration)
#_/      Forces the tint of the current phase to reset to its normal tint.
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/

#=============================================================================#
#                              ★ Customization ★                              #
#=============================================================================#

module KGC
module DayNight
 #                      ◆ Day to Night Switch Method ◆
 #  0. Time Lapse  1.Time passes with number of steps  2.Real Time
 METHOD = 1

 #                           ◆ Phase Variable ◆
 # The present phase (of day and night) is stored here.
 PHASE_VARIABLE = 11
 
 #                     ◆ Passing Days Storage Variable ◆
 #  The passing days is stored here.
 PASS_DAYS_VARIABLE = 12

 #                         ◆ Stop On Event Toggle ◆
 #  Stops the Day/Night Timer when an event is run by player.
 STOP_ON_EVENT = false
 
 #                        ◆ Day/Night Tone In Battle ◆
 #   0: None  1: Only Background  2: Background + Enemies
 BG_TONE_IN_BATTLE = 0

 #                       ◆ Setting Individual Phases ◆
 #  Each phase makes use of the Tint Screen function. The format as follows:
 #   ["Name", the color tone(Tint), time switch],
 #
 #  [Name]
 #    Name of Phase
 #    *The name holds no significance.
 #  [Tint]
 #    The color tone of the entire screen.
 #    Please don't alter this if you don't grasp color tints.
 #  [Time Shift]
 #    The amount of steps taken until the next phase shift occurs.
 #    The following set up is for step-time change. (METHOD = 1)
 #
 # Simplified Example:
 #  ["Noon",   Tone.new(   0,    0,   0), 300],     # Phase 0
 #  ["Evening", Tone.new( -32,  -96, -96), 100],    # Phase 1
 #  ["Night",   Tone.new(-128, -128, -32), 250],    # Phase 2
 #  ["Morning",   Tone.new( -48,  -48, -16), 100],  # Phase 3
 #
 PHASE = [
 #   Name                 Tint              Time Shift
   ["MidMorning",Tone.new(   8,   12,   8),       300],    # Phase 0
   ["Day",       Tone.new(  32,   48,  32),       600],    # Phase 1
   ["Mid-Day",   Tone.new(  64,   64,  32),       600],    # Phase 2
   ["Afternoon", Tone.new(  32,   48,  32),       400],    # Phase 3
   ["Noon",      Tone.new(   0,    0,   0),       200],    # Phase 4
   ["Evening",   Tone.new( -32,  -64, -96),       200],    # Phase 5
   ["Night",     Tone.new(-128, -128, -32),       400],    # Phase 6
   ["MidNight",  Tone.new(-164, -164, -64),       300],    # Phase 7
   ["Daybreak",  Tone.new( -64,  -64,  32),       150],    # Phase 8
   ["Morning",   Tone.new( -32,  -48,  16),       200],    # Phase 9
 ]  # Do not remove this line!

 #                          ◆ Real Time Setup ◆
 # Replace the values in the about phase set-up if you wish to use real-time.
 # This is only a template and may be altered freely.
 #  ["Noon",      Tone.new(   0,    0,   0), 12],  #Phase0 (Hour 12 [12:00PM])
 #  ["Evening",   Tone.new( -32,  -64, -96), 18],  #Phase1 (Hour 18 [6:00PM] )
 #  ["Night",     Tone.new(-128, -128, -32), 20],  #Phase2 (Hour 20 [8:00PM] )
 #  ["MidNight",  Tone.new(-164, -164, -64), 0],   #Phase3 (Hour 0  [12:00AM])
 #  ["Daybreak",  Tone.new( -64,  -64,  32), 5],   #Phase4 (Hour 5  [5:00AM] )  
 #  ["Morning",   Tone.new( -32,  -48,  16), 7],   #Phase5 (Hour 7  [7:00AM] )

 #                          ◆ Real Time Setup Simplified ◆
 #  ["Noon",    Tone.new(  0,   0,   0), 16],    #Phase0 (16 o'clock [4:00PM])
 #  ["Evening", Tone.new(  0, -96, -96), 20],    #Phase1 (20 o'clock [8:00PM])
 #  ["Night",   Tone.new(-96, -96, -64),  6],    #Phase2 (6 o'clock [6:00AM])
 #  ["Morning", Tone.new(-48, -48, -16), 10],    #Phase3 (10 o'clock [10:00AM])

 #                            ◆ Day Change ◆
 #  The day changes on the phase set here.
 #   0.Day  1.Evening  2.Night  3. MidNight  4.Daybreak  5.Morning
 PASS_DAY_PHASE = 3    

 #                        ◆ Fade Time (by frame) ◆
 #  The amount of frames it takes to fade into the next phase.
 PHASE_DURATION = 564

 #                        ◆ Day of the Week Names ◆
 #  This shouldn't be hard to figure out, I hope.
 #  When using the Real-Time method (2), this must be seven days.
 #  Values of these are 0, 1, 2, 3, 4, 5, 6
 WEEK_NAME = ["Sun", "Mon", "Tue", "Wed", "Thur", "Fri", "Sat"]
end
end

#==============================================================================#
#                             ★ END Customization ★                            #
#==============================================================================#

$imported = {} if $imported == nil
$imported["DayNight"] = true

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

if $data_mapinfos == nil
 $data_mapinfos = load_data("Data/MapInfos.rvdata")
end

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

module KGC::DayNight
 BATTLE_TONE_NONE = 0  # Tone In Battle: None
 BATTLE_TONE_BG   = 1  # Tone In Battle: Background
 BATTLE_TONE_FULL = 2  # Tone In Battle: Background + Enemies

 METHOD_TIME  = 0  # Time Lapse
 METHOD_STEP  = 1  # Time passes with number of steps
 METHOD_RTIME = 2  # Real Time
 
#  Whatever word(s) in the following lines are what are used to determine
#  what is searched for in the Map Name or the "Notes" section of the database.

 # Regular Expression Defined
 module Regexp
   # MapInfo Module
   module MapInfo
     # Day/Night Stop tag string
     DAYNIGHT_STOP = /\[DN_STOP\]/i
     # Day/Night Void tag string
     DAYNIGHT_VOID = /\[DN_VOID\]/i
   end

   # Event Module
   module Event
     #Light Emission tag string
     LUMINOUS = /\[(?:LUMINOUS|light)\]/i
   end

   # Troop Module
   module Troop
     # Appearance Phase tag string
     APPEAR_PHASE = /\[DN((?:[ ]*[\-]?\d+(?:[ ]*,)?)+)\]/i
   end
 end

 #--------------------------------------------------------------------------
 # ○ 敵グループ出現判定
 #     troop : 判定対象の敵グループ
 #     phase : 判定するフェーズ
 #--------------------------------------------------------------------------
 def self.troop_appear?(troop, phase = $game_system.daynight_phase)
   # 出現判定
   unless troop.appear_daynight_phase.empty?
     return false unless troop.appear_daynight_phase.include?(phase)
   end
   # 非出現判定
   unless troop.nonappear_daynight_phase.empty?
     return false if troop.nonappear_daynight_phase.include?(phase)
   end

   return true
 end
end

#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

#==============================================================================
# □ KGC::Commands
#==============================================================================

module KGC
module Commands
 module_function
 #--------------------------------------------------------------------------
 # ○ 昼夜切り替えを停止
 #--------------------------------------------------------------------------
 def stop_daynight
   $game_system.daynight_change_enabled = false
 end
 #--------------------------------------------------------------------------
 # ○ 昼夜切り替えを起動
 #--------------------------------------------------------------------------
 def start_daynight
   $game_system.daynight_change_enabled = true
 end
 #--------------------------------------------------------------------------
 # ○ 現在のフェーズ名を取得
 #--------------------------------------------------------------------------
 def get_daynight_name
   return KGC::DayNight::PHASE[get_daynight_phase][0]
 end
 #--------------------------------------------------------------------------
 # ○ 現在の曜日を取得
 #     variable_id : 代入する変数 ID
 #--------------------------------------------------------------------------
 def get_daynight_week(variable_id = 0)
   if KGC::DayNight::METHOD == KGC::DayNight::METHOD_RTIME
     week = Time.now.wday
   else
     days = $game_variables[KGC::DayNight::PASS_DAYS_VARIABLE]
     week = (days % KGC::DayNight::WEEK_NAME.size)
   end

   if variable_id > 0
     $game_variables[variable_id] = week
     $game_map.need_refresh = true
   end
   return week
 end
 #--------------------------------------------------------------------------
 # ○ 現在の曜日名を取得
 #--------------------------------------------------------------------------
 def get_daynight_week_name
   return KGC::DayNight::WEEK_NAME[get_daynight_week]
 end
 #--------------------------------------------------------------------------
 # ○ フェーズ切り替え
 #     phase     : 切り替え後のフェーズ
 #     duration  : 切り替え時間(フレーム)
 #     pass_days : 経過させる日数  (省略時: 0)
 #--------------------------------------------------------------------------
 def change_daynight_phase(phase,
     duration = KGC::DayNight::PHASE_DURATION,
     pass_days = 0)
   $game_temp.manual_daynight_duration = duration
   $game_system.daynight_counter = 0
   $game_system.daynight_phase = phase
   $game_variables[KGC::DayNight::PASS_DAYS_VARIABLE] += pass_days
   $game_map.need_refresh = true
 end
 #--------------------------------------------------------------------------
 # ○ 次のフェーズへ遷移
 #     duration : 切り替え時間(フレーム)
 #--------------------------------------------------------------------------
 def transit_daynight_phase(duration = KGC::DayNight::PHASE_DURATION)
   $game_screen.transit_daynight_phase(duration)
   $game_map.need_refresh = true
 end
 #--------------------------------------------------------------------------
 # ○ デフォルトの色調に戻す
 #     duration : 切り替え時間(フレーム)
 #--------------------------------------------------------------------------
 def set_daynight_default(duration = KGC::DayNight::PHASE_DURATION)
   $game_screen.set_daynight_default(duration)
   $game_map.need_refresh = true
 end
 #--------------------------------------------------------------------------
 # ○ 現在のフェーズを復元
 #     duration : 切り替え時間(フレーム)
 #--------------------------------------------------------------------------
 def restore_daynight_phase(duration = KGC::DayNight::PHASE_DURATION)
   $game_screen.restore_daynight_phase(duration)
   $game_map.need_refresh = true
 end
end
end

class Game_Interpreter
 include KGC::Commands
end

#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

#==============================================================================
# ■ RPG::MapInfo
#==============================================================================

class RPG::MapInfo
 #--------------------------------------------------------------------------
 # ● マップ名取得
 #--------------------------------------------------------------------------
 def name
   return @name.gsub(/\[.*\]/) { "" }
 end
 #--------------------------------------------------------------------------
 # ○ オリジナルマップ名取得
 #--------------------------------------------------------------------------
 def original_name
   return @name
 end
 #--------------------------------------------------------------------------
 # ○ 昼夜切り替え停止
 #--------------------------------------------------------------------------
 def daynight_stop
   return @name =~ KGC::DayNight::Regexp::MapInfo::DAYNIGHT_STOP
 end
 #--------------------------------------------------------------------------
 # ○ 昼夜エフェクト無効
 #--------------------------------------------------------------------------
 def daynight_void
   return @name =~ KGC::DayNight::Regexp::MapInfo::DAYNIGHT_VOID
 end
end

#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

#==============================================================================
# ■ RPG::Area
#==============================================================================

unless $@
class RPG::Area
 #--------------------------------------------------------------------------
 # ○ エンカウントリストの取得
 #--------------------------------------------------------------------------
 alias encounter_list_KGC_DayNight encounter_list
 def encounter_list
   list = encounter_list_KGC_DayNight.clone

   # 出現条件判定
   list.each_index { |i|
     list[i] = nil unless KGC::DayNight.troop_appear?($data_troops[list[i]])
   }
   return list.compact
 end
end
end

#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

#==============================================================================
# ■ RPG::Troop
#==============================================================================

class RPG::Troop
 #--------------------------------------------------------------------------
 # ○ 昼夜切り替えのキャッシュ生成
 #--------------------------------------------------------------------------
 def create_daynight_cache
   @__appear_daynight_phase = []
   @__nonappear_daynight_phase = []

   # 出現するフェーズ
   if @name =~ KGC::DayNight::Regexp::Troop::APPEAR_PHASE
     $1.scan(/[\-]?\d+/).each { |num|
       phase = num.to_i
       if phase < 0
         # 出現しない
         @__nonappear_daynight_phase << phase.abs
       else
         # 出現する
         @__appear_daynight_phase << phase
       end
     }
   end
 end
 #--------------------------------------------------------------------------
 # ○ 出現するフェーズ
 #--------------------------------------------------------------------------
 def appear_daynight_phase
   create_daynight_cache if @__appear_daynight_phase == nil
   return @__appear_daynight_phase
 end
 #--------------------------------------------------------------------------
 # ○ 出現しないフェーズ
 #--------------------------------------------------------------------------
 def nonappear_daynight_phase
   create_daynight_cache if @__nonappear_daynight_phase == nil
   return @__nonappear_daynight_phase
 end
end

#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

#==============================================================================
# ■ Game_Temp
#==============================================================================

class Game_Temp
 #--------------------------------------------------------------------------
 # ● 公開インスタンス変数
 #--------------------------------------------------------------------------
 attr_accessor :manual_daynight_duration # 手動フェーズ変更フラグ
 #--------------------------------------------------------------------------
 # ● オブジェクト初期化
 #--------------------------------------------------------------------------
 alias initialize_KGC_DayNight initialize
 def initialize
   initialize_KGC_DayNight

   @manual_daynight_duration = nil
 end
end

#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

#==============================================================================
# ■ Game_System
#==============================================================================

class Game_System
 #--------------------------------------------------------------------------
 # ● 公開インスタンス変数
 #--------------------------------------------------------------------------
 attr_writer   :daynight_counter         # フェーズ遷移カウンタ
 attr_writer   :daynight_change_enabled  # 昼夜切り替え有効
 #--------------------------------------------------------------------------
 # ● オブジェクト初期化
 #--------------------------------------------------------------------------
 alias initialize_KGC_DayNight initialize
 def initialize
   initialize_KGC_DayNight

   @daynight_counter = 0
   @daynight_change_enabled = true
 end
 #--------------------------------------------------------------------------
 # ○ フェーズ遷移カウンタを取得
 #--------------------------------------------------------------------------
 def daynight_counter
   @daynight_counter = 0 if @daynight_counter == nil
   return @daynight_counter
 end
 #--------------------------------------------------------------------------
 # ○ 現在のフェーズを取得
 #--------------------------------------------------------------------------
 def daynight_phase
   return $game_variables[KGC::DayNight::PHASE_VARIABLE]
 end
 #--------------------------------------------------------------------------
 # ○ 現在のフェーズを変更
 #--------------------------------------------------------------------------
 def daynight_phase=(value)
   $game_variables[KGC::DayNight::PHASE_VARIABLE] = value
   $game_map.need_refresh = true
 end
 #--------------------------------------------------------------------------
 # ○ 昼夜切り替え有効フラグを取得
 #--------------------------------------------------------------------------
 def daynight_change_enabled
   @daynight_change_enabled = 0 if @daynight_change_enabled == nil
   return @daynight_change_enabled
 end
 #--------------------------------------------------------------------------
 # ○ フェーズ進行
 #--------------------------------------------------------------------------
 def progress_daynight_phase
   self.daynight_phase += 1
   if self.daynight_phase >= KGC::DayNight::PHASE.size
     self.daynight_phase = 0
   end
   $game_map.need_refresh = true
 end
 #--------------------------------------------------------------------------
 # ○ 現在のフェーズオブジェクトを取得
 #--------------------------------------------------------------------------
 def daynight_phase_object
   return KGC::DayNight::PHASE[daynight_phase]
 end
 #--------------------------------------------------------------------------
 # ○ 以前のフェーズオブジェクトを取得
 #--------------------------------------------------------------------------
 def previous_daynight_phase_object
   return KGC::DayNight::PHASE[daynight_phase - 1]
 end
end

#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

#==============================================================================
# ■ Game_Screen
#==============================================================================

class Game_Screen
 DEFAULT_TONE = Tone.new(0, 0, 0)
 #--------------------------------------------------------------------------
 # ● 公開インスタンス変数
 #--------------------------------------------------------------------------
 attr_reader   :daynight_tone            # 昼夜の色調
 #--------------------------------------------------------------------------
 # ● クリア
 #--------------------------------------------------------------------------
 alias clear_KGC_DayNight clear
 def clear
   clear_KGC_DayNight

   clear_daynight
 end
 #--------------------------------------------------------------------------
 # ○ 昼夜切り替え用変数をクリア
 #--------------------------------------------------------------------------
 def clear_daynight
   @daynight_tone = DEFAULT_TONE.clone
   @daynight_x = 0
   @daynight_y = 0

   @frame_count = Graphics.frame_count
   @daynight_tone_duration = 0

   apply_daynight
 end
 #--------------------------------------------------------------------------
 # ○ 昼夜の色調を適用
 #--------------------------------------------------------------------------
 def apply_daynight
   return if $game_map == nil
   if $game_temp.in_battle
     if KGC::DayNight::BG_TONE_IN_BATTLE == KGC::DayNight::BATTLE_TONE_NONE
       return
     end
   end

   # 切り替えを無効化するマップの場合
   if $game_map.daynight_void?
     if @daynight_tone_changed
       # 初期の色調に戻す
       @tone = DEFAULT_TONE.clone
       @daynight_tone_changed = false
     end
     @daynight_tone = @tone.clone
     return
   end

   # フェーズがおかしければ修復
   if $game_system.daynight_phase_object == nil
     $game_system.daynight_phase = 0
   end

   # 現在の色調を適用
   @tone = $game_system.daynight_phase_object[1].clone
   @daynight_tone = @tone.clone

   # 現実時間遷移の場合
   if KGC::DayNight::METHOD == KGC::DayNight::METHOD_RTIME
     time = Time.now
     # マッチするフェーズに遷移
     KGC::DayNight::PHASE.each_with_index { |phase, i|
       if phase[2] <= time.hour
         start_tone_change(phase[1], 1)
         $game_system.daynight_phase = i
         break
       end
     }
   end

   @daynight_tone_changed = true
 end
 #--------------------------------------------------------------------------
 # ○ 色調の取得
 #--------------------------------------------------------------------------
 def tone
   if $game_temp.in_battle
     if KGC::DayNight::BG_TONE_IN_BATTLE <= KGC::DayNight::BATTLE_TONE_BG
       return DEFAULT_TONE
     end
   end
   return @tone
 end
 #--------------------------------------------------------------------------
 # ● 色調変更の開始
 #     tone     : 色調
 #     duration : 時間
 #--------------------------------------------------------------------------
 alias start_tone_change_KGC_DayNight start_tone_change
 def start_tone_change(tone, duration)
   duration = [duration, 1].max
   start_tone_change_KGC_DayNight(tone, duration)

   @daynight_tone_target   = tone.clone
   @daynight_tone_duration = duration
 end
 #--------------------------------------------------------------------------
 # ● フレーム更新
 #--------------------------------------------------------------------------
 alias update_KGC_DayNight update
 def update
   update_KGC_DayNight

   update_daynight_transit
 end
 #--------------------------------------------------------------------------
 # ● 色調の更新
 #--------------------------------------------------------------------------
 alias update_tone_KGC_DayNight update_tone
 def update_tone
   update_tone_KGC_DayNight

   if @daynight_tone_duration >= 1
     d = @daynight_tone_duration
     target = @daynight_tone_target
     @daynight_tone.red   = (@daynight_tone.red   * (d - 1) + target.red)   / d
     @daynight_tone.green = (@daynight_tone.green * (d - 1) + target.green) / d
     @daynight_tone.blue  = (@daynight_tone.blue  * (d - 1) + target.blue)  / d
     @daynight_tone.gray  = (@daynight_tone.gray  * (d - 1) + target.gray)  / d
     @daynight_tone_duration -= 1
   end
 end
 #--------------------------------------------------------------------------
 # ○ フェーズ遷移の更新
 #--------------------------------------------------------------------------
 def update_daynight_transit
   # 手動切り替えが行われた場合
   if $game_temp.manual_daynight_duration
     start_tone_change($game_system.daynight_phase_object[1],
       $game_temp.manual_daynight_duration)
     $game_temp.manual_daynight_duration = nil
     @daynight_tone_changed = true
   end

   return unless $game_system.daynight_change_enabled  # 切り替えを
   return if $game_map.daynight_stop?                  # 停止中

   if KGC::DayNight::STOP_ON_EVENT
     interpreter = ($game_temp.in_battle ? $game_troop.interpreter :
       $game_map.interpreter)
     return if interpreter.running?                    # イベント実行中
   end

   case KGC::DayNight::METHOD
   when KGC::DayNight::METHOD_TIME   # 時間
     update_daynight_pass_time
   when KGC::DayNight::METHOD_STEP   # 歩数
     update_daynight_step
   when KGC::DayNight::METHOD_RTIME  # 現実時間
     update_daynight_real_time
   end
 end
 #--------------------------------------------------------------------------
 # ○ 遷移 : 時間経過
 #--------------------------------------------------------------------------
 def update_daynight_pass_time
   # カウント増加量計算
   inc_count = Graphics.frame_count - @frame_count
   # 加算量がおかしい場合は戻る
   if inc_count >= 100
     @frame_count = Graphics.frame_count
     return
   end
   # カウント加算
   $game_system.daynight_counter += inc_count
   @frame_count = Graphics.frame_count

   # 状態遷移判定
   count = $game_system.daynight_counter / Graphics.frame_rate
   if count >= $game_system.daynight_phase_object[2]
     transit_daynight_next
   end
 end
 #--------------------------------------------------------------------------
 # ○ 遷移 : 歩数
 #--------------------------------------------------------------------------
 def update_daynight_step
   # 移動していなければ戻る
   return if @daynight_x == $game_player.x && @daynight_y == $game_player.y

   @daynight_x = $game_player.x
   @daynight_y = $game_player.y
   # カウント加算
   $game_system.daynight_counter += 1
   # 状態遷移判定
   count = $game_system.daynight_counter
   if count >= $game_system.daynight_phase_object[2]
     transit_daynight_next
   end
 end
 #--------------------------------------------------------------------------
 # ○ 遷移 : 現実時間
 #--------------------------------------------------------------------------
 def update_daynight_real_time
   time = Time.now
   # 状態遷移判定
   time1 = $game_system.daynight_phase_object[2]
   transit = (time1 <= time.hour)
   if $game_system.previous_daynight_phase_object != nil
     time2 = $game_system.previous_daynight_phase_object[2]
     if time1 < time2
       transit &= (time.hour < time2)
     end
   end

   if transit
     transit_daynight_next
   end
 end
 #--------------------------------------------------------------------------
 # ○ 次の状態へ遷移
 #     duration : 遷移時間
 #--------------------------------------------------------------------------
 def transit_daynight_next(duration = KGC::DayNight::PHASE_DURATION)
   $game_system.daynight_counter = 0
   $game_system.progress_daynight_phase
   # 日数経過判定
   if $game_system.daynight_phase == KGC::DayNight::PASS_DAY_PHASE
     $game_variables[KGC::DayNight::PASS_DAYS_VARIABLE] += 1
   end
   # 色調切り替え
   start_tone_change($game_system.daynight_phase_object[1], duration)
   @daynight_tone_changed = true
 end
 #--------------------------------------------------------------------------
 # ○ デフォルトの状態(0, 0, 0)に戻す
 #     duration : 遷移時間
 #--------------------------------------------------------------------------
 def set_daynight_default(duration)
   start_tone_change(DEFAULT_TONE, duration)
 end
 #--------------------------------------------------------------------------
 # ○ 現在のフェーズを復元
 #     duration : 遷移時間
 #--------------------------------------------------------------------------
 def restore_daynight_phase(duration)
   start_tone_change($game_system.daynight_phase_object[1], duration)
   @daynight_tone_changed = true
 end
end

#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

#==============================================================================
# ■ Game_Map
#==============================================================================

class Game_Map
 #--------------------------------------------------------------------------
 # ● セットアップ
 #     map_id : マップ ID
 #--------------------------------------------------------------------------
 alias setup_KGC_DayNight setup
 def setup(map_id)
   setup_KGC_DayNight(map_id)

   @screen.apply_daynight
 end
 #--------------------------------------------------------------------------
 # ○ 昼夜切り替えを停止するか
 #--------------------------------------------------------------------------
 def daynight_stop?
   info = $data_mapinfos[map_id]
   return false if info == nil
   return (info.daynight_stop || info.daynight_void)
 end
 #--------------------------------------------------------------------------
 # ○ 昼夜切り替えが無効か
 #--------------------------------------------------------------------------
 def daynight_void?
   info = $data_mapinfos[map_id]
   return false if info == nil
   return info.daynight_void
 end
 #--------------------------------------------------------------------------
 # ● エンカウントリストの取得
 #--------------------------------------------------------------------------
 alias encounter_list_KGC_DayNight encounter_list
 def encounter_list
   list = encounter_list_KGC_DayNight.clone

   # 出現条件判定
   list.each_index { |i|
     list[i] = nil unless KGC::DayNight.troop_appear?($data_troops[list[i]])
   }
   return list.compact
 end
end

#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

#==============================================================================
# ■ Game_Character
#==============================================================================

class Game_Character
 #--------------------------------------------------------------------------
 # ○ 発光するか
 #--------------------------------------------------------------------------
 def luminous?
   return false
 end
end

#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

#==============================================================================
# ■ Game_Event
#==============================================================================

class Game_Event < Game_Character
 #--------------------------------------------------------------------------
 # ○ 発光するか
 #--------------------------------------------------------------------------
 def luminous?
   return (@event.name =~ KGC::DayNight::Regexp::Event::LUMINOUS)
 end
end

#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

#==============================================================================
# ■ Spriteset_Map
#==============================================================================

class Spriteset_Map
 #--------------------------------------------------------------------------
 # ● ビューポートの作成
 #--------------------------------------------------------------------------
 alias create_viewports_KGC_DayNight create_viewports
 def create_viewports
   create_viewports_KGC_DayNight

   @viewport1_2 = Viewport.new(0, 0,
     @viewport1.rect.width, @viewport1.rect.height)
 end
 #--------------------------------------------------------------------------
 # ● キャラクタースプライトの作成
 #--------------------------------------------------------------------------
 alias create_characters_KGC_DayNight create_characters
 def create_characters
   create_characters_KGC_DayNight

   # 発光オブジェクトを @viewport1_2 に移動
   @character_sprites.each { |sprite|
     sprite.viewport = @viewport1_2 if sprite.character.luminous?
   }
 end
 #--------------------------------------------------------------------------
 # ● ビューポートの解放
 #--------------------------------------------------------------------------
 alias dispose_viewports_KGC_DayNight dispose_viewports
 def dispose_viewports
   dispose_viewports_KGC_DayNight

   @viewport1_2.dispose
 end
 #--------------------------------------------------------------------------
 # ● ビューポートの更新
 #--------------------------------------------------------------------------
 alias update_viewports_KGC_DayNight update_viewports
 def update_viewports
   update_viewports_KGC_DayNight

   @viewport1_2.ox = $game_map.screen.shake
   @viewport1_2.update
 end
end

#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

#==============================================================================
# ■ Spriteset_Battle
#==============================================================================

if KGC::DayNight::BG_TONE_IN_BATTLE == KGC::DayNight::BATTLE_TONE_BG

class Spriteset_Battle
 #--------------------------------------------------------------------------
 # ● バトルバックスプライトの作成
 #--------------------------------------------------------------------------
 alias create_battleback_KGC_DayNight create_battleback
 def create_battleback
   create_battleback_KGC_DayNight

   if @battleback_sprite.wave_amp == 0
     @battleback_sprite.tone = $game_troop.screen.daynight_tone
   end
 end
 #--------------------------------------------------------------------------
 # ● バトルフロアスプライトの作成
 #--------------------------------------------------------------------------
 alias create_battlefloor_KGC_DayNight create_battlefloor
 def create_battlefloor
   create_battlefloor_KGC_DayNight

   @battlefloor_sprite.tone = $game_troop.screen.daynight_tone
 end
end

end  # <== if KGC::DayNight::BG_TONE_IN_BATTLE == KGC::DayNight::BATTLE_TONE_BG

#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

#==============================================================================
# ■ Scene_Map
#==============================================================================

class Scene_Map < Scene_Base
 #--------------------------------------------------------------------------
 # ● 開始処理
 #--------------------------------------------------------------------------
 alias start_KGC_DayNight start
 def start
   $game_map.screen.clear_daynight

   start_KGC_DayNight
 end
end

But I don't really like it that much compared to ATES and ATES is a lot better.
                   
What it needs to do:
I basically need to it do everything that it already does just remove the clock if it makes things easier. I would also like the to make certain events and/or battles only occur at certain times which I don't remember if ATES does.

Here is the ATES script
Spoiler: ShowHide
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# Advanced Time and Environment System (ATES) by Blizzard
# Version: 0.3
# Type: Autonomous Timeflow and Environment Controller
# Date v0.3: 11.3.2008
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#   
#  This work is protected by the following license:
# #----------------------------------------------------------------------------
# # 
# #  Creative Commons - Attribution-NonCommercial-ShareAlike 3.0 Unported
# #  ( http://creativecommons.org/licenses/by-nc-sa/3.0/ )
# # 
# #  You are free:
# # 
# #  to Share - to copy, distribute and transmit the work
# #  to Remix - to adapt the work
# # 
# #  Under the following conditions:
# # 
# #  Attribution. You must attribute the work in the manner specified by the
# #  author or licensor (but not in any way that suggests that they endorse you
# #  or your use of the work).
# # 
# #  Noncommercial. You may not use this work for commercial purposes.
# # 
# #  Share alike. If you alter, transform, or build upon this work, you may
# #  distribute the resulting work only under the same or similar license to
# #  this one.
# # 
# #  - For any reuse or distribution, you must make clear to others the license
# #    terms of this work. The best way to do this is with a link to this web
# #    page.
# # 
# #  - Any of the above conditions can be waived if you get permission from the
# #    copyright holder.
# # 
# #  - Nothing in this license impairs or restricts the author's moral rights.
# # 
# #----------------------------------------------------------------------------
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# Compatibility:
#
#   99% compatible with SDK v1.x. 80% compatible with SDK 2.x. WILL corrupt old
#   savegames. Can cause incompatibilty issues with DNS-es.
#
#
# Features:
#
#   - complete control over and easy manipulating of time
#   - nice day and night tinting
#   - HUD clock optional
#   - easier to control and more powerful than DDNS
#
#
# IMPORTANT NOTES:
#
# - This system has a working preconfiguration, be aware that a custom setup
#   will need you to understand what each option does, so please read the
#   configuration instructions.
# - Why does this system use switches to determine whether it's day or night?
#   Simple: You can use conditions in enemy attacks to determine whether an
#   attack should be used only at night or only at day.
#
#
# Instructions:
#
# - Explanation:
#
#   This Time System will make your game have daytime and nighttime periods.
#   The screen will be tinted accordingly. You can set up the length of the day
#   Other features are explained below. Please be sure to configure this system
#   appropriately.
#
#
# - Basic manipulation of ATES:
#
#   This system is based upon your eventing. It will work basically if you
#   want, but with a little bit of using the "Call Script" event command you
#   are able to control this system fully. You can call following commands:
#
#     ATES.on
#   Turns ATES on.
#
#     ATES.off
#   Turns ATES off.
#
#     ATES.tint_on
#   Turns ATES's screen tinting on.
#
#     ATES.tint_off
#   Turns ATES's screen tinting off.
#
#     ATES.active?
#   Returns true if ATES is turned on, otherwise false.
#
#     ATES.tinting?
#   Returns true if ATES tinting is turned on, otherwise false.
#
#     ATES.day?
#   Returns true if it's day, otherwise false. Alternatively you can check the
#   assigned switch instead.
#
#     ATES.night?
#   Returns true if it's night, otherwise false. Alternatively you can check
#   the assigned switch instead.
#   
#     ATES.advance(M, H)
#   This will make the time advanced by M minutes and H hours. Any negative
#   value used will cancel the execution of this command.
#   
#     ATES.make_it_day
#   This is a feature from DDNS which allows you to quickly jump to the
#   daytime.
#   
#     ATES.make_it_night
#   This is a feature from DDNS which allows you to quickly jump to the
#   nighttime.
#   
#
# - Enhancement hints:
#
#   If you wish to implement the DDNS further into your game and e.g. allow
#   different behavious of monsters during day and night, you only need to
#   check the the state of the appropriate switch. e.g. If NSWITCH is turned
#   on inflict "Sleep" on one enemy.
#
#
# Additional info:
#
#   The daytime and nighttime tintings were tested appropriately and optimal
#   tinting is being used.
#   Keep in mind that ATES is initially turned off, you need to turn it on by
#   using the ATES.on and ATES.tint_on commands together.
#
#
# If you find any bugs, please report them here:
# http://forum.chaos-project.com
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=

module ATES
 
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# START Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  # switch ID of the "day" switch
  DSWITCH = 51
  # switch ID of the "night" switch
  NSWITCH = 52
  # length of a day in seconds in-game, can't be less than 36, is being
  # quantized into intervals of 36 seconds
  LENGTH = 360
  # how much time is it when the "day" starts
  DAY_START = 8
  # how much time is it when the "night" starts
  NIGHT_START = 20
  # makes the screen brighter during the day
  OVERLIGHTING = true
  # makes the screen darker during the night, not recommended
  OVERDARKENING = false
  # display HUD clock
  SHOW_CLOCK = true
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# END Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
 
  #============================================================================
  # ATES::Time
  #============================================================================
 
  class Time
   
    attr_accessor :min
    attr_accessor :hour
   
    def initialize(m, h)
      @min, @hour = m, h
    end
   
  end
 
  def self.on
    $game_system.ates.active = true
    return true
  end
 
  def self.off
    $game_system.ates.active = false
    return true
  end
 
  def self.tint_on
    $game_system.ates.tinting = true
    return true
  end
 
  def self.tint_off
    $game_system.ates.tinting = false
    return true
  end
 
  def self.active?
    return $game_system.ates.active
  end
 
  def self.tinting?
    return $game_system.ates.tinting
  end
 
  def self.day?
    return ($game_system.ates.time.hour.between?(DAY_START, NIGHT_START - 1))
  end
 
  def self.night?
    return (!self.day?)
  end
 
  def self.make_it_day
    $game_system.ates.time.hour = DAY_START
    $game_system.ates.time.min = 0
    return true
  end
 
  def self.make_it_night
    $game_system.ates.time.hour = NIGHT_START
    $game_system.ates.time.min = 0
    return true
  end
 
  def self.day_start
    return DAY_START
  end
 
  def self.night_start
    return NIGHT_START
  end
 
  def self.advance(m, h)
    return false if [m, h].any? {|i| i < 0}
    h += ($game_system.ates.time.min + m) / 60
    $game_system.ates.time.min = ($game_system.ates.time.min + m) % 60
    $game_system.ates.time.hour = ($game_system.ates.time.hour + h) % 24
    return true
  end
 
end

if ATES::DAY_START > ATES::NIGHT_START
  raise 'ATEScfgError: A night can\'t start earlier than a day.'
elsif ATES::LENGTH < 36
  raise 'ATEScfgError: A day\'s length must be equal to or greater than 36 seconds!'
end

#==============================================================================
# Game_System
#==============================================================================

class Game_System
 
  attr_accessor :ates
  attr_accessor :show_clock
 
  alias init_ates_later initialize
  def initialize
    init_ates_later
    @ates = Game_ATES.new
    @show_clock = ATES::SHOW_CLOCK
  end

end

#==============================================================================
# Game_ATES
#==============================================================================

class Game_ATES
 
  attr_accessor :active
  attr_accessor :tinting
  attr_accessor :time
  attr_accessor :frame_count
 
  def initialize
    @time = ATES::Time.new(0, 0)
    @active = false
    @tinting = false
    @frame_count = 0
  end
 
  def get_tint
    red = 0
    green = 0
    blue = 0
    grey = 0
    if ATES.day?
      red = green = 0
      day = ATES.day_start
      night = ATES.night_start
      ratio = ((@time.hour-day)*60+@time.min) * 255 / (60*(night-day))
      if ratio >= 224
        red = (232-ratio)*4
        green = (208-ratio)*2
      elsif ratio >= 192
        red = ratio-192
        green = 192-ratio
      elsif ATES::OVERLIGHTING
        if ratio >= 160
          red = green = blue = 192-ratio
        elsif ratio >= 96
          red = green = blue = 32
        elsif ratio >= 64
          red = green = blue = ratio-64
        end
      end
    else
      red = green = -96
      day = ATES.day_start
      night = ATES.night_start
      hour = (@time.hour >= night ? @time.hour : @time.hour+24)
      ratio = ((hour-night)*60+@time.min) * 255 / (60*(day+24-night))
      if ratio >= 224
        red = (ratio-256)*2
        green = (ratio-256)*2
        blue = 255-ratio
      elsif ratio >= 192
        red = ratio-288
        green = ratio-288
        blue = ratio-192
      elsif ATES::OVERDARKENING
        if ratio >= 160
          red = ratio-288
          green = ratio-288
          blue = ratio-192
        elsif ratio >= 96
          red = -128
          green = -128
          blue = -32
        elsif ratio >= 64
          red = -32-ratio
          green = -32-ratio
          blue = 64-ratio
        end
      end
    end
    return Tone.new(red, green, blue, grey)
  end
 
  def update
    if @active
      @frame_count += 1
      ATES.advance(1, 0) if @frame_count % (ATES::LENGTH / 36) == 0
    end
    if ATES.day?
      $game_map.need_refresh = true if $game_switches[ATES::NSWITCH]
      $game_switches[ATES::DSWITCH] = true
      $game_switches[ATES::NSWITCH] = false
    else
      $game_map.need_refresh = true if $game_switches[ATES::DSWITCH]
      $game_switches[ATES::NSWITCH] = true
      $game_switches[ATES::DSWITCH] = false
    end
    $game_screen.start_tone_change(get_tint, 0) if @tinting
  end
 
end

#==============================================================================
# Bitmap
#==============================================================================

class Bitmap

  if $tons_version == nil || $tons_version < 1.6
    alias draw_text_shaded_later draw_text
  end
  def draw_text_full(x2, y2, w2 = 0, h2 = 0, text2 = '', a2 = 0)
    if x2.is_a?(Rect)
      x, y, w, h, text, a = x2.x, x2.y, x2.width, x2.height, y2, w2
    else
      x, y, w, h, text, a = x2, y2, w2, h2, text2, a2
    end
    save_color = self.font.color.clone
    self.font.color = Color.new(0, 0, 0)
    [x-1, x+1].each {|xx| [y-1, y+1].each {|yy|
            draw_text_shaded_later(xx, yy, w, h, text, a)}}
    self.font.color = save_color
    draw_text_shaded_later(x, y, w, h, text, a)
  end
 
end

#==============================================================================
# Clock
#==============================================================================

class Clock < Sprite
 
  def initialize
    super
    self.x, self.y, self.z = 480, 8, 5000
    self.bitmap = Bitmap.new(128, 32)
    if $fontface != nil
      self.bitmap.font.name = $fontface
    elsif $defaultfonttype != nil
      self.bitmap.font.name = $defaultfonttype
    end
    self.bitmap.font.size = 26
    @odd = 0
    draw if $game_system.ates.active
  end
 
  def draw
    self.bitmap.clear
    hours = $game_system.ates.time.hour
    minutes = sprintf('%02d', $game_system.ates.time.min)
    if @odd % 2 == 0
      self.bitmap.draw_text_full(0, 0, 128, 32, "#{hours} #{minutes}", 2)
    else
      self.bitmap.draw_text_full(0, 0, 128, 32, "#{hours}:#{minutes}", 2)
    end
    @odd = (@odd + 1) % 2
  end
   
end

#==============================================================================
# Scene_Map
#==============================================================================

class Scene_Map
 
  alias main_ates_later main
  def main
    @clock = Clock.new if $game_system.show_clock
    main_ates_later
    @clock.dispose unless @clock == nil
  end
 
  alias update_ates_later update
  def update
    $game_system.ates.update
    update_ates_later
    @clock.draw if @clock != nil && $game_system.ates.frame_count % 40 == 0
  end
 
  alias transfer_player_ates_later transfer_player
  def transfer_player
    if ATES.active?
      $game_screen.start_tone_change(Tone.new(0, 0, 0, 0), 0) unless ATES.tinting?
    end
    transfer_player_ates_later
  end
 
end


If someone can do this then I would extremely greatful :) :)
2
Script Requests / Minimap for XP
April 11, 2009, 04:15:06 am
I would like the minimap from Blizz ABS but without using Blizz ABS I asked Blizzard how he did it and he said it's just like the minimap on Tons of addons but better looking. So I was wondering if you could make me something every similar to the Blizz ABS minimap.
I'm using RPG Maker XP
Here are some images of the Blizz ABS minimap from The chronicals of Sir Lag-a-lot
Spoiler: ShowHide

Now I want there to be some distinction between different types of events like save, player, teleport, random people you can talk to and if I want there will be the occasional enemy that you can see. I also want the ability to change these colours at will.

Here is the script section from Tons if you need to look at it (take in mind that it needs all of Tons to work).
]#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# Dynamic Passability Minimap by Blizzard
# Version: 1.01b
# Type: Game Playability Improvement
# Date: 7.2.2007
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# Compatibility:
#
#   95% compatible with SDK v1.x. 60% compatible with SDK v2.x. This add-on
#   NEEDS "Quick Passability Test" by Blizzard. WILL corrupt your old
#   savegames. Might not work with special map add-ons. Does NOT work with
#   pixel-movement without changing the code.
#
#
# Why this minimap script better is than any other (aka features):
#
#   - simple display to avoid lag
#   - custom size, position and opacity, changeable even during the game
#   - no bitmaps, no pictures to import, only plain script
#
#
# Explanation:
#
#   This add-on will draw a real-time minimap on the specified X and Y
#   coordinate on your screen. It will show the player, events that do NOT have
#   a comment in their code that says "no_minimap", that are not parallel
#   process and that are not auto-start and that are not erased yet. Events
#   with a teleport/transfer player command will be shown in a different color.
#   Any event with and comment with "special" in their code will be also
#   displayed differently. Blizz-ABS disables this add-on automatically and
#   uses the more enhanced built-in Blizz-ABS Minimap.
#
#
# Instructions:
#
#   You can trigger the minimap visible/invisible with F5 during the game.
#   Set up the starting configuration below. The colors follow a template of:
#
#     WHAT_COLOR = Color.new(R, G, B)
#
#   R - red
#   G - green
#   B - blue
#
#   Change the colors of the dots on the map as you prefer it.
#
#   PLAYER_COLOR    - the player on the minimap
#   EVENT_COLOR     - any event on the minimap that is not erased, is not
#                     auto-start, is not parallel process and does not have a
#                     comment in its code with the word "no_minimap"
#   TELEPORT_COLOR  - any event like the one above, but that has a teleport/
#                     transfer_player command
#   SPECIAL_COLOR   - any event with a comment with the word "special"
#   MINIMAP_X       - default X of the minimap on the screen
#   MINIMAP_Y       - default Y of the minimap on the screen
#   MINIMAP_WIDTH   - default maximal allowed width of the minimap
#   MINIMAP_HEIGHT  - default maximal allowed height of the minimap
#   MINIMAP_OPACITY - default opacity of the minimap on the screen
#
#   You have the possibility to change the minimap's size, coordinates and
#   opacity during the game process. The command you need to type in into a
#   "Call Script" command window are:
#
#     $game_system.mini_coos(X, Y)
#     $game_system.mini_size(W, H)
#     $game_system.mini_opaq(A)
#
#   X - new X
#   Y - new Y
#   W - new width
#   H - new height
#   A - new opacity
#
#   Any changes will be applied instantly. Note that you don't need to use ALL
#   commands.
#
#
# Note:
#
#   Changing X, Y and opacity during the game will result in just moving the
#   sprite. The minimap will not work if the maximal allowed size is smaller
#   than the map size. (i.e. if your minimap is 160x120, maps like 170x130,
#   180x15 or 20x140 will not work.)
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=

#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# Start Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

PLAYER_COLOR = Color.new(0, 255, 0)
EVENT_COLOR = Color.new(0, 128, 255)
TELEPORT_COLOR = Color.new(255, 255, 0)
SPECIAL_COLOR = Color.new(255, 0, 0)
MINIMAP_X = 0
MINIMAP_Y = 0
MINIMAP_WIDTH = 160
MINIMAP_HEIGHT = 160
MINIMAP_OPACITY = 96

#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# End Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

if $quick_pass != true
  p 'Attention! Minimap is missing a vital add-on! Application will now close!'
  exit
end

#==============================================================================
# Game_System
#==============================================================================

class Game_System
 
  attr_reader   :minimap_x
  attr_reader   :minimap_y
  attr_reader   :minimap_w
  attr_reader   :minimap_h
  attr_reader   :minimap_a
  attr_accessor :minimap_visible
 
  alias init_minimap_later initialize
  def initialize
    init_minimap_later
    @minimap_visible = true
    @minimap_x = [[MINIMAP_X, 0].max, 640].min
    @minimap_y = [[MINIMAP_Y, 0].max, 480].min
    @minimap_w = [[MINIMAP_WIDTH, 0].max, 640].min
    @minimap_h = [[MINIMAP_HEIGHT, 0].max, 480].min
    @minimap_a = [[MINIMAP_OPACITY, 0].max, 255].min
  end
 
  def mini_coos(x, y)
    @minimap_x, @minimap_y = [[x, 0].max, 640].min, [[y, 0].max, 480].min
  end
 
  def mini_size(w, h)
    @minimap_w, @minimap_h = [[w, 0].max, 640].min, [[h, 0].max, 480].min
    $game_map.setup_passability_net
  end
 
  def mini_opaq(a)
    @minimap_a = [[a, 0].max, 255].min
  end
 
end

#==============================================================================
# Game_Event
#==============================================================================

class Game_Event
 
  attr_reader :erased
 
  def conditions
    @event.pages.reverse.each {|page|
        c = page.condition
        next if c.switch1_valid && !$game_switches[c.switch1_id]
        next if c.switch2_valid && !$game_switches[c.switch2_id]
        if c.variable_valid
          next if $game_variables[c.variable_id] < c.variable_value
        end
        if c.self_switch_valid
          key = [@map_id, @event.id, c.self_switch_ch]
          next if $game_self_switches[key] != true
        end
        return true}
    return false
  end
 
end
 
#==============================================================================
# Minimap
#==============================================================================

class Minimap < RPG::Sprite
 
  def initialize(viewport = nil)
    super
    self.z = 10100
    create_minimap
  end
 
  def create_minimap
    coos = $game_map.passables
    @w, @h = $game_system.minimap_w, $game_system.minimap_h
    s = [@w / $game_map.width, @h / $game_map.height]
    @size = (s[0] > s[1] ? s[1] : s[0])
    if @size > 0
      self.bitmap = Bitmap.new(@size*$game_map.width, @size*$game_map.height)
      self.bitmap.fill_rect(0, 0, @w, @h, Color.new(0, 0, 0))
      color = Color.new(128, 128, 128)
      coos.each {|coo|
          self.bitmap.fill_rect(coo[0]*@size, coo[1]*@size, @size, @size, color)}
      @events = get_events
      create_sevents
      update
    else
      self.dispose
    end
  end
 
  def update
    super
    ev = get_events
    if ev != @events
      @events = ev
      destroy_sevents
      create_sevents
    end
    self.x, self.y = $game_system.minimap_x, $game_system.minimap_y
    self.opacity = $game_system.minimap_a
    @sevents.each_index {|i|
        @sevents[i].x = @events[i].x * @size + self.x
        @sevents[i].y = @events[i].y * @size + self.y
        @sevents[i].opacity = $game_system.minimap_a}
    if @w != $game_system.minimap_w || @h != $game_system.minimap_h
      self.bitmap.dispose
      destroy_sevents
      create_minimap
    end
  end
 
  def create_sevents
    @sevents = []
    @events.each_index {|i|
        sprite = RPG::Sprite.new
        sprite.bitmap = Bitmap.new(@size, @size)
        if @events[i].is_a?(Game_Player)
          color = PLAYER_COLOR
        elsif event_comment(@events[i], 'special')
          color = SPECIAL_COLOR
        elsif @events[i].list != nil && @events[i].list.any? {|j| j.code == 201}
          color = TELEPORT_COLOR
        else
          color = EVENT_COLOR
        end
        sprite.bitmap.fill_rect(0, 0, @size, @size, color)
        sprite.z = 10200
        @sevents.push(sprite)}
  end
   
  def destroy_sevents
    @sevents.each {|i| i.dispose}
    @sevents = nil
  end
 
  def get_events
    events = [$game_player]
    $game_map.events.each_value {|event|
        if !event.erased && ![3, 4].include?(event.trigger) &&
            !event_comment(event, 'no_minimap') && event.conditions
          events.push(event)
        end}
    return events
  end
 
  def event_comment(event, comment)
    return false unless event.list.is_a?(Array)
    return (event.list.any? {|c| c.code == 108 && c.parameters[0] == comment})
  end
 
  def dispose
    destroy_sevents if @sevents != nil
    super
  end
 
end

#==============================================================================
# Scene_Map
#==============================================================================

class Scene_Map
 
  alias main_minimap_later main
  def main
    @minimap = Minimap.new if $game_system.minimap_visible
    main_minimap_later
    @minimap.dispose if @minimap != nil
  end
 
  alias upd_minimap_later update
  def update
    upd_minimap_later
    return if $BlizzABS && BlizzABS::VERSION >= 1.20
    if $game_system.MINIMAP
      if @minimap != nil
        if Input.trigger?(Input::F5)
          @minimap.dispose
          @minimap = nil
          $game_system.minimap_visible = false
        else
          @minimap.update
        end
      elsif Input.trigger?(Input::F5)
        @minimap = Minimap.new
        if @minimap.disposed?
          $game_system.minimap_visible = false
          @minimap = nil
        else
          $game_system.minimap_visible = true
        end
      end
    end
  end
 
  alias transfer_player_minimap_later transfer_player
  def transfer_player
    if $game_system.minimap_visible
      @minimap.dispose
      @minimap = nil
    end
    transfer_player_minimap_later
    @minimap = Minimap.new if $game_system.minimap_visible
    if @minimap != nil && @minimap.disposed?
      @minimap = nil
      $game_system.minimap_visible = false
    end
  end
 
end
3
Script Requests / Blizz ABS
April 05, 2009, 02:21:16 am
Hi is there any way to use the minimap that comes with Blizz ABS seperatly without using Blizz ABS.
4
General Discussion / Blizzard how did you do it?????
January 27, 2009, 08:11:23 pm
Hey Blizzard I just played The Legend of Lexima 4 demo and it is the best thing ever. But what I want to know is how you created the credit thing at the start before going onto the title screen. And what other scripts do you use??

Your game is the best I've seen. :) :) :) :)
5
Script Requests / [Resolved]Help can't find any
January 26, 2009, 11:40:48 pm
I want to know If the are any scripts that change this.

Spoiler: ShowHide


If someone has scripts that can change the way the battle ending looks thank you.
6
Resource Requests / Vampires and Werewolfs
January 23, 2009, 10:22:29 pm
Hi I've come up with an add-on for my game and I want there to be a war between Vampires and Werewolfs going on. You just happen to become apart of that war. So I need lots of Vampire and Werewolf character sets and Battlers. Along with a dark castle tileset exterior and interior and a Dark partly destroyed town exterior and interior.

Ok I'm using the default battle system but I have Blizzard Add-ons affecting it and El Conducter's enemy hp/sp bars aswell.

I have this and I need a battler for it.
Spoiler: ShowHide

The battler for this character set that I already have needs to be around 466 x 256 maybe a bit wider for the wings.



One of the werewolf character sets needs to be 256 x 256 and look more big and ferocious looking. And the Battler to go with it needs to be 394 x 320 and needs to look ferocious and like it's been in a few battles.

As for the rest of them the vampire character sets need to be somewhere between 192 x 192 and 444 x 248 with the battlers between 138 x 198 and 364 x 256. The werewolf character sets need to be somewhere between 192 x 192 and 256 x 256 with the battlers between 148 x 198 and 285 x 256.

If anyone can help I will be entirely greatful. Thank you
7
Resource Requests / drunk guys
January 12, 2009, 07:07:34 am
I need a few different charsets of some drunk people (bar drunk people).

Thanx
8
Resource Requests / [Resolved]Can someone do this?
January 11, 2009, 07:20:45 am
I need the person removed from this charset so that it is just the anvil.

Spoiler: ShowHide


Can someone make charsets of gold, silver and bronze bars that look like the gold bars in the defualt castle prison tileset?

thanx if you can.
9
Resource Requests / [RESOLVED]I need a tileset for XP
January 10, 2009, 02:01:19 am
Hi i need a Black Smith tileset for my game and i can't find one.

I also need a charset for a Black Smith to go with it.

Thank you
10
Resource Requests / I need battlers 4 these char sets
January 07, 2009, 04:21:47 am
I need battlers for my game of these two Archers.

Spoiler: ShowHide


Spoiler: ShowHide

Can you put a cape on this one


If you can make battlers for these two i thank you.