Advertisement
Dekita

$D13x Skill Levels 1.4-

May 21st, 2013
234
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 25.26 KB | None | 0 0
  1. if true # << Make true to use this script, false to disable.
  2. #===============================================================================
  3. #
  4. # ☆ $D13x - Skill Levels
  5. # -- Author : Dekita
  6. # -- Version : 1.4
  7. # -- Level : Easy / Normal
  8. # -- Requires : $D13x - Statistic Control
  9. # -- Engine : RPG Maker VX Ace.
  10. #
  11. #===============================================================================
  12. # ☆ Import
  13. #-------------------------------------------------------------------------------
  14. $D13x={}if$D13x==nil
  15. $D13x[:Skill_Lv]=true
  16. #===============================================================================
  17. # ☆ Updates
  18. #-------------------------------------------------------------------------------
  19. # D /M /Y
  20. # 2o/o5/2o13 - Update, (:dmg_deal | :dmg_take eval formulas)
  21. # 17/o5/2o13 - Fixed Incorrect Notetag Info,
  22. # - Added reset_skills_exp script call,
  23. # 22/o4/2o13 - Fixed Bug, (forget skill error)
  24. # 23/o3/2o13 - Fixed Bug, (guard skill leveling)
  25. # - Added Guard && Attack Skill Lv Options,
  26. # - Added New Script Calls,
  27. # 21/o3/2o13 - Fixed Bug, (enemy damage)
  28. # - Fixed Bug, (Mp/Tp cost)
  29. # 2o/o3/2o13 - Finished,
  30. # 1o/o3/2o13 - Started
  31. #
  32. #===============================================================================
  33. # ☆ Introduction
  34. #-------------------------------------------------------------------------------
  35. # This script gives skills - levels.
  36. # You can have different growth types, exp requirements, max level,
  37. # level name and damage multiplier for each skill.
  38. # Simple notetag usage.
  39. # Plug-N-Play.
  40. #
  41. #===============================================================================
  42. # ★☆★☆★☆★☆★☆★☆★☆★ TERMS AND CONDITIONS: ☆★☆★☆★☆★☆★☆★☆★☆★☆
  43. #===============================================================================
  44. # 1. You MUST give credit to "Dekita" !!
  45. # 2. You are NOT allowed to repost this script.(or modified versions)
  46. # 3. You are NOT allowed to convert this script.
  47. # 4. You are NOT allowed to use this script for Commercial games.
  48. # 5. ENJOY!
  49. #
  50. # "FINE PRINT"
  51. # By using this script you hereby agree to the above terms and conditions,
  52. # if any violation of the above terms occurs "legal action" may be taken.
  53. # Not understanding the above terms and conditions does NOT mean that
  54. # they do not apply to you.
  55. # If you wish to discuss the terms and conditions in further detail you can
  56. # contact me at http://dekitarpg.wordpress.com/
  57. #
  58. #===============================================================================
  59. # ☆ Instructions
  60. #-------------------------------------------------------------------------------
  61. # Place Below " ▼ Materials " and Above " ▼ Main " in your script editor.
  62. # Place Under My $D13x - Statistic Control Script.
  63. #
  64. #===============================================================================
  65. # ☆ Script Calls
  66. #-------------------------------------------------------------------------------
  67. # level_skill(actor_id, skill_id)
  68. # gain_skill_exp(actor_id, skill_id, value)
  69. #
  70. # actor_id = the id of the actor from the database.
  71. # skill_id = the id of the skill from the database.
  72. # value = the amount you wish to increase the exp.
  73. #
  74. #-------------------------------------------------------------------------------
  75. # $game_actors[ACTOR_ID].reset_skills_exp
  76. # $game_party.members[MEBMER_ID].reset_skills_exp
  77. # $game_party.leader.reset_skills_exp
  78. #
  79. # ACTOR_ID = the id of the actor from the database.
  80. # MEMBER_ID = the party members id (0 = leader)
  81. # This script call will reset all skills exp and level.
  82. #
  83. #===============================================================================
  84. # ☆ Notetags ( default )
  85. # For use with Skill Noteboxes only !
  86. #-------------------------------------------------------------------------------
  87. # <exp set: id>
  88. # replace id with the id of the Exp_Set (defined below) that you wish to use.
  89. #
  90. # <growth type: id>
  91. # replace id with the id of the Growth_Type (defined below) that you wish to use.
  92. #
  93. # <max level: value>
  94. # replace value with the maximum level for that skill
  95. # (cannot be higher than the Exp_Set hash size)
  96. #
  97. #===============================================================================
  98. # ☆ HELP
  99. #-------------------------------------------------------------------------------
  100. # The default max level is the size of its Exp_Set[id] hash.
  101. #
  102. #===============================================================================
  103. module Skill_Levels
  104. #===============================================================================
  105. Exp_Set=[]# << Keep
  106. Growth_Type=[]# << Keep
  107.  
  108. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  109. # ☆ General Settings
  110. #--------------------------------------------------------------------------
  111. # Reset Exp to 0 after level up ?
  112. Exp_Reset_On_Lv_Up = false # true
  113.  
  114. # Reset Level && Exp after forgetting skill ?
  115. Reset_On_Forget = true
  116.  
  117. # If these are true, skill costs will be multiplied by the DMG Multi
  118. Dmg_Multi_Skill_Cost = { :mp => true , :tp => false }
  119.  
  120. # Default Exp Set given to skills (unless notetagged)
  121. Default_Exp_Set_ID = 0
  122.  
  123. # Default Growth Type given to skills (unless notetagged)
  124. Default_GrowthT_ID = 0
  125.  
  126. # Make this true to allow the default Attack skill to level up
  127. Default_Attack_Can_Lv = false
  128.  
  129. # Make this true to allow the default Guard skill to level up
  130. Default_Guard__Can_Lv = false
  131.  
  132. # Default Notetags
  133. Notes={
  134. :exp_set => /<exp set:(.*)>/i ,
  135. :max_lev => /<max level:(.*)>/i ,
  136. :gro_typ => /<growth type:(.*)>/i ,
  137. }# << end Notes={}
  138.  
  139. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  140. # ☆ Exp Setup - Settings
  141. #--------------------------------------------------------------------------
  142. # here is where you define the required exp for each level
  143. # as well as the level name and damage multiplier.
  144. # DMG Multi will also increase any statistics gained by
  145. # using the Statistic Control scripts notetags
  146. # you can add to this array as you please.
  147. Exp_Set[0]={#<< Exp Settings : 0 Begin
  148. # Level => [Exp Req, "Name", DMG Multi] ,
  149. 1 => [ 0, "Lv 1", 1.0 ] , # << Default level
  150. 2 => [ 25, "Lv 2", 1.1 ] ,
  151. 3 => [ 50, "Lv 3", 1.2 ] ,
  152. 4 => [ 100, "Lv 4", 1.4 ] ,
  153. 5 => [ 200, "Lv 5", 1.6 ] ,
  154. 6 => [ 400, "Lv 6", 1.8 ] ,
  155. 7 => [ 800, "Lv 7", 2.0 ] ,
  156. 8 => [ 1600, "Lv 8", 2.4 ] ,
  157. 9 => [ 3200, "Lv 9", 3.0 ] ,
  158. }# << Keep
  159.  
  160. Exp_Set[1]={#<< Exp Settings : 1 Begin
  161. # Level => [Exp Req, "Name", DMG Multi] ,
  162. 1 => [ 0, "Lv 1", 1.0 ] , # << Default level
  163. 2 => [ 50, "Lv 2", 1.1 ] ,
  164. 3 => [ 100, "Lv 3", 1.2 ] ,
  165. 4 => [ 200, "Lv 4", 1.4 ] ,
  166. 5 => [ 400, "Lv 5", 1.6 ] ,
  167. 6 => [ 800, "Lv 6", 1.8 ] ,
  168. 7 => [ 1600, "Lv 7", 2.0 ] ,
  169. 8 => [ 3200, "Lv 8", 2.4 ] ,
  170. 9 => [ 6400, "Lv 9", 3.0 ] ,
  171. }# << Keep
  172.  
  173. Exp_Set[2]={#<< Exp Settings : 2 Begin
  174. # Level => [Exp Req, "Name", DMG Multi] ,
  175. 1 => [ 0, "Lv 1", 1.0 ] , # << Default level
  176. 2 => [ 15, "Lv 2", 1.1 ] ,
  177. 3 => [ 45, "Lv 3", 1.2 ] ,
  178. 4 => [ 135, "Lv 4", 1.4 ] ,
  179. 5 => [ 405, "Lv 5", 1.6 ] ,
  180. 6 => [ 1215, "Lv 6", 1.8 ] ,
  181. 7 => [ 3645, "Lv 7", 2.0 ] ,
  182. 8 => [ 10935, "Lv 8", 2.4 ] ,
  183. 9 => [ 32805, "Lv 9", 3.0 ] ,
  184. }# << Keep
  185.  
  186. Exp_Set[3]={#<< Exp Settings : 3 Begin
  187. # Level => [Exp Req, "Name", DMG Multi] ,
  188. 1 => [ 0, "I", 1.0 ] , # << Default level
  189. 2 => [ 10, "II", 1.1 ] ,
  190. 3 => [ 30, "III", 1.25 ] ,
  191. 4 => [ 60, "IV", 1.45 ] ,
  192. 5 => [ 100, "V", 1.7 ] ,
  193. 6 => [ 150, "VI", 2.0 ] ,
  194. 7 => [ 210, "VII", 2.35 ] ,
  195. 8 => [ 280, "VIII", 2.75 ] ,
  196. 9 => [ 350, "IX", 3.15 ] ,
  197. 10 => [ 430, "X", 3.60 ] ,
  198. 11 => [ 520, "XI", 4.1 ] ,
  199. 12 => [ 620, "XII", 4.65 ] ,
  200. 13 => [ 730, "XIII", 5.25 ] ,
  201. 14 => [ 850, "XIV", 5.8 ] ,
  202. 15 => [ 1000, "XV", 6.5 ] ,
  203. 16 => [ 1250, "XVI", 7.25 ] ,
  204. 17 => [ 1600, "XVII", 8.05 ] ,
  205. 18 => [ 2050, "XVIII", 8.9 ] ,
  206. 19 => [ 2600, "XIX", 9.8 ] ,
  207. 20 => [ 5000, "*", 15.0 ] ,
  208. }# << Keep
  209.  
  210. # << You can add more Exp_Set[ id ] here, simply copy the code from
  211. # above and change the id number and values to suit your needs.
  212.  
  213. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  214. # ☆ Growth Type - Settings
  215. #--------------------------------------------------------------------------
  216. # Here is where you can define the exp gained for various conditions
  217. # you can add to this array as you please.
  218. # :per_use = exp gained per use of the skill
  219. # :per_dmg = per (100 * skill level) damage dealt
  220. # :per_bat = exp gained per battle (while you know the skill)
  221. # :per_die = exp gained when actor dies ( for the skill )
  222. # :per_esc = exp gained when actor escapes battle (for the skill)
  223. # :dmg_deal = formula to eval when actor deals damage using this skill
  224. # :dmg_take = formula to eval when actor takes damage FROM this skill
  225. # Exp wlil be given to the actor's skill if they know it
  226. # Pointless really, but there you go :p
  227. # When using :dmg_deal | :dmg_take you can use the arguements below
  228. # in your formulas (the formula is calculated in Game_Battler)
  229. # user = returns the actor/eney using the skill
  230. # self = returns the target actor/enemy of the skill
  231. # item = returns the item used
  232. # damage = returns the total value of the damage taken/dealt
  233. #--------------------------------------------------------------------------
  234. Growth_Type[0]={
  235. :per_use => 1,
  236. :per_dmg => 0,
  237. :per_bat => 1,
  238. :per_die => 0,
  239. :per_esc => 0,
  240. :dmg_deal => "((damage / 20) * skills_lv(item.id)).to_i + 1",
  241. :dmg_take => "0",
  242. } # << Keep
  243.  
  244. Growth_Type[1]={
  245. :per_use => 0,
  246. :per_dmg => 1,
  247. :per_bat => 0,
  248. :per_die => 0,
  249. :per_esc => 0,
  250. :dmg_deal => "0",
  251. :dmg_take => "0",
  252. } # << Keep
  253.  
  254. Growth_Type[2]={
  255. :per_use => 1,
  256. :per_dmg => 0,
  257. :per_bat => 0,
  258. :per_die => 0,
  259. :per_esc => 0,
  260. :dmg_deal => "0",
  261. :dmg_take => "0",
  262. } # << Keep
  263.  
  264. # << You can add more Growth_Type[ id ] here, simply copy the code from
  265. # above and change the id number and values to suit your needs.
  266.  
  267. #####################
  268. # CUSTOMISATION END #
  269. end #####################
  270. #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★#
  271. # #
  272. # http://dekitarpg.wordpress.com/ #
  273. # #
  274. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆#
  275. #===============================================================================#
  276. # ARE YOU MODIFYING BEYOND THIS POINT? \.\. #
  277. # YES?\.\. #
  278. # OMG, REALLY? \| #
  279. # WELL SLAP MY FACE AND CALL ME A DRAGONITE.\..\.. #
  280. # I REALLY DIDN'T THINK YOU HAD IT IN YOU.\..\.. #
  281. #===============================================================================#
  282. module BattleManager
  283. #===============================================================================
  284. #--------------------------------------------------------------------------
  285. # Alias List
  286. #--------------------------------------------------------------------------
  287. class << self
  288. alias :gain_skill_exp :gain_exp
  289. end
  290. #--------------------------------------------------------------------------
  291. # EXP Acquisition and Level Up Display
  292. #--------------------------------------------------------------------------
  293. def self.gain_exp
  294. gain_skill_exp
  295. skills_gain_exp
  296. end
  297. #--------------------------------------------------------------------------
  298. # EXP Acquisition and Level Up Display (Skills)
  299. #--------------------------------------------------------------------------
  300. def self.skills_gain_exp
  301. $game_party.battle_members.each do |actor|
  302. actor.skills.each do |skill|
  303. next if skill == nil
  304. value = Skill_Levels::Growth_Type[skill.growth_type][:per_bat]
  305. actor.increase_skill_exp(skill, value)
  306. end
  307. end
  308. wait_for_message
  309. end
  310.  
  311. end
  312.  
  313. #===============================================================================
  314. class RPG::Skill < RPG::UsableItem
  315. #===============================================================================
  316. #---------------------------------------------------------------------------
  317. # Alias List
  318. #---------------------------------------------------------------------------
  319. alias :deki_skill_levz :load_stat_control
  320. #---------------------------------------------------------------------------
  321. # Pi Variables
  322. #---------------------------------------------------------------------------
  323. attr_accessor :exp_set
  324. attr_accessor :growth_type
  325. attr_accessor :max_lv
  326. #---------------------------------------------------------------------------
  327. # Load Stat Control
  328. #---------------------------------------------------------------------------
  329. def load_stat_control
  330. deki_skill_levz
  331. @exp_set = Skill_Levels::Default_Exp_Set_ID
  332. @growth_type = Skill_Levels::Default_GrowthT_ID
  333. @max_lv = Skill_Levels::Exp_Set[@exp_set].size
  334. self.note.split(/[\r\n]+/).each do |line|
  335. case line
  336. when Skill_Levels::Notes[:max_lev] then @max_lv = $1.to_i
  337. when Skill_Levels::Notes[:exp_set] then @exp_set = $1.to_i
  338. when Skill_Levels::Notes[:gro_typ] then @growth_type = $1.to_i
  339. end
  340. end
  341. end
  342.  
  343. end
  344.  
  345. #===============================================================================
  346. class Game_Battler < Game_BattlerBase
  347. #===============================================================================
  348. #--------------------------------------------------------------------------
  349. # Alias List
  350. #--------------------------------------------------------------------------
  351. alias :_MDV__skillev :make_damage_value
  352. alias :_APV__skillev :apply_variance
  353. #--------------------------------------------------------------------------
  354. # M.D.V
  355. #--------------------------------------------------------------------------
  356. def make_damage_value(user, item)
  357. @skillev_user = user
  358. @skillev_item = item
  359. _MDV__skillev(user, item)
  360. end
  361. #--------------------------------------------------------------------------
  362. # Apply Variance Mod ( HEAVY ALIAS )
  363. #--------------------------------------------------------------------------
  364. def apply_variance(damage, variance)
  365. user = @skillev_user
  366. item = @skillev_item
  367. orii = _APV__skillev(damage, variance)
  368. orig = apply_skill_variance(user,item,orii)
  369. do_dmg_exp_eval(user, item, orig)
  370. orig
  371. end
  372. #--------------------------------------------------------------------------
  373. # Do Exp Gain Eval Formula
  374. #--------------------------------------------------------------------------
  375. def do_dmg_exp_eval(user, item, damage)
  376. return if item.id == (attack_skill_id || guard_skill_id)
  377. mod = Skill_Levels::Growth_Type[item.growth_type]
  378. if user.is_a?(Game_Actor)
  379. val = eval(mod[:dmg_deal]) rescue nil
  380. val = 0 if ((val == nil) || (val < 0))
  381. user.increase_skill_exp(item, val)
  382. end
  383. if user.is_a?(Game_Enemy)
  384. val = eval(mod[:dmg_take]) rescue nil
  385. val = 0 if ((val == nil) || (val < 0))
  386. self.increase_skill_exp(item, val)
  387. end
  388. end
  389. #--------------------------------------------------------------------------
  390. # Apply Skill Variance
  391. #--------------------------------------------------------------------------
  392. def apply_skill_variance(user,item,orig)
  393. return orig if user.is_a?(Game_Enemy)
  394. return orig if item.id == (attack_skill_id || guard_skill_id)
  395. lvdmgmul = Skill_Levels::Exp_Set[item.exp_set][user.skills_lv(item.id)][2]
  396. valu = orig * lvdmgmul
  397. ex = ((valu/100)*user.skills_lv(item.id)*
  398. Skill_Levels::Growth_Type[item.growth_type][:per_dmg]).to_i
  399. user.increase_skill_exp(item, ex)
  400. valu
  401. end
  402.  
  403. end
  404.  
  405. #===============================================================================
  406. class Game_Actor < Game_Battler
  407. #===============================================================================
  408. #--------------------------------------------------------------------------
  409. # Alias List
  410. #--------------------------------------------------------------------------
  411. alias :ls_alias_SD13x :learn_skill
  412. alias :fs_alias_SD13x :forget_skill
  413. alias :from_suparr_pscc :pay_skill_cost
  414. alias :init_de_skeel :init_skills
  415. alias :die_exp_skill :die
  416. alias :escape_exp_skill :escape
  417. alias :skill_lv_mp_st :skill_mp_cost
  418. alias :skill_lv_tp_st :skill_tp_cost
  419. #--------------------------------------------------------------------------
  420. # Learn Skill
  421. #--------------------------------------------------------------------------
  422. def learn_skill(skill_id)
  423. old_skills = skills.clone
  424. ls_alias_SD13x(skill_id)
  425. if skills != old_skills
  426. @skills_lv[skill_id] = 1
  427. @skills_exp[skill_id] = 0
  428. @skills_list.push(skill_id)
  429. @skills_list.sort!
  430. end
  431. end
  432. #--------------------------------------------------------------------------
  433. # Initialize Skills
  434. #--------------------------------------------------------------------------
  435. def init_skills
  436. reset_skills_exp
  437. init_de_skeel
  438. end
  439. #--------------------------------------------------------------------------
  440. # Reset Skills Lv + Exp
  441. #--------------------------------------------------------------------------
  442. def reset_skills_exp
  443. ds = $data_skills.size
  444. @skills_lv = [1] * ds
  445. @skills_exp = [0] * ds
  446. end
  447. #--------------------------------------------------------------------------
  448. # Get Skill Level
  449. #--------------------------------------------------------------------------
  450. def skills_lv(id)
  451. @skills_lv[id]
  452. end
  453. #--------------------------------------------------------------------------
  454. # Get Skill Exp
  455. #--------------------------------------------------------------------------
  456. def skills_exp(id)
  457. @skills_exp[id] == nil ? 0 : @skills_exp[id]
  458. end
  459. #--------------------------------------------------------------------------
  460. # Increase Skill Exp
  461. #--------------------------------------------------------------------------
  462. def increase_skill_exp(skill, value = nil, show = true)
  463. mod = Skill_Levels
  464. return if skill.id == attack_skill_id unless mod::Default_Attack_Can_Lv
  465. return if skill.id == guard_skill_id unless mod::Default_Guard__Can_Lv
  466. value = mod::Growth_Type[skill.growth_type][:per_use] if value == nil
  467. return if value == nil || value <= 0
  468. return if @skills_lv[skill.id] >= skill.max_lv
  469. set_id = skill.exp_set
  470. value.times do
  471. break if @skills_lv[skill.id] >= skill.max_lv
  472. @skills_exp[skill.id] += 1
  473. need = mod::Exp_Set[set_id][(@skills_lv[skill.id]+1)][0]
  474. if @skills_exp[skill.id] >= need
  475. increase_skill_proficiency(skill.id, show)
  476. end
  477. end
  478. end
  479. #--------------------------------------------------------------------------
  480. # Increase Skill Level
  481. #--------------------------------------------------------------------------
  482. def increase_skill_proficiency(skill_id, show = true)
  483. return if @skills_lv[skill_id] >= $data_skills[skill_id].max_lv
  484. @skills_lv[skill_id] += 1
  485. if Skill_Levels::Exp_Reset_On_Lv_Up
  486. @skills_exp[skill_id] = 0
  487. end
  488. ltex = Skill_Levels::Exp_Set[$data_skills[skill_id].exp_set][@skills_lv[skill_id]][1]
  489. text = "#{self.name}'s #{$data_skills[skill_id].name} is now #{ltex}"
  490. $game_message.add(text) if show
  491. end
  492. #--------------------------------------------------------------------------
  493. # Forget Skill
  494. #--------------------------------------------------------------------------
  495. def forget_skill(skill_id)
  496. fs_alias_SD13x(skill_id)
  497. @skills_list.delete(skill_id)
  498. if Skill_Levels::Reset_On_Forget
  499. @skills_lv[skill_id] = 1
  500. @skills_exp[skill_id] = 0
  501. end
  502. end
  503. #--------------------------------------------------------------------------
  504. # Die
  505. #--------------------------------------------------------------------------
  506. def die
  507. die_exp_skill
  508. do_obscure_skill_exp(:per_die)
  509. end
  510. #--------------------------------------------------------------------------
  511. # Escape
  512. #--------------------------------------------------------------------------
  513. def escape
  514. escape_exp_skill
  515. do_obscure_skill_exp(:per_esc)
  516. end
  517. #--------------------------------------------------------------------------
  518. # Do Obscure Skill Exp Gain
  519. #--------------------------------------------------------------------------
  520. def do_obscure_skill_exp(type = :nil)
  521. return if type == :nil
  522. skills.each do |skill|
  523. next if skill == nil
  524. value = Skill_Levels::Growth_Type[skill.growth_type][type]
  525. next if value <= 0
  526. actor.increase_skill_exp(skill, value)
  527. end
  528. end
  529. #--------------------------------------------------------------------------
  530. # Pay Cost of Using Skill
  531. #--------------------------------------------------------------------------
  532. def pay_skill_cost(skill)
  533. from_suparr_pscc(skill)
  534. increase_skill_exp(skill)
  535. end
  536. #--------------------------------------------------------------------------
  537. # Calculate Skill's MP Cost
  538. #--------------------------------------------------------------------------
  539. def skill_mp_cost(skill)
  540. old = skill_lv_mp_st(skill)
  541. if Skill_Levels::Dmg_Multi_Skill_Cost[:mp]
  542. old *= Skill_Levels::Exp_Set[skill.exp_set][@skills_lv[skill.id]][2]
  543. end
  544. old.to_i
  545. end
  546. #--------------------------------------------------------------------------
  547. # Calculate Skill's TP Cost
  548. #--------------------------------------------------------------------------
  549. def skill_tp_cost(skill)
  550. old = skill_lv_tp_st(skill)
  551. if Skill_Levels::Dmg_Multi_Skill_Cost[:tp]
  552. old *= Skill_Levels::Exp_Set[skill.exp_set][@skills_lv[skill.id]][2]
  553. end
  554. old.to_i
  555. end
  556.  
  557. end # << Game_Actor
  558.  
  559. #===============================================================================
  560. class Window_SkillList < Window_Selectable
  561. #===============================================================================
  562. #--------------------------------------------------------------------------
  563. # Draw Item Name
  564. #--------------------------------------------------------------------------
  565. def draw_item_name(item, x, y, enabled = true, width = (Graphics.width/2))
  566. return unless item && @actor
  567. w = (width - (standard_padding*2) - 4)
  568. draw_icon(item.icon_index, x, y, enabled)
  569. change_color(normal_color, enabled)
  570. skill_lv = @actor.skills_lv(item.id)
  571. if $D13x[:Skill_Scene] && !SceneManager.scene_is?(Scene_Battle)
  572. refresh_font
  573. text = Skill_Levels::Exp_Set[item.exp_set][skill_lv][1]
  574. draw_text(x + 24, y, w-24, line_height, item.name)
  575. draw_text(x, y, w, line_height, text, 2)
  576. else
  577. text = "#{item.name} #{Skill_Levels::Exp_Set[item.exp_set][skill_lv][1]}"
  578. draw_text(x + 24, y, w-24, line_height, text)
  579. end
  580. end
  581.  
  582. end
  583.  
  584. #===============================================================================
  585. class Game_Interpreter
  586. #===============================================================================
  587. #--------------------------------------------------------------------------
  588. # Increase Skill Level
  589. #--------------------------------------------------------------------------
  590. def level_skill(actor_id, skill_id)
  591. return if actor_id == nil
  592. return if skill_id == nil
  593. actor = $game_actors[actor_id]
  594. actor.increase_skill_proficiency(skill_id)
  595. end
  596. #--------------------------------------------------------------------------
  597. # Gain Skill Exp
  598. #--------------------------------------------------------------------------
  599. def gain_skill_exp(actor_id, skill_id, value = 0, show = true)
  600. return if actor_id == nil
  601. return if skill_id == nil
  602. return if value <= 0
  603. actor = $game_actors[actor_id]
  604. skill = $data_skills[skill_id]
  605. actor.increase_skill_exp(skill,value,show)
  606. end
  607.  
  608. end
  609.  
  610. #==============================================================================#
  611. # http://dekitarpg.wordpress.com/ #
  612. #==============================================================================#
  613. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement