Announcement
New threads (complete scripts) here will go into a moderation queue. You will not see your thread appear when you create it. A moderator will decide if it will be approved or denied.
![]() ![]() |
|
Rating
|
Nov 24 2009, 08:27 PM
Post
#1
|
|
![]() He Who Jets ![]() Type: Coder Alignment: Lawful Neutral |
Jet's Code Snippets Introduction Jet here. These are all of my smaller code snippet from back when I first started, to now. There's 103 in total at the moment. I recently revamped some of them, fixing bugs or making cleaner code. I also added some new ones. I ALSO revamped this topic because it was so damn ugly :P List This is a project which holds all the snippets, THEY ARE NOT ORGANIZED AT ALL
The Snippets Actor Approval Rating: Spoiler: CODE #=============================================================================== # Actor Approval Rating # By Jet10985 (Jet) # Inspired by: Dragon Age Origins #=============================================================================== # This snippet will add a approval system to all your characters. This means # that doing certain actions, determined by you, will add to their approval. # This script has: 7 customization options. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # Game_Actor: initialize # Game_Battler: item_effect # Window_Status: refresh, draw_basic_info #=============================================================================== =begin How to use: To set an item to increase/decrease approval, put this into the item's notebox: <approval ##> ## = how much you want to increase/decrease approval by. Set to a negative number to decrease. To increse/decrease approval, use this in the event "Script..." command: change_approval(actor, amount) actor = actor id you want to change approval of. amount = how much you want to change it by. Use a negative number to subtract. To check approval, you much use slightly more scripting method such as: Equal to: $game_actors[actor].approval_rating == amount Greater than or equal to: $game_actors[actor].approval_rating >= amount Less than or equal to: $game_actors[actor].approval_rating <= amount Greater than: $game_actors[actor].approval_rating > amount Less than: $game_actors[actor].approval_rating < amount actor = actor id you want to check approval of. amount = what the amount of approval you are checking against =end module AARating # Below are configurations to make some approval items exclusive to specific # actors. Follow the pre-given format. You may skip actor ids. EXCLUSIVE_ITEMS = { 1 => 21, # actor id => item id 2 => 22, # actor id => item id 3 => 23 # actor id => item id } # This is the maximum that a player can approve. MAX_APPROVAL = 100 # This is the name of the approval score. NAME_OF_APPROVAL = "Approval" # Do you want to use a gauge, or just words and a number? USE_GAUGE = false # These are what colors the gauge is. Purple by default. APPROVAL_GAUGE_COLOR1 = Color.new(148, 0, 211) APPROVAL_GAUGE_COLOR2 = Color.new(238, 130, 238) # This is the letter that will be shown with the approval gauge. APPROVAL_INITIAL = "A" # This is an array of actors that are excluded from having the gauge displayed # Please note, they still have approval, but it is not shown anywhere. NO_GAUGE_ACTORS = [1, 7, 8] end #=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== class Game_Actor attr_accessor :approval_rating alias jet6832_initialize initialize unless $@ def initialize(*args, &block) jet6832_initialize(*args, &block) @approval_rating = 0 end def approval_rating?(amount) if @approval_rating >= amount return true else return false end end end module RPG class UsableItem def increase_approval if @approval.nil? txt = self.note.gsub(/[\r\n]+/, " ")[/<(?:approval)[ ]*(\d+)>/i].nil? if !txt @approval = $1.to_i else @approval = 0 end end return @approval end end end class Game_Battler alias jet5824_item_effect item_effect unless $@ def item_effect(user, item) jet5824_item_effect(user, item) if AARating::EXCLUSIVE_ITEMS.values.include?(item.id) if AARating::EXCLUSIVE_ITEMS.keys.include?(user.id) if !AARating::EXCLUSIVE_ITEMS[user.id].include?(item.id) return end else return end end if !@skipped user.approval_rating += item.increase_approval if user.approval_rating > AARating::MAX_APPROVAL user.approval_rating = AARating::MAX_APPROVAL elsif user.approval_rating < 0 user.approval_rating = 0 end end end end class Window_Base def draw_actor_approval(actor, x, y, width = 120) draw_actor_approval_gauge(actor, x, y, width) self.contents.font.color = system_color self.contents.draw_text(x, y, 30, WLH, AARating::APPROVAL_INITIAL) self.contents.font.color = normal_color last_font_size = self.contents.font.size xr = x + width if width < 120 self.contents.draw_text(xr - 44, y, 44, WLH, actor.approval_rating, 2) else self.contents.draw_text(xr - 99, y, 44, WLH, actor.approval_rating, 2) self.contents.font.color = normal_color self.contents.draw_text(xr - 55, y, 11, WLH, "/", 2) self.contents.draw_text(xr - 44, y, 44, WLH, AARating::MAX_APPROVAL, 2) end end def draw_actor_approval_gauge(actor, x, y, width = 120) gw = width * actor.approval_rating / AARating::MAX_APPROVAL gc1 = AARating::APPROVAL_GAUGE_COLOR1 gc2 = AARating::APPROVAL_GAUGE_COLOR2 self.contents.fill_rect(x, y + WLH - 8, width, 6, gauge_back_color) self.contents.gradient_fill_rect(x, y + WLH - 8, gw, 6, gc1, gc2) end end class Window_Status alias jet4214_refresh refresh unless $@ def refresh(*args, &block) jet4214_refresh(*args, &block) if AARating::USE_GAUGE && !AARating::NO_GAUGE_ACTORS.include?(@actor.id) self.contents.font.color = system_color self.contents.draw_text(290, 80, 99, 24, "#{AARating::NAME_OF_APPROVAL}:") self.contents.font.color = normal_color self.contents.draw_text(400, 80, 500, 24, @actor.approval_rating) end end alias jet5838_draw_basic_info draw_basic_info unless $@ def draw_basic_info(x, y) jet5838_draw_basic_info(x, y) if AARating::USE_GAUGE && !AARating::NO_GAUGE_ACTORS.include?(@actor.id) draw_actor_approval(@actor, x - 125, y + WLH * 4) end end end class Game_Interpreter def change_approval(actor, amount) $game_party.members[actor].approval_rating += amount if $game_party.members[actor].approval_rating > AARating::MAX_APPROVAL $game_party.members[actor].approval_rating = AARating::MAX_APPROVAL elsif $game_party.members[actor].approval_rating < 0 $game_party.members[actor].approval_rating = 0 end end end Actor Jump Direction Fix: Spoiler: CODE #=============================================================================== # Actor Jump Direction Fix Snippet # By Jet10985 (Jet) #=============================================================================== # This snippet fixes a bug in the default rmvx scripts, where if the player # jumps up or down, their direction would not change accordingly. # This script has: 0 customization options. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # Game_Character: jump #=============================================================================== class Game_Character alias jet8123_jump jump unless $@ def jump(*args, &block) f = args if f[0].abs < f[1].abs f[1] < 0 ? turn_up : turn_down end jet8123_jump(*args, &block) end end Actor Name On Map: Spoiler: CODE #=============================================================================== # Map Actor Name Window Snippet # By Jet10985 (Jet) # Inspired by: Kalikya #=============================================================================== # This snippet will show a window on the map with the first character's name in # it. Not sure what it's useful for, but someone may need it. # This script has: 2 customization options. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # Scene_Map: start, update, terminate #=============================================================================== module MANWin # This is where the window is show on the map. WINDOW_POSITIONS = [0, 100] # This is how transperant the window is. 0 is transperant, 255 is solid. BACK_OPACITY = 0 end #=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== class Window_ActorName < Window_Base def initialize super(MANWin::WINDOW_POSITIONS[0], MANWin::WINDOW_POSITIONS[1], 100, 57) self.opacity = MANWin::BACK_OPACITY refresh end def refresh self.contents.clear self.contents.draw_text(0, 0, 100, 24, $game_party.members[0].name) end def update @mem ||= $game_party.members[0] if @mem != $game_party.members[0] @mem = $game_party.members[0] refresh end end end class Scene_Map alias jet9134_start start unless $@ def start(*args, &block) jet9134_start(*args, &block) @actor_name_window = Window_ActorName.new end alias jet7892_update update unless $@ def update(*args, &block) jet7892_update(*args, &block) @actor_name_window.update end alias jet9813_terminate terminate unless $@ def terminate(*args, &block) @actor_name_window.dispose jet9813_terminate(*args, &block) end end Additional Event Conditions: Spoiler: CODE #=============================================================================== # Additional Event Conditions # By Jet10985 (Jet) #=============================================================================== # This script will give you 2 new event conditions that can be used in # Event Condition "Script..." branches. # This script has: 0 customization option. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # None #=============================================================================== =begin How to use: The first of the new command is face_to_face?(id) To use this command, put it in a "Script..." event conditional branch. This will check if the player/event is facing the event with the script call. Replace id with -1 to check if the player is face to face, or with an event id to check that that event is face to face. The second command is next_to?(id) It's almost the same as above, but it only checks if the 2 figures are next to each other, not if they're facing each other. Replace id with -1 to check if the player is next to, or with an event id to check that that event is next to. =end class Game_Character def face_to_face?(ev_id) begin if next_to?(ev_id) if ev_id == -1 return true if $game_player.direction == 2 && self.direction == 8 return true if $game_player.direction == 4 && self.direction == 6 return true if $game_player.direction == 6 && self.direction == 4 return true if $game_player.direction == 8 && self.direction == 2 else ev = $game_map.events[ev_id] return true if ev.direction == 2 && self.direction == 8 return true if ev.direction == 4 && self.direction == 6 return true if ev.direction == 6 && self.direction == 4 return true if ev.direction == 8 && self.direction == 2 end end rescue p "Invalid event id was provided. Check your script call again." end return false end def next_to?(ev_id) begin ev = ev_id == -1 ? $game_player : $game_map.events[ev_id] x = (self.x - ev.x) y = (self.y - ev.y) return (x - y).abs == 1 rescue p "Invalid event id was provided. Check your script call again." end return false end end class Game_Interpreter def face_to_face?(ev_id) return $game_map.events[@event_id].face_to_face?(ev_id) end def next_to?(ev_id) return $game_map.events[@event_id].next_to?(ev_id) end end Always New Game: Spoiler: CODE #=============================================================================== # Always New Game # By Jet10985 (Jet) #=============================================================================== # This script will make it so the menu will always default to "New Game", even # if there is a save file available. # This script has: 0 customization options. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # Scene_Title: create_command_window #=============================================================================== class Scene_Title alias jet2735_create_command_window create_command_window unless $@ def create_command_window(*args, &block) jet2735_create_command_window(*args, &block) @command_window.index = 0 end end Ambient SE: Spoiler: CODE #=============================================================================== # Ambient SE # By Jet10985 (Jet) #=============================================================================== # This snippet will apply an ambience effect to SE played using the "Play SE" # event command. This means the volume will be lower/higher depending on # the distance between the player and the event. # This script has: 3 customization options. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # Game_Interpreter: command_250 #=============================================================================== =begin How to exclude events from the ambiance effect To give an event exclusion from being ambient, put this comment in the event: NO AMBIENCE =end module AmbientSE # This is how loud SE is by default # 100 is the max DEFAULT_SE_VOLUME = 80 # Turning this switch on will turn off the ambience effect NO_AMBIENCE_SWITCH = 91 # How much of the volume will be lowered for each square # A 1 square distance will be DEFAULT_SE_VOLUME. VOLUME_LOWER_BY_SQUARE = 8 end #=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== class Game_Character def dist_by_grid(ev) x = (self.x - ev.x) y = (self.y - ev.y) return (x - y).abs end end class Game_Event def check_com_ambiance(regexp) return false if @list.nil? or @list.size <= 0 for item in @list if item.code == 108 or item.code == 408 w = item.parameters[0][regexp].nil? ? false : true end break if ![nil, false].include?(w) end if w.nil? w = false end return w end end class Game_Interpreter alias jet1189_command_250 command_250 unless $@ def command_250(*args, &block) event = $game_map.events.values[@event_id] if !event.check_com_ambiance(/NO[ ]*AMBIENCE/i) if !$game_switches[AmbientSE::NO_AMBIENCE_SWITCH] vol = AmbientSE::DEFAULT_SE_VOLUME mult = AmbientSE::VOLUME_LOWER_BY_SQUARE vol -= (event.dist_by_grid($game_player) - 1) * mult @params[0].volume = vol return if @params[0].volume < 0 end end jet1189_command_250(*args, &block) end end Animation By Coordinates: Spoiler: CODE #=============================================================================== # Animation By Coordinates # By Jet10985 (Jet) # Requested By: Despain #=============================================================================== # This snippet will allow you to specify an X/Y for playing an animation on the # map, instead of having to have an event there for it. # This script has: 0 customization options. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # None #=============================================================================== =begin To call an animation, use this in an event "Script..." command: anim_by_coord(x, y, anim_id) x = the x-coordinate y = the y-coordinate anim_id = the database id of the animation =end class Game_Interpreter def anim_by_coord(x, y, anim_id) f = $game_map.map_id g = RPG::Event.new(x, y) e = $game_map.events[$game_map.events.size + 2] = Game_AnimEvent.new(f, g) s = Sprite_Character.new($scene.spriteset.character_sprites[0].viewport, e) e.anim_sprite = s $scene.spriteset.character_sprites.push(s) s.start_animation($data_animations[anim_id]) end end class Game_AnimEvent < Game_Event attr_accessor :anim_sprite def update super if !@anim_sprite.nil? if !@anim_sprite.animation? remove_self end end end def remove_self $game_map.events.each_pair {|k, v| if v == self $game_map.events.delete(k) end } $scene.spriteset.character_sprites.each {|h| if h.character == self $scene.spriteset.character_sprites.delete(h) h.dispose h = nil end } end end class Scene_Map attr_accessor :spriteset end class Spriteset_Map attr_accessor :character_sprites end Automatic KO Recovery: Spoiler: CODE #=============================================================================== # Automatic KO Recovery # By Jet10985 (Jet) # Requested by: Tevak #=============================================================================== # This snippet will allow you have actors automatically recover from a knockout # based on a percentage roll. # This script has: 9 customization options. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # Game_Actor: initialize, do_auto_recovery #=============================================================================== module JetKORecovery # These actors are excluded from recovering by themselves. EXCLUDED_ACTORS = [] # This is the beginning percentage chance of someone recovering BEGINNING_PERCENTAGE = 1 # This is the top percentage chance of an actor recovering. TOP_PERCENTAGE = 16 # This is how much the percentage is increased by every turn. RAISED_PERCENTAGE = 1 # This is the percent of hp the actor will regain when they recover HP_RECOVERY_PERCENTAGE = 13 # Make it so only actors with a state can automatically revive? USE_STATE_TO_REVIVE = false # What state has to be inflicted to allow automatic revival? REVIVE_STATE = 2 # Make it so actors inflicted with a state can NOT automatically revive? NO_REVIVE_STATE = false # What state has to be inflicted to disallow automatic revival? NO_REVIVE_STATE_ID = 3 end #=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== class Game_Actor attr_accessor :ko_recov_perc, :did_recov alias jet1927_initialize initialize unless $@ def initialize(*args, &block) @ko_recov_perc = JetKORecovery::BEGINNING_PERCENTAGE @did_recov = false jet1927_initialize(*args, &block) end def remove_state(id) super(id) if id == 1 && @did_recov @ko_recov_perc = JetKORecovery::BEGINNING_PERCENTAGE end end alias jet1028_do_auto_recovery do_auto_recovery unless $@ def do_auto_recovery(*args, &block) jet1028_do_auto_recovery(*args, &block) if JetKORecovery::NO_REVIVE_STATE return if state?(JetKORecovery::NO_REVIVE_STATE_ID) end if JetKORecovery::USE_STATE_TO_REVIVE return unless state?(JetKORecovery::REVIVE_STATE) end if dead? && !JetKORecovery::EXCLUDED_ACTORS.include?(self.id) f = rand(100) + 1 if f <= @ko_recov_perc @did_recov = true remove_state(1) @did_recov = false @hp = (maxhp / JetKORecovery::HP_RECOVERY_PERCENTAGE.to_f).round.to_i elsif @ko_recov_perc != JetKORecovery::TOP_PERCENTAGE @ko_recov_perc += JetKORecovery::RAISED_PERCENTAGE if @ko_recov_perc > JetKORecovery::TOP_PERCENTAGE @ko_recov_perc = JetKORecovery::TOP_PERCENTAGE end end end end end Base SwitchVariable Value: Spoiler: CODE #=============================================================================== # Base Switch/Variable Value Snippet # By Jet10985 (Jet) #=============================================================================== # This snippet will set certain switches to be on, and certain variables to a # value when a new game is started. # This script has: 0 customization options. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # Game_Switches: initialize # Game_Variables: initialize #=============================================================================== module BaseSwitchVariableValues # These Switches will automatically be turned on BASE_ON_SWITCHES = [1, 2, 3, 4, 5] # These variables will be set to the value given # var_id => value BASE_VARIABLE_VALUES = { 1 => 9, 2 => 6, 3 => 75 } end #=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== class Game_Switches alias jet1038_initialize initialize unless $@ def initialize(*args, &block) jet1038_initialize(*args, &block) for id in BaseSwitchVariableValues::BASE_ON_SWITCHES @data[id] = true end end end class Game_Variables alias jet1038_initialize initialize unless $@ def initialize(*args, &block) jet1038_initialize(*args, &block) BaseSwitchVariableValues::BASE_VARIABLE_VALUES.each_pair {|a, b| @data[a] = b } end end Bitmap To Text: Spoiler: CODE #=============================================================================== # Bitmap To Text (Coder's Tool) # By Jet10985 (Jet) #=============================================================================== # This script will allow you to export a text file with a hash that contains # the pixel colors of a bitmap. # This script has: 0 customization options. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # None #=============================================================================== class Bitmap def to_txt f = File.new("Color Hash #{Dir.glob("Color Hash *").size}.txt", "w+") pic = self hash = {} pic.width.times {|width| hash[width] = [] pic.height.times {|height| hash[width].push(pic.get_pixel(width, height)) } } f.puts "{\r\n" hash.each_pair {|w, c| f.puts "#{w} => [" c.each_with_index {|a, r| f.puts "Color.new#{a}#{r == c.size - 1 ? "]," : ", "}" } } f.puts "}" f.close end end Blue Magic: Spoiler: CODE #=============================================================================== # Blue Magic Snippet # By Jet10985 (Jet) #=============================================================================== # This snippet will allow you to use to create a blue mage-type character. This # means that the character will learn special enemy skills when they are used on # the blue mage. # This script has: 3 customization options. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # Scene_Battle: execute_action_skill #=============================================================================== =begin How To Make Blue Skills: In the database, go to the "Skills Tab". In the bottom-right corner is the note box. Input the following text into the notebox on it's own seperate line: <blue magic> Be sure to include the <> =end module JetBlueMagic # What actors are blue mages? Leave as [] for none. BLUE_ACTORS = [1, 2] # What classes are blue mages? Leave as [] for none. BLUE_CLASSES = [9, 10] # This is the message displayed in battle when an actor learns a skill. # NOTE: The first %s will be replaced with the actor's name. The second # with the skill's name. BATTLE_MESSA = "%s has learned %s!" end #=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== class Game_Actor def blue_mage? return true if JetBlueMagic::BLUE_ACTORS.include?(self.id) return true if JetBlueMagic::BLUE_CLASSES.include?(self.class_id) return false end end class RPG::Skill def blue_magic? @blue ||= !(self.note.gsub("\r\n") {|m| ""}[/<(?:blue magic)>/i].nil?) end end class Scene_Battle alias jet3243_execute_action_skill execute_action_skill unless $@ def execute_action_skill(*args, &block) jet3243_execute_action_skill(*args, &block) unless @active_battler.is_a?(Game_Actor) skill = @active_battler.action.skill targets = @active_battler.action.make_targets for target in targets next if target.nil? next if target.dead? if target.actor? && target.blue_mage? && skill.blue_magic? target.learn_skill(skill.id) unless target.skill_learn?(skill) message = sprintf(JetBlueMagic::BATTLE_MESSA, target.name, skill.name) @message_window.add_instant_text(message) wait_for_message end end end end end Break States: Spoiler: CODE #=============================================================================== # Break States Snippet # By Jet10985 (Jet) # Original Code by: gsxiii #=============================================================================== # This snippet will allow you designate states to be "break" states. This means # that while the character is inflicted with the state, the next hit will kill, # or drain the character's mp to 0. # This script has: 2 customization options. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # Game_Battler: execute_damage #=============================================================================== module BreakStates # Database id's of states that will be HP break states. HP_BREAK_STATE_IDS = [17, 18, 19] # Database id's of states that will be MP break states. MP_BREAK_STATE_IDS = [20, 21, 22] end #=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== class Game_Battler alias jet0088_execute_damage execute_damage unless $@ def execute_damage(*args, &block) jet0088_execute_damage(*args, &block) BreakStates::HP_BREAK_STATE_IDS.each do |i| if @states.include?(i) self.hp = 0 end end BreakStates::MP_BREAK_STATE_IDS.each do |i| if @states.include?(i) self.mp = 0 end end end end Cache Optimization: Spoiler: CODE #=============================================================================== # Cache Optimization # By Jet10985 (Jet) #=============================================================================== # This script will optimize the Cache (Which holds all Bitmaps in-game) to allow # it to operate more efficiently, which can reduce load-times a bit. # This script has: 0 customization options. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # Cache: load_bitmap #=============================================================================== class << Cache alias jet2834_load_bitmap load_bitmap unless $@ def load_bitmap(*args, &block) jet2834_load_bitmap(*args, &block).dup end end Change Actor Options: Spoiler: CODE #=============================================================================== # Change Actor Options Snippet # By Jet10985 (Jet) # Inspired and partially written by: BigEd781 #=============================================================================== # This snippet allows you to change the options of an actor such as auto battle, # super guard, and two swords style. # This script has: No customization options. #=============================================================================== # To change the option use this line of code: # change_trait(actor, option) # trait = the option you want to change. this can be replaced by: # two_swords_style, auto_battle, super_guard, fix_equipment, parmacology # MAKE SURE that you include the "_" in the ones that show it. # option = true or false. True give the actor the trait, false takes it away. # actor = id of actor trait you want to change. remember, it starts at 1. #=============================================================================== # Overwritten Methods: # Game_Actor: two_swords_style, fix_equipment, auto_battle, super_guard, # pharmacology #------------------------------------------------------------------------------- # Aliased methods: # Game_Actor: initialize #=============================================================================== #=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== class Game_Actor attr_accessor :two_swords_style_option attr_accessor :super_guard_option attr_accessor :fix_equipment_option attr_accessor :pharmacology_option attr_accessor :auto_battle_option alias jet3789_initialize initialize unless $@ def initialize(*args, &block) jet3789_initialize(*args, &block) @two_swords_style_option = self.actor.two_swords_style @super_guard_option = self.actor.super_guard @fix_equipment_option = self.actor.fix_equipment @pharmacology_option = self.actor.pharmacology @auto_battle_option = self.actor.auto_battle end def two_swords_style return @two_swords_style_option end def fix_equipment return @fix_equipment_option end def auto_battle return @auto_battle_option end def super_guard return @super_guard_option end def pharmacology return @pharmacology_option end end class Game_Interpreter def change_two_swords_style(actor, option) $game_actors[actor].two_swords_style_option = option end def change_super_guard(actor, option) $game_actors[actor].super_guard_option = option end def change_fix_equipment(actor, option) $game_actors[actor].fix_equipment_option = option end def change_pharmacology(actor, option) $game_actors[actor].pharmacology_option = option end def change_auto_battle(actor, option) $game_actors[actor].auto_battle_option = option end end Change Class Items: Spoiler: CODE #=============================================================================== # Change Class Items (Eventer's tool) Snippet # By Jet10985 (Jet) #=============================================================================== # This snippet will allow you make an item that will change an actor's class # when it is used. # This script has: 1 customization option. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # Game_Battler: item_effective?, item_effect #=============================================================================== module ChangeClassItems # Input item id's from the database into this to make them class changers CLASS_CHANGE_ITEM = { 8 => 1, # Item id => class id 10 => 2, # Item id => class id 74 => 3 # Item id => class id } end #=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== class Game_Battler alias jet1088_item_effective? item_effective? unless $@ def item_effective?(user, item) if ChangeClassItems::CLASS_CHANGE_ITEM.include?(item.id) && user.actor? if user.class_id == ChangeClassItems::CLASS_CHANGE_ITEM.values[item.id] return false end return true end jet1088_item_effective?(user, item) end alias jet1200_item_effect item_effect unless $@ def item_effect(user, item) if ChangeClassItems::LEARN_A_SKILL_ITEM.include?(item.id) user.class_id = ChangeClassItems::CLASS_CHANGE_ITEM[item.id] end jet1200_item_effect(user, item) end end Change Event Z: Spoiler: CODE #=============================================================================== # Change Event Z # By Jet10985 (Jet) #=============================================================================== # This snippet will allow you to lift a specific event, or the player, above # its regular screen priority, such as above pictures or weather. # This script has: 0 customization options. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # Game_Character: screen_z #=============================================================================== =begin To change an event's z, use this in an event "Script..." command change_z(ev_id, z) ev_id = the event of the id to change the z of. Use 0 for the calling event, or -1 for the player. z = the z to give the character. Tilemap/sprites are 0, pictures/weather are 50, flashing the map screen is 100. You may use almost any number. -------------------------------------------------------------------------------- Lifting the event/player will always eliminate any tint applied to them, that is of a lower Z than they are. So, having a z of 1 will lift them above the map's tint. -------------------------------------------------------------------------------- To restore the character to normal, use a Z value of lower than 0, such as -1 =end class Game_Character attr_writer :screen_z alias jet2734_screen_z screen_z unless $@ def screen_z(*args, &block) return @screen_z.nil? ? jet2734_screen_z(*args, &block) : @screen_z end end class Scene_Map attr_accessor :spriteset end class Spriteset_Map attr_accessor :character_sprites attr_reader :viewport1 end class Game_Interpreter def change_z(ev_id, z) char = get_character(ev_id) $scene.spriteset.character_sprites.each {|a| if a.character == char a.viewport = z < 0 ? $scene.spriteset.viewport1 : nil break end } char.screen_z = z < 0 ? nil : z end end Change WindowSkin: Spoiler: CODE #=============================================================================== # Change WindowSkin Snippet # By Jet10985 (Jet) # Original Code by: Woratana #=============================================================================== # This snippet allows you to change the windowskin of all the windows with a # simple script call in-game. # This script has: No customization options. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # Window_Base: initialize, update # Game_System: initialize #=============================================================================== =begin To change the windowskin, use this code: change_skin(skinname) skinname = the name of the windowskin file. Please note: The windowskins must all be in the Graphics/system folder. =end class Window_Base alias jet2888_initialize initialize unless $@ def initialize(*args, &block) jet2888_initialize(*args, &block) self.windowskin = Cache.system($game_system.windowskin) @wskin = $game_system.windowskin end alias jet1899_update update unless $@ def update(*args, &block) jet1899_update(*args, &block) if @wskin != $game_system.windowskin self.windowskin = Cache.system($game_system.windowskin) @wskin = $game_system.windowskin end end end class Game_System attr_accessor :windowskin alias jet4729_initialize initialize unless $@ def initialize(*args, &block) jet4729_initialize(*args, &block) @windowskin = "Window" end end class Game_Interpreter def change_skin(skinname) $game_system.windowskin = skinname end end Changing GameOver screen: Spoiler: CODE #=============================================================================== # Change GameOver Graphic Snippet # By Jet10985 (Jet) #=============================================================================== # This snippet will allow you to change the graphic shown at the GameOver screen # with a simple event command # This script has: 0 customization options. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # Game_System: initialize # Scene_Gameover: create_gameover_graphic #=============================================================================== =begin How to use: to change the GameOver graphic, use this in the "Script..." event command: change_gameover(picture) picture = the name of the picture that will be the new graphic. Be sure it is in the Graphics/System folder and that it is in quotes in the script command. EX: I want the new graphic to be NewGraphic change_gameover("NewGraphic") =end class Game_System attr_accessor :gover_graphic alias jet5892_initialize initialize unless $@ def initialize(*args, &block) jet5892_initialize(*args, &block) @gover_graphic = "GameOver" end end class Scene_Gameover alias jet1924_create_gameover_graphic create_gameover_graphic unless $@ def create_gameover_graphic(*args, &block) jet1924_create_gameover_graphic(*args, &block) @sprite.dispose unless @sprite.nil? @sprite = Sprite.new @sprite.bitmap = Cache.system($game_system.gover_graphic) end end class Game_Interpreter def change_gameover(picture) $game_system.gover_graphic = picture end end Changing MessageBack: Spoiler: CODE #=============================================================================== # Change MessageBack Snippet # By Jet10985 (Jet) #=============================================================================== # This snippet allows you to change the messageback for the message window when # you select the Dim Background option. # This script has: No customization options. #=============================================================================== # To change the messageback, use this code: # change_messageback(pic) # pic = the name of the messageback file. # Please note: The images must all be in the Graphics/system folder. #=============================================================================== # Overwritten Methods: # Window_Message: create_back_sprite #------------------------------------------------------------------------------- # Aliased methods: # Game_System: initialize #=============================================================================== class Window_Message alias jet7689_create_back_sprite create_back_sprite unless $@ def create_back_sprite(*args, &block) jet7689_create_back_sprite(*args, &block) @back_sprite.dispose unless @back_sprite.nil? @back_sprite = Sprite.new @back_sprite.bitmap = Cache.system($game_system.messageback) @back_sprite.visible = (@background == 1) @back_sprite.z = 190 end end class Game_System attr_accessor :messageback alias jet4892_initialize initialize unless $@ def initialize(*args, &block) jet4892_initialize(*args, &block) @messageback = "MessageBack" end end class Game_Interpreter def change_messageback(pic) $game_system.messageback = pic end end Cheat System: Spoiler: CODE #=============================================================================== # Cheat System # By Jet10985 (Jet) # Help by: Yanfly #=============================================================================== # This script will add a cheat system that uses an actor's name as the cheat # code you will check against. # This script has: 5 customization options. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # Scene_Name: terminate # Window_Command: initialize, draw_item # Scene_Menu: create_command_window, update_command_selection, # update_actor_selection #=============================================================================== =begin By default, if they put in "god" as a cheat, common event 1 would occur. If they put "cash" in as a cheat, then common event 2 would occur. NOTE: Each cheat can only be used 1 time. If you decide to add a menu option, you may disable the entering of Cheat by using this command in a script event: change_cheat_access(option) true = They CAN'T enter Cheat false = They CAN eneter Cheat. =end module Cheat CHEATS = { 1 => "Cash", # Common event id => Cheat name 2 => "Wowza", # Common event id => Cheat name 3 => "God" # Common event id => Cheat name } ACTOR_ID = 8 # This is the actor id whose name will be used for Cheat. ADD_MENU_OPTION = true # Add a menu option for the Cheat? CHEAT_NAME = "Cheat" # This is the name of the Cheat option. MENU_INDEX = 5 #This is where to add the Cheat menu as a option. end #=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== class Game_System attr_accessor :used_cheat attr_accessor :cheat_disabled end class Scene_Name alias jet8593_terminate terminate unless $@ def terminate(*args, &block) jet8593_terminate(*args, &block) cheat_update end def cheat_update $game_system.used_cheat = [] if $game_system.used_cheat.nil? Cheat::CHEATS.each { |e, cheat_name| if Cheat::CHEATS.values.include?($game_actors[Cheat::ACTOR_ID].name) $game_temp.common_event_id = e if !$game_system.used_cheat.include?(e) $game_system.used_cheat.push(e) if !$game_system.used_cheat.include?(e) end } end end class Game_Interpreter def change_cheat_access(option) $game_system.cheat_disabled = option end end if Cheat::ADD_MENU_OPTION class Window_Command < Window_Selectable alias jet8590_initialize initialize unless $@ def initialize(*args, &block) @disabled_commands = [] jet8590_initialize(*args, &block) end alias jet9744_draw_item draw_item unless $@ def draw_item(*args, &block) jet9744_draw_item(*args, &block) @disabled_commands[args[0]] = args[1].nil? || args[1] ? nil : true end def ins_command(index, text) @commands.insert(index, text) @disabled_commands.insert(index, nil) old_disabled_commands = @disabled_commands.dup self.height = (@commands.size + @column_max - 1) / @column_max * WLH + 32 @item_max = @commands.size create_contents refresh old_disabled_commands.each_index do |i| if !old_disabled_commands[i].nil? draw_item(i, false) end end end def add_command(text) ins_command(@commands.size, text) end end class Scene_Menu < Scene_Base def sort_newcommand @sorted_command ||= [] newcommand = @newcommand - @sorted_command newcommand.sort.each {|i| @menu_index += 1 if @menu_index >= i } @command_window.index = @menu_index @sorted_command = @sorted_command + @newcommand end alias jet8941_create_command_window create_command_window unless $@ def create_command_window(*args, &block) jet8941_create_command_window(*args, &block) @command_window.ins_command(Cheat::MENU_INDEX, Cheat::CHEAT_NAME) @newcommand ||= [] @newcommand << Cheat::MENU_INDEX sort_newcommand if $game_system.cheat_disabled @command_window.draw_item(Cheat::MENU_INDEX, false) end end alias jet9905_update_command_selection update_command_selection unless $@ def update_command_selection(*args, &block) @menucomorpg_change = false if Input.trigger?(Input::C) && @command_window.index == Cheat::MENU_INDEX if $game_system.cheat_disabled Sound.play_buzzer return end Sound.play_decision $game_temp.name_actor_id = Cheat::ACTOR_ID $game_temp.name_max_char = 8 $scene = Scene_Name.new else if Input.trigger?(Input::C) && @command_window.index > Cheat::MENU_INDEX @command_window.index -= 1 @menucomorpg_change = true end jet9905_update_command_selection(*args, &block) end @command_window.index += 1 if @menucomorpg_change end alias jet2234_update_actor_selection update_actor_selection unless $@ def update_actor_selection(*args, &block) @menucomorpg_change = false if Input.trigger?(Input::C) && @command_window.index > Cheat::MENU_INDEX @command_window.index -= 1 @menucomorpg_change = true end jet2234_update_actor_selection(*args, &block) @command_window.index += 1 if @menucomorpg_change end end end Class Change Resets Skills: Spoiler: CODE #=============================================================================== # Class Change Resets Skills # By Jet10985 (Jet) #=============================================================================== # This snippet will make it so when an actor's class is changed, they will # forget their skills, and learn the skills of the new class according to level # This script has: 0 customization options. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # Game_Actor: class_id= #=============================================================================== class Game_Actor alias jet1936_class_id class_id= unless $@ def class_id=(*args, &block) old_class = @class_id jet1936_class_id(*args, &block) for skill in skills forget_skill(skill.id) end for skill in $data_classes[args[0]].learnings if @level >= skill.level learn_skill(skill.skill_id) end end end end Config File Reader: Spoiler: CODE #=============================================================================== # Config File Reader (Scripter's Tool) # By Jet10985 (Jet) #=============================================================================== # This snippet allows you to check what the settings in the Config.ini file # are in a handy hash. # This script has: 0 customization options. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # Game_System: initialize #=============================================================================== =begin Hash is stores as $game_system.ini_config The hash stores the keys (Such as Title) as Symbols. Values are strings. EX: :Title => "Game Name" =end class Game_System attr_accessor :ini_config alias jet3273_initialize initialize unless $@ def initialize(*args, &block) @ini_config = {} IO.readlines("./Game.ini").each {|line| if (ar = line.chomp.split('=', 2)).size == 2 @ini_config[ar[0].to_sym] = ar[1] end } if File.exist?("./Game.ini") jet3273_initialize(*args, &block) end end Diagonal Map Scroll: Spoiler: CODE #=============================================================================== # Diagonal Map Scroll Snippet # By Jet10985 (Jet) # Help by: Yanfly # Inspired by: Scherzo #=============================================================================== # This snippet will allow you scroll the map diagonally during events. # This script has: 0 customization options. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # Game_Map: update_scroll #=============================================================================== =begin How To Use: to call the diagonal map scroll, use: diagonal_map_scroll(direction, distance, speed) direction corresponds here: 7 = upper-left 9 = upper-right 3 = lower-left 1 = lower-right distance = how many squares you want to go. speed = how fast the scroll will occur =end class Game_Map alias jet1923_update_scroll update_scroll unless $@ def update_scroll(*args, &block) if @scroll_rest > 0 && @scroll_direction % 2 != 0 distance = 2 ** @scroll_speed case @scroll_direction when 7 scroll_up(distance) and scroll_left(distance) when 9 scroll_up(distance) and scroll_right(distance) when 1 scroll_down(distance) and scroll_left(distance) when 3 scroll_down(distance) and scroll_right(distance) end @scroll_rest -= distance else jet1923_update_scroll(*args, &block) end end end class Game_Interpreter def diagonal_map_scroll(direction, distance, speed) $game_map.start_scroll(direction, distance, speed) end end Disable Battle Commands: Spoiler: CODE #=============================================================================== # Disable Battle Commands (Default battle system version) Snippet # By Jet10985 (Jet) # Help by: Mithran #=============================================================================== # This snippet allows you to change a characters access to perform certain # actions in battle. Does not work with tankentai # This script has: 0 customization options. #=============================================================================== # Overwritten Methods: # Scene_Battle: update_actor_command_selection #------------------------------------------------------------------------------- # Aliased methods: # Game_System: initialize # Scene_Battle: start_actor_command_selection #=============================================================================== =begin How to change access: In an event's "Script..." event command use one of the following codes: disable_attack(actor, option) disable_skill(actor, option) disable_guard(actor, option) disable_item(actor, option) actor = which actor is having their option changed option = true or false. True disable's the action, false re-enables it. =end class Game_Interpreter def disable_attack(actor, option) $game_system.no_attack.push(actor) if option == true $game_system.no_attack.delete(actor) if option == false end def disable_skill(actor, option) $game_system.no_skills.push(actor) if option == true $game_system.no_skills.delete(actor) if option == false end def disable_guard(actor, option) $game_system.no_guard.push(actor) if option == true $game_system.no_guard.delete(actor) if option == false end def disable_item(actor, option) $game_system.no_items.push(actor) if option == true $game_system.no_items.delete(actor) if option == false end end class Game_System attr_accessor :no_attack attr_accessor :no_skills attr_accessor :no_guard attr_accessor :no_items alias jet5839_initialize initialize unless $@ def initialize(*args, &block) jet5839_initialize(*args, &block) @no_attack = [] @no_skills = [] @no_guard = [] @no_items = [] end end class Scene_Battle alias jet5839_s_a_c_s start_actor_command_selection unless $@ def start_actor_command_selection(*args, &block) jet5839_s_a_c_s(*args, &block) if $game_system.no_attack.include?(@active_battler.id) @actor_command_window.draw_item(0, false) @attack_no = true end if $game_system.no_skills.include?(@active_battler.id) @actor_command_window.draw_item(1, false) @skill_no = true end if $game_system.no_guard.include?(@active_battler.id) @actor_command_window.draw_item(2, false) @guard_no = true end if $game_system.no_items.include?(@active_battler.id) @actor_command_window.draw_item(3, false) @item_no = true end end def update_actor_command_selection if Input.trigger?(Input::B) Sound.play_cancel prior_actor elsif Input.trigger?(Input::C) case @actor_command_window.index when 0 # Attack if !@attack_no Sound.play_decision @active_battler.action.set_attack start_target_enemy_selection elsif Sound.play_buzzer return end when 1 # Skill if !@skill_no Sound.play_decision start_skill_selection elsif Sound.play_buzzer return end when 2 # Guard if !@guard_no Sound.play_decision @active_battler.action.set_guard next_actor elsif Sound.play_buzzer return end when 3 # Item if !@item_no Sound.play_decision start_item_selection elsif Sound.play_buzzer return end end end end end EXP Bar: Spoiler: CODE #=============================================================================== # EXP Bar # By Jet10985 (Jet) # Requested by: EZaxess #=============================================================================== # This snippet gives the ability to draw an exp bar, which shows the percentage # the actor is to level up. Includes option to automatically draw in status # This script has: 5 customization options. #=============================================================================== # Overwritten Methods: # Window_MenuStatus: refresh #------------------------------------------------------------------------------- # Aliased methods: # Window_Base: draw_actor_hp, draw_actor_mp # Window_Status: refresh #=============================================================================== module EXPBar # What is EXP called? EXP_NAME = "EXP" # What color does the bar start at? BAR_COLOR_1 = Color.new(0, 150, 12) # What color does the bar end at? BAR_COLOR_2 = Color.new(0, 255, 12) # Do you want to display the exp bar in the status menu? DISPLAY_IN_STATUS = true # Do you want to dislay the exp bar in the menu? DISPLAY_IN_MENU = true end #=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== class Window_Base def draw_actor_exp(actor, x, y, width = 120) draw_actor_exp_gauge(actor, x, y, width) self.contents.font.color = system_color self.contents.draw_text(x, y, 35, WLH, EXPBar::EXP_NAME) self.contents.font.color = normal_color last_font_size = self.contents.font.size xr = x + width f = actor.next_exp_s string = f.to_s.include?("-") ? 0 : (actor.exp.to_f / f.to_i.to_f).round self.contents.draw_text(xr - 44, y, 44, WLH, "#{string}%", 2) end def draw_actor_exp_gauge(actor, x, y, width = 120) f = actor.next_exp_s string = f.to_s.include?("-") ? 0 : (actor.exp.to_f / f.to_i.to_f).round gw = width * string.to_i / 100 gc1 = EXPBar::BAR_COLOR_1 gc2 = EXPBar::BAR_COLOR_2 self.contents.fill_rect(x, y + WLH - 8, width, 6, gauge_back_color) self.contents.gradient_fill_rect(x, y + WLH - 8, gw, 6, gc1, gc2) end end class Window_Status alias jet2479_draw_basic_info draw_basic_info unless $@ def draw_basic_info(*args, &block) jet2479_draw_basic_info(*args, &block) return unless EXPBar::DISPLAY_IN_STATUS draw_actor_exp(@actor, args[0], args[1] + WLH * 4) end end class Window_MenuStatus def refresh(*args, &block) self.contents.clear @item_max = $game_party.members.size for actor in $game_party.members draw_actor_face(actor, 2, actor.index * 96 + 2, 92) x = 104 y = actor.index * 96 draw_actor_name(actor, x, y) draw_actor_class(actor, x + 120, y) draw_actor_level(actor, x, y + WLH * 1) draw_actor_state(actor, x, y + WLH * 2) draw_actor_hp(actor, x + 120, y + WLH * 1) draw_actor_mp(actor, x + 120, y + WLH * 2) draw_actor_exp(actor, x + 120, y + WLH * 3) end end end EXP By Damage Dealt: Spoiler: CODE #=============================================================================== # EXP By Damage # By Jet10985 (Jet) # Requested by: Tevak #=============================================================================== # This snippet will replace the default way of gaining exp after a battle # by using a ratio of damage dealt to exp # This script has: 4 customization options. #=============================================================================== # Overwritten Methods: # Scene_Battle: display_level_up #------------------------------------------------------------------------------- # Aliased methods: # Game_Actor: initialize # Game_Battler: execute_damage #=============================================================================== module EXPByDamage # This is how exp will be calculated. # If true, it will use the database set exp divided by the percent of damage # If false, it will use a direct damage to exp ratio, ignoring database PERCENT_OF_DATABASE_EXP = false # How much exp is gained per damage dealt? # Only applies if PERCENT_OF_DATABASE_EXP = false DAMAGE_TO_EXP_RATIO = 1.0 # Do dead actors still gain their exp? DEAD_ACTORS_GET_EXP = true # Should exp gained by this script, be stacked onto the database value? STACK_EXP = false end #=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== class Game_Actor attr_accessor :perc_exp alias jet8356_initialize initialize unless $@ def initialize(*args, &block) @perc_exp = 0 jet8356_initialize(*args, &block) end end class Game_Battler alias jet1956_execute_damage execute_damage unless $@ def execute_damage(user) old_hp = self.hp jet1956_execute_damage(user) return if old_hp < self.hp || !user.actor? ratio = EXPByDamage::DAMAGE_TO_EXP_RATIO f = (old_hp - self.hp).to_f if EXPByDamage::PERCENT_OF_DATABASE_EXP f /= self.maxhp.to_f f *= self.exp.to_f user.perc_exp += f else user.perc_exp += (f * ratio.to_f) end end end class Scene_Battle def display_level_up(*args, &block) $game_party.members.each {|actor| actor.perc_exp = 0 if actor.dead? && EXPByDamage::DEAD_ACTORS_GET_EXP next if actor.dead? && !EXPByDamage::DEAD_ACTORS_GET_EXP actor.gain_exp(actor.perc_exp.round + ( EXPByDamage::STACK_EXP ? $game_troop.exp_total : 0), true) actor.perc_exp = 0 } wait_for_message end end Enemy Shrink Collapse: Spoiler: CODE #=============================================================================== # Enemy Shrink Collapse # By Jet10985 (Jet) #=============================================================================== # This snippet will have enemies shrink into nothing when defeated instead of # the regular defeat animation. # This script has: 2 customization options. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # Sprite_Battler: update_collapse #=============================================================================== module JetShrinkingCollapse # This is the SE that will be played with the shrinking # Note: The file must be in the Audio\SE folder SHRINK_SE = "Collapse1" # This is an list of enemy id's whol will perform a regular collapse # instead of a shrinking one. NO_SHRINK_ENEMIES = [17, 25, 5] end #=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== class Sprite_Battler alias jet1836_update_collapse update_collapse unless $@ def update_collapse(*args, &block) if @battler.is_a?(Game_Enemy) if !JetShrinkingCollapse::NO_SHRINK_ENEMIES.include?(@battler.id) @jet_did_se = false if @jet_did_se.nil? if !@jet_did_se RPG::SE.new(JetShrinkingCollapse::SHRINK_SE, 80, 100).play @jet_did_se = true end if @effect_duration == 0 self.opacity = 0 @jet_did_se = false return end self.zoom_x -= (self.zoom_x / @effect_duration.to_f) self.zoom_y -= (self.zoom_y / @effect_duration.to_f) else jet1836_update_collapse(*args, &block) end else jet1836_update_collapse(*args, &block) end end end Event Fade By Distance: Spoiler: CODE #=============================================================================== # Event Fade By Distance # By Jet10985 (Jet) #=============================================================================== # This snippet will allow you have events fade slowly as the character gets # further away from them. # This script has: 1 customization option. #=============================================================================== # Overwritten Methods: # Game_Event: opacity #------------------------------------------------------------------------------- # Aliased methods: # None #=============================================================================== =begin To make a specific event fade, put this is an event comment: NO FADE -------------------------------------------------------------------------------- Notes: Events will not fade if their opacity is changed by an event, unless it was changed to 255. =end module EventFade # Turning this switch on will turn the fade off, and vice versa. ALLOW_FADE_SWITCH = 90 end #=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== class Game_Event def dist_by_grid(ev) x = (self.x - ev.x) y = (self.y - ev.y) x *= -1 if x < 0 y *= -1 if y < 0 return x + y end def check_com_fade(string) return false if @list.nil? or @list.size <= 0 regexp = /#{string}(?: (.+))?/i for item in @list if item.code == 108 or item.code == 408 w = item.parameters[0][regexp].nil? ? nil : $1.nil? ? true : $1 end return w if !w.nil? end return false end def opacity return @opacity if $game_switches[EventFade::ALLOW_FADE_SWITCH] return @opacity if check_com_fade("NO FADE") return @opacity if dist_by_grid($game_player) <= 2 return @opacity if @opacity != 255 return 255 - 17 * (dist_by_grid($game_player) - 2) end end Events Move Player: Spoiler: CODE #=============================================================================== # Events Move Player # By Jet10985 (Jet) # Requested By: Tevak #=============================================================================== # This script will allow you to make events who will push the player if they are # in the event's way of movement. # This script has: 3 customization options. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # Game_Character: All move commands. #=============================================================================== =begin To make an event be able to push the player, put the below COMMENT config in an event Comment. By default, it is "PUSHER", so in an event Comment, you would put PUSHER. =end module EventsMovePlayer # There is no configuration needed here, this is convenience for me. MOVEMENTS = { :up => [0, -1], :down => [0, 1], :left => [-1, 0], :right => [1, 0], :upper_right => [1, -1], :lower_right => [1, 1], :lower_left => [-1, 1], :upper_left => [-1, -1] } # This switch, when turned on, will disable the event pushing effect. TURN_OFF_PUSH_SWITCH = 70 # This is the comment needed to make an event a pushing event. # Puncuation capital/lowercase-wise does not matter. COMMENT = "PUSHER" end #=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== class Game_Character attr_reader :move_failed EventsMovePlayer::MOVEMENTS.each {|dir, co| aStr = %Q{ alias jet9201_move_#{dir} move_#{dir} unless $@ def move_#{dir}(*args, &block) if !$game_switches[EventsMovePlayer::TURN_OFF_PUSH_SWITCH] if !self.is_a?(Game_Player) if self.pusher? if $game_player.x == self.x + #{co[0]} if $game_player.y == self.y + #{co[1]} $game_player.move_#{dir}(false) if $game_player.move_failed EventsMovePlayer::MOVEMENTS.each_key {|a| eval("$game_player.move_\#{a}(false)") break if !$game_player.move_failed } end end end end end end jet9201_move_#{dir}(*args, &block) end } module_eval(aStr) } end class Game_Event def pusher? return false if @list.nil? or @list.size <= 0 for item in @list if item.code == 108 or item.code == 408 if item.parameters[0].match(/#{EventsMovePlayer::COMMENT}/i) return true end end end return false end end Footstep SE: Spoiler: CODE #=============================================================================== # Footstep SE # By Jet10985 (Jet) #=============================================================================== # This snippet will play a sound effect whenever the player walks. # It can also do the same for events as well. # This script has: 6 customization options. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # Game_System: initialize # Game_Character: increase_steps #=============================================================================== =begin How to give events custom SE sounds: To give an event a custom SE sound, place this in an Event "Comment" FOOTSTEP SE = filename filename = The name of the SE file obviously If you have USE_DEFAULT_SE_FOR_EVENT set to true, and went the event to not have a footstep sound, filename should be nil, as such: FOOTSTEP SE = nil -------------------------------------------------------------------------------- Changing the player's SE: To change the player's SE on the fly, use this in an event "Script..." command change_footsteps_se(filename) filename follows the same rules as the above instructions, except that this time you may use an array of entries, or a single item Array Ex: change_footsteps_se(["SE1", "SE2", "SE3"]) Single Ex: change_footsteps_se("SE1") =end module FSSE # What is the default stepping SE for players? # You may use an array of entries, or a single item # Array EX: ["SE1", "SE2, "SE3], Single EX: "SE1" DEFAULT_PLAYER_SE = ["Knock", "Cat", "Cow"] # Do you want events to have this default SE as well? # Otherwise, they will be silent unless a comment if given for them USE_DEFAULT_SE_FOR_EVENT = true # This is how loud the footstep SE is by default # 100 is the max DEFAULT_SE_VOLUME = 80 # Turning this switch on will turn off all footstep sounds NO_FOOTSTEPS_SWITCH = 90 # For events that have a footstep SE, do you want the volume lowered # depending on how far away the event is? USE_EVENT_FOOTSTEP_AMBIENCE = true # How much of the volume will be lowered for each square # Only config if USE_EVENT_FOOTSTEP_AMBIENCE is true # A 1 square distance will be DEFAULT_SE_VOLUME. VOLUME_LOWER_BY_SQUARE = 8 end #=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== class Game_System attr_accessor :player_se alias jetrestaff_initialize initialize unless $@ def initialize(*args, &block) jetrestaff_initialize(*args, &block) @player_se = FSSE::DEFAULT_PLAYER_SE end end class Game_Character alias jetrestaff_increase_steps increase_steps unless $@ def increase_steps(*args, &block) jetrestaff_increase_steps(*args, &block) play_footstep_se unless $game_switches[FSSE::NO_FOOTSTEPS_SWITCH] end def dist_by_grid(ev) x = (self.x - ev.x) y = (self.y - ev.y) return (x - y).abs end end class Game_Event def check_com_steps(regexp) return false if @list.nil? or @list.size <= 0 for item in @list if item.code == 108 or item.code == 408 w = item.parameters[0][regexp].nil? ? false : $1 end break if ![nil, false].include?(w) end if [nil, false].include?(w) && FSSE::USE_DEFAULT_SE_FOR_EVENT if FSSE::DEFAULT_PLAYER_SE.is_a?(Array) w = FSSE::DEFAULT_PLAYER_SE[rand(FSSE::DEFAULT_PLAYER_SE.size)] else w = FSSE::DEFAULT_PLAYER_SE end elsif w.nil? w = false end return w end def play_footstep_se se = check_com_steps(/(?:FOOTSTEP[ ]*SE[ ]*[:|=][ ]*)(.+)/i) return if [false, "nil"].include?(se) vol = FSSE::DEFAULT_SE_VOLUME if FSSE::USE_EVENT_FOOTSTEP_AMBIENCE mult = FSSE::VOLUME_LOWER_BY_SQUARE vol -= (dist_by_grid($game_player) - 1) * mult end return if vol <= 0 RPG::SE.new(se, vol, 100).play rescue nil end end class Game_Player def play_footstep_se return if $game_system.player_se == "nil" if $game_system.player_se.is_a?(Array) se = $game_system.player_se[rand($game_system.player_se.size)] else se = $game_system.player_se end vol = FSSE::DEFAULT_SE_VOLUME RPG::SE.new(se, vol, 100).play rescue nil end end class Game_Interpreter def change_footstep_se(new_se) $game_system.player_se = new_se end end Gameover to Map: Spoiler: CODE #=============================================================================== # Gameover to Map Snippet # By Jet10985 (Jet) # Original code by: Khaliid #=============================================================================== # This snippet will send the character to a map with 1 hp when a gameover occurs # instead of a regular gameover. # This script has: 6 customization options. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # Scene_Gameover: start, dispose_gameover_graphic #=============================================================================== module GTMap # If this switch is on, a regular gameover will be called if the party dies. DEATH_SWITCH = 62 # This variable keeps track of the map id the play will be transfered to. # If the map doesn't exist, the game WILL throw an error in your face. MAP_VARIABLE_ID = 56 # This variable is the X coordinate of the map where the player will spawn. MAP_X_VARIABLE = 57 # This variable is the y coordinate of the map where the player will spawn. MAP_Y_VARIABLE = 58 # Play a common event after the player has been transfered? PLAY_COMMON_EVENT = true # This variable keeps track of the common event id that will be played. COMMON_EVENT_ID_VAR = 59 end #=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== class Scene_Gameover alias jet3891_start start unless $@ def start(*args, &block) if $game_switches[GTMap::DEATH_SWITCH] jet3891_start(*args, &block) else $game_map.setup($game_variables[GTMap::MAP_VARIABLE_ID]) x = $game_variables[GTMap::MAP_X_VARIABLE] y = $game_variables[GTMap::MAP_Y_VARIABLE] $game_player.moveto(x, y) $game_player.refresh $scene = Scene_Map.new RPG::BGM.fade(1500) Graphics.fadeout(30) Graphics.wait(40) RPG::BGM.stop $game_map.autoplay $game_party.members[0].hp = 1 if GTMap::PLAY_COMMON_EVENT $game_temp.common_event_id = $game_variables[GTMap::COMMON_EVENT_ID_VAR] end end end alias jet9023_dispose_gameover_graphic dispose_gameover_graphic unless $@ def dispose_gameover_graphic(*args, &block) if $game_switches[GTMap::DEATH_SWITCH] jet9023_dispose_gameover_graphic(*args, &block) end end end Gradual Leveling: Spoiler: CODE #=============================================================================== # Gradual Leveling # By Jet10985 (Jet) #=============================================================================== # This snippet changes the way stats work, by making stats gradually level up # from amount to amount between levels using the amount of exp left to # level up. # This script has: 2 customization options. #=============================================================================== # Overwritten Methods: # Game_Actor: base_(maxhp, maxmp, atk, def, spi, agi), display_level_up # Window_Base: draw_actor_level # Window_Status: draw_exp_info #------------------------------------------------------------------------------- # Aliased methods: # None #=============================================================================== module GradLeveling # These are what stats are included in the gradual leveling process. STATS = [:maxhp, :maxmp, :atk, :def, :spi, :agi] # Do you want to hide all mentions of levels and leveling up? HIDE_LEVEL = true end #=============================================================================== # DO NOT EDIT PAST HERE UNLESS YOU KNOW WHAT TO DO #=============================================================================== class Game_Actor JSTAT_INDEX = { :maxhp => 0, :maxmp => 1, :atk => 2, :def => 3, :spi => 4, :agi => 5 } GradLeveling::STATS.each {|a| aStr = %Q{ def base_#{a}(*args, &block) i = #{JSTAT_INDEX[a]} f = [actor.parameters[i, @level], actor.parameters[i, @level + 1]] g = @exp_list[@level + 1] > 0 ? @exp_list[@level + 1] : @exp n = (f[0] + ((f[1].to_f - f[0].to_f) * (@exp.to_f / g.to_f))).round equips.compact.each {|item| n += item.#{a} } if ![0, 1].include?(i) return n end } module_eval(aStr) } def display_level_up(new_skills) $game_message.new_page if !GradLeveling::HIDE_LEVEL text = sprintf(Vocab::LevelUp, @name, Vocab::level, @level) $game_message.texts.push(text) end for skill in new_skills text = sprintf(Vocab::ObtainSkill, skill.name) $game_message.texts.push(text) end end end class Window_Base if GradLeveling::HIDE_LEVEL def draw_actor_level(*args, &block) end end end class Window_Status if GradLeveling::HIDE_LEVEL def draw_exp_info(*args, &block) end end end Halt Player Movement: Spoiler: CODE #=============================================================================== # Halt Player Movement # By Jet10985 (Jet) #=============================================================================== # This script will allow you to halt a player's movement by using the keyboard. # This means they cannot make the player move, but they can still be moved by # using a move route in an event. # This script has: 1 customization option. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # Game_Player: move_by_input #=============================================================================== module HaltPlayerMove # This is the switch id, that if turned on will halt a player's movement HALT_SWITCH = 50 end #=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== class Game_Player alias jet0845_mbi move_by_input unless $@ def move_by_input(*args, &block) jet0845_mbi(*args, &block) if !$game_switches[HaltPlayerMove::HALT_SWITCH] end end Handed Weapons: Spoiler: CODE #=============================================================================== # Handed Weapons # By Jet10985 (Jet) # Requested by: Xalidir #=============================================================================== # This snippet allows you to specify if a weapon is main or off-handed. # Main handed can only be equiped in the first weapon slot. # Off handed can only be equipped in the second weapon slot. # This script has: 0 customization options. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # Scene_Equip: update_item_selection #=============================================================================== =begin To make an item Main-Handed, put this in the notebox: <main hand> To make an item off-handed, put this in the notebox: <off hand> -------------------------------------------------------------------------------- Note: Off-handed weapons cannot be equipped at all if the actor can't dual-wield =end class RPG::BaseItem def hand if @hand.nil? i = 0 for note in [/<main hand>/i, /<off hand>/i] @hand = self.note[note].nil? ? nil : i break if @hand != nil i += 1 end @hand = 2 if @hand.nil? end return @hand end end class Scene_Equip alias jet9842_update_item_selection update_item_selection unless $@ def update_item_selection(*args, &block) if Input.trigger?(Input::C) item = @item_window.item equip_type = @equip_window.index if equip_type == 0 and !item.nil? Sound.play_buzzer if item.hand == 1 return if item.hand == 1 elsif equip_type == 1 and !item.nil? Sound.play_buzzer if item.hand == 0 return if item.hand == 0 end end jet9842_update_item_selection(*args, &block) end end Hide Text Box: Spoiler: CODE #=============================================================================== # Hide Text Box Snippet # By Jet10985 (Jet) # Original Code by Piejamas #=============================================================================== # This snippet allows you to add scenes where the player can hide the textbox # to maybe look at a picture then bring the box back up. # This script has: 2 customization options. #=============================================================================== # Overwritten Methods: # Window_Message: input_pause #------------------------------------------------------------------------------- # Aliased methods: # Window_Message: update #=============================================================================== module Hide # This is the switch that allows the player to hide the box ACTIVATION_SWITCH = 5 # This is the button that needs to be pressed to hide the box TRIGGER = Input::F8 end #=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== class Window_Message alias jet7535_base_update update unless $@ def update(*args, &block) jet7535_base_update(*args, &block) unless $scene.is_a?(Scene_Battle) if $game_switches[Hide::ACTIVATION_SWITCH] && Input.trigger?(Hide::TRIGGER) self.visible = !self.visible Sound.play_cursor end end end def input_pause if Input.trigger?(Input::B) or Input.trigger?(Input::C) if self.visible self.pause = false if @text != nil && !@text.empty? new_page if @line_count >= MAX_LINE else terminate_message end end end end end If Party Has Equipped: Spoiler: CODE #=============================================================================== # If Party Has Equipped (Eventers tool) Snippet # By Jet10985 (Jet) # Help by: Yanfly, Mithran # Inspired By: Sander #=============================================================================== # This snippet will allow you to check if anyone in the current party has an # item equipped. This simplifies the many conditional branches. # This script has: 0 customization options. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # None #=============================================================================== =begin How to Use: To call the script use: party_has_equip?(item_id, type, switch) item_id = the armor/weapon id in the database. type = 0 or 1. 0 means weapons, 1 means any armor slot. switch = The switch that will be turned on if any of them have it equipped. If you don't want a switch and are just using this in a conditional branch, only input the item_id and type. EX: party_has_equip?(60, 0) =end #=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== class Game_Interpreter def party_has_equip?(item_id, type, switch_id = 5001) ary = type == 0 ? $data_weapons : $data_armors $game_switches[switch_id] = $game_party.members.find {|m| m.equips.include?(ary[item_id]) } end end If Party Has Skill: Spoiler: CODE #=============================================================================== # If Party Has Skill (Eventers tool) Snippet # By Jet10985 (Jet) # Help by: Yanfly, Mithran # Inspired By: Sander #=============================================================================== # This snippet will allow you to check if anyone in the current party has an # skill learned. This simplifies the many conditional branches. # This script has: 0 customization options. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # None #=============================================================================== =begin How to Use: To call the script use: party_has_skill?(skill_id, switch) skill_id = the skill id in the database. switch = The switch that will be turned on if any of them have it learned. If you don't want a switch and are just using this in a conditional branch, only input the skill_id. EX: party_has_skill?(60) =end #=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== class Game_Interpreter def party_has_skill?(skill_id, switch_id = 5001) $game_switches[switch_id] = $game_party.members.find {|m| m.skills.include?($data_skills[skill_id]) } end end Immortal States: Spoiler: CODE #=============================================================================== # Immortal States Snippet # By Jet10985 (Jet) #=============================================================================== # This snippet will allow you designate states to be "immortal" states. This # means that while the character is inflicted with the state, they will not die. # This script has: 1 customization options. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # Game_Battler: hp= #=============================================================================== module ImmortalStates # These are the ids of the immortal states STATE_IMMORTAL = [18, 19] end #=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== class Game_Battler alias jet3290_newhp hp= unless $@ def hp=(*args, &block) ImmortalStates::STATE_IMMORTAL.each do |i| if @states.include?(i) @immortal = true end end jet3290_newhp(*args, &block) end end Increase Crit By Stat: Spoiler: CODE #=============================================================================== # Increase Crit By Stat # By Jet10985 (Jet) # Requested by: Tevak #=============================================================================== # This snippet gives the ability to increase the critical hit rate by # the value of different stats to a ratio # This script has: 5 customization options. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # Game_Actor: cri #=============================================================================== module CritRate # These are the stats, and how many are needed to increase crit by an amount # You can delete or edit any of these # They follow this format # :stat => [needed, crit_up] # : stat can be :hp, :mp, :atk, :def, :spi, :agi, and stats created by other # scripts. # needed is how many points in this stat are needed to increase the crit rate # crit_up is how much crit will be increased by CRIT_UP_STATS = { :atk => [50, 1], :def => [20, 0.5], :spi => [2, 0.5], :agi => [7, 1] } end #=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== class Game_Actor alias jet8356_cri cri unless $@ def cri(*args, &block) n = jet8356_cri(*args, &block) CritRate::CRIT_UP_STATS.each_pair {|k, v| stat = eval("self.#{k.to_s}") n += stat / v[0] * v[1] } return n.round end end Instant Battle Results: Spoiler: CODE #=============================================================================== # Instant Battle Results # By Jet10985 (Jet) #=============================================================================== # This script will allow you to force a battle result (win, lose, escape) with # the push of a specific button. # This script has: 0 customization options. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # Scene_Battle: update_basic #=============================================================================== =begin To Win Press A To Escape Press S To Lose Press D =end class Scene_Battle alias jet3682_update_basic update_basic unless $@ def update_basic(*args, &block) jet3682_update_basic(*args, &block) if $TEST || $BTEST if Input.trigger?(Input::X) $game_troop.members.each {|a| a.add_state(1) } process_victory elsif Input.trigger?(Input::Y) battle_end(1) elsif Input.trigger?(Input::Z) process_defeat end end end end Item SE: Spoiler: CODE #=============================================================================== # Item SE Snippet # By Jet10985 (Jet) #=============================================================================== # This snippet will allow you to specify a sound effect that will be played when # a specific item is used. # This script has: 1 customization option. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # Game_Battler: item_effect #=============================================================================== module ItemSE ITEM_SE = { 1 => "Heal1", # item id => SE name 2 => "Heal2", # item id => SE name 3 => "Heal3" # item id => SE name } end #=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== class Game_Battler alias jet5930_item_effect item_effect unless $@ def item_effect(user, item) if ItemSE::ITEM_SE.keys.include?(item.id) if item_effective?(user, item) RPG::SE.new(ItemSE::ITEM_SE[item.id], 80, 100).play end end jet5930_item_effect(user, item) end end Jet Enhanced Input Module: Spoiler: CODE #=============================================================================== # Jet's Enhanced Input Module # By Jet10985 (Jet) #=============================================================================== # This script allows the checking of most keys on the keyboard, along with # mouse clicks for all 3 buttons. # This is primarily a scripter's tool, and instructions on use will not be given # This script has: 0 customization options. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # Input: update #=============================================================================== module JetInput LBUTTON = 0x01 # Left mouse button RBUTTON = 0x02 # Right mouse button CANCEL = 0x03 # Control-break processing MBUTTON = 0x04 # Middle mouse button (three-button mouse) BACK = 0x08 # BACKSPACE key TAB = 0x09 # TAB key CLEAR = 0x0C # CLEAR key RETURN = 0x0D # ENTER key SHIFT = 0x10 # SHIFT key CONTROL = 0x11 # CTRL key MENU = 0x12 # ALT key PAUSE = 0x13 # PAUSE key CAPITAL = 0x14 # CAPS LOCK key ESCAPE = 0x1B # ESC key SPACE = 0x20 # SPACEBAR PRIOR = 0x21 # PAGE UP key NEXT = 0x22 # PAGE DOWN key END_KEY = 0x23 # END key HOME = 0x24 # HOME key LEFT = 0x25 # LEFT ARROW key UP = 0x26 # UP ARROW key RIGHT = 0x27 # RIGHT ARROW key DOWN = 0x28 # DOWN ARROW key SELECT = 0x29 # SELECT key PRINT = 0x2A # PRINT key EXECUTE = 0x2B # EXECUTE key SNAPSHOT = 0x2C # PRINT SCREEN key INSERT = 0x2D # INS key DELETE = 0x2E # DEL key HELP = 0x2F # HELP key NUM_0 = 0x30 # 0 key NUM_1 = 0x31 # 1 key NUM_2 = 0x32 # 2 key NUM_3 = 0x33 # 3 key NUM_4 = 0x34 # 4 key NUM_5 = 0x35 # 5 key NUM_6 = 0x36 # 6 key NUM_7 = 0x37 # 7 key NUM_8 = 0x38 # 8 key NUM_9 = 0x39 # 9 key A = 0x41 # A key B = 0x42 # B key C = 0x43 # C key D = 0x44 # D key E = 0x45 # E key F = 0x46 # F key G = 0x47 # G key H = 0x48 # H key I = 0x49 # I key J = 0x4A # J key K = 0x4B # K key L = 0x4C # L key M = 0x4D # M key N = 0x4E # N key O = 0x4F # O key P = 0x50 # P key Q = 0x51 # Q key R = 0x52 # R key S = 0x53 # S key T = 0x54 # T key U = 0x55 # U key V = 0x56 # V key W = 0x57 # W key X = 0x58 # X key Y = 0x59 # Y key Z = 0x5A # Z key NUMPAD0 = 0x60 # Numeric keypad 0 key NUMPAD1 = 0x61 # Numeric keypad 1 key NUMPAD2 = 0x62 # Numeric keypad 2 key NUMPAD3 = 0x63 # Numeric keypad 3 key NUMPAD4 = 0x64 # Numeric keypad 4 key NUMPAD5 = 0x65 # Numeric keypad 5 key NUMPAD6 = 0x66 # Numeric keypad 6 key NUMPAD7 = 0x67 # Numeric keypad 7 key NUMPAD8 = 0x68 # Numeric keypad 8 key NUMPAD9 = 0x69 # Numeric keypad 9 key SEPARATOR = 0x6C # Separator key SUBTRACT = 0x6D # Subtract key DECIMAL = 0x6E # Decimal key DIVIDE = 0x6F # Divide key F1 = 0x70 # F1 key F2 = 0x71 # F2 key F3 = 0x72 # F3 key F4 = 0x73 # F4 key F5 = 0x74 # F5 key F6 = 0x75 # F6 key F7 = 0x76 # F7 key F8 = 0x77 # F8 key F9 = 0x78 # F9 key F10 = 0x79 # F10 key F11 = 0x7A # F11 key F12 = 0x7B # F12 key SCROLL = 0x91 # SCROLL LOCK key LSHIFT = 0xA0 # Left SHIFT key RSHIFT = 0xA1 # Right SHIFT key LCONTROL = 0xA2 # Left CONTROL key RCONTROL = 0xA3 # Right CONTROL key LMENU = 0xA4 # Left MENU key RMENU = 0xA5 # Right MENU key PLAY = 0xFA # Play key ZOOM = 0xFB # Zoom key @GetKeyState = Win32API.new("user32", "GetAsyncKeyState", "i", "i") @GetCapState = Win32API.new("user32", "GetKeyState", "i", "i") def self.getstate(key) return (@GetKeyState.call(key)&0x8000) > 0 end def self.typing? for button in JetInput.constants if JetInput.press?(JetInput.const_get(button)) return true end end return false end def self.update if @keystate for i in 0...256 @newstate = self.getstate(i) @triggerstate[i] = (@newstate && @keystate[i] == 0) @releasestate[i] = (!@newstate && @keystate[i] > 0) @keystate[i] = @newstate ? @keystate[i] + 1 : 0 end else @keystate = [] @triggerstate = [] @releasestate = [] for i in 0...256 @keystate[i] = self.getstate(i) ? 1 : 0 @triggerstate[i] = false @releasestate[i] = false end end end def self.count(button) c = self.repeatcount(button) return c if c > 0 return 0 end def self.repeatcount(key) return 0 if !@keystate return @keystate[key] end def self.trigger?(key) return false if !@triggerstate return @triggerstate[key] end def self.repeat?(key) return false if !@keystate return (@keystate[key] & 1) == 0 end def self.press?(button) return self.count(button) > 0 end def self.repeatcount(key) return 0 if !@keystate return @keystate[key] end def self.shift_state return !press?(SHIFT) if @GetCapState.call(20) == 1 return press?(SHIFT) end end class << Input alias jet2009_update update unless $@ def update(*args, &block) jet2009_update(*args, &block) JetInput.update end end Large Party Support: Spoiler: CODE #=============================================================================== # Large Party Support # By Jet10985 (Jet) #=============================================================================== # This snippet allows you to change the amount of members the player can have # in their party, and have graphical suport for it in menus. # This script has: 1 customization option. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # Window_MenuStatus: refresh, update_cursor # Window_BattleStatus: refresh #=============================================================================== class Game_Party # What is the maximum amount of members the party can have? MAX_MEMBERS = 8 end #=============================================================================== # DO NOT EDIT PAST HERE UNLESS YOU KNOW WHAT TO DO #=============================================================================== class Window_MenuStatus alias jet2735_refresh refresh unless $@ def refresh(*args, &block) self.contents = Bitmap.new(352, 96 * $game_party.members.size) jet2735_refresh(*args, &block) self.oy = 0 end def row_max return $game_party.members.size end def page_row_max return 4 end def top_row return self.oy / 96 end def top_row=(row) row = 0 if row < 0 row = row_max - 1 if row > row_max - 1 self.oy = row * 96 end alias jet7346_update_cursor update_cursor unless $@ def update_cursor(*args, &block) super jet7346_update_cursor(*args, &block) self.cursor_rect.y = (self.index - self.top_row) * 96 end end class Window_BattleStatus alias jet2735_refresh refresh unless $@ def refresh(*args, &block) self.contents = Bitmap.new(384, 32 * $game_party.members.size - 48) jet2735_refresh(*args, &block) end end Learn a Skill Items: Spoiler: CODE #=============================================================================== # Learn A Skill Items (Eventer's tool) Snippet # By Jet10985 (Jet) # Original Code by: Jens009 #=============================================================================== # This snippet will allow you make an item that will teach the actor that it # is used on a skill without all those conditional branches. # This script has: 1 customization options. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # Game_Battler: item_effective?, item_effect #=============================================================================== module LASItems # Input item id's from the database into this to label them as "level up" LEARN_A_SKILL_ITEM = { 21 => 3, # Item id => Skill id 22 => 5, # Item id => Skill id 23 => 7 # Item id => Skill id } end #=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== class Game_Battler alias jet1088_item_effective? item_effective? unless $@ def item_effective?(user, item) if LASItems::LEARN_A_SKILL_ITEM.include?(item.id) for i in 0..LASItems::LEARN_A_SKILL_ITEM.values.size if user.skill_learn?(LASItems::LEARN_A_SKILL_ITEM.values[i]) return false end end end return true if LASItems::LEARN_A_SKILL_ITEM.include?(item.id) jet1088_item_effective?(user, item) end alias jet1200_item_effect item_effect unless $@ def item_effect(user, item) if LASItems::LEARN_A_SKILL_ITEM.include?(item.id) keys = LASItems::LEARN_A_SKILL_ITEM.keys values = LASItems::LEARN_A_SKILL_ITEM.values for i in 0..keys.size user.learn_skill(values[i].to_i) if keys[i] == item.id end end jet1200_item_effect(user, item) end end Level Up Effects: Spoiler: CODE #=============================================================================== # Level Up Effects Snippet # By Jet10985 (Jet) # Help by: Yanfly, Piejamas #=============================================================================== # This snippet allows you to add extra effects to the level up process that will # happen everytime that a character levels up. # This script has: 7 customization options. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # Game_Actor: level_up # Scene_Battle: battle_end #=============================================================================== module LUEffects # Give the player maximum HP? MAX_HP = true # Heal the hp by a percentage. Leave as 0 for no effect. HP_PERCENTAGE = 0 # Give the player maximum MP? MAX_MP = true # Heal the mp by a percentage. Leave as 0 for no effect. MP_PERCENTAGE = 0 # Add an amount to variables? ADD_VARIABLES = true # Add the variable additions below, following the format i set for it. Do not # forget to add a comma after every varaible addition. VARIABLE_ADDITIONS = { 1 => 10, # variable => addition to variable 2 => 20, # variable => addition to variable 3 => 30 # variable => addition to variable } # These are common events that will be run upon level up. Just leave it empty # if you don't want any running. COMMON_EVENT_RUN = 1 end #=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== class Game_Actor alias jet5839_level_up level_up unless $@ def level_up(*args, &block) jet5839_level_up(*args, &block) @hp = maxhp unless !LUEffects::MAX_HP @mp = maxmp unless !LUEffects::MAX_MP @hp += (maxhp * (LUEffects::HP_PERCENTAGE / 100)) @mp += (maxmp * (LUEffects::MP_PERCENTAGE / 100)) if LUEffects::ADD_VARIABLES LUEffects::VARIABLE_ADDITIONS.each_pair { |variable, value| $game_variables[variable] += value } end $game_temp.common_event_id = LUEffects::COMMON_EVENT_RUN if $scene.is_a?(Scene_Battle) $game_temp.battle_common_event = true end end end class Game_Temp attr_accessor :battle_common_event end class Scene_Battle alias jet5889_battle_end battle_end unless $@ def battle_end(*args, &block) jet5889_battle_end(*args, &block) unless $game_temp.battle_common_event.nil? $game_temp.common_event_id = LUEffects::COMMON_EVENT_RUN end $game_temp.battle_common_event = nil end end Level Up Items: Spoiler: CODE #=============================================================================== # Level Up Items (Eventer's tool) Snippet # By Jet10985 (Jet) # Original Code by: Jens009 #=============================================================================== # This snippet will allow you make an item that will level up the actor that it # is used on without all those conditional branhces for each actor possibility. # This script has: 1 customization options. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # Game_Battler: item_effective?, item_effect #=============================================================================== module LevelUpItems # Input item id's from the database into this to label them as "level up" LEVEL_UP_ITEMS = [21, 30] end #=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== class Game_Battler alias jet1087_item_effective? item_effective? unless $@ def item_effective?(user, item) return false unless @exp_list[user.level + 1] != 0 return true if LevelUpItems::LEVEL_UP_ITEMS.include?(item.id) jet1087_item_effective?(user, item) end alias jet1000_item_effect item_effect unless $@ def item_effect(user, item) if LevelUpItems::LEVEL_UP_ITEMS.include?(item.id) user.change_level(user.level + 1, false) end jet1000_item_effect(user, item) end end Level Up SE: Spoiler: CODE #=============================================================================== # Level Up SE Snippet # By Jet10985 (Jet) #=============================================================================== # This snippet allows you to add a sound effect that plays when an actor levels # up in battle or by an event. # This script has: 1 customization option. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # Game_Actor: level_up #=============================================================================== module LevelUpSE # The name of the SE that will play. MUST be in the SE folder. LEVEL_UP_SE = "Heal1" end #=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== class Game_Actor alias jet3092_level_up level_up unless $@ def level_up(*args, &block) RPG::SE.new(LevelUpSE::LEVEL_UP_SE, 80, 100).play jet3092_level_up(*args, &block) end end Living Party Leader: Spoiler: CODE #=============================================================================== # Living Party Leader # By Jet10985 (Jet) # Requested By: Beleren #=============================================================================== # This script will make it so the first living party member's sprite is the # one displayed on the map. # This script has: 0 customization options. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # Game_Actor: remove_state, add_state # Game_Player: refresh #=============================================================================== class Game_Actor %w[remove_state add_state].each {|a| aStr = %Q{ alias jet4656_#{a} #{a} unless $@ def #{a}(state_id) jet4656_#{a}(state_id) $game_player.refresh if state_id == 1 end } module_eval(aStr) } end class Game_Player alias jet3746_refresh refresh unless $@ def refresh(*args, &block) if $game_party.members.size > 0 && $game_party.members[0].dead? f = $game_party.members.reject {|a| a.dead? } if f.empty? @character_name = "" @character_index = 0 else @character_name = f[0].character_name @character_index = f[0].character_index end else jet3746_refresh(*args, &block) end end end Load Alert: Spoiler: CODE #=============================================================================== # Load Alert # By Jet10985 (Jet) #=============================================================================== # This snippet will display an alert to tell the player the game is loading if # the graphics haven't been updated in a certain amount of time. # This script has: 6 customization options. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # Graphics: update #=============================================================================== module LoadAlert # How long is the wait to display the loading alert. # This is in seconds. LOAD_WAIT = 3 # This is the Loading picture to be displayed. Should be in Graphics/System # Leave as nil for text. LOAD_PIC = nil # If the above is nil, what color will the text be? LOAD_COLOR = Color.new(255, 255, 255) # If LOAD_PIC is nil, this is the text that will be displayed. LOAD_TEXT = "Loading..." # These are the coordinates to display the loading alert. LOAD_COORDS = [0, 0] # This is code to evaluate as soon as the loading is displayed. CODE_TO_EVAL = "" end #=============================================================================== # DO NOT EDIT PAST HERE UNLESS YOU KNOW WHAT TO DO #=============================================================================== module Graphics def self.last_update return (@@last_update ||= 0) end def self.last_update=(t) @@last_update = t end class << self alias jet3845_update update unless $@ def update(*args, &block) @@last_update = 0 jet3845_update(*args, &block) end end end Thread.new { sprite = Sprite.new(nil) sprite.z = 1073741823 sprite.x, sprite.y = *LoadAlert::LOAD_COORDS bitmap = (Cache.system(LoadAlert::LOAD_PIC) rescue Bitmap.new(1, 1)) if bitmap.width == 1 rect = bitmap.text_size(LoadAlert::LOAD_TEXT) bitmap.dispose bitmap = Bitmap.new(rect.width, rect.height) bitmap.font.color = LoadAlert::LOAD_COLOR bitmap.draw_text(0, 0, rect.width, rect.height, LoadAlert::LOAD_TEXT, 1) end sprite.bitmap = bitmap sprite.visible = false loop { Graphics.last_update += 1 sleep 1.0 / Graphics.frame_rate.to_f if Graphics.last_update > LoadAlert::LOAD_WAIT * Graphics.frame_rate if !sprite.visible sprite.visible = true Graphics.jet3845_update eval(LoadAlert::CODE_TO_EVAL) end elsif sprite.visible sprite.visible = false end } } Load Menu: Spoiler: CODE #=============================================================================== # Load Menu Option Snippet # By Jet10985 (Jet) # Thanks to: Woratana #=============================================================================== # This snippet adds a load option to the main menu for quick loading. # This script has: 2 customization options. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # Game_System: initialize # Window_Command: initialize, draw_item # Scene_Menu: create_command_window, update_command_selection, # update_actor_selection #=============================================================================== =begin To disable the load menu access use this command in the "script" event command change_load_access(option) option can equal either: true or false true disables the load menu, false activates it. =end module Load # This is the name of the load option LOAD_NAME = "Load" # This is where to add the load menu as a option MENU_INDEX = 5 end #=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== class Game_System attr_accessor :load_disabled alias jet6328_initialize initialize unless $@ def initialize(*args, &block) jet6328_initialize(*args, &block) @load_disabled = false end end class Game_Interpreter def change_load_access(option) $game_system.load_disabled = option end end class Window_Command < Window_Selectable alias jet4569_initialize initialize unless $@ def initialize(*args, &block) @disabled_commands = [] jet4569_initialize(*args, &block) end alias jet9374_draw_item draw_item unless $@ def draw_item(*args, &block) jet9374_draw_item(*args, &block) @disabled_commands[args[0]] = args[1].nil? || args[1] ? nil : true end def ins_command(index, text) @commands.insert(index, text) @disabled_commands.insert(index, nil) old_disabled_commands = @disabled_commands.dup self.height = (@commands.size + @column_max - 1) / @column_max * WLH + 32 @item_max = @commands.size create_contents refresh old_disabled_commands.each_index do |i| if !old_disabled_commands[i].nil? draw_item(i, false) end end end def add_command(text) ins_command(@commands.size, text) end end class Scene_Menu < Scene_Base def sort_newcommand @sorted_command ||= [] newcommand = @newcommand - @sorted_command newcommand.sort.each {|i| @menu_index += 1 if @menu_index >= i } @command_window.index = @menu_index @sorted_command = @sorted_command + @newcommand end alias jet6993_create_command_window create_command_window unless $@ def create_command_window(*args, &block) jet6993_create_command_window(*args, &block) @command_window.ins_command(Load::MENU_INDEX, Load::LOAD_NAME) @newcommand ||= [] @newcommand << Load::MENU_INDEX sort_newcommand if $game_system.load_disabled @command_window.draw_item(Load::MENU_INDEX, false) end end alias jet3943_update_command_selection update_command_selection unless $@ def update_command_selection(*args, &block) @menucomorpg_change = false if Input.trigger?(Input::C) && @command_window.index == Load::MENU_INDEX if $game_system.load_disabled Sound.play_buzzer return end Sound.play_decision $scene = Scene_File.new(false, false, false) else if Input.trigger?(Input::C) && @command_window.index > Load::MENU_INDEX @command_window.index -= 1 @menucomorpg_change = true end jet3943_update_command_selection(*args, &block) end @command_window.index += 1 if @menucomorpg_change end alias jet3446_update_actor_selection update_actor_selection unless $@ def update_actor_selection(*args, &block) @menucomorpg_change = false if Input.trigger?(Input::C) && @command_window.index > Load::MENU_INDEX @command_window.index -= 1 @menucomorpg_change = true end jet3446_update_actor_selection(*args, &block) @command_window.index += 1 if @menucomorpg_change end end Map Tint Carry-Over: Spoiler: CODE #=============================================================================== # Map Tint Carry-Over Snippet # By Jet10985 (Jet) #=============================================================================== # This snippet will make it so if the map has a tint applied when the character # enters battle, the tint will be applied to the battle screen as well. # This script has: 1 customization option. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # Scene_Map: call_battle # Scene_Battle: start #=============================================================================== module MapTint # Turning this switch on will disable the carry-over. DISABLE_SWITCH = 98 end #=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== class Game_Temp attr_accessor :battle_tint end class Scene_Map alias jet9012_call_battle call_battle unless $@ def call_battle(*args, &block) jet9012_call_battle(*args, &block) $game_temp.battle_tint = $game_map.screen.tone end end class Scene_Battle alias jet6541_start start unless $@ def start(*args, &block) if !$game_switches[MapTint::DISABLE_SWITCH] && !$game_temp.battle_tint.nil? $game_troop.screen.start_tone_change($game_temp.battle_tint, 0) end jet6541_start(*args, &block) end end Map-Based Backgrounds: Spoiler: CODE #=============================================================================== # Map Based Backgrounds Snippet # By Jet10985 (Jet) #=============================================================================== # This snippet makes the battle background based on the map the player is on. # This script has: 2 customization options. #=============================================================================== # Overwritten Methods: # Scene_Map: perform_battle_transition #------------------------------------------------------------------------------- # Aliased methods: # None #=============================================================================== module MBBBacks # These are all of the Background that will be chosen depending on the # map id. The config follows the following format: # map_id => "Background name", # don't put a comma after the last addition you make MAP_BATTLE_BACKGROUNDS = { 1 => "CrossLight", 2 => "Map 2 Transition", 3 => "you get the idea" } # This background will be used if a map_id isn't specified for the map # the player is on. MAP_BATTLE_BACKGROUNDS.default = "BattleStart" end #=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== class Spriteset_Battle def create_battleback source = Cache.system(MBBBacks::MAP_BATTLE_BACKGROUNDS[$game_map.map_id]) bitmap = Bitmap.new(Graphics.width, Graphics.height) bitmap.stretch_blt(bitmap.rect, source, source.rect) @battleback_sprite = Sprite.new(@viewport1) @battleback_sprite.bitmap = bitmap end end Menu BGM: Spoiler: CODE #=============================================================================== # Menu BGM # By Jet10985 (Jet) #=============================================================================== # This snippet will play a new bgm when the menu is open instead of # This script has: 1 customization option. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # Game_System: initialize # Scene_Menu: start #=============================================================================== =begin How to change the menu bgm: To change what bgm plays in the menu, use this in an event "Script..." command change_menu_bgm(file) file = the name of the new bgm file. This should be in quotes, like "Town4" If you don't include file, like so: change_menu_bgm, then it will use the default bgm in the config below =end module MenuBGM # This is the default menu bgm file MENU_BGM = "Town2" end #=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== class Game_System attr_accessor :menu_bgm alias jet1366_initialize initialize unless $@ def initialize(*args, &block) jet1366_initialize(*args, &block) @menu_bgm = MenuBGM::MENU_BGM end end class Game_Temp attr_accessor :came_from_map end class Scene_Map alias jet1346_terminate terminate unless $@ def terminate(*args, &block) $game_temp.came_from_map = true jet1346_terminate(*args, &block) end end class Scene_Menu alias jet1824_start start unless $@ def start(*args, &block) jet1824_start(*args, &block) if $game_temp.came_from_map $game_temp.came_from_map = false RPG::BGM.stop RPG::BGM.new($game_system.menu_bgm, 80, 100).play end end alias jet8224_terminate terminate unless $@ def terminate(*args, &block) if $scene.is_a?(Scene_Map) RPG::BGM.stop $game_map.autoplay end jet8224_terminate(*args, &block) end end class Game_Interpreter def change_menu_bgm(file = MenuBGM::MENU_BGM) $game_system.menu_bgm = file end end Mimic Event: Spoiler: CODE #=============================================================================== # Mimic Event Snippet # By Jet10985 (Jet) # Requested by: Touchfuzzy #=============================================================================== # This snippet will let you make evhts that will move with the player. As in, # they press up, and both the player and event will move. # This script has: 0 customization options. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # Game_Character: move_up, move_down, move_left, move_right #=============================================================================== =begin To make a Mimic event, just add the word: mimic in an event comment, using the "Comment..." command. To make the event mimic, but move down when the player moves up and move up when the player moves down, just add the word: copycat in an event comment, using the "Comment..." command. =end class Game_Event def check_event_comments(regexp) return false if @list.nil? or @list.size <= 0 for item in @list if item.code == 108 or item.code == 408 if item.parameters[0].match(regexp) return true end end end return false end end class Game_Character alias jet9112_move_up move_up unless $@ def move_up(*args, &block) jet9112_move_up(*args, &block) if self.is_a?(Game_Player) && !@move_failed for e in $game_map.events.values if e.check_event_comments("mimic") @move_route = RPG::MoveRoute.new @move_route.list = [RPG::MoveCommand.new(4), RPG::MoveCommand.new(0)] @move_route.repeat = false @move_route.wait = false e.force_move_route(@move_route) if e.passable?(e.x, e.y - 1) end if e.check_event_comments("copycat") @move_route = RPG::MoveRoute.new @move_route.list = [RPG::MoveCommand.new(1), RPG::MoveCommand.new(0)] @move_route.repeat = false @move_route.wait = false e.force_move_route(@move_route) if e.passable?(e.x, e.y + 1) end end end end alias jet9113_move_left move_left unless $@ def move_left(*args, &block) jet9113_move_left(*args, &block) if self.is_a?(Game_Player) && !@move_failed for e in $game_map.events.values if e.check_event_comments("mimic") @move_route = RPG::MoveRoute.new @move_route.list = [RPG::MoveCommand.new(2), RPG::MoveCommand.new(0)] @move_route.repeat = false @move_route.wait = false e.force_move_route(@move_route) if e.passable?(e.x - 1, e.y) end if e.check_event_comments("copycat") @move_route = RPG::MoveRoute.new @move_route.list = [RPG::MoveCommand.new(3), RPG::MoveCommand.new(0)] @move_route.repeat = false @move_route.wait = false e.force_move_route(@move_route) if e.passable?(e.x, e.y + 1) end end end end alias jet9114_move_right move_right unless $@ def move_right(*args, &block) jet9114_move_right(*args, &block) if self.is_a?(Game_Player) && !@move_failed for e in $game_map.events.values if e.check_event_comments("mimic") @move_route = RPG::MoveRoute.new @move_route.list = [RPG::MoveCommand.new(3), RPG::MoveCommand.new(0)] @move_route.repeat = false @move_route.wait = false e.force_move_route(@move_route) if e.passable?(e.x + 1, e.y) end if e.check_event_comments("copycat") @move_route = RPG::MoveRoute.new @move_route.list = [RPG::MoveCommand.new(2), RPG::MoveCommand.new(0)] @move_route.repeat = false @move_route.wait = false e.force_move_route(@move_route) if e.passable?(e.x, e.y + 1) end end end end alias jet9115_move_down move_down unless $@ def move_down(*args, &block) jet9115_move_down(*args, &block) if self.is_a?(Game_Player) && !@move_failed for e in $game_map.events.values if e.check_event_comments("mimic") @move_route = RPG::MoveRoute.new @move_route.list = [RPG::MoveCommand.new(1), RPG::MoveCommand.new(0)] @move_route.repeat = false @move_route.wait = false e.force_move_route(@move_route) if e.passable?(e.x, e.y + 1) end if e.check_event_comments("copycat") @move_route = RPG::MoveRoute.new @move_route.list = [RPG::MoveCommand.new(4), RPG::MoveCommand.new(0)] @move_route.repeat = false @move_route.wait = false e.force_move_route(@move_route) if e.passable?(e.x, e.y - 1) end end end end end Miscellaneous Options: Spoiler: CODE #=============================================================================== # Miscellaneous Options # By Jet10985 (Jet) #=============================================================================== # This snippet will allow you to perform additional customization on some # of the "Finer Details" of your game, not available in the Editor. # This script has: 15 customization options. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # Scene_Title: check_continue # Scene_File: make_filename # Scene_Base: main, start, perform_transition, post_start #=============================================================================== module MiscellaneousOptions #============================================================================= # Font Options #============================================================================= #----------------------------------------------------------------------------- # This is what font the game will use by default # You may use a single font, or multiples in the form of an array # When using multiple fonts, the game will go through the array until # it finds a font the player has installed. #----------------------------------------------------------------------------- Font.default_name = ["Verdana", "Arial", "Courier New"] #----------------------------------------------------------------------------- # This is how big font is by default. #----------------------------------------------------------------------------- Font.default_size = 20 #----------------------------------------------------------------------------- # This determines if text is drawn in bold or not, by default. #----------------------------------------------------------------------------- Font.default_bold = false #----------------------------------------------------------------------------- # This determines if text is drawn in italic or not, by default. #----------------------------------------------------------------------------- Font.default_italic = false #----------------------------------------------------------------------------- # This determines if text is drawn with a shadow or not, by default. #----------------------------------------------------------------------------- Font.default_shadow = true #----------------------------------------------------------------------------- # This determines what color text if drawn in by default. #----------------------------------------------------------------------------- Font.default_color = Color.new(255, 255, 255) #============================================================================= # Windows Options #============================================================================= #----------------------------------------------------------------------------- # This determines if the Game's Process Priority will be heightened to "High" # at startup. This may, or may not, help some lag issues. #----------------------------------------------------------------------------- HIGH_PROCESS = true #----------------------------------------------------------------------------- # This determines if the Mouse Cursor should be hidden will inside the game. # This only applies if the mouse is inside the Game's window. #----------------------------------------------------------------------------- HIDE_MOUSE = false #----------------------------------------------------------------------------- # This determines if the window should be resizable. # By default, the game window is not resizable without script calls. # Note this does not increase the Game's graphic displaying abilities, # and will cause graphics stretching/shrinking. #----------------------------------------------------------------------------- ALLOW_RESIZING = false #============================================================================= # Game Options #============================================================================= #----------------------------------------------------------------------------- # This determines if Save Files will be saved into the AppData folder # in windows, instead of the directory of the game. # In Windows XP: C:\Documents and Settings\UserName\Application Data\GAME_NAME # In Windows Vista/7: C:\Users\UserName\AppData\Roaming\GAME_NAME #----------------------------------------------------------------------------- SAVE_IN_APPDATA = true #----------------------------------------------------------------------------- # What is your game's name? This will only be used if you use SAVE_IN_APPDATA #----------------------------------------------------------------------------- GAME_NAME = "Jet Is Awesome" #----------------------------------------------------------------------------- # Would you like to have a confirmation window ensuring if the player would # like to Reset the game? (Using the F12 Soft Reset) #----------------------------------------------------------------------------- CONFIRM_RESET = true #----------------------------------------------------------------------------- # If you are using CONFIRM_RESET, what should the confirmation window say? #----------------------------------------------------------------------------- RESET_TEXT = "Are you sure you wish to reset? Unsaved data will be lost." #----------------------------------------------------------------------------- # Would you like to have a confirmation window ensuring if the player would # like to exit the game? #----------------------------------------------------------------------------- CONFIRM_EXIT = true #----------------------------------------------------------------------------- # If you are using CONFIRM_EXIT, what should the confirmation window say? #----------------------------------------------------------------------------- EXIT_TEXT = "Are you sure you wish to exit? Unsaved data will be lost." end #=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== module MiscellaneousOptions def self.handle a = Win32API.new('kernel32', 'GetPrivateProfileString', 'pppplp', 'l') b = Win32API.new('user32', 'FindWindow', 'pp', 'i') a.call("Game", "Title", "", title = "\0" * 256, 256, ".//Game.ini") return b.call("RGSS Player", title.delete!("\0")) end end if MiscellaneousOptions::HIDE_MOUSE Win32API.new('user32', 'ShowCursor', 'i', 'i').call(0) end if MiscellaneousOptions::HIGH_PROCESS Win32API.new('kernel32','SetPriorityClass','pi','i').call(-1, 256) end if MiscellaneousOptions::ALLOW_RESIZING Win32API.new('user32', 'SetWindowLong', 'lll', 'l').call( MiscellaneousOptions.handle, -16, 0x10C70000|0x00080000) end class Reset < Exception end class Scene_Title alias jet1824_check_continue check_continue unless $@ def check_continue(*args, &block) if MiscellaneousOptions::SAVE_IN_APPDATA f = "#{ENV['APPDATA']}\\#{MiscellaneousOptions::GAME_NAME}" (Dir.mkdir(f) rescue nil) unless File.exist?(f) (Dir.mkdir("#{f}\\Saves") rescue nil) unless File.exist?("#{f}\\Saves") @continue_enabled = Dir.entries("#{f}\\Saves").size > 2 else jet1824_check_continue(*args, &block) end end end class Scene_File alias jet1735_make_filename make_filename unless $@ def make_filename(file_index) if MiscellaneousOptions::SAVE_IN_APPDATA f = "#{ENV['APPDATA']}\\#{MiscellaneousOptions::GAME_NAME}" return "#{f}\\Saves\\Save#{file_index}.rvdata" else jet1735_make_filename(file_index) end end end class Scene_Base alias jet1835_main main unless $@ def main(*args, &block) begin jet1835_main(*args, &block) rescue SystemExit if MiscellaneousOptions::CONFIRM_EXIT a = MiscellaneousOptions::EXIT_TEXT b = "Confirmation" c = Win32API.new('user32', 'MessageBox', 'lppl', 'i').call(0, a, b, 36) if c != 6 @jet_retry_no_method = true retry else exit end else exit end rescue Reset if MiscellaneousOptions::CONFIRM_RESET a = MiscellaneousOptions::RESET_TEXT b = "Confirmation" c = Win32API.new('user32', 'MessageBox', 'lppl', 'i').call(0, a, b, 36) if c != 6 @jet_retry_no_method = true retry else raise Reset end else raise Reset end end end alias jet1087_s start unless $@ def start(*args, &block) jet1087_s(*args, &block) if [nil, false].include?(@jet_retry_no_method) end alias jet1087_p_t perform_transition unless $@ def perform_transition(*args, &block) jet1087_p_t(*args, &block) if [nil, false].include?(@jet_retry_no_method) end alias jet1087_p_s post_start unless $@ def post_start(*args, &block) jet1087_p_s(*args, &block) if [nil, false].include?(@jet_retry_no_method) @jet_retry_no_method = false end end Morphing States: Spoiler: CODE #=============================================================================== # Morphing States # By Jet10985 (Jet) # Requested by: Tevak #=============================================================================== # This script will allows you to make states that will morph into other states # after a certain amount of turns. # This script has: 1 customization option. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # RPG::States: initialize # Scene_Battle: turn_end # Game_Battler: initialize, remove_state #=============================================================================== =begin How to use: To make a morphing state, go to the state in the database. In the state's notebox, make a tag like this: <evolve #1 #2> replace #1 with the number of turns it will take to morph into the new state. replace #2 with the id of the state that it will morph into. An example is like this: <evolve 1 3> By default, this means poison will evolve into darkness after a single turn. Make sure to include the <> or else it won't work. =end module Jet_MorphingStates # If true, a message will display when a state morphs saying # "actor name"'s "state name" has morphed into "new state name". # If false, a message will display with the default database message of # obtaining the new state. USE_CUSTOM_MORPH_MESSAGE = false end #=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== class RPG::State attr_accessor :turns_had alias jet7832_initialize initialize unless $@ def initialize(*args, &block) jet7832_initialize(*args, &block) @turns_had = 0 end def morph_state if @morph_state.nil? txt = (self.note =~ /<(?:evolve)[ ]*(\d+)[ ]*(\d+)>/i).nil? if !txt @morph_state = [$1.to_i, $2.to_i] else @morph_state = [nil, nil] end end return @morph_state end end class Game_Battler attr_accessor :state_turns_had alias jet8492_initialize initialize unless $@ def initialize(*args, &block) jet8492_initialize(*args, &block) @state_turns_had = {} end alias jet4782_remove_state remove_state unless $@ def remove_state(*args, &block) jet4782_remove_state(*args, &block) if @state_turns_had.keys.include?($data_states[*args]) @state_turns_had[$data_states[*args]] = 0 end end def state_turns_had_add_one(state) return if state.nil? if @state_turns_had[state].nil? @state_turns_had[state] = 1 else @state_turns_had[state] += 1 end end end class Scene_Battle alias jet5743_turn_end turn_end unless $@ def turn_end(*args, &block) for member in $game_party.members next if member.states.empty? for state in member.states next if state.morph_state.include?(nil) next if state.nil? member.state_turns_had_add_one(state) if member.state_turns_had[state] >= state.morph_state[0] member.remove_state(state.id) member.add_state(state.morph_state[1]) if Jet_MorphingStates::USE_CUSTOM_MORPH_MESSAGE @message_window.add_instant_text(member.name + "'s" + " #{state.name}" + " has morphed into " + "#{$data_states[state.morph_state[1]].name}.") else @message_window.add_instant_text(member.name + "#{$data_states[state.morph_state[1]].message1}") end wait(60) end end end for member in $game_troop.members next if member.states.empty? for state in member.states next if state.morph_state.include?(nil) member.state_turns_had_add_one(state) if member.state_turns_had[state] >= state.morph_state[0] member.remove_state(state.id) member.add_state(state.morph_state[1]) if Jet_MorphingStates::USE_CUSTOM_MORPH_MESSAGE @message_window.add_instant_text(member.original_name + " " + member.letter + "'s" + " #{state.name} " + "has morphed into " + "#{$data_states[state.morph_state[1]].name}.") else @message_window.add_instant_text(member.original_name + " " + member.letter + "#{$data_states[state.morph_state[1]].message2}") end wait(60) end end end jet5743_turn_end(*args, &block) end end Move Events: Spoiler: CODE #=============================================================================== # Move Events # By Jet10985 (Jet) # Inspired by: Ezaxess #=============================================================================== # This snippet will allow you to move an event completely from one map # to the other. This means they are eliminated from the original map and # recreated in the new map. # This script has: 0 customization options. #=============================================================================== # Overwritten Methods: # Game_Map: setup #------------------------------------------------------------------------------- # Aliased methods: # Scene_Title: load_database # Scene_File: write_save_data, read_save_data #=============================================================================== =begin To move an event: Use this in an event's "Script..." command: move_event(map_id, new_map_id, ev_id, x, y) map_id = the location of the event you want to move new_map_id = the location you want to move the event ev_id = the event id you want to move. Use 0 to specify the calling event x = the x-coordinate to move the event to y = the y-coordinate to move the event to =end class Game_Interpreter def move_event(map_id, new_map_id, ev_id, x, y) if ev_id == 0 event = get_character(0).event $data_maps[sprintf("%03d",$game_map.map_id)].events.delete(event.id) f = get_character(0) $game_map.events.each_pair {|k, v| if v == f $game_map.events.delete(k) end } $scene.spriteset.character_sprites.each {|h| if h.character == f $scene.spriteset.character_sprites.delete(h) h.dispose h = nil end } else event = $data_maps[sprintf("%03d", map_id)].events[ev_id] $data_maps[sprintf("%03d", map_id)].events.delete(ev_id) end event.x, event.y = x, y q = $data_maps[sprintf("%03d", new_map_id)].events i = 1 until q[i].nil? i += 1 end q[i] = event event.id = i if $game_map.map_id == new_map_id game_ev = Game_Event.new(new_map_id, event) $game_map.events[q.size + 2] = game_ev sprites = $scene.spriteset.character_sprites sprites.push(Sprite_Character.new(nil, game_ev)) sprites[-1].viewport = sprites[0].viewport end end alias jet2734_command_end command_end unless $@ def command_end(*args, &block) @list = nil jet2734_command_end(*args, &block) unless $game_map.events[@event_id].nil? end end class Scene_Map attr_accessor :spriteset end class Spriteset_Map attr_accessor :character_sprites end class Game_Event attr_reader :event end class Scene_Title alias jet3745_load_database load_database unless $@ def load_database(*args, &block) jet3745_load_database(*args, &block) $data_maps = {} 999.times {|i| id = sprintf("%03d", i) data = "Data/Map#{id}.rvdata" begin data = load_data(data) $data_maps[id] = data rescue next end } end end class Game_Map def setup(map_id) @map_id = map_id @map = $data_maps[sprintf("%03d", @map_id)] @display_x = 0 @display_y = 0 @passages = $data_system.passages referesh_vehicles setup_events setup_scroll setup_parallax @need_refresh = false end end class Scene_File alias jet3734_write_save_data write_save_data unless $@ def write_save_data(*args, &block) jet3734_write_save_data(*args, &block) Marshal.dump($data_maps, args[0]) end alias jet3743_read_save_data read_save_data unless $@ def read_save_data(*args, &block) jet3743_read_save_data(*args, &block) $data_maps = Marshal.load(args[0]) end end Multiple Balloon Pages: Spoiler: CODE #=============================================================================== # Multiple Balloon Pages # By Jet10985 (Jet) # Requested by: LovelyBlue #=============================================================================== # This snippet will allow you to change which Balloon Sheet is used for # the "Show Balloon" event command, by changing a variable. # All balloon sheets should be in the Graphics/System folder. # This script has: 2 customization options. #=============================================================================== # Overwritten Methods: # Sprite_Character: start_balloon #------------------------------------------------------------------------------- # Aliased methods: # None #=============================================================================== module MultiBalloon # This is the variable whose value will determine which balloon sheet is used BALLOON_VARIABLE = 42 # These is the value-to-sheet cconfiguration. It follows this format: # value => "Sheet" # value is the value of the BALLOON_VARIABLE in-game # "sheet" is the name of the balloon sheet to be used when the variable is # equal to that value. BALLOON_SHEETS = { 0 => "Balloon", 1 => "Other Balloons", 2 => "Other Other Balloons" } end #=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== class Sprite_Character def start_balloon dispose_balloon @balloon_duration = 8 * 8 + BALLOON_WAIT @balloon_sprite = ::Sprite.new(viewport) var = $game_variables[MultiBalloon::BALLOON_VARIABLE] sheet = MultiBalloon::BALLOON_SHEETS[var] @balloon_sprite.bitmap = Cache.system(sheet) @balloon_sprite.ox = 16 @balloon_sprite.oy = 32 update_balloon end end No Actor EXP: Spoiler: CODE #=============================================================================== # No Actor EXP Snippet # By Jet10985 (Jet) # Help by: OriginalWij #=============================================================================== # This snippet allows you to define actors throughout the game that will not # gain exp AT ALL. Note: They can still level up through the event command. # This script has: 1 customization option. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # Game_Actor: change_exp # Game_System: initialize #=============================================================================== =begin Adding Actors: To add Actors to the list of actors that don't gain exp use: no_exp_gain(actor) where actor is the id of the actor you don't want gaining exp. Removing Actors: To allow an actor to gain exp again, use: yes_exp_gain(actor) where actor is the id of the actor you want to gain exp again. =end module NoActorEXP # These are actors that will not gain exp by default. They # can be removed from here by using the yes_exp_gain(actor) NO_ACTOR_EXP = [6, 7, 8] # A state that will prevent exp gain until cured. NO_EXP_STATE = 17 end #=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== class Game_Actor alias jet1999_change_exp change_exp unless $@ def change_exp(*args, &block) if $game_system.no_exp_actors != nil unless $game_system.no_exp_actors.include?(self.id) unless @states.include?(NoActorEXP::NO_EXP_STATE) jet1999_change_exp(*args, &block) end end end end end class Game_System attr_accessor :no_exp_actors alias jet1092_initialize initialize unless $@ def initialize(*args, &block) jet1092_initialize(*args, &block) @no_exp_actors = NoActorEXP::NO_ACTOR_EXP.clone end end class Game_Interpreter def no_exp_gain(actor) unless $game_system.no_exp_actors.include?(actor) $game_system.no_exp_actors.push(actor) end end def yes_exp_gain(actor) if $game_system.no_exp_actors.include?(actor) $game_system.no_exp_actors.delete(actor) end end end No Encounters Conditions: Spoiler: CODE #=============================================================================== # No Encounters Conditions Snippet # By Jet10985 (Jet) # Inspired by: harmonic, Touchfuzzy #=============================================================================== # This snippet will let you make conditions that will make it so the player will # have no random encounters on the map. # NOTE: If you are using Jet's time system, put this script below that. # This script has: 3 customization options. #=============================================================================== # Overwritten Methods: # RPG::Map: encounter_list (if my time system is NOT used) #------------------------------------------------------------------------------- # Aliased methods: # RPG::Map: encounter_list (if my time system IS used) #=============================================================================== module NoEncounter # These are armor id's that will make it so there are no encounters. NO_ENCOUNTER_EQUIPS_ARMOR = [3, 4, 5] # These are weapons id's that will make it so there are no encounters. NO_ENCOUNTER_EQUIPS_WEAPONS = [9, 10, 11] # This a switch that will make it so there are no encounters. NO_ENCOUNTER_SWITCH = 63 end #=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== class RPG::Map def no_equip_encounter @stuff = [] for i in 0...NoEncounter::NO_ENCOUNTER_EQUIPS_ARMOR.size - 1 @stuff.push((!!$game_party.members.find {|m| m.equips.include?( $data_armors[NoEncounter::NO_ENCOUNTER_EQUIPS_ARMOR[i]])})) end for i in 0...NoEncounter::NO_ENCOUNTER_EQUIPS_WEAPONS.size - 1 @stuff.push((!!$game_party.members.find {|m| m.equips.include?( $data_weapons[NoEncounter::NO_ENCOUNTER_EQUIPS_WEAPONS[i]])})) end return @stuff.include?(true) end alias jet9043_encounter_list encounter_list unless $@ def encounter_list(*args, &block) if $game_switches[NoEncounter::NO_ENCOUNTER_SWITCH] || no_equip_encounter return [] else jet9043_encounter_list(*args, &block) end end end No Failure Display: Spoiler: CODE #=============================================================================== # No Failure Display Snippet # By Jet10985 (Jet) #=============================================================================== # This snippet will allow you to designate skills that will not display the fail # messege. Useful for skills that work through common events. # This script has: 1 customization options. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # Scene_Battle: display_failure #=============================================================================== module NoFailureDisplay # These skills will not show the failure messege. NO_FAILURE_DISPLAY = [3, 6, 2] end #=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== class Scene_Battle alias jet5789_display_failure display_failure unless $@ def display_failure(*args, &block) if args[1].is_a?(RPG::Skill) if !NoFailureDisplay::NO_FAILURE_DISPLAY.include?(args[1].id) jet5789_display_failure(*args, &block) end end end end No More Sprint: Spoiler: CODE #=============================================================================== # No More Sprint Snippet # By Jet10985 (Jet) #=============================================================================== # This snippet will make it so players can no longer sprint. Ever. # This script has: 0 customization options. #=============================================================================== # Overwritten Methods: # Game_Player: dash? #------------------------------------------------------------------------------- # Aliased methods: # None #=============================================================================== class Game_Player def dash? return false end end One Press Sprint: Spoiler: CODE #=============================================================================== # Switch Sprint Snippet # By Jet10985 (Jet) #=============================================================================== # This snippet will make it so players will always be sprinting if a certain # switch is on. # This script has: 0 customization options. #=============================================================================== # Overwritten Methods: # Game_Player: dash? #------------------------------------------------------------------------------- # Aliased methods: # Scene_Map: update #=============================================================================== module SwitchToDash # This is the switch id that should be turned on for an auto-sprint. SWITCH_ID = 111 end #=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== class Game_Player def dash? return false if @move_route_forcing return false if $game_map.disable_dash? return false if in_vehicle? return true if Input.press?(Input::A) return $game_switches[SwitchToDash::SWITCH_ID] end end Parameter Icons: Spoiler: CODE #=============================================================================== # Parameter Icons Snippet # By Jet10985 (Jet) #=============================================================================== # This snippet allows you to add icons next to parameter names whenever they are # shownn in windows. # This script has: 4 customization options. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # Window_Base: draw_actor_parameter #=============================================================================== module ParamIcons # Icon shown next to Attack ATK_ICON = 132 # Icon shown next to Defence DEF_ICON = 52 # Icon shown next to Agility AGI_ICON = 48 # Icon shown next to Spirit SPI_ICON = 133 end #=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== class Window_Base alias jet1823_draw_actor_parameter draw_actor_parameter unless $@ def draw_actor_parameter(actor, x, y, type) case type when 0 parameter_icon = ParamIcons::ATK_ICON when 1 parameter_icon = ParamIcons::DEF_ICON when 2 parameter_icon = ParamIcons::SPI_ICON when 3 parameter_icon = ParamIcons::AGI_ICON end self.draw_icon(parameter_icon, x - 25, y) jet1823_draw_actor_parameter(actor, x, y, type) end end Party Leader Changing: Spoiler: CODE #=============================================================================== # Party Leader Changing # By Jet10985 (Jet) #=============================================================================== # This snippet will allow the player to shift which party member is the lead # actor while on map. This creates the ffect of the player's graphic # changing on the map, since it display the lead actor's graphic. # This script has: 3 customization options. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # Scene_Map: update #=============================================================================== module PartyLeaderSwitch # Pressing this button will move the first actor to the last slot, # and move all others up a slot SWITCH_LEFT = Input::L # Pressing this button will move the last actor to the front slot, # and move all others back a slot SWITCH_RIGHT = Input::R # This is the id of a switch that can be used to disable leader switching DISABLE_SWITCHING_SWITCH = 34 end #=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== class Game_Party attr_accessor :actors end class Scene_Map alias jet8300_update update unless $@ def update(*args, &block) jet8300_update(*args, &block) update_party_button_switch end def update_party_button_switch return if $game_switches[PartyLeaderSwitch::DISABLE_SWITCHING_SWITCH] if Input.trigger?(PartyLeaderSwitch::SWITCH_LEFT) f = $game_party.actors.reverse!.pop $game_party.actors.reverse!.push(f) $game_player.refresh elsif Input.trigger?(PartyLeaderSwitch::SWITCH_RIGHT) f = $game_party.members[$game_party.actors.size - 1] $game_party.actors.pop $game_party.actors.unshift(f.id) $game_player.refresh end end end Pause Menu: Spoiler: CODE #=============================================================================== # Pause Menu Snippet # By Jet10985 (Jet) #=============================================================================== # This snippet will allow you make a "Paused" menu that can replace the old # menu for simpler games, or just be an add-on to look nice. # This script has: 3 customization options. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # Scene_Map: update, update_call_menu #=============================================================================== module PauseMenu # The button to call the pause menu. Only active if # REPLACE_MENU is false PAUSE_TRIGGER = Input::L # Replace the regular menu with pause menu? REPLACE_MENU = false # This is what the paused menu will say. PAUSED_TEXT = "Paused" end #=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== class Window_Paused < Window_Base def initialize(text = PauseMenu::PAUSED_TEXT) f = Bitmap.new(1, 1) width = f.text_size(text).width f.dispose super(0, Graphics.height / 2 - 28, width + 32, 56) set_text(text) end def set_text(text, align = 1) if text != @text or align != @align self.contents.clear self.contents.font.color = normal_color self.contents.draw_text(0, 0, self.width - 16, WLH, text, align) @text = text @align = align end end end class Scene_Pause < Scene_Base def start super create_menu_background create_paused_window end def create_paused_window @paused_window = Window_Paused.new end def terminate super @paused_window.dispose dispose_menu_background end def update super update_menu_background if Input.trigger?(Input::B) Sound.play_cancel $scene = Scene_Map.new end end end class Scene_Map alias jet5838_update update unless $@ def update(*args, &block) jet5838_update(*args, &block) update_paused_menu if !PauseMenu::REPLACE_MENU end def update_paused_menu if PauseMenu::REPLACE_MENU trig = Input::B else trig = PauseMenu::PAUSE_TRIGGER end if Input.trigger?(trig) return if $game_map.interpreter.running? $scene = Scene_Pause.new end end alias jet5899_update_call_menu update_call_menu unless $@ def update_call_menu(*args, &block) if PauseMenu::REPLACE_MENU update_paused_menu else jet5899_update_call_menu(*args, &block) end end end Percentage Of Damage: Spoiler: CODE #=============================================================================== # Percentage of Damage Snippet # By Jet10985 (Jet) # Help by: Mithran, OriginalWij #=============================================================================== # This snippet will allow you to set items and skills to deal a percentage of # remaining hp/mp instead of a random amount. # This script has: 0 customization options. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # Game_Battler: make_args[1]_damage_value #=============================================================================== =begin How To Use: To set a skill/item to do a percentage of hp/mp, in the item/skills notebox put <percentage ##> ## = the percentage that will be dealt/healed if you want to heal, make the ## a negative number. EX: in Potion's notebox, i put <percentage -50> Now, Potions will heal 50% of the targets health. -------------------------------------------------------------------------------- To make an enemy have an invulnerability to skills like this, put this in their notebox: <no perc> =end class RPG::UsableItem def percentage_damage if @percent_damage.nil? @percent_damage = note[/<(?:percentage)[ ]*(\d+)>/i].nil? ? 0 : $1.to_i end return @percent_damage end end class Game_Battler alias jet3204_make_obj_damage_value make_obj_damage_value unless $@ def make_obj_damage_value(*args, &block) if !args[1].percentage_damage.nil? if args[1].percentage_damage > 0 && !(self.is_a?(Game_Enemy) && no_perc?) if args[1].damage_to_mp damage = (self.mp * args[1].percentage_damage) / 100 @mp_damage = damage else damage = (self.hp * args[1].percentage_damage) / 100 @hp_damage = damage end elsif args[1].percentage_damage < 0 if args[1].damage_to_mp damage = (self.maxmp * args[1].percentage_damage) / 100 @mp_damage = damage else damage = (self.maxhp * args[1].percentage_damage) / 100 @hp_damage = damage end end else jet3204_make_obj_damage_value(*args, &block) end end end class Game_Enemy def no_perc? return (enemy.note =~ /<no perc>/i).nil? end end Pharmacology Items: Spoiler: CODE #=============================================================================== # Pharmacology Items # By Jet10985 (Jet) # Requested By: TheDrifter #=============================================================================== # This snippet will allow you to specify items which will have the pharmacology # effect applied, instead of having every item have it applied. # This script has: 1 customization option. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # Game_Actor: pharmacology # Game_Battler: calc_hp_recovery, calc_mp_recovery #=============================================================================== =begin To make an item have the pharmacology effect, put this in the item notebox: <do pharm> =end module PharmOpts # Do you want pharmacology to only apply in battle? NO_MENU_PHARM = true end #=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== class RPG::Item def do_pharm @do_pharm ||= !(self.note =~ /<do[ ]*pharm>/i).nil? end end class Game_Actor alias jet1824_pharmacology pharmacology unless $@ def pharmacology(*args, &block) return false if !$scene.is_a?(Scene_Battle) && PharmOpts::NO_MENU_PHARM jet1824_pharmacology(*args, &block) end end class Game_Battler alias jet1724_calc_hp_recovery calc_hp_recovery unless $@ def calc_hp_recovery(user, item) f = jet1724_calc_hp_recovery(user, item) return (user.pharmacology && !item.do_pharm) ? f / 2 : f end alias jet1724_calc_mp_recovery calc_mp_recovery unless $@ def calc_mp_recovery(user, item) f = jet1724_calc_mp_recovery(user, item) return (user.pharmacology && !item.do_pharm) ? f / 2 : f end end Pre-Caching Images: Spoiler: CODE #=============================================================================== # Pre-Caching Images # By Jet10985 (Jet) #=============================================================================== # This snippet will pre-cache all images at the beginning of the game to # quicken the loading of bitmaps in-game. # This script has: 0 customization options. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # Scene_Title: initialize #=============================================================================== class Scene_Title alias jet1835_initialize initialize unless $@ def initialize(*args, &block) do_pre_cache jet1835_initialize(*args, &block) end def do_pre_cache return if !File.directory?("Graphics") g_array = Dir.entries("Graphics") g_array.each {|a| next if [".", ".."].include?(a) if !File.directory?("Graphics/#{a}") Cache.load_bitmap("Graphics/", a) rescue next next end file = Dir.entries("Graphics/#{a}") file.each {|b| next if [".", ".."].include?(b) if File.directory?("Graphics/#{a}/#{b}") g_array.push("#{a}/#{b}") next end Cache.load_bitmap("Graphics/#{a}/", b) rescue next } } end end Prevent Text Skipping: Spoiler: CODE #=============================================================================== # Prevent Text Skipping # By Jet10985 (Jet) #=============================================================================== # This script will make it so you can specify text that can't be skipped using # "speed up" keys. # This script has: 1 customization option. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # Window_Message: update_show_fast. start_message, convert_special_characters #=============================================================================== module NoSkips # This is what needs to be put in a message to make it non-skippable. # This should usually start with a \ NO_SKIP_MARKER = '\s' end #=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== class Window_Message alias jet3646_update_show_fast update_show_fast unless $@ def update_show_fast(*args, &block) jet3646_update_show_fast(*args, &block) @show_fast = false if (@no_skip ||= false) end alias jet7322_start_message start_message unless $@ def start_message(*args, &block) @no_skip = false jet7322_start_message(*args, &block) end alias jet3745_convert_special_characters convert_special_characters unless $@ def convert_special_characters(*args, &block) jet3745_convert_special_characters(*args, &block) @text.gsub!(/#{"\\" + NoSkips::NO_SKIP_MARKER}/i) { @no_skip = true; "" } end end Pushable Events: Spoiler: CODE #=============================================================================== # Pushable Events # By Jet10985 (Jet) #=============================================================================== # This script will allow you to make events pushable, meaning when a button # is pressed, the event will move in the direction the player is facing # This script has: 3 customization options. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # Game_Event: update #=============================================================================== =begin To make an event pushable, place this in an event "Comment" pushable =end module PushingEvent # This is the button pressed to push a push event PUSH_BUTTON = Input::C # Do you want an SE played when the player pushes an event? DO_PUSH_SE = true # This is the SE played if the above is true PUSH_SE = "Push" end #=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== class Game_Character def facing?(ev) return true if ev.direction == 2 && ev.y <= self.y && ev.x == self.x return true if ev.direction == 4 && ev.x >= self.x && ev.y == self.y return true if ev.direction == 6 && ev.x <= self.x && ev.y == self.y return true if ev.direction == 8 && ev.y >= self.y && ev.x == self.x return false end def dist_by_grid(ev) x = (self.x - ev.x) y = (self.y - ev.y) return (x - y).abs end end class Game_Event def check_com(string) return false if @list.nil? or @list.size <= 0 regexp = /(?:#{string})/i for item in @list if item.code == 108 or item.code == 408 w = !item.parameters[0][regexp].nil? end return w if !w.nil? end return false end alias jet2345_update update unless $@ def update(*args, &block) jet2345_update(*args, &block) update_push if check_com("pushable") end def update_push return unless dist_by_grid($game_player) == 1 return unless facing?($game_player) return if @erased return if $game_map.interpreter.running? return if moving? return if @trigger == 3 return unless Input.press?(PushingEvent::PUSH_BUTTON) moveroute = RPG::MoveRoute.new moveroute.skippable = true moveroute.repeat = false dir = 0 dir = $game_player.direction / 2 if $game_player.direction % 2 == 0 moveroute.list = [RPG::MoveCommand.new(dir), RPG::MoveCommand.new(0)] force_move_route(moveroute) RPG::SE.new(PushingEvent::PUSH_SE, 80, 100).play if PushingEvent::DO_PUSH_SE end end Quick Turning: Spoiler: CODE #=============================================================================== # Quick Turning # By Jet10985 (Jet) #=============================================================================== # This script will allow the player change their facing direction without # having to move the player. # This script has: 1 customization option. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # Game_Player: move_by_input #=============================================================================== module QuickTurn # This is the button that needs to be held to turn without moving. TURN_BUTTON = Input::CTRL end #=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== class Game_Player alias jet3756_move_by_input move_by_input unless $@ def move_by_input(*args, &block) if Input.press?(QuickTurn::TURN_BUTTON) set_direction(Input.dir4) else jet3756_move_by_input(*args, &block) end end end Random Battle Transition: Spoiler: CODE #=============================================================================== # Random Battle Transition Snippet # By Jet10985 (Jet) #=============================================================================== # This snippet makes the battle transition random. The name is self-explanatory. # All the transitions MUST be in the Graphics/System folder. # This script has: 1 customization option. #=============================================================================== # Overwritten Methods: # Scene_Map: perform_battle_transition #------------------------------------------------------------------------------- # Aliased methods: # None #=============================================================================== module RBTrans # These are all of the Transitions that will be randomly chosen. BATTLE_TRANSITIONS = ["BattleStart", "BattleStart1", "BattleStart2"] end #=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== class Scene_Map def perform_battle_transition f = RBTrans::BATTLE_TRANSITIONS[rand(RBTrans::BATTLE_TRANSITIONS.size - 1)] Graphics.transition(80, "Graphics/System/#{f}", 80) Graphics.freeze end end Random Encounter Formula: Spoiler: CODE #=============================================================================== # Change Map Encounter Rate Formula Snippet # By Jet10985 (Jet) # Inspired by: harmonic, Touchfuzzy #=============================================================================== # This snippet will let you change the default random encounter rate. # The problem with the old one is, if you set the rate to say... 30 # You will get an encounter anywhere from 1 to 61 steps. # This script has: 1 customization option. #=============================================================================== # Overwritten Methods: # Game_Player: make_encounter_count #------------------------------------------------------------------------------- # Aliased methods: # None #=============================================================================== #=============================================================================== # All you can use (That non-scripters should need.) #=============================================================================== # $game_variables[id] = the value of the variable "id" where id is a number. #------------------------------------------------------------------------------- # any number = self explanatory #------------------------------------------------------------------------------- # $game_map.encounter_step = the default step rate you put in the map properties #------------------------------------------------------------------------------- # ruby math symbols: # + is addition # - is subtraction # * is multiplication # / is division # () will execute math formula inside the parenthesis first. #------------------------------------------------------------------------------- # rand(range) = a random number between 0 and range where range is bigger than 0 # range can be $game_variables[id] or $game_map.encounter_step values as well #------------------------------------------------------------------------------- class Game_Player # Don't touch def make_encounter_count # Don't touch if $game_map.map_id != 0 # Don't touch #========================================================================= # HERE IS THE CONFIGURATION #========================================================================= # Put your formula after the "@encounter_rate_formula =" part #========================================================================= @encounter_rate_formula = rand($game_map.encounter_step) + rand($game_map.encounter_step) + 1 #========================================================================= # CONFIGURATION ENDS HERE #========================================================================= @encounter_count = @encounter_rate_formula # Don't touch end # Don't touch end # Don't touch end # Don't touch Random Enemy Hue: Spoiler: CODE #=============================================================================== # Random Enemy Hue # By Jet10985 (Jet) #=============================================================================== # This script will make it so enemies will have a random hue applied to their # battle graphic to create an effect of diversity. # This script has: 1 customization option. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # None #=============================================================================== module RandomHue # If this switch is on, then enemies will no longer have a random hue # given to them until it is turned off. NO_HUE_SWITCH = 50 end #=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== class Game_Enemy def battler_hue(*args, &block) @r_hue ||= rand(361) return $game_switches[RandomHue::NO_HUE_SWITCH] ? @battler_hue : @r_hue end end Records Window: Spoiler: CODE #=============================================================================== # Records Window Snippet # By Jet10985 (Jet) #=============================================================================== # This snippet will allow you to show some variables in a window on the map # This script has: 5 customization options. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # Scene_Map: start, update, terminate # Game_Temp: initialize # Game_Variables: []= #=============================================================================== module Records STATS = { 1 => "Score:", # Variable id => Stat name 2 => "Lives:", # Variable id => Stat name 3 => "Bonuses", # Variable id => Stat name 4 => "Weeds:", # Variable id => Stat name 5 => "Coolness:" # Variable id => Stat name } # This is the switch that needs to be on to show the window SWITCH_TO_SHOW = 62 # These are the coordinates of the window. The window is 254 wide so, # keep that in mind. WINDOW_COORDS = [0, 0] # This is how transperant the window is. 0 is transperant. OPACITY = 255 # This is the color of the text in the window. TEXT_COLOR = Color.new(95, 158, 160) end #=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== class Window_Records < Window_Base def initialize @keys = Records::STATS.keys @values = Records::STATS.values x, y = *Records::WINDOW_COORDS super(x, y, 254, @keys.size * 32 + 32) self.opacity = Records::OPACITY self.visible = false refresh end def refresh self.contents.clear self.contents.font.color = Records::TEXT_COLOR @keys.each_with_index {|key, i| self.contents.draw_text(0, i * 24, 222, WLH, @values[@keys.index(key)], 0) self.contents.draw_text(0, i * 24, 222, WLH, $game_variables[key], 2) } end def update self.visible = $game_switches[Records::SWITCH_TO_SHOW] return unless self.visible && $game_temp.record_win_need_refresh $game_temp.record_win_need_refresh = false refresh end end class Scene_Map alias jet5830_start start unless $@ def start(*args, &block) jet5830_start(*args, &block) @var_window = Window_Records.new end alias jet5839_update update unless $@ def update(*args, &block) jet5839_update(*args, &block) @var_window.update end alias jet5299_terminate terminate unless $@ def terminate(*args, &block) @var_window.dispose jet5299_terminate(*args, &block) end end class Game_Temp attr_accessor :record_win_need_refresh alias jet1932_initialize initialize unless $@ def initialize(*args, &block) @record_win_need_refresh = false jet1932_initialize(*args, &block) end end class Game_Variables alias jet2835_arrayequals []= unless $@ def []=(*args, &block) if Records::STATS.keys.include?(args[0]) $game_temp.record_win_need_refresh = true end jet2835_arrayequals(*args, &block) end end Remove CritEva: Spoiler: CODE #=============================================================================== # Remove Crit/Eva # By Jet10985 (Jet) #=============================================================================== # This snippet will remove the critical hit and/or evasion aspect of battles # This script has: 2 customization options. #=============================================================================== # Overwritten Methods: # Game_Actor: cri, eva (Depending on Configuration) # Game_Enemy: cri, eva (Depending on Configuration) #------------------------------------------------------------------------------- # Aliased methods: # None #=============================================================================== module RemoveCriEva # Do you want to remove the critical hit aspect of battle? REMOVE_CRI = true # Do you want to remove the evasion aspect of battle? REMOVE_EVA = true end #=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== %w[Game_Actor Game_Enemy].each {|d| aStr = !RemoveCriEva::REMOVE_CRI ? "" : %Q{ class #{d} def cri return 0 end end } bStr = !RemoveCriEva::REMOVE_EVA ? "" : %Q{ class #{d} def eva return 0 end end } [aStr, bStr].each {|a| eval(a) } } Remove Dead Actors: Spoiler: CODE #=============================================================================== # Remove Dead Actors Snippet # By Jet10985 (Jet) #=============================================================================== # This snippet will allow you to remove actors from the party all together when # they are inflicted with "incapacitated" state. # This script has: 2 customization options. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # Game_Battler: hp= #=============================================================================== =begin How To Change Actors: use the following command in the "script..." event command: change_removable(actor, option) actor = actor id that will be added/removed from the list. option = true or false. True adds them to the list of non-removable, false makes the removable. =end module RemoveDeadActors # Actors that will NOT be removed. Can be changed later. NO_REMOVE_ACTOR = [1, 5] # An actor inflicted with this state will not be removed. NO_REMOVE_STATE = 17 end #=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== class Game_Battler alias jet4398_newhp hp= unless $@ def hp=(*args, &block) self.jet4398_newhp(*args, &block) if $game_system.no_removal.nil? $game_system.no_removal = RemoveDeadActors::NO_REMOVE_ACTOR.clone end if @states.include?(1) && !$game_system.no_removal.include?(self.id) if !@states.include?(RemoveDeadActors::NO_REMOVE_STATE) $game_party.remove_actor(self.id) if self.actor? end end end end class Game_System attr_accessor :no_removal end class Game_Interpreter def change_removable(a, option) if $game_system.no_removal.nil? $game_system.no_removal = RemoveDeadActors::NO_REMOVE_ACTOR.clone end if option == true $game_system.no_removal.push(a) unless $game_system.no_removal.include?(a) elsif option == false $game_system.no_removal.delete(a) if $game_system.no_removal.include?(a) end end end Remove Event From Map: Spoiler: CODE #=============================================================================== # Remove Event From Map # By Jet10985 (Jet) #=============================================================================== # This script will allow you to completely remove an event from the map to # reduce lag, as the event will not be updated anymore. # This script has: 0 customization options. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # Game_Interpreter: command_214 #=============================================================================== =begin To completely remove an event from a map (meaning it's update will not be done for it, or it's graphic, mainly used to reduce lag), use this inside the event to be deleted: remove_from_map =end module RemoveEvent # Would you like to replace "Erase Event" with this command instead? REPLACE_ERASE = true end #=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== class Scene_Map attr_reader :spriteset end class Spriteset_Map attr_reader :character_sprites end class Game_Interpreter alias jet3567_command_214 command_214 unless $@ def command_214(*args, &block) if RemoveEvent::REPLACE_ERASE remove_from_map return false else jet3567_command_214(*args, &block) end end def remove_from_map f = get_character(0) $game_map.events.each_pair {|k, v| if v == f $game_map.events.delete(k) end } $scene.spriteset.character_sprites.each {|h| if h.character == f $scene.spriteset.character_sprites.delete(h) h.dispose h = nil end } end end Reset SwitchesVariables: Spoiler: CODE #=============================================================================== # Reset Switches/Variables # By Jet10985 (Jet) #=============================================================================== # This snippet will allow you to completely reset switches and/or variables # to their base values (off/0) # This script has: 0 customization options. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # None #=============================================================================== =begin How to reset stuff: To reset one of the values, use one of these in an event "Script..." command reset_switches reset_variables reset_self_switches It's pretty obvious which one does which. When you reset any of these, what they used to be will be saved, and can be restored with one of the following: restore_switches restore_variables restore_self_switches When you restore, the values made after the reset will be saved, over what was just stored, and can also be restored once again with the same calls. =end class Game_Self_switches def new return Game_SelfSwitches.new end end class Game_System %w[switches self_switches variables].each {|w| module_eval(%Q{ attr_accessor :saved_#{w} }) } end class Game_Interpreter %w[switches self_switches variables].each {|w| aStr = %Q{ def reset_#{w} $game_system.saved_#{w} = Marshal.load(Marshal.dump($game_#{w})) $game_#{w} = Game_#{w.capitalize}.new end } bStr = %Q{ def restore_#{w} r = Marshal.load(Marshal.dump($game_#{w})) $game_#{w} = $game_system.saved_#{w} $game_system.saved_#{w} = r end } [aStr, bStr].each {|i| module_eval(i) } } end RunGuard Hotkey ATB: Spoiler: CODE #=============================================================================== # Run/Guard Hotkey Snippet, ATB version # By Jet10985 (Jet) #=============================================================================== # This snippet allows you to add a hotkey type system to let players have a # handy button to automaticly run or guard. Only to be used with ATB. # This script has: 2 customization options. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # Scene_Battle: update_actor_command_selection #=============================================================================== module Hotkey # This is what button is set to make you guard. GUARD_BUTTON = Input::F5 # This is what button is set to make you run. RUN_BUTTON = Input::F6 end #=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== class Scene_Battle < Scene_Base alias jet2947_u_a_c_s update_actor_command_selection unless $@ def update_actor_command_selection(*args, &block) jet2947_u_a_c_s(*args, &block) if Input.trigger?(Hotkey::GUARD_BUTTON) Sound.play_decision @commander.action.set_guard end_command end if Input.trigger?(Hotkey::RUN_BUTTON) if !$game_troop.can_escape Sound.play_buzzer return end Sound.play_decision process_escape end end end RunGuard Hotkey: Spoiler: CODE #=============================================================================== # Run/Guard Hotkey Snippet # By Jet10985 (Jet) #=============================================================================== # This snippet allows you to add a hotkey type system to let players have a # handy button to automaticly run or guard. # This script has: 2 customization options. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # Scene_Battle: update_actor_command_selection #=============================================================================== module Hotkey # This is what button is set to make you guard. GUARD_BUTTON = Input::F5 # This is what button is set to make you run. RUN_BUTTON = Input::F6 end #=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== class Scene_Battle < Scene_Base alias jet2847_u_a_c_s update_actor_command_selection unless $@ def update_actor_command_selection(*args, &block) jet2847_u_a_c_s(*args, &block) if Input.trigger?(Hotkey::GUARD_BUTTON) Sound.play_decision @active_battler.action.set_guard next_actor end if Input.trigger?(Hotkey::RUN_BUTTON) if !$game_troop.can_escape Sound.play_buzzer return end Sound.play_decision process_escape end end end Save-Enabled Items: Spoiler: CODE #=============================================================================== # Save-Enabled Items # By Jet10985 (Jet) #=============================================================================== # This script will make it so you can specify items that can only be used if # saving is enabled as well, such as "tent" or "cottage" items. # This script has: 1 customization option. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # Game_Party: item_can_use? #=============================================================================== module SaveItems # These are the database ids of items that can only be used if saving is # enabled. SAVE_ONLY_ITEMS = [1, 7, 9, 15] end #=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== class Game_Party alias jet3746_item_can_use item_can_use? unless $@ def item_can_use?(item) if SaveItems::SAVE_ONLY_ITEMS.include?(item.id) return false if $game_system.save_disabled end jet3746_item_can_use(item) end end Scene_Menu Index Fix: Spoiler: CODE #=============================================================================== # Scene_Menu Index Fix # By Jet10985 (Jet) #=============================================================================== # This script will fix the menu so that when you exit a scene that returns to # the menu, and that was accessed from the menu, it will return to the last # chosen index. A problem was caused with scripts that add menu options that # make it so when you return to the menu, the cursor wouldn't be on the right # option that you chose to begin with. # This script has: 0 customization option. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # Scene_Menu: new, terminate #=============================================================================== class Game_Temp attr_accessor :last_menu_index_jet end class << Scene_Menu alias jet3789_new new unless $@ def new(*args, &block) if !$scene.is_a?(Scene_Map) && !$game_temp.last_menu_index_jet.nil? jet3789_new($game_temp.last_menu_index_jet) else jet3789_new(0) end end end class Scene_Menu alias jet3782_terminate terminate unless $@ def terminate(*args, &block) $game_temp.last_menu_index_jet = @command_window.index jet3782_terminate(*args, &block) end end Screensaver: Spoiler: CODE #=============================================================================== # Screensaver Snippet # By Jet10985 (Jet) # Inspired by: IMP1 #=============================================================================== # This snippet will allow you to set a screen dim to occur if the program has # been left idle for a certain amount of time. # This script has: 2 customization options. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # Scene_Base: update #=============================================================================== module ScreenSaver # Time needed no dim screen in seconds. TIME_WAIT = 10 # How dim the screen will be. NEW_BRIGHTNESS = 50 end #=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== class Scene_Base alias jet7789_update update unless $@ def update(*args, &block) if @screensaver_rate.nil? @screensaver_rate = 0 end @screensaver_rate += 1 if @screensaver_rate >= (ScreenSaver::TIME_WAIT * 60) Graphics.brightness = ScreenSaver::NEW_BRIGHTNESS else Graphics.brightness = 255 end if Input.typing? @screensaver_rate = 0 end jet7789_update(*args, &block) end end class << Input def typing? for const in (Input.constants - Object.constants) if Input.press?(Input.const_get(const)) return true end if Object.const_defined?("JetInput") return JetInput.typing? end end return false end end Separate Save File Folder: Spoiler: CODE #=============================================================================== # Separate Save File Folder # By Jet10985 (Jet) #=============================================================================== # This script will put save files into a folder called Saves instead of having # them in the regular directory. # This script has: 0 customization option. #=============================================================================== # Overwritten Methods: # Scene_Title: check_continue # Scene_File: make_filename #------------------------------------------------------------------------------- # Aliased methods: # None #=============================================================================== class Scene_Title def check_continue Dir.mkdir("Saves") unless File.directory?("Saves") @continue_enabled = Dir.entries("Saves").size > 2 end end class Scene_File def make_filename(file_index) return "Saves/Save#{file_index + 1}.rvdata" end end Set Actor Max Level: Spoiler: CODE #=============================================================================== # Set Actor's Max Level Snippet # By Jet10985 (Jet) #=============================================================================== # This snippet will allow you to set each actor to have an individual maximum # level that they can reach in-game. # This script has: 2 customization options. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # Game_Actor: make_exp_list #=============================================================================== =begin To change an actor's max level, use this in an Event "Script..." command: change_max_level(actor_id, new_max_level) actor_id = the database id of the actor new_max_level = the new max level of course =end module ActorMaxLevel # These are the max levels for actors specifically. # It follows this format: # actor_id => max_level MAX_LEVELS = { 1 => 99, 2 => 20, 3 => 30, 4 => 2 } # The max level for any undefined actor. MAX_LEVELS.default = 99 end #=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== class Game_Actor alias jet8888_make_exp_list make_exp_list unless $@ def make_exp_list(*args, &block) jet8888_make_exp_list(*args, &block) if @exp_list[ActorMaxLevel::MAX_LEVELS[@actor_id] + 1] != 0 if ActorMaxLevel::MAX_LEVELS[@actor_id] != nil @exp_list[ActorMaxLevel::MAX_LEVELS[@actor_id] + 1] = 0 end end end def exp_list return @exp_list end end class Game_Interpreter def change_max_level(actor_id, new_max_level) f = $game_actors[actor_id] f.change_exp(f.exp_list[ActorMaxLevel::MAX_LEVELS[actor_id]], false) ActorMaxLevel::MAX_LEVELS[actor_id] = new_max_level f.make_exp_list end end Simple Battle HUD: Spoiler: CODE #=============================================================================== # Simple Battle HUD # By Jet10985 (Jet) #=============================================================================== # This script will change the default battle HUD to display the character's # faces, hp/mp, and states differently. # This script has: 0 customization options. #=============================================================================== # Overwritten Methods: # Window_BattleStatus: item_rect, cursor_right, cursor_left, draw_item #------------------------------------------------------------------------------- # Aliased methods: # None. #=============================================================================== class Window_BattleStatus < Window_Selectable def item_rect(index) rect = Rect.new(0, 0, 0, 0) rect.width = 96 rect.height = self.contents.height rect.x = index * 96 rect.y = 0 return rect end def cursor_right(wrap = false) cursor_down(wrap) end def cursor_left(wrap = false) cursor_up(wrap) end def draw_item(index) rect = item_rect(index) self.contents.clear_rect(rect) self.contents.font.color = normal_color actor = $game_party.members[index] draw_actor_face(actor, rect.x, 0) draw_actor_name(actor, rect.x, 0) draw_actor_state(actor, rect.x, 24, 48) draw_actor_hp(actor, rect.x, 54, 94) draw_actor_mp(actor, rect.x, 74, 94) end end Singular EXP: Spoiler: CODE #=============================================================================== # Singular EXP Snippet # By Jet10985 (Jet) # Inspired by: Touchfuzzy #=============================================================================== # This snippet will allow you to use a singular actor as a lead actor. This # means, only that actor gains exp and the others level up with the leader. # This script has: 1 customization option. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # Game_Actor: change_exp #=============================================================================== =begin How To Set-Up Sync'd EXP: To set-up synchronized EXP, you must change every actors EXP chart to be identical in the database. =end module SingularEXP # This is the actor who will gain all the exp. LEAD_ACTOR = 1 end #=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== class Game_Actor alias jet4893_change_exp change_exp unless $@ def change_exp(*args, &block) if self.id == SingularEXP::LEAD_ACTOR for i in 0...$game_party.members.size $game_party.members[i].jet4893_change_exp(*args, &block) end else self.jet4893_change_exp(0, false) end end end Speed Save: Spoiler: CODE #=============================================================================== # Speed Save Option Snippet # By Jet10985 (Jet) #=============================================================================== # This snippet adds a hotkey to open the save menu quickly on the map. # This script has: 1 customization option. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # Scene_Map: update #=============================================================================== module Speed_Save # This is what button is set to make you save. COMMAND_BUTTON = Input::F7 end #=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== class Scene_Map < Scene_Base alias jet2228_update update unless $@ def update(*args, &block) jet2228_update(*args, &block) update_save end def update_save if Input.trigger?(Speed_Save::COMMAND_BUTTON) if $game_system.save_disabled Sound.play_buzzer else $scene = Scene_File.new(true, false, true) end end end end Strafe: Spoiler: CODE #=============================================================================== # Strafe # By Jet10985 (Jet) #=============================================================================== # This script will allow the player to move any direction while maintaining # their current direction. # This script has: 1 customization option. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # Game_Player: move_by_input #=============================================================================== module Strafe # This is the button that needs to be held to allow strafing. STRAFE_BUTTON = Input::ALT end #=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== class Game_Player alias jet3746_move_by_input move_by_input unless $@ def move_by_input(*args, &block) old_dir = @direction jet3746_move_by_input(*args, &block) @direction = old_dir if Input.press?(Strafe::STRAFE_BUTTON) end end Success Bar: Spoiler: CODE #=============================================================================== # Success Bar Snippet # By Jet10985 (Jet) # Original Code by DarkLich (Reinorpg.com) #=============================================================================== # This snippet allows you to call a success bar, a bar with an area of success # you have to hit by pressing the designated button. # This script has: 4 customization options. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # None #=============================================================================== =begin To create a success bar., you should use the command 'call script' with call_bar(F, S, B, X, W) F = How fast the targeter takes to go across the entire bar. 10 is recommended. S = This is what switch will be turned on/off if they succeed. B = This is what switch will be turned on/off if they fail. X = Where the success area is located on the bar W = How wide the success area is. =end module SuccessBar # The color of the bar background. BACK_COLOR = Color.new(255, 255, 255) # The color of the area of success. SUCCESS_AREA_COLOR = Color.new(0, 255, 0) # The color of the targeter. TARGETER_COLOR = Color.new(255, 0, 0) # The button you have to press to stop the targetter. INPUT_BUTTON = Input::C end #=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== class Window_Bar < Window_Base attr_accessor :rx def initialize(xa, barwidth) super(152, 192, 282, 50) self.opacity = 0 @rx = 0 @xa = xa @bw = barwidth refresh end def refresh self.contents.clear self.contents.fill_rect(@rx, 0, 10, 18, SuccessBar::TARGETER_COLOR) self.contents.fill_rect(0, 5, 250, 8, SuccessBar::BACK_COLOR) self.contents.fill_rect(@xa, 5, @bw, 8, SuccessBar::SUCCESS_AREA_COLOR) end def check if @rx >= @xa && @rx + 10 <= @bw + @xa return true else return false end end end class Scene_Bar < Scene_Base def initialize(speed, switch, badswitch, x, barwidth) @direita = true @speed = speed @switch = switch @bswitch = badswitch @x = x @b = barwidth end def start create_bg @bar = Window_Bar.new(@x, @b) end def terminate @bar.dispose @back.dispose end def create_bg source = $game_temp.background_bitmap bitmap = Bitmap.new(544, 416) bitmap.stretch_blt(bitmap.rect, source, source.rect) @back = Sprite.new(@viewport1) @back.bitmap = bitmap end def update @bar.refresh if @bar.rx >= 240 @direita = false elsif @bar.rx <= 0 @direita = true end if @direita @bar.rx += @speed else @bar.rx -= @speed end if Input.trigger?(SuccessBar::INPUT_BUTTON) if @bar.check $game_switches[@switch] = !$game_switches[@switch] elsif @bswitch > 0 $game_switches[@bswitch] = !$game_switches[@bswitch] end $scene = Scene_Map.new end end end class Game_Interpreter def call_bar(f, s, b, x, w) $scene = Scene_Bar.new(f, s, b, x, w) end end Target Immunity: Spoiler: CODE #=============================================================================== # Target Immunity # By Jet10985 (Jet) # Requested By: Despain #=============================================================================== # This snippet will allow you to specify actors to become immune to all # targetting by enemies and allies. # This script has: 0 customization options. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # Game_Actor: exist? # Game_System: initialize #=============================================================================== =begin To make an actor immune to targeting, use this in an event "Script..." command: target_immunity(actor_id, bool) actor_id = the database id of the actor to change the immunity for bool = true/false. true to make them immune, false to take it away. -------------------------------------------------------------------------------- To check if an actor is immune or not, use this in a Conditional Branch Script: target_immune?(actor_id) =end class Game_Actor alias jet2763_exist exist? unless $@ def exist?(*args, &block) return false if $game_system.targ_imm.include?(self.id) jet2763_exist(*args, &block) end end class Game_System attr_accessor :targ_imm alias jet2763_initialize initialize unless $@ def initialize(*args, &block) @targ_imm = [] jet2763_initialize(*args, &block) end end class Game_Interpreter def target_immunity(actor_id, bool) f = $game_system.targ_imm !bool ? f.delete(actor_id) : (f.push(actor_id) if !f.include?(actor_id)) end def target_immune?(actor_id) $game_system.targ_imm.include?(actor_id) end end Timed Choices: Spoiler: CODE #=============================================================================== # Timed Choices # By Jet10985 (Jet) # Requested By: Artea #=============================================================================== # This script will allow you to make some choices timed. This means if they # don't choose in-time, a switch will be turned on the question ended. # This script has: 1 customization option. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # Window_Message: input_choice #=============================================================================== =begin To make a timed choice: In order to make a choiced timed, you must have the Timer running. To run the timer use the Control Timer event command. When the timer reaches 0, the question will be skipped and a switch turned on so you may event the consequences. =end module TimedChoices # This is the id of the switch that will come on if they don't answer in time TOO_LATE_SWITCH = 42 end #=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== class Window_Message alias jet7355_input_choice input_choice unless $@ def input_choice(*args, &block) jet7355_input_choice(*args, &block) if $game_system.timer_working if $game_system.timer == 0 $game_switches[TimedChoices::TOO_LATE_SWITCH] = true Sound.play_decision terminate_message end end end end Title Screen Volume: Spoiler: CODE #=============================================================================== # Title Screen Volume # By Jet10985 (Jet) #=============================================================================== # This snippet will allow you to change the volume of the title screen music. # This script has: 1 customization option. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # Scene_Title: play_title_music #=============================================================================== module TitleVolume # This is the volume of the title music. 0-100, 100 being max. VOLUME = 100 end #=============================================================================== # DO NOT EDIT PAST HERE UNLESS YOU KNOW WHAT TO DO #=============================================================================== class Scene_Title alias jet3745_play_title_music play_title_music unless $@ def play_title_music(*args, &block) $data_system.title_bgm.volume = TitleVolume::VOLUME jet3745_play_title_music(*args, &block) end end Title Weather Effects: Spoiler: CODE #=============================================================================== # Title Weather Effect # By Jet10985 (Jet) #=============================================================================== # This snippet allows you to add a weather effect to the title screen. # This script has: 2 customization options. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # Scene_Title: start, update, terminate #=============================================================================== module JetTitleEffects # This is the type of weather that will be displayed on the title screen. # 1 is rain, 2 is storm, 3 is snow. WEATHER_TYPE = 2 # This is how strong the weather will be. # 1 is weakest, 40 is strongest. WEATHER_POWER = 40 end #=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== class Scene_Title alias jet5232_start start unless $@ def start(*args, &block) jet5232_start(*args, &block) @viewport_jet = Viewport.new(0, 0, Graphics.width, Graphics.height) @weather_jet = Spriteset_Weather.new(@viewport_jet) @weather_jet.type = JetTitleEffects::WEATHER_TYPE @weather_jet.max = JetTitleEffects::WEATHER_POWER @weather_jet.ox = 0 @weather_jet.oy = 0 end alias jet3782_update update unless $@ def update(*args, &block) @weather_jet.update @viewport_jet.update jet3782_update(*args, &block) end alias jet6292_terminate terminate unless $@ def terminate(*args, &block) @weather_jet.dispose @viewport_jet.dispose jet6292_terminate(*args, &block) end end Transfer Arrows: Spoiler: CODE #=============================================================================== # Transfer Arrows # By Jet10985 (Jet) #=============================================================================== # This script will make it so you can make events have a fading arrow graphic # pointing towards it, which fades based on player distance. # This script has: 1 customization option. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # Game_Event: setup, update # Scene_Map: terminate #=============================================================================== =begin To make an arrow, use this event comment: ARROW UP/LEFT/RIGHT/DOWN Choose 1 direction of the 4, EX: ARROW UP The direction will determine which direction the arrow faces, and where it is placed. The graphic will turn the direction, and be located in the direction, relative to the event. EX: ARROW UP makes the graphic take the upwards motion, and be located 1 square up from the event. =end module DoorArrows # This is the name of the Arrow Graphic. It should be in standard sprite form # and located in the Characters folder. It should also be a single sheet, # not mixed in with other sprites. ARROW_CHARACTER = "$Arrow" end #=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== class Game_Character attr_accessor :step_anime, :real_x, :real_y, :opacity def dist_by_grid(ev) x = (self.x - ev.x).abs y = (self.y - ev.y).abs return x + y end end class Game_Event attr_accessor :has_arrow, :arrow_character def check_event_comments3(regexp) return false if @list.nil? or @list.size <= 0 for item in @list if item.code == 108 or item.code == 408 if item.parameters[0].match(regexp) return $1 end end end return false end alias jet3645_setup setup unless $@ def setup(*args, &block) @has_arrow = false jet3645_setup(*args, &block) end alias jet3645_update update unless $@ def update(*args, &block) jet3645_update(*args, &block) update_arrow end def update_arrow if @has_arrow == false find_arrow end return if @has_arrow != true @arrow_character[0].opacity = 255 - 34 * (dist_by_grid($game_player) - 2) @arrow_character.each {|a| a.update } if @arrow_character[0].opacity != 0 end def find_arrow if (n = check_event_comments3(/ARROW (.+)/i)) != false @has_arrow = true f = ("turn_#{n.downcase}").to_sym g = Game_Character.new g.send(f.to_sym) g.step_anime = true g.set_graphic(DoorArrows::ARROW_CHARACTER, 0) case f when :turn_up; x, y = 0, -1 when :turn_left; x, y = -1, 0 when :turn_right; x, y = 1, 0 when :turn_down; x, y = 0, 1 end g.moveto(self.x + x, self.y + y) b = Sprite_Character.new(nil, g) @arrow_character = [g, b] else @has_arrow = 0 end end end class Game_TArrow < Game_Character def through return true end end class Scene_Map alias jet3735_terminate terminate unless $@ def terminate(*args, &block) $game_map.events.values.each {|a| a.arrow_character[1].dispose if a.has_arrow == true a.arrow_character = nil } jet3735_terminate(*args, &block) end end Universal Picture Tone: Spoiler: CODE #=============================================================================== # Universal Picture Tone # By Jet10985 (Jet) #=============================================================================== # This snippet will allow you to change the tone of every picture shown at the # same time. This only effects pictures made with the Show Picture event command # This script has: 2 customization options. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # Spriteset_Map: update_viewports # Game_System: initialize #=============================================================================== =begin How to change tone: To change the tone of every picture, use this in an event "Script..." command change_pic_tone(r, g, b, a) r = the tone's red value, a number from -255 to 255 g = the tone's green value, a number from -255 to 255 b = the tone's blue value, a number from -255 to 255 a = the tone's grey value, a number from -255 to 255 Note: 0 is the base value for all of these, so to set the tone to no tone, call change_pic_tone with no arguements. =end module UniversalPictureTone # If this is true, and no universal picture tone has been set with the # script command, then pictures will inherit the tone from what the map's # tone is. PICTURES_FOLLOW_MAP_TONE = true # If the above is true, then turning this switch on will disable following # the map's tone MAP_TONE_SWITCH = 59 end #=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== class Spriteset_Map alias jet1834_update_viewports update_viewports unless $@ def update_viewports(*args, &block) jet1834_update_viewports(*args, &block) if UniversalPictureTone::PICTURES_FOLLOW_MAP_TONE if !$game_switches[UniversalPictureTone::MAP_TONE_SWITCH] if $game_system.uni_pic_tone == [0, 0, 0, 0] @viewport2.tone = @viewport1.tone return end end end @viewport2.tone = Tone.new(*$game_system.uni_pic_tone) end end class Game_System attr_accessor :uni_pic_tone alias jet1974_initialize initialize unless $@ def initialize(*args, &block) jet1974_initialize(*args, &block) @uni_pic_tone = [0, 0, 0, 0] end end class Game_Interpreter def change_pic_tone(r = 0, g = 0, b = 0, o = 0) $game_system.uni_pic_tone = [r, g, b, o] end end Vehicle Encounters: Spoiler: CODE #=============================================================================== # Vehicle Encounters Snippet # By Jet10985 (Jet) #=============================================================================== # This snippet will allow players to encounter enemies while in a vehicle. # Airships will have an entirely seperate enemy array. # This script has: 4 customization options. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # Game_Player: update_encounter # Game_System: initialize # Game_Map: encounter_list #=============================================================================== =begin Changing Aerial Enemies: Use an event Script... command and put the following code in- change_aerial_enemies(new_enemies) EX. change_aerial_enemies([4, 7, 9]) You must make sure you the ids in brackets and have a comma after each one except the last one. =end module VehicleEncounters # Can players fight in a boat? ALLOW_ENCOUNTER_IN_BOAT = false # Can players fight in a ship? ALLOW_ENCOUNTER_IN_SHIP = true # Can players fight in an airship? ALLOW_ENCOUNTER_IN_AIRSHIP = true # What are the default enemies that can be encountered in the air? # These are troop ids from the database. AERIAL_ENEMIES = [7, 5, 3] end #=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== class Game_Player alias jet6321_update_encounter update_encounter unless $@ def update_encounter(*args, &block) return if $TEST and Input.press?(Input::CTRL) if in_vehicle? case @vehicle_type when 0 @encounter_count -= 1 if VehicleEncounters::ALLOW_ENCOUNTER_IN_BOAT when 1 @encounter_count -= 1 if VehicleEncounters::ALLOW_ENCOUNTER_IN_SHIP when 2 @encounter_count -= 1 if VehicleEncounters::ALLOW_ENCOUNTER_IN_AIRSHIP end end jet6321_update_encounter(*args, &block) end end class Game_System attr_accessor :aerial_enemies alias jet3782_initialize initialize unless $@ def initialize(*args, &block) jet3782_initialize(*args, &block) @aerial_enemies = VehicleEncounters::AERIAL_ENEMIES end end class Game_Map alias jet3768_encounter_list encounter_list unless $@ def encounter_list(*args, &block) if $game_player.in_airship? return $game_system.aerial_enemies else return jet3768_encounter_list(*args, &block) end end end class Game_Interpreter def change_aerial_enemies(new_enemies) $game_system.aerial_enemies = new_enemies end end WSAD Movement: Spoiler: CODE #=============================================================================== # WSAD Movement # By Jet10985 (Jet) #=============================================================================== # This script will make it so the player can move with WSAD as well as the # arrow keys. # This script has: 0 customization options. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # Input: dir4 #=============================================================================== module Input class << self alias jet4756_dir4 dir4 unless $@ def dir4(*args, &block) {Input::R => 8, Input::Y => 2, Input::X => 4, Input::Z => 6}.each {|a, b| return b if Input.press?(a) } jet4756_dir4(*args, &block) end end end Weapon-Skill Link: Spoiler: CODE #=============================================================================== # Weapon-Skill Link # By Jet10985 (Jet) # Requested by: Peva #=============================================================================== # This snippet allows you to link skills with specific types of weapons. # This script has: 1 customization option. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # Game_Actor: skill_can_use #=============================================================================== =begin To make a weapon a specific type: put one of the below config into the notebox of the weapon. EX: one of my config is :sword, so in the notebox, i'd put <sword> -------------------------------------------------------------------------------- To make a skill a specific type: put one of the below config into the notebox of the skill. EX: one of my config is :sword, so in the notebox, i'd put <sword> This will make it so this skill can only be used if the actor is wielding a weapon with the same type of tag. -------------------------------------------------------------------------------- Note: a skill without a tag can be used any time really, specified by database. a weapon without a tag is basically just a regular weapon. =end module SkillToWeapon # These are weapons types. You can add more by adding a comma, and making # a new symbol (:type) # EX: [:sword, :axe, :lance, :bow, :gun, :club] WEAPON_TYPES = [:sword, :axe, :lance, :bow, :gun] end #=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== module RPG class BaseItem def weapon_type if @weapon_type.nil? q = [] for tag in SkillToWeapon::WEAPON_TYPES q.push(/<#{tag.to_s.downcase}>/i) end for tag in q @weapon_type = self.note[tag].nil? ? nil : tag break if !@weapon_type.nil? end @weapon_type = false if @weapon_type.nil? end return @weapon_type end end end class Game_Actor def skill_can_use?(skill) if !skill.nil? && skill.weapon_type != false for weapon in weapons next if weapon.nil? || weapon.weapon_type == false return false unless weapon.weapon_type == skill.weapon_type end end super(skill) end end WindowSkin: Spoiler: CODE #=============================================================================== # WindowSkin Snippet # By Jet10985 (Jet) #=============================================================================== # This snippet allows you to change the windowskin of every default window in # the program. # This script has: A lot of customization options. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # Every window's initialize method #=============================================================================== module Windowskins # This Window is what is shown in the main menu containing player info. MENU_STATUS_SKIN = "window" # This the windows that has menu commands like "items, skills, equip" MENU_COMMAND_SKIN = "window" # This is the window that appears when you click game end in the menu. GAME_END_SKIN = "window" # This is the status screen window. That's self explanatory. STATUS_SCREEN_SKIN = "window" # This is the window text in shown in from events. MESSAGE_SKIN = "window" # This is the window that shows items in the inventory. ITEM_SKIN = "window" # This shows what the item does/it's desciption ITEM_DESCRIPTION_SKIN = "window" # This is the window when you have to select what actor to use an item on ITEM_USE_SKIN = "window" # This shows what the actor has equipped EQUIP_SKIN = "window" # This shows the actors parameter changes in the equip screen EQUIP_STATUS_SKIN = "window" # This shows all the items the player can equip EQUIP_LIST_SKIN = "window" # This shows the weapon/armor description. EQUIP_DESCRIPTION_SKIN = "window" # This shows the actors details on the skill screen. SKILL_SKIN = "window" # This shows all the skills the actor has to use. SKILL_LIST_SKIN = "window" # This shows the skills description SKILL_DESCRIPTION_SKIN = "window" # This is the window when you have to select what actor to use a skill on SKILL_USE_SKIN = "window" # This window shows how much gold you have. GOLD_SKIN = "window" # This is the left half of the debug screen. DEBUG_LEFT_SKIN = "window" # This is the right half of the debug screen. DEBUG_RIGHT_SKIN = "window" # This is the other window in the debug screen, below the right half. DEBUG_DESCRIPTION_SKIN = "window" # This is the window that holds the letters you can choose from in name input NAME_INPUT_SKIN = "window" # This shows the actors current name in name input NAME_EDIT_SKIN = "window" # This window is what pops-up when you have a number input. NUMBER_INPUT_SKIN = "window" # This window is when a text box is hsown in battle. Different then TEXT_SKIN. BATTLE_MESSAGE_SKIN = "window" # This shows actor's names, hp, and mp in battle BATTLE_STATUS_SKIN = "window" # This shows the options in battle "attack, skill, guard, item" BATTLE_COMMAND_SKIN = "window" # This shows the items to choose from in battle. BATTLE_ITEM_SKIN = "window" # This shows the skills to choose from in battle BATTLE_SKILL_SKIN = "window" # This shows the description of items/skills in battle. BATTLE_DESCRIPTION_SKIN = "window" # This shows the options of "fight, run" at the beginning of battle PARTY_COMMAND_SKIN = "window" # This windows shows what enemy you are targeting TARGET_ENEMY_SKIN = "window" # This shows items to buy in the shop SHOP_BUY_SKIN = "window" # This shows items to sell in the shop SHOP_SELL_SKIN = "window" # This shows the amount of items to buy/sell in the shop SHOP_NUMBER_SKIN = "window" # This shows actors parameters in the shop. SHOP_STATUS_SKIN = "window" # This shows the command in the shop "buy, sell, cancel" SHOP_COMMAND_SKIN = "window" # This is shown when in the shop, but not in the buy/sell menus SHOP_IDLE_SKIN = "window" # This shows the description of items in shops. SHOP_DESCRIPTION_SKIN = "window" # This is the window that you can choose save files from. SAVE_SKIN = "window" # This shows the description of the save file. SAVE_DESCRIPTION_SKIN = "window" # This is the window t the beggining of starting a game "new game, continue" TITLE_CHOICE_SKIN = "window" end #=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== class Window_Base < Window alias jet0192_initialize initialize unless $@ def initialize(*args, &block) jet0192_initialize(*args, &block) if $scene.is_a?(Scene_Shop) self.windowskin = Cache.system(Windowskins::SHOP_IDLE_SKIN) elsif $scene.is_a?(Scene_Debug) self.windowskin = Cache.system(Windowskins::DEBUG_DESCRIPTION_SKIN) elsif self.windowskin = Cache.system("Window") end end end #=============================================================================== class Window_Selectable alias jet8912_initialize initialize unless $@ def initialize(*args, &block) jet8912_initialize(*args, &block) if $scene.is_a?(Scene_End) self.windowskin = Cache.system(Windowskins::GAME_END_SKIN) end if $scene.is_a?(Scene_Menu) self.windowskin = Cache.system(Windowskins::MENU_COMMAND_SKIN) end if $scene.is_a?(Scene_Title) self.windowskin = Cache.system(Windowskins::TITLE_CHOICE_SKIN) end end end #=============================================================================== class Window_Help alias jet6384_initialize initialize unless $@ def initialize(*args, &block) jet6384_initialize(*args, &block) if $scene.is_a?(Scene_Equip) self.windowskin = Cache.system(Windowskins::EQUIP_DESCRIPTION_SKIN) end if $scene.is_a?(Scene_Skill) self.windowskin = Cache.system(Windowskins::SKILL_DESCRIPTION_SKIN) end if $scene.is_a?(Scene_Item) self.windowskin = Cache.system(Windowskins::ITEM_DESCRIPTION_SKIN) end if $scene.is_a?(Scene_File) self.windowskin = Cache.system(Windowskins::SAVE_DESCRIPTION_SKIN) end if $scene.is_a?(Scene_Shop) self.windowskin = Cache.system(Windowskins::SHOP_DESCRIPTION_SKIN) end if $scene.is_a?(Scene_Battle) self.windowskin = Cache.system(Windowskins::BATTLE_DESCRIPTION_SKIN) end end end #=============================================================================== class Window_Gold alias jet2944_initialize initialize unless $@ def initialize(*args, &block) jet2944_initialize(*args, &block) self.windowskin = Cache.system(Windowskins::GOLD_SKIN) end end #=============================================================================== class Window_MenuStatus alias jet3794_initialize initialize unless $@ def initialize(*args, &block) jet3794_initialize(*args, &block) if $scene.is_a?(Scene_Item) self.windowskin = Cache.system(Windowskins::ITEM_USE_SKIN) end if $scene.is_a?(Scene_Menu) self.windowskin = Cache.system(Windowskins::MENU_STATUS_SKIN) end if $scene.is_a?(Scene_Skill) self.windowskin = Cache.system(Windowskins::SKILL_USE_SKIN) end end end #=============================================================================== class Window_Item alias jet4759_initialize initialize unless $@ def initialize(*args, &block) jet4759_initialize(*args, &block) if $scene.is_a?(Scene_Equip) self.windowskin = Cache.system(Windowskins::EQUIP_LIST_SKIN) end if $scene.is_a?(Scene_Item) self.windowskin = Cache.system(Windowskins::ITEM_SKIN) end if $scene.is_a?(Scene_Shop) self.windowskin = Cache.system(Windowskins::SHOP_SELL_SKIN) end if $scene.is_a?(Scene_Battle) self.windowskin = Cache.system(Windowskins::BATTLE_ITEM_SKIN) end end end #=============================================================================== class Window_Skill alias jet1983_initialize initialize unless $@ def initialize(*args, &block) jet1983_initialize(*args, &block) if $scene.is_a?(Scene_Battle) self.windowskin = Cache.system(Windowskins::BATTLE_SKILL_SKIN) elsif self.windowskin = Cache.system(Windowskins::SKILL_LIST_SKIN) end end end #=============================================================================== class Window_SkillStatus alias jet2739_initialize initialize unless $@ def initialize(*args, &block) jet2739_initialize(*args, &block) self.windowskin = Cache.system(Windowskins::SKILL_SKIN) end end #=============================================================================== class Window_Equip alias jet2344_initialize initialize unless $@ def initialize(*args, &block) jet2344_initialize(*args, &block) self.windowskin = Cache.system(Windowskins::EQUIP_SKIN) end end #=============================================================================== class Window_EquipStatus alias jet2848_initialize initialize unless $@ def initialize(*args, &block) jet2848_initialize(*args, &block) self.windowskin = Cache.system(Windowskins::EQUIP_STATUS_SKIN) end end #=============================================================================== class Window_Status alias jet4749_initialize initialize unless $@ def initialize(*args, &block) jet4749_initialize(*args, &block) self.windowskin = Cache.system(Windowskins::STATUS_SCREEN_SKIN) end end #=============================================================================== class Window_SaveFile alias jet2739_initialize initialize unless $@ def initialize(*args, &block) jet2739_initialize(*args, &block) self.windowskin = Cache.system(Windowskins::SAVE_SKIN) end end #=============================================================================== class Window_ShopBuy alias jet1224_initialize initialize unless $@ def initialize(*args, &block) jet1224_initialize(*args, &block) self.windowskin = Cache.system(Windowskins::SHOP_BUY_SKIN) end end #=============================================================================== class Window_ShopNumber alias jet5696_initialize initialize unless $@ def initialize(*args, &block) jet5696_initialize(*args, &block) self.windowskin = Cache.system(Windowskins::SHOP_NUMBER_SKIN) end end #=============================================================================== class Window_ShopStatus alias jet9999_initialize initialize unless $@ def initialize(*args, &block) jet9999_initialize(*args, &block) self.windowskin = Cache.system(Windowskins::SHOP_STATUS_SKIN) end end #=============================================================================== class Window_NameEdit alias jet8888_initialize initialize unless $@ def initialize(*args, &block) jet8888_initialize(*args, &block) self.windowskin = Cache.system(Windowskins::NAME_EDIT_SKIN) end end #=============================================================================== class Window_NameInput alias jet7777_initialize initialize unless $@ def initialize(*args, &block) jet7777_initialize(*args, &block) self.windowskin = Cache.system(Windowskins::NAME_INPUT_SKIN) end end #=============================================================================== class Window_Message alias jet6666_initialize initialize unless $@ def initialize(*args, &block) jet6666_initialize(*args, &block) if $scene.is_a?(Scene_Battle) self.windowskin = Cache.system(Windowskins::BATTLE_MESSAGE_SKIN) elsif self.windowskin = Cache.system(Windowskins::MESSAGE_SKIN) end end end #=============================================================================== class Window_PartyCommand alias jet5555_initialize initialize unless $@ def initialize(*args, &block) jet5555_initialize(*args, &block) self.windowskin = Cache.system(Windowskins::PARTY_COMMAND_SKIN) end end #=============================================================================== class Window_ActorCommand alias jet4444_initialize initialize unless $@ def initialize(*args, &block) jet4444_initialize(*args, &block) self.windowskin = Cache.system(Windowskins::BATTLE_COMMAND_SKIN) end end #=============================================================================== class Window_TargetEnemy alias jet3333_initialize initialize unless $@ def initialize(*args, &block) jet3333_initialize(*args, &block) self.windowskin = Cache.system(Windowskins::TARGET_ENEMY_SKIN) end end #=============================================================================== class Window_BattleStatus alias jet2222_initialize initialize unless $@ def initialize(*args, &block) jet2222_initialize(*args, &block) self.windowskin = Cache.system(Windowskins::BATTLE_STATUS_SKIN) end end #=============================================================================== class Window_DebugLeft alias jet1111_initialize initialize unless $@ def initialize(*args, &block) jet1111_initialize(*args, &block) self.windowskin = Cache.system(Windowskins::DEBUG_LEFT_SKIN) end end #=============================================================================== class Window_DebugRight alias jet0000_initialize initialize unless $@ def initialize(*args, &block) jet0000_initialize(*args, &block) self.windowskin = Cache.system(Windowskins::DEBUG_RIGHT_SKIN) end end Windows Scene: Spoiler: CODE #=============================================================================== # Windows Scene # By Jet10985 (Jet) # Requested By: Masterjim #=============================================================================== # This script will allow you to call a scene that show a bunch of windows. # This is mainly a companion script to my Window Maker, to allow generated # windows to be shown easier. # This script has: 4 customization options. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # Window_Command: initialize, draw_item # Scene_Menu: update_command_window, update_actor_selection, # create_command_window #=============================================================================== module WindowScene # These are the class names of the Windows you want shown. # The class name is right next to the part, in the generated window script, # that says class. # IE: class Window_1227 < Window_Base # Window_1227 would be the window name WINDOWS_TO_SHOW = [Window_Help] # Do you want to add an option to the menu to open the scene with the windows? MENU_OPTION = true # What should the menu option be called? OPTION_NAME = "Records" # Where should the menu option be placed in the menu order? MENU_INDEX = 5 end #=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== class Scene_Windows < Scene_Base def start super create_menu_background @windows = [] WindowScene::WINDOWS_TO_SHOW.each {|a| @windows.push(a.new)} end def terminate super dispose_menu_background @windows.each {|a| a.dispose} end def return_scene $scene = Scene_Menu.new(WindowScene::MENU_INDEX) end def update super update_menu_background @windows.each {|a| a.update} if Input.trigger?(Input::B) Sound.play_cancel return_scene end end end if WindowScene::MENU_OPTION class Window_Command < Window_Selectable alias jet8591_initialize initialize unless $@ def initialize(*args, &block) @disabled_commands = [] jet8591_initialize(*args, &block) end alias jet9743_draw_item draw_item unless $@ def draw_item(*args, &block) jet9743_draw_item(*args, &block) @disabled_commands[args[0]] = args[1].nil? || args[1] ? nil : true end def ins_command(index, text) @commands.insert(index, text) @disabled_commands.insert(index, nil) old_disabled_commands = @disabled_commands.dup self.height = (@commands.size + @column_max - 1) / @column_max * WLH + 32 @item_max = @commands.size create_contents refresh old_disabled_commands.each_index do |i| if !old_disabled_commands[i].nil? draw_item(i, false) end end end def add_command(text) ins_command(@commands.size, text) end end class Scene_Menu < Scene_Base def sort_newcommand @sorted_command ||= [] newcommand = @newcommand - @sorted_command newcommand.sort.each {|i| @menu_index += 1 if @menu_index >= i } @command_window.index = @menu_index @sorted_command = @sorted_command + @newcommand end alias jet8940_create_command_window create_command_window unless $@ def create_command_window(*args, &block) jet8940_create_command_window(*args, &block) @command_window.ins_command(WindowScene::MENU_INDEX, WindowScene::OPTION_NAME) @newcommand ||= [] @newcommand << WindowScene::MENU_INDEX sort_newcommand end alias jet8905_update_command_selection update_command_selection unless $@ def update_command_selection(*args, &block) @menucomorpg_change = false if Input.trigger?(Input::C) && @command_window.index == WindowScene::MENU_INDEX Sound.play_decision $scene = Scene_Windows.new else if Input.trigger?(Input::C) && @command_window.index > WindowScene::MENU_INDEX @command_window.index -= 1 @menucomorpg_change = true end jet8905_update_command_selection(*args, &block) end @command_window.index += 1 if @menucomorpg_change end alias jet1234_update_actor_selection update_actor_selection unless $@ def update_actor_selection(*args, &block) @menucomorpg_change = false if Input.trigger?(Input::C) && @command_window.index > WindowScene::MENU_INDEX @command_window.index -= 1 @menucomorpg_change = true end jet1234_update_actor_selection(*args, &block) @command_window.index += 1 if @menucomorpg_change end end end FAQ Q: Why is it so hard to find snippets here? A: It's not, all the snippets are anchored in the top list, just click them to go to that snippet in the topic. Q: Why does snippet *name* not work with *other script*? A: It could be an incompatibility between the two, I'll probably look into it Q: Can you make me *insert request here*? A: Maybe, but I probably won't. This is not a request thread. ![]() -------------------- ![]() Spoiler: My Scripts: Spoiler: RPG Maker VX Encryptor WindowSkin Generator/Splitter Sprite Tools Side-View Battles Tweening Fog Of War Graphics To .rvdata RVDATA Compression Notebook Note Input Window Window Tone Changer Message Window Formatter Screenshot Taker Event Text Boxes Dynamic Face Changing Mouse System Pokemon Statistics System Time System Hunger/Thirst Factor Code Snippets (100 Total) Stamina System Item Gauge Alignment System Event Skipper Window Maker Zoom Script Radio Collectables Menu Integrity Checker 8-Dir Walking Credits Screen Splash Screen Random Stat on Level Up Like my scripts and want more? All my scripts are made under this license: ![]() ![]() CODE [URL=http://www.rpgmakervx.net/index.php?showuser=20359/][IMG]http://img189.imageshack.us/img189/6646/jetfanclubuserbar.png[/IMG][/URL] |
|
|
|
Nov 25 2009, 12:35 AM
Post
#2
|
|
![]() I enjoy cheese... ![]() Type: Designer Alignment: Chaotic Neutral |
O NAICE
THESE ARE GOOD. .... but no seriously, i'm sure people will find these useful, and I look forward to more in the future. so, make more. or i will find you.... -------------------- |
|
|
|
Nov 25 2009, 12:36 AM
Post
#3
|
|
|
There are no stupid questions, just stupid people. ![]() Type: Designer Alignment: Chaotic Evil |
Looks Smexy!
They will help people out, good job! This post has been edited by chaoticjoy1: Nov 25 2009, 12:40 AM -------------------- |
|
|
|
Nov 25 2009, 01:12 AM
Post
#4
|
|
![]() mr. inactive ![]() Type: Designer Alignment: True Neutral |
This is just amazing Jet
-------------------- |
|
|
|
Nov 25 2009, 02:24 AM
Post
#5
|
|
![]() ずっと生活の学習 ![]() Type: Designer Alignment: Neutral Good |
These can be pretty handy
-------------------- |
|
|
|
Nov 25 2009, 06:47 PM
Post
#6
|
|
|
Pump up the pie, yo! ![]() Type: Coder Alignment: Neutral Good |
Ahem, I did notice
Fixed: Spoiler: CODE #=============================================================================== # Hide Text Box Snippet # By Jet10985 # Original Code by Piejamas #=============================================================================== # This snippet allows you to add scenes where the player can hide the textbox # to maybe look at a picture then bring the box back up. # This script has: 2 customization options. #=============================================================================== module HIDE ACTIVATION_SWITCH = 5 # This is the switch that allows the player to hide the box TRIGGER = Input::F8 # This is the button that needs to be pressed to hide the box end #=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== class Window_Message alias jet_base_update update def update jet_base_update if $game_switches[HIDE::ACTIVATION_SWITCH] if Input.trigger?(HIDE::TRIGGER) if self.visible self.visible = false elsif self.visible = true end Sound.play_cursor end end end def input_pause if Input.trigger?(Input::B) or Input.trigger?(Input::C) if self.visible self.pause = false if @text != nil and not @text.empty? new_page if @line_count >= MAX_LINE else terminate_message end end end end end This post has been edited by piejamas: Nov 25 2009, 11:20 PM |
|
|
|
Nov 25 2009, 11:16 PM
Post
#7
|
|
![]() He Who Jets ![]() Type: Coder Alignment: Lawful Neutral |
It's not an error for the record, it's just sloppy writing on my part. Thanks for the update piejamas.
Just to say, i added a new snippet and updated the hide text box with an update different then piejamas. This post has been edited by Jet10985: Nov 25 2009, 11:19 PM -------------------- ![]() Spoiler: My Scripts: Spoiler: RPG Maker VX Encryptor WindowSkin Generator/Splitter Sprite Tools Side-View Battles Tweening Fog Of War Graphics To .rvdata RVDATA Compression Notebook Note Input Window Window Tone Changer Message Window Formatter Screenshot Taker Event Text Boxes Dynamic Face Changing Mouse System Pokemon Statistics System Time System Hunger/Thirst Factor Code Snippets (100 Total) Stamina System Item Gauge Alignment System Event Skipper Window Maker Zoom Script Radio Collectables Menu Integrity Checker 8-Dir Walking Credits Screen Splash Screen Random Stat on Level Up Like my scripts and want more? All my scripts are made under this license: ![]() ![]() CODE [URL=http://www.rpgmakervx.net/index.php?showuser=20359/][IMG]http://img189.imageshack.us/img189/6646/jetfanclubuserbar.png[/IMG][/URL] |
|
|
|
Nov 25 2009, 11:18 PM
Post
#8
|
|
![]() No method: 'stupid_title' found for 'nil:NilClass` ![]() Type: Coder Alignment: Chaotic Good |
You could also shorten statements like this which deal only with boolean expressions:
CODE if self.visible self.visible = false Sound.play_cursor else self.visible = true Sound.play_cursor end to something more concise: CODE self.visible = !self.visible
Sound.play_cursor -------------------- My blog - It's awesome, I assure you
QUOTE While sloppy writing does not invariably mean sloppy thinking, we've generally found the correlation to be strong -- and we have no use for sloppy thinkers. If you can't yet write competently, learn to. - Eric Raymond ---![]() My awards for being so awesome Spoiler: ![]() ![]() ![]() ![]() |
|
|
|
Nov 25 2009, 11:21 PM
Post
#9
|
|
![]() He Who Jets ![]() Type: Coder Alignment: Lawful Neutral |
Thank you also BigEd. These snippets are great learning experiences for me, being able to improve them is all the better.
-------------------- ![]() Spoiler: My Scripts: Spoiler: RPG Maker VX Encryptor WindowSkin Generator/Splitter Sprite Tools Side-View Battles Tweening Fog Of War Graphics To .rvdata RVDATA Compression Notebook Note Input Window Window Tone Changer Message Window Formatter Screenshot Taker Event Text Boxes Dynamic Face Changing Mouse System Pokemon Statistics System Time System Hunger/Thirst Factor Code Snippets (100 Total) Stamina System Item Gauge Alignment System Event Skipper Window Maker Zoom Script Radio Collectables Menu Integrity Checker 8-Dir Walking Credits Screen Splash Screen Random Stat on Level Up Like my scripts and want more? All my scripts are made under this license: ![]() ![]() CODE [URL=http://www.rpgmakervx.net/index.php?showuser=20359/][IMG]http://img189.imageshack.us/img189/6646/jetfanclubuserbar.png[/IMG][/URL] |
|
|
|
Nov 25 2009, 11:22 PM
Post
#10
|
|
|
Pump up the pie, yo! ![]() Type: Coder Alignment: Neutral Good |
I was thinking about how to do that for ages. :/
Thanks Mr Ed. |
|
|
|
Nov 26 2009, 12:16 AM
Post
#11
|
|
![]() He Who Jets ![]() Type: Coder Alignment: Lawful Neutral |
Announcing: Snippet #7: Extra Window Snippet
CODE #=============================================================================== # This snippet allows you to add more windows to the main menu that will give # the player more detail into what they have accomplished while playing. # This script has: 5 customization options. #=============================================================================== This includes PlayTime, Step Counter, Gold, and location. -------------------- ![]() Spoiler: My Scripts: Spoiler: RPG Maker VX Encryptor WindowSkin Generator/Splitter Sprite Tools Side-View Battles Tweening Fog Of War Graphics To .rvdata RVDATA Compression Notebook Note Input Window Window Tone Changer Message Window Formatter Screenshot Taker Event Text Boxes Dynamic Face Changing Mouse System Pokemon Statistics System Time System Hunger/Thirst Factor Code Snippets (100 Total) Stamina System Item Gauge Alignment System Event Skipper Window Maker Zoom Script Radio Collectables Menu Integrity Checker 8-Dir Walking Credits Screen Splash Screen Random Stat on Level Up Like my scripts and want more? All my scripts are made under this license: ![]() ![]() CODE [URL=http://www.rpgmakervx.net/index.php?showuser=20359/][IMG]http://img189.imageshack.us/img189/6646/jetfanclubuserbar.png[/IMG][/URL] |
|
|
|
Nov 26 2009, 11:04 PM
Post
#12
|
|
![]() He Who Jets ![]() Type: Coder Alignment: Lawful Neutral |
I have updated the scripts to enhance stuff. Please obtain the newest version.
-------------------- ![]() Spoiler: My Scripts: Spoiler: RPG Maker VX Encryptor WindowSkin Generator/Splitter Sprite Tools Side-View Battles Tweening Fog Of War Graphics To .rvdata RVDATA Compression Notebook Note Input Window Window Tone Changer Message Window Formatter Screenshot Taker Event Text Boxes Dynamic Face Changing Mouse System Pokemon Statistics System Time System Hunger/Thirst Factor Code Snippets (100 Total) Stamina System Item Gauge Alignment System Event Skipper Window Maker Zoom Script Radio Collectables Menu Integrity Checker 8-Dir Walking Credits Screen Splash Screen Random Stat on Level Up Like my scripts and want more? All my scripts are made under this license: ![]() ![]() CODE [URL=http://www.rpgmakervx.net/index.php?showuser=20359/][IMG]http://img189.imageshack.us/img189/6646/jetfanclubuserbar.png[/IMG][/URL] |
|
|
|
Nov 27 2009, 11:13 PM
Post
#13
|
|
![]() He Who Jets ![]() Type: Coder Alignment: Lawful Neutral |
Announcing: Snippet #8: Parameter Icon Snippet
CODE #=============================================================================== # This snippet allows you to add icons next to parameter names whenever they are # shownn in windows. Currently Incompatable with Enelvon's Luck and Resistance. # This script has: 4 customization options. #=============================================================================== Not yet compatable with Luck and Resistance. -------------------- ![]() Spoiler: My Scripts: Spoiler: RPG Maker VX Encryptor WindowSkin Generator/Splitter Sprite Tools Side-View Battles Tweening Fog Of War Graphics To .rvdata RVDATA Compression Notebook Note Input Window Window Tone Changer Message Window Formatter Screenshot Taker Event Text Boxes Dynamic Face Changing Mouse System Pokemon Statistics System Time System Hunger/Thirst Factor Code Snippets (100 Total) Stamina System Item Gauge Alignment System Event Skipper Window Maker Zoom Script Radio Collectables Menu Integrity Checker 8-Dir Walking Credits Screen Splash Screen Random Stat on Level Up Like my scripts and want more? All my scripts are made under this license: ![]() ![]() CODE [URL=http://www.rpgmakervx.net/index.php?showuser=20359/][IMG]http://img189.imageshack.us/img189/6646/jetfanclubuserbar.png[/IMG][/URL] |
|
|
|
Nov 28 2009, 09:55 PM
Post
#14
|
|
![]() He Who Jets ![]() Type: Coder Alignment: Lawful Neutral |
Announcing: Snippet #9: Success Bar Snippet
CODE #=============================================================================== # This snippet allows you to call a success bar, a bar with an area of success # you have to hit by pressing the designated button. # This script has: 4 customization options. #=============================================================================== # To create a success bar., you should use the command 'call script' with # Following code ==>> $scene = $Scene_Bar.new(F, S, B, X, W) # F = How fast the targeter takes to go across the entire bar. # S = This is what switch wll be turned on/off if they succeed. # B = This is what switch will be turn on/off if they fail. Set to 0 if not wanted. # X = Where the success area is located. # W = How wide the success area is. #=============================================================================== Post if you have questions on how to set up the scene. -------------------- ![]() Spoiler: My Scripts: Spoiler: RPG Maker VX Encryptor WindowSkin Generator/Splitter Sprite Tools Side-View Battles Tweening Fog Of War Graphics To .rvdata RVDATA Compression Notebook Note Input Window Window Tone Changer Message Window Formatter Screenshot Taker Event Text Boxes Dynamic Face Changing Mouse System Pokemon Statistics System Time System Hunger/Thirst Factor Code Snippets (100 Total) Stamina System Item Gauge Alignment System Event Skipper Window Maker Zoom Script Radio Collectables Menu Integrity Checker 8-Dir Walking Credits Screen Splash Screen Random Stat on Level Up Like my scripts and want more? All my scripts are made under this license: ![]() ![]() CODE [URL=http://www.rpgmakervx.net/index.php?showuser=20359/][IMG]http://img189.imageshack.us/img189/6646/jetfanclubuserbar.png[/IMG][/URL] |
|
|
|
Nov 28 2009, 10:37 PM
Post
#15
|
|
![]() mr. inactive ![]() Type: Designer Alignment: True Neutral |
Great job on the Success Bar Jet, I'll try it out later.
-------------------- |
|
|
|
Nov 28 2009, 10:40 PM
Post
#16
|
|
|
Pump up the pie, yo! ![]() Type: Coder Alignment: Neutral Good |
Awesomeriffic as usual Jet
|
|
|
|
Nov 30 2009, 09:38 PM
Post
#17
|
|
![]() He Who Jets ![]() Type: Coder Alignment: Lawful Neutral |
Announcing: Snippet #10: Change actor options snippet
CODE #=============================================================================== # This snippet allows you to change the options of an actor such as auto battle, # super guard, and two swords style. # This script has: No customization options. #=============================================================================== # To change the option use this line of code:# $game_actors[id].change_trait(option) # id = The actor id to change. Please remember this starts at 0, not 1. # trait = the option you want to change. this can be replaced by: # two_swords_style, auto_battle, super_guard, fix_equipment, parmacology # MAKE SURE that you include the "_" in the ones that show it.# option = true or false. True give the actor the trait, false takes it away. #=============================================================================== Post if you have questions on how to set up the script This post has been edited by Jet10985: Nov 30 2009, 09:44 PM -------------------- ![]() Spoiler: My Scripts: Spoiler: RPG Maker VX Encryptor WindowSkin Generator/Splitter Sprite Tools Side-View Battles Tweening Fog Of War Graphics To .rvdata RVDATA Compression Notebook Note Input Window Window Tone Changer Message Window Formatter Screenshot Taker Event Text Boxes Dynamic Face Changing Mouse System Pokemon Statistics System Time System Hunger/Thirst Factor Code Snippets (100 Total) Stamina System Item Gauge Alignment System Event Skipper Window Maker Zoom Script Radio Collectables Menu Integrity Checker 8-Dir Walking Credits Screen Splash Screen Random Stat on Level Up Like my scripts and want more? All my scripts are made under this license: ![]() ![]() CODE [URL=http://www.rpgmakervx.net/index.php?showuser=20359/][IMG]http://img189.imageshack.us/img189/6646/jetfanclubuserbar.png[/IMG][/URL] |
|
|
|
Dec 2 2009, 01:14 AM
Post
#18
|
|
![]() He Who Jets ![]() Type: Coder Alignment: Lawful Neutral |
Update: Change actor options, updated to v.2
I messed up on my actor options so i rewrote the script to be better and easier to use. Please obtain the newest one from the OP. Ignore the directions posted on post #17. This post has been edited by Jet10985: Dec 2 2009, 01:19 AM -------------------- ![]() Spoiler: My Scripts: Spoiler: RPG Maker VX Encryptor WindowSkin Generator/Splitter Sprite Tools Side-View Battles Tweening Fog Of War Graphics To .rvdata RVDATA Compression Notebook Note Input Window Window Tone Changer Message Window Formatter Screenshot Taker Event Text Boxes Dynamic Face Changing Mouse System Pokemon Statistics System Time System Hunger/Thirst Factor Code Snippets (100 Total) Stamina System Item Gauge Alignment System Event Skipper Window Maker Zoom Script Radio Collectables Menu Integrity Checker 8-Dir Walking Credits Screen Splash Screen Random Stat on Level Up Like my scripts and want more? All my scripts are made under this license: ![]() ![]() CODE [URL=http://www.rpgmakervx.net/index.php?showuser=20359/][IMG]http://img189.imageshack.us/img189/6646/jetfanclubuserbar.png[/IMG][/URL] |
|
|
|
Dec 3 2009, 04:12 PM
Post
#19
|
|
![]() Type: Undisclosed |
Wow, super cool!
I will definantly use these ^^ |
|
|
|
Dec 5 2009, 11:43 AM
Post
#20
|
|
![]() Type: Designer |
I can't figure out how to get the Success bar to work. I get this error:
NoMethodError occurred while running script. undefined method 'new' for nil:NilClass I thought it might have something to do with the values I was putting into the command line, but I'm a little confused about that, cause it doesn't say like, what the time is in (seconds or frames or something) or what the width values are in. |
|
|
|
![]() ![]() |
| Lo-Fi Version | Time is now: 18th May 2013 - 03:05 PM |
|
|




Nov 24 2009, 08:27 PM

























---