Blitz Script
#1
Blitz Script
by makeamidget
May 6, 2005

This is a locked, single-post thread from Creation Asylum. Archived here to prevent its loss.
No support is given. If you are the owner of the thread, please contact administration.


what this is: this is like the Blitz skill found in Final Fantasy 6, used by Sabin

what it does: it requires you to input a series of button presses and does an attack based on the button presses

how to do it: go into a battle, pick blitz, input a series of button presses and when you are done press 'enter'

idea to do this goes to eccid



create a new class, at 9 call it whatever
the blitz skills are skills, you learn them just like any other skill, and if you don't know them then you can't use them, for the description put the commands that are required to use it, make them only useable in battle, and make a failure one that targets one enemy, so that if they mess up they don't know, until it executes it

it selects who attack or heal randomly, if you don't like that, then fix it yourself!! or ask and i might do it, it depends, okay now get ready for some editing, woohoo




in Scene_Battle 1 somewhere in def main, put
Code:
@blitz = Window_Base.new(0,0,0,0)
    @blitz.active = false


in def update, still in Scene_Battle 1 put
Code:
if @blitz.active == true
      blitz_update
    end


in Scene_Battle 3 go to def update_phase3_basic_command, then in
if Input.trigger?(Input::C) go to when 1 and under
$game_system.se_play($data_system.decision_se)
add

Code:
if @active_battler.class_id == 9
          @command = []
          @i = 0
          @blitz.active = true
          @skill = nil
          @active_battler.current_action.kind = 1
          @actor_command_window.active = false
          @actor_command_window.visible = false
        else

be sure to put an end right above when 2

then above def update_phase3_item_select

Code:
def blitz_update

      if Input.trigger?(Input::UP)
        @command[@i] = 1
        @i +=1
      end

      if Input.trigger?(Input::DOWN)
        @command[@i] = 2
        @i +=1
      end

      if Input.trigger?(Input::LEFT)
        @command[@i] = 3
        @i +=1
      end

      if Input.trigger?(Input::RIGHT)
        @command[@i] = 4
        @i +=1
      end

      if Input.trigger?(Input::X)
        @command[@i] = 5
        @i +=1
      end

      if Input.trigger?(Input::Y)
        @command[@i] = 6
        @i +=1
      end

      if Input.trigger?(Input::Z)
        @command[@i] = 7
        @i +=1
      end

      if Input.trigger?(Input::L)
        @command[@i] = 8
        @i +=1
      end

      if Input.trigger?(Input::R)
        @command[@i] = 9
        @i +=1
      end

      if Input.trigger?(Input::B)
        # if you want anything to happen when player tries to cancel put it here
      end

      if Input.trigger?(Input::C)
        for i in 1...$game_temp.blitz_list.size
          if @command == $game_temp.blitz_list[i]
            @skill = $game_temp.blitz_skill[i]
            Input.update
          end
        end
        if (@skill == nil and @command.size >= 1) or (not @active_battler.skill_can_use?(@skill.id))
          # ブザー SE ã‚’æ¼”å¥?
          @skill = $data_skills[89] #change the 89 to the skill that you want it to use upon blitz failure
        end
        @active_battler.current_action.skill_id = @skill.id
        @blitz.active = false
        @actor_command_window.active = false
        @actor_command_window.visible = false
        if @skill.scope == 1
          @active_battler.current_action.target_index = rand($game_temp.battle_troop_id.size) - 1
          phase3_next_actor
        elsif @skill.scope == 3 or @skill.scope == 5
          @active_battler.current_action.target_index = rand($game_party.actors.size) -1
          phase3_next_actor
        else
          phase3_next_actor
        end
      end
    end


