Zortik 15 Posted May 11, 2015 (edited) Hello, I've been out of the development stage for some time, but I'm looking to make a return to finishing my primary project "Classika". Unfortunately, I am unable to install RPG VX onto my current computer which prompted me go ahead and 'suck it up' and redo the work in RPGVX Ace (which I thankfully have on Steam). I managed to track down and find replacement / improved versions of the scripts I had in place already. With the exception of a few... Specifically, the following three. I'm not against improving on them, but for the time being I'm begging support from the community to help me convert them as is so that I can use them within RPG VX Ace. Please find the 3 scripts below: Script #1 Lufia Movement #----------------------------------------------------------------------------- # ***** Lufia Movement 1.0 ***** # # Original script: BigEd781 # Expanded by: Kal # Ideas and testing: zortik #----------------------------------------------------------------------------- # #--------------------------What it does--------------------------------------- # # With this scripts you can make events move a la enemy movement in the # Lufia games. This means that the event will move a certain ammount of # tiles when the player moves. If the player stands still so will the event. # # Events can move in different patterns. Currently there are 4 patterns: # 1. Approach (moves towards the player) # 2. Flee (moves away from the player) # 3. Random (moves randomly) # 4. Opposite (for example, if the player moves up the event moves down) # # Different move ratios are supported. This means that an event can move # for example 2, 3 or 4 tiles (no upper limit) when the player moves. It # can also go the other way, so the event can move 1 tile when the player # has taken 2 steps for example. # #-------------------------How to use it--------------------------------------- # # To use this script you add a comment to the event(s) you want to use. # The comment is in the following format: lufiamovement:type:ratio # # So say I want to make an event that moves 2 tiles in a random direction # when the player moves. Then I would make a comment somewhere in the event # that said: lufiamovement:random:2 # # You can use the following types: approach, flee, random, opposite. # # You can use any whole number (including negative numbers) for the ratio. # If the ratio is 0 the event will not move at all. If it is -1 or 1 it will # move normally (one tile every time the player moves). If it is 2 it will move # 2 tiles, if it is 3 it will move 3 tiles and so on. # # If the ratio is negative the event will move once the player has taken # that amount of steps. So for example if the ratio is -4 that means the # event will move once the player has taken 4 steps. # #----------------------------------------------------------------------------- module LufiaMovementConfig # Set this constant to the to the time (in seconds) you want the event # to not move after it has touched the player. If you don't want to wait # at all, just set it to 0. Note: this number does not need to be a whole # number. For example, setting it to 0.5 would pause the event for half # a second. MOVE_TIMER = 0.5 end class Game_Event attr_accessor :lm_player_moved, :lm_move_times attr_reader :lufia_movement # # Checks to see if the command comment is present in the event. # If it is we do some setup, otherwise ignore it. # alias :eds_old_pre_lufia_movement_setup :setup def setup(*args) eds_old_pre_lufia_movement_setup(*args) if command = lm_get_comment_command @lm_move_timer = 0 @lufia_movement = LufiaMovement.move_factory(command, self) $game_player.lm_subscribe_moved(self) if @lufia_movement end end # # Returns the first comment command that is found in an event's # comments. A command is in the format of lufiamovement:[command] # Also gets the move times if present. # def lm_get_comment_command unless @list.nil? @list.each do |event_cmd| next if event_cmd.code != 108 comment = event_cmd.parameters[0] command = comment[/lufiamovement:(\w+)/i, 1] unless command.nil? lm_set_move_times(comment) return command end end end return nil end # # Extracts the move times from a command string and assigns the @move_times # variable. If no move time tag is in the string, set @move_times to 1 # def lm_set_move_times(s) times = s[/lufiamovement:\w+-\d+|\d+)/i, 1] times ? @lm_move_times = times.to_i : @lm_move_times = 1 end # # Determine if touch event is triggered # If it is start the event, reset the player moved flag # and set the move timer. # def lm_check_event_trigger_touch(x = self.x, y = self.y) return if $game_map.interpreter.running? if @trigger == 2 and $game_player.pos?(x, y, true) if not jumping? and @priority_type == 1 start @lm_player_moved = false @lm_move_timer = LufiaMovementConfig::MOVE_TIMER * Graphics.frame_rate end end end # # Okay a bunch of stuff is happening here. It's mostly conditionals # that checks whether an event should more or not. # It's also in this method that we check to see if the event has # touched the player. # alias :eds_old_pre_lufia_movement_update :update def update # If the event has a move queue, move the event, if not # generate a move queue and then move the event unless $game_map.interpreter.running? lm_check_event_trigger_touch if @lm_player_moved @lm_move_timer -= 1 if @lm_move_timer if @lufia_movement and @lm_move_timer <= 0 if lm_on_screen? and @lufia_movement.has_queue? lm_execute_event_movement elsif lm_on_screen? and @lm_player_moved @lufia_movement.set_queue lm_execute_event_movement end end end eds_old_pre_lufia_movement_update end # # Starts an event move call. Depending on the value of @lm_move_times # the event is either moved once in the direction that is in the move queue # or if the @lm_move_times is negative a single direction is generated # and then moved once the player has moved enough times. # def lm_execute_event_movement unless @lufia_movement.event.moving? if @lufia_movement.has_queue? @lufia_movement.move_from_queue else @count_player_moves ||= 0 @count_player_moves += 1 if @count_player_moves == @lm_move_times.abs @lufia_movement.move_once @count_player_moves = 0 end end @lm_player_moved = false end end # # Calculate if the event is on the part of the screen you can see # Different movement patterns may need slightly different screen checks # def lm_on_screen? screen_x = $game_map.display_x / 256 screen_y = $game_map.display_y / 256 x_adjust = @lufia_movement.x_adjust y_adjust = @lufia_movement.y_adjust width_adjust = @lufia_movement.width_adjust height_adjust = @lufia_movement.height_adjust screen_rect = Rect.new(screen_x + x_adjust, screen_y + y_adjust, 16 + width_adjust, 12 + height_adjust) screen_rect.lm_include?(LufiaMovementHelper::Point.new(x, y)) end # # Checks to see if the tile in the specified direction is passable # def lm_can_move?(direction) case direction when :up then passable?(@x, @y - 1) when :down then passable?(@x, @y + 1) when :left then passable?(@x - 1, @y) when :right then passable?(@x + 1, @y) end end # # Checks to see if moving in a direction will collide with the player # def lm_touch_player?(direction) case direction when :up lm_check_event_trigger_touch(self.x, self.y - 1) when :down lm_check_event_trigger_touch(self.x, self.y + 1) when :left lm_check_event_trigger_touch(self.x - 1, self.y) when :right lm_check_event_trigger_touch(self.x + 1, self.y) end end end class Game_Player # # Used by lm_check_event_trigger_touch to see if the event is touching # the player. # alias :eds_old_pre_lufia_movement_pos? :pos? def pos?(x, y, touch = false) if touch #return true if the player is in any tile around the event return true if x == @x and y == @y #same tile return true if x == @x and y == @y - 1 #top return true if x == @x + 1 and y == @y #right return true if x == @x and y == @y + 1 #bottom return true if x == @x - 1 and y == @y #left return false else eds_old_pre_lufia_movement_pos?(x, y) end end # The following three methods implement a basic observer pattern. # Lufia movement event subscribe to the player character, and will # be notified whenever the player has moved. # # Notify the subscribers the player has moved. # alias :lm_old_increase_steps :increase_steps def increase_steps lm_notify_moved unless @move_route_forcing lm_old_increase_steps end # # Adds an event to the subscriber list. # def lm_subscribe_moved(event) @lm_subscribers ||= [] @lm_subscribers << event end # # Notify the events that the player has moved. # def lm_notify_moved return if @lm_subscribers.nil? @lm_subscribers.each do |sub| sub.lm_player_moved = true end end end # # The purpose of this module is to make it easier to add different # event movement patterns without cluttering up the Game_Event class. # module LufiaMovement # # This method picks the right class (and returns an instance of it) # depending on what command we have. The event passed in is the event # this instance will move. # def self.move_factory(command, event) class_name = command.downcase.capitalize + "Movement" return nil unless const_defined?(class_name) const_get(class_name).new(event) end # # the parent class for the move classes. Supplies common # behavior that more than one movement class might need. # class LufiaCommonMovement attr_accessor :event attr_reader :x_adjust, :y_adjust, :width_adjust, :height_adjust # # If a subclass uses super to call this method remember to do it # before you set any of these values in the subclass so they do not # get overriden. # def initialize(event) @x_adjust = 0 @y_adjust = 0 @width_adjust = 0 @height_adjust = 0 @event = event @move_queue = 0 @last_event_pos = LufiaMovementHelper::Point.new(0, 0) end # # The @move queue is the amount of times an event should move # if the player moves. # def set_queue @move_queue = @event.lm_move_times end def has_queue? @move_queue > 0 end # # move_from_queue will move the event one tile, and decrement # @move_queue by 1 # def move_from_queue move_once @move_queue -= 1 end # # Moves the event in the 4-way direction specified by a symbol # def move_in_direction(direction) case direction when :up @event.move_up when :down @event.move_down when :left @event.move_left when :right @event.move_right end @event.lm_check_event_trigger_touch end # The following methods are used by more than one movement pattern # to determine how to move. # # This method is used by ApproachMovement and FleeMovement. # Gets a an array of moves where the first elemtent is the move # that will get the event closer to the player, and the rest of the # array are the other directions ordered in the priority that we # want to move if it is impossible to move in the prefered direction # def get_approach_moves diff_x = @event.x - $game_player.x diff_y = @event.y - $game_player.y if diff_x.abs > diff_y.abs # more difference in the x axis @last_event_pos = get_event_position determine_middle(:x) if diff_x > 0 [:left, @x_middle, :right].flatten else [:right, @x_middle, :left].flatten end else @last_event_pos = get_event_position determine_middle(:y) if diff_y > 0 [:up, @y_middle, :down].flatten else [:down, @y_middle, :up].flatten end end end # # So if the first choice is to move up, but we can't because up is # blocked, we want to move either left or right, but not down. # This method randomizes the left or right decision and caches # the result # def determine_middle(move_axis) case move_axis when :x @y_middle = nil @x_middle = [:up, :down].shuffle unless @x_middle when :y @x_middle = nil @y_middle = [:left, :right].shuffle unless @y_middle end end # # Returns the first valid move from an array of moves # def get_valid_move(moves) moves.each do |move| return move if @event.lm_can_move?(move) or @event.lm_touch_player?(move) end end def get_event_position LufiaMovementHelper::Point.new(@event.x, @event.y) end end # # Moves towards the player # class ApproachMovement < LufiaCommonMovement def initialize(event) super(event) end def move_once moves = get_approach_moves valid = get_valid_move(moves) move_in_direction(valid) end end # # Moves randomly # class RandomMovement < LufiaCommonMovement def initialize(event) super(event) end def move_once [:up, :down, :left, :right].shuffle.each do |move| if @event.lm_can_move?(move) move_in_direction(move) break end end end end # # Moves away from the player (the opposite of approach) # class FleeMovement < LufiaCommonMovement def initialize(event) super(event) @x_adjust, @width_adjust = 1, -1 @y_adjust, @height_adjust = 1, -1 end def move_once moves = get_approach_moves.reverse valid = get_valid_move(moves) move_in_direction(valid) end end # # Moves opposite to the player # Note: if an event is on the same visible area as the player when # the game starts, the event will not move the first time the player # moves. This is because $game_player has not recorded the starting # position of the player. Possible fix: compare to player start pos # somehow. # class OppositeMovement < LufiaCommonMovement def initialize(event) super(event) end def move_once @last_player_pos ||= get_player_position move = get_opposite_move if move move_in_direction(move) @last_successful_move = move else move_in_direction(@last_successful_move) end @last_player_pos = get_player_position end def get_player_position LufiaMovementHelper::Point.new($game_player.x, $game_player.y) end # # Returns a move that is opposite to the one the direction the player # just moved in. # def get_opposite_move old_x, old_y = @last_player_pos.x, @last_player_pos.y new_x, new_y = $game_player.x, $game_player.y diff_x = new_x - old_x diff_y = new_y - old_y if diff_x > 0 return :left elsif diff_x < 0 return :right end if diff_y > 0 return :up elsif diff_y < 0 return :down end return nil end end end # # Helper classes and monkey patches # module LufiaMovementHelper class Point attr_accessor :x attr_accessor :y def initialize(x, y) @x = x @y = y end def ==(other) return false unless other.is_a?(Point) @x == other.x and @y == other.y end end end # # The bulit in Rect class does not have a method to see if a coordinate # is within the rect, so we add it here # class Rect def lm_include?(point) (x .. x + width) === point.x and (y .. y + height) === point.y end end # # Ah the joys of working with a Ruby from like 2004 or something! # unless [].respond_to?(:shuffle) class Array def shuffle new = [] size.downto(1) { |n| new << delete_at(rand(n)) } new end end end Script #2 Dash Speed Change Snippet class Game_Character #-------------------------------------------------------------------------- # * Update While Moving #-------------------------------------------------------------------------- def update_move distance = 2 ** @move_speed # Convert to movement distance distance *= 1.5 if dash? # If dashing, double it if dash? distance *= 1.8 if $game_switches[70] == true end @real_x = [@real_x - distance, @x * 256].max if @x * 256 < @real_x @real_x = [@real_x + distance, @x * 256].min if @x * 256 > @real_x @real_y = [@real_y - distance, @y * 256].max if @y * 256 < @real_y @real_y = [@real_y + distance, @y * 256].min if @y * 256 > @real_y update_bush_depth unless moving? if @walk_anime @anime_count += 1.5 elsif @step_anime @anime_count += 1 end end end Script #3 Custom HUD Melody #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Custom HUD for Melody # Author: Yami # Site: Loctien.net #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #~~~ Initialize ~~~# module YAMI module HUD_MELODY #~~ Base HUD ~~# HUD_SIZE_X = 418 HUD_SIZE_Y = 32 HEIGHT_PER_HUD = 32 #~~ HP/MP/Rage ~~# HP_GAUGE_X = 189 HP_GAUGE_Y = 21 #True HP_GAUGE_Y = HP_GAUGE_Y + index * YAMI::HUD_MELODY::HEIGHT_PER_HUD MP_GAUGE_X = 264 MP_GAUGE_Y = 22 #True MP_GAUGE_Y = MP_GAUGE_Y + index * YAMI::HUD_MELODY::HEIGHT_PER_HUD RAGE_GAUGE_X = 63 RAGE_GAUGE_Y = 26 #True RAGE_GAUGE_Y = RAGE_GAUGE_Y + index * YAMI::HUD_MELODY::HEIGHT_PER_HUD HP_GAUGE_WIDTH = 62 MP_GAUGE_WIDTH = 62 RAGE_GAUGE_WIDTH = 75 #~~ HP/MP/RAGE Number ~~# USE_IMAGE = true USE_IMAGE_RAGE = false #IF USE_IMAGE = false HP_COLOR = 2 MP_COLOR = 1 RAGE_SHOW = "\\C[10]Rage: \\C[0]%d" #~~ States ~~# SHOW_STATES = 3 SCROLL_STATES = false STATES_X = 333 SCROLL_STATES_DELAY = 60 #This is Frames_Count, which 60 frames ~ 1 second end end #~~~ End Initialize ~~~# class Scene_Battle < Scene_Base def start_target_actor_selection pause_atb(true) if semi_active_atb? or wait_atb? if @command_action @info_viewport.ox += @status_window.width @info_viewport.rect.x += @status_window.width end create_highlighted_targets($game_party) @target_help_window.active = true @target_actor_window = Window_BattleStatus.new(false) @target_actor_window.index = 0 @target_actor_window.active = true @target_actor_window.y = @info_viewport.rect.y + 12 @actor_command_window.active = false #--- #--- if atb_target_actor_case obj = @selected_battler.action.skill if @selected_battler.action.skill? obj = @selected_battler.action.item if @selected_battler.action.item? if atb? case @selected_battler.action.atb_queue_kind when 1 obj = $data_skills[@selected_battler.action.atb_queue_basic] when 2 obj = $data_items[@selected_battler.action.atb_queue_basic] end end @target_actor_window.target_highlight = true @target_actor_window.highlight_all = true if obj.for_all? @target_actor_window.highlight_all = true if obj.for_random? @target_actor_window.highlight_user = true if obj.for_user? @target_actor_window.frozen_cursor = true if obj.for_user? @target_actor_window.index = @selected_battler.index if obj.for_user? @target_actor_window.highlight_none = true if obj.for_none? @target_actor_window.highlight_dead = true if obj.for_dead_friend? @target_actor_window.refresh end #--- @target_help_window.refresh(@target_actor_window.actor, @selected_battler) hide_object_windows update_battle_cursor create_aoe_indicator(@target_actor_window) end def end_target_actor_selection @target_help_window.active = false @last_target_enemy = nil @status_window.draw_item(@selected_battler.index) @target_actor_window.dispose @target_actor_window = nil #--- #--- show_object_windows if @actor_command_window.item == :attack or @command_action @info_viewport.ox -= @status_window.width @info_viewport.rect.x -= @status_window.width @actor_command_window.active = true @command_action = false end pause_atb(false) if semi_active_atb? dispose_aoe_indicator end def hide_object_windows @skill_window.visible = false if @skill_window != nil @item_window.visible = false if @item_window != nil end def show_object_windows @skill_window.visible = true if @skill_window != nil @item_window.visible = true if @item_window != nil end def close_input_windows @party_command_window.active = false @actor_command_window.active = false @confirm_command_window.active = false @party_command_window.openness = 0 @actor_command_window.openness = 0 @confirm_command_window.openness = 0 loop do update_basic break if @info_viewport.ox == 128 if @info_viewport.ox >= 128 @info_viewport.ox -= [16, (128 - @info_viewport.ox).abs].min else @info_viewport.ox += [16, (128 - @info_viewport.ox).abs].min end end @status_window.index = @actor_index = -1 end def create_info_viewport force_preemptive_or_surprise #--- @info_viewport = Viewport.new(0, Graphics.height-160, Graphics.width, 160) @info_viewport.z = 100 #--- @status_window = Window_BattleStatus.new(true) @status_window.viewport = @info_viewport @status_window.x = 112 @status_window.y += 12 @status_hp_window = Window_BattleStatusHP.new @status_hp_window.viewport = @info_viewport @status_hp_window.x = 112 @status_hp_window.y += 12 @status_mp_window = Window_BattleStatusMP.new @status_mp_window.viewport = @info_viewport @status_mp_window.x = 112 @status_mp_window.y += 12 @status_rage_window = Window_BattleStatusRage.new @status_rage_window.viewport = @info_viewport @status_rage_window.x = 112 @status_rage_window.y += 12 @status_states_window = Window_BattleStatusStates.new @status_states_window.viewport = @info_viewport @status_states_window.x = 112 @status_states_window.y += 12 #--- @party_command_window = Window_PartyCommand.new @actor_command_window = Window_ActorCommand.new @party_command_window.viewport = @info_viewport @actor_command_window.viewport = @info_viewport @actor_command_window.x = Graphics.width @confirm_command_window = Window_ConfirmCommand.new @confirm_command_window.viewport = @info_viewport @confirm_command_window.x = Graphics.width @actor_command_window.y += 32 @confirm_command_window.y += 32 @party_command_window.y += 32 #--- @info_viewport.ox = 128 @actor_index = 0 @status_shortcut_index = 0 @status_window.index = 0 @status_window.refresh actor = @status_window.actor @actor_command_window.setup(actor) if $game_switches[YEM::BATTLE_ENGINE::OPTIONS[:autocursor_sw]] @actor_command_window.index = actor.battle_command_index.to_i end #--- Calculate PTB Initiative if ptb? and (rand($game_party.total_agi) < rand($game_troop.total_agi) or $game_troop.surprise and !$scene.atb?) if !(($TEST or $BTEST) and Input.press?(Input::CTRL)) and !$game_troop.preemptive @ptb_initiative = true @info_viewport.ox = 64 @actor_index = -1 @status_window.index = -1 @status_window.refresh @actor_command_window.openness = 0 @party_command_window.openness = 0 end end if ctb? make_action_orders_ctb if @action_battlers[0].actor? @actor_index = @action_battlers[0].index @status_window.index = @action_battlers[0].index actor = @status_window.actor @actor_command_window.setup(actor) if $game_switches[YEM::BATTLE_ENGINE::OPTIONS[:autocursor_sw]] index = actor.battle_command_index.to_i maximum = @actor_command_window.item_max - 1 @actor_command_window.index = [index, maximum].min end else @ctb_initiative = true @info_viewport.ox = 64 @actor_index = -1 @status_window.index = -1 @actor_command_window.openness = 0 @party_command_window.openness = 0 end @status_window.refresh end #--- @info_viewport.visible = true end def dispose_info_viewport #--- @status_window.dispose @status_hp_window.dispose @status_mp_window.dispose @status_rage_window.dispose @status_states_window.dispose #--- @party_command_window.dispose @actor_command_window.dispose @confirm_command_window.dispose @info_viewport.dispose #--- dispose_bem_windows end end class Window_BattleStatusStates < Window_BattleStatus #-------------------------------------------------------------------------- # update #-------------------------------------------------------------------------- def update super recreate if @current_party != $game_party.members for member in $game_party.members draw_item(member.index) if redraw?(member) end end #-------------------------------------------------------------------------- # redraw? #-------------------------------------------------------------------------- def redraw?(member) return true if ((Graphics.frame_count > 0) and (Graphics.frame_count % 180 == 0)) return true if member.update_states return false end #-------------------------------------------------------------------------- # refresh #-------------------------------------------------------------------------- def refresh max_members = YEM::BATTLE_ENGINE::MAXIMUM_PARTY_MEMBERS @item_max = [$game_party.members.size, max_members].max for i in 0...@item_max; draw_item(i); end end end class Window_BattleStatusHP < Window_BattleStatus #-------------------------------------------------------------------------- # draw_item #-------------------------------------------------------------------------- def draw_item(index) rect = item_rect(index) self.contents.clear_rect(rect) actor = $game_party.members[index] return if actor == nil draw_member_hp_2(actor, index) end end class Window_BattleStatusMP < Window_BattleStatus #-------------------------------------------------------------------------- # draw_item #-------------------------------------------------------------------------- def draw_item(index) rect = item_rect(index) self.contents.clear_rect(rect) actor = $game_party.members[index] return if actor == nil draw_member_mp_2(actor, index) end end class Window_BattleStatusRage < Window_BattleStatus #-------------------------------------------------------------------------- # draw_item #-------------------------------------------------------------------------- def draw_item(index) rect = item_rect(index) self.contents.clear_rect(rect) actor = $game_party.members[index] return if actor == nil draw_member_rage_2(actor, index) end end # Window_BattleStatusRage class Window_BattleStatus < Window_Selectable def initialize(minimum = false) super(0, 0, 544, 192) max_members = YEM::BATTLE_ENGINE::MAXIMUM_PARTY_MEMBERS @item_max = [$game_party.members.size, max_members].max @column_max = 1 @minimum = minimum @current_party = $game_party.members recreate unless @miniature self.active = false self.opacity = 0 end def refresh return if @miniature max_members = YEM::BATTLE_ENGINE::MAXIMUM_PARTY_MEMBERS @item_max = [$game_party.members.size, max_members].max @column_max = 1 for i in 0...@item_max; draw_item(i); end end def update_cursor self.cursor_rect.empty end def update super unless prevent_left_right? if (Graphics.frame_count > 0) and (Graphics.frame_count % (YAMI::HUD_MELODY::SCROLL_STATES_DELAY) == 0) then for i in $game_party.members actor = i @state_id_show[actor.id] += 1 end end redraw if @last_index != self.index redraw if @battle_refresh_call return unless @minimum recreate if @current_party != $game_party.members return unless $scene.is_a?(Scene_Battle) for member in $game_party.members; redraw if member.update_states; end redraw if @last_active_battler != $scene.active_battler end def draw_item(index) rect = item_rect(index) self.contents.clear_rect(rect) actor = $game_party.members[index] return if actor == nil draw_member_face_new(actor, index) draw_member_action_2(actor, rect.clone) return if @minimum draw_member_states(actor, rect.clone) draw_member_hp_2(actor, index) draw_member_mp_2(actor, index) draw_member_rage_2(actor, index) end def draw_item2(index) rect = item_rect(index) self.contents.clear_rect(rect) actor = $game_party.members[index] return if actor == nil draw_member_face(actor, rect.clone) draw_member_action(actor, rect.clone) return if @minimum draw_member_name(actor, rect.clone) draw_member_states(actor, rect.clone) draw_member_hp(actor, rect.clone) draw_member_mp(actor, rect.clone) draw_member_rage(actor, rect.clone) end def item_rect(index) rect = Rect.new(0, 0, 0, 0) rect.width = YAMI::HUD_MELODY::HUD_SIZE_X rect.height = YAMI::HUD_MELODY::HUD_SIZE_Y rect.x = 0 rect.y = index * rect.height return rect end def draw_member_face_new(actor, index) dx = 0 dy = YAMI::HUD_MELODY::HEIGHT_PER_HUD * index lower_opacity = YEM::BATTLE_ENGINE::PARTY_WINDOW[:face_opacity] opacity = opacity?(actor) ? 255 : lower_opacity bitmap = Cache.picture(actor.name+"_HUD") rect = Rect.new(0, 0, 0, 0) rect.width = YAMI::HUD_MELODY::HUD_SIZE_X rect.height = YAMI::HUD_MELODY::HUD_SIZE_Y rect.x = 0 rect.y = 0 self.contents.blt(dx, dy, bitmap, rect, opacity) end def draw_member_states(actor, rect) if YAMI::HUD_MELODY::SCROLL_STATES then bitmap = bitmap_state(actor) if ((@state_id_show[actor.id]) >= actor.states.size) then @state_id_show[actor.id] = 0 end rect_new = Rect.new(@state_id_show[actor.id] * 24, 0, 24, 24) self.contents.blt(rect.x + YAMI::HUD_MELODY::STATES_X, rect.y+8, bitmap, rect_new) actor.update_states = false else count = 0 for state in actor.states next if state.hide_state draw_icon(state.icon_index, rect.x + YAMI::HUD_MELODY::STATES_X + 28 * count, rect.y+8) count += 1 break if count >= YAMI::HUD_MELODY::SHOW_STATES end actor.update_states = false end end def bitmap_state(actor) icon = Cache.system("Iconset") w = actor.states.size * 24 w = 24 if w < 1 bitmap = Bitmap.new(w, 24) count = 0 for state in actor.states next if state.hide_state icon_index = state.icon_index x = 24 * count rect = Rect.new(icon_index % 16 * 24, icon_index / 16 * 24, 24, 24) bitmap.blt(x, 0, icon, rect) count += 1 end return bitmap end def draw_member_action_2(actor, rect) return unless YEM::BATTLE_ENGINE::PARTY_WINDOW[:action_icons] icon = YEM::BATTLE_ENGINE::ICON_MESSAGE[:wait_icon] case actor.action.kind when 0 # Basic case actor.action.basic when 0 # Attack icon = actor.attack_icon when 1 # Guard icon = actor.guard_icon when 2 # Escape icon = YEM::BATTLE_ENGINE::ICON_MESSAGE[:flee_icon] end when 1 # Skill icon = actor.action.skill.icon_index when 2 # Item icon = actor.action.item.icon_index end enabled = actor.action.valid? enabled = false if actor.action.kind == 0 and actor.action.basic == 3 if $scene.is_a?(Scene_Battle) and $scene.ctb? and actor.action.guard? icon = actor.guard_icon enabled = true end draw_icon(icon, rect.x + 142, rect.y + 4, enabled) end #-------------------------------------------------------------------------- # recreate #-------------------------------------------------------------------------- def recreate max_members = YEM::BATTLE_ENGINE::MAXIMUM_PARTY_MEMBERS @item_max = [$game_party.members.size, max_members].max @item_max = 1 if @minitature @updating = -1 @current_party = $game_party.members @current_hp = {}; @current_hp_gauge = {}; @maxhp = {} @current_mp = {}; @current_mp_gauge = {}; @maxmp = {} @current_rage = {}; @current_rage_gauge = {}; @max_rage = {} @hp_gauge = {}; @mp_gauge = {}; @rage_gauge = {} temp_rect = item_rect(0) @hp_gauge_width = YAMI::HUD_MELODY::HP_GAUGE_WIDTH @mp_gauge_width = YAMI::HUD_MELODY::MP_GAUGE_WIDTH @rg_gauge_width = YAMI::HUD_MELODY::RAGE_GAUGE_WIDTH @state_id_show = {} for i in 0...@current_party.size actor = $game_party.members[i] @state_id_show[actor.id] = 0 #-- @current_hp[i] = actor.hp maxhp = [[actor.maxhp, actor.base_maxhp, 1].max, actor.maxhp_limit].min @current_hp_gauge[i] = (actor.hp * @hp_gauge_width / maxhp) @maxhp[i] = maxhp @hp_gauge[i] = Cache.system("HP") rect = Rect.new(0, 0, @current_hp_gauge[i], @hp_gauge[i].height) self.contents.blt(0, 0, @hp_gauge[i], rect) #-- maxmp = [[actor.maxmp, actor.base_maxmp, 1].max, actor.maxmp_limit].min @current_mp[i] = actor.mp @current_mp_gauge[i] = (actor.mp * @mp_gauge_width / [actor.maxmp,1].max) @maxmp[i] = maxmp @mp_gauge[i] = Cache.system("MP") rect = Rect.new(0, 0, @current_mp_gauge[i], @mp_gauge[i].height) self.contents.blt(0, 0, @mp_gauge[i], rect) #--- actor.rage = 0 if actor.rage == nil @current_rage[i] = actor.rage @current_rage_gauge[i] = actor.rage * @rg_gauge_width / actor.max_rage @max_rage[i] = actor.max_rage @rage_gauge[i] = Cache.system("Rage2") rect = Rect.new(0, 0, @current_rage_gauge[i], @rage_gauge[i].height) self.contents.blt(0, 0, @rage_gauge[i], rect) end refresh end def draw_member_rage_2(actor, index) return unless actor.use_rage? @updating = -1 i = actor.index max_rage = @max_rage[i] dy = YAMI::HUD_MELODY::RAGE_GAUGE_Y + index * YAMI::HUD_MELODY::HEIGHT_PER_HUD dx = YAMI::HUD_MELODY::RAGE_GAUGE_X rg_gw = @rg_gauge_width #--- target_gauge = (actor.rage * @rg_gauge_width / max_rage) target_gauge += 2 if actor.rage > 0 if @current_rage_gauge[i] > target_gauge @updating = i value = [1,(@current_rage_gauge[i]-target_gauge).abs].min @current_rage_gauge[i] -= value @current_rage_gauge[i] = [@current_rage_gauge[i], 0].max rect = Rect.new(0, 0, @current_rage_gauge[i], @rage_gauge[i].height) self.contents.blt(dx, dy, @rage_gauge[i], rect) elsif @current_rage_gauge[i] < target_gauge @updating = i value = [1,(@current_rage_gauge[i]-target_gauge).abs].min @current_rage_gauge[i] += value @current_rage_gauge[i] = [@current_rage_gauge[i], rg_gw].min rect = Rect.new(0, 0, @current_rage_gauge[i], @rage_gauge[i].height) self.contents.blt(dx, dy, @rage_gauge[i], rect) else gw = @current_rage_gauge[i] gw = [gw, 3].max if actor.rage > 0 rect = Rect.new(0, 0, gw, @rage_gauge[i].height) self.contents.blt(dx, dy, @rage_gauge[i], rect) end #--- if @current_rage[i] != actor.rage @updating = i @current_rage[i] += (@current_rage[i] > actor.rage) ? -1 : 1 @current_rage[i] = actor.rage if @current_rage_gauge[i] == target_gauge end #--- text = @current_rage[i] if YAMI::HUD_MELODY::USE_IMAGE_RAGE then write_number(text,dx+4,dy-20,2) else self.contents.font.size = 12 self.contents.draw_format_text(dx, dy-20, 75, WLH, sprintf(YAMI::HUD_MELODY::RAGE_SHOW,text), 0) end #--- end def draw_member_mp_2(actor, index) @updating = -1 i = actor.index maxmp = @maxmp[i] dy = YAMI::HUD_MELODY::MP_GAUGE_Y + index * YAMI::HUD_MELODY::HEIGHT_PER_HUD dx = YAMI::HUD_MELODY::MP_GAUGE_X mp_gw = @mp_gauge_width #--- target_gauge = (actor.mp * @mp_gauge_width / maxmp) if @current_mp_gauge[i] > target_gauge and !@miniature @updating = i @current_mp_gauge[i] -= [1, (@current_mp_gauge[i]-target_gauge).abs].min @current_mp_gauge[i] = [@current_mp_gauge[i], 0].max rect = Rect.new(0, 0, @current_mp_gauge[i], @mp_gauge[i].height) self.contents.blt(dx, dy, @mp_gauge[i], rect) elsif @current_mp_gauge[i] < target_gauge and !@miniature @updating = i @current_mp_gauge[i] += [1, (@current_mp_gauge[i]-target_gauge).abs].min @current_mp_gauge[i] = [@current_mp_gauge[i], @mp_gauge_width].min rect = Rect.new(0, 0, @current_mp_gauge[i], @mp_gauge[i].height) self.contents.blt(dx, dy, @mp_gauge[i], rect) else gw = mp_gw * actor.mp / maxmp gw = [gw, 3].max if actor.mp > 0 rect = Rect.new(0, 0, gw, @mp_gauge[i].height) self.contents.blt(dx, dy, @mp_gauge[i], rect) end #--- if actor.base_maxmp > actor.maxmp gbw = mp_gw gbw *= (actor.base_maxmp - actor.maxmp) / [actor.base_maxmp, 1].max + 1 rect = Rect.new(0, 0, mp_gw-gbw, @mp_gauge[i].height) self.contents.blt(dx, dy, @mp_gauge[i], rect) end #--- if @current_mp[i] != actor.mp @updating = i den = [mp_gw/3 + rand(mp_gw/2), 1].max value = [[maxmp/den, (@current_mp[i]-actor.mp).abs].min, 1].max @current_mp[i] += (@current_mp[i] > actor.mp) ? -value : value @current_mp[i] = actor.mp if @current_mp_gauge[i] == target_gauge end #--- text = @current_mp[i] if YAMI::HUD_MELODY::USE_IMAGE then write_number(text,dx+6,dy-20,1) else self.contents.font.color = text_color(YAMI::HUD_MELODY::MP_COLOR) self.contents.font.size = 16 self.contents.draw_text(dx+22, dy-20, 75, WLH, text, 0) end #--- end def draw_member_hp_2(actor, index) @updating = -1 i = actor.index maxhp = @maxhp[i] dy = YAMI::HUD_MELODY::HP_GAUGE_Y + index * YAMI::HUD_MELODY::HEIGHT_PER_HUD dx = YAMI::HUD_MELODY::HP_GAUGE_X #--- target_gauge = (actor.hp * @hp_gauge_width / maxhp) if @current_hp_gauge[i] > target_gauge @updating = i @current_hp_gauge[i] -= [1, (@current_hp_gauge[i]-target_gauge).abs].min @current_hp_gauge[i] = [@current_hp_gauge[i], 0].max rect = Rect.new(0, 0, @current_hp_gauge[i], @hp_gauge[i].height) self.contents.blt(dx, dy, @hp_gauge[i], rect) elsif @current_hp_gauge[i] < target_gauge @updating = i @current_hp_gauge[i] += [1, (@current_hp_gauge[i]-target_gauge).abs].min @current_hp_gauge[i] = [@current_hp_gauge[i], @hp_gauge_width].min rect = Rect.new(0, 0, @current_hp_gauge[i], @hp_gauge[i].height) self.contents.blt(dx, dy, @hp_gauge[i], rect) else gw = @hp_gauge_width * actor.hp / maxhp gw = [gw, 3].max if actor.hp > 0 rect = Rect.new(0, 0, gw, @hp_gauge[i].height) self.contents.blt(dx, dy, @hp_gauge[i], rect) end #--- if maxhp > actor.maxhp gbw = @hp_gauge_width * (actor.base_maxhp - actor.maxhp) / maxhp + 1 rect = Rect.new(0, 0, @hp_gauge_width-gbw, @hp_gauge[i].height) self.contents.blt(dx, dy, @hp_gauge[i], rect) end #--- if @current_hp[i] != actor.hp @updating = i den = [@hp_gauge_width/3 + rand(@hp_gauge_width/2), 1].max value = [[maxhp/den, (@current_hp[i]-actor.hp).abs].min, 1].max @current_hp[i] += (@current_hp[i] > actor.hp) ? -value : value @current_hp[i] = actor.hp if @current_hp_gauge[i] == target_gauge end #--- text = @current_hp[i] if YAMI::HUD_MELODY::USE_IMAGE then write_number(text,dx+4,dy-20,0) else self.contents.font.color = text_color(YAMI::HUD_MELODY::HP_COLOR) self.contents.font.size = 16 self.contents.draw_text(dx+22, dy-20, 75, WLH, text, 0) end #--- end def write_number(num,x,y,line = 0) index = String(num).length work = num if work == 0 then d_int = 0 bitmap = Cache.system("String02") rect = Rect.new(d_int * (bitmap.width / 10), line * (bitmap.height / 4), (bitmap.width / 10), (bitmap.height / 4)) self.contents.blt(x + 15, y + 6, bitmap, rect) return end while work != 0 do d_int = work % 10 work = (work - d_int) / 10 bitmap = Cache.system("String02") rect = Rect.new(d_int * (bitmap.width / 10), line * (bitmap.height / 4), (bitmap.width / 10), (bitmap.height / 4)) self.contents.blt(x + index * (bitmap.width / 10 - 4), y + 6, bitmap, rect) index -= 1 end end end class Window_BattleStatus_Mini < Window_BattleStatus #-------------------------------------------------------------------------- # refresh #-------------------------------------------------------------------------- def refresh self.contents.clear draw_item2($scene.selected_battler.index) end end # Window_BattleStatus_Mini Edited July 21, 2015 by Zortik Share this post Link to post Share on other sites
Zortik 15 Posted May 15, 2015 I'm still hoping for some assistance with this. I did organize those scripts in an order of importance as well.The movement script is very important to the gameplay mechanics I would like to have in place. I would have tried to reach out to the user who helped me modify the original script, but his user name is not present on this website and the previous websites I frequented are no longer up. Share this post Link to post Share on other sites
Zortik 15 Posted May 19, 2015 ~Bump~There is another script, CSCA, that has similar functions to the one I am requesting help with. I still wish to use the mechanics found within my own script though, but I figured seeing the demo he provided may help increase the likelihood that someone will help me. http://forums.rpgmakerweb.com/index.php?/topic/4348-csca-game-info/ Share this post Link to post Share on other sites
+ TBWCS 953 Posted May 20, 2015 I think BigEd himself made a port of his script like this in Ace, but somehow I can't pinpoint where. Have you asked him personally for a port? Share this post Link to post Share on other sites
Zortik 15 Posted May 20, 2015 (edited) I think BigEd himself made a port of his script like this in Ace, but somehow I can't pinpoint where. Have you asked him personally for a port? I haven't yet. He gave his blessings to Kal to run with the script for VX on another site and truthfully it slipped my mind to see if he was still around. If he's using the same handle, I'll send him a PM and see if it gets me anywhere. Thanks. Edit: Looks like he hasn't been active for almost 3 years. I sent a private message... but unless it's routing to an active email I don't know if I'll be getting his attention. Edited May 20, 2015 by Zortik Share this post Link to post Share on other sites
Zortik 15 Posted May 25, 2015 I think BigEd himself made a port of his script like this in Ace, but somehow I can't pinpoint where. Have you asked him personally for a port? It was a good suggestion. However, looks like it didn't pan out. Hopefully a member (or a few) will be willing to take a stab at this then. I would really appreciate it. Share this post Link to post Share on other sites
Zortik 15 Posted May 31, 2015 While I know I'm at the mercy of a whim, would any capable programmers be able to lend a hand please? As far as I'm aware nobody has begun working on any of these requests. Share this post Link to post Share on other sites
+ TBWCS 953 Posted May 31, 2015 Your #2 request, my conversion may be pedestrian but it can be done with quite only a few changes in the script: class Game_CharacterBase #-------------------------------------------------------------------------- # * Update While Moving #-------------------------------------------------------------------------- def update_move distance = 2 ** @move_speed # Convert to movement distance distance *= 1.5 if dash? # If dashing, double it if dash? distance *= 1.8 if $game_switches[70] == true end @real_x = [@real_x - distance_per_frame, @x].max if @x < @real_x @real_x = [@real_x + distance_per_frame, @x].min if @x > @real_x @real_y = [@real_y - distance_per_frame, @y].max if @y < @real_y @real_y = [@real_y + distance_per_frame, @y].min if @y > @real_y update_bush_depth unless moving? if @walk_anime @anime_count += 1.5 elsif @step_anime @anime_count += 1 end end end Share this post Link to post Share on other sites
Zortik 15 Posted May 31, 2015 (edited) Your #2 request, my conversion may be pedestrian but it can be done with quite only a few changes in the script: class Game_CharacterBase #-------------------------------------------------------------------------- # * Update While Moving #-------------------------------------------------------------------------- def update_move distance = 2 ** @move_speed # Convert to movement distance distance *= 1.5 if dash? # If dashing, double it if dash? distance *= 1.8 if $game_switches[70] == true end @real_x = [@real_x - distance_per_frame, @x].max if @x < @real_x @real_x = [@real_x + distance_per_frame, @x].min if @x > @real_x @real_y = [@real_y - distance_per_frame, @y].max if @y < @real_y @real_y = [@real_y + distance_per_frame, @y].min if @y > @real_y update_bush_depth unless moving? if @walk_anime @anime_count += 1.5 elsif @step_anime @anime_count += 1 end end end Thanks! It's such a minor thing, but it allows me to modify dash speed when an accessory is equipped. It works in conjunction with some global switches. I won't have the opportunity to test this until at least tomorrow, when I do I'll let you know how it goes. Thank you again Edited May 31, 2015 by Zortik Share this post Link to post Share on other sites
+ TBWCS 953 Posted May 31, 2015 I'll try to do the other two once I get the time. It isn't hard, just takes time. Share this post Link to post Share on other sites
Zortik 15 Posted June 1, 2015 (edited) I'll try to do the other two once I get the time. It isn't hard, just takes time. Thank you, and I really do understand the time issue. It's monotonous to cross reference coding. For myself, I start sinking faster than I can start making any sense of it. So, I'm glad that you don't find this as difficult as I do. I did try your script in a brand new project. I just made an NPC turn on switch 70 for me. It didn't cause an increase in the dash speed though. I modified the 1.8 to a 4.0 just to see if there was a change there, but it also showed no change. Edited June 1, 2015 by Zortik Share this post Link to post Share on other sites
Zortik 15 Posted June 6, 2015 Any thoughts on where the issue occurred? Share this post Link to post Share on other sites
Zortik 15 Posted July 17, 2015 Waiting a lot longer in between bumps. Still seeking support for all requests. (Particularly the lufia movement based script) Share this post Link to post Share on other sites
Animebryan 139 Posted July 21, 2015 (edited) ~Bump~ There is another script, CSCA, that has similar functions to the one I am requesting help with. I still wish to use the mechanics found within my own script though, but I figured seeing the demo he provided may help increase the likelihood that someone will help me. http://forums.rpgmakerweb.com/index.php?/topic/4348-csca-game-info/ Casper's CSCA Monster Movement script: http://www.rpgmakervxace.net/topic/2498-csca-monster-movement/ Hopefully this is what you're looking for (or settle for if you nobody can convert the other script) Also, it's common courtesy on the forums to hide scripts with spoiler tags so that way your post isn't bigger than it needs to be & it can be shown & hidden when needed. Just edit the 1st post & put [spoiler ][/spoiler ] (without the extra spaces at the end) Like this script script script script script script script script Seriously, it took awhile to scroll past that 1st post! Edited July 21, 2015 by Animebryan Share this post Link to post Share on other sites
Zortik 15 Posted July 21, 2015 (edited) ~Bump~ There is another script, CSCA, that has similar functions to the one I am requesting help with. I still wish to use the mechanics found within my own script though, but I figured seeing the demo he provided may help increase the likelihood that someone will help me. http://forums.rpgmakerweb.com/index.php?/topic/4348-csca-game-info/ Casper's CSCA Monster Movement script: http://www.rpgmakervxace.net/topic/2498-csca-monster-movement/ Hopefully this is what you're looking for (or settle for if you nobody can convert the other script) Also, it's common courtesy on the forums to hide scripts with spoiler tags so that way your post isn't bigger than it needs to be & it can be shown & hidden when needed. Just edit the 1st post & put [spoiler ][/spoiler ] (without the extra spaces at the end) Like this Seriously, it took awhile to scroll past that 1st post! Thanks, It's been a long long time since I've done anything with forums and frankly I didn't remember to do this. I appreciate the reference back to the CSCA script on this site. I don't have the time (or my computer) to explain my inhibitions with using that script. However, later tonight if I get the time I'll try and explain my reasoning. Edit: I opened the demo again and the core functionality is indeed there when compared to the lufia script I am requesting assistance with. I was fortunate to work with a Kal who diligently helped with troubleshooting them. For example where a battle starts before the player has finished moving (so for a brief moment the player sees the monster diagonal from them). I might try and message Casper and see if I can pique his interest (the post you linked is quite old and I'd rather avoid necro posting). Edited July 22, 2015 by Zortik Share this post Link to post Share on other sites