[VX] Skill Draw

Skill Draw
by Dargor
Version 1.10


Introduction

For those who have played FFVIII, you know what this script does!
First of all, the idea behind the Draw system is to basically 'Steal' skills from a enemy.
The unusual thing is that in FFVIII, you have skill numbers instead of MP. So when you use the Draw command, you steal an amount of skill number (between 1 and 9 depending on your level and the skill).

With my version of this system, you will need both MP and skill number to cast a skill.
You have 2 Draw methods. Stock and Cast.
With 'Stock' you will stock an amount of skill number
With 'Cast' you will cast the selected skill on the enemy

I know, a lot of people hate this system but I don't care about it, I think it's cool! :tongue:

Screenshots
ImageImage

Script

Script Spoiler
  1. #==============================================================================
  2. # ** Skill Draw (FFVIII)
  3. #------------------------------------------------------------------------------
  4. #    © Dargor, 2008
  5. #   02/06/08
  6. #   Version 1.10
  7. #------------------------------------------------------------------------------
  8. #   VERSION HISTORY:
  9. #    - 1.0 (11/05/08), Initial release
  10. #    - 1.1 (14/05/08), Bug fixed with consuming skill number
  11. #    - 1.2 (14/05/08), Bug fixed with initial skill number
  12. #    - 1.3 (18/05/08), Another bug fixed with initial skill number
  13. #    - 1.4 (20/05/08), Added a Color variable for skill number
  14. #    - 1.5 (27/05/08), Added an array of independent skills.
  15. #                               These skills won't require skill number to be used.
  16. #    - 1.6 (01/06/08), Added an array of actors with the Draw command
  17. #    - 1.7 (01/06/08), Added an array of independent actors.
  18. #                               These actors won't require skill number to cast a skill.
  19. #    - 1.8 (01/06/08), Bug fixed with the skill window when an actor is independent
  20. #    - 1.9 (02/06/08), Bug fixed with the skill window when an skill is independent
  21. #    - 1.10(02/06/08), Added a variable to hide skills with 0 skill number
  22. #------------------------------------------------------------------------------
  23. #   INSTRUCTIONS:
  24. #    1) Paste the script above main
  25. #    2) Edit the Vocab variables
  26. #    2) Edit the constants in the Skill_Draw module
  27. #==============================================================================
  28.  
  29. # Command name
  30. Vocab::CommandDraw = 'Draw'
  31. Vocab::CommandDrawStock = 'Stock'
  32. Vocab::CommandDrawCast = 'Cast'
  33. Vocab::UnknownSkill = '??????'
  34. Vocab::UseDraw = "%s uses #{Vocab::CommandDraw}!"
  35. Vocab::DrawGain = "%s draw %s %s!"
  36. Vocab::DrawFail = "%s's draw failed."
  37.  
  38. module Skill_Draw
  39.   # Actors with the Draw command
  40.   Actors = [1,2,3,4]
  41.   # Actors who are not dependent over skill number
  42.   Independent_Actors = [3,4]
  43.   # The Draw Animation
  44.   Animation_id = 41
  45.   # Prevent from drawing specific enemy skills
  46.   # SYNTAX: enemy_id => [skill_id, ...]
  47.   Dont_Draw = {
  48.                        1 => [2,3]
  49.                     }
  50.   # Color based on the windowskin's palette
  51.   Skill_Number_Color = 14
  52.   # Skills that don't need skill number to be casted
  53.   Independent_Skills = [1,2,3,4,5,6,94]
  54.   # Hide skills with 0 skill number
  55.   Hide_Zero_Skills = false
  56. end
  57.  
  58. #==============================================================================
  59. # ** Game_System
  60. #------------------------------------------------------------------------------
  61. #   This class handles system-related data. Also manages vehicles and BGM, etc.
  62. # The instance of this class is referenced by $game_system.
  63. #==============================================================================
  64.  
  65. class Game_System
  66.   #--------------------------------------------------------------------------
  67.   # * Public Instance Variables
  68.   #--------------------------------------------------------------------------
  69.   attr_accessor :skill_drawned
  70.   #--------------------------------------------------------------------------
  71.   # * Alias Listing
  72.   #--------------------------------------------------------------------------
  73.   alias dargor_vx_draw_system_initialize initialize
  74.   #--------------------------------------------------------------------------
  75.   # * Object Initialization
  76.   #--------------------------------------------------------------------------
  77.   def initialize
  78.      dargor_vx_draw_system_initialize
  79.      @skill_drawned = []
  80.   end
  81. end
  82. #==============================================================================
  83. # ** Game_BattleAction
  84. #------------------------------------------------------------------------------
  85. #   This class handles battle actions. This class is used within the
  86. # Game_Battler class.
  87. #==============================================================================
  88.  
  89. class Game_BattleAction
  90.   #--------------------------------------------------------------------------
  91.   # * Public Instance Variables
  92.   #--------------------------------------------------------------------------
  93.   attr_accessor :draw_kind                       # draw kind (stock/cast)
  94.   #--------------------------------------------------------------------------
  95.   # * Alias Listing
  96.   #--------------------------------------------------------------------------
  97.   alias dargor_vx_draw_battle_action_clear clear
  98.   alias dargor_vx_draw_battle_action_make_targets make_targets
  99.   #--------------------------------------------------------------------------
  100.   # * Clear
  101.   #--------------------------------------------------------------------------
  102.   def clear
  103.      @draw_kind = -1
  104.      # The usual
  105.      dargor_vx_draw_battle_action_clear
  106.   end
  107.   #--------------------------------------------------------------------------
  108.   # * Set Skill
  109.   #       skill_id : skill ID
  110.   #       draw_kind: draw kind (stock/cast)
  111.   #--------------------------------------------------------------------------
  112.   def set_skill(skill_id, draw_kind = -1)
  113.      @kind = 1
  114.      @skill_id = skill_id
  115.      @draw_kind = draw_kind
  116.   end
  117.   #--------------------------------------------------------------------------
  118.   # * Draw Determination
  119.   #--------------------------------------------------------------------------
  120.   def draw?
  121.      return @kind == 1 && [0,1].include?(@draw_kind)
  122.   end
  123.   #--------------------------------------------------------------------------
  124.   # * Create Target Array
  125.   #--------------------------------------------------------------------------
  126.   def make_targets
  127.      targets = []
  128.      if draw?
  129.         targets.push(opponents_unit.smooth_target(@target_index))
  130.         return targets
  131.      end
  132.      dargor_vx_draw_battle_action_make_targets
  133.   end
  134. end
  135. #==============================================================================
  136. # ** Game_Battler
  137. #------------------------------------------------------------------------------
  138. #   This class deals with battlers. It's used as a superclass of the Game_Actor
  139. # and Game_Enemy classes.
  140. #==============================================================================
  141.  
  142. class Game_Battler
  143.   #--------------------------------------------------------------------------
  144.   # * Draw Success
  145.   #       skill : skill
  146.   #       number: number to draw
  147.   #--------------------------------------------------------------------------
  148.   def draw_success?(skill, number)
  149.      return false unless self.is_a?(Game_Actor)
  150.      return false if number == 0
  151.      level_factor = (self.level / 10) / 2
  152.      random = [10-level_factor, 0].max
  153.      success = (self.level / 10) + rand(random)
  154.      return success >= number
  155.   end
  156. end
  157.  
  158. #==============================================================================
  159. # ** Game_Actor
  160. #------------------------------------------------------------------------------
  161. #   This class handles actors. It's used within the Game_Actors class
  162. # ($game_actors) and referenced by the Game_Party class ($game_party).
  163. #==============================================================================
  164.  
  165. class Game_Actor < Game_Battler
  166.   #--------------------------------------------------------------------------
  167.   # * Public Instance Variables
  168.   #--------------------------------------------------------------------------
  169.   attr_reader   :skills_number
  170.   #--------------------------------------------------------------------------
  171.   # * Alias Listing
  172.   #--------------------------------------------------------------------------
  173.   alias dargor_vx_draw_actor_skill_can_use? skill_can_use?
  174.   alias dargor_vx_draw_actor_setup setup
  175.   #--------------------------------------------------------------------------
  176.   # * Setup
  177.   #       actor_id : actor ID
  178.   #--------------------------------------------------------------------------
  179.   def setup(actor_id)
  180.      @skills_number = []
  181.      dargor_vx_draw_actor_setup(actor_id)
  182.      for learning in self.class.learnings
  183.         skill = $data_skills[learning.skill_id]
  184.         gain_skill(skill, 1)
  185.      end
  186.      # Add battle commands
  187.      if Skill_Draw::Actors.include?(@actor_id)
  188.         # Add 'Draw' to actor 1
  189.         add_command(1, Vocab::CommandDraw)
  190.      end
  191.   end
  192.   #--------------------------------------------------------------------------
  193.   # * Learn Skill
  194.   #       skill_id : skill ID
  195.   #--------------------------------------------------------------------------
  196.   def learn_skill(skill_id)
  197.      $game_system.skill_drawned << skill_id
  198.      unless skill_learn?($data_skills[skill_id])
  199.         @skills.push(skill_id)
  200.         @skills.sort!
  201.      end
  202.   end
  203.   #--------------------------------------------------------------------------
  204.   # * Get Number of Items Possessed
  205.   #       item : item
  206.   #--------------------------------------------------------------------------
  207.   def skill_number(skill)
  208.      number = @skills_number[skill.id]
  209.      return number == nil ? 0 : number
  210.   end
  211.   #--------------------------------------------------------------------------
  212.   # * Determine Usable Skills
  213.   #       skill : skill
  214.   #--------------------------------------------------------------------------
  215.   def skill_can_use?(skill)
  216.      unless Skill_Draw::Independent_Skills.include?(skill.id) or
  217.            Skill_Draw::Independent_Actors.include?(@actor)
  218.         return false unless skill_number(skill) > 0
  219.      end
  220.      dargor_vx_draw_actor_skill_can_use?(skill)
  221.   end
  222.   #--------------------------------------------------------------------------
  223.   # * Gain Items (or lose)
  224.   #       item              : Item
  225.   #       n                  : Number
  226.   #       include_equip : Include equipped items
  227.   #--------------------------------------------------------------------------
  228.   def gain_skill(skill, n)
  229.      $game_system.skill_drawned << skill.id
  230.      number = skill_number(skill)
  231.      @skills_number[skill.id] = [[number + n, 0].max, 99].min
  232.      n += number
  233.   end
  234.   #--------------------------------------------------------------------------
  235.   # * Lose Items
  236.   #       item              : Item
  237.   #       n                  : Number
  238.   #       include_equip : Include equipped items
  239.   #--------------------------------------------------------------------------
  240.   def lose_skill(skill, n)
  241.      gain_skill(skill, -n)
  242.   end
  243. end
  244.  
  245. #==============================================================================
  246. # ** Game_Enemy
  247. #------------------------------------------------------------------------------
  248. #   This class handles enemy characters. It's used within the Game_Troop class
  249. # ($game_troop).
  250. #==============================================================================
  251.  
  252. class Game_Enemy < Game_Battler
  253.   #--------------------------------------------------------------------------
  254.   # * Skills
  255.   #--------------------------------------------------------------------------
  256.   def skills
  257.      result = []
  258.      for action in enemy.actions
  259.         next unless action.skill?
  260.         result << $data_skills[action.skill_id]
  261.      end
  262.      return result
  263.   end
  264. end
  265.  
  266. #==============================================================================
  267. # ** Window_Skill
  268. #------------------------------------------------------------------------------
  269. #   This window displays a list of usable skills on the skill screen, etc.
  270. #==============================================================================
  271.  
  272. class Window_Skill < Window_Selectable
  273.   alias dargor_vx_draw_skill_window_refresh refresh 
  274.   #--------------------------------------------------------------------------
  275.   # * Refresh
  276.   #--------------------------------------------------------------------------
  277.   def refresh
  278.      dargor_vx_draw_skill_window_refresh
  279.      if Skill_Draw::Hide_Zero_Skills
  280.         @data = []
  281.         for skill in @actor.skills
  282.            @data.push(skill) unless @actor.skill_number(skill) == 0
  283.            if skill.id == @actor.last_skill_id
  284.               self.index = @data.size - 1
  285.            else
  286.               self.index = 0
  287.            end
  288.         end
  289.         @item_max = @data.size
  290.         create_contents
  291.         for i in 0...@item_max
  292.            draw_item(i)
  293.         end
  294.      end
  295.   end
  296.   #--------------------------------------------------------------------------
  297.   # * Draw Item
  298.   #       index : item number
  299.   #--------------------------------------------------------------------------
  300.   def draw_item(index)
  301.      rect = item_rect(index)
  302.      self.contents.clear_rect(rect)
  303.      skill = @data[index]
  304.      if skill != nil
  305.         rect.width -= 4
  306.         enabled = @actor.skill_can_use?(skill)
  307.         draw_item_name(skill, rect.x, rect.y, enabled)
  308.         self.contents.draw_text(rect, @actor.calc_mp_cost(skill), 2)
  309.         # Draw skill number
  310.         rect.x -= 24
  311.         self.contents.draw_text(rect, ":", 2)
  312.         rect.x -= 12
  313.         skill_number = @actor.skill_number(skill)
  314.         if Skill_Draw::Independent_Actors.include?(@actor.id) or
  315.               Skill_Draw::Independent_Skills.include?(skill.id)
  316.            skill_number = ''
  317.         end
  318.         if enabled
  319.            self.contents.font.color = text_color(Skill_Draw::Skill_Number_Color)
  320.         end
  321.         self.contents.draw_text(rect, skill_number.to_s, 2)
  322.      end
  323.   end
  324. end
  325.  
  326. #==============================================================================
  327. # ** Window_Skill
  328. #------------------------------------------------------------------------------
  329. #   This window displays a list of usable skills on the skill screen, etc.
  330. #==============================================================================
  331.  
  332. class Window_EnemySkill < Window_Selectable
  333.   #--------------------------------------------------------------------------
  334.   # * Public Instance Variables
  335.   #--------------------------------------------------------------------------
  336.   attr_accessor :enemy
  337.   #--------------------------------------------------------------------------
  338.   # * Object Initialization
  339.   #       x        : window x-coordinate
  340.   #       y        : window y-coordinate
  341.   #       width  : window width
  342.   #       height : window height
  343.   #       actor  : actor
  344.   #--------------------------------------------------------------------------
  345.   def initialize(x, y, width, height, enemy)
  346.      super(x, y, width, height)
  347.      @enemy = enemy
  348.      @column_max = 2
  349.      self.index = 0
  350.      refresh
  351.   end
  352.   #--------------------------------------------------------------------------
  353.   # * Skill
  354.   #--------------------------------------------------------------------------
  355.   def skill
  356.      return @data[self.index]
  357.   end
  358.   #--------------------------------------------------------------------------
  359.   # * Refresh
  360.   #--------------------------------------------------------------------------
  361.   def refresh
  362.      @data = []
  363.      for skill in @enemy.skills
  364.         unless Skill_Draw::Dont_Draw[@enemy.id].nil?
  365.            next if Skill_Draw::Dont_Draw[@enemy.id].include?(skill.id)
  366.         end
  367.         @data.push(skill)
  368.      end
  369.      @item_max = @data.size
  370.      create_contents
  371.      for i in 0...@item_max
  372.         draw_item(i)
  373.      end
  374.   end
  375.   #--------------------------------------------------------------------------
  376.   # * Draw Item
  377.   #       index : item number
  378.   #--------------------------------------------------------------------------
  379.   def draw_item(index)
  380.      rect = item_rect(index)
  381.      self.contents.clear_rect(rect)
  382.      skill = @data[index]
  383.      if skill != nil
  384.         rect.width -= 4
  385.         draw_item_name(skill, rect.x, rect.y, true)
  386.      end
  387.   end
  388.   #--------------------------------------------------------------------------
  389.   # * Draw Item Name
  390.   #       item     : Item (skill, weapon, armor are also possible)
  391.   #       x         : draw spot x-coordinate
  392.   #       y         : draw spot y-coordinate
  393.   #       enabled : Enabled flag. When false, draw semi-transparently.
  394.   #--------------------------------------------------------------------------
  395.   def draw_item_name(item, x, y, enabled = true)
  396.      if item != nil
  397.         draw_icon(item.icon_index, x, y, enabled)
  398.         self.contents.font.color = normal_color
  399.         self.contents.font.color.alpha = enabled ? 255 : 128
  400.         if item.is_a?(RPG::Skill) && !$game_system.skill_drawned.include?(item.id)
  401.            self.contents.draw_text(x + 24, y, 172, WLH, Vocab::UnknownSkill)
  402.         else 
  403.            self.contents.draw_text(x + 24, y, 172, WLH, item.name)
  404.         end
  405.      end
  406.   end
  407.   #--------------------------------------------------------------------------
  408.   # * Frame Update
  409.   #--------------------------------------------------------------------------
  410.   def update
  411.      super
  412.   end
  413.   #--------------------------------------------------------------------------
  414.   # * Update Help Text
  415.   #--------------------------------------------------------------------------
  416.   def update_help
  417.      if $game_system.skill_drawned.include?(skill.id)
  418.         @help_window.set_text(skill == nil ? "" : skill.description)
  419.      else
  420.         @help_window.set_text(skill == nil ? "" : Vocab::UnknownSkill)
  421.      end
  422.   end
  423. end
  424.  
  425. #==============================================================================
  426. # ** Scene_Battle
  427. #------------------------------------------------------------------------------
  428. #   This class performs battle screen processing.
  429. #==============================================================================
  430.  
  431. class Scene_Battle < Scene_Base
  432.   #--------------------------------------------------------------------------
  433.   # * Alias Listing
  434.   #--------------------------------------------------------------------------
  435.   alias dargor_vx_draw_battle_update update
  436.   alias dargor_vx_draw_update_actor_command_selection update_actor_command_selection
  437.   alias dargor_vx_draw_execute_action execute_action
  438.   alias dargor_vx_draw_execute_action_skill execute_action_skill
  439.   alias dargor_vx_draw_update_target_enemy_selection update_target_enemy_selection
  440.   #--------------------------------------------------------------------------
  441.   # * Frame Update
  442.   #--------------------------------------------------------------------------
  443.   def update
  444.      unless @enemy_skill_window != nil or @draw_command_window != nil
  445.         dargor_vx_draw_battle_update
  446.      else
  447.         super
  448.         update_basic(true)
  449.         update_info_viewport                          # Update information viewport
  450.         if $game_message.visible
  451.            @info_viewport.visible = false
  452.            @message_window.visible = true
  453.         end
  454.         unless $game_message.visible              # Unless displaying a message
  455.            return if judge_win_loss                 # Determine win/loss results
  456.            update_scene_change
  457.            if @enemy_skill_window.active
  458.               update_enemy_skill_selection     # Select party changer command
  459.            elsif @draw_command_window.active
  460.               update_draw_command_selection     # Select party changer command
  461.            end
  462.         end
  463.      end
  464.   end
  465.   #--------------------------------------------------------------------------
  466.   # * Update Actor Command Selection
  467.   #--------------------------------------------------------------------------
  468.   def update_actor_command_selection
  469.      dargor_vx_draw_update_actor_command_selection
  470.      if Input.trigger?(Input::C)
  471.         case @actor_command_window.commands[@actor_command_window.index]
  472.         when Vocab::CommandDraw
  473.            Sound.play_decision
  474.            start_target_enemy_selection
  475.         end
  476.      end
  477.   end
  478.   #--------------------------------------------------------------------------
  479.   # * Update Target Enemy Selection
  480.   #--------------------------------------------------------------------------
  481.   def update_target_enemy_selection
  482.      if Input.trigger?(Input::C) &&
  483.            @actor_command_window.selection == Vocab::CommandDraw
  484.            Sound.play_decision
  485.         Sound.play_decision
  486.         @active_battler.action.target_index = @target_enemy_window.enemy.index
  487.         start_draw_command_selection
  488.         end_target_enemy_selection
  489.         end_skill_selection
  490.         end_item_selection
  491.         return
  492.      end
  493.      dargor_vx_draw_update_target_enemy_selection
  494.   end
  495.   #--------------------------------------------------------------------------
  496.   # * Start Draw Command Selection
  497.   #--------------------------------------------------------------------------
  498.   def start_draw_command_selection
  499.      enemy = @target_enemy_window.enemy
  500.      @help_window = Window_Help.new
  501.      @help_window.y = 56
  502.      @enemy_skill_window = Window_EnemySkill.new(0, 112, 544, 176, enemy)
  503.      @enemy_skill_window.help_window = @help_window
  504.      @enemy_skill_window.active = false
  505.      s1 = Vocab::CommandDrawStock
  506.      s2 = Vocab::CommandDrawCast
  507.      @draw_command_window = Window_Command.new(544, [s1,s2], 2)
  508.   end
  509.   #--------------------------------------------------------------------------
  510.   # * Update Draw Command Selection
  511.   #--------------------------------------------------------------------------
  512.   def update_draw_command_selection
  513.      @draw_command_window.update
  514.      @actor_command_window.active = false
  515.      if Input.trigger?(Input::B)
  516.         end_draw_command_selection
  517.         return
  518.      end
  519.      if Input.trigger?(Input::C)
  520.         @enemy_skill_window.active = true
  521.         return
  522.      end
  523.   end
  524.   #--------------------------------------------------------------------------
  525.   # * End Draw Command Selection
  526.   #--------------------------------------------------------------------------
  527.   def end_draw_command_selection
  528.      if @enemy_skill_window != nil
  529.         @enemy_skill_window.dispose
  530.         @enemy_skill_window = nil
  531.         @draw_command_window.dispose
  532.         @draw_command_window = nil
  533.         @help_window.dispose
  534.         @help_window = nil
  535.      end
  536.      @actor_command_window.active = true
  537.   end
  538.   #--------------------------------------------------------------------------
  539.   # * Update Enemy Skill Selection
  540.   #--------------------------------------------------------------------------
  541.   def update_enemy_skill_selection
  542.      @help_window.update
  543.      @enemy_skill_window.update
  544.      @actor_command_window.active = false
  545.      if Input.trigger?(Input::B)
  546.         @draw_command_window.active = true
  547.         @enemy_skill_window.active = false
  548.         return
  549.      end
  550.      if Input.trigger?(Input::C)
  551.         case @draw_command_window.selection
  552.         when Vocab::CommandDrawStock
  553.            # Play decision SE
  554.            Sound.play_decision
  555.            @active_battler.action.set_skill(@enemy_skill_window.skill.id, 0)
  556.            # Force the action to be executed
  557.            @active_battler.action.forcing = true
  558.            # End draw selection
  559.            end_draw_command_selection
  560.            # Switch to next actor
  561.            next_actor
  562.         when Vocab::CommandDrawCast
  563.            Sound.play_decision
  564.            # Prepare to cast a drawned skill
  565.            @active_battler.action.set_skill(@enemy_skill_window.skill.id, 1)
  566.            # Force the action to be executed
  567.            @active_battler.action.forcing = true
  568.            @active_battler.action.target_index = @enemy_skill_window.enemy.index
  569.            # End draw selection
  570.            end_draw_command_selection
  571.            # Switch to next actor
  572.            next_actor
  573.         end
  574.      end
  575.   end
  576.   #--------------------------------------------------------------------------
  577.   # * Execute Battle Actions
  578.   #--------------------------------------------------------------------------
  579.   def execute_action
  580.      if @active_battler.action.draw?
  581.         case @active_battler.action.draw_kind
  582.         when 0 # Stock
  583.            execute_action_draw_stock
  584.            return
  585.         when 1 # Cast
  586.            execute_action_draw_cast
  587.            return
  588.         end
  589.      end
  590.      # The usual
  591.      dargor_vx_draw_execute_action
  592.   end
  593.   #--------------------------------------------------------------------------
  594.   # * Execute Battle Action: Skill
  595.   #--------------------------------------------------------------------------
  596.   def execute_action_skill
  597.      skill = @active_battler.action.skill
  598.      # Remove 1 skill number
  599.      if @active_battler.is_a?(Game_Actor)# &&
  600.            #!@active_battler.action.draw_kind == 0
  601.         @active_battler.lose_skill(skill, 1)
  602.      end
  603.      # The usual
  604.      dargor_vx_draw_execute_action_skill
  605.   end
  606.   #--------------------------------------------------------------------------
  607.   # * Execute Battle Action: Draw Stock
  608.   #--------------------------------------------------------------------------
  609.   def execute_action_draw_stock
  610.      text = sprintf(Vocab::UseDraw, @active_battler.name)
  611.      @message_window.add_instant_text(text)
  612.      targets = @active_battler.action.make_targets
  613.      display_animation(targets, Skill_Draw::Animation_id)
  614.      # Add skill number
  615.      skill = @active_battler.action.skill
  616.      gain = rand(9)
  617.      if @active_battler.draw_success?(skill, gain)
  618.         if @active_battler.is_a?(Game_Actor)
  619.            @active_battler.gain_skill(skill, gain)
  620.            @active_battler.learn_skill(skill.id)
  621.         end
  622.         name = skill.name
  623.         name += 's' if gain > 1
  624.         text = sprintf(Vocab::DrawGain, @active_battler.name, gain, name)
  625.         @message_window.add_instant_text(text)
  626.         wait(60)
  627.      else
  628.         text = sprintf(Vocab::DrawFail, @active_battler.name)
  629.         @message_window.add_instant_text(text)
  630.         wait(60)
  631.      end
  632.   end
  633.   #--------------------------------------------------------------------------
  634.   # * Execute Battle Action: Draw Cast
  635.   #--------------------------------------------------------------------------
  636.   def execute_action_draw_cast
  637.      # Add skill to known skills
  638.      skill = @active_battler.action.skill
  639.      $game_system.skill_drawned << skill.id
  640.      # Cast the skill
  641.      execute_action_skill
  642.   end
  643. end
