#==============================================================================
# ** FavoriteFoods
#------------------------------------------------------------------------------
# This class is for all in-game windows.
#==============================================================================
module State_Extras
#--------------------------------------------------------------------------
# * State Extras
# actor : actor
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
# How to set up skills:
# ACTOR_SKILLS_NAME refers to the name of the skill the actor has.
# So the character with the ID of 1 will have Stealing, Stalking and Eating
# as their skill names.
#
# after you've set up the names, the ACTOR_SKILLS_ID is the id of the variable
# that stores the points for the respective skill
#
# eg.
# ACTOR_SKILLS_NAME[1] = ['Stealing', 'Stalking', 'Eating']
# ACTOR_SKILLS_ID[1] = [ 17, 109, 22]
#
# Spacing can help with the readability.
# The first two have been set up as examples:
# EDIT HERE ---------------------------------------------------------------
ACTOR_SKILLS_NAME = []
ACTOR_SKILLS_NAME[1] = ['Stealing', 'Stalking', 'Eating']
ACTOR_SKILLS_NAME[2] = ['Magery', 'Meditation', 'Fishing']
ACTOR_SKILLS_ID = []
ACTOR_SKILLS_ID[1] = [17, 109, 22]
ACTOR_SKILLS_ID[2] = [11, 23, 56]
# STOP EDITING HERE -------------------------------------------------------
def self.get_actor_skills(actor)
add = []
for actor2 in $data_actors
next if actor2.id != actor.id
array = []
array.push(ACTOR_SKILLS_NAME[actor2.id])
add = []
for i in ACTOR_SKILLS_ID[actor2.id]
add.push($game_variables[i])
end
array.push(add)
end
return array if array != nil
end
def self.favorite_foods(actor)
case actor.id
when 1
return ['032-Item01','033-Item02','034-Item03']
when 2
return ['032-Item01','033-Item02']
when 3
return ['032-Item01','033-Item02','034-Item03','035-Item04','036-Item05',
'037-Item06','038-Item07']
when 4
return ['032-Item01','033-Item02','034-Item03','035-Item04','036-Item05']
when 5
return ['032-Item01','033-Item02','034-Item03']
when 6
return ['032-Item01','033-Item02']
when 7
return ['032-Item01','033-Item02','034-Item03','035-Item04','036-Item05',
'037-Item06','038-Item07']
when 8
return ['032-Item01','033-Item02','034-Item03','035-Item04','036-Item05']
end
return []
end
end
#==============================================================================
# ** Window_Base
#------------------------------------------------------------------------------
# This class is for all in-game windows.
#==============================================================================
class Window_Base < Window
#--------------------------------------------------------------------------
# * Draw Favorite Foods
# actor : actor
# x : draw spot x-coordinate
# y : draw spot y-coordinate
#--------------------------------------------------------------------------
def draw_actor_favorite_foods(actor, x, y)
return if actor == nil
favorite_foods = State_Extras::favorite_foods(actor)
for i in 0...favorite_foods.size
icon_name = favorite_foods[i]
bitmap = RPG::Cache.icon(icon_name)
self.contents.blt(x + i*32, y + 4, bitmap, Rect.new(0, 0, 24, 24))
end
end
end
#==============================================================================
# ** Window_Status
#------------------------------------------------------------------------------
# This window displays full status specs on the status screen.
#==============================================================================
class Window_Status < Window_Base
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
draw_actor_graphic(@actor, 40, 112)
draw_actor_name(@actor, 4, 0)
draw_actor_class(@actor, 4 + 144, 0)
draw_actor_level(@actor, 96, 32)
draw_actor_state(@actor, 96, 64)
draw_actor_hp(@actor, 96, 112, 172)
draw_actor_sp(@actor, 96, 144, 172)
draw_actor_parameter(@actor, 96, 192, 0)
draw_actor_parameter(@actor, 96, 224, 1)
draw_actor_parameter(@actor, 96, 256, 2)
draw_actor_parameter(@actor, 96, 304, 3)
draw_actor_parameter(@actor, 96, 336, 4)
draw_actor_parameter(@actor, 96, 368, 5)
draw_actor_parameter(@actor, 96, 400, 6)
skills = State_Extras.get_actor_skills(@actor)
self.contents.font.color = system_color
self.contents.draw_text(320, 48-32, 160, 32, "Favorite Foods")
self.contents.font.color = system_color
self.contents.draw_text(320, 48+32+16, 120, 32, "Ultima Skills")
self.contents.font.color = normal_color
self.contents.draw_text(320, 96+32, 120, 32, "#{skills[0][0]}:", 0)
self.contents.draw_text(320, 96+64, 120, 32, "#{skills[0][1]}:", 0)
self.contents.draw_text(320, 96+96, 120, 32, "#{skills[0][2]}:", 0)
self.contents.draw_text(320 + 120-36, 96+32, 120, 32, "#{skills[1][0]} / 1000", 2)
self.contents.draw_text(320 + 120-36, 96+64, 120, 32, "#{skills[1][1]} / 1000", 2)
self.contents.draw_text(320 + 120-36, 96+96, 120, 32, "#{skills[1][2]} / 1000", 2)
self.contents.font.color = system_color
draw_actor_favorite_foods(@actor, 320, 48)
self.contents.draw_text(320, 160+64+16, 96, 32, "Equipment")
draw_item_name($data_weapons[@actor.weapon_id], 320 + 16, 208+64)
draw_item_name($data_armors[@actor.armor1_id], 320 + 16, 256+64)
draw_item_name($data_armors[@actor.armor2_id], 320 + 16, 304+64)
draw_item_name($data_armors[@actor.armor3_id], 320 + 16, 352+64)
draw_item_name($data_armors[@actor.armor4_id], 320 + 16, 400+64)
end
end