Chaos_Prime
Member
It's me again and this time I was wandering could someone do some little editing to this script, thanks to Jack A. Trades for doing the original one for me.
This time I was wandering if someone could edit this to were if you master a current class, say like the Fighter, and you beat the game, you can start over but can't select the fighter class to start with. And that class will be blue with a symbol beside it or in front of it to indicate that it's mastered.
This is going into my 1 Hero menu system I'm working on slowly.
Code:
#==============================================================================
# ** Window_Class
#------------------------------------------------------------------------------
# This window displays actors class on the menu screen.
#==============================================================================
class Window_Class < Window_Base
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
super(0, 0, 160, 160)
self.contents = Bitmap.new(width - 32, height - 32)
refresh
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
# Starting coordinates for the first line of text.
x = 120
y = 25
# Creates empty array.
avail_id = []
# For each actor available in the party, get the Class ID and put
# it in the avail_id array.
for actor in $game_party.actors
avail_id.push(actor.class_id)
end
# Sort the avail_id array, and truncate duplicate entries.
# Example:
# arr = [1, 2, 4, 4, 6, 7, 7, 7, 7, 9, 14, 14]
# arr.uniq!
# // #=> arr is now [1, 2, 4, 6, 7, 9, 14]
avail_id.sort!.uniq!
# For each class available in the Database...
for i in 1...$data_classes.size
# Get the Class name.
text = $data_classes[i].name
# If Class ID's of the party matches the Class ID from database...
if avail_id.include?(i)
# Use System Color.
self.contents.font.color = system_color
else
# Otherwise, use Disabled Color.
self.contents.font.color = disabled_color
end
# Draw the text with x- and y-coordinates.
self.contents.draw_text(0, 0, x, y, text)
# Increase y value to space out for the next line.
y += 32
end
end
end
This is going into my 1 Hero menu system I'm working on slowly.