Jet10985's Code Snippets, Last update: 2-13. Total: 25. |
|
|
|
|
Nov 25 2009, 09:08 PM
|

Level 3

Group: Member
Posts: 44
Type: Scripter
RM Skill: Skilled

|
Jet10985's code snippetsIntroductionThis is my collection of code snippets i make for fun. I just release to the public in case they want them or see them as handy. This is not a shop, don't ask me to write you a snippet. I write these in my spare time and therefore, requests ruin my fun. ListHere is a list of all my snippets here, useful more so when i get more. Descriptions for snippets can be found here in the list. CODE WindowSkin Snippet: This lets you have custom windowskins for every default window in the program.
Hide Text Box Snippet: This lets you make a text box that can be hidden, then brought back up by the player.
Run/Guard Hotkey: This lets you assign a button for quick access in battle that lets the player guard, or run.
Run/Guard Hotkey ATB Version: Does the same as the above, except works only with ATB.
Aliased Load Menu Option: It adds a Load menu option for quick loading.
Speed Save: This lets you assign a button to bring up the save menu quickly.
Extra Windows: This adds extra windows to the main menu, decided by you.
Parameter Icons: This adds icons next to parameters. Not yet compatible with Enelvon’s luck and resistance scripts.
Success Bar: This lets you create a bar of success that can turn switches on/off.
Change Actor Options: This allows you to change actor options like super guard or two swords style.
No Actor EXP: This allows you to define actors that cannot gain exp for some reason or another.
Change Windowskin: This lets you change the windowskin will in-game with a simple script call.
Cheat System: This lets you add a cheat system to your game.
Records Window: Allows you to show a window with values of variables in it.
Level Up Effects: Lets you add extra effects when the player levels up.
Disable Battle Commands: Allows you to disable commands like “attack”, “skill” and such in battle.
“If Party Has Equipped”: Allows you to quickly check if anyone in the party has a certain weapon/armor equipped.
“If Party Has Skill: Same as above but with learned skills instead.
Set Actor’s Max Level: Allows you set set each actor’s maximum level individually.
Break States: Lets you designate states to break HP and MP, making them 0 at a hit.
Immortal States: Lets you designate states that make the character immortal.
Diagonal Map Scroll: Lets you scroll the map diagonally. The Snippets CODE #=============================================================================== # WindowSkin Snippet # By Jet10985 #=============================================================================== # This snippet allows you to change the windowskin of every default window in # the program. # This script has: A lot of customization options. #=============================================================================== # This script is not open for distribution to other sites without permission # from me, Jet10985. Please credit me if you use this script, for aliasing is # slightly difficult, and you probably couldn't do it unless your cool # like scripters are. Make sure that the new windowskin is not called window # because that would replace the default skin, unless that's what you wanted. # Also make sure the new windowskin is in the Graphics/System folder #===============================================================================
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 shown when you have to select what actor to use the 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 shown when you have to select what actor to use the 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
#=============================================================================== # There is no need to edit further unless you know what you are doing. # If you've got any errors, check to see if you spelled the name of the # custom windowskin correctly. An underscore and capital letter in the wrong # place can cause a error. #=============================================================================== class Window_Base < Window alias jets_little_script_initialize_window_base :initialize unless $@ def initialize(*args) jets_little_script_initialize_window_base(*args) 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) jet8912_initialize(*args) 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 jet6384_initialize 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) jet2944_initialize(*args) self.windowskin = Cache.system(Windowskins::GOLD_SKIN) end end #=============================================================================== class Window_MenuStatus alias jet3794_initialize initialize unless $@ def initialize(*args) jet3794_initialize(*args) 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) jet4759_initialize(*args) 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) jet1983_initialize(*args) 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) jet2739_initialize(*args) self.windowskin = Cache.system(Windowskins::SKILL_SKIN) end end #=============================================================================== class Window_Equip alias jet2344_initialize initialize unless $@ def initialize(*args) jet2344_initialize(*args) self.windowskin = Cache.system(Windowskins::EQUIP_SKIN) end end #=============================================================================== class Window_EquipStatus alias jet2848_initialize initialize unless $@ def initialize(*args) jet2848_initialize(*args) self.windowskin = Cache.system(Windowskins::EQUIP_STATUS_SKIN) end end #=============================================================================== class Window_Status alias jet4749_initialize initialize unless $@ def initialize(*args) jet4749_initialize(*args) self.windowskin = Cache.system(Windowskins::STATUS_SCREEN_SKIN) end end #=============================================================================== class Window_SaveFile alias jet2739_initialize initialize unless $@ def initialize(*args) jet2739_initialize(*args) self.windowskin = Cache.system(Windowskins::SAVE_SKIN) end end #=============================================================================== class Window_ShopBuy alias jet1224_initialize initialize unless $@ def initialize(*args) jet1224_initialize(*args) self.windowskin = Cache.system(Windowskins::SHOP_BUY_SKIN) end end #=============================================================================== class Window_ShopNumber alias jet5696_initialize initialize unless $@ def initialize(*args) jet5696_initialize(*args) self.windowskin = Cache.system(Windowskins::SHOP_NUMBER_SKIN) end end #=============================================================================== class Window_ShopStatus alias jet9999_initialize initialize unless $@ def initialize(*args) jet9999_initialize(*args) self.windowskin = Cache.system(Windowskins::SHOP_STATUS_SKIN) end end #=============================================================================== class Window_NameEdit alias jet8888_initialize initialize unless $@ def initialize(*args) jet8888_initialize(*args) self.windowskin = Cache.system(Windowskins::NAME_EDIT_SKIN) end end #=============================================================================== class Window_NameInput alias jet7777_initialize initialize unless $@ def initialize(*args) jet7777_initialize(*args) self.windowskin = Cache.system(Windowskins::NAME_INPUT_SKIN) end end #=============================================================================== class Window_Message alias jet6666_initialize initialize unless $@ def initialize jet6666_initialize 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 jet5555_initialize self.windowskin = Cache.system(Windowskins::PARTY_COMMAND_SKIN) end end #=============================================================================== class Window_ActorCommand alias jet4444_initialize initialize unless $@ def initialize jet4444_initialize self.windowskin = Cache.system(Windowskins::BATTLE_COMMAND_SKIN) end end #=============================================================================== class Window_TargetEnemy alias jet3333_initialize initialize unless $@ def initialize jet3333_initialize self.windowskin = Cache.system(Windowskins::TARGET_ENEMY_SKIN) end end #=============================================================================== class Window_BattleStatus alias jet2222_initialize initialize unless $@ def initialize jet2222_initialize self.windowskin = Cache.system(Windowskins::BATTLE_STATUS_SKIN) end end #=============================================================================== class Window_DebugLeft alias jet1111_initialize initialize unless $@ def initialize(*args) jet1111_initialize(*args) self.windowskin = Cache.system(Windowskins::DEBUG_LEFT_SKIN) end end #=============================================================================== class Window_DebugRight alias jet0000_initialize initialize unless $@ def initialize(*args) jet0000_initialize(*args) self.windowskin = Cache.system(Windowskins::DEBUG_RIGHT_SKIN) end end 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 include Hide alias jet7535_base_update update unless $@ def update jet7535_base_update unless $scene.is_a?(Scene_Battle) if $game_switches[ACTIVATION_SWITCH] && Input.trigger?(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 && !@text.empty? new_page if @line_count >= MAX_LINE else terminate_message end end end end end CODE #=============================================================================== # Run/Guard Hotkey Snippet # By Jet10985 #=============================================================================== # This snippet allows you to add a hotkey type system to let players have a # handy button to automaticly run or guard. Cannot use with ATB. # This script has: 2 customization options. #===============================================================================
module Hotkey GUARD_BUTTON = Input::F5 # This is what button is set to make you guard. RUN_BUTTON = Input::F6 # This is what button is set to make you run.
end #=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== class Scene_Battle < Scene_Base include Hotkey alias jet2847_update_actor_command_selection update_actor_command_selection unless $@ def update_actor_command_selection jet2847_update_actor_command_selection if Input.trigger?(GUARD_BUTTON) Sound.play_decision @active_battler.action.set_guard next_actor end if Input.trigger?(RUN_BUTTON) if !$game_troop.can_escape Sound.play_buzzer return end Sound.play_decision process_escape end end end CODE #=============================================================================== # Run/Guard Hotkey Snippet, ATB version # By Jet10985 #=============================================================================== # 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. #===============================================================================
module Hotkey GUARD_BUTTON = Input::F5 # This is what button is set to make you guard. RUN_BUTTON = Input::F6 # This is what button is set to make you run.
end #=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== class Scene_Battle < Scene_Base include Hotkey alias jet2847_update_actor_command_selection update_actor_command_selection unless $@ def update_actor_command_selection jet2847_update_actor_command_selection if Input.trigger?(GUARD_BUTTON) Sound.play_decision @commander.action.set_guard end_command end if Input.trigger?(RUN_BUTTON) if !$game_troop.can_escape Sound.play_buzzer return end Sound.play_decision process_escape end end end CODE #=============================================================================== # Aliased Load Menu Option Snippet v.2 # By Jet10985 # Thanks to: Woratana #=============================================================================== # This snippet adds a load option to the main menu for quick loading. # This script has: 2 customization options. #=============================================================================== # 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. #===============================================================================
module Load LOAD_NAME = "Load" # This is the name of the load option
MENU_INDEX = 5 #This is where to add the load menu as a option end #=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== class Game_System attr_accessor :load_disabled 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 $@ alias jet9374_draw_item draw_item unless $@ def initialize(*args) @disabled_commands = [] jet4569_initialize(*args) end def draw_item(*args) jet9374_draw_item(*args) @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 include Load
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) jet6993_create_command_window(*args) @command_window.ins_command(MENU_INDEX, LOAD_NAME) @newcommand ||= [] @newcommand << MENU_INDEX sort_newcommand if $game_system.load_disabled @command_window.draw_item(MENU_INDEX, false) end end alias jet3943_update_command_selection update_command_selection unless $@ def update_command_selection(*args) @menucomorpg_change = false if Input.trigger?(Input::C) && @command_window.index == 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 > MENU_INDEX @command_window.index -= 1 @menucomorpg_change = true end jet3943_update_command_selection(*args) end @command_window.index += 1 if @menucomorpg_change end alias jet3446_update_actor_selection update_actor_selection unless $@ def update_actor_selection(*args) @menucomorpg_change = false if Input.trigger?(Input::C) && @command_window.index > MENU_INDEX @command_window.index -= 1 @menucomorpg_change = true end jet3446_update_actor_selection(*args) @command_window.index += 1 if @menucomorpg_change end end CODE #=============================================================================== # Speed Save Option Snippet # By Jet10985 #=============================================================================== # This snippet adds a hotkey to open the save menu quickly on the map. # This script has: 1 customization option. #===============================================================================
module Speed_Save COMMAND_BUTTON = Input::F7 # This is what button is set to make you save.
end
#=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== class Scene_Map < Scene_Base include Speed_Save alias jet2228_update update unless $@ def update jet2228_update update_save end def update_save if Input.trigger?(COMMAND_BUTTON) if $game_system.save_disabled Sound.play_buzzer else $scene = Scene_File.new(true, false, false) end end end end CODE #=============================================================================== # Extra Windows Snippet # By Jet10985 # Inspired by Modern Algebra #=============================================================================== # 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. #===============================================================================
module Extra_Window
GOLD_ICON = 147 # The icon that appears in the gold window PLAY_TIME_ICON = 188 # The icon that appears in the PlayTime window STEP_COUNTER_ICON = 48 # The icon that appears in the Step Counter window LOCATION_ICON = 153 # The icon that appears in the Location window
#--------------------------------------------------------------------------- # Here is where you decide what windows actually appear. Here is the list: # You can input numbers 0, 1, 2, and 3. always have a comma and space # between numbers. # 0 = Gold Window # 1 = StepCount Window # 2 = Location Window # 3 = PlayTime Window #--------------------------------------------------------------------------- EXTRA_WINDOWS = [0, 2] end #=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== class Game_System include Extra_Window
attr_reader :extra_windows alias jet7812_initialize initialize unless $@ def initialize(*args) @extra_windows = EXTRA_WINDOWS jet7812_initialize(*args) end end #------------------------------------------------------------------------------- class Game_Interpreter def add_optional_window(id) $game_system.extra_windows.push(id) unless $game_system.extra_windows.include?(id) end def remove_optional_window(id) $game_system.extra_windows.delete(id) end end #------------------------------------------------------------------------------- class Window_PlayTime < Window_Base include Extra_Window
def initialize(x, y) super(x, y, 160, 32 + WLH) refresh end
def refresh self.contents.clear x, qe = 0, contents.width if PLAY_TIME_ICON >= 0 draw_icon(PLAY_TIME_ICON, x, 0) x += 24 qe -= 24 end @total_sec = Graphics.frame_count / Graphics.frame_rate hour = @total_sec / 60 / 60 min = @total_sec / 60 % 60 sec = @total_sec % 60 text = sprintf("%02d:%02d:%02d", hour, min, sec) self.contents.font.color = normal_color self.contents.draw_text(x, 0, qe, WLH, text, 2) end
def update super if Graphics.frame_count / Graphics.frame_rate != @total_sec refresh end end end #------------------------------------------------------------------------------- class Window_StepCount < Window_Base include Extra_Window
def initialize(x, y) super(x, y, 160, 32 + WLH) x, qe = 0, contents.width if STEP_COUNTER_ICON >= 0 draw_icon (STEP_COUNTER_ICON, x, 0) x += 24 qe -= 24 end contents.font.color = normal_color contents.draw_text (x, 0, qe, WLH, $game_party.steps.to_s, 2) end end #------------------------------------------------------------------------------- class Window_Gold include Extra_Window def draw_currency_value(value, x, y, width, *args) if GOLD_ICON >= 0 draw_icon(GOLD_ICON, x, y) x += 24 width -= 24 end super(value, x, y, width, *args) end end #------------------------------------------------------------------------------- class Window_Location < Window_Base include Extra_Window
def initialize(x, y) height = 32 + WLH y -= height super(x, y, 160, height) x, qe = 0, contents.width if LOCATION_ICON >= 0 draw_icon(LOCATION_ICON, x, 0) x += 24 qe -= 24 end map_name = load_data("Data/MapInfos.rvdata")[$game_map.map_id].name contents.font.color = normal_color contents.draw_text(x, 0, qe, WLH, map_name, 2) end end #------------------------------------------------------------------------------- class Scene_Menu < Scene_Base alias jet5839_start start unless $@ def start jet5839_start create_extra_windows end
alias jet2039_terminate terminate unless $@ def terminate jet2039_terminate @extra_windows.each { |window| window.dispose } end
alias jet1099_update update unless $@ def update jet1099_update if $game_system.extra_windows.include?(3) @extra_windows[$game_system.extra_windows.index(3)].update end end
def create_extra_windows y = Graphics.height @extra_windows = [] $game_system.extra_windows.each { |i| window = extra_window(i) y -= window.height window.y = y @extra_windows.push(window) } end
def extra_window(index) return case index when 0 then Window_Gold.new(0, 0) when 1 then Window_StepCount.new(0, 0) when 2 then Window_Location.new(0, 0) when 3 then Window_PlayTime.new(0, 0) end end end CODE #=============================================================================== # Parameter Icons Snippet # By Jet10985 #=============================================================================== # 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. #===============================================================================
module ParamIcons ATK_ICON = 132 # Icon shown next to Attack DEF_ICON = 52 # Icon shown next to Defence AGI_ICON = 48 # Icon shown next to Agility SPI_ICON = 133 # Icon shown next to Spirit end
#=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== class Window_Base < Window def draw_actor_parameter(actor, x, y, type) case type when 0 parameter_name = Vocab::atk parameter_value = actor.atk parameter_icon = ParamIcons::ATK_ICON when 1 parameter_name = Vocab::def parameter_value = actor.def parameter_icon = ParamIcons::DEF_ICON when 2 parameter_name = Vocab::spi parameter_value = actor.spi parameter_icon = ParamIcons::SPI_ICON when 3 parameter_name = Vocab::agi parameter_value = actor.agi parameter_icon = ParamIcons::AGI_ICON end self.contents.font.color = system_color self.contents.draw_text(x, y, 120, WLH, parameter_name) self.contents.font.color = normal_color self.contents.draw_text(x + 120, y, 36, WLH, parameter_value, 2) self.draw_icon(parameter_icon, x - 25, y) end end CODE #=============================================================================== # Success Bar Snippet # By Jet10985 # 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. #=============================================================================== # 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. #===============================================================================
module SuccessBar BACK_COLOR = Color.new(255, 255, 255) # The color of the bar background. SUCCESS_AREA_COLOR = Color.new(0, 255, 0) # The color of the area of success. TARGETER_COLOR = Color.new(255, 0, 0) # The color of the targeter. INPUT_BUTTON = Input::C # The button you have to press to stop the targetter. end
#=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== class Window_Bar < Window_Base include SuccessBar 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, TARGETER_COLOR) self.contents.fill_rect(0, 5, 250, 8, BACK_COLOR) self.contents.fill_rect(@xa, 5, @bw, 8, 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 include SuccessBar 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?(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 CODE #=============================================================================== # Change Actor Options Snippet v.2 # By Jet10985 # 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 0. #===============================================================================
#=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #===============================================================================
class Game_Interpreter
def change_two_swords_style(actor, option) $game_party.members[actor].actor.two_swords_style = option end def change_super_guard(actor, option) $game_party.members[actor].actor.super_guard = option end def change_fix_equipment(actor, option) $game_party.members[actor].actor.fix_equipment = option end def change_pharmacology(actor, option) $game_party.members[actor].actor.pharmacology = option end def change_auto_battle(actor, option) $game_party.members[actor].actor.auto_battle = option end end CODE #=============================================================================== # No Actor EXP Snippet # By Jet10985 # 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 trough the event command. # This script has: 1 customization option. #=============================================================================== =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] end
#=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== class Game_Actor include NoActorEXP alias jet1999_change_exp change_exp unless $@ def change_exp(exp, show) if NO_ACTOR_EXP != nil jet1999_change_exp(exp, show) unless $game_system.no_exp_actors.include?(@actor_id) end end end
class Game_System include NoActorEXP attr_accessor :no_exp_actors alias jet1092_initialize initialize unless $@ def initialize jet1092_initialize @no_exp_actors = NO_ACTOR_EXP.clone end end
class Game_Interpreter include NoActorEXP def no_exp_gain(actor) if $game_system.no_exp_actors != nil $game_system.no_exp_actors.push(actor) unless $game_system.no_exp_actors.include?(actor) end end def yes_exp_gain(actor) if $game_system.no_exp_actors != nil $game_system.no_exp_actors.delete(actor) if $game_system.no_exp_actors.include?(actor) end end end CODE #=============================================================================== # Change WindowSkin Snippet # By Jet10985 # 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. #=============================================================================== # 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. #===============================================================================
class Window_Base alias jet2888_initialize initialize unless $@ def initialize(*args) jet2888_initialize(*args) self.windowskin = Cache.system($game_system.windowskin) @wskin = $game_system.windowskin end alias jet1899_update update unless $@ def update jet1899_update 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 jet4729_initialize @windowskin = "Window" end end
class Game_Interpreter def change_skin(skinname) $game_system.windowskin = skinname end end CODE #=============================================================================== # Cheat System # By Jet10985 # Help by: Yanfly #=============================================================================== # This script is not open for distribution to other sites without permission # from me, Jet10985. Please credit me if you use this script. #=============================================================================== # This script will add a cheat system # # This script has: 6 customization options. #===============================================================================
=begin The cheat name and the common event id match in the 2 different arrays. 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.
To add cheats, use a comma and write the cheat in quotations in the first array. Then, write the id of the common event that will occur in the second array.
NOTE: Each cheat can only be used 1 time.
If you decide to add a menu option, you may disable the entering of cheats by using this command in a script event:
change_cheat_access(option)
Where option can be true or false. true = They CAN'T enter cheats false = They CAN eneter cheats. =end
module CheatSystem 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 cheats. ADD_MENU_OPTION = true # Add a menu option for the cheats? CHEATS_NAME = "Cheats" # This is the name of the Cheats option.
MENU_INDEX = 5 #This is where to add the Cheats menu as a option. end
#=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== class Game_System attr_accessor :used_cheats attr_accessor :cheats_disabled end
class Scene_Name include CheatSystem alias jet8593_terminate terminate unless $@ def terminate jet8593_terminate cheat_update end def cheat_update $game_system.used_cheats = [] if $game_system.used_cheats.nil? CHEATS.each_pair { |event_id, cheat_name| if CHEATS.values.include?($game_actors[ACTOR_ID].name) $game_temp.common_event_id = event_id - 1 unless $game_system.used_cheats.include?(event_id - 1) $game_system.used_cheats.push(event_id - 1) unless $game_system.used_cheats.include?(event_id - 1) end } end end class Game_Interpreter def change_cheat_access(option) $game_system.cheats_disabled = option end end
if CheatSystem::ADD_MENU_OPTION class Window_Command < Window_Selectable alias jet8590_initialize initialize unless $@ alias jet9743_draw_item draw_item unless $@ def initialize(*args) @disabled_commands = [] jet8590_initialize(*args) end def draw_item(*args) jet9743_draw_item(*args) @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 include CheatSystem
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) jet8940_create_command_window(*args) @command_window.ins_command(MENU_INDEX, CHEATS_NAME) @newcommand ||= [] @newcommand << MENU_INDEX sort_newcommand if $game_system.cheats_disabled @command_window.draw_item(MENU_INDEX, false) end end alias jet8905_update_command_selection update_command_selection unless $@ def update_command_selection(*args) @menucomorpg_change = false if Input.trigger?(Input::C) && @command_window.index == MENU_INDEX if $game_system.cheats_disabled Sound.play_buzzer return end Sound.play_decision $game_temp.name_actor_id = ACTOR_ID $game_temp.name_max_char = 8 $scene = Scene_Name.new else if Input.trigger?(Input::C) && @command_window.index > MENU_INDEX @command_window.index -= 1 @menucomorpg_change = true end jet8905_update_command_selection(*args) end @command_window.index += 1 if @menucomorpg_change end alias jet1234_update_actor_selection update_actor_selection unless $@ def update_actor_selection(*args) @menucomorpg_change = false if Input.trigger?(Input::C) && @command_window.index > MENU_INDEX @command_window.index -= 1 @menucomorpg_change = true end jet1234_update_actor_selection(*args) @command_window.index += 1 if @menucomorpg_change end end end CODE #=============================================================================== # Records Window Snippet # By Jet10985 # Help by: Piejamas, BigEd781, Mithran #=============================================================================== # This snippet will allow you to show some variables in a window at the # bottom-left corner of the screen in a window. # This script has: 6 customization options. #===============================================================================
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 }
#------------------------------------------------------------------------------- ALLOW_TRIGGER = true # Let the player hide the window by pressing a button? HIDE_WINDOW_BUTTON = Input::CTRL # If true, what button? SWITCH_TO_SHOW = 5 # This is the switch that needs to be on to show the window OPACITY = 255 # This is how transperant the window is. 0 is transperant. end
#=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== class Window_Records < Window_Base include Records def initialize(x, y, width, height) super(x, y, width, height) self.opacity = OPACITY self.visible = false @keys = STATS.keys @values = STATS.values init_cache refresh end def refresh self.contents.clear for i in 0...@keys.size self.contents.draw_text(0, i * 24, 222, WLH, @values[i-(@keys.size - 1)] + " " + $game_variables[@keys[i-(@keys.size - 1)]].to_s) end end def init_cache @cache ||= {} @keys.each { |v| @cache[v] = $game_variables[v] } end
def update if need_refresh? refresh end end def need_refresh? return false unless self.visible @cache.each do |k,v| return true if $game_variables[k] != v end return false end end
class Scene_Map include Records alias jet5830_start start unless $@ def start jet5830_start @var_window = Window_Records.new(0, 416 - ((STATS.keys.size * 24) + 32), 160, (STATS.keys.size * 24) + 32) @first_switch = false end alias jet5839_update update unless $@ def update jet5839_update @var_window.update variable_update end alias jet5299_terminate terminate unless $@ def terminate @var_window.dispose jet5299_terminate end def variable_update if @first_switch == false and $game_switches[SWITCH_TO_SHOW] @var_window.visible = true @first_switch = true end if Input.trigger?(HIDE_WINDOW_BUTTON) && ALLOW_TRIGGER && $game_switches[SWITCH_TO_SHOW] @var_window.visible = !@var_window.visible end end end CODE #=============================================================================== # Level Up Effects Snippet # By Jet10985 # 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. #===============================================================================
module LevelUpEffects MAX_HP = true # Give the player maximum HP? HP_PERCENTAGE = 0 # Heal the hp by a percentage. Leave as 0 for no effect. MAX_MP = true # Give the player maximum MP? MP_PERCENTAGE = 0 # Heal the mp by a percentage. Leave as 0 for no effect. ADD_VARIABLES = true # Add an amount to variables?
# 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 jet5839_level_up @hp = maxhp unless !LevelUpEffects::MAX_HP @mp = maxmp unless !LevelUpEffects::MAX_MP @hp += (maxhp * (LevelUpEffects::HP_PERCENTAGE / 100)) unless LevelUpEffects::HP_PERCENTAGE == 0 @mp += (maxmp * (LevelUpEffects::MP_PERCENTAGE / 100)) unless LevelUpEffects::MP_PERCENTAGE == 0 if LevelUpEffects::ADD_VARIABLES LevelUpEffects::VARIABLE_ADDITIONS.each_key { |variable| $game_variables[variable] += LevelUpEffects::VARIABLE_ADDITIONS[variable] } end $game_temp.common_event_id = LevelUpEffects::COMMON_EVENT_RUN if $scene.is_a?(Scene_Battle) @battle_common_event = true end end end
class Scene_Battle alias jet5889_battle_end battle_end unless $@ def battle_end(*args) jet5889_battle_end(*args) $game_temp.common_event_id = LevelUpEffects::COMMON_EVENT_RUN unless !@battle_common_event end end CODE #=============================================================================== # Disable Battle Commands (Default battle system version) Snippet # By Jet10985 # Help by: Mithran #=============================================================================== # This snippet allows you to change a characters access to perform certain # actions in battle. DEFAULT BATTLE SYSTEM/REEDO'S SVBS ONLY. # This script has: 0 customization options. #=============================================================================== =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 jet5839_initialize @no_attack = [] @no_skills = [] @no_guard = [] @no_items = [] end end
class Scene_Battle alias jet5839_start_actor_command_selection start_actor_command_selection unless $@ def start_actor_command_selection(*args) jet5839_start_actor_command_selection(*args) (@actor_command_window.draw_item(0, false); @attack_no = true) if $game_system.no_attack.include?(@actor_index) (@actor_command_window.draw_item(1, false); @skill_no = true) if $game_system.no_skills.include?(@actor_index) (@actor_command_window.draw_item(2, false); @guard_no = true) if $game_system.no_guard.include?(@actor_index) (@actor_command_window.draw_item(3, false); @item_no = true) if $game_system.no_items.include?(@actor_index) 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 CODE #=============================================================================== # "If Party Has Equipped" (Eventers tool) Snippet v.2 # By Jet10985 # 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. #=============================================================================== =begin How to Use:
To call the script use:
party_has_equip?(item_id, type, switch)
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. 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 CODE #=============================================================================== # "If Party Has Skill" (Eventers tool) Snippet v.2 # By Jet10985 # 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. #=============================================================================== =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 CODE #=============================================================================== # Set Actor's Max Level Snippet # By Jet10985 #=============================================================================== # This snippet will allow you to set each actor to have an individual maximum # level that they can reach in-game. # This script has: 1 customization options. #=============================================================================== =begin How to Use:
Below these instructions is the area to choose actor maximum levels. The format is stated next to the example. If you want more actors on these, add a comma then follow the format of
actor id => max level
PLEASE NOTE: Character MAYBE able to over-step the limit if the EXP gained at 1 time is enough to level them up twice. =end
module ActorMaxLevel
MAX_LEVELS = { 1 => 2, # actor id => max level 2 => 20, # actor id => max level 3 => 30 # actor id => max level } MAX_LEVELS.default = 99 # The max level for any undefined actor. end
#=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== class Game_Actor include ActorMaxLevel alias jet8888_make_exp_list make_exp_list def make_exp_list jet8888_make_exp_list @exp_list[MAX_LEVELS[@actor_id] + 1] = 0 if MAX_LEVELS[@actor_id] != nil end end CODE #=============================================================================== # Break States Snippet # By Jet10985 # 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. #===============================================================================
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 include BreakStates alias jet0088_execute_damage execute_damage unless $@ def execute_damage(user) jet0088_execute_damage(user) for i in 0..HP_BREAK_STATE_IDS.size if @states.include?(HP_BREAK_STATE_IDS[i]) self.hp = 0 end end for i in 0..MP_BREAK_STATE_IDS.size if @states.include?(MP_BREAK_STATE_IDS[i]) self.mp = 0 end end end end CODE #=============================================================================== # Immortal States Snippet # By Jet10985 #=============================================================================== # 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. #===============================================================================
module ImmortalStates STATE_IMMORTAL = [17, 18, 19] end
#=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== class Game_Battler include ImmortalStates
alias jet3290_newhp hp= unless $@ def hp=(*args) for i in 0..STATE_IMMORTAL.size if @states.include?(STATE_IMMORTAL[i]) @immortal = true end end self.jet3290_newhp(*args) end end CODE #=============================================================================== # Diagonal Map Scroll Snippet # By Jet10985 # Help by: Yanfly # Inspired by: Scherzo #=============================================================================== # This snippet will allow you scroll the map diagonally during events. # This script has: 0 customization options. #=============================================================================== =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
def update_scroll if @scroll_rest > 0 distance = 2 ** @scroll_speed case @scroll_direction when 7 scroll_up(distance) and scroll_left(distance) when 2 # Down scroll_down(distance) when 9 scroll_up(distance) and scroll_right(distance) when 4 # Left scroll_left(distance) when 1 scroll_down(distance) and scroll_left(distance) when 6 # Right scroll_right(distance) when 3 scroll_down(distance) and scroll_right(distance) when 8 # Up scroll_up(distance) end @scroll_rest -= distance end end end
class Game_Interpreter
def diagonal_map_scroll(direction, distance, speed) $game_map.start_scroll(direction, distance, speed) end end
CREDIT IF USED!
This post has been edited by jet10985: Feb 13 2010, 09:13 AM
__________________________
My Scripts posted here are outdated, as well as my blog posts. I only update at http://www.rpgmakervx.net/ so find my topics there. All my scripts are made under this license: 
|
|
|
|
|
|
|
Posts in this topic
jet10985 Jet10985's Code Snippets Nov 25 2009, 09:08 PM Paper PokéMaster Cool! I may use some of these.
Does that ATB ... Nov 26 2009, 07:09 AM jet10985 It depends on what version you grab. The regular o... Nov 26 2009, 07:49 AM Paper PokéMaster All right. I'll try it out.
Wait... It doesn... Nov 26 2009, 08:01 AM jet10985 I'm pretty sure, i'll check
EDIT: Yes, it... Nov 26 2009, 08:18 AM Paper PokéMaster It's so awesome! I'll try out some of ... Nov 26 2009, 08:28 AM runefreak I'm guessing you signed up here to post these ... Nov 26 2009, 09:05 AM LegacyX Nice work, these will defenitly come in handy.
al... Nov 26 2009, 10:08 AM jet10985 Thanks, and i un-centered the codes just for you
... Nov 26 2009, 12:02 PM jet10985 Update: Added 2 new snippets, and updated every si... Nov 27 2009, 04:07 PM jet10985 Announcing: Snippet #9: Success Bar Snippet
CODE#... Nov 28 2009, 02:49 PM jet10985 Announcing: Snippet #10: Change actor options snip... Nov 30 2009, 02:25 PM SuperMega The success bar is something I've been searchi... Nov 28 2009, 06:52 PM jet10985 Thanks. That means a lot coming from someone obvio... Nov 28 2009, 06:58 PM SuperMega Just got an error on Line 74. Turns out you got a... Nov 28 2009, 07:04 PM jet10985 That's for the heads-up on the smiley. Mind po... Nov 28 2009, 07:07 PM SuperMega $scene = $Scene_Bar.new(360, 3, 0, 0, 50... Nov 28 2009, 07:24 PM jet10985 0 should be ok with everything. Remove the $ ... Nov 28 2009, 07:34 PM SuperMega I got it to work! Would it be possible to add... Nov 28 2009, 08:03 PM jet10985 I was thinking about that. It's a great idea, ... Nov 28 2009, 08:27 PM jet10985 Update: Change actor options, updated to v.2
I me... Dec 1 2009, 06:11 PM runefreak Looks good Jet, I will be trying it out later. Dec 1 2009, 06:22 PM Paper PokéMaster WOOT Auto battle!
*Goes to try it out*
Would ... Dec 12 2009, 06:54 AM jet10985 For the multiple actors, just call the script more... Dec 12 2009, 10:57 AM Paper PokéMaster All right. Thanks. Dec 12 2009, 01:08 PM jet10985 UPDATE: I updated ALL my snippets and added 3 more... Jan 12 2010, 09:45 AM jet10985 UPDATE: Added a new snippet, updated some others. ... Jan 26 2010, 05:18 PM jet10985 It's been a while since i updated my snippets ... Feb 13 2010, 09:18 AM LegacyX Been awhile since i last seen this topic.
(thanks... Feb 13 2010, 09:34 AM Digioso Sorry for necroing this thread.
Just wanted to s... Oct 6 2011, 12:23 PM
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
RPG RPG Revolution is an Privacy
Policy and Legal
|
|