Trying to get rid of fight/escape menu

Traveling Bard

The Bard
Veteran
Joined
Jul 4, 2012
Messages
565
Reaction score
491
First Language
English
Primarily Uses
I would like to disable/deactivate/get rid of the fight/escape menu and add a new command item called "Run" for each actor on the field. So I looked this up via google and found the following by Tsukihime:

class Scene_Battle < Scene_Base alias :party_window_skip_battle_start :battle_start def battle_start party_window_skip_battle_start @party_command_window.deactivate if BattleManager.input_start command_fight else turn_start end endendWhich works to skip the menu but I am still able to press b(x) and there's the menu! lol 

I went into scene battle to see if I could somehow disable the first actor's ability to cancel but I couldn't figure out how to do that. Anyone have any ideas? 
 
Last edited by a moderator:

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
try this

Code:
class Scene_Battle  def create_actor_command_window    @actor_command_window = Window_ActorCommand.new    @actor_command_window.viewport = @info_viewport    @actor_command_window.set_handler(:attack, method(:command_attack))    @actor_command_window.set_handler(:skill,  method(:command_skill))    @actor_command_window.set_handler(:guard,  method(:command_guard))    @actor_command_window.set_handler(:item,   method(:command_item))    #Remove cancel handler    #@actor_command_window.set_handler(:cancel, method(:prior_command))    @actor_command_window.x = Graphics.width  endend
PS: are you using any custom battle engine scripts?
 

Traveling Bard

The Bard
Veteran
Joined
Jul 4, 2012
Messages
565
Reaction score
491
First Language
English
Primarily Uses
I am not using any custom battle scripts. Is there anyway to only disable prior command for the first character? Reason I ask is because I have several party members and if I made a mistake in choosing a technique and want to go back to the last character, I can't. This might frustrate players that are used to being able to go back. Thank you for the quick response, btw :)
 

Evgenij

Veteran
Veteran
Joined
Aug 28, 2013
Messages
349
Reaction score
100
First Language
German
Primarily Uses
N/A
I dont know if this solution is optimal but you could use this snipped with that from tsukihime:

Code:
module BattleManager  #--------------------------------------------------------------------------  # * To Previous Command Input  #--------------------------------------------------------------------------  def self.prior_command    begin      if !actor || !actor.prior_command        @actor_index -= 1        @actor_index = 0 if @actor_index < 0       end    end until actor.inputable?    return true  endend
 

Traveling Bard

The Bard
Veteran
Joined
Jul 4, 2012
Messages
565
Reaction score
491
First Language
English
Primarily Uses
Thanks eugene, that worked like a charm  BD
 

ShadowLurk

Tanoshii~
Veteran
Joined
Feb 14, 2014
Messages
226
Reaction score
53
Primarily Uses
I dont know if this solution is optimal but you could use this snipped with that from tsukihime:

module BattleManager #-------------------------------------------------------------------------- # * To Previous Command Input #-------------------------------------------------------------------------- def self.prior_command begin if !actor || !actor.prior_command @actor_index -= 1 @actor_index = 0 if @actor_index < 0 end end until actor.inputable? return true endend
That snippet has a potential problem. Say, when the first actor is stunned (and therefore not inputtable), it will create an infinite loop. Need to add something to prevent that.

Code:
module BattleManager  #--------------------------------------------------------------------------  # * To Previous Command Input  #--------------------------------------------------------------------------  def self.prior_command    last_actor_index = @actor_index    retries = $game_party.max_battle_members    begin      if !actor || !actor.prior_command        @actor_index -= 1        @actor_index = 0 if @actor_index < 0       end      retries -= 1      if retries == 0        @actor_index = last_actor_index        break      end    end until actor.inputable?    return true  endend
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD

Forum statistics

Threads
105,868
Messages
1,017,078
Members
137,580
Latest member
Snavi
Top