11-06-2005, 01:00 PM
(This post was last modified: 07-01-2017, 05:24 AM by DerVVulfman.)
Unleash System
by Vandette
Nov 6 2005
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:
with this:
Now find:
And replace it with:
Next, goto Game_Battler 3.
Find def attack_effect(attacker), and replace that line with:
Now right after:
put:
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:
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:
id = the id number of the weapon
X = the skill id to be invoked for that weapon
Here's an example:
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:
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!
FF1XP.exe (Size: 292.07 KB / Downloads: 2)
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.
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!
FF1XP.exe (Size: 292.07 KB / Downloads: 2)