Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Lycan Enemy Bars / MGC Mode7 Edit Patch
#1
Lycan Enemy Bars / MGC Mode7 Edit Patch
Version: 1.0



Introduction
This system is designed to permit the Enemy HP/SP bars from Lycan Enemy Bars to show properly with the slanted perspective feature of Mode7 by MGC.



Script
Code:
#==============================================================================
# ** Lycan Enemy Bars / MGC Mode7 Edit Patch
#------------------------------------------------------------------------------
#    version 1.0
#    by DerVVulfman
#    06-11-2014
#    RGSS / RPGMaker XP
#------------------------------------------------------------------------------
# * Designed for the Lycan Enemy Bars version 1.1+
# * Designed for the MGC Mode7 Edit - DerVVulfman's rewrite of MGCaladtogel
#                                     original Mode7 script from April 24, '08
#==============================================================================
#
#  INSTALLATION:
#
#
#  To use, The MGC Mode7 Edit  must be placed above both  the Lycan Enemy Bars
#  and the Lycan ABS system, and this patch below all three. It does not adapt
#  the Lycan ABS  to function with Mode7,  but a separate patch  is availeble.
#
#  The patch contains not configuration values.   All configuration values are
#  handled by their respective scripts or script systems.
#
#
#==============================================================================



#==============================================================================
# ** Enemy_Bars
#------------------------------------------------------------------------------
#  This sprite is used to display the ABS Enemy HP Bars.  They automatically
#  change based on the ABS Enemy's health conditions.
#==============================================================================
  
class Enemy_Bars < Sprite
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    event = $game_map.events[@enemy.event_id]
    #First move it
    @old_x = event.screen_x-10
    @old_y = event.screen_y
    # Define new self coordinates based on Mode7 or not
    update_character_coordinates(@old_x, @old_y)
    # HP Bar Check
    return if @old_hp == @enemy.hp
    self.bitmap.clear
    # Reset original HP
    @old_hp = @enemy.hp
    #Show the bar
    draw_gradient_bar(0,0,@enemy.hp,@enemy.maxhp, HP_BAR)
  end
  #--------------------------------------------------------------------------
  # * Refresh SP
  #--------------------------------------------------------------------------
  def refresh_sp
    event = $game_map.events[@enemy.event_id]
    #First move it
    @old_x = event.screen_x-10
    @old_y = event.screen_y
    # Define new self coordinates based on Mode7 or not
    update_character_coordinates(@old_x, @old_y)
    # Reset original SP
    @old_sp = @enemy.sp
    #Show the bar
    draw_gradient_bar(0, HP_BAR_HEIGHT, @enemy.sp, @enemy.maxsp, SP_BAR)
  end  
  #--------------------------------------------------------------------------
  # * Frame Update (when placing a graphic into position)
  #--------------------------------------------------------------------------  
  def update_character_coordinates(char_x, char_y)
    x_intermediate = char_x
    y_intermediate = char_y
    y_intermediate -= $game_temp.pivot + 4 if $game_system.mode7
    # if vertical looping
    if $game_system.loop_y
      h = 32 * $game_map.height
      y_intermediate = (y_intermediate + h / 2) % h - h / 2
    end
    # if it is a Mode7 map
    if $game_system.mode7
      # Acquire Mode7 Altered Y Position
      mode_y  = mode7_y($game_temp.distance_h, y_intermediate,
                       $game_temp.sin_angle, $game_temp.cos_angle,
                       $game_temp.pivot)
      # Exit method ineffective and hide if coordinate failed
      if mode_y[1] == false
        self.opacity = 0
        return false
      end
      # Set Y coordinate
      self.y = mode_y[0]
      self.zoom_x = $game_temp.slope_value * y + $game_temp.corrective_value
      self.zoom_y = zoom_x
      self.x = 320 + zoom_x * (x_intermediate - 320)
      if $game_system.loop_x
        offset = ($game_map.width >= 24 ? 64 * zoom_x : 0)
        l = 32 * $game_map.width * zoom_x
        self.x = (x + offset) % l - offset
      end
      # normal map
    else
      self.zoom_x = 1.0
      self.zoom_y = 1.0
      self.x = x_intermediate
      self.y = y_intermediate
    end
    self.z =       self.y + 10
    return true
  end  
end



Compatibility
Requires the Mode7 script and the Lycan Enemy Bars script version 1.1 or higher.
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)
[Image: QrnbKlx.jpg]

Reply
Thanks given by:


Possibly Related Threads…
Thread Author Replies Views Last Post
   The Charlie Mini-Map / Dynamic Maps Patch DerVVulfman 2 2,296 03-29-2022, 11:55 PM
Last Post: DerVVulfman
   DoubleX RMMV Status Bars Compatibility DoubleX 0 615 02-06-2022, 07:56 AM
Last Post: DoubleX
   Enemy Action Sets DerVVulfman 10 3,136 07-21-2021, 03:24 AM
Last Post: DerVVulfman
   DoubleX RMMZ TPBS Configurations Edit DoubleX 3 2,791 12-25-2020, 12:30 PM
Last Post: DoubleX
   DoubleX RMMV Confusion Edit DoubleX 2 4,706 06-06-2020, 03:00 AM
Last Post: DoubleX
   DoubleX RMVXA Confusion Edit DoubleX 2 4,471 06-06-2020, 02:37 AM
Last Post: DoubleX
   Enemy Challenge for Experience DerVVulfman 0 1,800 11-25-2019, 12:30 AM
Last Post: DerVVulfman
   Leveled Enemy Lists DerVVulfman 0 1,875 09-13-2019, 04:06 AM
Last Post: DerVVulfman
   ACBS FIX SCRIPT #1: Victory Cries Patch DerVVulfman 1 2,497 08-08-2019, 02:53 PM
Last Post: aeliath
   DoubleX RMMV Status Bars DoubleX 2 4,477 07-07-2019, 01:19 PM
Last Post: DoubleX



Users browsing this thread: