Field of Aether System
Authors: Aqua
Version: 1.10
Type: Blizz-ABS Skills Add-on
Key Term: Blizz-ABS Plugin
IntroductionThis script is a plug-in for the popular Blizz-ABS. It allows for skills to create an elemental field which allows for new skills to be used within the field, much like the PS2 game, Tales of the Abyss.
Features
- Allows for new skills to be used for actors and enemies in a fun way
- Easily customized
- Lag-free
Planned Features
- FoA skill description in skill menu
- Different field sizes
- Fields being used as multiple elements
Screenshots
(http://i115.photobucket.com/albums/n296/TerreAqua/Field.png)
Basil Using a Fire FoA Charged Skill: ShowHide
(http://i115.photobucket.com/albums/n296/TerreAqua/FoACharge.png)
DemoLink Here (http://starrodkirby86.web44.net/AquasStuff/Field_of_Aether_Demo.zip)
ScriptPut it below Blizz-ABS, above Main.
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=#
# Field of Aether Script by TerreAqua
# Version: 1.10
# Type: Blizz-ABS Skills Add-on
# Key Term: Skill Add-on
# Date: 9/3/08
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=#
#===============================================================================
# Information
#-------------------------------------------------------------------------------
#
# This script is a plug-in for the popular Blizz-ABS. It allows for skills
# to create an elemental field which allows for new skills to be used within
# the field, much like the PS2 game, Tales of the Abyss.
#
# If you need to contact me about this script, please go to:
# http://forum.chaos-project.com
#
# You should have only gotten this script from http://chaos-project.com
# Please let me know if you have found it somewhere else.
#===============================================================================
#:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~#
#:~:~:~:~:~:~:~:~:~:~::~:~:~: Instructions :~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~#
#:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~#
#===============================================================================
# Fill out all the info in the below module with the settings that you want.
# Please make sure that
# FIELD_ELEMENTS,
# FIELD_EVENT_ID,
# FIELD_SWITCHES, and
# FIELD_ELE_CHARGE
# are in same corresponding order to avoid possible bugs.
#
# In order for a skill to make a field, it needs to have the elements of
# one of the FIELD_ELEMENTS and has to have the element set up in FIELD.
# NOTE:
# If a skill that creates a field has multiple FIELD_ELEMENTS for elements,
# then it will create only the elemental field of the last element set up in
# FIELD_ELEMENTS that the skill has.
#-------------------------------------------------------------------------------
#
# IMPORTANT!!!!! YOU MUST DO THIS FOR THIS PLUG-IN TO WORK
# On the map ID that you set up for FIELD_MAP_ID, make one event for each
# elemental field that you have, making sure that the event IDs match
# FIELD_EVENT_ID.
#
# For best results it is recommended that you have this event coding for each
# event.
#
# Conditions: Switch ID (corresponding one in FIELD_SWITCHES) to be on
# Event Graphic: An elemental field
# Trigger: Parallel Process
# Options: Through (others depending on how you want it)
# Event Commands: (Remember to change the Variables to appropriate numbers)
#
# Control Variables: [0000: Hero Map X] = Player's Map X
# Control Variables: [0000: Hero Map Y] = Player's Map Y
# Script: @foatime = $game_variables[
# AquaFoA::FIELD_TIME_ID] /
# Graphics.frame_rate
# Conditional Branch: @foatime == AquaFoA::FIELD_TIME
# Control Switches: [Corresponding one in FIELD_SWITCHES: ] = Off
#
# Else
# Control Variables [0000: FIELD_TIME_ID] += 1
# (Add optional, misc. coding here ie. heal party)
#
# Branch End
#
#
#===============================================================================
module AquaFoA
#:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~#
#:~:~:~:~:~:~:~:~:~:~:~: Main Configuration Area :~:~:~:~:~:~:~:~:~:~:~:~:~:~#
#:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~#
FIELD_ELEMENTS = [1, 2, 5, 6, 7, 8] #Elements that create fields
FIELD_X = 30 #Variable ID to store Field Map X
FIELD_Y = 31 #Variable ID to store Field Map Y
FIELD_MAP_ID = 'Data/Map002.rxdata' #Map ID that contains Field Events
FIELD_TIME = 5 #Seconds a field is active
FIELD_TIME_ID = 39 #Variable to store the time a field is active
FIELD_EVENT_ID = [1, 2, 3, 4, 5, 6] #Event ID of Field Events
FIELD_ON = false #true/false to allow/disallow all elemental skills to make a field
FIELD = 16 #Element ID of skills that will create fields. Does not need to be
#configured if FIELD_ON is set to true
FIELD_SWITCHES = [3, 4, 5, 6, 7, 8] #Switches to turn off/on field
FIELD_ELE_CHARGE = [33, 34, 35, 36, 37, 38] #Variables to contain the charge of a field
DISPLAYFOA = true #true/false to turn on/off the text that display when a FoA skill is used
FOATEXT = 'FoA Charge!' #Text to display when a charge is used
#:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~#
#:~:~:~:~:~:~:~:~:~:~:~: Configure Skill Area ~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~#
#:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~#
def self.skill(id)
case id
#===============================================================================
# Configure the skills that get replaced and what elemental field it needs by
# this format:
#
# when A then return [W, X, Y, Z]
#
# Where A is the skill that gets replaced,
# W is the charged skill that replaces A,
# X is the the id from FIELD_EVENT_ID of the elemental field it needs,
# Y is the amount of charge the skill gives to its elemental field,
# Z is the amount of charge from its elemental field needed for a skill
# to change.
#
# when A
# if $game_switches[Elemental switch corresponding to X]
# return [W, X, Y, Z]
# elsif $game_switches[Elemental switch corresponding to X]
# return [W, X, Y, Z]
# end
#===============================================================================
when 57 then return [81, 1, 30, 30]
when 7 then return [id, 1, 10, 10]
when 84 then return [83, 6, 30, 30]
when 85 then return [86, 5, 30, 30]
when 87 then return [88, 4, 30, 30]
when 89 then return [90, 3, 30, 30]
when 91 then return [92, 2, 30, 30]
when 16 then return [id, 2, 10, 10]
when 19 then return [id, 3, 10, 10]
when 22 then return [id, 4, 10, 10]
when 25 then return [id, 5, 10, 10]
when 28 then return [id, 6, 10, 10]
end
return [id, 0, 10, 50] #Set the default
#Leave id as is for no default charged replacement skill.
end
end
#:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~#
#:~:~:~:~:~:~:~:~:~:~:~:~ End Configure Area :~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~#
#:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~#
################################################################################
####################### Continue Scrolling Down ##############################
####################### For Credit Info, ##############################
####################### Upcoming Features/Bugs, ##############################
####################### and Terms of Use ##############################
####################### Otherwise... ##############################
####################### STOP HERE!!! ##############################
################################################################################
#===============================================================================
# Credits:
# Aqua (aka TerreAqua) for making this Blizz-ABS Plug-in.
# Namco Bandai Games for making Tales of the Abyss for which this plug-in is
# based from.
# Blizzard for making Blizz-ABS, the event steal code, and helping me through
# start of this script.
# Juan, legacyblade, and NAMKCOR for helping me with a few scripting troubles
# through IRC.
# shdwlink1993 for letting me pester him with questions about cases and arrays
# and the tip about multiple replacement skills.
# Starrodkirby86 for letting me rant when I didn't have a clue what was wrong,
# proofreading the comments, making the demo, and for the support.
#===============================================================================
#===============================================================================
# Features Planned for Future Release
#-------------------------------------------------------------------------------
# FoA skill description in skill menu
# (Working on it...)
# Different field sizes
# (Expect this next realease.)
# Fields being used as multiple elements
# (I got it working with my own input for variables, but I need to make it
# work with a module. Expect this next release.)
#===============================================================================
# Known Bugs
#-------------------------------------------------------------------------------
# Does not work with pixel movement due to problems with the Distance
# (I will try to get this fixed ASAP)
#===============================================================================
#===============================================================================
# This work is protected by the following license:
# #-----------------------------------------------------------------------------
# #
# # Creative Commons - Attribution-NonCommercial-ShareAlike 3.0 Unported
# # ( http://creativecommons.org/licenses/by-nc-sa/3.0/ )
# #
# # You are free:
# #
# # to Share - to copy, distribute and transmit the work
# # to Remix - to adapt the work
# #
# # Under the following conditions:
# #
# # Attribution. You must attribute the work in the manner specified by the
# # author or licensor (but not in any way that suggests that they endorse you
# # or your use of the work).
# #
# # Noncommercial. You may not use this work for commercial purposes.
# #
# # Share alike. If you alter, transform, or build upon this work, you may
# # distribute the resulting work only under the same or similar license to
# # this one.
# #
# # - For any reuse or distribution, you must make clear to others the license
# # terms of this work. The best way to do this is with a link to this web
# # page.
# #
# # - Any of the above conditions can be waived if you get permission from the
# # copyright holder.
# #
# # - Nothing in this license impairs or restricts the author's moral rights.
# #
# #-----------------------------------------------------------------------------
#===============================================================================
#:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~#
#:~:~:~:~:~:~:~:~:~:~: DO NOT EDIT BELOW THIS!! ~:~:~:~:~:~:~:~:~:~:~:~:~:~:~#
#:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~#
# Version Number Global Variable
$AquaFoAVer = 1.10
# Blizz-ABS Version Checker
if $BlizzABS != true || BlizzABS::VERSION < 1.99
raise 'ERROR: The Field of Aether plugin requires Blizz-ABS 1.99 or higher.'
end
class Map_Battler
alias skill_effect_aqua_x skill_effect
def skill_effect(character, _battler, skill)
result = skill_effect_aqua_x(character, _battler, skill)
if result && AquaFoA::FIELD_ELEMENTS.any? {|i| skill.element_set.include?(i)} &&
skill.element_set.include?(AquaFoA::FIELD)
# Gets coords of the target of a skill
@fieldx = (@real_x + 64) / 128
@fieldy = (@real_y + 64) / 128
# Stores current skill into a variable
@currentskill = skill.id
# Event Steal Code P1
map = load_data(AquaFoA::FIELD_MAP_ID)
max = ($game_map.events.keys + $game_map.map.events.keys).max
max = 0 if max == nil
max += 1
# Turn on correct field by element
AquaFoA::FIELD_ELEMENTS.each {|i|
@skillelement = i if skill.element_set.include?(i)
}
AquaFoA::FIELD_ELEMENTS.each_index {|i|
@fieldelement = i if AquaFoA::FIELD_ELEMENTS[i] == @skillelement
}
(AquaFoA::FIELD_SWITCHES.first..AquaFoA::FIELD_SWITCHES.last).each {|i|
$game_switches[i] = false
}
# Add amount of charge
$game_variables[AquaFoA::FIELD_ELE_CHARGE[@fieldelement]] += AquaFoA.skill(@currentskill)[2]
# Turns on field switch
$game_switches[AquaFoA::FIELD_SWITCHES[@fieldelement]] = true
# Resets Timer
$game_variables[AquaFoA::FIELD_TIME_ID] = 0
# Steals event
if skill.element_set.include?(AquaFoA::FIELD) && !AquaFoA::FIELD_ON ||
AquaFoA::FIELD_ON == true
# Event steal code p2
event = map.events[AquaFoA::FIELD_EVENT_ID[@fieldelement]]
event.id = max
# Map X and Y coords for Event
event.x = @fieldx
event.y = @fieldy
$game_variables[AquaFoA::FIELD_X] = @fieldx
$game_variables[AquaFoA::FIELD_Y] = @fieldy
# Gets Graphic for the stolen event
$game_map.map.events[max] = event
$game_map.events[max] = Game_Event.new($game_map.map_id, event)
sprite = Sprite_Character.new($scene.spriteset.viewport1, $game_map.events[max])
$scene.spriteset.character_sprites.push(sprite)
# Turns off old field if already exists
$game_map.events.each_value {|e| e.terminate = true if e.stolen}
if $game_map.events[max].stolen == true
$game_switches[AquaFoA::FIELD_SWITCHES[@fieldelement]] = false
$game_variables[AquaFoA::FIELD_TIME_ID] = 0
end
# Signals that a field has been made
$game_map.events[max].stolen = true
end
end
return result
end
# Skill replacement
alias use_skill_aqua_x use_skill
def use_skill(skill)
# Assign some variables used for conditions and skill replacement
@currentskill2 = skill.id
@skillreplace = AquaFoA.skill(@currentskill2)[0]
@replaceele = AquaFoA.skill(@currentskill2)[1]
@currentfield = @replaceele - 1
@battlerx = @real_x/128
@battlery = @real_y/128
# Replacement result
replace = has_learned = false
# Conditions to test if able to use Field
if $game_switches[AquaFoA::FIELD_SWITCHES[@currentfield]] == true &&
$game_variables[AquaFoA::FIELD_ELE_CHARGE[@currentfield]] >= AquaFoA.skill(@currentskill2)[3] &&
@battlerx == $game_variables[AquaFoA::FIELD_X] &&
@battlery == $game_variables[AquaFoA::FIELD_Y]
# Checks Field Distance
# Replaces current skill with new and charged one if there is one
if @skillreplace != @currentskill2 &&
# Checks if battler has enough SP to use skill
self.battler.sp >= $data_skills[@skillreplace].sp_cost
# If can use
if self.battler.is_a?(Game_Enemy) ||
self.battler.skills.include?(@skillreplace)
# Uses replacement skill if already learned
skill = $data_skills[@skillreplace] if skill.id == @currentskill2
else
# Set learning flag
has_learned = true
# Learns replacement skill if not learned
self.battler.learn_skill(@skillreplace)
# Uses replacement skill
skill = $data_skills[@skillreplace] if skill.id == @currentskill2
end
# Set replacement flag
replace = true
end
# Checks the element of replacement skill
for i in AquaFoA::FIELD_ELEMENTS
@skillelement2 = i if skill.element_set.include?(i)
end
# Turns off and resets the field when a replacement skill is usedl
$game_switches[AquaFoA::FIELD_SWITCHES[@currentfield]] = false
$game_variables[AquaFoA::FIELD_ELE_CHARGE[@currentfield]] = 0
$game_map.events.each_value {|e| e.terminate = true if e.stolen}
@skillelement = nil
@skillelement2 = nil
end
# Execute skill
result = use_skill_aqua_x(skill)
# If replaced
if replace
# Displays text if configured
self.battler.damage = "#{AquaFoA::FOATEXT}"
# Forgets replacement skill if learned before
self.battler.forget_skill(@skillreplace) if has_learned
end
# Skill use result for further processing
return result
end
end
class Game_Character
attr_accessor :stolen
end
class Game_System
alias event_removal_aqua_x event_removal
def event_removal
# Delete all stolen events that should be terminated
($game_map.events.values.find_all {|event|
event.stolen && event.terminate}).each {|event|
$game_map.events.delete(event.id)}
event_removal_aqua_x
end
end
InstructionsInstructions found in the beginning of the script
CompatibilityRequires Blizz-ABS v1.99!
Not compatible with other battle systems.
Credits and Thanks
- Aqua (aka TerreAqua) for making this Blizz-ABS Plug-in.
- Namco Bandai Games for making Tales of the Abyss for which this plug-in is based from.
- Blizzard for making Blizz-ABS, the event steal code, and helping me through start of this script.
- Juan, legacyblade, and NAMKCOR for helping me with a few scripting troubles through IRC.
- shdwlink1993 for letting me pester him with questions about cases and arrays.
- Starrodkirby86 for letting me rant when I didn't have a clue what was wrong, proofreading the comments, making the demo, and for the support.
Author's NotesThis is a Chaos-Project.com exclusive script.
You are not allowed to repost this script anywhere else.
Please tell me of possible bugs and glitches and I will try to fix them ASAP.
Also tell me of other features that you might like added.
Great abs script plugin aqua.
I can't help think of the guy from Fire Emblem who uses the Magic Seal. Great character and a cool design. This could be useful in developing dungeons, maybe I can have them be the effect of a trap. i like the overall design...
Databased. Great job on the script, Aqua. Glad I could help!
Thanks for the comments everyone. :)
Can't wait to release another plug-in XD
Also... I hope my instructions are understandable.
A helpful hint to anyone who's wondering how to have multiple replacement skills.
when it says, for example, this:
when 57 then return [81, 1, 30, 30]
you could have an if conditional to make it return something else, like if you used a lesser power until you had a switch (example's being 32) activated, at which point you ended up with a better skill, like this:
when 57
if $game_switches[32]
return [81, 1, 30, 30]
else
return [83, 2, 93, 02]
end
when [etc...]
Note that this is just off the top of my head and the new numbers are completely random. However, this will make it return two different skills.
Oh thanks for the tip shdw.
I'll add that in the next version. :)
Hey look! There's my map! And...Um...There's my Arshes running out! And there's those three spiffy-licious crystals doing their business, strutting their stuff and playing tubular roles! :D
One thing...
Quote
* Allows for new skills to be used for actors and enemies in a fun way
* Easily customized
* Lag-free
Fun? I think I smell false advertising here... :P
Beautiful.
*fixes Aqua's post*
You had the key term wrong and you said that it's only not compatible with exotic CBSes while it's not compatible with ANY other battle system than Blizz-ABS.
:haha: Nice little Plug-In
:x I'll try it on my little "Project" when I get home from University.
Thou, Caro has a little Idea/suggestion for it, which (I believe) would make it even more "Awesome":
Been a "Field Skill", allowing use of certain skills that can only be used in that specific field, but what if it could also Increase the damage of skills (That doesn't need FoA to be activated/cast/etc), and it also decrease the opposite element. What I mean is that not only one can use certain skills, but it also increases skills & spells from the same element while FoA skill is activated, and it also decreases the opposite elements
For example: I cast FoA (Light), "Static Sword" skill is light, and it does 50 damage, but with FoA (Light) activated it's damage increases by x number, but if I/enemy cast FoA (Dark), "Static Sword" attack decreases by x number.
:x Well, then again, it can be a lot of scripting >.>;; but I think that little effect could be awesome too, that way, the player not only will use it to just cast spells that can only be activated by the Fields of Aether skills, but also making it more of a strategic skill.
:x That's just an Idea I have for it, if it helps :^_^':
If you have plenty of skill space, you can easily do that with putting a new skill under the same name. Of course, I'm sure you realize this... That isn't a bad suggestion though.
@Blizzard: Maybe Aqua brain farts like everyone does. :P
Aqua has a brain? o.o
... I wish I had one, too. ._.
@Caro: Okay. I like that idea; I'll see what I can do.
I have a brain!?! Yay me! :D
Edit:
Version 1.10 up...
Fixed a bug :P
Great job Aqua...
Just wondering, is this compatible with Blizz-ABS 2.70 and higher cause i'm using 2.70 at the moment and i'm getting the error about me not using a version of Blizz-ABS 1.99 or higher and when i comment that out (cause it's just an error to tell me if i'm not using the right version right?) i get the following error
Script ' (*) Field of Aether' line 379: NameError occurred.
undefined method 'event_removal' for class 'Game_System'
Do you have the correct script order?
Is this script still supported? Cos it seems like a brilliant design. I'm learning scripting currently, do you mind if I go edit crazy?
I probably wouldn't give too much support...
But have fun XD
I'll do my best to *ahem* enjoy myself...
Wait a sec, I read in another topic that this script is capable of generating new events.
Could this system be utilized to generate an enemy event? (via script call or something)
--J
Possibly. You'd have to figure it out yourself though.