Jump to content
New account registrations are disabed. This website is now an archive. Read more here.
  • 0
enigmaopoeia

[SOLVED!] Removing specific commands in battle

Question

I have a question concerning removing commands in battle in RPG Maker XP. I used search engines to look for a script that handles it, but my results either come up with custom battle scripts for RPG Maker VX.

Basically what I want to do is that this game I'm working on, Attack and Items are completely useless. The only commands that should be used in battle are Skills and Defend. I noticed that I was able to get the desired result by editing the "Scene_Battle 1" script to state under "* Main Processing":
 

CODE
    # Make actor command window
    s2 = $data_system.words.skill
    s3 = $data_system.words.guard
    @actor_command_window = Window_Command.new(160, [s2, s3])

Thus in battle, I see:

RMXP_Battle.png

However, the Skills commands act as Attack and the Defend command act as Magic. Is there a way to change this so I can get Skills to bring up Skills and Defend to make my characters defend?

Edited by enigmaopoeia

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0

search the method update_phase3_basic_command, and you'll see that RMXP decides what to do based on the command_window's index.

skill/defend are set to happen when the index is a certain number. when the player select the first item on the menu, index is 0, and for defend, index is 1. so i moved the lines that executed the 'skill' and placed them under 'when 0', and the lines that execute 'Defend' to be under 'when 1'. here's the fixed method.

class Scene_Battle
  def update_phase3_basic_command
    # If B button was pressed
    if Input.trigger?(Input::B)
      # Play cancel SE
      $game_system.se_play($data_system.cancel_se)
      # Go to command input for previous actor
      phase3_prior_actor
      return
    end
    # If C button was pressed
    if Input.trigger?(Input::C)
      # Branch by actor command window cursor position
      case @actor_command_window.index
      when 0  # attack >> changed to 'Skill'
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Set action
        @active_battler.current_action.kind = 1
        # Start skill selection
        start_skill_select
      when 1  # skill >> changed to 'Defend'
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Set action
        @active_battler.current_action.kind = 0
        @active_battler.current_action.basic = 1
        # Go to command input for next actor
        phase3_next_actor
      end
      return
    end
  end
end
it's a good habit not to change RMXP default scripts direcly, instead, make a new page above 'Main' and paste this in it. Edited by Metaclaw

Share this post


Link to post
Share on other sites
  • 0
search the method update_phase3_basic_command, and you'll see that RMXP decides what to do based on the command_window's index.

 

Ah, there it is! I was looking everywhere in the "Scene_Battle_" scripts and somehow I gloss over that.

 

it's a good habit not to change RMXP default scripts direcly, instead, make a new page above 'Main' and paste this in it.

 

Ah, now I'll learn to not change to much with RPG Maker XP's defaults scripts.

Also thank you so much for helping me out. It worked out exactly as I wanted it!

Edited by enigmaopoeia

Share this post


Link to post
Share on other sites
  • 0

Question solved: Closing. PM a mod if you wish to re-open this thread.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...