Advertisement
Dekita

Untitled

Apr 21st, 2014
430
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 31.37 KB | None | 0 0
  1. if true # << Make true to use this script, false to disable.
  2. #===============================================================================
  3. #
  4. # ☆ $D13x - Epic Data Popups
  5. # -- Author : Dekita
  6. # -- Version : 1.1
  7. # -- Level : Easy / Normal
  8. # -- Requires : N/A
  9. # -- Engine : RPG Maker VX Ace.
  10. #
  11. #===============================================================================
  12. # ☆ Import
  13. #-------------------------------------------------------------------------------
  14. $D13x={}if$D13x==nil
  15. $D13x[:Epic_Popups]=true
  16. #===============================================================================
  17. # ☆ Updates
  18. #-------------------------------------------------------------------------------
  19. # D /M /Y
  20. # 21/o4/2o14 - Update for custom popups,
  21. # ??/??/2o13 - Started, Finished,
  22. #
  23. #===============================================================================
  24. # ☆ Introduction
  25. #-------------------------------------------------------------------------------
  26. # This script creates some cool popups for the main party leader.
  27. #
  28. # Pops shows are things like; exp gained, level up, SP pts gained, DP pts gained,
  29. # mhp, mmp and params.
  30. #
  31. # VERY helpful for any ABS.
  32. #
  33. #===============================================================================
  34. # ★☆★☆★☆★☆★☆★☆★☆★ TERMS AND CONDITIONS: ☆★☆★☆★☆★☆★☆★☆★☆★☆
  35. #===============================================================================
  36. # 1. You MUST give credit to "Dekita" !!
  37. # 2. You are NOT allowed to repost this script.(or modified versions)
  38. # 3. You are NOT allowed to convert this script.
  39. # 4. You are NOT allowed to use this script for Commercial games.
  40. # 5. ENJOY!
  41. #
  42. # "FINE PRINT"
  43. # By using this script you hereby agree to the above terms and conditions,
  44. # if any violation of the above terms occurs "legal action" may be taken.
  45. # Not understanding the above terms and conditions does NOT mean that
  46. # they do not apply to you.
  47. # If you wish to discuss the terms and conditions in further detail you can
  48. # contact me at http://dekitarpg.wordpress.com/
  49. #
  50. #===============================================================================
  51. # ☆ Instructions
  52. #-------------------------------------------------------------------------------
  53. # Place Below " ▼ Materials " and Above " ▼ Main " in your script editor.
  54. #
  55. #===============================================================================
  56. # ☆ Script Calls
  57. #-------------------------------------------------------------------------------
  58. # $game_temp.show_data_pops
  59. # ^- Ensures data popups are shown.
  60. #
  61. # $game_temp.hide_data_pops
  62. # ^- Ensures data popups are now shown.
  63. #
  64. # $game_temp.alt_data_pops
  65. # ^- alternates hide / show data pops
  66. #
  67. # $game_temp.data_pops_on?
  68. # ^- Returns true / false depending on whether data pops are being shown.
  69. #
  70. # $game_temp.custom_pop.set(name,icon,ihue,colo,valu)
  71. # ^- Popup Custom Data
  72. # --
  73. # Example:
  74. # n = "Coolness"
  75. # i = 994
  76. # h = 0
  77. # c = Text_Color::Gold
  78. # v = 20
  79. # $game_temp.custom_pop.set(n,i,h,c,v)
  80. #
  81. #===============================================================================
  82. # ☆ Notetags ( default )
  83. #-------------------------------------------------------------------------------
  84. # N/A
  85. #
  86. #===============================================================================
  87. # ☆ HELP
  88. #-------------------------------------------------------------------------------
  89. # N/A
  90. #
  91. #===============================================================================
  92. module Data_Popups
  93. #===============================================================================
  94. #-----------------------------------------------------------------------------
  95. #
  96. #-----------------------------------------------------------------------------
  97. Show_on_Map = true
  98. Show_in_Battle = true
  99. #-----------------------------------------------------------------------------
  100. # Position after offset slide.
  101. #-----------------------------------------------------------------------------
  102. X_Pos = 542 # X Position
  103. Y_Pos = 360 # Y Position
  104. #-----------------------------------------------------------------------------
  105. # Offset Slide happens before the item fadeout
  106. #-----------------------------------------------------------------------------
  107. X_Offset = -60 # X Slide
  108. Y_Offset = -40 # Y Slide
  109. #-----------------------------------------------------------------------------
  110. # Move happens during the item fadeout
  111. #-----------------------------------------------------------------------------
  112. X_Move = 0 # X Move Speed
  113. Y_Move = -1 # Y Move Speed
  114. #-----------------------------------------------------------------------------
  115. #
  116. #-----------------------------------------------------------------------------
  117. Init_Opacity = 0
  118. Fade_Speed = 2.5
  119. #-----------------------------------------------------------------------------
  120. # Z Value
  121. #-----------------------------------------------------------------------------
  122. Authority = 100
  123. #-----------------------------------------------------------------------------
  124. #
  125. #-----------------------------------------------------------------------------
  126. Font = ["Gabrielle", "VL Gothic", "Arial"]
  127. Font_Size = 16
  128. Font_Bold = true
  129. Font_Italic = false
  130. Value_Size = 12
  131. #-----------------------------------------------------------------------------
  132. #
  133. #-----------------------------------------------------------------------------
  134. Gold_Icon = [361,0] # [icon index, hue]
  135. Gold_Color = Text_Color::Gold
  136. #-----------------------------------------------------------------------------
  137. # :data => [show]
  138. #-----------------------------------------------------------------------------
  139. Settings ={
  140. :exp => [true],
  141. :level => [true],
  142. :dp => [true],
  143. :sp => [true],
  144. :mhp => [true],
  145. :mmp => [true],
  146. :mtp => [true],
  147. :params => [true],
  148. }
  149. #-----------------------------------------------------------------------------
  150. # = ['Name' , icon, hue, Text Color::Color , show_gain]
  151. #-----------------------------------------------------------------------------
  152. Level = ['Level', 97, 0, Text_Color::Green , true]
  153. DP = ['DP' , 97, 0, Text_Color::Gold , true]
  154. SP = ['SP' , 97, 0, Text_Color::Turquoise , true]
  155. #####################
  156. # CUSTOMISATION END #
  157. end #####################
  158. #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★#
  159. # #
  160. # http://dekitarpg.wordpress.com/ #
  161. # #
  162. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆#
  163. #===============================================================================#
  164. # ARE YOU MODIFYING BEYOND THIS POINT? \.\. #
  165. # YES?\.\. #
  166. # OMG, REALLY? \| #
  167. # WELL SLAP MY FACE AND CALL ME A DRAGONITE.\..\.. #
  168. # I REALLY DIDN'T THINK YOU HAD IT IN YOU.\..\.. #
  169. #===============================================================================#
  170. class Game_Temp
  171. #===============================================================================
  172. #-----------------------------------------------------------------------------
  173. #
  174. #-----------------------------------------------------------------------------
  175. attr_accessor :custom_pop
  176. #-----------------------------------------------------------------------------
  177. #
  178. #-----------------------------------------------------------------------------
  179. alias :init_datapops :initialize
  180. #-----------------------------------------------------------------------------
  181. #
  182. #-----------------------------------------------------------------------------
  183. def initialize
  184. @can_data_pop = true
  185. @custom_pop = Custom_Pops.new
  186. init_datapops
  187. end
  188. #-----------------------------------------------------------------------------
  189. #
  190. #-----------------------------------------------------------------------------
  191. def data_pops_on?
  192. @can_data_pop
  193. end
  194. #-----------------------------------------------------------------------------
  195. #
  196. #-----------------------------------------------------------------------------
  197. def show_data_pops
  198. @can_data_pop = true
  199. end
  200. #-----------------------------------------------------------------------------
  201. #
  202. #-----------------------------------------------------------------------------
  203. def hide_data_pops
  204. @can_data_pop = false
  205. end
  206. #-----------------------------------------------------------------------------
  207. #
  208. #-----------------------------------------------------------------------------
  209. def alt_data_pops
  210. @can_data_pop = !@can_data_pop
  211. end
  212. end
  213. #===============================================================================
  214. class All_De_Pops
  215. #===============================================================================
  216. #-----------------------------------------------------------------------------
  217. #
  218. #-----------------------------------------------------------------------------
  219. attr_reader :name
  220. attr_reader :icon_hue
  221. attr_reader :icon_index
  222. attr_reader :item_disp_color
  223. end
  224. #===============================================================================
  225. class Custom_Pops < All_De_Pops
  226. #===============================================================================
  227. #-----------------------------------------------------------------------------
  228. #
  229. #-----------------------------------------------------------------------------
  230. attr_accessor :active
  231. attr_reader :value
  232. #-----------------------------------------------------------------------------
  233. #
  234. #-----------------------------------------------------------------------------
  235. def initialize
  236. reset
  237. end
  238. #-----------------------------------------------------------------------------
  239. #
  240. #-----------------------------------------------------------------------------
  241. def reset
  242. @name = ''
  243. @icon_hue = 0
  244. @icon_index = 0
  245. @item_disp_color = Text_Color::White
  246. @value = nil
  247. @active = false
  248. end
  249. #-----------------------------------------------------------------------------
  250. #
  251. #-----------------------------------------------------------------------------
  252. def set(name,icon,ihue,colo,valu)
  253. @name = name
  254. @icon_hue = ihue
  255. @icon_index = icon
  256. @item_disp_color = colo
  257. @value = valu
  258. @active = true
  259. end
  260. end
  261. #===============================================================================
  262. class Popup_Level < All_De_Pops
  263. #===============================================================================
  264. #-----------------------------------------------------------------------------
  265. #
  266. #-----------------------------------------------------------------------------
  267. def initialize
  268. @name = Data_Popups::Level[0]
  269. @icon_hue = Data_Popups::Level[2]
  270. @icon_index = Data_Popups::Level[1]
  271. @item_disp_color = Data_Popups::Level[3]
  272. end
  273. end
  274. #===============================================================================
  275. class Popup_DP < All_De_Pops
  276. #===============================================================================
  277. #-----------------------------------------------------------------------------
  278. #
  279. #-----------------------------------------------------------------------------
  280. def initialize
  281. @name = Data_Popups::DP[0]
  282. @icon_hue = Data_Popups::DP[2]
  283. @icon_index = Data_Popups::DP[1]
  284. @item_disp_color = Data_Popups::DP[3]
  285. end
  286. end
  287. #===============================================================================
  288. class Popup_SP < All_De_Pops
  289. #===============================================================================
  290. #-----------------------------------------------------------------------------
  291. #
  292. #-----------------------------------------------------------------------------
  293. def initialize
  294. @name = Data_Popups::SP[0]
  295. @icon_hue = Data_Popups::SP[2]
  296. @icon_index = Data_Popups::SP[1]
  297. @item_disp_color = Data_Popups::SP[3]
  298. end
  299. end
  300. #===============================================================================
  301. class Popup_Custom < All_De_Pops
  302. #===============================================================================
  303. #-----------------------------------------------------------------------------
  304. #
  305. #-----------------------------------------------------------------------------
  306. def initialize
  307. @name = $game_temp.custom_pop.name
  308. @icon_hue = $game_temp.custom_pop.icon_hue
  309. @icon_index = $game_temp.custom_pop.icon_index
  310. @item_disp_color = $game_temp.custom_pop.item_disp_color
  311. end
  312. end
  313. #===============================================================================
  314. class Popup_Statistic < All_De_Pops
  315. #===============================================================================
  316. #-----------------------------------------------------------------------------
  317. #
  318. #-----------------------------------------------------------------------------
  319. def initialize(type,id)
  320. case type
  321. when :params then stat = Vocanicon.param(id)
  322. when :xparams then stat = Vocanicon.xparam(id)
  323. when :sparams then stat = Vocanicon.sparam(id)
  324. when :max_tp then stat = Vocanicon::TP
  325. when :exp then stat = Vocanicon::Exp
  326. end
  327. @name = stat[0]
  328. if (type == :params) && (id == 0 || 1 || 2 ) || (type == :max_tp)
  329. @name = "Max " + stat[0]
  330. end
  331. @icon_hue = stat[3]
  332. @icon_index = stat[2]
  333. @item_disp_color = stat[1]
  334. end
  335. end
  336. #===============================================================================
  337. class Epic_Pop_Data
  338. #===============================================================================
  339. #-----------------------------------------------------------------------------
  340. #
  341. #-----------------------------------------------------------------------------
  342. def initialize
  343. @timer_d = 24
  344. @timer = 0
  345. @actor = $game_party.leader
  346. @exp = @actor.exp
  347. @level = @actor.level
  348. @points = @actor.points
  349. @sklpts = @actor.skill_points
  350. @mhp = @actor.mhp
  351. @mmp = @actor.mmp
  352. @mtp = @actor.maximum_tp
  353. @params = []
  354. 6.times do |i|
  355. @params[i] = @actor.param(i+2)
  356. end
  357. end
  358. #-----------------------------------------------------------------------------
  359. #
  360. #-----------------------------------------------------------------------------
  361. def update
  362. @timer -= 1
  363. return if @timer > 0
  364. @timer = @timer_d
  365. return if update_custom
  366. if Data_Popups::Settings[:exp][0]
  367. return if update_exp
  368. end
  369. if Data_Popups::Settings[:level][0]
  370. return if update_level
  371. end
  372. if Data_Popups::Settings[:dp][0]
  373. return if update_points
  374. end
  375. if Data_Popups::Settings[:sp][0]
  376. return if update_sklpts
  377. end
  378. if Data_Popups::Settings[:mhp][0]
  379. return if update_mhp
  380. end
  381. if Data_Popups::Settings[:mmp][0]
  382. return if update_mmp
  383. end
  384. if Data_Popups::Settings[:mtp][0]
  385. return if update_mtp
  386. end
  387. if Data_Popups::Settings[:params][0]
  388. return if update_params
  389. end
  390. end
  391. #-----------------------------------------------------------------------------
  392. #
  393. #-----------------------------------------------------------------------------
  394. def update_custom
  395. return false unless $game_temp.custom_pop.active
  396. make_popup(:custom,nil,$game_temp.custom_pop.value)
  397. $game_temp.custom_pop.reset
  398. return true
  399. end
  400. #-----------------------------------------------------------------------------
  401. #
  402. #-----------------------------------------------------------------------------
  403. def update_exp
  404. return false unless @exp != @actor.exp
  405. gain = @actor.exp-@exp
  406. # gain = nil unless Data_Popups::Level[4]
  407. make_popup(:exp,nil,gain.to_i)
  408. @exp = @actor.exp
  409. return true
  410. end
  411. #-----------------------------------------------------------------------------
  412. #
  413. #-----------------------------------------------------------------------------
  414. def update_level
  415. return false unless @level != @actor.level
  416. gain = @actor.level-@level
  417. gain = nil unless Data_Popups::Level[4]
  418. make_popup(:level,nil,gain.to_i)
  419. @level = @actor.level
  420. @exp = @actor.exp
  421. return true
  422. end
  423. #-----------------------------------------------------------------------------
  424. #
  425. #-----------------------------------------------------------------------------
  426. def update_points
  427. return false unless @points != @actor.points
  428. gain = @actor.points-@points
  429. gain = nil unless Data_Popups::DP[4]
  430. make_popup(:points,nil,gain.to_i)
  431. @points = @actor.points
  432. return true
  433. end
  434. #-----------------------------------------------------------------------------
  435. #
  436. #-----------------------------------------------------------------------------
  437. def update_sklpts
  438. return false unless @sklpts != @actor.skill_points
  439. gain = @actor.skill_points-@sklpts
  440. make_popup(:sklpts,nil,gain.to_i)
  441. @sklpts = @actor.skill_points
  442. return true
  443. end
  444. #-----------------------------------------------------------------------------
  445. #
  446. #-----------------------------------------------------------------------------
  447. def update_mhp
  448. return false unless @mhp != @actor.mhp
  449. gain = @actor.mhp-@mhp
  450. make_popup(:params,0,gain.to_i)
  451. @mhp = @actor.mhp
  452. return true
  453. end
  454. #-----------------------------------------------------------------------------
  455. #
  456. #-----------------------------------------------------------------------------
  457. def update_mmp
  458. return false unless @mmp != @actor.mmp
  459. gain = @actor.mmp-@mmp
  460. make_popup(:params,1,gain.to_i)
  461. @mmp = @actor.mmp
  462. return true
  463. end
  464. #-----------------------------------------------------------------------------
  465. #
  466. #-----------------------------------------------------------------------------
  467. def update_mtp
  468. return false unless @mtp != @actor.maximum_tp
  469. gain = @actor.maximum_tp-@mtp
  470. make_popup(:max_tp,0,gain.to_i)
  471. @mtp = @actor.maximum_tp
  472. return true
  473. end
  474. #-----------------------------------------------------------------------------
  475. #
  476. #-----------------------------------------------------------------------------
  477. def update_params
  478. return_val = true
  479. 6.times do |i|
  480. next unless return_val
  481. next unless @params[i] != @actor.param(i+2)
  482. gain = @actor.param(i+2)-@params[i]
  483. make_popup(:params,i+2,gain.to_i)
  484. @params[i] = @actor.param(i+2)
  485. return_val = false
  486. end
  487. return return_val
  488. end
  489. #-----------------------------------------------------------------------------
  490. #
  491. #-----------------------------------------------------------------------------
  492. def make_popup(type,id,value)
  493. return unless $game_temp.item_pops_on?
  494. case type
  495. when :level then item = Popup_Level.new
  496. when :points then item = Popup_DP.new
  497. when :sklpts then item = Popup_SP.new
  498. when :params, :max_tp, :exp
  499. item = Popup_Statistic.new(type,id)
  500. when :custom then item = Popup_Custom.new
  501. end
  502. return unless item
  503. # play_pop_noise(type)
  504. display_popup(item,value)
  505. end
  506. #-----------------------------------------------------------------------------
  507. #
  508. #-----------------------------------------------------------------------------
  509. def play_pop_noise(type)
  510. v = Item_Popping::Sound_Fx[type]
  511. Audio.se_play("Audio\\SE\\#{v[0]}",v[1],v[2])
  512. end
  513. #-----------------------------------------------------------------------------
  514. #
  515. #-----------------------------------------------------------------------------
  516. def display_popup(item,value)
  517. SceneManager.scene.spriteset.init_data_popups(item,value)
  518. end
  519. end
  520. #===============================================================================
  521. class Sprite_PopData < Sprite
  522. #===============================================================================
  523. #-----------------------------------------------------------------------------
  524. #
  525. #-----------------------------------------------------------------------------
  526. attr_reader :finished
  527. #-----------------------------------------------------------------------------
  528. # Initialize
  529. #-----------------------------------------------------------------------------
  530. def initialize(vp=nil,item=nil,amo=0)
  531. super(vp)
  532. self.x = Data_Popups::X_Pos - Data_Popups::X_Offset
  533. self.y = Data_Popups::Y_Pos - Data_Popups::Y_Offset
  534. self.opacity = Data_Popups::Init_Opacity
  535. self.bitmap = Bitmap.new(152,24)
  536. self.z = 300
  537. init_icon(item.icon_index,item.icon_hue)
  538. init_text(item)
  539. init_amount(item,amo)
  540. @starting = true
  541. @finished = false
  542. end
  543. #-----------------------------------------------------------------------------
  544. #
  545. #-----------------------------------------------------------------------------
  546. def init_icon(icon=0,hue=0)
  547. @icon = Cache.icon(IconEvents::Set,hue)
  548. rect = Rect.new(icon % 16 * 24, icon / 16 * 24, 24, 24)
  549. self.bitmap.blt(0, 0, @icon, rect)
  550. @icon.dispose
  551. @icon = nil
  552. end
  553. #-----------------------------------------------------------------------------
  554. #
  555. #-----------------------------------------------------------------------------
  556. def init_text(item)
  557. x = item.icon_index != 0 ? 24 : 0
  558. self.bitmap.font.name = Data_Popups::Font
  559. self.bitmap.font.size = Data_Popups::Font_Size
  560. self.bitmap.font.bold = Data_Popups::Font_Bold
  561. self.bitmap.font.italic = Data_Popups::Font_Italic
  562. self.bitmap.font.color = item.item_disp_color
  563. self.bitmap.draw_text(x,-2,128,24, item.name)
  564. end
  565. #-----------------------------------------------------------------------------
  566. #
  567. #-----------------------------------------------------------------------------
  568. def init_amount(item,amount)
  569. x = item.icon_index != 0 ? 20 : 0
  570. return unless amount
  571. self.bitmap.font.name = Data_Popups::Font
  572. self.bitmap.font.size = Data_Popups::Value_Size
  573. self.bitmap.font.bold = Data_Popups::Font_Bold
  574. self.bitmap.font.italic = Data_Popups::Font_Italic
  575. self.bitmap.font.color = item.item_disp_color
  576. amount > 0 ? amount = "+#{amount}" : "-#{amount}"
  577. self.bitmap.draw_text(x,8,128,24,amount)
  578. end
  579. #-----------------------------------------------------------------------------
  580. # Dispose
  581. #-----------------------------------------------------------------------------
  582. def dispose
  583. super
  584. if self.bitmap != nil
  585. self.bitmap.dispose
  586. end
  587. end
  588. #-----------------------------------------------------------------------------
  589. # Update
  590. #-----------------------------------------------------------------------------
  591. def update
  592. super
  593. if @starting
  594. self.x += 1 if self.x < Data_Popups::X_Pos
  595. self.y += 1 if self.y < Data_Popups::Y_Pos
  596. self.x -= 1 if self.x > Data_Popups::X_Pos
  597. self.y -= 1 if self.y > Data_Popups::Y_Pos
  598. else
  599. self.x += Data_Popups::X_Move
  600. self.y += Data_Popups::Y_Move
  601. end
  602. if @starting
  603. self.opacity += (Data_Popups::Fade_Speed*2)
  604. @starting = false if self.opacity >= 255
  605. else
  606. self.opacity -= Data_Popups::Fade_Speed
  607. if self.opacity <= 0
  608. @finished = true
  609. end
  610. end
  611. end
  612. end
  613. #===============================================================================
  614. module Spriteset_DataPopup
  615. #===============================================================================
  616. #-----------------------------------------------------------------------------
  617. #
  618. #-----------------------------------------------------------------------------
  619. def load_datapop_data
  620. disp_data_popups
  621. @data_pops = []
  622. @datapopup_vp = Viewport.new(0,0,152, Graphics.height)
  623. @datapopup_vp.z = Data_Popups::Authority
  624. end
  625. #-----------------------------------------------------------------------------
  626. #
  627. #-----------------------------------------------------------------------------
  628. def init_data_popups(item,amo=0)
  629. return unless amo != 0
  630. @data_pops << Sprite_PopData.new(@datapopup_vp,item,amo)
  631. end
  632. #-----------------------------------------------------------------------------
  633. #
  634. #-----------------------------------------------------------------------------
  635. def disp_data_popups
  636. return unless @data_pops
  637. @data_pops.each do |i|
  638. next unless i.disposed?
  639. i.dispose
  640. @data_pops.delete(i)
  641. end
  642. @datapopup_vp.dispose
  643. end
  644. #-----------------------------------------------------------------------------
  645. #
  646. #-----------------------------------------------------------------------------
  647. def updt_data_popups
  648. return load_datapop_data unless @data_pops
  649. @data_pops.each do |i|
  650. next if i.disposed?
  651. i.update
  652. i.dispose if i.finished
  653. end
  654. end
  655. end
  656. #===============================================================================
  657. module Spriteset_DataPopup
  658. #===============================================================================
  659. def load_datapop_data
  660. disp_data_popups
  661. @data_pops = []
  662. # @datapopup_vp = Viewport.new(0,0,152, Graphics.height)
  663. # @datapopup_vp.z = Data_Popups::Authority
  664. end
  665. #-----------------------------------------------------------------------------
  666. #
  667. #-----------------------------------------------------------------------------
  668. def init_data_popups(item,amo=0)
  669. return unless amo != 0
  670. @data_pops << Sprite_PopData.new(@deki_vp,item,amo)
  671. end
  672. #-----------------------------------------------------------------------------
  673. #
  674. #-----------------------------------------------------------------------------
  675. def disp_data_popups
  676. return unless @data_pops
  677. @data_pops.each do |i|
  678. next unless i.disposed?
  679. i.dispose
  680. @data_pops.delete(i)
  681. end
  682. # @datapopup_vp.dispose
  683. end
  684. #-----------------------------------------------------------------------------
  685. #
  686. #-----------------------------------------------------------------------------
  687. def updt_data_popups
  688. return load_datapop_data unless @data_pops
  689. @data_pops.each do |i|
  690. next if i.disposed?
  691. i.update
  692. i.dispose if i.finished
  693. end
  694. end
  695. end
  696. #===============================================================================
  697. module Spriteset_DataPop
  698. #===============================================================================
  699. #-----------------------------------------------------------------------------
  700. #
  701. #-----------------------------------------------------------------------------
  702. include Spriteset_DataPopup
  703. #-----------------------------------------------------------------------------
  704. # Initialize
  705. #-----------------------------------------------------------------------------
  706. def init_datapop
  707. @data_pop = Epic_Pop_Data.new
  708. load_datapop_data
  709. end
  710. #-----------------------------------------------------------------------------
  711. # Dispose
  712. #-----------------------------------------------------------------------------
  713. def disp_datapop
  714. disp_data_popups
  715. end
  716. #-----------------------------------------------------------------------------
  717. # Update
  718. #-----------------------------------------------------------------------------
  719. def updt_datapop
  720. updt_data_popups
  721. @data_pop.update
  722. end
  723. end
  724. #===============================================================================
  725. class Spriteset_Map
  726. #===============================================================================
  727. #-----------------------------------------------------------------------------
  728. # Included Modules
  729. #-----------------------------------------------------------------------------
  730. include Spriteset_DataPop
  731. #-----------------------------------------------------------------------------
  732. # Alias List
  733. #-----------------------------------------------------------------------------
  734. alias :init_otherpop :initialize
  735. alias :disp_otherpop :dispose
  736. alias :updt_otherpop :update
  737. #-----------------------------------------------------------------------------
  738. # Initialize
  739. #-----------------------------------------------------------------------------
  740. def initialize
  741. init_datapop if Data_Popups::Show_on_Map
  742. init_otherpop
  743. end
  744. #-----------------------------------------------------------------------------
  745. # Dispose
  746. #-----------------------------------------------------------------------------
  747. def dispose
  748. disp_datapop if Data_Popups::Show_on_Map
  749. disp_otherpop
  750. end
  751. #-----------------------------------------------------------------------------
  752. # Update
  753. #-----------------------------------------------------------------------------
  754. def update
  755. updt_datapop if Data_Popups::Show_on_Map
  756. updt_otherpop
  757. end
  758. end
  759. #===============================================================================
  760. class Spriteset_Battle
  761. #===============================================================================
  762. #-----------------------------------------------------------------------------
  763. # Included Modules
  764. #-----------------------------------------------------------------------------
  765. include Spriteset_DataPop
  766. #-----------------------------------------------------------------------------
  767. # Alias List
  768. #-----------------------------------------------------------------------------
  769. alias :init_otherpop :initialize
  770. alias :disp_otherpop :dispose
  771. alias :updt_otherpop :update
  772. #-----------------------------------------------------------------------------
  773. # Initialize
  774. #-----------------------------------------------------------------------------
  775. def initialize
  776. init_datapop if Data_Popups::Show_in_Battle
  777. init_otherpop
  778. end
  779. #-----------------------------------------------------------------------------
  780. # Dispose
  781. #-----------------------------------------------------------------------------
  782. def dispose
  783. disp_datapop if Data_Popups::Show_in_Battle
  784. disp_otherpop
  785. end
  786. #-----------------------------------------------------------------------------
  787. # Update
  788. #-----------------------------------------------------------------------------
  789. def update
  790. updt_datapop if Data_Popups::Show_in_Battle
  791. updt_otherpop
  792. end
  793. end
  794. #==============================================================================#
  795. # http://dekitarpg.wordpress.com/ #
  796. #==============================================================================#
  797. end # if true # << Make true to use this script, false to disable.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement