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]
[Image: sGz1ErF.png]    [Image: liM4ikn.png]    [Image: fdzKgZA.png]    [Image: sj0H81z.png]
[Image: QL7oRau.png]    [Image: uSqjY09.png]    [Image: GAA3qE9.png]    [Image: 2Hmnx1G.png]    [Image: BwtNdKw.png%5B]
  Above are clickable links
Reply }


Possibly Related Threads…
Thread Author Replies Views Last Post
   ATOA CBS Equipment Set Variables Patch kyonides 0 272 10-14-2024, 12:47 AM
Last Post: kyonides
   VARIABLE ENEMY HP & SP DerVVulfman 0 896 06-14-2024, 07:18 PM
Last Post: DerVVulfman
   Saumon's Enemy Reveals DerVVulfman 0 896 03-12-2024, 08:40 PM
Last Post: DerVVulfman
   The Lycan ABS DerVVulfman 114 175,166 08-11-2023, 02:25 AM
Last Post: DerVVulfman
   Lycan Companion Icons DerVVulfman 0 1,248 08-09-2023, 08:23 PM
Last Post: DerVVulfman
   The Charlie Mini-Map / Dynamic Maps Patch DerVVulfman 2 5,008 03-29-2022, 11:55 PM
Last Post: DerVVulfman
   Enemy Action Sets DerVVulfman 10 8,801 07-21-2021, 03:24 AM
Last Post: DerVVulfman
   Enemy Challenge for Experience DerVVulfman 0 3,260 11-25-2019, 12:30 AM
Last Post: DerVVulfman
   Leveled Enemy Lists DerVVulfman 0 3,503 09-13-2019, 04:06 AM
Last Post: DerVVulfman
   ACBS FIX SCRIPT #1: Victory Cries Patch DerVVulfman 1 4,828 08-08-2019, 02:53 PM
Last Post: aeliath



Users browsing this thread: 1 Guest(s)