The RPG Maker Resource Kit

RMRK RPG Maker Creation => VX => VX Scripts Database => Topic started by: modern algebra on July 13, 2009, 09:26:14 PM

Title: Show Enemy States
Post by: modern algebra on July 13, 2009, 09:26:14 PM
Show Enemy States
Version: 1.0
Author: modern algebra
Date: July 13, 2009

Version History



Description


This script shows enemy states when targetting them in the DBS. It is recommended that it be used with Ziifee's State Icon Animation script or any other State cycling script, as it looks best when displaying only one icon at a time.

Features


Screenshots

(https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg125.imageshack.us%2Fimg125%2F5466%2Fenemystatesscreenshot.png&hash=8a215d5ff255d9138686dfc5d7ea52637a76f95f)

Instructions

Place this script in its own slot in the Editor, above Main and below all of the default scripts and other custom scripts.

Script


Code: [Select]
#==============================================================================
#  Show Enemy States
#  Version: 1.0
#  Author: modern algebra
#  Date: July 13, 2009
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Description:
#    This script shows enemy states when targetting them in the DBS. It is
#   recommended that it be used with Ziifee's State Icon Animation script or
#   any other State cycling script, as it looks best when displaying only one
#   icon at a time.
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Instructions:
#    Place above Main and below other custom scripts in the Script Editor.
#==============================================================================
# ** Window_TargetEnemy
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Summary of Changes:
#    aliased methods - draw_item, item_rect
#==============================================================================

class Window_TargetEnemy < Window_Command
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Constants
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  MA_SHOW_ICONS_NUM = 1 # Number of icons to show prefacing the enemy name
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Draw Item
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias mdlg_joy_drw_enmy_stt_drwitm_0gh3 draw_item
  def draw_item (index, *args)
    mdlg_joy_drw_enmy_stt_drwitm_0gh3 (index, *args)
    name_rect = item_rect(index)
    w = 24*MA_SHOW_ICONS_NUM
    icon_rect = Rect.new (name_rect.x - w - 4, name_rect.y, w + 4, name_rect.height)
    contents.clear_rect (icon_rect)
    # Draw Enemy State by Actor State method
    draw_actor_state (@enemies[index], icon_rect.x, icon_rect.y, w)
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Item Rect
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias drbr_jy_enmyststes_show_itmrect_7j24 item_rect
  def item_rect (*args)
    rect = drbr_jy_enmyststes_show_itmrect_7j24 (*args)
    rect.x += ((24*MA_SHOW_ICONS_NUM) + 4)
    rect.width -= ((24*MA_SHOW_ICONS_NUM) + 4)
    return rect
  end
end

Credit



Thanks


Support


Please post in this topic for support

Known Compatibility Issues

Works with Ziifee's State Animation Script.
No known compatibility issues.


Creative Commons License
This script by modern algebra is licensed under a Creative Commons Attribution-Non-Commercial-Share Alike 2.5 Canada License.
Title: Re: Show Enemy States
Post by: joy on July 13, 2009, 10:08:46 PM
It works like a charm straight from install. Top notch work.