Advertisement
Dekita

$D13x Equip Sets 1.0

May 16th, 2013
256
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 28.32 KB | None | 0 0
  1. if true # << Make true to use this script, false to disable.
  2. #===============================================================================
  3. #
  4. # ☆ $D13x - Equipment Sets
  5. # -- Author : Dekita
  6. # -- Version : 1.0
  7. # -- Level : Easy / Normal
  8. # -- Requires : $D13x Core 1.8+
  9. # -- Engine : RPG Maker VX Ace.
  10. #
  11. #===============================================================================
  12. # ☆ Import
  13. #-------------------------------------------------------------------------------
  14. $D13x={}if$D13x==nil
  15. $D13x[:Equip_Sets]=true
  16. #===============================================================================
  17. # ☆ Updates
  18. #-------------------------------------------------------------------------------
  19. # D /M /Y
  20. # o5/o5/2o13 - Finished,
  21. # o4/o5/2o13 - Started
  22. #
  23. #===============================================================================
  24. # ☆ Introduction
  25. #-------------------------------------------------------------------------------
  26. # This script creates equipment sets.
  27. # if an actor is equipped with enough items from the set, they will get a bonus
  28. # to a statistic, such as parameters, xparams, sparams atk element rate,
  29. # defence element rate, skills.
  30. #
  31. # This script also adds an information window into the status screen,
  32. # accessed by pressing :S (default), this shows the current set items and
  33. # all bonuses currently obtained.
  34. #
  35. #===============================================================================
  36. # ★☆★☆★☆★☆★☆★☆★☆★ TERMS AND CONDITIONS: ☆★☆★☆★☆★☆★☆★☆★☆★☆
  37. #===============================================================================
  38. # 1. You MUST give credit to "Dekita" !!
  39. # 2. You are NOT allowed to repost this script.(or modified versions)
  40. # 3. You are NOT allowed to convert this script.
  41. # 4. You are NOT allowed to use this script for Commercial games.
  42. # 5. ENJOY!
  43. #
  44. # "FINE PRINT"
  45. # By using this script you hereby agree to the above terms and conditions,
  46. # if any violation of the above terms occurs "legal action" may be taken.
  47. # Not understanding the above terms and conditions does NOT mean that
  48. # they do not apply to you.
  49. # If you wish to discuss the terms and conditions in further detail you can
  50. # contact me at http://dekitarpg.wordpress.com/
  51. #
  52. #===============================================================================
  53. # ☆ Instructions
  54. #-------------------------------------------------------------------------------
  55. # Place Below " ▼ Materials " and Above " ▼ Main " in your script editor.
  56. # Place Below Both, " $D13x Statistic Control " && " $D13x Elements Control ".
  57. # Place Above " $D13x Status Scene ".
  58. #
  59. #===============================================================================
  60. # ☆ Script Calls
  61. #-------------------------------------------------------------------------------
  62. # $game_actors[actor_id].has_full_set?(set_id)
  63. # or
  64. # $game_party.members[member_id].has_full_set?(set_id)
  65. # or
  66. # $game_party.leader.has_full_set?(set_id)
  67. #
  68. # These script calls all check if an actor has a complete set equipped.
  69. # will return true if the set is complete, false otherwise.
  70. #
  71. # Use for conditional branches and things of that nature :)
  72. #
  73. #===============================================================================
  74. # ☆ HELP
  75. #-------------------------------------------------------------------------------
  76. # PARAMS : # XPARAMS : # SPARAMS : #
  77. # stat = id # stat = id # stat = id #
  78. # mhp = 0 # hit = 0 # tgr = 0 #
  79. # mmp = 1 # eva = 1 # grd = 1 #
  80. # atk = 2 # cri = 2 # rec = 2 #
  81. # def = 3 # cev = 3 # pha = 3 #
  82. # mat = 4 # mev = 4 # mcr = 4 #
  83. # mdf = 5 # mrf = 5 # tcr = 5 #
  84. # agi = 6 # cnt = 6 # pdr = 6 #
  85. # luk = 7 # hrg = 7 # mdr = 7 #
  86. # # mrg = 8 # fdr = 8 #
  87. # # trg = 9 # exr = 9 #
  88. #-------------------------------------------------------------------------------
  89. # Remember :
  90. # All Params work with integer values, eg. 1, 5, 123, 653, 198123
  91. # All x/s-Params work with float values, eg. 1.0, 0.5, 0.1, 0.05, 0.01
  92. # 1.0 = 100%, 0.01 = 1%,
  93. #
  94. #===============================================================================
  95. module Equip_Set
  96. #===============================================================================
  97. ID={} # << Keep
  98. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  99. # ☆ Key Settings
  100. #-----------------------------------------------------------------------------
  101. # :show_sets = Key to press to show set info screen (Status Screen).
  102. # :scroll_up = Key to press to scroll up the info screen.
  103. # :scroll_dn = Key to press to scroll down the info screen.
  104. #-----------------------------------------------------------------------------
  105. Keys = {
  106. :show_sets => :S,
  107. :scroll_up => :UP,
  108. :scroll_dn => :DOWN,
  109. }
  110. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  111. # ☆ Equipment Set, Settings
  112. #-----------------------------------------------------------------------------
  113. # :set_name = The set name displayed on info screen
  114. # :set_icon = The set icon shown in info screen
  115. # :set_info = The set information shown.
  116. # :pieces = The items included in the set.
  117. # ^- [:weapon, id] For a weapon item
  118. # ^- [:armor, id] For an Armor item
  119. # :bonuses = The set bonuses for pieces equipped.
  120. # ^- pieces => [:param, id, value]
  121. # ^- pieces => [:x_param, id, value]
  122. # ^- pieces => [:s_param, id, value]
  123. # ^- pieces => [:atk_ele, id, value]
  124. # ^- pieces => [:def_ele, id, value]
  125. # ^- pieces => [:skill, id]
  126. #-----------------------------------------------------------------------------
  127. ID[1]={
  128. :set_name => "Shita Gear",
  129. :set_icon => [5, 0, true], # id, hue, enable
  130. :set_info => "Epicly Bad Equipment Set!! Forged By An Unknown Traveller.",
  131. :pieces => [
  132. [:weapon, 1],
  133. [:armor , 1],
  134. [:armor , 2],
  135. [:armor , 3],
  136. [:armor , 4],
  137. [:armor , 5],
  138. [:armor , 6],
  139. ],
  140. :bonuses => {
  141. 2 => [:param, 0, 50],
  142. 3 => [:x_param, 0, 0.5],
  143. 4 => [:s_param, 0, -0.05],
  144. 5 => [:def_ele, 3, -0.1],
  145. 6 => [:atk_ele, 3, 0.1],
  146. 7 => [:skill, 20],
  147. },
  148. }# << end set ID[1]
  149. #-----------------------------------------------------------------------------
  150. ID[2]={
  151. :set_name => "Bettera Gear",
  152. :set_icon => [15, 0, true], # id, hue, enable
  153. :set_info => "Average Equipment Set!! Forged By The Warrior Goshiki.",
  154. :pieces => [
  155. [:weapon, 2],
  156. [:armor , 7],
  157. [:armor , 8],
  158. [:armor , 9],
  159. [:armor , 10],
  160. [:armor , 11],
  161. [:armor , 12],
  162. ],
  163. :bonuses => {
  164. 2 => [:param, 0, 50],
  165. 4 => [:x_param, 0, 0.5],
  166. 5 => [:s_param, 0, 0.5],
  167. 6 => [:def_ele, 3, 0.1],
  168. 7 => [:atk_ele, 3, 0.1],
  169. },
  170. }# << end set ID[2]
  171. #-----------------------------------------------------------------------------
  172. ID[3]={
  173. :set_name => "Epicaga Gear",
  174. :set_icon => [25, 0, true], # id, hue, enable
  175. :set_info => "Epic Equipment Set!! Forged By The Legendary Cleric Dekita.",
  176. :pieces => [
  177. [:weapon, 3],
  178. [:armor , 13],
  179. [:armor , 14],
  180. [:armor , 15],
  181. [:armor , 16],
  182. [:armor , 17],
  183. [:armor , 18],
  184. ],
  185. :bonuses => {
  186. 2 => [:param, 0, 50],
  187. 3 => [:x_param, 0, 0.5],
  188. 4 => [:s_param, 0, 0.5],
  189. 5 => [:atk_ele, 3, 0.1],
  190. 6 => [:def_ele, 3, 0.1],
  191. },
  192. }# << end set ID[3]
  193. #-----------------------------------------------------------------------------
  194. ID[4]={
  195. :set_name => "Yin Yang Rings",
  196. :set_icon => [25, 180, true], # id, hue, enable
  197. :set_info => "Powerfull Ornament Set!! Said To Be Both Good And Evil...",
  198. :pieces => [
  199. [:armor , 19],
  200. [:armor , 20],
  201. ],
  202. :bonuses => {
  203. 2 => [:param, 0, 50],
  204. },
  205. }# << end set ID[4]
  206. #-----------------------------------------------------------------------------
  207. # << Add more lines in here, follow the same format as above.
  208. # ie.
  209. # ID[id_number]={
  210. # :set_name => "Set Name",
  211. # :set_icon => [icon index, hue, enabled],
  212. # :set_info => "Equipment Set Information.",
  213. # :pieces => [
  214. # [:weapon, id],
  215. # [:armor , id],
  216. # [:armor , id],
  217. # [:armor , id],
  218. # [:armor , id],
  219. # ],
  220. # :bonuses => {
  221. # 2 => [:param, id, val],
  222. # 3 => [:x_param, id, val],
  223. # 4 => [:s_param, id, val],
  224. # 5 => [:atk_ele, id, val],
  225. # 6 => [:def_ele, id, val],
  226. # },
  227. # }# << end ID[id_number]
  228. #####################
  229. # CUSTOMISATION END #
  230. end #####################
  231. #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★#
  232. # #
  233. # http://dekitarpg.wordpress.com/ #
  234. # #
  235. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆#
  236. #===============================================================================#
  237. # ARE YOU MODIFYING BEYOND THIS POINT? \.\. #
  238. # YES?\.\. #
  239. # OMG, REALLY? \| #
  240. # WELL SLAP MY FACE AND CALL ME A DRAGONITE.\..\.. #
  241. # I REALLY DIDN'T THINK YOU HAD IT IN YOU.\..\.. #
  242. #===============================================================================#
  243. class Game_Actor < Game_Battler
  244. #===============================================================================
  245. #-----------------------------------------------------------------------------
  246. # Alias List
  247. #-----------------------------------------------------------------------------
  248. alias :setup_eqp_set :setup
  249. alias :ref_eqp_sets :refresh
  250. alias :parpl_eqp_set :param_plus
  251. alias :xparpl_eqp_set :xparam_plus if $D13x[:Stats_Control]
  252. alias :sparpl_eqp_set :sparam_plus if $D13x[:Stats_Control]
  253. alias :atkele_eqp_set :atk_ele_plus if $D13x[:Elems_Control]
  254. alias :defele_eqp_set :def_ele_plus if $D13x[:Elems_Control]
  255. alias :skills_eqp_set :skills
  256. #-----------------------------------------------------------------------------
  257. # Setup
  258. #-----------------------------------------------------------------------------
  259. def setup(actor_id)
  260. reset_set_params
  261. setup_eqp_set(actor_id)
  262. end
  263. #-----------------------------------------------------------------------------
  264. # Refresh
  265. #-----------------------------------------------------------------------------
  266. def refresh
  267. reset_set_params
  268. check_equip_set
  269. ref_eqp_sets
  270. end
  271. #-----------------------------------------------------------------------------
  272. # Reset Set Params
  273. #-----------------------------------------------------------------------------
  274. def reset_set_params
  275. @set_param = [0] * 8
  276. @set_xparam = [0] * 10
  277. @set_sparam = [0] * 10
  278. @set_atk_ele = [0] * $data_system.elements.size
  279. @set_def_ele = [0] * $data_system.elements.size
  280. @eqp_set_skills = Array.new
  281. end
  282. #-----------------------------------------------------------------------------
  283. # Get Added Value of Parameter
  284. #-----------------------------------------------------------------------------
  285. def param_plus(param_id)
  286. parpl_eqp_set(param_id) + @set_param[param_id]
  287. end
  288. if $D13x[:Stats_Control]
  289. #---------------------------------------------------------------------------
  290. # Get Added Value of x-Parameter
  291. #---------------------------------------------------------------------------
  292. def xparam_plus(xparam_id)
  293. xparpl_eqp_set(xparam_id) + @set_xparam[xparam_id]
  294. end
  295. #---------------------------------------------------------------------------
  296. # Get Added Value of s-Parameter
  297. #---------------------------------------------------------------------------
  298. def sparam_plus(sparam_id)
  299. sparpl_eqp_set(sparam_id) + @set_sparam[sparam_id]
  300. end
  301. end # if $D13x[:Stats_Control]
  302. if $D13x[:Elems_Control]
  303. #---------------------------------------------------------------------------
  304. # Get Added Value of def-Element
  305. #---------------------------------------------------------------------------
  306. def def_ele_plus(element_id)
  307. defele_eqp_set(element_id) + @set_def_ele[element_id]
  308. end
  309. #---------------------------------------------------------------------------
  310. # Get Added Value of atk-Element
  311. #---------------------------------------------------------------------------
  312. def atk_ele_plus(element_id)
  313. atkele_eqp_set(element_id) + @set_atk_ele[element_id]
  314. end
  315. end # if $D13x[:Elems_Control]
  316. #-----------------------------------------------------------------------------
  317. # Get Skill Object Array
  318. #-----------------------------------------------------------------------------
  319. def skills
  320. skills_eqp_set + @eqp_set_skills.sort.collect { |id| $data_skills[id] }
  321. end
  322. #-----------------------------------------------------------------------------
  323. # Check Equip Set Data
  324. #-----------------------------------------------------------------------------
  325. def check_equip_set
  326. Equip_Set::ID.each do |pos_set|
  327. set_items = 0
  328. equips.each do |curr_eqp|
  329. next if curr_eqp == nil
  330. pos_set[1][:pieces].each do |piece|
  331. case piece[0]
  332. when :weapon
  333. next unless curr_eqp.is_a?(RPG::Weapon)
  334. next unless curr_eqp.database_id == piece[1]
  335. set_items += 1
  336. when :armor
  337. next unless curr_eqp.is_a?(RPG::Armor)
  338. next unless curr_eqp.database_id == piece[1]
  339. set_items += 1
  340. end
  341. end
  342. end
  343. pos_set[1][:bonuses].each do |k,i|
  344. check_set_bonuses(k,i,set_items)
  345. end
  346. end
  347. end
  348. #-----------------------------------------------------------------------------
  349. # Check Equip Set Bonuses
  350. #-----------------------------------------------------------------------------
  351. def check_set_bonuses(val,i,pieces)
  352. if val <= pieces
  353. case i[0]
  354. when :param then @set_param [i[1]] += i[2] if $D13x[:Stats_Control]
  355. when :x_param then @set_xparam [i[1]] += i[2] if $D13x[:Stats_Control]
  356. when :s_param then @set_sparam [i[1]] += i[2] if $D13x[:Stats_Control]
  357. when :atk_ele then @set_atk_ele[i[1]] += i[2] if $D13x[:Elems_Control]
  358. when :def_ele then @set_def_ele[i[1]] += i[2] if $D13x[:Elems_Control]
  359. when :skill then @eqp_set_skills << i[1]
  360. end
  361. end
  362. end
  363. #-----------------------------------------------------------------------------
  364. # Has Full Equip Set On ?
  365. #-----------------------------------------------------------------------------
  366. def has_full_set?(set_id)
  367. pos_set = Equip_Set::ID[set_id]
  368. set_items = 0
  369. equips.each do |curr_eqp|
  370. next if curr_eqp == nil
  371. pos_set[:pieces].each do |piece|
  372. case piece[0]
  373. when :weapon
  374. next unless curr_eqp.is_a?(RPG::Weapon)
  375. next unless curr_eqp.database_id == piece[1]
  376. set_items += 1
  377. when :armor
  378. next unless curr_eqp.is_a?(RPG::Armor)
  379. next unless curr_eqp.database_id == piece[1]
  380. set_items += 1
  381. end
  382. end
  383. end
  384. return true if set_items == pos_set[:pieces].size
  385. return false
  386. end
  387.  
  388. end
  389.  
  390. #===============================================================================
  391. class Window_EquipSet < Window_Selectable
  392. #===============================================================================
  393. #--------------------------------------------------------------------------
  394. # Object Initialization
  395. #--------------------------------------------------------------------------
  396. def initialize(actor)
  397. super(0, Graphics.height/2-32, Graphics.width, Graphics.height/2+32)
  398. @actor = actor
  399. @drew = 0
  400. refresh
  401. end
  402. #--------------------------------------------------------------------------
  403. # Do Refresh
  404. #--------------------------------------------------------------------------
  405. def refresh
  406. contents.clear
  407. self.opacity = 0 if $D13x[:Status_Scene]
  408. return unless @actor
  409. if !General::Fonts.include?(self.contents.font.name)
  410. self.contents.font.name = General::Fonts
  411. end
  412. if self.contents.font.size != General::Font_Size
  413. self.contents.font.size = General::Font_Size
  414. end
  415. if self.contents.font.bold != General::Font_Bold
  416. self.contents.font.bold = General::Font_Bold
  417. end
  418. get_max_lines
  419. draw_set_info
  420. end
  421. #--------------------------------------------------------------------------
  422. # Draw Set Information
  423. #--------------------------------------------------------------------------
  424. def scroll_up
  425. return if @drew >= 0
  426. @drew += 1
  427. refresh
  428. end
  429. #--------------------------------------------------------------------------
  430. # Draw Set Information
  431. #--------------------------------------------------------------------------
  432. def scroll_down
  433. return if @drew <= -(@lines)
  434. @drew -= 1
  435. refresh
  436. end
  437. #-----------------------------------------------------------------------------
  438. # Get Max Lines ( to show )
  439. #-----------------------------------------------------------------------------
  440. def get_max_lines
  441. @lines = 0
  442. lines = 0
  443. @sets = []
  444. Equip_Set::ID.each do |pos_set|
  445. @actor.equips.each do |curr_eqp|
  446. next if curr_eqp == nil
  447. pos_set[1][:pieces].each do |piece|
  448. case piece[0]
  449. when :weapon
  450. next unless curr_eqp.is_a?(RPG::Weapon)
  451. next unless curr_eqp.database_id == piece[1]
  452. lines += 1
  453. @sets << pos_set unless @sets.include?(pos_set)
  454. when :armor
  455. next unless curr_eqp.is_a?(RPG::Armor)
  456. next unless curr_eqp.database_id == piece[1]
  457. lines += 1
  458. @sets << pos_set unless @sets.include?(pos_set)
  459. end
  460. end
  461. end
  462. end
  463. @lines = lines
  464. end
  465. #--------------------------------------------------------------------------
  466. # Draw Set Information
  467. #--------------------------------------------------------------------------
  468. def draw_set_info
  469. drew = @drew
  470. Equip_Set::ID.each do |pos_set|
  471. set_items = 0
  472. @actor.equips.each do |curr_eqp|
  473. next if curr_eqp == nil
  474. pos_set[1][:pieces].each do |piece|
  475. case piece[0]
  476. when :weapon
  477. next unless curr_eqp.is_a?(RPG::Weapon)
  478. next unless curr_eqp.database_id == piece[1]
  479. set_items += 1
  480. when :armor
  481. next unless curr_eqp.is_a?(RPG::Armor)
  482. next unless curr_eqp.database_id == piece[1]
  483. set_items += 1
  484. end
  485. end
  486. end
  487. if set_items > 0
  488. drew = (draw_set_name(pos_set[1],drew))
  489. draw_set_items(pos_set,drew)
  490. end
  491. drew = draw_set_dataa(drew, set_items)
  492. pos_set[1][:bonuses].each do |k,i|
  493. drew = draw_set_bonuses(k,i,set_items,drew)
  494. end
  495. drew += 2 if set_items > 1
  496. end
  497. end
  498. #-----------------------------------------------------------------------------
  499. # Draw Equip Set Data
  500. #-----------------------------------------------------------------------------
  501. def draw_set_dataa(drew, pieces)
  502. return drew if pieces < 2
  503. wid = Graphics.width/2-(standard_padding)
  504. txt = ""
  505. draw_text(wid, 0+(line_height*drew), wid, line_height, "Bonuses :")
  506. return drew
  507. end
  508. #--------------------------------------------------------------------------
  509. # Draw Set Name
  510. #--------------------------------------------------------------------------
  511. def draw_set_name(set,drew)
  512. draw_text(4, 0+(line_height*drew), 240, line_height, "Set Name :")
  513. icon = set[:set_icon]
  514. draw_de_icon(icon[0], 84, 0+(line_height*drew), icon[1], icon[2])
  515. text = set[:set_name]
  516. draw_text(108, 0+(line_height*drew), 240, line_height, text)
  517. wid = (Graphics.width)-(standard_padding)
  518. drew += 1
  519. draw_text(4, 0+(line_height*drew), 240, line_height, "Set Info :")
  520. text = set[:set_info]
  521. draw_text(84, 0+(line_height*drew), wid-84, line_height, text)
  522. return drew += 1
  523. end
  524. #-----------------------------------------------------------------------------
  525. # Draw Equip Set Items
  526. #-----------------------------------------------------------------------------
  527. def draw_set_items(pos_set, drew)
  528. change_color(Text_Color::White)
  529. draw_text(4, 0+(line_height*drew), 240, line_height, "Pieces :")
  530. @actor.equips.each do |curr_eqp|
  531. next if curr_eqp == nil
  532. pos_set[1][:pieces].each do |piece|
  533. case piece[0]
  534. when :weapon
  535. next unless curr_eqp.is_a?(RPG::Weapon)
  536. next unless curr_eqp.database_id == piece[1]
  537. wid = Graphics.width/2
  538. draw_de_icon(curr_eqp.icon_index, 84, 0+(line_height*drew), 0, true)
  539. change_color(curr_eqp.item_disp_color)
  540. draw_text(84+25, 0+(line_height*drew), wid, line_height, curr_eqp.name)
  541. drew += 1
  542. when :armor
  543. next unless curr_eqp.is_a?(RPG::Armor)
  544. next unless curr_eqp.database_id == piece[1]
  545. wid = Graphics.width/2
  546. draw_de_icon(curr_eqp.icon_index, 84, 0+(line_height*drew), 0, true)
  547. change_color(curr_eqp.item_disp_color)
  548. draw_text(25+84, 0+(line_height*drew), wid, line_height, curr_eqp.name)
  549. drew += 1
  550. end
  551. end
  552. end
  553. change_color(Text_Color::White)
  554. return drew
  555. end
  556. #-----------------------------------------------------------------------------
  557. # Draw Equip Set Bonuses
  558. #-----------------------------------------------------------------------------
  559. def draw_set_bonuses(val,i,pieces,drew)
  560. wid = Graphics.width/2-(standard_padding)
  561. if val <= pieces
  562. case i[0]
  563. when :param
  564. txt = "#{Vocab::param(i[1])}"
  565. num = i[2] > 0 ? "+#{i[2]}" : "#{i[2]}"
  566. when :x_param
  567. txt = "#{Vocab::x_param(i[1])}" if $D13x[:Stats_Control]
  568. num = i[2]>0.0 ?sprintf("+%1.2f%%",i[2]*100): sprintf("%1.2f%%",i[2]*100)
  569. when :s_param
  570. txt = "#{Vocab::s_param(i[1])}" if $D13x[:Stats_Control]
  571. num = i[2]>0.0 ?sprintf("+%1.2f%%",i[2]*100): sprintf("%1.2f%%",i[2]*100)
  572. when :atk_ele
  573. txt = "#{$data_system.elements[i[1]]} Dmg Deal" if $D13x[:Elems_Control]
  574. num = i[2]>0.0 ?sprintf("+%1.2f%%",i[2]*100): sprintf("%1.2f%%",i[2]*100)
  575. when :def_ele
  576. txt = "#{$data_system.elements[i[1]]} Dmg Took" if $D13x[:Elems_Control]
  577. num = i[2]>0.0 ?sprintf("+%1.2f%%",i[2]*100): sprintf("%1.2f%%",i[2]*100)
  578. when :skill
  579. txt = "Skill : #{$data_skills[i[1]].name}"
  580. num = "" #i[2] > 0 ? "+#{i[2]}" : "-#{i[2]}"
  581. icon = $data_skills[i[1]].icon_index
  582. end
  583. if $D13x[:Status_Scene]
  584. Status_Scene::Info.each do |page|
  585. page.each do |info|
  586. info.each do |this|
  587. if (i[0] == this[0]) && (i[1] == this[1])
  588. icon = [this[3], this[4], true]
  589. end
  590. end rescue nil
  591. end
  592. end
  593. draw_de_icon(icon[0],wid+78,0+(line_height*drew),icon[1],icon[2]) if icon
  594. draw_text(wid+25+78, 0+(line_height*drew), wid, line_height, txt)
  595. draw_text(wid, 0+(line_height*drew), wid-12, line_height, num, 2)
  596. else
  597. draw_text(wid+78, 0+(line_height*drew), wid, line_height, txt)
  598. draw_text(wid, 0+(line_height*drew), wid-12, line_height, num, 2)
  599. end
  600. return drew += 1
  601. end
  602. return drew
  603. end
  604.  
  605. end
  606.  
  607. #===============================================================================
  608. class Scene_Status < Scene_MenuBase
  609. #===============================================================================
  610. #-----------------------------------------------------------------------------
  611. # Start Processing
  612. #-----------------------------------------------------------------------------
  613. alias :start_equip_set_status :start
  614. alias :oac_equip_set_status :on_actor_change
  615. alias :update_equip_set_status :update
  616. #-----------------------------------------------------------------------------
  617. # Start Processing
  618. #-----------------------------------------------------------------------------
  619. def start
  620. start_equip_set_status
  621. make_eqp_set_wind
  622. end
  623. #-----------------------------------------------------------------------------
  624. # Make Equip Set Window
  625. #-----------------------------------------------------------------------------
  626. def make_eqp_set_wind
  627. @eqp_set_window = Window_EquipSet.new(@actor)
  628. @eqp_set_window.set_handler(:cancel, method(:return_scene))
  629. @eqp_set_window.set_handler(:pagedown, method(:next_actor))
  630. @eqp_set_window.set_handler(:pageup, method(:prev_actor))
  631. @eqp_set_window.visible = false
  632. @eqp_set_window.close
  633. end
  634. #-----------------------------------------------------------------------------
  635. # Update
  636. #-----------------------------------------------------------------------------
  637. def update
  638. update_equip_set_status
  639. update_eqp_set
  640. end
  641. #-----------------------------------------------------------------------------
  642. # Update Equip Set
  643. #-----------------------------------------------------------------------------
  644. def update_eqp_set
  645. if Keys.trigger?(Keys::Key[Equip_Set::Keys[:show_sets]])
  646. if @eqp_set_window.active
  647. @eqp_set_window.deactivate
  648. @eqp_set_window.close
  649. @status_window.activate
  650. if @command_window
  651. @command_window.activate
  652. end
  653. if @status_window_II
  654. @status_window_II.open
  655. end
  656. else
  657. @status_window.deactivate
  658. @eqp_set_window.visible = true if @eqp_set_window.visible == false
  659. @eqp_set_window.activate
  660. @eqp_set_window.open
  661. if @command_window
  662. @command_window.deactivate
  663. end
  664. if @status_window_II
  665. @status_window_II.close
  666. end
  667. end
  668. end
  669. if @eqp_set_window.active
  670. if Keys.trigger?(Keys::Key[Equip_Set::Keys[:scroll_dn]])
  671. @eqp_set_window.scroll_down
  672. end
  673. if Keys.trigger?(Keys::Key[Equip_Set::Keys[:scroll_up]])
  674. @eqp_set_window.scroll_up
  675. end
  676. end
  677. end
  678. #--------------------------------------------------------------------------
  679. # Change Actors
  680. #--------------------------------------------------------------------------
  681. def on_actor_change
  682. oac_equip_set_status
  683. change_equip_wind_actor
  684. end
  685. #--------------------------------------------------------------------------
  686. # Change Actors ( Equip Window )
  687. #--------------------------------------------------------------------------
  688. def change_equip_wind_actor
  689. if @eqp_set_window.active
  690. @eqp_set_window.actor = @actor
  691. @eqp_set_window.refresh
  692. end
  693. end
  694.  
  695. end
  696.  
  697. #==============================================================================#
  698. # http://dekitarpg.wordpress.com/ #
  699. #==============================================================================#
  700. end # if true # << Make true to use this script, false to disable.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement