Hi guys, i am the new guy. Reading through the forum over months now i never found the need to actually register and participate (Just lazyness, i believe. Nothing to do with you guys). But today i have a special request. I really hope this forum still gets some action and activity!
Is it possible to use the EQUAP system made by Blizzard in his Tons of Addons script with the following modification?
I have a couple of scripts that allow the player to choose the class/job of his character trought the whole game. The point is, i also have the EQUAP system enabled and this problem keeps bugging my mind:
Lets say i have X sword in the game. Class 1 (Warrior) would learn a skill called "Slash Attack" from it, while Class 2 (Gladiator) would learn a skill called "Pyro Strike" from it. Problem is, the EQUAP system works with skill restriction ONLY via actors. This means that Class 1 (Warrior) will learn BOTH skills when equiping said sword.
My actors can choose to become Mages, Warriors, Gladiators or anything they want any time they want to. So skill learning without restrictions can get abused quite easily.
With the previous case in mind, i want the warrior guy to learn only his respective skill from X sword, not the Class 2 (Gladiator) one as well. Is there a modification for this? Can anyone help me out? Did i made my self clear? Thanks a lot in advance! :haha:
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# EQUAP Skills by Blizzard
# Version: 4.3b
# Type: Skill System
# Date: 28.05.2006
# Date v2.0: 13.6.2006
# Date v2.02b: 16.1.2007
# Date v3.0b: 19.2.2007
# Date v3.02b: 7.3.2007
# Date v4.0b: 13.7.2008
# Date v4.1b: 19.10.2008
# Date v4.2b: 22.10.2009
# Date v4.3b: 4.6.2009
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# Explanation:
#
# This add-on will allow you to bound skills to equipment. Equip it and you
# learn the skill, unequip it and you will forget it. The AP system allows to
# gain AP for skills and learn the permanently if the max AP for the skill
# are gathered. (This system is a very similar one to FF9's AP Skill System.)
#
#
# v2.0:
# - fixed bug, that appeared, when more equipment parts had the same skill
# - new multi-skill support
#
# v2.02b:
# - improved coding a little bit
#
# v3.0b:
# - completely overworked and added optional AP system (similar to FF9)
# (I want to mention here I made this especially for blazinhandle =) )
#
# v3.02b:
# - fixed bugs
#
# v4.0b:
# - fixed a critical bug
# - no more EQUAP element
# - skills that have less than 0 max AP cannot be learned
# - compatible with Guilamme777's Multi-Slot Equipment System
# - works more convenient
# - better coding
#
# v4.1b:
# - fixed problems with gaining AP
#
# v4.2b:
# - added functionality to prevent some characters from learning certain
# skills
#
# v4.3b:
# - fixed a problem with the configuration
# - now AP values are defined by enemy and not be troop anymore
#
#
# Compatibility:
#
# 99% compatible with SDK v1.x. 60% compatible with SDK v2.x. WILL cause
# incompatibility with custom equipment scripts but there are instructions
# how to configure the script. Compatible with Guilamme777's Multi-Slot
# Equipment System. Please note, that this script depends on the layout of
# your Equip Screen and needs to be put UNDER a CMS script if you are using
# one. WILL corrupt your old savegames. Might not work with some CMS-es.
#
#
# Instructions:
#
# - Configuration:
#
# Press CRTL+SHIFT+F and type into the window one of the following:
#
# Start EQ Database
# Start MAXAP Database
# Start GAINAP Database
#
# You can jump now to the database directly. There are more instructions.
#
# - Merge with a Custom Equipment System:
#
# To make this system work with any custom equipment script, you need to
# edit the method "prepare_equap" which fetches all current weapon IDs and
# armor IDs.
#
#
# NOTE:
#
# DO NOT USE EQUAP SKILLS AS NORMAL SKILLS! THE SYSTEM WORKS WITH TEMPORARY
# LEARNING AND FORGETTING THE EQUAP SKILL. IF YOU LET YOUR CHARACTER LEARN AN
# EQUAP SKILL BY NORMAL MEANS, HE WILL FORGET IT AFTER HE UNEQUIPS THE
# APPROPRIATE EQUIPMENT!
#
#
# If you find any bugs, please report them here:
# http://forum.chaos-project.com/
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
if TONS_OF_ADDONS::EQUAP_SKILLS
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# Start EQUAP General Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
DISPLAY_AP_GAIN = true # uses a modified Battle Result to display gained AP
DISPLAY_AP_REQ = true # shows CURRENT_AP/NEEDED_AP in the skill's name
DISPLAY_AP_ZERO = true # shows 0/0 if the skill can't be learned
GAIN_DEAD = false # dead actor also gain AP, no matter what
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# End EQUAP General Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
#==============================================================================
# module BlizzCFG
#==============================================================================
module BlizzCFG
def self.maxap(id)
case id
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# Start of MAXAP Database
#
# Here you can define the APs needed to learn a skill. If you add no skills
# here the AP system is automatically disabled. Configure it like this
# template:
#
# when SKILL_ID then return MAXAP
#
# SKILL_ID - the ID of the skill that will be learned with AP
# MAXAP - how many AP are required to learn the skill
#
# If you give a skill negative max AP, the skill will be completely bound to
# the equipment part and will be forgotten when it is unequipped.
#
# Note:
#
# Don't forget to assign your AP skills to equipment in the EQ Database
# below. Every skill with 0 AP (default) is a normal skill.
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
when 1 then return -1
when 2 then return 10
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# End of MAXAP Database
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
end
return 1
end
def self.gainap(id)
case id
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# Start of GAINAP Database
#
# Here you can define how many AP you will get from enemy troops. Configure
# it like this template:
#
# when ENEMY_ID then return GAINAP
#
# ENEMY_ID - the ID of the enemy
# GAINAP - how many AP will the player get from this enemy.
#
# Note:
#
# This will automatically be disabled if there are no AP skills.
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
when 1 then return 2
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# End of MAXAP Database
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
end
return 1
end
def self.eq_database(id, class_id, weapon = true)
skill_ids = []
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# Start of EQ Database
#
# This is your equipment database. To add one or more new EQUAP skills to a
# weapon is very simple. Add another "when"-branch in the script snipplet
# below (they have comments next to it). Configure it like this template:
#
# when WEAPON_ID
# @skill_ids.push(EQUAP_SKILL_ID1)
# @skill_ids.push(EQUAP_SKILL_ID2)
#
# The same works for armors:
#
# when ARMOR_ID
# @skill_ids.push(EQUAP_SKILL_ID1)
# @skill_ids.push(EQUAP_SKILL_ID2)
#
# The lines are commented below so you should have no problems with the script.
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
if weapon
case id
when 1 # weapon ID
case class_id # Start of defining class specific learning
when 1 # Class ID 1 (Fighter)
skill_ids.push(12)
when 2 # Class ID 2
skill_ids.push(9)
when 3, 4 # Class IDs 3 and 4
skill_ids.push(13)
when 5..8 # Class IDs 5, 6, 7, 8
skill_ids.push(14)
end
# Now anything below will be applied to ALL classes
skill_ids.push(10) # EQUAP skill ID
skill_ids.push(11) # EQUAP skill ID
when 5
case class_id
when 1 # Class ID 1
skill_ids.push(8)
else # All other classes not defined (in this case, everyone but ID 1)
skill_ids.push(8)
skill_ids.push(12)
end
when 9
skill_ids.push(1)
skill_ids.push(3)
end
else
case id
when 1 # armor ID
skill_ids.push(1) # EQUAP skill ID
skill_ids.push(25) # EQUAP skill ID
when 3
skill_ids.push(7)
skill_ids.push(4)
when 5
skill_ids.push(15)
when 8
skill_ids.push(32)
skill_ids.push(29)
when 13
skill_ids.push(2)
skill_ids.push(25)
when 18
skill_ids.push(27)
when 19
skill_ids.push(25)
when 29
skill_ids.push(10)
end
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# End of EQ Database
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
end
return skill_ids
end
def self.equap_nonlearnable_skills(id)
case id
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# Start of NONLEARNABLE SKILLS Database
#
# Here you can define skills that can't be learned by certain actors at all.
# Configure it like this template:
#
# when ACTOR_ID then return [SKILL_ID1, SKILL_ID2, ...]
#
# ACTOR_ID - the ID of the enemy troop
# SKILL_ID - the ID of the skill this actor can't learn through EQUAP
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
when 1 then return [59, 60]
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# End of NONLEARNABLE SKILLS Database
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
end
return []
end
end
#==============================================================================
# Game_Actor
#==============================================================================
class Game_Actor
alias setup_equap_later setup
def setup(id)
@ap = {}
setup_equap_later(id)
test_equap
end
alias equip_equap_later equip
def equip(equip_type, id)
equip_equap_later(equip_type, id)
test_equap
end
def add_ap(val)
@skills.each {|id| @ap[id] = 0 if @ap[id] == nil}
@ap.each_key {|id|
@ap[id] = self.ap(id) + val
@ap[id] = 0 if self.ap(id) < 0
maxap = BlizzCFG.maxap(id)
@ap[id] = maxap if self.ap(id) > maxap}
end
def ap(id)
return (@ap[id] == nil ? 0 : @ap[id])
end
def prepare_equap ### edit this method for custom equipment support
# Guilamme777 compatibility switch
return self.weapon_ids, self.armor_ids if defined?(G7_MS_MOD)
weapons = [@weapon_id]
armors = [@armor1_id, @armor2_id, @armor3_id, @armor4_id]
return weapons, armors
end
def test_equap
non_learnable = BlizzCFG.equap_nonlearnable_skills(self.id)
(@skills - non_learnable).each {|id|
maxap = BlizzCFG.maxap(id)
forget_skill(id) if maxap < 0 || self.ap(id) < maxap}
weapons, armors = prepare_equap
skill_ids = []
weapons.each {|id| skill_ids += BlizzCFG.eq_database(id, class_id, true)}
armors.each {|id| skill_ids += BlizzCFG.eq_database(id, class_id, false)}
(skill_ids - non_learnable).each {|id| learn_skill(id)}
end
end
#==============================================================================
# Game_Troop
#==============================================================================
class Game_Troop
attr_reader :id
alias setup_equap_later setup
def setup(troop_id)
setup_equap_later(troop_id)
@id = troop_id
end
end
#==============================================================================
# Window_BattleResult
#==============================================================================
class Window_BattleResult
def refresh_extra(aps)
self.contents.fill_rect(0, 0, self.width, 32, Color.new(0, 0, 0, 0))
x = 4
self.contents.font.color = normal_color
cx = contents.text_size(@exp.to_s).width
self.contents.draw_text(x, 0, cx, 32, @exp.to_s)
x += cx + 4
self.contents.font.color = system_color
cx = contents.text_size('EXP').width
self.contents.draw_text(x, 0, 64, 32, 'EXP')
x += cx + 16
self.contents.font.color = normal_color
cx = contents.text_size(@gold.to_s).width
self.contents.draw_text(x, 0, cx, 32, @gold.to_s)
x += cx + 4
self.contents.font.color = system_color
cx = contents.text_size($data_system.words.gold).width
self.contents.draw_text(x, 0, 128, 32, $data_system.words.gold)
x += cx + 16
self.contents.font.color = normal_color
cx = contents.text_size(aps.to_s).width
self.contents.draw_text(x, 0, cx, 32, aps.to_s)
x += cx + 4
self.contents.font.color = system_color
self.contents.draw_text(x, 0, 128, 32, 'AP')
end
end
#==============================================================================
# Window_Skill
#==============================================================================
class Window_Skill
alias draw_item_equap_later draw_item
def draw_item(index)
skill = @data[index]
aps = BlizzCFG.maxap(skill.id)
if DISPLAY_AP_REQ && !$scene.is_a?(Scene_Battle) &&
(aps > 0 || aps != 0 && DISPLAY_AP_ZERO)
if @actor.skill_can_use?(skill.id)
self.contents.font.color = normal_color
else
self.contents.font.color = disabled_color
end
x, y = 4+index%2*320, index/2*32
rect = Rect.new(x, y, self.width / @column_max - 32, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
bitmap = RPG::Cache.icon(skill.icon_name)
opacity = self.contents.font.color == normal_color ? 255 : 128
self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
text = skill.name
if aps > 0
text += " (#{@actor.ap(skill.id)}/#{aps})"
elsif DISPLAY_AP_ZERO
text += ' (0/0)'
end
self.contents.draw_text(x + 28, y, 204, 32, text, 0)
self.contents.draw_text(x + 232, y, 48, 32, skill.sp_cost.to_s, 2)
else
draw_item_equap_later(index)
end
end
end
#==============================================================================
# Scene_Battle
#==============================================================================
class Scene_Battle
alias start_phase5_equap_later start_phase5
def start_phase5
start_phase5_equap_later
aps = 0
$game_troop.enemies.each {|enemy| aps += BlizzCFG.gainap(enemy.id)}
@result_window.refresh_extra(aps) if DISPLAY_AP_GAIN
$game_party.actors.each {|a| a.add_ap(aps) if !a.dead? || GAIN_DEAD}
end
end
Configuration notes are explained in the examples. Hopefully it makes sense to you.
Awesome! That is just what i needed. I'll give it a try in a couple of hours and report the results here. Thanks a lot!
*levels KK20 up with 3 levels*
All right guys, KK20's script piece works as intended. There are no compatibility issues with any other scripts, and boy, i do have a bunch of other stuff that could have made that fail.
Anyway, i realised the fix was quite simple and now i feel ashamed for not been able to notice that solution by myself :'(
Thanks both of you for you attention on the matter!
Alright, glad it's working! And thanks for the levels Blizz, even though the points don't matter (http://www.youtube.com/watch?v=9KAGwNtI26w). :D
I know they don't. But they are an indicator on how many people thought your posts were worthy of giving you a level. So they do mean that you are a helpful member even though they don't matter.
Oh yes, I understand the idea of rep. I guess I need to get better at making my jokes a bit more obvious :\
/derail
I have THE solution for you.
This smiley:

Hey guys, i am having a little problem now. I activated the "Skill separation" script from Tons of Addons and now i am getting an error.
It seems there is some kind of problem with the relation EQUAP
- Skill Separation
- EQUAP Bars; wich is a custom script that i am sure you guys alredy know.
Any hotfix that one of you can come out with? :shy:
Equap Bars Script by Jragyn=begin
____________________________
| J::EQUAP bars! |
| Author: Jragyn |
|____________________________|
This script is more like a plug-in for the EQUAP system.
It displays a bar that measures the AP vs. MAXap for any given skill.
Of course...
This script does require TONs to work.
And the Blizzart BARS to be enabled.
And the EQUAP System to be enabled and setup.
Credit to ForeverZer0 for being a Ruby Reference Bible for dummies :)
=end
#v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^
#::Aliased/Overwrite [Window_Skill] ----- draw_item
#v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^
#========================#
# Set the wordage for a #
# learned skill here: #
module J #
LEARNT = '-Aprendido-' #
#=======================================#
# Use a new color scheme #
# for the EQUAP bars? #
NEW_SCHEME = true #
# only need to set if NEW_SCHEME = true #
SCHEME_1 = Color.new( 96, 96, 96,192) # (just a darkish grey)
SCHEME_2 = Color.new(192,192,192,192) # (just a lighter grey)
#=======================================#
# Use a different $bar_style #
# for the EQUAP bars? #
NEW_BARS = true #
# only need to set if NEW_BARS = true #
J_STYLE = 2 # ( 0~6 ) #
#=======================================#
end #
#===#
class Window_Skill
alias j_draw_item_equap_bar draw_item
def draw_item(index, w=148)
#checks to verify both Blizzart BARS and EQUAP are enabled.
if $game_system.BARS && TONS_OF_ADDONS::EQUAP_SKILLS
skill = @data[index]
if @actor.skill_can_use?(skill.id)
self.contents.font.color = normal_color
else
self.contents.font.color = disabled_color
end
rate = 0
if BlizzCFG.maxap(skill.id) > 0
rate = @actor.ap(skill.id).to_f / BlizzCFG.maxap(skill.id)
end#if
#uses set colors in J::~~ if set to true, otherwise uses defaults.
if J::NEW_SCHEME
color1 = J::SCHEME_1
color2 = J::SCHEME_2
else
#color determination, based on Blizzard's draw_hp_bar(whatever) colorscheme.
if rate > 0.6
color1 = Color.new(80 - 150 * (rate-0.6), 80, 50 * (rate-0.6), 192)
color2 = Color.new(240 - 450 * (rate-0.6), 240, 150 * (rate-0.6), 192)
elsif rate > 0.2 && rate <= 0.6
color1 = Color.new(80, 200 * (rate-0.2), 0, 192)
color2 = Color.new(240, 600 * (rate-0.2), 0, 192)
elsif rate <= 0.2
color1 = Color.new(400 * rate, 0, 0, 192)
color2 = Color.new(240, 0, 0, 192)
end#if
end#ifJscheme
color3 = Color.new(0, 80, 0, 192)
x = 4 + index % 2 * (288 + 32)
y = index / 2 * 32
rect = Rect.new(x, y, self.width / @column_max - 32, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
bitmap = RPG::Cache.icon(skill.icon_name)
opacity = self.contents.font.color == normal_color ? 255 : 128
self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
#===============================================================================
# The deciding part as to whether or not to draw the bars and/or ap_infos.
if BlizzCFG.maxap(skill.id) > 0 && @actor.ap(skill.id) == BlizzCFG.maxap(skill.id)
self.contents.draw_text(x + 180, y, 60, 32, J::LEARNT, 2)
elsif BlizzCFG.maxap(skill.id) > 0
ap_info = "[#{@actor.ap(skill.id)}/#{BlizzCFG.maxap(skill.id)}]"
if J::NEW_BARS
original_style = $game_system.bar_style
J::J_STYLE > 6 ? $game_system.bar_style = 2 : $game_system.bar_style = J::J_STYLE
self.contents.gradient_bar(x+24, y, w, color1, color2, color3, rate)
$game_system.bar_style = original_style
else
self.contents.gradient_bar(x+24, y, w, color1, color2, color3, rate)
end#if_newbars
self.contents.draw_text(x+180, y, 64, 32, ap_info, 0)
end#if
#===============================================================================
self.contents.draw_text(x + 28, y, 204, 32, skill.name, 0)
self.contents.draw_text(x + 232, y, 48, 32, skill.sp_cost.to_s, 2)
else
j_draw_item_equap_bar(index)
end#bars&equap
end#def
And here is the error that triggers when entering the skill window either from the menu or trough the battle command:
(http://sphotos-h.ak.fbcdn.net/hphotos-ak-ash3/484054_10151410086284143_1027420433_n.jpg)
PS. Error comes out when using the Skill Separation script along with the two others. Yet it triggers from Equap Bars, line 54. Turning Skill Separation off solves the problem... but i kinda liked the idea of having the script activated :D
On first sight, make sure that you are not loading old savegames.
Nope. No saved game loading and not a pirate version of RMXP.
The problem is within the Skill Separation, as you said, under Window_Skill#refresh. Instead of storing the skills needed to be drawn in @data (like what most other windows do), it stores them in @sets and @skill_ids.
For the sake of compatibility, I'll look into rewriting Skill Separation (unless Blizzard feels he knows what to do already).
Yup, that is what i though, i think i am slowly understanding this ruby thing :^_^':
Do not worry about a fix if it is too much trouble, mate. The EQUAP Bars script is not a must in my game, and might cause me compatibility issues with Blizz's Chaos Rage Limit System (that i am planning to use anyway).
On a side note, i am getting this one now as soon as i press "Start new game" from the initial window:
(http://sphotos-f.ak.fbcdn.net/hphotos-ak-ash3/164221_10151411087339143_1183208502_n.jpg)
This is the first time ever i get an error like that. I know that method actually exists so i am not sure why i am triggering this. Error came up after making some small changes to the piece code that you provided for me (wich was previously working just fine). I might have screwed something up, then. Is it possible to be a syntax error? Like i could be missing an "end" command or something similar? This HAS to be something really simple to fix :shy:
This is the isolated script piece that causes the problem:
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# EQUAP Skills by Blizzard
# Version: 4.3b
# Type: Skill System
# Date: 28.05.2006
# Date v2.0: 13.6.2006
# Date v2.02b: 16.1.2007
# Date v3.0b: 19.2.2007
# Date v3.02b: 7.3.2007
# Date v4.0b: 13.7.2008
# Date v4.1b: 19.10.2008
# Date v4.2b: 22.10.2009
# Date v4.3b: 4.6.2009
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# Explanation:
#
# This add-on will allow you to bound skills to equipment. Equip it and you
# learn the skill, unequip it and you will forget it. The AP system allows to
# gain AP for skills and learn the permanently if the max AP for the skill
# are gathered. (This system is a very similar one to FF9's AP Skill System.)
#
#
# v2.0:
# - fixed bug, that appeared, when more equipment parts had the same skill
# - new multi-skill support
#
# v2.02b:
# - improved coding a little bit
#
# v3.0b:
# - completely overworked and added optional AP system (similar to FF9)
# (I want to mention here I made this especially for blazinhandle =) )
#
# v3.02b:
# - fixed bugs
#
# v4.0b:
# - fixed a critical bug
# - no more EQUAP element
# - skills that have less than 0 max AP cannot be learned
# - compatible with Guilamme777's Multi-Slot Equipment System
# - works more convenient
# - better coding
#
# v4.1b:
# - fixed problems with gaining AP
#
# v4.2b:
# - added functionality to prevent some characters from learning certain
# skills
#
# v4.3b:
# - fixed a problem with the configuration
# - now AP values are defined by enemy and not be troop anymore
#
#
# Compatibility:
#
# 99% compatible with SDK v1.x. 60% compatible with SDK v2.x. WILL cause
# incompatibility with custom equipment scripts but there are instructions
# how to configure the script. Compatible with Guilamme777's Multi-Slot
# Equipment System. Please note, that this script depends on the layout of
# your Equip Screen and needs to be put UNDER a CMS script if you are using
# one. WILL corrupt your old savegames. Might not work with some CMS-es.
#
#
# Instructions:
#
# - Configuration:
#
# Press CRTL+SHIFT+F and type into the window one of the following:
#
# Start EQ Database
# Start MAXAP Database
# Start GAINAP Database
#
# You can jump now to the database directly. There are more instructions.
#
# - Merge with a Custom Equipment System:
#
# To make this system work with any custom equipment script, you need to
# edit the method "prepare_equap" which fetches all current weapon IDs and
# armor IDs.
#
#
# NOTE:
#
# DO NOT USE EQUAP SKILLS AS NORMAL SKILLS! THE SYSTEM WORKS WITH TEMPORARY
# LEARNING AND FORGETTING THE EQUAP SKILL. IF YOU LET YOUR CHARACTER LEARN AN
# EQUAP SKILL BY NORMAL MEANS, HE WILL FORGET IT AFTER HE UNEQUIPS THE
# APPROPRIATE EQUIPMENT!
#
#
# If you find any bugs, please report them here:
# http://forum.chaos-project.com/
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
if TONS_OF_ADDONS::EQUAP_SKILLS
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# Start EQUAP General Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
DISPLAY_AP_GAIN = true # uses a modified Battle Result to display gained AP
DISPLAY_AP_REQ = true # shows CURRENT_AP/NEEDED_AP in the skill's name
DISPLAY_AP_ZERO = true # shows 0/0 if the skill can't be learned
GAIN_DEAD = false # dead actor also gain AP, no matter what
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# End EQUAP General Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
#==============================================================================
# module BlizzCFG
#==============================================================================
module BlizzCFG
def self.maxap(id)
case id
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# Start of MAXAP Database
#
# Here you can define the APs needed to learn a skill. If you add no skills
# here the AP system is automatically disabled. Configure it like this
# template:
#
# when SKILL_ID then return MAXAP
#
# SKILL_ID - the ID of the skill that will be learned with AP
# MAXAP - how many AP are required to learn the skill
#
# If you give a skill negative max AP, the skill will be completely bound to
# the equipment part and will be forgotten when it is unequipped.
#
# Note:
#
# Don't forget to assign your AP skills to equipment in the EQ Database
# below. Every skill with 0 AP (default) is a normal skill.
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
when 3 then return 100
when 4 then return 200
when 5 then return 200
when 6 then return 200
when 7 then return 250
when 8 then return 100
when 9 then return 250
when 10 then return 300
when 366 then return 250
when 367 then return 200
when 15 then return 100
when 16 then return 200
when 17 then return 250
when 18 then return 200
when 20 then return 300
when 286 then return 300
when 287 then return 300
when 371 then return 200
when 372 then return 200
when 25 then return 250
when 26 then return 250
when 27 then return 300
when 28 then return 250
when 29 then return 350
when 31 then return 250
when 290 then return 250
when 291 then return 250
when 377 then return 200
when 36 then return 250
when 37 then return 250
when 38 then return 250
when 40 then return 400
when 41 then return 200
when 42 then return 200
when 43 then return 300
when 44 then return 350
when 294 then return 250
when 381 then return 200
when 49 then return 150
when 50 then return 250
when 51 then return 250
when 52 then return 250
when 53 then return 300
when 54 then return 200
when 55 then return 200
when 56 then return 200
when 297 then return 300
when 298 then return 300
when 385 then return 200
when 62 then return 250
when 63 then return 200
when 64 then return 150
when 65 then return 200
when 66 then return 200
when 301 then return 250
when 388 then return 250
when 389 then return 200
when 73 then return 200
when 75 then return 250
when 76 then return 250
when 77 then return 300
when 304 then return 250
when 393 then return 350
when 395 then return 250
when 85 then return 250
when 87 then return 250
when 89 then return 250
when 93 then return 250
when 95 then return 250
when 91 then return 300
when 101 then return 300
when 109 then return 300
when 111 then return 350
when 112 then return 200
when 113 then return 200
when 115 then return 250
when 116 then return 400
when 312 then return 250
when 124 then return 200
when 125 then return 200
when 126 then return 200
when 127 then return 350
when 318 then return 250
when 134 then return 200
when 135 then return 250
when 136 then return 300
when 137 then return 100
when 138 then return 300
when 139 then return 150
when 140 then return 150
when 141 then return 250
when 142 then return 300
when 321 then return 250
when 413 then return 250
when 146 then return 200
when 147 then return 250
when 148 then return 300
when 149 then return 200
when 150 then return 250
when 151 then return 300
when 152 then return 200
when 153 then return 250
when 154 then return 300
when 324 then return 300
when 416 then return 200
when 168 then return 250
when 169 then return 300
when 170 then return 250
when 171 then return 300
when 172 then return 250
when 173 then return 300
when 174 then return 300
when 175 then return 250
when 176 then return 300
when 327 then return 250
when 420 then return 200
when 183 then return 300
when 184 then return 200
when 185 then return 200
when 186 then return 200
when 187 then return 200
when 188 then return 300
when 189 then return 250
when 193 then return 250
when 331 then return 250
when 424 then return 200
when 198 then return 200
when 199 then return 200
when 200 then return 200
when 201 then return 300
when 202 then return 300
when 203 then return 300
when 204 then return 200
when 205 then return 300
when 206 then return 300
when 207 then return 400
when 208 then return 300
when 209 then return 300
when 210 then return 350
when 337 then return 250
when 215 then return 350
when 340 then return 300
when 341 then return 300
when 431 then return 200
when 432 then return 250
when 220 then return 250
when 221 then return 250
when 222 then return 150
when 223 then return 300
when 224 then return 350
when 225 then return 350
when 346 then return 300
when 436 then return 200
when 230 then return 350
when 231 then return 350
when 232 then return 350
when 233 then return 350
when 234 then return 350
when 235 then return 350
when 236 then return 350
when 237 then return 350
when 238 then return 350
when 239 then return 350
when 240 then return 400
when 241 then return 450
when 263 then return 350
when 264 then return 400
when 357 then return 250
when 448 then return 250
when 279 then return 400
when 280 then return 400
when 361 then return 300
when 494 then return 300
when 495 then return 300
when 158 then return 200
when 162 then return 250
when 513 then return -1
when 514 then return -1
when 515 then return -1
when 516 then return -1
when 517 then return -1
when 518 then return -1
when 519 then return -1
when 520 then return -1
when 521 then return -1
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# End of MAXAP Database
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
end
return 1
end
def self.gainap(id)
case id
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# Start of GAINAP Database
#
# Here you can define how many AP you will get from enemy troops. Configure
# it like this template:
#
# when ENEMY_ID then return GAINAP
#
# ENEMY_ID - the ID of the enemy
# GAINAP - how many AP will the player get from this enemy.
#
# Note:
#
# This will automatically be disabled if there are no AP skills.
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
when 1 then return 10
when 2 then return 25
when 3 .. 5 then return 10
when 6 then return 15
when 7 .. 8 then return 10
when 9 then return 20
when 10 .. 12 then return 10
when 13 then return 25
when 14 then return 20
when 15 then return 50
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# End of MAXAP Database
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
end
return 1
end
def self.eq_database(id, class_id, weapon = true)
skill_ids = []
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# Start of EQ Database
#
# This is your equipment database. To add one or more new EQUAP skills to a
# weapon is very simple. Add another "when"-branch in the script snipplet
# below (they have comments next to it). Configure it like this template:
#
# when WEAPON_ID
# @skill_ids.push(EQUAP_SKILL_ID1)
# @skill_ids.push(EQUAP_SKILL_ID2)
#
# The same works for armors:
#
# when ARMOR_ID
# @skill_ids.push(EQUAP_SKILL_ID1)
# @skill_ids.push(EQUAP_SKILL_ID2)
#
# The lines are commented below so you should have no problems with the script.
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
if weapon
case id
when 4
case class_id # Start of defining class specific learning
when 9 # Class ID
skill_ids.push(113)
end
when 5
case class_id
when 9
skill_ids.push(112)
end
when 7
case class_id
when 9
skill_ids.push(115)
end
when 8
case class_id
when 9
skill_ids.push(109)
end
when 9
case class_id
when 9
skill_ids.push(111)
end
when 10
case class_id
when 9
skill_ids.push(116)
end
when 15
case class_id
when 1
skill_ids.push(3)
end
when 17
case class_id
when 1
skill_ids.push(8)
end
when 18
case class_id
when 1
skill_ids.push(7)
when 5
skill_ids.push(50)
end
when 19
case class_id
when 5
skill_ids.push(51)
end
when 20
case class_id
when 1
skill_ids.push(4)
when 2
skill_ids.push(15)
end
when 21
case class_id
when 1
skill_ids.push(9)
when 2
skill_ids.push(16)
end
when 24
case class_id
when 3
skill_ids.push(28)
end
when 29
case class_id
when 5
skill_ids.push(49)
end
when 30
case class_id
when 1
skill_ids.push(6)
when 5
skill_ids.push(56)
end
when 31
case class_id
when 1
skill_ids.push(5)
end
when 32
case class_id
when 5
skill_ids.push(55)
end
when 33
case class_id
when 5
skill_ids.push(54)
end
when 34
case class_id
when 1
skill_ids.push(10)
end
when 35
case class_id
when 5
skill_ids.push(52)
end
when 36
case class_id
when 5
skill_ids.push(53)
end
when 40
case class_id
when 20
skill_ids.push(222)
end
when 41
case class_id
when 15
skill_ids.push(215)
end
when 42
case class_id
when 20
skill_ids.push(221)
end
when 43
case class_id
when 20
skill_ids.push(220)
end
when 44
case class_id
when 20
skill_ids.push(224)
end
when 45
case class_id
when 20
skill_ids.push(225)
when 23
skill_ids.push(263)
end
when 46
case class_id
when 20
skill_ids.push(223)
end
when 47
case class_id
when 23
skill_ids.push(264)
end
when 51
case class_id
when 4
skill_ids.push(42)
end
when 52
case class_id
when 4
skill_ids.push(41)
end
when 54
case class_id
when 4
skill_ids.push(43)
end
when 55
case class_id
when 4
skill_ids.push(44)
end
when 63
case class_id
when 4
skill_ids.push(37)
end
when 64
case class_id
when 4
skill_ids.push(36)
end
when 65
case class_id
when 4
skill_ids.push(38)
end
when 70
case class_id
when 4
skill_ids.push(40)
end
when 74
case class_id
when 2
skill_ids.push(17)
end
when 75
case class_id
when 3
skill_ids.push(25)
end
when 76
case class_id
when 2
skill_ids.push(18)
when 3
skill_ids.push(494)
end
when 77
case class_id
when 3
skill_ids.push(26)
end
when 78
case class_id
when 2
skill_ids.push(20)
when 3
skill_ids.push(29)
end
when 79
case class_id
when 3
skill_ids.push(27)
end
when 80
case class_id
when 3
skill_ids.push(495)
end
when 81
case class_id
when 3
skill_ids.push(31)
end
when 86
case class_id
when 11
skill_ids.push(513)
end
when 87
case class_id
when 11
skill_ids.push(126)
when 11
skill_ids.push(514)
end
when 88
case class_id
when 11
skill_ids.push(124)
when 11
skill_ids.push(515)
end
when 89
case class_id
when 11
skill_ids.push(125)
when 11
skill_ids.push(516)
end
when 90
case class_id
when 11
skill_ids.push(517)
end
when 91
case class_id
when 11
skill_ids.push(518)
end
when 92
case class_id
when 11
skill_ids.push(519)
end
when 93
case class_id
when 11
skill_ids.push(127)
when 11
skill_ids.push(520)
end
when 94
case class_id
when 11
skill_ids.push(521)
end
when 97
case class_id
when 7
skill_ids.push(64)
end
when 98
case class_id
when 7
skill_ids.push(66)
when 8
skill_ids.push(76)
end
when 99
case class_id
when 7
skill_ids.push(65)
when 8
skill_ids.push(75)
end
when 100
case class_id
when 7
skill_ids.push(63)
end
when 101
case class_id
when 7
skill_ids.push(62)
when 8
skill_ids.push(73)
end
when 102
case class_id
when 8
skill_ids.push(74)
end
when 104
case class_id
when 8
skill_ids.push(77)
end
when 113
case class_id
when 10
skill_ids.push(99)
end
when 114
case class_id
when 10
skill_ids.push(95)
skill_ids.push(97)
end
when 115
case class_id
when 10
skill_ids.push(93)
end
when 116
case class_id
when 10
skill_ids.push(85)
end
when 117
case class_id
when 10
skill_ids.push(87)
skill_ids.push(89)
end
when 118
case class_id
when 10
skill_ids.push(101)
end
when 119
case class_id
when 10
skill_ids.push(91)
end
when 126
case class_id
when 13
skill_ids.push(137)
end
when 127
case class_id
when 13
skill_ids.push(139)
skill_ids.push(140)
end
when 128
case class_id
when 13
skill_ids.push(134)
end
when 129
case class_id
when 14
skill_ids.push(146)
skill_ids.push(152)
skill_ids.push(149)
end
when 130
case class_id
when 19
skill_ids.push(199)
end
when 131
case class_id
when 13
skill_ids.push(135)
end
when 132
case class_id
when 19
skill_ids.push(198)
end
when 133
case class_id
when 16
skill_ids.push(193)
end
when 134
case class_id
when 17
skill_ids.push(175)
end
when 135
case class_id
when 14
skill_ids.push(147)
skill_ids.push(150)
skill_ids.push(153)
end
when 136
case class_id
when 13
skill_ids.push(138)
end
when 137
case class_id
when 14
skill_ids.push(148)
skill_ids.push(151)
skill_ids.push(154)
end
when 138
case class_id
when 13
skill_ids.push(141)
end
when 139
case class_id
when 13
skill_ids.push(142)
end
when 140
case class_id
when 13
skill_ids.push(136)
end
when 147
case class_id
when 19
skill_ids.push(200)
end
when 149
case class_id
when 19
skill_ids.push(204)
end
when 151
case class_id
when 17
skill_ids.push(168)
skill_ids.push(170)
skill_ids.push(172)
end
when 152
case class_id
when 19
skill_ids.push(203)
end
when 153
case class_id
when 16
skill_ids.push(184)
end
when 154
case class_id
when 16
skill_ids.push(185)
when 18
skill_ids.push(237)
end
when 155
case class_id
when 16
skill_ids.push(187)
end
when 156
case class_id
when 16
skill_ids.push(186)
when 18
skill_ids.push(235)
end
when 157
case class_id
when 16
skill_ids.push(183)
when 18
skill_ids.push(239)
end
when 158
case class_id
when 18
skill_ids.push(232)
when 16
skill_ids.push(464)
end
when 159
case class_id
when 16
skill_ids.push(189)
end
when 160
case class_id
when 19
skill_ids.push(202)
end
when 161
case class_id
when 17
skill_ids.push(169)
skill_ids.push(171)
skill_ids.push(173)
when 18
skill_ids.push(234)
end
when 162
case class_id
when 18
skill_ids.push(233)
when 19
skill_ids.push(201)
when 16
skill_ids.push(463)
end
when 163
case class_id
when 17
skill_ids.push(176)
when 19
skill_ids.push(208)
end
when 164
case class_id
when 19
skill_ids.push(206)
when 18
skill_ids.push(238)
end
when 165
case class_id
when 19
skill_ids.push(209)
when 18
skill_ids.push(230)
end
when 166
case class_id
when 19
skill_ids.push(210)
when 18
skill_ids.push(231)
end
when 169
case class_id
when 17
skill_ids.push(174)
when 19
skill_ids.push(205)
end
when 171
case class_id
when 24
skill_ids.push(279)
when 18
skill_ids.push(236)
end
when 172
case class_id
when 16
skill_ids.push(188)
end
when 173
case class_id
when 18
skill_ids.push(241)
when 24
skill_ids.push(280)
end
when 174
case class_id
when 18
skill_ids.push(240)
when 19
skill_ids.push(207)
end
end
else
case id #armor
when 3
case class_id
when 2
skill_ids.push(372)
end
when 4
case class_id
when 5
skill_ids.push(297)
end
when 5
case class_id
when 15
skill_ids.push(432)
when 23
skill_ids.push(448)
end
when 6
case class_id
when 2
skill_ids.push(371)
end
when 7
case class_id
when 1
skill_ids.push(367)
when 20
skill_ids.push(436)
end
when 9
case class_id
when 15
skill_ids.push(341)
end
when 20
case class_id
when 2
skill_ids.push(286)
end
when 21
case class_id
when 4
skill_ids.push(381)
when 5
skill_ids.push(385)
end
when 24
case class_id
when 2
skill_ids.push(287)
end
when 31
case class_id
when 3
skill_ids.push(291)
when 13
skill_ids.push(321)
end
when 32
case class_id
when 8
skill_ids.push(395)
end
when 33
case class_id
when 8
skill_ids.push(393)
end
when 34
case class_id
when 7
skill_ids.push(389)
end
when 35
case class_id
when 3
skill_ids.push(377)
when 13
skill_ids.push(413)
when 14
skill_ids.push(416)
when 15
skill_ids.push(431)
end
when 36
case class_id
when 4
skill_ids.push(294)
when 9
skill_ids.push(312)
when 23
skill_ids.push(357)
end
when 37
case class_id
when 5
skill_ids.push(298)
when 13
skill_ids.push(324)
when 14
skill_ids.push(340)
end
when 38
case class_id
when 7
skill_ids.push(301)
when 19
skill_ids.push(337)
end
when 39
case class_id
when 11
skill_ids.push(318)
end
when 40
case class_id
when 8
skill_ids.push(304)
end
when 41
case class_id
when 20
skill_ids.push(346)
end
when 46
case class_id
when 16
skill_ids.push(420)
when 17
skill_ids.push(424)
when 19
skill_ids.push(428)
end
when 48
case class_id
when 16
skill_ids.push(327)
when 17
skill_ids.push(331)
when 19
skill_ids.push(335)
end
when 49
case class_id
when 24
skill_ids.push(361)
end
when 81
case class_id
when 3
skill_ids.push(290)
end
when 120
case class_id
when 1
skill_ids.push(366)
when 7
skill_ids.push(388)
when 15
skill_ids.push(432)
end
when 133
skill_ids.push(528)
end
end
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# End of EQ Database
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
end
return skill_ids
end
def self.equap_nonlearnable_skills(id)
case id
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# Start of NONLEARNABLE SKILLS Database
#
# Here you can define skills that can't be learned by certain actors at all.
# Configure it like this template:
#
# when ACTOR_ID then return [SKILL_ID1, SKILL_ID2, ...]
#
# ACTOR_ID - the ID of the enemy troop
# SKILL_ID - the ID of the skill this actor can't learn through EQUAP
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
when 1 then return [150]
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# End of NONLEARNABLE SKILLS Database
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
end
return []
end
end
#==============================================================================
# Game_Actor
#==============================================================================
class Game_Actor
alias setup_equap_later setup
def setup(id)
@ap = {}
setup_equap_later(id)
test_equap
end
alias equip_equap_later equip
def equip(equip_type, id)
equip_equap_later(equip_type, id)
test_equap
end
def add_ap(val)
@skills.each {|id| @ap[id] = 0 if @ap[id] == nil}
@ap.each_key {|id|
@ap[id] = self.ap(id) + val
@ap[id] = 0 if self.ap(id) < 0
maxap = BlizzCFG.maxap(id)
@ap[id] = maxap if self.ap(id) > maxap}
end
def ap(id)
return (@ap[id] == nil ? 0 : @ap[id])
end
def prepare_equap ### edit this method for custom equipment support
# Guilamme777 compatibility switch
return self.weapon_ids, self.armor_ids if defined?(G7_MS_MOD)
weapons = [@weapon_id]
armors = [@armor1_id, @armor2_id, @armor3_id, @armor4_id]
return weapons, armors
end
def test_equap
non_learnable = BlizzCFG.equap_nonlearnable_skills(self.id)
(@skills - non_learnable).each {|id|
maxap = BlizzCFG.maxap(id)
forget_skill(id) if maxap < 0 || self.ap(id) < maxap}
weapons, armors = prepare_equap
skill_ids = []
weapons.each {|id| skill_ids += BlizzCFG.eq_database(id, class_id, true)}
armors.each {|id| skill_ids += BlizzCFG.eq_database(id, class_id, false)}
(skill_ids - non_learnable).each {|id| learn_skill(id)}
end
end
#==============================================================================
# Game_Troop
#==============================================================================
class Game_Troop
attr_reader :id
alias setup_equap_later setup
def setup(troop_id)
setup_equap_later(troop_id)
@id = troop_id
end
end
#==============================================================================
# Window_BattleResult
#==============================================================================
class Window_BattleResult
def refresh_extra(aps)
self.contents.fill_rect(0, 0, self.width, 32, Color.new(0, 0, 0, 0))
x = 4
self.contents.font.color = normal_color
cx = contents.text_size(@exp.to_s).width
self.contents.draw_text(x, 0, cx, 32, @exp.to_s)
x += cx + 4
self.contents.font.color = system_color
cx = contents.text_size('EXP').width
self.contents.draw_text(x, 0, 64, 32, 'EXP')
x += cx + 16
self.contents.font.color = normal_color
cx = contents.text_size(@gold.to_s).width
self.contents.draw_text(x, 0, cx, 32, @gold.to_s)
x += cx + 4
self.contents.font.color = system_color
cx = contents.text_size($data_system.words.gold).width
self.contents.draw_text(x, 0, 128, 32, $data_system.words.gold)
x += cx + 16
self.contents.font.color = normal_color
cx = contents.text_size(aps.to_s).width
self.contents.draw_text(x, 0, cx, 32, aps.to_s)
x += cx + 4
self.contents.font.color = system_color
self.contents.draw_text(x, 0, 128, 32, 'AP')
end
end
#==============================================================================
# Window_Skill
#==============================================================================
class Window_Skill
alias draw_item_equap_later draw_item
def draw_item(index)
skill = @data[index]
aps = BlizzCFG.maxap(skill.id)
if DISPLAY_AP_REQ && !$scene.is_a?(Scene_Battle) &&
(aps > 0 || aps != 0 && DISPLAY_AP_ZERO)
if @actor.skill_can_use?(skill.id)
self.contents.font.color = normal_color
else
self.contents.font.color = disabled_color
end
x, y = 4+index%2*320, index/2*32
rect = Rect.new(x, y, self.width / @column_max - 32, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
bitmap = RPG::Cache.icon(skill.icon_name)
opacity = self.contents.font.color == normal_color ? 255 : 128
self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
text = skill.name
if aps > 0
text += " (#{@actor.ap(skill.id)}/#{aps})"
elsif DISPLAY_AP_ZERO
text += ' (0/0)'
end
self.contents.draw_text(x + 28, y, 204, 32, text, 0)
self.contents.draw_text(x + 232, y, 48, 32, skill.sp_cost.to_s, 2)
else
draw_item_equap_later(index)
end
end
end
#==============================================================================
# Scene_Battle
#==============================================================================
class Scene_Battle
alias start_phase5_equap_later start_phase5
def start_phase5
start_phase5_equap_later
aps = 0
$game_troop.enemies.each {|enemy| aps += BlizzCFG.gainap(enemy.id)}
@result_window.refresh_extra(aps) if DISPLAY_AP_GAIN
$game_party.actors.each {|a| a.add_ap(aps) if !a.dead? || GAIN_DEAD}
end
end
when 133
skill_ids.push(528)
end
end #<= Delete this 'end'
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# End of EQ Database
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
end
return skill_ids
end
def self.equap_nonlearnable_skills(id)
At least i am familiar with this one:
(http://sphotos-c.ak.fbcdn.net/hphotos-ak-ash4/485340_10151411154969143_1305521426_n.jpg)
You probably are missing an 'end' statement for the line
if TONS_OF_ADDONS::EQUAP_SKILLS
I assumed this because it's not there in the code you provided.
Basically put another
end here:
#==============================================================================
# Scene_Battle
#==============================================================================
class Scene_Battle
alias start_phase5_equap_later start_phase5
def start_phase5
start_phase5_equap_later
aps = 0
$game_troop.enemies.each {|enemy| aps += BlizzCFG.gainap(enemy.id)}
@result_window.refresh_extra(aps) if DISPLAY_AP_GAIN
$game_party.actors.each {|a| a.add_ap(aps) if !a.dead? || GAIN_DEAD}
end
end
end # END of checking if EQUAP is enabled in TOA
Yup, silly me. Thanks for all your help!
If one day you find yourself bored and give it a try on that Skill Separation rewriting, just pm me :haha: As i said, it is not a priority and i can totally work it out without the EQUAP Bars script anyway.