I've decided to create an ability grid. I got the inspiration from Final Fantasy X's Sphere Grid by Square Enix, so I feel I should credit them. This is made almost completely with events. The only things that require scripts are optional.
Instructions:
This requires a little work on your part, but it is completely customizable to your liking.
1. Export TileE from the resource manager in the demo, then import it to the game you want to use it in. These tiles are essential to using the system, but can be replaced by your own or other graphics if you so desire.
2. Create a variable to be used as the party's AP.
3. Create maps for each character's ability grid, like you'll see I did in the demo. I used a parallax for the background.
4. Arrange the tiles based on how you want each character to advance. I added the tiles as graphics, but you can put them in the events if you want. For RMXP, you must make one of the invisible tiles unpassable and encircle the ability grid with it in the third layer to prevent the player from being able to walk anywhere.
5. Create a single tile event. You can follow my outline, or you can edit it however you'd like.
6. Copy that tile and paste it on one of each kind of tile. Then, edit those tiles for their respective advancements and copy and paste them to each of their similar tiles. This is much easier than creating each event individually.
7. Don't forget to include a way out of the grid! You can use whatever you want to teleport you out. I used a magic circle since that was easiest.
8. Create an event that teleports the characters to their respective grids.
Optionals: Ability Crystal - this item increases the AP of the party by a certain amount.
________________________________________
Grid Key - this will unlock the locks on an ability grid.
________________________________________
Increase Party AP with Each Level Gained - this small script increases a variable each time a character levels up.
XP:
Go to Game_Actor in the script editor and find line 462 (@level += 1). Create a new line below this by clicking on the end of line 462 and pressing Enter. Paste this script into the new line:
Code:
$game_variables[id] += value
Change "id" to whatever the id of the variable is and change "value" to the amount you want to increase it by with each level.
VX:
Go to Game_Actor in the script editor and find line 525 (level_up). Create a new line below this by clicking on the end of line 525 and pressing Enter. Paste this script into the new line:
Code:
$game_variables[id] += value
Change "id" to whatever the id of the variable is and change "value" to the amount you want to increase it by with each level.
________________________________________
Increase Individual AP with Each Level Gained - this script increases AP for individual party members each time they level up. No work is required to change this, but you must be aware that the variable that is used for a character's AP corresponds to their ID in the database. EX: If Ralph (ID: 001) levels up by 1, Variable 001 will increase by 1.
XP:
Insert in a new section above main.
Code:
class Game_Actor
def exp=(exp)
@exp = [[exp, 9999999].min, 0].max
# Level up
while @exp >= @exp_list[@level+1] and @exp_list[@level+1] > 0
@level += 1
# increment the corresponding game variable
$game_variables[@actor_id] += 1
# Learn skill
for j in $data_classes[@class_id].learnings
if j.level == @level
learn_skill(j.skill_id)
end
end
end
# Level down
while @exp < @exp_list[@level]
@level -= 1
end
# Correction if exceeding current max HP and max SP
@hp = [@hp, self.maxhp].min
@sp = [@sp, self.maxsp].min
end
end
VX:
Insert in a new section above (Insert here) under materials.
Code:
class Game_Actor
def level_up
@level += 1
# increment the corresponding game variable
$game_variables[@actor_id] += 1
for learning in self.class.learnings
learn_skill(learning.skill_id) if learning.level == @level
end
end
end
________________________________________
HUD - This script works in both XP and VX. It will display the variable used for a character in their ability grid. In XP, place this in a new section above Main. In VX, place it in a new section under (Insert here) in the Materials category. Just replace the Map IDs (top and bottom of script) and the Variable IDs (top of script).
HUD Script
Code:
#==============================================================================
# ** Window_AP
#------------------------------------------------------------------------------
# This class creates the window and writes the current "AP".
# You can customize all the "Grid.." ID's and "Variable.." variables
# so they suit you. here are some instructions:
#
# Grid_One - The ID of the first Ability Grid.
# Grid_Two - The ID of the second Ability Grid.
# Grid_Three - The ID of the third Ability Grid.
# Grid_Four - The ID of the fourth Ability Grid.
#
# Set all the "Grid.." variables to the ID's of your four Ability Grid map's.
#
#
# VariableOne - The id of the variable for "Grid_One".
# VariableTwo - The id of the variable for "Grid_Two".
# VariableThree - The id of the variable for "Grid_Three".
# VariableFour - The id of the variable for "Grid_Four".
#
# Example: When the player is on the "Grid_One"'s map ID, it will show the
# "VariableOne"'s value, and when the player is on "Grid_Two"'s
# map ID, it will show the "VariableTwo"'s value.
#
#==============================================================================
class Window_AP < Window_Base
# The map ID's of the Ability Grids.
Grid_One = 1
Grid_Two = 4
Grid_Three = 0
Grid_Four = 0
VariableOne = 1
VariableTwo = 4
VariableThree = 0
VariableFour = 0
#--------------------------------------------------------------------------
# * Initialize
#--------------------------------------------------------------------------
# Self.opacity - This is the opacity of the window, you can change this
# to whatever you want between 0-255.
# 0 = Fully transparent
# 255 = opaque
#
# Self.visible - This will make the window invisible as default.
# So that the HUD won't show on every map.
#
#--------------------------------------------------------------------------
def initialize
super(0, 0, 200, 70)
self.contents = Bitmap.new(width - 32, height - 32)
self.opacity = 150
self.visible = false
refresh
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
# This will display the "Current AP:" text, and the variables of the
# Party members based on which map the player is on.
# You can change the "Current AP" text to whatever you want,
# but the rest you should keep as it is.
#--------------------------------------------------------------------------
def refresh
self.contents.clear
reset_variables
self.contents.draw_text(0, 0, 100, 32, "Current AP:", 0)
if $game_map.map_id == Grid_One
self.contents.draw_text(120, 0, 32, 32, @variableone.to_s, 0)
else if $game_map.map_id == Grid_Two
self.contents.draw_text(120, 0, 32, 32, @variabletwo.to_s, 0)
else if $game_map.map_id == Grid_Three
self.contents.draw_text(120, 0, 32, 32, @variablethree.to_s, 0)
else if $game_map.map_id == Grid_Four
self.contents.draw_text(120, 0, 32, 32, @variablefour.to_s, 0)
end
end
end
end
end
def reset_variables
@variableone = $game_variables[VariableOne]
@variabletwo = $game_variables[VariableTwo]
@variablethree = $game_variables[VariableThree]
@variablefour = $game_variables[VariableFour]
end
def update
super
refresh if (@variableone = $game_variables[VariableOne] or
@variabletwo = $game_variables[VariableTwo] or
@variablethree = $game_variables[VariableThree] or
@variablefour = $game_variables[VariableFour])
end
end
#==============================================================================
# ** Scene_Map
#------------------------------------------------------------------------------
# This will add the HUD in Scene_Map.
#
# Grid_One - The ID of the first Ability Grid.
# Grid_Two - The ID of the second Ability Grid.
# Grid_Three - The ID of the third Ability Grid.
# Grid_Four - The ID of the fourth Ability Grid.
#
# NOTE: the numbers in these variables "Grid_One", "Grid_Two", etc.
# Should be the same as the ones in the beginning of this script.
#
#
# This will make the HUD visible whenever the player is in any of the four
# "Grid.." map ID's.
#
#==============================================================================
class Scene_Map
# The map ID's of the Ability Grids.
Grid_One = 1
Grid_Two = 4
Grid_Three = 0
Grid_Four = 0
alias yourhud_main main
alias yourhud_update update
def main
@yourhud = Window_AP.new
yourhud_main
@yourhud.dispose
end
def update
if ($game_map.map_id == Grid_One or
$game_map.map_id == Grid_Two or
$game_map.map_id == Grid_Three or
$game_map.map_id == Grid_Four)
@yourhud.visible = true
else
@yourhud.visible = false
end
@yourhud.update
yourhud_update
end
end
________________________________________
Ability Grid access through menu (VX only) - Dargor has generously agreed to help me create this script, but I'm not going to post it here because of its length. You can find it in the demo, though.
________________________________________
Ability Grid appears in menu after a switch is turned on - In Dargor's script, named Ability Grid in the demo, search for the method "create_command_window" and replace that whole method with this:
Code:
def create_command_window
commands = $game_system.menu_commands
if $game_switches[1] == true
$game_system.add_menu_command(commands.size-1, Vocab::AbilityGrid)
end
dargor_vx_ag_menu_create_command_window
end
Just change the number in "$game_switches[1]" to the ID of the switch that you wish to have activate the ability grid menu command.
Notes:
*You can replace the ability grid with teachers that would increase a character's stats and give them abilities.
Credit:
Please give credit to the following people:
Marpy for helping me with obtaining scripts and giving me some very good suggestions.
Gando for creating the Increase Party AP with Each Level Gained script, the Variable HUDs, and the script edit that allows access to the Ability Grid through the menu after a switch is turned on.
Brewmeister for creating the Increase Individual AP with Each Level Gained script.
Dargor for creating the menu script.
Me for creating the events and tileset. (If I forgot anyone, please PM me so I can add you to the list.)
If you have any questions, comments, or problems, feel free to PM me or post in this thread.
This is an old event system and I'm working on updating it at the moment. If you have any ideas or suggestions, let me know!