Expand to see the code.


Notes

The script requires my Custom Commands script.

-Dargor
Oh, cool.  Works like a charm.  :o

...I dare you to make the whole Junction system.  :P  *dares dramatically!*
Hehe, you're lucky, I'm already working on it. 😛
Woo!  ^_^

Good luck.  :thumb:
That's awesome! Your becoming the "Trickster" of VX =D

Keep 'em coming!
-Krobe
I going to kill you!

I was working on this, including the Junction System aswell, well no need to work on it anymore.. I am going to Play FFVIII again.

Bye. Good work anyway =)
Ok, now you are my scripter hero :P

Final Fantasy is a game. But now, with your script, we can make *our* Final fantasy games!
Thanks guys, I'm glad you like the script! 🙂
I LOVE YOU!!

The draw system is one of my favourite game systems ever! (Aside from the junction system, actually!)

I'm dying for someone to make a junction system. Ever since SephirothSpawn announced he was working on it, I've been waiting and waiting... let's hope you can do this! ;)

Oh one question, can I use this script together with the  [VX] RPG Tankentai Sideview Battle System 2.6 Translated + Addons script? I can't try it out right now because our internet connection is as stable as zero and I'd need to download both scripts. Thanks!!

I'm amazed, this draw system sounds even better than the original FFVIII one...
New2Ya wrote:
Oh one question, can I use this script together with the  [VX] RPG Tankentai Sideview Battle System 2.6 Translated + Addons script? I can't try it out right now because our internet connection is as stable as zero and I'd need to download both scripts. Thanks!!


