molegato

Custom battle status

Feb 10th, 2012
1,513
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 22.46 KB | None | 0 0
  1. #==============================================================================
  2. # CUSTOM BATTLE STATUS
  3. # Author Molegato
  4. # Version 1.2
  5. #------------------------------------------------------------------------------
  6. # You want options? There you have it.
  7. #==============================================================================
  8.  
  9. $imported = {} if $imported.nil?
  10. $imported['Molegato-Custom_battle_status'] = true
  11.  
  12.  
  13. #==============================================================================
  14. # ■ Window_PartyCommand
  15. #==============================================================================
  16.  
  17. class Window_PartyCommand < Window_Command
  18. alias custom_battlestatus_PC_initialize initialize
  19. def initialize
  20. @command_icons=MOLEGATO_CUSTOM_BATTLESTATUS::PARTY_COMMAND_ICONS
  21. custom_battlestatus_PC_initialize
  22. self.windowskin = Cache.system(MOLEGATO_CUSTOM_BATTLESTATUS::PARTY_COMMAND_WINDOW)
  23. self.opacity=MOLEGATO_CUSTOM_BATTLESTATUS::PARTY_COMMAND_OPACITY
  24. contents.font.size = MOLEGATO_CUSTOM_BATTLESTATUS::PARTY_COMMAND_FONT_SIZE
  25. end
  26.  
  27. def window_width
  28. return MOLEGATO_CUSTOM_BATTLESTATUS::PARTY_COMMAND_WIDTH
  29. end
  30.  
  31. def visible_line_number
  32. return [item_max,MOLEGATO_CUSTOM_BATTLESTATUS::PARTY_COMMAND_LINE_MAX].min
  33. end
  34.  
  35. def draw_all_items
  36. item_max.times {|i|
  37. if MOLEGATO_CUSTOM_BATTLESTATUS::PARTY_COMMAND_USE_ICONS
  38. rect = item_rect(i)
  39. rect.x += 28
  40. rect.width -= 8
  41. draw_icon(@command_icons[i], 0, i*line_height, true)
  42. contents.font.size = MOLEGATO_CUSTOM_BATTLESTATUS::PARTY_COMMAND_FONT_SIZE
  43. draw_text(rect, command_name(i), 0)
  44. else
  45. draw_item(i)
  46. end
  47. }
  48. end
  49.  
  50. def update_tone
  51. custom_tone = Tone.new
  52. custom_tone.red=MOLEGATO_CUSTOM_BATTLESTATUS::PARTY_COMMAND_TONE[0]
  53. custom_tone.green=MOLEGATO_CUSTOM_BATTLESTATUS::PARTY_COMMAND_TONE[1]
  54. custom_tone.blue=MOLEGATO_CUSTOM_BATTLESTATUS::PARTY_COMMAND_TONE[2]
  55. custom_tone.gray=MOLEGATO_CUSTOM_BATTLESTATUS::PARTY_COMMAND_TONE[3]
  56. self.tone.set(custom_tone)
  57. end
  58. end
  59.  
  60. #==============================================================================
  61. # ■ Window_ActorCommand
  62. #==============================================================================
  63.  
  64. class Window_ActorCommand < Window_Command
  65.  
  66. alias custom_battlestatus_initialize initialize
  67. def initialize
  68. @lineas=0
  69. custom_battlestatus_initialize
  70. self.windowskin = Cache.system(MOLEGATO_CUSTOM_BATTLESTATUS::ACTOR_COMMAND_WINDOW)
  71. self.opacity=MOLEGATO_CUSTOM_BATTLESTATUS::ACTOR_COMMAND_OPACITY
  72. contents.font.size = MOLEGATO_CUSTOM_BATTLESTATUS::ACTOR_COMMAND_FONT_SIZE
  73. end
  74.  
  75. def window_width
  76. return MOLEGATO_CUSTOM_BATTLESTATUS::ACTOR_COMMAND_WIDTH
  77. end
  78.  
  79.  
  80. def visible_line_number
  81. return [item_max,MOLEGATO_CUSTOM_BATTLESTATUS::ACTOR_COMMAND_LINE_MAX].min
  82. #WHAT'S WRONG WITH YOU JERK!!!!!!
  83. end
  84.  
  85. alias custom_battlestatus_setup setup
  86. def setup(actor)
  87. custom_battlestatus_setup(actor)
  88. self.height=window_height
  89. self.oy=0
  90. end
  91.  
  92. #--------------------------------------------------------------------------
  93. # ● draw_all_items draws icons too. yay
  94. #--------------------------------------------------------------------------
  95. def draw_all_items
  96. item_max.times {|i|
  97. if MOLEGATO_CUSTOM_BATTLESTATUS::ACTOR_COMMAND_USE_ICONS
  98. #attack
  99. if @list[i][:symbol]== :attack
  100. if @actor and @actor.actor.equips[0] and MOLEGATO_CUSTOM_BATTLESTATUS::ACTOR_COMMAND_ICON_ATTACK_WEAPON
  101. icon=$data_weapons[@actor.actor.equips[0]].icon_index
  102. else
  103. icon=MOLEGATO_CUSTOM_BATTLESTATUS::ACTOR_COMMAND_DEFAULT_ICON_ATTACK
  104. if @actor.actor.tag_check_multivalues(@actor.actor.note,"attack_icon")
  105. [email protected]_check_multivalues(@actor.actor.note,"attack_icon")[0].to_i()
  106. end
  107. end
  108. end
  109.  
  110. #Guard
  111. if @list[i][:symbol]== :guard
  112. icon=MOLEGATO_CUSTOM_BATTLESTATUS::ACTOR_COMMAND_DEFAULT_ICON_GUARD
  113. if @actor.actor.tag_check_multivalues(@actor.actor.note,"guard_icon")
  114. [email protected]_check_multivalues(@actor.actor.note,"guard_icon")[0].to_i()
  115. end
  116. end
  117.  
  118. #Skill
  119. if @list[i][:symbol]== :skill
  120. icon=MOLEGATO_CUSTOM_BATTLESTATUS::ACTOR_COMMAND_ICONS_SKILL[@list[i][:ext]]
  121. end
  122.  
  123. #item
  124. if @list[i][:symbol]== :item
  125. icon=MOLEGATO_CUSTOM_BATTLESTATUS::ACTOR_COMMAND_ICON_ITEM
  126. end
  127.  
  128.  
  129. rect = item_rect(i)
  130. rect.x += 28
  131. rect.width -= 8
  132. draw_icon(icon, 0, i*line_height, true)
  133. contents.font.size = MOLEGATO_CUSTOM_BATTLESTATUS::ACTOR_COMMAND_FONT_SIZE
  134. draw_text(rect, command_name(i), 0)
  135. else
  136. draw_item(i)
  137. end
  138. }
  139. end
  140.  
  141. def update_tone
  142. custom_tone = Tone.new
  143. custom_tone.red=MOLEGATO_CUSTOM_BATTLESTATUS::ACTOR_COMMAND_TONE[0]
  144. custom_tone.green=MOLEGATO_CUSTOM_BATTLESTATUS::ACTOR_COMMAND_TONE[1]
  145. custom_tone.blue=MOLEGATO_CUSTOM_BATTLESTATUS::ACTOR_COMMAND_TONE[2]
  146. custom_tone.gray=MOLEGATO_CUSTOM_BATTLESTATUS::ACTOR_COMMAND_TONE[3]
  147. self.tone.set(custom_tone)
  148. end
  149.  
  150. end
  151.  
  152. #==============================================================================
  153. # ■ Window_BattleStatus
  154. #==============================================================================
  155.  
  156. class Window_BattleStatus < Window_Selectable
  157.  
  158. alias custom_battlestatus_initialize initialize
  159. def initialize
  160. custom_battlestatus_initialize
  161. self.windowskin = Cache.system(MOLEGATO_CUSTOM_BATTLESTATUS::STATUS_WINDOW)
  162. self.opacity=MOLEGATO_CUSTOM_BATTLESTATUS::STATUS_OPACITY
  163. contents.font.size = MOLEGATO_CUSTOM_BATTLESTATUS::STATUS_FONT_SIZE
  164. end
  165.  
  166. def window_width
  167. MOLEGATO_CUSTOM_BATTLESTATUS::STATUS_WIDTH
  168. end
  169.  
  170. def window_height
  171. MOLEGATO_CUSTOM_BATTLESTATUS::STATUS_HEIGHT
  172. end
  173.  
  174. def draw_item(index)
  175. actor = $game_party.battle_members[index]
  176. if MOLEGATO_CUSTOM_BATTLESTATUS::STATUS_HORIZONTAL==true
  177. actor_width=self.contents.width/$game_party.max_battle_members
  178. actor_x=index*actor_width
  179. actor_y=0
  180. if MOLEGATO_CUSTOM_BATTLESTATUS::CENTER_ACTORS==true
  181. actor_x+=($game_party.max_battle_members-$game_party.battle_members.size)*actor_width*0.5
  182. end
  183. else
  184. actor_x=0
  185. actor_y=index*window_height/$game_party.max_battle_members
  186. end
  187.  
  188. #draw image 1
  189. if MOLEGATO_CUSTOM_BATTLESTATUS::USE_IMAGE1
  190. if actor.actor.tag_check_multivalues(actor.actor.note,"custom_back_image")
  191. img=actor.actor.tag_check_multivalues(actor.actor.note,"custom_back_image")[0]
  192. else
  193. img=MOLEGATO_CUSTOM_BATTLESTATUS::IMAGE1_NAME
  194. end
  195. draw_system(img,actor_x+MOLEGATO_CUSTOM_BATTLESTATUS::IMAGE1_X,actor_y+MOLEGATO_CUSTOM_BATTLESTATUS::IMAGE1_Y)
  196. end
  197. #draw face
  198. if MOLEGATO_CUSTOM_BATTLESTATUS::USE_FACE
  199. draw_actor_face_scaled(actor, actor_x+MOLEGATO_CUSTOM_BATTLESTATUS::FACE_X, actor_y+MOLEGATO_CUSTOM_BATTLESTATUS::FACE_Y, MOLEGATO_CUSTOM_BATTLESTATUS::FACE_SCALE, actor.dead? ? false : true)
  200. end
  201. #draw chara
  202. if MOLEGATO_CUSTOM_BATTLESTATUS::USE_CHARA
  203. draw_actor_graphic(actor, actor_x+MOLEGATO_CUSTOM_BATTLESTATUS::CHARA_X, actor_y+MOLEGATO_CUSTOM_BATTLESTATUS::CHARA_Y)
  204. end
  205. #draw image 2
  206. if MOLEGATO_CUSTOM_BATTLESTATUS::USE_IMAGE2
  207. if actor.actor.tag_check_multivalues(actor.actor.note,"custom_front_image")
  208. img=actor.actor.tag_check_multivalues(actor.actor.note,"custom_front_image")[0]
  209. else
  210. img=MOLEGATO_CUSTOM_BATTLESTATUS::IMAGE2_NAME
  211. end
  212. draw_system(img,actor_x+MOLEGATO_CUSTOM_BATTLESTATUS::IMAGE2_X,actor_y+MOLEGATO_CUSTOM_BATTLESTATUS::IMAGE2_Y)
  213. end
  214. #draw states icons
  215. draw_actor_icons(actor, actor_x+MOLEGATO_CUSTOM_BATTLESTATUS::ICONS_X, actor_y+MOLEGATO_CUSTOM_BATTLESTATUS::ICONS_Y, MOLEGATO_CUSTOM_BATTLESTATUS::ICONS_WIDTH)
  216. #draw bars
  217. draw_actor_hp(actor, actor_x + MOLEGATO_CUSTOM_BATTLESTATUS::HP_BAR_X, actor_y+MOLEGATO_CUSTOM_BATTLESTATUS::HP_BAR_Y, MOLEGATO_CUSTOM_BATTLESTATUS::HP_BAR_WIDTH)
  218. draw_actor_mp(actor, actor_x + MOLEGATO_CUSTOM_BATTLESTATUS::MP_BAR_X, actor_y+MOLEGATO_CUSTOM_BATTLESTATUS::MP_BAR_Y, MOLEGATO_CUSTOM_BATTLESTATUS::MP_BAR_WIDTH)
  219. if $data_system.opt_display_tp
  220. draw_actor_tp(actor, actor_x + MOLEGATO_CUSTOM_BATTLESTATUS::TP_BAR_X, actor_y+MOLEGATO_CUSTOM_BATTLESTATUS::TP_BAR_Y, MOLEGATO_CUSTOM_BATTLESTATUS::TP_BAR_WIDTH)
  221. end
  222. #draw lvl
  223. if MOLEGATO_CUSTOM_BATTLESTATUS::DRAW_LVL
  224. draw_actor_level(actor, actor_x+MOLEGATO_CUSTOM_BATTLESTATUS::LVL_X, actor_y+MOLEGATO_CUSTOM_BATTLESTATUS::LVL_Y)
  225. end
  226. #draw name
  227. draw_actor_name(actor, actor_x+MOLEGATO_CUSTOM_BATTLESTATUS::ACTOR_NAME_X, actor_y+MOLEGATO_CUSTOM_BATTLESTATUS::ACTOR_NAME_Y, 100)
  228.  
  229. end
  230.  
  231. alias custom_battlestatus_update_cursor update_cursor
  232. def update_cursor
  233. custom_battlestatus_update_cursor
  234.  
  235. actor = $game_party.battle_members[index]
  236. if MOLEGATO_CUSTOM_BATTLESTATUS::STATUS_HORIZONTAL==true
  237. actor_width=self.contents.width/$game_party.max_battle_members
  238. actor_height=self.contents.height
  239. actor_x=index*actor_width
  240. actor_y=0
  241. if MOLEGATO_CUSTOM_BATTLESTATUS::CENTER_ACTORS==true
  242. actor_x+=($game_party.max_battle_members-$game_party.battle_members.size)*actor_width*0.5
  243. end
  244. else
  245. actor_x=0
  246. actor_y=index*window_height/$game_party.max_battle_members
  247. actor_width=self.contents.width
  248. actor_height=window_height/$game_party.max_battle_members
  249. end
  250.  
  251. rect = Rect.new(actor_x, actor_y, actor_width, actor_height)
  252. cursor_rect.set(rect)
  253.  
  254. if @index==-1
  255. cursor_rect.empty
  256. end
  257. end
  258.  
  259. def col_max
  260. if MOLEGATO_CUSTOM_BATTLESTATUS::STATUS_HORIZONTAL==false
  261. return 1
  262. else
  263. return $game_party.battle_members.size
  264. end
  265. end
  266.  
  267. def update_tone
  268. custom_tone = Tone.new
  269. custom_tone.red=MOLEGATO_CUSTOM_BATTLESTATUS::STATUS_TONE[0]
  270. custom_tone.green=MOLEGATO_CUSTOM_BATTLESTATUS::STATUS_TONE[1]
  271. custom_tone.blue=MOLEGATO_CUSTOM_BATTLESTATUS::STATUS_TONE[2]
  272. custom_tone.gray=MOLEGATO_CUSTOM_BATTLESTATUS::STATUS_TONE[3]
  273. self.tone.set(custom_tone)
  274. end
  275. end
  276.  
  277. class Window_Help < Window_Base
  278. alias custom_battlestatus_refresh refresh
  279. def refresh
  280. if $game_party.in_battle
  281. contents.clear
  282. contents.font.size = MOLEGATO_CUSTOM_BATTLESTATUS::HELP_FONT_SIZE
  283. draw_text(4, 0, self.width, line_height, @text)
  284. else
  285. custom_battlestatus_refresh
  286. end
  287. end
  288. end
  289.  
  290. class Window_BattleSkill < Window_SkillList
  291.  
  292. def initialize(help_window, info_viewport)
  293. y = 0
  294. super(0, y, Graphics.width, MOLEGATO_CUSTOM_BATTLESTATUS::SKILL_HEIGHT)
  295. self.visible = false
  296. @help_window = help_window
  297. @info_viewport = info_viewport
  298. end
  299.  
  300. def col_max
  301. return MOLEGATO_CUSTOM_BATTLESTATUS::SKILL_COLUMNS
  302. end
  303.  
  304. def update_tone
  305. custom_tone = Tone.new
  306. custom_tone.red=MOLEGATO_CUSTOM_BATTLESTATUS::SKILL_TONE[0]
  307. custom_tone.green=MOLEGATO_CUSTOM_BATTLESTATUS::SKILL_TONE[1]
  308. custom_tone.blue=MOLEGATO_CUSTOM_BATTLESTATUS::SKILL_TONE[2]
  309. custom_tone.gray=MOLEGATO_CUSTOM_BATTLESTATUS::SKILL_TONE[3]
  310. self.tone.set(custom_tone)
  311. end
  312.  
  313. def refresh
  314. make_item_list
  315. create_contents
  316. contents.font.size = MOLEGATO_CUSTOM_BATTLESTATUS::SKILL_FONT_SIZE
  317. draw_all_items
  318. end
  319.  
  320. end
  321.  
  322. class Window_BattleItem < Window_ItemList
  323.  
  324. def initialize(help_window, info_viewport)
  325. y = 0
  326. super(0, y, Graphics.width, MOLEGATO_CUSTOM_BATTLESTATUS::ITEM_HEIGHT)
  327. self.visible = false
  328. @help_window = help_window
  329. @info_viewport = info_viewport
  330. end
  331.  
  332. def col_max
  333. return MOLEGATO_CUSTOM_BATTLESTATUS::ITEM_COLUMNS
  334. end
  335.  
  336. def update_tone
  337. custom_tone = Tone.new
  338. custom_tone.red=MOLEGATO_CUSTOM_BATTLESTATUS::ITEM_TONE[0]
  339. custom_tone.green=MOLEGATO_CUSTOM_BATTLESTATUS::ITEM_TONE[1]
  340. custom_tone.blue=MOLEGATO_CUSTOM_BATTLESTATUS::ITEM_TONE[2]
  341. custom_tone.gray=MOLEGATO_CUSTOM_BATTLESTATUS::ITEM_TONE[3]
  342. self.tone.set(custom_tone)
  343. end
  344.  
  345. def refresh
  346. make_item_list
  347. create_contents
  348. contents.font.size = MOLEGATO_CUSTOM_BATTLESTATUS::ITEM_FONT_SIZE
  349. draw_all_items
  350. end
  351.  
  352. end
  353.  
  354. #==============================================================================
  355. # ■ Window_BattleEnemy
  356. #==============================================================================
  357.  
  358. class Window_BattleEnemy < Window_Selectable
  359.  
  360. alias custom_battlestatus_BE_initialize initialize
  361. def initialize(info_viewport)
  362. custom_battlestatus_BE_initialize(info_viewport)
  363.  
  364. end
  365.  
  366. def window_width
  367. if MOLEGATO_CUSTOM_BATTLESTATUS::ENEMY_CURSOR
  368. return Graphics.width
  369. else
  370. return MOLEGATO_CUSTOM_BATTLESTATUS::TARGET_WIDTH
  371. end
  372. end
  373.  
  374. def window_height
  375. if MOLEGATO_CUSTOM_BATTLESTATUS::ENEMY_CURSOR
  376. return Graphics.height
  377. else
  378. return MOLEGATO_CUSTOM_BATTLESTATUS::TARGET_HEIGHT
  379. end
  380. end
  381.  
  382. def draw_all_items
  383. if not MOLEGATO_CUSTOM_BATTLESTATUS::ENEMY_CURSOR
  384. item_max.times {|i| draw_item(i) }
  385. else
  386. if enemy
  387. draw_system(MOLEGATO_CUSTOM_BATTLESTATUS::CURSOR_NAME,enemy.screen_x-MOLEGATO_CUSTOM_BATTLESTATUS::CURSOR_OX,enemy.screen_y-MOLEGATO_CUSTOM_BATTLESTATUS::CURSOR_OY)
  388. if MOLEGATO_CUSTOM_BATTLESTATUS::CURSOR_ENEMY_NAME
  389. if enemy.enemy.tag_check_multivalues(enemy.enemy.note,"name_color")
  390. change_color(text_color(enemy.enemy.tag_check_multivalues(enemy.enemy.note,"name_color")[0].to_i))
  391. else
  392. change_color(normal_color)
  393. end
  394. draw_text(enemy.screen_x-MOLEGATO_CUSTOM_BATTLESTATUS::CURSOR_TEXT_OX, enemy.screen_y-MOLEGATO_CUSTOM_BATTLESTATUS::CURSOR_TEXT_OY, MOLEGATO_CUSTOM_BATTLESTATUS::CURSOR_TEXT_WIDTH, line_height, enemy.enemy.name, MOLEGATO_CUSTOM_BATTLESTATUS::CURSOR_TEXT_ALIGN)
  395. end
  396. end
  397. end
  398. end
  399.  
  400. alias custom_battlestatus_update_cursor update_cursor
  401. def update_cursor
  402. custom_battlestatus_update_cursor
  403. if MOLEGATO_CUSTOM_BATTLESTATUS::ENEMY_CURSOR
  404. cursor_rect.empty
  405. contents.clear
  406. draw_all_items
  407. end
  408. end
  409.  
  410. def contents_height
  411. return window_height
  412. end
  413.  
  414. def col_max
  415. if not MOLEGATO_CUSTOM_BATTLESTATUS::ENEMY_CURSOR
  416. return MOLEGATO_CUSTOM_BATTLESTATUS::ITEM_COLUMNS
  417. else
  418. if MOLEGATO_CUSTOM_BATTLESTATUS::CURSOR_VERTICAL
  419. return 1
  420. else
  421. return item_max
  422. end
  423. end
  424. end
  425.  
  426. def enemy
  427. if MOLEGATO_CUSTOM_BATTLESTATUS::ENEMY_CURSOR and MOLEGATO_CUSTOM_BATTLESTATUS::REVERSE_CURSOR
  428. $game_troop.alive_members.reverse[@index]
  429. else
  430. $game_troop.alive_members[@index]
  431. end
  432. end
  433.  
  434. def update_tone
  435. custom_tone = Tone.new
  436. custom_tone.red=MOLEGATO_CUSTOM_BATTLESTATUS::TARGET_TONE[0]
  437. custom_tone.green=MOLEGATO_CUSTOM_BATTLESTATUS::TARGET_TONE[1]
  438. custom_tone.blue=MOLEGATO_CUSTOM_BATTLESTATUS::TARGET_TONE[2]
  439. custom_tone.gray=MOLEGATO_CUSTOM_BATTLESTATUS::TARGET_TONE[3]
  440. self.tone.set(custom_tone)
  441. end
  442.  
  443. end
  444.  
  445.  
  446. #==============================================================================
  447. # ■ Window_BattleActor
  448. #==============================================================================
  449.  
  450. class Window_BattleActor < Window_BattleStatus
  451.  
  452. def show
  453. if @info_viewport
  454. select(0)
  455. end
  456. super
  457. end
  458.  
  459. def update_tone
  460. custom_tone = Tone.new
  461. custom_tone.red=MOLEGATO_CUSTOM_BATTLESTATUS::STATUS_TONE[0]
  462. custom_tone.green=MOLEGATO_CUSTOM_BATTLESTATUS::STATUS_TONE[1]
  463. custom_tone.blue=MOLEGATO_CUSTOM_BATTLESTATUS::STATUS_TONE[2]
  464. custom_tone.gray=MOLEGATO_CUSTOM_BATTLESTATUS::STATUS_TONE[3]
  465. self.tone.set(custom_tone)
  466. end
  467.  
  468. end
  469.  
  470. #==============================================================================
  471. # ■ Scene_Battle
  472. #==============================================================================
  473.  
  474. class Scene_Battle < Scene_Base
  475.  
  476. alias custom_battlestatus_create_info_viewport create_info_viewport
  477. def create_info_viewport
  478. custom_battlestatus_create_info_viewport
  479. @info_viewport.rect.y = 0
  480. @info_viewport.rect.height=Graphics.height
  481. @status_window.y = MOLEGATO_CUSTOM_BATTLESTATUS::STATUS_Y
  482. @status_window.x=MOLEGATO_CUSTOM_BATTLESTATUS::STATUS_X
  483. end
  484.  
  485. alias custom_battlestatus_create_party_command_window create_party_command_window
  486. def create_party_command_window
  487. custom_battlestatus_create_party_command_window
  488. if MOLEGATO_CUSTOM_BATTLESTATUS::PARTY_COMMAND_POSITION==0
  489. @party_command_window.x = MOLEGATO_CUSTOM_BATTLESTATUS::PARTY_COMMAND_X
  490. @party_command_window.y = MOLEGATO_CUSTOM_BATTLESTATUS::PARTY_COMMAND_Y
  491. end
  492. if MOLEGATO_CUSTOM_BATTLESTATUS::PARTY_COMMAND_POSITION==1
  493. if MOLEGATO_CUSTOM_BATTLESTATUS::MOVE_STATUS_WINDOW==true
  494. @party_command_window.x = Graphics.width + MOLEGATO_CUSTOM_BATTLESTATUS::PARTY_COMMAND_X
  495. @party_command_window.y = MOLEGATO_CUSTOM_BATTLESTATUS::PARTY_COMMAND_Y
  496. else
  497. @party_command_window.x = Graphics.width-@party_command_window.window_width + MOLEGATO_CUSTOM_BATTLESTATUS::PARTY_COMMAND_X
  498. @party_command_window.y = MOLEGATO_CUSTOM_BATTLESTATUS::PARTY_COMMAND_Y
  499. end
  500. end
  501.  
  502. end
  503.  
  504. alias custom_battlestatus_create_actor_command_window create_actor_command_window
  505. def create_actor_command_window
  506. custom_battlestatus_create_actor_command_window
  507. if MOLEGATO_CUSTOM_BATTLESTATUS::ACTOR_COMMAND_POSITION==0
  508. @actor_command_window.x = MOLEGATO_CUSTOM_BATTLESTATUS::ACTOR_COMMAND_X
  509. @actor_command_window.y = MOLEGATO_CUSTOM_BATTLESTATUS::ACTOR_COMMAND_Y
  510. end
  511. if MOLEGATO_CUSTOM_BATTLESTATUS::ACTOR_COMMAND_POSITION==1
  512. if MOLEGATO_CUSTOM_BATTLESTATUS::MOVE_STATUS_WINDOW==true
  513. @actor_command_window.x = Graphics.width+MOLEGATO_CUSTOM_BATTLESTATUS::ACTOR_COMMAND_X
  514. @actor_command_window.y = MOLEGATO_CUSTOM_BATTLESTATUS::ACTOR_COMMAND_Y
  515. else
  516. @actor_command_window.x = Graphics.width-@actor_command_window.window_width+MOLEGATO_CUSTOM_BATTLESTATUS::ACTOR_COMMAND_X
  517. @actor_command_window.y = MOLEGATO_CUSTOM_BATTLESTATUS::ACTOR_COMMAND_Y
  518. end
  519. end
  520. end
  521.  
  522. alias custom_battlestatus_create_help_window create_help_window
  523. def create_help_window
  524. custom_battlestatus_create_help_window
  525. @help_window.y=MOLEGATO_CUSTOM_BATTLESTATUS::HELP_Y
  526. @help_window.height=MOLEGATO_CUSTOM_BATTLESTATUS::HELP_HEIGHT
  527. @help_window.opacity=MOLEGATO_CUSTOM_BATTLESTATUS::HELP_OPACITY
  528. @help_window.windowskin=Cache.system(MOLEGATO_CUSTOM_BATTLESTATUS::HELP_WINDOW)
  529. @help_window.contents.font.size = MOLEGATO_CUSTOM_BATTLESTATUS::HELP_FONT_SIZE
  530. end
  531.  
  532. alias custom_battlestatus_create_skill_window create_skill_window
  533. def create_skill_window
  534. custom_battlestatus_create_skill_window
  535. @skill_window.x=MOLEGATO_CUSTOM_BATTLESTATUS::SKILL_X
  536. @skill_window.y=MOLEGATO_CUSTOM_BATTLESTATUS::SKILL_Y
  537. @skill_window.width=MOLEGATO_CUSTOM_BATTLESTATUS::SKILL_WIDTH
  538. @skill_window.opacity=MOLEGATO_CUSTOM_BATTLESTATUS::SKILL_OPACITY
  539. @skill_window.windowskin=Cache.system(MOLEGATO_CUSTOM_BATTLESTATUS::SKILL_WINDOW)
  540. @skill_window.contents.font.size = MOLEGATO_CUSTOM_BATTLESTATUS::SKILL_FONT_SIZE
  541. end
  542.  
  543. alias custom_battlestatus_create_item_window create_item_window
  544. def create_item_window
  545. custom_battlestatus_create_item_window
  546. @item_window.x=MOLEGATO_CUSTOM_BATTLESTATUS::ITEM_X
  547. @item_window.y=MOLEGATO_CUSTOM_BATTLESTATUS::ITEM_Y
  548. @item_window.width=MOLEGATO_CUSTOM_BATTLESTATUS::ITEM_WIDTH
  549. @item_window.opacity=MOLEGATO_CUSTOM_BATTLESTATUS::ITEM_OPACITY
  550. @item_window.windowskin=Cache.system(MOLEGATO_CUSTOM_BATTLESTATUS::ITEM_WINDOW)
  551. @item_window.contents.font.size = MOLEGATO_CUSTOM_BATTLESTATUS::ITEM_FONT_SIZE
  552. end
  553.  
  554. alias custom_battlestatus_create_enemy_window create_enemy_window
  555. def create_enemy_window
  556. custom_battlestatus_create_enemy_window
  557. if MOLEGATO_CUSTOM_BATTLESTATUS::ENEMY_CURSOR
  558. @enemy_window.x=0
  559. @enemy_window.y=0
  560. @enemy_window.opacity=0
  561. else
  562. @enemy_window.opacity=MOLEGATO_CUSTOM_BATTLESTATUS::TARGET_OPACITY
  563. @enemy_window.x=MOLEGATO_CUSTOM_BATTLESTATUS::TARGET_X
  564. @enemy_window.y=MOLEGATO_CUSTOM_BATTLESTATUS::TARGET_Y
  565. end
  566. @enemy_window.width=@enemy_window.window_width
  567. @enemy_window.height=@enemy_window.window_height
  568. @enemy_window.windowskin=Cache.system(MOLEGATO_CUSTOM_BATTLESTATUS::TARGET_WINDOW)
  569. @enemy_window.contents.font.size = MOLEGATO_CUSTOM_BATTLESTATUS::TARGET_FONT_SIZE
  570.  
  571. end
  572.  
  573. alias custom_battlestatus_create_actor_window create_actor_window
  574. def create_actor_window
  575. custom_battlestatus_create_actor_window
  576. @actor_window.y = @status_window.y
  577. end
  578.  
  579. alias custom_battlestatus_update_basic update_basic
  580. def update_basic
  581. custom_battlestatus_update_basic
  582. @party_command_window.y=@info_viewport.rect.height-@party_command_window.window_height+MOLEGATO_CUSTOM_BATTLESTATUS::PARTY_COMMAND_Y
  583. @actor_command_window.y=@info_viewport.rect.height-@actor_command_window.window_height+MOLEGATO_CUSTOM_BATTLESTATUS::ACTOR_COMMAND_Y
  584. @actor_window.x=@status_window.x-@info_viewport.ox
  585. end
  586.  
  587. def update_info_viewport
  588. if @party_command_window.active
  589. if MOLEGATO_CUSTOM_BATTLESTATUS::PARTY_COMMAND_POSITION==1 and MOLEGATO_CUSTOM_BATTLESTATUS::MOVE_STATUS_WINDOW==true
  590. move_info_viewport([@party_command_window.x+@party_command_window.window_width,@actor_command_window.x+@actor_command_window.window_width].min)
  591. else
  592. move_info_viewport(0)
  593. end
  594. end
  595.  
  596. if @actor_command_window.active
  597. if MOLEGATO_CUSTOM_BATTLESTATUS::ACTOR_COMMAND_POSITION==1 and MOLEGATO_CUSTOM_BATTLESTATUS::MOVE_STATUS_WINDOW==true
  598. move_info_viewport([@party_command_window.x+@party_command_window.window_width,@actor_command_window.x+@actor_command_window.window_width].min)
  599. else
  600. move_info_viewport(0)
  601. end
  602. end
  603. if MOLEGATO_CUSTOM_BATTLESTATUS::CENTER_STATUS_ON_TURN
  604. move_info_viewport([@party_command_window.x+@party_command_window.window_width,@actor_command_window.x+@actor_command_window.window_width].min*0.5) if BattleManager.in_turn?
  605. else
  606. move_info_viewport(MOLEGATO_CUSTOM_BATTLESTATUS::STATUS_X_ON_TURN) if BattleManager.in_turn?
  607. end
  608. end
  609.  
  610. end
Advertisement
Add Comment
Please, Sign In to add comment