and make this a new script somewhere before main(right click and pick insert)
Code:
#=======================================================================
#-Sample blitz list ----------------------------------------------------
#-----------------------------------------------------------------------
#-script by makeamidget-------------------------------------------------
#-----------------------------------------------------------------------
#---------to make a new blitz attack just add---------------------------
#---------@blitz_list[1] = [buttons to push]----------------------------
#---------@blitz_skill[1] = $data_skills[id number of attack to perform]
#=======================================================================
#-1 is up---------------------------------------------------------------
#-2 is down-------------------------------------------------------------
#-3 is left-------------------------------------------------------------
#-4 is right------------------------------------------------------------
#-5 is A(input X)-------------------------------------------------------
#-6 is S(input Y)-------------------------------------------------------
#-7 is D(input Z)-------------------------------------------------------
#-8 is Q(input L)-------------------------------------------------------
#-9 is W(input R)-------------------------------------------------------
#=======================================================================
#-you will fail unless the character knows the skills that you put in---
#-blitz_skill make sure that you learn or will learn the skill----------
#=======================================================================





class Game_Temp
  attr_reader :blitz_list     #keys you press to activate blitz
  attr_reader :blitz_skill    #skill that correct blitz will do

  alias blitz_list_initialize initialize

  def initialize
    blitz_list_initialize
    @blitz_list=[]
    @blitz_skill = []
    get_blitz_list
  end

  def get_blitz_list
    #first blitz
    @blitz_list[1] = [1,2,3,4,4,3,2,1]
    @blitz_skill[1] = $data_skills[3]

    #second blitz
    @blitz_list[2] = [1,2,3,4]
    @blitz_skill[2] = $data_skills[7]

    #third blitz
    @blitz_list[3] = [2,1,3,4]
    @blitz_skill[3] = $data_skills[1]
  end
end


#=======================================================================
#-Skill_Command_Change by Vash------------------------------------------
#=======================================================================
#-to change the command Skill to class specific things just change the--
#-class id to the id of the class you want to change and change the-----
#-command to what you want it to say instead, make sure that you keep---
#-the ' or it will not work---------------------------------------------
#=======================================================================

class Scene_Battle
  SKILL_COMMAND_NAMES = [
    {'CLASS_ID'=>1,'COMMAND'=>'Skill'},
    {'CLASS_ID'=>2,'COMMAND'=>'Skill'},
    {'CLASS_ID'=>3,'COMMAND'=>'Skill'},
    {'CLASS_ID'=>4,'COMMAND'=>'Skill'},
    {'CLASS_ID'=>5,'COMMAND'=>'Skill'},
    {'CLASS_ID'=>6,'COMMAND'=>'Skill'},
    {'CLASS_ID'=>7,'COMMAND'=>'Skill'},
    {'CLASS_ID'=>8,'COMMAND'=>'Skill'},
    {'CLASS_ID'=>9,'COMMAND'=>'Blitz'},
    ]
end

class Window_Command
  def set_command_name(index,name)
    @commands[index] = name
    refresh
  end
end


class Scene_Battle
  alias skill_names_original_phase3_setup_command_window phase3_setup_command_window
  def phase3_setup_command_window
    skill_names_original_phase3_setup_command_window
    return if @active_battler.nil?
    SKILL_COMMAND_NAMES.each do |names|
      if names['CLASS_ID'] == @active_battler.class_id
        @actor_command_window.set_command_name(1,names['COMMAND'])
        break
      end
    end
  end
end

the list above is just a sample, for it to work for you, you will have to do a little bit of editing

put this in the sample list to make a new blitz attack

$game_temp.blitz_list[?] = [blitz input]
$game_temp.blitz_skill[?] = $data_skills[skill]

okay just put all the skills that you want to be a blitz in the sample list,

for the ?'s just put the next number from the other ones, the next one would be '4', you have to put the same number in for both the blitz_list and the blitz_skill or it won't work how you want it too. blitz input is the buttons you want to have pressed to activate it, and skill is the id of the skill you want to use upon correct blitz input. the blitz's are tied in to the skills, so you can put anything that you want in here for the blitz's, you will get a failure unless the blitz character knows the skill, so you can learn new blitz's like you would learn skills