*butts in*

I don't think it would be a problem.  I've added a few things to that system in the past, and it worked just fine.
Hmm, there seems to be a problem that maybe I'm the only one noticing or having it effect but, the amount of each spell you draw doesn't decrease upon using said spell. Don't know if this is being looked into or even know, just though I'd point it out.

Example:
I draw 9 fires from one enemy, use one of those fires on the enemy and now I should have only 8 fires, but instead I still have 9.
^I have the same problem. Must be a mistake with the script.

Ah, and sadly it doesnt work with the side view battle system. The Draw option is there and you can choose it, but the Draw Stock Cast window doesnt pop up. Instead, it just works like the Attack command.

Too bad, cuz I'm immediatly trying to make it look more like FFVIII. XD

Is it possible to place the Draw command below the Skill Command?
Thanks for the bug report. I've fixed this bug and another minor bug.
I've fixed another minor bug, this one was conflicting with my upcoming Junction script. 😉

See ya!
-Dargor


EDIT:

@New2Ya
You can place the command wherever you want. Look for this line
add_command(1, Vocab::CommandDraw)
Expand to see the code.
and change 1 for the index you want.
Ah that's great Dargor, thanks for that. Having it below Skill somehow just looks better for me. Thanks!

(looking forward to your Junction system...  :thumb: )
Wow, interesting script! 🙂
Problem. I tried to remove the command for one battle like so:

