Target-All Weapons
Weapons that target their attacks against all enemies, monsters, or targets when assigned a certain specific "Target-All" or "Multi-Target" element in the database. This script should require no other scripts and only perform this necessary function.
Basically the developer chooses what the name of the Element should be in the script and the Element roster in the System tab of the Database. The developer then assigned that Element to the weapon which s/he wishes to target all enemies when attacked with in battle. The weapon will always target all enemies when attacked with.
This is similar to certain Bow and Gun weapons in Treasures of the Rudra which targeted all enemies for their attack.
module RPG
class Weapon
def unleash_id(id)
case id
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# START Configuration for the skills weapons unleash
# Use when <WeaponID> then return <ID of Unleash skill>
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
when 1 then return 7
when 5 then return 10
when 25 then return 19
when 29 then return 22
#add new lines here
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# END Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
end
return 0
end
def unleash_chance(id)
case id
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# START Configuration for unleash chance.
# this must be filled out other wise weapons will NEVER unleash
# Use when <WeaponID> then return <% chance of unleash (a # 0 - 100)>
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
when 1 then return 100
when 5 then return 50
when 25 then return 25
when 29 then return 75
#add new lines here
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# END Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
end
return false
end
end
end
class Game_BattleAction
attr_accessor :unleash
alias ryex_WUS_GBattleAction_clear_later clear
def clear
@unleash = false
ryex_WUS_GBattleAction_clear_later
end
end
class Scene_Battle
alias ryex_WUS_SBattle_update_phase4_step2_later update_phase4_step2
def update_phase4_step2
if @active_battler.is_a?(Game_Actor)
if @active_battler.current_action.kind == 0
unless $data_weapons[@active_battler.weapon_id].unleash_chance(@active_battler.weapon_id) == false
if rand(100) <= ($data_weapons[@active_battler.weapon_id].unleash_chance(@active_battler.weapon_id))
@active_battler.current_action.kind = 1
@active_battler.current_action.skill_id = $data_weapons[@active_battler.weapon_id].unleash_id(@active_battler.weapon_id)
@active_battler.current_action.unleash = true
else
@active_battler.current_action.unleash = false
end
else
@active_battler.current_action.unleash = false
end
end
end
ryex_WUS_SBattle_update_phase4_step2_later
end
alias ryex_WUS_SBattle_make_skill_action_result_later make_skill_action_result
def make_skill_action_result
if @active_battler.current_action.unleash == true
# Get skill
@skill = $data_skills[@active_battler.current_action.skill_id]
@active_battler.current_action.unleash = false
@status_window.refresh
# Show skill name on help window
#@help_window.set_text(@active_battler.name+"'s Weapon Unleashes "+@skill.name, 1)
# Set animation ID
@animation1_id = @skill.animation1_id
@animation2_id = @skill.animation2_id
# Set command event ID
@common_event_id = @skill.common_event_id
# Set target battlers
set_target_battlers(@skill.scope)
# Apply skill effect
for target in @target_battlers
target.skill_effect(@active_battler, @skill)
end
else
ryex_WUS_SBattle_make_skill_action_result_later
end
@active_battler.current_action.unleash = false
end
end
heres a modified version of my weapons unleash skill script it will have the same effect if you set the unleash chance to 100 and have the skill the weapon unleashes target all enemies.
also when you make the skill in the data base it should look like this example for the iron sword
(http://i15.photobucket.com/albums/a400/ryex/Exsamples/exsample.png)
all those values should stay the same except for the power set that equal to the weapons attack
(sorry,this is a bit old, i guess)
But anyways, isn“t there something similiar in Tons of add-ons?
I mean this
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# Target 'em all! by Blizzard
# Version: 1.1b
# Type: Skill Enhancement
# Date: 27.9.2006
# Date v1.1b: 10.12.2007
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# This add-ons will allow you to create skills that can target all enemies
# and all party members. Include all such skill IDs in the FULL_TARGET_IDS
# array and separate them with commas. Note that you should make the skill
# target all enemies/all party members/etc. to avoid the cursor being
# displayed.
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
This is for skills. And this script allows to target all enemies AND actors.
# This add-on will allow you to create skills that can target all enemies
# and all party members.