Advertisement
Dekita

status1.5

Mar 29th, 2014
835
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 18.81 KB | None | 0 0
  1. if true # << Make true to use this script, false to disable.
  2. #===============================================================================
  3. #
  4. # ☆ $D13x - Status Scene
  5. # -- Author : Dekita
  6. # -- Version : 1.5
  7. # -- Level : Easy / Normal
  8. # -- Requires : $D13x Core v 1.3+
  9. # -- Engine : RPG Maker VX Ace.
  10. #
  11. #===============================================================================
  12. # ☆ Import
  13. #-------------------------------------------------------------------------------
  14. $D13x={}if$D13x==nil
  15. $D13x[:Status_Scene]=true
  16. #===============================================================================
  17. # ☆ Updates
  18. #-------------------------------------------------------------------------------
  19. # D /M /Y
  20. # 28/o3/2o14 - Small update,
  21. # 2o/o5/2o13 - Compatability, ($D13x Atk & Def Lvs)
  22. # o5/o5/2o13 - Compatibility, (Equip Sets)
  23. # 27/o3/2o13 - Added Icons w/Hue,
  24. # - Bugfix, (crash when no equip)
  25. # 26/o3/2o13 - Started, Finished,
  26. #
  27. #===============================================================================
  28. # ☆ Introduction
  29. #-------------------------------------------------------------------------------
  30. # This script simply allows more control over the status screen, as well as
  31. # shows pretty colors for each equipment item / statistic :p
  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. # Place Under My $D13x - Core Script.
  55. #
  56. #===============================================================================
  57. # ☆ HELP
  58. #-------------------------------------------------------------------------------
  59. # PARAMS : # XPARAMS : # SPARAMS : #
  60. # stat = id # stat = id # stat = id #
  61. # mhp = 0 # hit = 0 # tgr = 0 #
  62. # mmp = 1 # eva = 1 # grd = 1 #
  63. # atk = 2 # cri = 2 # rec = 2 #
  64. # def = 3 # cev = 3 # pha = 3 #
  65. # mat = 4 # mev = 4 # mcr = 4 #
  66. # mdf = 5 # mrf = 5 # tcr = 5 #
  67. # agi = 6 # cnt = 6 # pdr = 6 #
  68. # luk = 7 # hrg = 7 # mdr = 7 #
  69. # # mrg = 8 # fdr = 8 #
  70. # # trg = 9 # exr = 9 #
  71. #-------------------------------------------------------------------------------
  72. # Also, element id numbers can be found in the database.
  73. #===============================================================================
  74. module Status_sD13x
  75. #===============================================================================
  76. #-----------------------------------------------------------------------------
  77. # Command Settings
  78. #-----------------------------------------------------------------------------
  79. Commands=[
  80. [:equip, "Equip"],
  81. [:distr, "Distribute"],
  82. [:skill, "Skills"],
  83. [:sklup, "Skill Tree"],
  84. ]
  85. #-----------------------------------------------------------------------------
  86. # Begin Info Hash.
  87. #-----------------------------------------------------------------------------
  88. # [:header, "FOR DISPLAYING TEXT LIKE THIS" , icon, hue],
  89. # [:param, param_id],
  90. # [:x_param, xparam_id],
  91. # [:s_param, sparam_id],
  92. # [:atk_ele, element_id],
  93. # [:def_ele, element_id],
  94. # [:atk_lev],
  95. # [:def_lev],
  96. # [:tp_info],
  97. # [:spds_stat, 0],
  98. #-----------------------------------------------------------------------------
  99. Info={
  100. 0=>[
  101. [:param, 0],
  102. [:param, 1],
  103. [:tp_info],
  104. [:spds_stat, 0],
  105. [:spds_stat, 1],
  106. [:spds_stat, 2],
  107. [:spds_stat, 3],
  108. [:x_param, 7],
  109. [:x_param, 8],
  110. [:atk_lev],
  111. [:def_lev],
  112. ],
  113. 1=>[
  114. [:atk_lev],
  115. [:def_lev],
  116. [:param, 2],
  117. [:param, 3],
  118. [:s_param, 6],
  119. [:param, 4],
  120. [:param, 5],
  121. [:s_param, 7],
  122. [:s_param, 1],
  123. ],
  124. 2=>[
  125. [:x_param, 0],
  126. [:x_param, 2],
  127. [:x_param, 1],
  128. [:x_param, 3],
  129. [:x_param, 4],
  130. [:x_param, 5],
  131. [:x_param, 6],
  132. [:s_param, 2],
  133. [:s_param, 3],
  134. ],
  135. 3=>[
  136. [:atk_ele, 1],
  137. [:atk_ele, 3],
  138. [:atk_ele, 4],
  139. [:atk_ele, 5],
  140. [:atk_ele, 6],
  141. [:atk_ele, 7],
  142. [:atk_ele, 8],
  143. [:atk_ele, 9],
  144. [:atk_ele, 10],
  145. ],
  146. 4=>[
  147. [:def_ele, 1],
  148. [:def_ele, 3],
  149. [:def_ele, 4],
  150. [:def_ele, 5],
  151. [:def_ele, 6],
  152. [:def_ele, 7],
  153. [:def_ele, 8],
  154. [:def_ele, 9],
  155. [:def_ele, 10],
  156. ],
  157. 5=>[
  158. [:header, "Extra Stats", Text_Color::White,0,0,1],
  159. ],
  160. } # << End Page's Settings
  161. #-----------------------------------------------------------------------------
  162. # Max Pages To Show, Never Have Below 1.
  163. #-----------------------------------------------------------------------------
  164. Max_Pages = 5
  165. end #####################
  166. # CUSTOMISATION END #
  167. #####################
  168. #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★#
  169. # #
  170. # http://dekitarpg.wordpress.com/ #
  171. # #
  172. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆#
  173. #===============================================================================#
  174. # ARE YOU MODIFYING BEYOND THIS POINT? \.\. #
  175. # YES?\.\. #
  176. # OMG, REALLY? \| #
  177. # WELL SLAP MY FACE AND CALL ME A DRAGONITE.\..\.. #
  178. # I REALLY DIDN'T THINK YOU HAD IT IN YOU.\..\.. #
  179. #===============================================================================#
  180. class Window_StatusCommand < Window_Command
  181. #===============================================================================
  182. #-----------------------------------------------------------------------------
  183. #
  184. #-----------------------------------------------------------------------------
  185. def initialize
  186. super(0,0)
  187. end
  188. #-----------------------------------------------------------------------------
  189. #
  190. #-----------------------------------------------------------------------------
  191. def window_width
  192. return Graphics.width/4
  193. end
  194. #-----------------------------------------------------------------------------
  195. #
  196. #-----------------------------------------------------------------------------
  197. def visible_line_number
  198. return 2
  199. end
  200. #-----------------------------------------------------------------------------
  201. #
  202. #-----------------------------------------------------------------------------
  203. def make_command_list
  204. Status_sD13x::Commands.each do |command|
  205. case command[0]
  206. when :distr then next unless $D13x[:ISPDS]
  207. when :sklup then next unless $D13x[:SUG]
  208. end
  209. add_command(command[1], command[0])
  210. end
  211. end
  212. #-----------------------------------------------------------------------------
  213. # Set Windowskin (overwrite from super)
  214. #-----------------------------------------------------------------------------
  215. def set_the_skin
  216. @skin = WindowSkins::Skins[:status_command]
  217. end
  218. end
  219. #===============================================================================
  220. class Window_StatusStatus < Window_StatusDekita
  221. #===============================================================================
  222. #-----------------------------------------------------------------------------
  223. # Set Windowskin (overwrite from super)
  224. #-----------------------------------------------------------------------------
  225. def set_the_skin
  226. @skin = WindowSkins::Skins[:window_status]
  227. end
  228. end
  229. #===============================================================================
  230. class Window_StatusStatusMain < Dekita_Core_Status
  231. #===============================================================================
  232. #-----------------------------------------------------------------------------
  233. # Initialization
  234. #-----------------------------------------------------------------------------
  235. def initialize(actor,y)
  236. x = Graphics.width/2
  237. w = Graphics.width/2
  238. h = Graphics.height-y
  239. super(x, y, w, h, actor)
  240. self.opacity = 255
  241. end
  242. #-----------------------------------------------------------------------------
  243. # Get Setup Info
  244. #-----------------------------------------------------------------------------
  245. def setup_info
  246. return Status_sD13x::Info[@page]
  247. end
  248. #-----------------------------------------------------------------------------
  249. # Set Windowskin (overwrite from super)
  250. #-----------------------------------------------------------------------------
  251. def set_the_skin
  252. @skin = WindowSkins::Skins[:window_status_II]
  253. end
  254. end
  255. #===============================================================================
  256. class Window_StatusEquipSlot < Window_EquipSlot
  257. #===============================================================================
  258. #-----------------------------------------------------------------------------
  259. # Draw Box
  260. #-----------------------------------------------------------------------------
  261. def draw_box(x,y,w)
  262. contents.fill_rect(x,y+1,w,line_height-2,General::Box_Color)
  263. end
  264. #--------------------------------------------------------------------------
  265. # * Draw Item
  266. #--------------------------------------------------------------------------
  267. def draw_item(index)
  268. return unless @actor
  269. rect = item_rect_for_text(index)
  270. item = @actor.equips[index]
  271. draw_box(rect.x-2,rect.y,42)
  272. draw_box(rect.x+42,rect.y,rect.width-40)
  273. change_color(Text_Color::White, enable?(index))
  274. draw_text(rect.x+2, rect.y, 92, line_height, slot_name(index) + ':')
  275. draw_item_name(item, rect.x + 44, rect.y, enable?(index))
  276. draw_item_number(rect, item)
  277. end
  278. #--------------------------------------------------------------------------
  279. # * Draw Item Name
  280. # enabled : Enabled flag. When false, draw semi-transparently.
  281. #--------------------------------------------------------------------------
  282. def draw_item_name(item, x, y, enabled = true, width = 172)
  283. return unless item
  284. change_color(item.item_disp_color, enabled)
  285. draw_de_icon(item.icon_index, x, y, item.icon_hue, enabled)
  286. draw_text(x + 26, y, width, line_height, item.name)
  287. end
  288. #--------------------------------------------------------------------------
  289. # * Draw Number of Items
  290. #--------------------------------------------------------------------------
  291. def draw_item_number(rect, item)
  292. return unless item
  293. if $D13x[:Equip_Levels]
  294. level = Equip_Exp::Level_Names[item.level]
  295. draw_text(rect, sprintf("%s", level), 2)
  296. end
  297. end
  298. #-----------------------------------------------------------------------------
  299. # Set Windowskin (overwrite from super)
  300. #-----------------------------------------------------------------------------
  301. def set_the_skin
  302. @skin = WindowSkins::Skins[:window_status_II]
  303. end
  304. end
  305. #===============================================================================
  306. class Window_StatusBlank < Window_Selectable
  307. #===============================================================================
  308. #-----------------------------------------------------------------------------
  309. #
  310. #-----------------------------------------------------------------------------
  311. def initialize(y)
  312. super(0, y, Graphics.width/2, Graphics.height-y)
  313. refresh
  314. end
  315. #-----------------------------------------------------------------------------
  316. #
  317. #-----------------------------------------------------------------------------
  318. def refresh
  319. contents.clear
  320. end
  321. #-----------------------------------------------------------------------------
  322. # Set Windowskin (overwrite from super)
  323. #-----------------------------------------------------------------------------
  324. def set_the_skin
  325. @skin = WindowSkins::Skins[:window_status_II]
  326. end
  327. end
  328. #===============================================================================
  329. class Scene_Status < Scene_MenuBase
  330. #===============================================================================
  331. #-----------------------------------------------------------------------------
  332. #
  333. #-----------------------------------------------------------------------------
  334. def start
  335. super
  336. make_command_window
  337. make_help_window
  338. make_status_window
  339. make_equip_window
  340. make_main_window
  341. make_extra_window
  342. update_help
  343. end
  344. #-----------------------------------------------------------------------------
  345. #
  346. #-----------------------------------------------------------------------------
  347. def make_command_window
  348. @command_window = Window_StatusCommand.new
  349. @command_window.viewport = @viewport
  350. @command_window.set_handler(:cancel, method(:return_scene))
  351. @command_window.set_handler(:pagedown, method(:next_actor))
  352. @command_window.set_handler(:pageup, method(:prev_actor))
  353. @command_window.set_handler(:equip, method(:goto_equip))
  354. @command_window.set_handler(:skill, method(:goto_skill))
  355. @command_window.set_handler(:distr, method(:goto_distr))
  356. @command_window.set_handler(:sklup, method(:goto_sklup))
  357. end
  358. #-----------------------------------------------------------------------------
  359. #
  360. #-----------------------------------------------------------------------------
  361. def make_help_window
  362. @help_window = Deki_Help.new
  363. @help_window.viewport = @viewport
  364. @help_window.x = Graphics.width / 4
  365. end
  366. #-----------------------------------------------------------------------------
  367. #
  368. #-----------------------------------------------------------------------------
  369. def make_status_window
  370. y = @help_window.height
  371. @status_window = Window_StatusStatus.new(@actor,y)
  372. @status_window.viewport = @viewport
  373. end
  374. #-----------------------------------------------------------------------------
  375. #
  376. #-----------------------------------------------------------------------------
  377. def make_equip_window
  378. wy = @status_window.y + @status_window.height
  379. ww = Graphics.width / 2
  380. @slot_window = Window_StatusEquipSlot.new(0, wy, ww)
  381. @slot_window.viewport = @viewport
  382. @slot_window.actor = @actor
  383. end
  384. #-----------------------------------------------------------------------------
  385. #
  386. #-----------------------------------------------------------------------------
  387. def make_main_window
  388. y = @status_window.y + @status_window.height
  389. @main_window = Window_StatusStatusMain.new(@actor,y)
  390. @main_window.viewport = @viewport
  391. @main_window.page = 0
  392. @old_main_page = 0
  393. end
  394. #-----------------------------------------------------------------------------
  395. #
  396. #-----------------------------------------------------------------------------
  397. def make_extra_window
  398. y = @slot_window.y + @slot_window.height
  399. @extra_window = Window_StatusBlank.new(y)
  400. @extra_window.viewport = @viewport
  401. end
  402. #-----------------------------------------------------------------------------
  403. #
  404. #-----------------------------------------------------------------------------
  405. def goto_equip
  406. SceneManager.call(Scene_Equip)
  407. end
  408. #-----------------------------------------------------------------------------
  409. #
  410. #-----------------------------------------------------------------------------
  411. def goto_skill
  412. SceneManager.call(Scene_Skill)
  413. end
  414. #-----------------------------------------------------------------------------
  415. #
  416. #-----------------------------------------------------------------------------
  417. def goto_distr
  418. SceneManager.call(Scene_SPDS)
  419. SceneManager.scene.prepare(@actor)
  420. end
  421. #-----------------------------------------------------------------------------
  422. #
  423. #-----------------------------------------------------------------------------
  424. def goto_sklup
  425. SceneManager.call(SUG_Scene)
  426. end
  427. #-----------------------------------------------------------------------------
  428. #
  429. #-----------------------------------------------------------------------------
  430. def on_actor_change
  431. @status_window.actor = @actor
  432. @slot_window.actor = @actor
  433. @main_window.actor = @actor
  434. @command_window.activate
  435. end
  436. #-----------------------------------------------------------------------------
  437. #
  438. #-----------------------------------------------------------------------------
  439. def update
  440. super
  441. update_pages
  442. update_help
  443. end
  444. #-----------------------------------------------------------------------------
  445. #
  446. #-----------------------------------------------------------------------------
  447. def update_pages
  448. lift = Keys.trigger?(:LSHIFT)
  449. rift = Keys.trigger?(:RSHIFT)
  450. return unless lift || rift
  451. return if lift && rift
  452. if lift
  453. @old_main_page -= 1
  454. if @old_main_page < 0
  455. @old_main_page = Status_sD13x::Max_Pages
  456. end
  457. end
  458. if rift
  459. @old_main_page += 1
  460. if @old_main_page > Status_sD13x::Max_Pages
  461. @old_main_page = 0
  462. end
  463. end
  464. @main_window.page = @old_main_page
  465. end
  466. #-----------------------------------------------------------------------------
  467. #
  468. #-----------------------------------------------------------------------------
  469. def update_help
  470. return unless @actor
  471. @help_window.set_text(@actor.description)
  472. end
  473. end
  474. #==============================================================================#
  475. # http://dekitarpg.wordpress.com/ #
  476. #==============================================================================#
  477. end # if true # << Make true to use this script, false to disable.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement