Unleash System
#1
Unleash System
by Vandette
Nov 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.


Alright, this is a unleash system similar to that of golden sun. If you don't know what that means then one of the guards in the demo can explain it to you.


Ok here we go:

In Scene_Battle 4, goto def make_basic_action_result,
replace this:

Code:
@animation2_id = @active_battler.animation2_id

with this:

Code:
if @active_battler.is_a?(Game_Actor)
        if $data_weapons[@active_battler.weapon_id].yesorno == true
          if rand(4) > 1
            @animation2_id = $data_skills[$data_weapons[@active_battler.weapon_id].unleash_id].animation2_id
            unleashtext = (@active_battler.name + "'s " + $data_weapons[@active_battler.weapon_id].name + " unleashes " + $data_skills[$data_weapons[@active_battler.weapon_id].unleash_id].name + "!")
            @help_window.set_text(unleashtext, 1)
            unleash = true
          else
            @animation2_id = @active_battler.animation2_id
            unleash = false
          end
        end
      else
        @animation2_id = @active_battler.animation2_id
        unleash = false
      end


Now find:

Code:
for target in @target_battlers
        target.attack_effect(@active_battler)
      end

And replace it with:

Code:
for target in @target_battlers
        target.attack_effect(@active_battler, unleash)
      end


Next, goto Game_Battler 3.
Find def attack_effect(attacker), and replace that line with:

Code:
def attack_effect(attacker, unleash = false)


Now right after:

Code:
if hit_result == true

put:

Code:
if unleash == true
        skill_effect(attacker, $data_skills[$data_weapons[attacker.weapon_id].unleash_id])
        return
      end


Almost done, Now make a new script above Main (name it whatever you want, but for this tutorial we'll refer to it as Setup).
put this in it:

Code:
module RPG
class Weapon
  
   alias setupunleash initialize
  
   def initialize
     setupunleash
     @unleash_id = 0
     @yesorno = false
   end
  
attr_accessor :unleash_id
attr_accessor :yesorno

end
end


Now finally, goto Game_Actors, and find its def initialize.
Here you will determine what weapons have unleash capabilites and what skills they invoke.
The format is as follows:

Code:
$data_weapons[id].unleash_id = X
    $data_weapons[id].yesorno = true

id = the id number of the weapon
X = the skill id to be invoked for that weapon

Here's an example:

Code:
$data_weapons[1].unleash_id = 7
    $data_weapons[1].yesorno = true

That will cause weapon 1 (default: Bronze Sword) to unleash skill 7 (default: Fire) when the unleash happens.

Do that for each weapon and there you are!

Remember that unleashes are RANDOM they only occur when the random statement is true.
To change the random statment to suit your needs, simply do the following:

Goto Scene_Battle 4 and find def make_basic_action_result.
Scroll down and find:

Code:
if rand(4) > 1

For all the noobs out there this means:
-the game will make a random number between 4 and 0
-if the number is greater than 1, then the if statement is true and the unleash occurs
just change that statement around if you want the chances of unleashes to increase/decrease.

Thanks goes to Khatharr for help when i couldn't figure somethings out!

Well, thats all folks! Enjoy it and don't forget to credit me if you use it!

Don't forget to check out the demo!

.exe   FF1XP.exe (Size: 292.07 KB / Downloads: 2)
}


Messages In This Thread
Unleash System - by Vandette - 11-06-2005, 01:00 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Dynamic Weather and Time System ThallionDarkshine 0 2,835 05-25-2012, 01:00 PM
Last Post: ThallionDarkshine
  Tutorial system Jimmie 0 2,678 08-14-2009, 01:00 PM
Last Post: Jimmie
  New and Easy Cache system azrith001 0 2,758 09-02-2008, 01:00 PM
Last Post: azrith001
  Vehicle System El Conductor 0 2,763 12-22-2007, 01:00 PM
Last Post: El Conductor
  IMPROVED Fog of War System Samo the thief 0 2,489 05-06-2007, 01:00 PM
Last Post: Samo the thief
  Weight Equip System and Limit Samo the thief 0 2,548 01-29-2007, 01:00 PM
Last Post: Samo the thief
  Prize Points System Dark Ruby 0 2,530 01-28-2007, 01:00 PM
Last Post: Dark Ruby
  Export and Import System EmilyAnnCoons 0 2,404 12-29-2006, 01:00 PM
Last Post: EmilyAnnCoons
  Hawk's Mouse Control System Hawk-McKain 0 2,736 11-05-2006, 01:00 PM
Last Post: Hawk-McKain
  Time / Day/Night System mikah 0 2,362 09-26-2006, 01:00 PM
Last Post: mikah



Users browsing this thread: 1 Guest(s)