$game_actors[1].remove_command(Vocab::CommandDraw)
Expand to see the code.


And I got an error saying that the wrong number of arguments(0 of 1) were being used.

Basically, I want to know how I can fix that.
That's odd. You seem to use the correct method.
Try to use this line
$game_actors[1].remove_command("#{Vocab::CommandDraw}")
Expand to see the code.

I don't see why this method would work and not the previous one, but it can't be worst 🙂

I'm not at home so I can't test it but I'll take a look at this ASAP.
Nope, still says

Argument error while running script.

incorrect number of arguments(0 for 1).
I've updated the script to version 1.7
You can now set an array of actors with the Draw command and an array of independent actors.
Independent actors does not need skill number to cast skills.

@Ryuzaki
Your doing the right thing. I don't know why it doesn't work... Can you send me your Script.rvdata? I'd, like to take a look at it.
Sure. I'll get on that soon enough.
Dargor wrote:
I've updated the script to version 1.7
You can now set an array of actors with the Draw command and an array of independent actors.
Independent actors does not need skill number to cast skills.

@Ryuzaki
Your doing the right thing. I don't know why it doesn't work... Can you send me your Script.rvdata? I'd, like to take a look at it.


Wow, amazing updates! :D
Just one tiny little question though:
Is there a way to remove the skill number form independent skills and actors?
Even if the actor is independent, it displays ten skill points, and once depleted, goes to 10, but it is still usable, causing a bit of confusion. If there a way to remove the skill number display on independent actors, and make it appear on those affected by the skill (as well as removing the skill from the skill window after they reach zero)?
Oops, sorry, I forgot about that. Fixed!
Dargor wrote:
Oops, sorry, I forgot about that. Fixed!

