Advertisement
Dekita

basic enemy info

Oct 18th, 2012
372
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.42 KB | None | 0 0
  1. =begin =========================================================================
  2. Dekita's v1.1
  3. ★ THE MOST BASIC ENEMY INFO EVER™ ★
  4.  
  5. ================================================================================
  6. Script Information:
  7. ====================
  8. This script gives you basic information about your enemy during battle
  9. this is "VERY" basic...
  10.  
  11. ================================================================================
  12. ★☆★☆★☆★☆★☆★☆★☆★ TERMS AND CONDITIONS: ☆★☆★☆★☆★☆★☆★☆★☆★☆
  13. ================================================================================
  14. 1. You must give credit to "Dekita"
  15. 2. You are NOT allowed to repost this script.(or modified versions)
  16. 3. You are NOT allowed to convert this script.(into other game engines e.g RGSS2)
  17. 4. You are NOT allowed to use this script for Commercial games.
  18. 5. ENJOY!
  19.  
  20. "FINE PRINT"
  21. By using this script you hereby agree to the above terms and conditions,
  22. if any violation of the above terms occurs "legal action" may be taken.
  23. Not understanding the above terms and conditions does NOT mean that
  24. they do not apply to you.
  25. If you wish to discuss the terms and conditions in further detail you can
  26. contact me at http://dekitarpg.wordpress.com/ or DekitaRPG@gmail.com
  27.  
  28. ================================================================================
  29. History:
  30. =========
  31. D /M /Y
  32. 18/10/2o12 - wrote script,
  33. ================================================================================
  34. INSTRUCTIONS:
  35. ==============
  36. Place this script UNDER "▼ Materials" and ABOVE "▼ Main" in your script editor.
  37.  
  38. =end #==========================================================================#
  39. module Dekita__Enemy_HP_MP_BASIC
  40.  
  41. # CUSTOMISATION OPTIONS
  42.  
  43. Enemy_Info_Column =[
  44. [:mhp],
  45. [:mmp],
  46. ]#
  47.  
  48. # MaxHP Settings
  49. MHP_Color_1 = Color.new(0, 50, 0, 100)
  50. MHP_Color_2 = Color.new(0, 255, 0, 150)
  51.  
  52. # MaxMP Settings
  53. MMP_Color_1 = Color.new(0, 0, 50)
  54. MMP_Color_2 = Color.new(0, 0, 255)
  55.  
  56. Gauge_Width = (Graphics.width / 4 - 12)
  57.  
  58.  
  59. # CUSTOMISATION OPTIONS END!
  60. p 'Loaded : DPBz - Basic Enemy Info'
  61. end # Dekita__Enemy_HP_MP_BASIC
  62.  
  63. $imported = {} if $imported.nil?
  64. $imported[:Dekita__Basic_Enemy_Info] = true
  65.  
  66. #==============================================================================
  67. class Window_BattleEnemy < Window_Selectable
  68. #==============================================================================
  69.  
  70. # // Overwrite method
  71. def col_max
  72. return 1
  73. end
  74.  
  75.  
  76. # // Alias method
  77. alias basic_enemy_info draw_item
  78. def draw_item(index)
  79. basic_enemy_info(index)
  80. e_i_index = $game_troop.alive_members[0]
  81. e_i_index1 = $game_troop.alive_members[1]
  82. e_i_index2 = $game_troop.alive_members[2]
  83. e_i_index3 = $game_troop.alive_members[3]
  84. e_i_index4 = $game_troop.alive_members[4]
  85. e_i_index5 = $game_troop.alive_members[5]
  86. e_i_index6 = $game_troop.alive_members[6]
  87. e_i_index7 = $game_troop.alive_members[7]
  88. draw_enemy_info_column(e_i_index, 0)
  89. if !$game_troop.alive_members[1].nil?
  90. draw_enemy_info_column(e_i_index1, line_height * 1)
  91. end
  92. if !$game_troop.alive_members[2].nil?
  93. draw_enemy_info_column(e_i_index2, line_height * 2)
  94. end
  95. if !$game_troop.alive_members[3].nil?
  96. draw_enemy_info_column(e_i_index3, line_height * 3)
  97. end
  98. if !$game_troop.alive_members[4].nil?
  99. draw_enemy_info_column(e_i_index4, line_height * 4)
  100. end
  101. if !$game_troop.alive_members[5].nil?
  102. draw_enemy_info_column(e_i_index5, line_height * 5)
  103. end
  104. if !$game_troop.alive_members[6].nil?
  105. draw_enemy_info_column(e_i_index6, line_height * 6)
  106. end
  107. if !$game_troop.alive_members[7].nil?
  108. draw_enemy_info_column(e_i_index7, line_height * 7)
  109. end
  110. end
  111.  
  112. # // New method
  113. def draw_enemy_info_column(index, dy)
  114. dx = window_width / 3 * 1
  115. dw = Dekita__Enemy_HP_MP_BASIC::Gauge_Width
  116. for information in Dekita__Enemy_HP_MP_BASIC::Enemy_Info_Column
  117. draw_basic_enemy_info(information, index, dx, dy, dw)
  118. dx += (dw+2)
  119. end
  120. end
  121.  
  122. # // New method
  123. def draw_basic_enemy_info(stat_info, target, dx, dy, dw)
  124. dpbz_target = target
  125. case stat_info[0]
  126. when :mhp
  127. text = Vocab.hp
  128. value = "#{dpbz_target.hp.to_i} / #{dpbz_target.mhp}"
  129. rate = dpbz_target.hp_rate
  130. color1 = Dekita__Enemy_HP_MP_BASIC::MHP_Color_1
  131. color2 = Dekita__Enemy_HP_MP_BASIC::MHP_Color_2
  132. when :mmp
  133. text = Vocab.mp
  134. value = "#{dpbz_target.mp.to_i} / #{dpbz_target.mmp}"
  135. rate = dpbz_target.mp_rate
  136. color1 = Dekita__Enemy_HP_MP_BASIC::MMP_Color_1
  137. color2 = Dekita__Enemy_HP_MP_BASIC::MMP_Color_2
  138. else; return dy
  139. end
  140. contents.font.size = 18
  141. change_color(system_color)
  142. draw_gauge(dx, dy-2, dw-4, rate, color1, color2)
  143. draw_text(dx, dy-2, dw-2, line_height, text, 0)
  144. change_color(normal_color)
  145. draw_text(dx, dy-2, dw-2, line_height, value, 2)
  146. return dy + line_height
  147. end
  148.  
  149.  
  150. end # Window_BattleEnemy
  151. #===============================================================================#
  152. # - SCRIPT END - #
  153. #===============================================================================#
  154. # http://dekitarpg.wordpress.com/ #
  155. #===============================================================================#
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement