[XP] First Strike Skills

Started by G_G, April 10, 2010, 10:10:33 pm

Previous topic - Next topic

G_G

First Strike Skills
Authors: game_guy
Version: 1.0
Type: Battle Add-On
Key Term: Battle Add-On



Introduction

Remember how in pokemon games, there were certain moves like Quick Attack you would attack first no matter what? This does exactly that!
NOTE: I made a script called First Strike States. This allows skills to strike first instead of having to have a first strike state to attack first.
NOTE: If more then one actor/enemy uses a first strike skill, the fastest will attack first.
NOTE: Depending if you place this below or above First Strike States things may change. (If you use First Strike States.) If Above: Battlers with a First Strike State will attack first then first strike skills. If Below: Battlers that use a First Strike Skill will use the skill first then battlers will attack with first strike states.


Features


  • Setup as many skills
  • Skills attack first at every turn



Screenshots

N/A


Demo

N/A


Script

Spoiler: ShowHide

#===============================================================================
# First Strike Skills
# Author game_guy
# Version 1.0
#-------------------------------------------------------------------------------
# Intro:
# Remember how in pokemon games, there were certain moves like Quick Attack you
# would attack first no matter what? This does exactly that!
# NOTE: I made a script called First Strike States. This allows skills to strike
# first instead of having to have a first strike state to attack first.
# NOTE: If more then one actor/enemy uses a first strike skill, the fastest
# will attack first.
#
# Features:
# Setup as many skills
# Skills attack first at every turn
#
# Instructions:
# Go down to Config and set everything up.
#
# First_Strike_Skills = array of skill id's
#   Every skill you want to be a First Strike Skill, place the id in the array.
#
# Compatability:
# Not tested with SDK.
# Made for the Default Battle System
# Will probably not work with RTAB (Not Tested)
#
# Credits:
# game_guy ~ For making it
# Shining Riku ~ For the idea based from First Strike States
#===============================================================================
module GameGuy
  #==========================================
  # Config
  #==========================================
  First_Strike_Skills = [57]
  #==========================================
  # End Config
  #==========================================
end
class Scene_Battle
  alias gg_attack_first_skills_lat make_action_orders
  def make_action_orders
    gg_attack_first_skills_lat
    if $game_system.attack_always == false
      if $game_party.attacked
        return
      end
    end
    @tempa = @action_battlers
    @tempa2 = []
    @tempa3 = []
    for i in @tempa
      if i.current_action.kind == 1 &&
          GameGuy::First_Strike_Skills.include?(i.current_action.skill_id)
        @tempa2.push(i)
      else
        @tempa3.push(i)
      end
    end
    @action_battlers = []
    @tempa2.each {|i| @action_battlers.push(i)}
    @tempa3.each {|i| @action_battlers.push(i)}
  end
end



Instructions

I recommend placing below my First Strike States (if using)
Rest is in the script.


Compatibility

Not tested with SDK.
Made for Default Battle System.
Probably won't work with RTAB (Not Tested)


Credits and Thanks


  • game_guy ~ For making it
  • Shining Riku ~ For the idea of it based from First Strike States



Author's Notes

Enjoy!

Shining Riku

YAY! Thanks man! 8D

This is awesome! *powers up*

If I get any more ideas and whatnot, i'll post 'em where I posted my first one

Blizzard

Damn, you're fast. O_o; You remind me of my old days when I was the same. Somebody posts a script request and half an hour later I post a new script topic. xD
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

G_G

It wasn't really hard. I used my First Strike States as a base. I just had to modify a few lines is all. xD

The instructions took the longest. (5 minutes because I was lazy)

Aqua

April 12, 2010, 02:49:14 pm #4 Last Edit: April 12, 2010, 02:50:19 pm by Aqua
Quote from: Blizzard on April 12, 2010, 02:51:06 am
Damn, you're fast. O_o; You remind me of my old days when I was the same. Somebody posts a script request and half an hour later I post a new script topic. xD


I remember when you made that tutorial on more armor slots just because I asked on IRC
<3

*sigh*
Those were the days...

Then you went and quit
*grumbles*

Fantasist

I wanted to post yesterday, but why don't you merge the two scripts? It makes more sense (to me anyway).

QuoteThe instructions took the longest. (5 minutes because I was lazy)

The reason why I didn't release about a handful of scripts yet -_-
Do you like ambient/electronic music? Then you should promote a talented artist! Help out here. (I'm serious. Just listen to his work at least!)


The best of freeware reviews: Gizmo's Freeware Reviews




Hatsamu

I'm not a fan of necroposting so I apoligize for it, but I can't get this to work as I get this error message when I use a skill defined as First Strike:

" not defined method 'attack_always' "


I'm using Blizz Tons. Its a compatibility issue or is it something that could be easily fixed?



Thanks in advance, it would be really nice to got this kind  of skills at my game.

Boba Fett Link

I got a similar error as Hatsamu, but it says:


Script 'First Strike' line 46: NoMethodError occurred.

undefined Method 'attack_always' for #<Game_System:0x19d4148>



Anyone know what is wrong?
This post will self-destruct in 30 seconds.

G_G

remove these lines
    if $game_system.attack_always == false
      if $game_party.attacked
        return
      end
    end


No idea what I was thinking there. O_o

Boba Fett Link

This post will self-destruct in 30 seconds.