Awesome! :D
Oh,I found that there still is a count for independent skills on those affected, so to make the count for independent skills on affected actors disappear, I changed lines to 287 to this:
skill_number = '' if Skill_Draw::Independent_Actors.include?(@actor.id) or
      Skill_Draw::Independent_Skills.include?(skill.id)
Expand to see the code.

I may be wrong, as I am a complete newbie to this, so please correct me if I'm wrong!
But, sorry to be a bother again, but is there a way to "forget" the skill, and remove it from the skill window after the skill gets to zero? ^^;;
You're right. I've corrected that bug and I have added a Hide_Zero_Skills variable. Set this variable to true if you want skills with 0 skill number to be hidden.
Just one tiny error I wanna tell you, kept on forgetting.

When you choose Draw, and you can choose between stock and cast, the skill is already highlighted as well.
This causes trouble, as everytime I think I can already choose which skill I want to choose, I actually am meant to choose 'stock' or 'cast'. It just doesn't look finished that way.

Good updates!

(still looking forward to that Junction system. 😆 no pressure!)

EDIT:
Maybe this can spice the draw system up. Right now, the MP and Amount number are next to each other in the Skill list with only the color being different. Now my idea would be to add something like ST and MP next to it to make it more understandable. ST for stock and MP for magic points.
15ST | 25MP