since the blitz character can't select skills in battle, the only way for him to do them is to input them correctly, the same goes for the menu, since you make them only useable in battle, you can't use them there, you can only view them


[align=center]NEW!![//align]

okay the blitz_update that was posted above is for random selection of the enemies to attack the one i'm about to post is if you want the player to be able to pick the character to attack so if you do indeed want this then replace the def blitz_update from above with this

Code:
def blitz_update
    if Input.trigger?(Input::UP)
      @command[@i] = 1
      @i +=1
    end

    if Input.trigger?(Input::DOWN)
      @command[@i] = 2
      @i +=1
    end

    if Input.trigger?(Input::LEFT)
      @command[@i] = 3
      @i +=1
    end

    if Input.trigger?(Input::RIGHT)
      @command[@i] = 4
      @i +=1
    end

    if Input.trigger?(Input::X)
      @command[@i] = 5
      @i +=1
    end

    if Input.trigger?(Input::Y)
      @command[@i] = 6
      @i +=1
    end

    if Input.trigger?(Input::Z)
      @command[@i] = 7
      @i +=1
    end

    if Input.trigger?(Input::L)
      @command[@i] = 8
      @i +=1
    end

    if Input.trigger?(Input::R)
      @command[@i] = 9
      @i +=1
    end

    if Input.trigger?(Input::B)
    end


    if Input.trigger?(Input::C)
      for i in 1...$game_temp.blitz_list.size
        if @command == $game_temp.blitz_list[i]
          @skill = $game_temp.blitz_skill[i]
          Input.update
        end
      end

      if (@skill == nil and @command.size >= 1) or (not @active_battler.skill_can_use?(@skill.id))
        # ブザー SE ã‚’æ¼”å¥?
        @skill = $data_skills[89]
      end
      @active_battler.current_action.skill_id = @skill.id
      @blitz.active = false
      @actor_command_window.active = false
      @actor_command_window.visible = false

      if @skill.scope == 1
        start_enemy_select Â�  Â�  Â�  Â�  Â�  Â�  Â�  
      elsif @skill.scope == 3 or @skill.scope == 5
        start_actor_select
      else
        phase3_next_actor
      end
    end
  end



things still to add
I will put these in based on what yall think. So, what do you think?


put a time limit to input blitz attack(yet again, maybe not)
not let it go back to character if they mess up blitz, like if you know that you messed up and you want to try again


as far as i know there are no problems so..... if you find one you know what to do


Theres a demo below too, so try it out there if you want

.zip   Blitz.zip (Size: 207.19 KB / Downloads: 3)
}


Possibly Related Threads…
Thread Author Replies Views Last Post
  Steal and Mug Script Lethrface 0 3,041 08-08-2011, 01:00 PM
Last Post: Lethrface
  Book Script and Utility Bruth 0 2,740 06-10-2009, 01:00 PM
Last Post: Bruth
  Custom EXP Script Dargor 0 2,560 11-24-2007, 01:00 PM
Last Post: Dargor
  Clan Script ShockWave 0 2,615 08-27-2007, 01:00 PM
Last Post: ShockWave
  ARMS Script El Conductor 0 2,566 08-04-2007, 01:00 PM
Last Post: El Conductor
  Juke Box Script polraudio 0 2,730 06-17-2007, 01:00 PM
Last Post: polraudio
  Quest Script Samo the thief 0 2,561 03-12-2007, 01:00 PM
Last Post: Samo the thief
  Quest Script by SAMO Samo the thief 0 2,524 12-29-2006, 01:00 PM
Last Post: Samo the thief
  An easier WORKING party change script The Ghost 0 2,494 07-09-2006, 01:00 PM
Last Post: The Ghost
  Mission Script Leon Westbrooke 0 2,728 07-04-2006, 01:00 PM
Last Post: Leon Westbrooke



Users browsing this thread: 1 Guest(s)