[Résolu] Compatibilité entre le Jet's Time Système et le Yanfly Engine Zealous (script)
Auteur
Message
Al22
Maire Lv.9
Age : 29 Inscrit le : 06/06/2011 Messages : 373
Sujet: [Résolu] Compatibilité entre le Jet's Time Système et le Yanfly Engine Zealous (script) Jeu 2 Aoû 2012 - 22:46
Bonjour j'aurais aimé savoir si il y avait un moyen de rendre ces deux scripts compatible. Ou si quelqu'un connait un script de battle ground animé compatible avec le Jet's Time.
Je m'explique je voudrais qu'en fonction du temps/météo donné par le Jet's Time script le battle ground change.
Voici les deux scripts :
Spoiler:
Code:
#=============================================================================== # # Yanfly Engine Zealous - Variable Backdrops # Last Date Updated: 2010.02.07 # Level: Normal # # One of the greatest things to come out of RPG Maker 2003 that didn't appear in # any of its successors was moving backdrops during battle. There was a front # layer and then a back layer and it broke the monotony of a static background. # This script lets you recreate all of that with ease and control it with ease. # Just change a variable value inside the event editor and you'll receive the # listed backdrop found in the hash within this script. # # Also now, when a backdrop variable changes during battle, its graphic will # update and show the newer backdrop. This allows for interesting battles where # scenes are constantly shifting and whatnot. # #=============================================================================== # Updates # ----------------------------------------------------------------------------- # o 2010.02.07 - Started Script and Finished. #=============================================================================== # Instructions # ----------------------------------------------------------------------------- # To install this script, open up your script editor and copy/paste this script # to an open slot below ▼ Materials but above ▼ Main. Remember to save. # # - Download Backdrops from Pockethouse.com and unzip it to your Graphics folder # into your "Parallaxes" folder. # - Bind BATTLE_SHADOW_SWITCH to a switch. By default, it's 60. # - Bind the following to variables # VARIABLE_MIST_OPACITY - Default 56 - Adjusts the mist opacity. # VARIABLE_MIST_IMAGE - Default 57 - Sets the fog that covers enemies. # VARIABLE_FRONT_IMAGE - Default 58 - Front background layer. # VARIABLE_MIDDLE_IMAGE - Default 59 - Middle background layer. # VARIABLE_BACK_IMAGE - Default 60 - Back background layer. # # Change the variables in your event editor to reflect the backdrop you want to # see in battle. Toggle the BATTLE_SHADOW_SWITCH switch if you want to hide/show # the floor shadow inbattle. Adjust the hashes down below if you want to add # more backdrops to your game. # #=============================================================================== # Compatibility # ----------------------------------------------------------------------------- # - Works With: Nearly everything that doesn't affect backdrops. # ----------------------------------------------------------------------------- # Note: This script may not work with former Yanfly Engine ReDux scripts. # Use Yanfly Engine Zealous scripts to work with this if available. #===============================================================================
$imported = {} if $imported == nil $imported["VariableBackdrops"] = true
module YEZ module BACKDROP
# This switch enables and disables the ground battle shadow behind enemies. # If the switch is on, the battle shadow appears. If the switch is off, # it will disappear. BATTLE_SHADOW_SWITCH = 60
# These variables determine the individual backdrops adjusted for their # individual layers. There's four images that can be shown at once. VARIABLE_MIST_OPACITY = 56 VARIABLE_MIST_IMAGE = 57 VARIABLE_FRONT_IMAGE = 58 VARIABLE_MIDDLE_IMAGE = 59 VARIABLE_BACK_IMAGE = 60
# This will let you set how you would like your backdrops to appear when # you start a new game. In the order of Battle Shadow, Mist Opacity, Mist # Layer, Front Layer, Middle Layer, and Back Layer. STARTING_BACKDROPS = [true, 0, 0, 101, 200, 300]
# This will adjust how you would like the backdrops to appear when battle # testing. Same ordering as above. BTEST_BACKDROPS = [false, 0, 0, 101, 200, 300]
end # BACKDROP end # YEZ
#=============================================================================== # Editting anything past this point may potentially result in causing computer # damage, incontinence, explosion of user's head, coma, death, and/or halitosis. # Therefore, edit at your own risk. #===============================================================================
#-------------------------------------------------------------------------- # alias method: command_121 switches #-------------------------------------------------------------------------- alias command_121_vb command_121 unless $@ def command_121 result = command_121_vb if $game_temp.in_battle and $scene.is_a?(Scene_Battle) if @params[0] == YEZ::BACKDROP::BATTLE_SHADOW_SWITCH $scene.spriteset.create_battlefloor end end return result end
#-------------------------------------------------------------------------- # alias method: command_122 variables #-------------------------------------------------------------------------- alias command_122_vb command_122 unless $@ def command_122 result = command_122_vb if $game_temp.in_battle and $scene.is_a?(Scene_Battle) n = $game_variables[@params[0]] case @params[0] when YEZ::BACKDROP::VARIABLE_MIST_IMAGE $scene.spriteset.create_backdrop(n, nil, nil, nil) when YEZ::BACKDROP::VARIABLE_FRONT_IMAGE $scene.spriteset.create_backdrop(nil, n, nil, nil) when YEZ::BACKDROP::VARIABLE_MIDDLE_IMAGE $scene.spriteset.create_backdrop(nil, nil, n, nil) when YEZ::BACKDROP::VARIABLE_BACK_IMAGE $scene.spriteset.create_backdrop(nil, nil, nil, n) end end return result end
#-------------------------------------------------------------------------- # alias method: create_battleback #-------------------------------------------------------------------------- alias create_battleback_vb create_battleback unless $@ def create_battleback new_backdrop = false v0 = $game_variables[YEZ::BACKDROP::VARIABLE_MIST_IMAGE] v1 = $game_variables[YEZ::BACKDROP::VARIABLE_FRONT_IMAGE] v2 = $game_variables[YEZ::BACKDROP::VARIABLE_MIDDLE_IMAGE] v3 = $game_variables[YEZ::BACKDROP::VARIABLE_BACK_IMAGE] new_backdrop = true if YEZ::BACKDROP::BACKDROP_HASH.include?(v1) new_backdrop = true if YEZ::BACKDROP::BACKDROP_HASH.include?(v2) new_backdrop = true if YEZ::BACKDROP::BACKDROP_HASH.include?(v3) v0 = 0 unless YEZ::BACKDROP::BACKDROP_HASH.include?(v0) v1 = 0 unless YEZ::BACKDROP::BACKDROP_HASH.include?(v1) v2 = 0 unless YEZ::BACKDROP::BACKDROP_HASH.include?(v2) v3 = 0 unless YEZ::BACKDROP::BACKDROP_HASH.include?(v3) if new_backdrop create_backdrop(v0, v1, v2, v3) else create_battleback_vb end end
#-------------------------------------------------------------------------- # alias method: create_battlefloor #-------------------------------------------------------------------------- alias create_battlefloor_vb create_battlefloor unless $@ def create_battlefloor @battlefloor_sprite.dispose if @battlefloor_sprite != nil if $game_switches[YEZ::BACKDROP::BATTLE_SHADOW_SWITCH] create_battlefloor_vb else @battlefloor_sprite = Sprite.new(@viewport1) end end
#-------------------------------------------------------------------------- # new method: create_backdrop #-------------------------------------------------------------------------- def create_backdrop(v0 = nil, v1 = nil, v2 = nil, v3 = nil) @backdrop_data = {} if @backdrop_data == nil @backdrop_counter = {} if @backdrop_counter == nil if v3 != nil and v3 != 0 array = YEZ::BACKDROP::BACKDROP_HASH[v3] @backdrop_counter[:b3_x] = 0 @backdrop_counter[:b3_y] = 0 @backdrop_data[:b3_wx] = array[0] @backdrop_data[:b3_wy] = array[1] @backdrop_data[:b3_ox] = array[2] @backdrop_data[:b3_oy] = array[2] @battleback3_sprite.dispose if @battleback3_sprite != nil @battleback3_sprite = Plane.new @battleback3_sprite.bitmap = Cache.parallax(array[4]) @battleback3_sprite.z = -100 elsif v3 == 0 @battleback3_sprite.dispose if @battleback3_sprite != nil @battleback3_sprite = nil end if v2 != nil and v2 != 0 array = YEZ::BACKDROP::BACKDROP_HASH[v2] @backdrop_counter[:b2_x] = 0 @backdrop_counter[:b2_y] = 0 @backdrop_data[:b2_wx] = array[0] @backdrop_data[:b2_wy] = array[1] @backdrop_data[:b2_ox] = array[2] @backdrop_data[:b2_oy] = array[2] @battleback2_sprite.dispose if @battleback2_sprite != nil @battleback2_sprite = Plane.new @battleback2_sprite.bitmap = Cache.parallax(array[4]) @battleback2_sprite.z = -99 elsif v2 == 0 @battleback2_sprite.dispose if @battleback2_sprite != nil @battleback2_sprite = nil end if v1 != nil and v1 != 0 array = YEZ::BACKDROP::BACKDROP_HASH[v1] @backdrop_counter[:b1_x] = 0 @backdrop_counter[:b1_y] = 0 @backdrop_data[:b1_wx] = array[0] @backdrop_data[:b1_wy] = array[1] @backdrop_data[:b1_ox] = array[2] @backdrop_data[:b1_oy] = array[2] @battleback_sprite.dispose if @battleback_sprite != nil @battleback_sprite = Plane.new @battleback_sprite.bitmap = Cache.parallax(array[4]) @battleback_sprite.z = -98 if @battleback_sprite.bitmap.width > Graphics.width @battleback_sprite.ox = (@battleback_sprite.bitmap.width - Graphics.width)/2 end @battleback_sprite.oy = @battleback_sprite.bitmap.height - Graphics.height elsif v1 == 0 @battleback_sprite = Sprite.new(@viewport1) end if v0 != nil and v0 != 0 array = YEZ::BACKDROP::BACKDROP_HASH[v0] @backdrop_counter[:b0_x] = 0 @backdrop_counter[:b0_y] = 0 @backdrop_data[:b0_wx] = array[0] @backdrop_data[:b0_wy] = array[1] @backdrop_data[:b0_ox] = array[2] @backdrop_data[:b0_oy] = array[2] @battleback0_sprite.dispose if @battleback0_sprite != nil @battleback0_sprite = Plane.new @battleback0_sprite.bitmap = Cache.parallax(array[4]) op = $game_variables[YEZ::BACKDROP::VARIABLE_MIST_OPACITY] op = [[op, 255].min, 0].max @battleback0_sprite.opacity = op elsif v0 == 0 @battleback0_sprite.dispose if @battleback0_sprite != nil @battleback0_sprite = nil end end
#-------------------------------------------------------------------------- # alias method: dispose_battleback_bitmap #-------------------------------------------------------------------------- alias dispose_battleback_bitmap_vb dispose_battleback_bitmap unless $@ def dispose_battleback_bitmap @battleback3_sprite.bitmap.dispose if @battleback3_sprite != nil @battleback2_sprite.bitmap.dispose if @battleback2_sprite != nil dispose_battleback_bitmap_vb @battleback0_sprite.bitmap.dispose if @battleback0_sprite != nil end
#-------------------------------------------------------------------------- # alias method: dispose_battleback #-------------------------------------------------------------------------- alias dispose_battleback_vb dispose_battleback unless $@ def dispose_battleback @battleback3_sprite.dispose if @battleback3_sprite != nil @battleback2_sprite.dispose if @battleback2_sprite != nil dispose_battleback_vb @battleback0_sprite.dispose if @battleback0_sprite != nil end
#-------------------------------------------------------------------------- # alias method: update_battleback #-------------------------------------------------------------------------- alias update_battleback_vb update_battleback unless $@ def update_battleback if @battleback0_sprite != nil and @battleback0_sprite.is_a?(Plane) @backdrop_counter[:b0_x] += 1 if @backdrop_data[:b0_wx] > 0 @backdrop_counter[:b0_y] += 1 if @backdrop_data[:b0_wy] > 0 if @backdrop_counter[:b0_x] > @backdrop_data[:b0_wx] @battleback0_sprite.ox += @backdrop_data[:b0_ox] @backdrop_counter[:b0_x] = 0 end if @backdrop_counter[:b0_y] > @backdrop_data[:b0_wy] @battleback0_sprite.oy += @backdrop_data[:b0_oy] @backdrop_counter[:b0_y] = 0 end end #--- if @battleback_sprite != nil and @battleback_sprite.is_a?(Plane) @backdrop_counter[:b1_x] += 1 if @backdrop_data[:b1_wx] > 0 @backdrop_counter[:b1_y] += 1 if @backdrop_data[:b1_wy] > 0 if @backdrop_counter[:b1_x] > @backdrop_data[:b1_wx] @battleback_sprite.ox += @backdrop_data[:b1_ox] @backdrop_counter[:b1_x] = 0 end if @backdrop_counter[:b1_y] > @backdrop_data[:b1_wy] @battleback_sprite.oy += @backdrop_data[:b1_oy] @backdrop_counter[:b1_y] = 0 end end #--- if @battleback2_sprite != nil and @battleback2_sprite.is_a?(Plane) @backdrop_counter[:b2_x] += 1 if @backdrop_data[:b2_wx] > 0 @backdrop_counter[:b2_y] += 1 if @backdrop_data[:b2_wy] > 0 if @backdrop_counter[:b2_x] > @backdrop_data[:b2_wx] @battleback2_sprite.ox += @backdrop_data[:b2_ox] @backdrop_counter[:b2_x] = 0 end if @backdrop_counter[:b2_y] > @backdrop_data[:b2_wy] @battleback2_sprite.oy += @backdrop_data[:b2_oy] @backdrop_counter[:b2_y] = 0 end end #--- if @battleback3_sprite != nil and @battleback3_sprite.is_a?(Plane) @backdrop_counter[:b3_x] += 1 if @backdrop_data[:b3_wx] > 0 @backdrop_counter[:b3_y] += 1 if @backdrop_data[:b3_wy] > 0 if @backdrop_counter[:b3_x] > @backdrop_data[:b3_wx] @battleback3_sprite.ox += @backdrop_data[:b3_ox] @backdrop_counter[:b3_x] = 0 end if @backdrop_counter[:b3_y] > @backdrop_data[:b3_wy] @battleback3_sprite.oy += @backdrop_data[:b3_oy] @backdrop_counter[:b3_y] = 0 end end #--- return if @battleback_sprite.is_a?(Plane) update_battleback_vb end
#-------------------------------------------------------------------------- # public instance variables #-------------------------------------------------------------------------- attr_accessor :spriteset
end # Scene_Battle
#=============================================================================== # # END OF FILE # #===============================================================================
Le 2e est dans le poste suivant, et si par hasard ma demande est possible sans rien changer pouvez vous m'indiquer comment procéder ? Merci Al22
Dernière édition par Al22 le Jeu 9 Aoû 2012 - 9:49, édité 2 fois
Al22
Maire Lv.9
Age : 29 Inscrit le : 06/06/2011 Messages : 373
Sujet: Re: [Résolu] Compatibilité entre le Jet's Time Système et le Yanfly Engine Zealous (script) Jeu 2 Aoû 2012 - 22:47
Spoiler:
Code:
#=============================================================================== # Time System # By Jet10985 (Jet) # Slight Help by: Mr. Anonymous, Mithran #=============================================================================== # This script is my time system. Time System: A system of tracking in-game "time" # which in-turn contain more systems relating to time. Used for visual effects, # the novelty, and eventing purposes. My Time System: see Time system # see ultimate. # This script has: 68 customization option. #=============================================================================== # 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
#=============================================================================== # BEGIN CONFIGURATION #===============================================================================
# Use computer time or script time? false is script, true is computer. REAL_TIME = false
# This switch will turn the script into a real time script while on. REAL_TIME_SWITCH = 49
# Hour script time will start at. STARTING_HOUR = 2
# Minute script time will start at. STARTING_MINUTE = 59
# Day script time will start at. STARTING_DAY = 1
# Year script time will start at. STARTING_YEAR = 2010
# 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
# This is how many frames it takes for a Script time minute to pass. # 60 frames = 1 Real life second. So 120 would be 2 real life seconds, etc. MINUTE_LENGTH = 120
# Military time or AM/PM time? false is AM/PM, true is military. MILITARY_TIME = true
# Should time only update on the map, and no where else? UPDATE_ONLY_ON_MAP = true
# 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 = true
# 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 = false
# 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 = 61
# This will add compatability with Thomas Edison VX the same as if you were # using KGC's day/night. # Meaning, lights will be on during night and off during day. THOMAS_EDISON_COMPATABILITY = true
# 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.2, 1.2, 1.2, 1.2]
# 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 = {
2 => [0, 3, 10.0], # skill_id => [conditional_id, condition_to_be_met, number to multiply by if met] 3 => [3, "Summer", 17.7] # 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.8, 0.6, 0.7]
#============================================================================= # 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! #=============================================================================
#=============================================================================== # Calendar Configuration (Script time only) #===============================================================================
# These are the months in a 3-4 letter form that will be used. MONTHS = {
0 => ["Jan", 31], # month number => ["Month name", days in month], 1 => ["Feb", 28], # month number => ["Month name", days in month], 2 => ["Mar", 31], # month number => ["Month name", days in month], 3 => ["Apr", 30], 4 => ["May", 31], 5 => ["June", 30], 6 => ["July", 31], 7 => ["Aug", 31], 8 => ["Sept", 30], 9 => ["Oct", 31], 10 => ["Nov", 30], 11 => ["Dec", 31] }
# These are the days in the month in a 3-4 letter form for window space. DAYS = {
0 => "Sun", # day number => day name 1 => "Mon", # day number => day name 2 => "Tues", # day number => day name 3 => "Wed", 4 => "Thu", 5 => "Fri", 6 => "Sat" }
#=============================================================================== # Switches Configuration (Script time and Real time) #===============================================================================
# The switch that will turn on when it is Autumn. AUTUMN_SWITCH = 50
# The switch that will turn on when it is Winter. WINTER_SWITCH = 51
# The switch that will turn on when it is Summer. SUMMER_SWITCH = 52
# The switch that will turn on when it is Spring. SPRING_SWITCH = 53
# The switch that will turn on when it is Raining. RAIN_SWITCH = 54
# The switch that will turn on when it is Snowing. SNOW_SWITCH = 55
# The switch that will turn on when it is Stormy. STORM_SWITCH = 56
# The switch that will turn on when it is Night. NIGHT_SWITCH = 57
# The switch that will turn on when it is Dawn. DAWN_SWITCH = 58
# The switch that will turn on when it is Day. DAY_SWITCH = 59
# The switch that will turn on when it is Dusk. DUSK_SWITCH = 60
#=============================================================================== # Variable Configuration (Script time and Real time) #===============================================================================
# Variable hour will be stored in. HOUR_VARIABLE = 50
# Variable minute will be stored in. MINUTE_VARIABLE = 51
# Variable day will be stored in. DAY_VARIABLE = 52
# Variable month will be stored in. MONTH_VARIABLE = 53
# Variable year will be stored in. YEAR_VARIABLE = 54
#=============================================================================== # Weather Configuration (Script time and Real time) #------------------------------------------------------------------------------- # Seasonal Numbers: # 0 = Winter # 1 = Autumn # 2 = Summer # 3 = Spring #===============================================================================
# Seasons that rain will occur in randomly. RAIN_SEASONS = [0, 1, 3]
# Seasons that snow will occur in randomly. SNOW_SEASONS = []
# Seasons that storms will occur in randomly. STORM_SEASONS = [0, 1, 3]
#=============================================================================== # Season Configuration (Script time only) #===============================================================================
# These months will be in the summer season. SUMMER_MONTHS = [5, 6, 7]
# These months will be in the winter season. WINTER_MONTHS = [11, 0, 1]
# These months will be in the autumn season. AUTUMN_MONTHS = [8, 9, 10]
# These months will be in the spring season. SPRING_MONTHS = [2, 3, 4]
#=============================================================================== # Tint Configuration (Hours config for Script time only, tint for both.) #===============================================================================
# These hours will be considered dusk. DUSK_HOURS = [18, 19, 20, 21]
# These hours will be considered night. NIGHT_HOURS = [22, 23, 24, 1, 2, 3]
# These hours are considered dawn. DAWN_HOURS = [4, 5, 6, 7]
# These hours are considered day. DAY_HOURS = [8, 9, 10, 11, 12, 13, 14, 15, 16, 17]
# This is the tint that will be applied for dusk. DUSK_TINT = Tone.new(17, -51, -102, 0)
# This is the tint that will be applied for night. NIGHT_TINT = Tone.new(-187, -119, -17, 68)
# This is the tint that will be applied for dawn. DAWN_TINT = Tone.new(17, -51, -102, 0)
# This is the tint that will be applied for day. DAY_TINT = Tone.new(0, 0, 0, 0)
# This is the amount of time it takes for tone to change from one to another. FADE_LENGTH = 240
end
#=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #===============================================================================
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 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
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
def write_save_data(file) jet3890_write_save_data(file) Marshal.dump($game_time, file) end
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
Zangther
Maître des Duels
Age : 32 Inscrit le : 29/07/2009 Messages : 7841
Sujet: Re: [Résolu] Compatibilité entre le Jet's Time Système et le Yanfly Engine Zealous (script) Ven 3 Aoû 2012 - 9:06
Il faudrait que tu expliques ce que tu souhaites modifier dans le bacground en fonction du temps. Tu présentes un script complet qui ajoute plusieurs options pour battlebackground.
Donc il faut que tu nous fasse deux trois exemples et l'on pourra t'aider.
Al22
Maire Lv.9
Age : 29 Inscrit le : 06/06/2011 Messages : 373
Sujet: Re: [Résolu] Compatibilité entre le Jet's Time Système et le Yanfly Engine Zealous (script) Ven 3 Aoû 2012 - 9:22
Par exemple on a l'image d'un paysage à l'avant, de nuage se déplaçant en second plan et d'un beau soleil en arrière plan lorsqu'il fait beau. Lorsqu'il pleut le second plan change en pluie et un troisième plan apparait pour faire voir des gros nuages noirs. Le soir l'arrière plan change pour un soleil couchant. La nuit une lune pour arrière plan. etc.
C'est plus compréhensible ?
Zangther
Maître des Duels
Age : 32 Inscrit le : 29/07/2009 Messages : 7841
Sujet: Re: [Résolu] Compatibilité entre le Jet's Time Système et le Yanfly Engine Zealous (script) Mer 8 Aoû 2012 - 9:25
Est ce que tu peux faire une démo avec tout ça ? Genre d'un coté le script de temps de Jet et des combat dont le background est comme tu le souhaites.
Al22
Maire Lv.9
Age : 29 Inscrit le : 06/06/2011 Messages : 373
Sujet: Re: [Résolu] Compatibilité entre le Jet's Time Système et le Yanfly Engine Zealous (script) Mer 8 Aoû 2012 - 20:18
Voila c'est fait Zangther, en espérant que tu puisse m'aider. Démo
Edit : C'est bon j'ai trouvé ^^ En fait il suffisait juste d'ajouter certaines conditions, j'ai juste pas réfléchi Merci quand même Zangther
Contenu sponsorisé
Sujet: Re: [Résolu] Compatibilité entre le Jet's Time Système et le Yanfly Engine Zealous (script)
[Résolu] Compatibilité entre le Jet's Time Système et le Yanfly Engine Zealous (script)