Something like that. Maybe making it look even better by having them higher up like a 'Â ²' type of way.
New2Ya wrote:
Just one tiny error I wanna tell you, kept on forgetting.

When you choose Draw, and you can choose between stock and cast, the skill is already highlighted as well.
This causes trouble, as everytime I think I can already choose which skill I want to choose, I actually am meant to choose 'stock' or 'cast'. It just doesn't look finished that way.

Good updates!

Ok, I'll fix that. :thumb:

New2Ya wrote:
EDIT:
Maybe this can spice the draw system up. Right now, the MP and Amount number are next to each other in the Skill list with only the color being different. Now my idea would be to add something like ST and MP next to it to make it more understandable. ST for stock and MP for magic points.
15ST | 25MP

Something like that. Maybe making it look even better by having them higher up like a 'Â ²' type of way.


That's a good idea. I prefer the idea of the small number because the ST/MP would take too much place.

New2Ya wrote:
(still looking forward to that Junction system. 😆 no pressure!)

I'm almost finished with it. 🙂 I still have to finish the summons system and the auto-abilities system.
I'll also make demo since the script is, not big, but HUGE.

Take care!
-Dargor
Quote:
That's a good idea. I prefer the idea of the small number because the ST/MP would take too much place.

Ah, but you mean what I meant, no? ST and MP being as small as the ² number? Like on the top right of the number?

Oh well, you'll think of something I'm sure.

Quote:
I'm almost finished with it. I still have to finish the summons system and the auto-abilities system.
I'll also make demo since the script is, not big, but HUGE.

I officially love you. :thumb:

Here I was thinking you were simply aiming at the junctioning magic things, but it seems you are getting into detail. Props!

EDIT:
I noticed an error, Dargor.

Independent skills (no points needed) are not visible with Hide_Zero_Skills = false option on 'true'.
I'm getting error:
line 169
@mjack1234
Can you give me more details on the error?
Which line, what kind of error, the error message, etc.

Original thread: https://www.hbgames.org/forums/viewtopic.php?t=47012