Advertisement
roninator2

Cozziekuns Earthbound Addon - Face Frames

Dec 17th, 2024
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 2.15 KB | None | 0 0
  1. # https://forums.rpgmakerweb.com/index.php?threads/need-a-little-modification-on-cozziekunss-earthbound-battle-system.143025/#post-1236737
  2.  
  3. module R2_Cozzie_Status_Back_Color
  4.   Back = Color.new(0,65,155,180) # color for back when Show_Back == false
  5.   Show_Back = false # show default status window
  6. end
  7. class Window_BattleStatus < Window_Selectable
  8.   def draw_window_frame(x, y, w, h)
  9.     contents.blt(x, y, windowskin, Rect.new(64,0,16,16))
  10.     contents.blt(x+w-16, y, windowskin, Rect.new(112,0,16,16))
  11.     contents.blt(x, y+h-16, windowskin, Rect.new(64,48,16,16))
  12.     contents.blt(x+w-16, y+h-16, windowskin, Rect.new(112,48,16,16))
  13.     adjust = $game_party.battle_members.size
  14.     contents.fill_rect(x + 6, y + 6, adjust % 3 == 0 ? 117 : 119, 108, R2_Cozzie_Status_Back_Color::Back) unless
  15.     R2_Cozzie_Status_Back_Color::Show_Back == true
  16.     i=0
  17.     while i < w-32 do
  18.       contents.blt(x+16+i, y, windowskin, Rect.new(80,0,[w-32-i,32].min,16))
  19.       contents.blt(x+16+i, y+h-16, windowskin, Rect.new(80,48,[w-32-i,32].min,16))
  20.       i+=32
  21.     end
  22.     i=0
  23.     while i < h-32 do
  24.       contents.blt(x, y+16+i, windowskin, Rect.new(64,16,16,[h-32-i,32].min))
  25.       contents.blt(x+w-16, y+16+i, windowskin, Rect.new(112,16,16,[h-32-i,32].min))
  26.       i+=32
  27.     end  
  28.   end
  29.  
  30.   def draw_basic_area(rect, actor)
  31.     draw_window_frame(rect.x, rect.y, rect.width, rect.height)
  32.     draw_actor_name(actor, rect.x, rect.y + 3, rect.width)
  33.     draw_actor_icons(actor, rect.x + 4, rect.y + line_height, rect.width)
  34.   end
  35.  
  36.   def draw_gauge_area_with_tp(rect, actor)
  37.     draw_gauge_area_without_tp(rect, actor)
  38.     draw_actor_tp(actor, rect.x + 8, rect.y + line_height * 4 - 5, rect.width - 18)
  39.   end
  40.  
  41.   def draw_gauge_area_without_tp(rect, actor)
  42.     draw_actor_hp(actor, rect.x + 8, rect.y + line_height * 2 - 5, rect.width - 18)
  43.     draw_actor_mp(actor, rect.x + 8, rect.y + line_height * 3 - 5, rect.width - 18)
  44.   end
  45.  
  46. end
  47.  
  48. class Scene_Battle < Scene_Base
  49.   alias r2_status_window_hide create_status_window
  50.   def create_status_window
  51.     r2_status_window_hide
  52.     @status_window.opacity = 0 if R2_Cozzie_Status_Back_Color::Show_Back == false
  53.   end
  54. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement