- Сообщений: 595
- Спасибо получено: 52
Здесь вы можете заказать скрипты!
Если вы скриптер, вливайтесь!
Пожалуйста Войти или Регистрация, чтобы присоединиться к беседе.
- Dr. Nick To
-
- Не в сети
- Живу я здесь
-
- Сообщений: 2158
- Спасибо получено: 24
На седьмом столбе мудрости дома клана Тайра в Эдо написано: Каждый, кто не понимает разницу между небрежностью и качеством, старанием и поспешностью, - достоин сожаления.
Пожалуйста Войти или Регистрация, чтобы присоединиться к беседе.
- Agckuu_Coceg
-
- Не в сети
- Живу я здесь
-
- Простой Гинтокист с огромной внутренней ленью.
- Сообщений: 1549
- Спасибо получено: 329
Пожалуйста Войти или Регистрация, чтобы присоединиться к беседе.
По-моему один из самых животрепещущих вопросов. Сделавший этот скрипт на пятёрку - будет очень большим молодцом.
→ → ↓ ↑ Y
Пожалуйста Войти или Регистрация, чтобы присоединиться к беседе.
Пожалуйста Войти или Регистрация, чтобы присоединиться к беседе.
→ → ↓ ↑ Y
Пожалуйста Войти или Регистрация, чтобы присоединиться к беседе.
Когда просматривал первый раз, не заметил спойлер.
Пожалуйста Войти или Регистрация, чтобы присоединиться к беседе.
Там файл scripts.rxdata, думаю знаешь что с ним делать.
→ → ↓ ↑ Y
Пожалуйста Войти или Регистрация, чтобы присоединиться к беседе.
- Agckuu_Coceg
-
- Не в сети
- Живу я здесь
-
- Простой Гинтокист с огромной внутренней ленью.
- Сообщений: 1549
- Спасибо получено: 329
Пожалуйста Войти или Регистрация, чтобы присоединиться к беседе.
Не мертво то, что в вечности пребудет. со смертью времени и смерть умрет.
Пожалуйста Войти или Регистрация, чтобы присоединиться к беседе.
"Люди, Ангелы, Демоны... Есть ли между ними разница? Я не согласен с теми, кто утверждает, что Демоны - это абсолютное зло. Бывают Люди, гораздо хуже Демонов.И бывают Демоны куда более великодушные, чем Ангелы. Важно не то, кто ты, а то, кем ты хочешь быть..."
- Найн, Высший Демон -
Dark Arts - The Wings of Angel
Пожалуйста Войти или Регистрация, чтобы присоединиться к беседе.
Там не совсем то, что я хотел. Мне нужно не только "дневно-ночное" освещение и погодные еффекты, но и динамический искусственный свет, создаваемый различными фонарями, огнем, магией и другими источниками света на одном участке, и скрываемый тенью на другомВроде уже выкладывали... Не помню точно где. Попробуй посмотреть в разделе "помощь" в теме "стихии". Там вроде есть такой скрипт.
Ухх, что-то я намудрил, но описал требования, как умею. Надеюсь, кто то поймет
Не мертво то, что в вечности пребудет. со смертью времени и смерть умрет.
Пожалуйста Войти или Регистрация, чтобы присоединиться к беседе.
→ → ↓ ↑ Y
Пожалуйста Войти или Регистрация, чтобы присоединиться к беседе.
Думаю пойдет, спасибо
Не мертво то, что в вечности пребудет. со смертью времени и смерть умрет.
Пожалуйста Войти или Регистрация, чтобы присоединиться к беседе.
Пожалуйста Войти или Регистрация, чтобы присоединиться к беседе.
- Equilibrium Keeper
-
- Не в сети
- Захожу иногда
-
- Скриптер
- Сообщений: 119
- Спасибо получено: 3
вначале нажми на кнопку Spoiler. Далее, чуть ниже, на "Expand/Contract".у меня почемуто скрипты не показываются... можите написать тут скрип и способ применения.... и у кого есть скрипт на Full Screen при запуске игры...
Истина там, во тьме, и во тьме ты иди - мыслящий бродит во тьме.
В себя самого загляни, открой свою дорогу в Ничто.
В Ничто ты войди, во тьму, и пойми:
Пока ты во тьме, не может она быть Ничем - ведь там ты.
Пожалуйста Войти или Регистрация, чтобы присоединиться к беседе.
- Алексей Владимирович
-
- Не в сети
- Бывалый
-
- Сообщений: 72
- Спасибо получено: 0
Этот скрипт увеличивает размер иконок.
Вот он.
# ** Theory's Greater Icons
#
# This script allows you to set x and y sizes for your item and skill icons.
# Be sure to make the files in your icons folder reflect this- it does not
# stretch icons. This script was optimized for 50x50 icons, but any dimensions
# larger than 30x30 and smaller than 200x200 should work.
#
# It required a small menu edit for quantity and SP cost locations; and will
# not be compatible with most CMS's without editing.
#==============================================================================
module Theory_Greater_Icons
Width = 40
Height = 40
Background = 'back'
UncommonElement = 18
UncommonBackground = 'uncommon'
UncommonColor = Color.new(255, 255, 255, 255)
UncommonColorDisabled = Color.new(255, 255, 255, 128)
RareElement = 19
RareBackground = 'rare'
RareColor = Color.new(255, 255, 255, 255)
RareColorDisabled = Color.new(255, 255, 255, 128)
LegendaryElement = 20
LegendaryBackground = 'legendary'
LegendaryColor = Color.new(255, 255, 255, 255)
LegendaryColorDisabled = Color.new(255, 255, 255, 128)
end
#==============================================================================
# ** Window_Selectable
#==============================================================================
class Window_Selectable
#
# * Public Instance Variables
#
attr_writer :oh
#
# * Text Cursor Height
#
def oh
return @oh.nil? ? 32 : @oh
end
#
# * Get Top Row
#
def top_row
# Divide y-coordinate of window contents transfer origin by 1 row
# height of self.oh
return self.oy / self.oh
end
#
# * Set Top Row
# row : row shown on top
#
def top_row=(row)
# If row is less than 0, change it to 0
# If row exceeds row_max - 1, change it to row_max - 1
row = [[row, 0].max, row_max - 1].min
# Multiply 1 row height by 32 for y-coordinate of window contents
# transfer origin
self.oy = row * self.oh
end
#
# * Get Number of Rows Displayable on 1 Page
#
def page_row_max
# Subtract a frame height of 32 from the window height, and divide it by
# 1 row height of self.oh
return (self.height - 32) / self.oh
end
#
# * Update Cursor Rectangle
#
def update_cursor_rect
# If cursor position is less than 0
if @index < 0
self.cursor_rect.empty
return
end
# Get current row
row = @index / @column_max
# If current row is before top row
if row < self.top_row
# Scroll so that current row becomes top row
self.top_row = row
end
# If current row is more to back than back row
if row > self.top_row + (self.page_row_max - 1)
# Scroll so that current row becomes back row
self.top_row = row - (self.page_row_max - 1)
end
# Calculate cursor width
cursor_width = self.width / @column_max - 32
# Calculate cursor coordinates
x = @index % @column_max * (cursor_width + 32)
y = @index / @column_max * self.oh - self.oy
if self.active == true
# Update cursor rectangle
self.cursor_rect.set(x, y, cursor_width, self.oh)
end
end
end
#==============================================================================
# ** Window_Item
#
# This window displays items in possession on the item and battle screens.
#==============================================================================
class Window_Item < Window_Selectable
#
# * Object Initialization
#
def initialize
super(0, 64, 640, 416)
@column_max = 2
##set the parent selectable height
@oh = Theory_Greater_Icons::Height
refresh
self.index = 0
# If in battle, move window to center of screen
# and make it semi-transparent
if $game_temp.in_battle
self.y = 64
self.height = 256
self.back_opacity = 160
end
end
#
# * Get Item
#
def item
return @data[self.index]
end
#
# * Refresh
#
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
# Add item
for i in 1...$data_items.size
if $game_party.item_number(i) > 0
@data.push($data_items)
end
end
# Also add weapons and items if outside of battle
unless $game_temp.in_battle
for i in 1...$data_weapons.size
if $game_party.weapon_number(i) > 0
@data.push($data_weapons)
end
end
for i in 1...$data_armors.size
if $game_party.armor_number(i) > 0
@data.push($data_armors)
end
end
end
# If item count is not 0, make a bit map and draw all items
@item_max = @data.size
if @item_max > 0
self.contents = Bitmap.new(width - Theory_Greater_Icons::Width, row_max * Theory_Greater_Icons::Height)
for i in 0...@item_max
draw_item(i)
end
end
end
#
# * Draw Item
# index : item number
#
def draw_item(index)
item = @data[index]
case item
when RPG::Item
number = $game_party.item_number(item.id)
when RPG::Weapon
number = $game_party.weapon_number(item.id)
when RPG::Armor
number = $game_party.armor_number(item.id)
end
x = 4 + index % 2 * (288 + Theory_Greater_Icons::Width)
y = index / 2 * Theory_Greater_Icons::Height
rect = Rect.new(x, y, self.width / @column_max - Theory_Greater_Icons::Width, Theory_Greater_Icons::Height)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
@bitmap = RPG::Cache.icon(item.icon_name)
case item
when RPG::Weapon
weapon = $data_weapons[item.id]
if weapon.element_set.include?(Theory_Greater_Icons::LegendaryElement)
self.contents.font.color = Theory_Greater_Icons::LegendaryColorDisabled
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::LegendaryBackground)
elsif weapon.element_set.include?(Theory_Greater_Icons::RareElement)
self.contents.font.color = Theory_Greater_Icons::RareColorDisabled
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::RareBackground)
elsif weapon.element_set.include?(Theory_Greater_Icons::UncommonElement)
self.contents.font.color = Theory_Greater_Icons::UncommonColorDisabled
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::UncommonBackground)
elsif !weapon.element_set.include?(Theory_Greater_Icons::RareElement) and !weapon.element_set.include?(Theory_Greater_Icons::UncommonElement) and !weapon.element_set.include?(Theory_Greater_Icons::LegendaryElement)
self.contents.font.color = normal_color
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::Background)
end
when RPG::Armor
armor = $data_armors[item.id]
if armor.guard_element_set.include?(Theory_Greater_Icons::LegendaryElement)
self.contents.font.color = Theory_Greater_Icons::LegendaryColorDisabled
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::LegendaryBackground)
elsif armor.guard_element_set.include?(Theory_Greater_Icons::RareElement)
self.contents.font.color = Theory_Greater_Icons::RareColorDisabled
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::RareBackground)
elsif armor.guard_element_set.include?(Theory_Greater_Icons::UncommonElement)
self.contents.font.color = Theory_Greater_Icons::UncommonColorDisabled
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::UncommonBackground)
elsif !armor.guard_element_set.include?(Theory_Greater_Icons::RareElement) and !armor.guard_element_set.include?(Theory_Greater_Icons::UncommonElement) and !armor.guard_element_set.include?(Theory_Greater_Icons::LegendaryElement)
self.contents.font.color = disabled_color
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::Background)
end
when RPG::Item
itema = $data_items[item.id]
if itema.element_set.include?(Theory_Greater_Icons::LegendaryElement)
if $game_party.item_can_use?(item.id)
self.contents.font.color = Theory_Greater_Icons::LegendaryColor
else
self.contents.font.color = Theory_Greater_Icons::LegendaryColorDisabled
end
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::LegendaryBackground)
elsif itema.element_set.include?(Theory_Greater_Icons::RareElement)
if $game_party.item_can_use?(item.id)
self.contents.font.color = Theory_Greater_Icons::RareColor
else
self.contents.font.color = Theory_Greater_Icons::RareColorDisabled
end
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::RareBackground)
elsif itema.element_set.include?(Theory_Greater_Icons::UncommonElement)
if $game_party.item_can_use?(item.id)
self.contents.font.color = Theory_Greater_Icons::UncommonColor
else
self.contents.font.color = Theory_Greater_Icons::UncommonColorDisabled
end
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::UncommonBackground)
elsif !itema.element_set.include?(Theory_Greater_Icons::RareElement) and !itema.element_set.include?(Theory_Greater_Icons::UncommonElement) and !itema.element_set.include?(Theory_Greater_Icons::LegendaryElement)
if $game_party.item_can_use?(item.id)
self.contents.font.color = normal_color
else
self.contents.font.color = disabled_color
end
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::Background)
end
end
opacity = self.contents.font.color == normal_color ? 255 : 128
self.contents.draw_text(x + Theory_Greater_Icons::Width + 4, y, 212, Theory_Greater_Icons::Height, item.name, 0)
tempy = y + Theory_Greater_Icons::Height - 36
self.contents.draw_text(x - 5, tempy, 24, Theory_Greater_Icons::Height, number.to_s, 2)
end
end
#==============================================================================
# ** Window_Status
#
# This window displays full status specs on the status screen.
#==============================================================================
class Window_Status < Window_Base
#
# * Object Initialization
# actor : actor
#
def initialize(actor)
super(0, 0, 640, 480)
self.contents = Bitmap.new(width - 32, height - 32)
@actor = actor
refresh
end
#
# * 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)
self.contents.font.color = system_color
self.contents.draw_text(320, 48, 80, 32, "EXP")
self.contents.draw_text(320, 80, 80, 32, "NEXT")
self.contents.font.color = normal_color
self.contents.draw_text(320 + 80, 48, 84, 32, @actor.exp_s, 2)
self.contents.draw_text(320 + 80, 80, 84, 32, @actor.next_rest_exp_s, 2)
self.contents.font.color = system_color
self.contents.draw_text(320, 160, 96, 32, "equipment")
draw_item_name($data_weapons[@actor.weapon_id], 320 + 16, 203)
draw_item_name($data_armors[@actor.armor1_id], 320 + 16, 251)
draw_item_name($data_armors[@actor.armor2_id], 320 + 16, 299)
draw_item_name($data_armors[@actor.armor3_id], 320 + 16, 347)
draw_item_name($data_armors[@actor.armor4_id], 320 + 16, 395)
end
end
#==============================================================================
# ** Window_EquipItem
#
# This window displays choices when opting to change equipment on the
# equipment screen.
#==============================================================================
class Window_EquipItem < Window_Selectable
#
# * Object Initialization
# actor : actor
# equip_type : equip region (0-3)
#
def initialize(actor, equip_type)
super(0, 256, 640, 224)
@oh = Theory_Greater_Icons::Height
@actor = actor
@equip_type = equip_type
@column_max = 2
refresh
self.active = false
self.index = -1
end
#
# * Item Acquisition
#
def item
return @data[self.index]
end
#
# * Refresh
#
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
# Add equippable weapons
if @equip_type == 0
weapon_set = $data_classes[@actor.class_id].weapon_set
for i in 1...$data_weapons.size
if $game_party.weapon_number(i) > 0 and weapon_set.include?(i)
@data.push($data_weapons)
end
end
end
# Add equippable armor
if @equip_type != 0
armor_set = $data_classes[@actor.class_id].armor_set
for i in 1...$data_armors.size
if $game_party.armor_number(i) > 0 and armor_set.include?(i)
if $data_armors.kind == @equip_type-1
@data.push($data_armors)
end
end
end
end
# Add blank page
@data.push(nil)
# Make a bit map and draw all items
@item_max = @data.size
self.contents = Bitmap.new(width - Theory_Greater_Icons::Width, row_max * Theory_Greater_Icons::Height)
for i in 0...@item_max-1
draw_item(i)
end
end
#
# * Draw Item
# index : item number
#
def draw_item(index)
item = @data[index]
x = 4 + index % 2 * (288 + 32)
y = index / 2 * Theory_Greater_Icons::Height + 2
case item
when RPG::Weapon
number = $game_party.weapon_number(item.id)
when RPG::Armor
number = $game_party.armor_number(item.id)
end
@bitmap = RPG::Cache.icon(item.icon_name)
case item
when RPG::Weapon
weapon = @data[index]
if weapon.element_set.include?(Theory_Greater_Icons::LegendaryElement)
self.contents.font.color = Theory_Greater_Icons::LegendaryColor
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::LegendaryBackground)
elsif weapon.element_set.include?(Theory_Greater_Icons::RareElement)
self.contents.font.color = Theory_Greater_Icons::RareColor
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::RareBackground)
elsif weapon.element_set.include?(Theory_Greater_Icons::UncommonElement)
self.contents.font.color = Theory_Greater_Icons::UncommonColor
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::UncommonBackground)
elsif !weapon.element_set.include?(Theory_Greater_Icons::RareElement) and !weapon.element_set.include?(Theory_Greater_Icons::UncommonElement) and !weapon.element_set.include?(Theory_Greater_Icons::LegendaryElement)
self.contents.font.color = normal_color
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::Background)
end
when RPG::Armor
armor = @data[index]
if armor.guard_element_set.include?(Theory_Greater_Icons::LegendaryElement)
self.contents.font.color = Theory_Greater_Icons::LegendaryColor
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::LegendaryBackground)
elsif armor.guard_element_set.include?(Theory_Greater_Icons::RareElement)
self.contents.font.color = Theory_Greater_Icons::RareColor
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::RareBackground)
elsif armor.guard_element_set.include?(Theory_Greater_Icons::UncommonElement)
self.contents.font.color = Theory_Greater_Icons::UncommonColor
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::UncommonBackground)
elsif !armor.guard_element_set.include?(Theory_Greater_Icons::RareElement) and !armor.guard_element_set.include?(Theory_Greater_Icons::UncommonElement) and !armor.guard_element_set.include?(Theory_Greater_Icons::LegendaryElement)
self.contents.font.color = normal_color
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::Background)
end
end
self.contents.draw_text(x + Theory_Greater_Icons::Width + 3, y, 212, Theory_Greater_Icons::Height, item.name, 0)
tempy = y + Theory_Greater_Icons::Height - 36
self.contents.font.color = normal_color
self.contents.draw_text(x - 5, tempy, 24, Theory_Greater_Icons::Height, number.to_s, 2)
end
#
# * Help Text Update
#
def update_help
@help_window.set_text(self.item == nil ? "" : self.item.description)
end
end
#==============================================================================
# ** Window_EquipRight
#
# This window displays items the actor is currently equipped with on the
# equipment screen.
#==============================================================================
class Window_EquipRight < Window_Selectable
#
# * Object Initialization
# actor : actor
#
def initialize(actor)
super(272, 64, 368, 192)
@oh = Theory_Greater_Icons::Height
self.contents = Bitmap.new(width - Theory_Greater_Icons::Width, height + Theory_Greater_Icons::Height + 15)
@actor = actor
refresh
self.index = 0
end
#
# * Item Acquisition
#
def item
return @data[self.index]
end
#
# * Refresh
#
def refresh
self.contents.clear
@data = []
@data.push($data_weapons[@actor.weapon_id])
@data.push($data_armors[@actor.armor1_id])
@data.push($data_armors[@actor.armor2_id])
@data.push($data_armors[@actor.armor3_id])
@data.push($data_armors[@actor.armor4_id])
@item_max = @data.size
self.contents.font.color = system_color
self.contents.draw_text(4, Theory_Greater_Icons::Height * 0, 92, Theory_Greater_Icons::Height, $data_system.words.weapon)
self.contents.draw_text(4, Theory_Greater_Icons::Height * 1, 92, Theory_Greater_Icons::Height, $data_system.words.armor1)
self.contents.draw_text(4, Theory_Greater_Icons::Height * 2, 92, Theory_Greater_Icons::Height, $data_system.words.armor2)
self.contents.draw_text(4, Theory_Greater_Icons::Height * 3, 92, Theory_Greater_Icons::Height, $data_system.words.armor3)
self.contents.draw_text(5, Theory_Greater_Icons::Height * 4, 92, Theory_Greater_Icons::Height, $data_system.words.armor4)
draw_item_name(@data[0], 92, Theory_Greater_Icons::Height * 0)
draw_item_name(@data[1], 92, Theory_Greater_Icons::Height * 1)
draw_item_name(@data[2], 92, Theory_Greater_Icons::Height * 2)
draw_item_name(@data[3], 92, Theory_Greater_Icons::Height * 3)
draw_item_name(@data[4], 92, Theory_Greater_Icons::Height * 4)
end
#
# * Help Text Update
#
def update_help
@help_window.set_text(self.item == nil ? "" : self.item.description)
end
end
#==============================================================================
# ** Window_Skill
#
# This window displays usable skills on the skill and battle screens.
#==============================================================================
class Window_Skill < Window_Selectable
#
# * Object Initialization
# actor : actor
#
def initialize(actor)
super(0, 128, 640, 352)
@oh = Theory_Greater_Icons::Height
@actor = actor
@column_max = 2
refresh
self.index = 0
# If in battle, move window to center of screen
# and make it semi-transparent
if $game_temp.in_battle
self.y = 64
self.height = 256
self.back_opacity = 160
end
end
#
# * Acquiring Skill
#
def skill
return @data[self.index]
end
#
# * Refresh
#
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
for i in 0...@actor.skills.size
skill = $data_skills[@actor.skills]
if skill != nil
@data.push(skill)
end
end
# If item count is not 0, make a bit map and draw all items
@item_max = @data.size
if @item_max > 0
self.contents = Bitmap.new(width - Theory_Greater_Icons::Width, row_max * Theory_Greater_Icons::Height)
for i in 0...@item_max
draw_item(i)
end
end
end
#
# * Draw Item
# index : item number
#
def draw_item(index)
skill = @data[index]
x = 4 + index % 2 * (288 + Theory_Greater_Icons::Width)
y = index / 2 * Theory_Greater_Icons::Height
rect = Rect.new(x, y, self.width / @column_max - Theory_Greater_Icons::Width, Theory_Greater_Icons::Height)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
@bitmap = RPG::Cache.icon(skill.icon_name)
if skill.element_set.include?(Theory_Greater_Icons::LegendaryElement)
if @actor.skill_can_use?(skill.id)
self.contents.font.color = Theory_Greater_Icons::LegendaryColor
else
self.contents.font.color = Theory_Greater_Icons::LegendaryColorDisabled
end
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::LegendaryBackground)
elsif skill.element_set.include?(Theory_Greater_Icons::RareElement)
if @actor.skill_can_use?(skill.id)
self.contents.font.color = Theory_Greater_Icons::RareColor
else
self.contents.font.color = Theory_Greater_Icons::RareColorDisabled
end
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::RareBackground)
elsif skill.element_set.include?(Theory_Greater_Icons::UncommonElement)
if @actor.skill_can_use?(skill.id)
self.contents.font.color = Theory_Greater_Icons::UncommonColor
else
self.contents.font.color = Theory_Greater_Icons::UncommonColorDisabled
end
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::UncommonBackground)
elsif !skill.element_set.include?(Theory_Greater_Icons::RareElement) and !skill.element_set.include?(Theory_Greater_Icons::UncommonElement) and !skill.element_set.include?(Theory_Greater_Icons::LegendaryElement)
if @actor.skill_can_use?(skill.id)
self.contents.font.color = normal_color
else
self.contents.font.color = disabled_color
end
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::Background)
end
self.contents.draw_text(x + Theory_Greater_Icons::Width + 4, y - 10, 204, Theory_Greater_Icons::Height, skill.name, 0)
self.contents.draw_text(x + Theory_Greater_Icons::Width + 6, y + 10, 48, Theory_Greater_Icons::Height, skill.sp_cost.to_s, 2)
end
#
# * Help Text Update
#
def update_help
@help_window.set_text(self.skill == nil ? "" : self.skill.description)
end
end
#==============================================================================
# ** Window_BattleResult
#
# This window displays amount of gold and EXP acquired at the end of a battle.
#==============================================================================
class Window_BattleResult < Window_Base
#
# * Object Initialization
# exp : EXP
# gold : amount of gold
# treasures : treasures
#
def initialize(exp, gold, treasures)
@exp = exp
@gold = gold
@treasures = treasures
super(160, 0, 320, @treasures.size * Theory_Greater_Icons::Height + 64)
self.contents = Bitmap.new(width - 32, height - 32)
self.y = 160 - height / 2
self.back_opacity = 160
self.visible = false
refresh
end
#
# * Refresh
#
def refresh
self.contents.clear
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
self.contents.draw_text(x, 0, 128, 32, $data_system.words.gold)
y = 32
for item in @treasures
draw_item_name(item, 4, y)
y += Theory_Greater_Icons::Height
end
end
end
#==============================================================================
# ** Window_ShopBuy
#
# This window displays buyable goods on the shop screen.
#==============================================================================
class Window_ShopBuy < Window_Selectable
#
# * Object Initialization
# shop_goods : goods
#
def initialize(shop_goods)
super(0, 128, 368, 352)
@oh = Theory_Greater_Icons::Height
@shop_goods = shop_goods
refresh
self.index = 0
end
#
# * Refresh
#
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
for goods_item in @shop_goods
case goods_item[0]
when 0
item = $data_items[goods_item[1]]
when 1
item = $data_weapons[goods_item[1]]
when 2
item = $data_armors[goods_item[1]]
end
if item != nil
@data.push(item)
end
end
# If item count is not 0, make a bit map and draw all items
@item_max = @data.size
if @item_max > 0
self.contents = Bitmap.new(width - Theory_Greater_Icons::Width, row_max * Theory_Greater_Icons::Height)
for i in 0...@item_max
draw_item(i)
end
end
end
#
# * Draw Item
# index : item number
#
def draw_item(index)
item = @data[index]
x = 4
y = index * Theory_Greater_Icons::Height
case item
when RPG::Weapon
number = $game_party.weapon_number(item.id)
when RPG::Armor
number = $game_party.armor_number(item.id)
end
@bitmap = RPG::Cache.icon(item.icon_name)
case item
when RPG::Item
number = $game_party.item_number(item.id)
when RPG::Weapon
number = $game_party.weapon_number(item.id)
when RPG::Armor
number = $game_party.armor_number(item.id)
end
case item
when RPG::Weapon
weapon = @data[index]
if weapon.element_set.include?(Theory_Greater_Icons::LegendaryElement)
self.contents.font.color = Theory_Greater_Icons::LegendaryColor
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::LegendaryBackground)
elsif weapon.element_set.include?(Theory_Greater_Icons::RareElement)
self.contents.font.color = Theory_Greater_Icons::RareColor
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::RareBackground)
elsif weapon.element_set.include?(Theory_Greater_Icons::UncommonElement)
self.contents.font.color = Theory_Greater_Icons::UncommonColor
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::UncommonBackground)
elsif !weapon.element_set.include?(Theory_Greater_Icons::RareElement) and !weapon.element_set.include?(Theory_Greater_Icons::UncommonElement) and !weapon.element_set.include?(Theory_Greater_Icons::LegendaryElement)
self.contents.font.color = normal_color
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::Background)
end
when RPG::Armor
armor = @data[index]
if armor.guard_element_set.include?(Theory_Greater_Icons::LegendaryElement)
self.contents.font.color = Theory_Greater_Icons::LegendaryColor
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::LegendaryBackground)
elsif armor.guard_element_set.include?(Theory_Greater_Icons::RareElement)
self.contents.font.color = Theory_Greater_Icons::RareColor
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::RareBackground)
elsif armor.guard_element_set.include?(Theory_Greater_Icons::UncommonElement)
self.contents.font.color = Theory_Greater_Icons::UncommonColor
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::UncommonBackground)
elsif !armor.guard_element_set.include?(Theory_Greater_Icons::RareElement) and !armor.guard_element_set.include?(Theory_Greater_Icons::UncommonElement) and !armor.guard_element_set.include?(Theory_Greater_Icons::LegendaryElement)
self.contents.font.color = normal_color
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::Background)
end
when RPG::Item
itema = $data_items[item.id]
if itema.element_set.include?(Theory_Greater_Icons::LegendaryElement)
self.contents.font.color = Theory_Greater_Icons::LegendaryColor
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::LegendaryBackground)
elsif itema.element_set.include?(Theory_Greater_Icons::RareElement)
self.contents.font.color = Theory_Greater_Icons::RareColor
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::RareBackground)
elsif itema.element_set.include?(Theory_Greater_Icons::UncommonElement)
self.contents.font.color = Theory_Greater_Icons::UncommonColor
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::UncommonBackground)
elsif !itema.element_set.include?(Theory_Greater_Icons::RareElement) and !itema.element_set.include?(Theory_Greater_Icons::UncommonElement) and !itema.element_set.include?(Theory_Greater_Icons::LegendaryElement)
self.contents.font.color = normal_color
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::Background)
end
end
# Get items in possession
case item
when RPG::Item
number = $game_party.item_number(item.id)
when RPG::Weapon
number = $game_party.weapon_number(item.id)
when RPG::Armor
number = $game_party.armor_number(item.id)
end
# If price is less than money in possession, and amount in possession is
# not 99, then set to normal text color. Otherwise set to disabled color
if item.price <= $game_party.gold and number < 99
else
self.contents.font.color = disabled_color
end
pricea = item.price
self.contents.draw_text(x + Theory_Greater_Icons::Width + 3, y, 212, Theory_Greater_Icons::Height, item.name, 0)
tempy = y + Theory_Greater_Icons::Height - 36
self.contents.font.color = normal_color
self.contents.draw_text(x - 5, tempy, 24, Theory_Greater_Icons::Height, number.to_s, 2)
self.contents.draw_text(x + 200, y, 16, Theory_Greater_Icons::Height, ":", 1)
self.contents.draw_text(x + 206, y, 60, Theory_Greater_Icons::Height, pricea.to_s, 2)
end
end
#==============================================================================
# ** Window_ShopSell
#
# This window displays items in possession for selling on the shop screen.
#==============================================================================
class Window_ShopSell < Window_Selectable
#
# * Object Initialization
#
def initialize
super(0, 128, 640, 352)
@oh = Theory_Greater_Icons::Height
@column_max = 2
refresh
self.index = 0
end
#
# * Refresh
#
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
for i in 1...$data_items.size
if $game_party.item_number(i) > 0
@data.push($data_items)
end
end
for i in 1...$data_weapons.size
if $game_party.weapon_number(i) > 0
@data.push($data_weapons)
end
end
for i in 1...$data_armors.size
if $game_party.armor_number(i) > 0
@data.push($data_armors)
end
end
# If item count is not 0, make a bitmap and draw all items
@item_max = @data.size
if @item_max > 0
self.contents = Bitmap.new(width - Theory_Greater_Icons::Width, row_max * Theory_Greater_Icons::Height)
for i in 0...@item_max
draw_item(i)
end
end
end
#
# * Draw Item
# index : item number
#
def draw_item(index)
item = @data[index]
x = 4 + index % 2 * (288 + 32)
y = index / 2 * Theory_Greater_Icons::Height
case item
when RPG::Weapon
number = $game_party.weapon_number(item.id)
when RPG::Armor
number = $game_party.armor_number(item.id)
end
@bitmap = RPG::Cache.icon(item.icon_name)
case item
when RPG::Item
number = $game_party.item_number(item.id)
when RPG::Weapon
number = $game_party.weapon_number(item.id)
when RPG::Armor
number = $game_party.armor_number(item.id)
end
case item
when RPG::Weapon
weapon = @data[index]
if weapon.element_set.include?(Theory_Greater_Icons::LegendaryElement)
self.contents.font.color = Theory_Greater_Icons::LegendaryColor
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::LegendaryBackground)
elsif weapon.element_set.include?(Theory_Greater_Icons::RareElement)
self.contents.font.color = Theory_Greater_Icons::RareColor
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::RareBackground)
elsif weapon.element_set.include?(Theory_Greater_Icons::UncommonElement)
self.contents.font.color = Theory_Greater_Icons::UncommonColor
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::UncommonBackground)
elsif !weapon.element_set.include?(Theory_Greater_Icons::RareElement) and !weapon.element_set.include?(Theory_Greater_Icons::UncommonElement) and !weapon.element_set.include?(Theory_Greater_Icons::LegendaryElement)
self.contents.font.color = normal_color
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::Background)
end
when RPG::Armor
armor = @data[index]
if armor.guard_element_set.include?(Theory_Greater_Icons::LegendaryElement)
self.contents.font.color = Theory_Greater_Icons::LegendaryColor
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::LegendaryBackground)
elsif armor.guard_element_set.include?(Theory_Greater_Icons::RareElement)
self.contents.font.color = Theory_Greater_Icons::RareColor
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::RareBackground)
elsif armor.guard_element_set.include?(Theory_Greater_Icons::UncommonElement)
self.contents.font.color = Theory_Greater_Icons::UncommonColor
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::UncommonBackground)
elsif !armor.guard_element_set.include?(Theory_Greater_Icons::RareElement) and !armor.guard_element_set.include?(Theory_Greater_Icons::UncommonElement) and !armor.guard_element_set.include?(Theory_Greater_Icons::LegendaryElement)
self.contents.font.color = normal_color
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::Background)
end
when RPG::Item
itema = $data_items[item.id]
if itema.element_set.include?(Theory_Greater_Icons::LegendaryElement)
self.contents.font.color = Theory_Greater_Icons::LegendaryColor
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::LegendaryBackground)
elsif itema.element_set.include?(Theory_Greater_Icons::RareElement)
self.contents.font.color = Theory_Greater_Icons::RareColor
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::RareBackground)
elsif itema.element_set.include?(Theory_Greater_Icons::UncommonElement)
self.contents.font.color = Theory_Greater_Icons::UncommonColor
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::UncommonBackground)
elsif !itema.element_set.include?(Theory_Greater_Icons::RareElement) and !itema.element_set.include?(Theory_Greater_Icons::UncommonElement) and !itema.element_set.include?(Theory_Greater_Icons::LegendaryElement)
self.contents.font.color = normal_color
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::Background)
end
end
if item.price <= 0
self.contents.font.color = disabled_color
end
pricea = item.price / 2
self.contents.draw_text(x + Theory_Greater_Icons::Width + 3, y, 212, Theory_Greater_Icons::Height, item.name, 0)
tempy = y + Theory_Greater_Icons::Height - 36
self.contents.font.color = normal_color
self.contents.draw_text(x - 5, tempy, 24, Theory_Greater_Icons::Height, number.to_s, 2)
self.contents.draw_text(x + 200, y, 16, Theory_Greater_Icons::Height, ":", 1)
self.contents.draw_text(x + 206, y, 60, Theory_Greater_Icons::Height, pricea.to_s, 2)
end
end
class Bitmap
def draw_icon(x, y, filename, back='')
backdrop = RPG::Cache.icon(back)
center_x = Theory_Greater_Icons::Width / 2 + x
center_y = Theory_Greater_Icons::Height / 2 + y
left_x = center_x - backdrop.rect.width / 2
upper_y = center_y - backdrop.rect.height / 2
self.blt(left_x, upper_y, backdrop, backdrop.rect, 255)
bitmap = filename
left_x = center_x - bitmap.rect.width / 2
upper_y = center_y - bitmap.rect.height / 2
self.blt(left_x, upper_y - 2, bitmap, bitmap.rect, 255)
end
end
class Window_Base
#
# * Draw Item Name
# item : item
# x : draw spot x-coordinate
# y : draw spot y-coordinate
#
def draw_item_name(item, x, y)
if item == nil
return
end
@bitmap = RPG::Cache.icon(item.icon_name)
case item
when RPG::Weapon
weapon = $data_weapons[item.id]
if weapon.element_set.include?(Theory_Greater_Icons::LegendaryElement)
self.contents.font.color = Theory_Greater_Icons::LegendaryColor
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::LegendaryBackground)
elsif weapon.element_set.include?(Theory_Greater_Icons::RareElement)
self.contents.font.color = Theory_Greater_Icons::RareColor
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::RareBackground)
elsif weapon.element_set.include?(Theory_Greater_Icons::UncommonElement)
self.contents.font.color = Theory_Greater_Icons::UncommonColor
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::UncommonBackground)
elsif !weapon.element_set.include?(Theory_Greater_Icons::RareElement) and !weapon.element_set.include?(Theory_Greater_Icons::UncommonElement) and !weapon.element_set.include?(Theory_Greater_Icons::LegendaryElement)
self.contents.font.color = normal_color
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::Background)
end
when RPG::Armor
armor = $data_armors[item.id]
if armor.guard_element_set.include?(Theory_Greater_Icons::LegendaryElement)
self.contents.font.color = Theory_Greater_Icons::LegendaryColor
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::LegendaryBackground)
elsif armor.guard_element_set.include?(Theory_Greater_Icons::RareElement)
self.contents.font.color = Theory_Greater_Icons::RareColor
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::RareBackground)
elsif armor.guard_element_set.include?(Theory_Greater_Icons::UncommonElement)
self.contents.font.color = Theory_Greater_Icons::UncommonColor
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::UncommonBackground)
elsif !armor.guard_element_set.include?(Theory_Greater_Icons::RareElement) and !armor.guard_element_set.include?(Theory_Greater_Icons::UncommonElement) and !armor.guard_element_set.include?(Theory_Greater_Icons::LegendaryElement)
self.contents.font.color = normal_color
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::Background)
end
when RPG::Item
itema = $data_items[item.id]
if itema.element_set.include?(Theory_Greater_Icons::LegendaryElement)
self.contents.font.color = Theory_Greater_Icons::LegendaryColor
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::LegendaryBackground)
elsif itema.element_set.include?(Theory_Greater_Icons::RareElement)
self.contents.font.color = Theory_Greater_Icons::RareColor
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::RareBackground)
elsif itema.element_set.include?(Theory_Greater_Icons::UncommonElement)
self.contents.font.color = Theory_Greater_Icons::UncommonColor
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::UncommonBackground)
elsif !itema.element_set.include?(Theory_Greater_Icons::RareElement) and !itema.element_set.include?(Theory_Greater_Icons::UncommonElement) and !itema.element_set.include?(Theory_Greater_Icons::LegendaryElement)
self.contents.font.color = normal_color
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::Background)
end
end
self.contents.draw_text(x + Theory_Greater_Icons::Width + 4, y, 212, Theory_Greater_Icons::Width, item.name)
end
end
Но с на русской версии мейкера пропадают шрифты.
Возможна ли его дороботка или что то подобное?
Пожалуйста Войти или Регистрация, чтобы присоединиться к беседе.
- Agckuu_Coceg
-
- Не в сети
- Живу я здесь
-
- Простой Гинтокист с огромной внутренней ленью.
- Сообщений: 1549
- Спасибо получено: 329
Заинтиресовал скрипт XP Greater Icons
Этот скрипт увеличивает размер иконок.
Вот он.
ВНИМАНИЕ: Спойлер!#==============================================================================
# ** Theory's Greater Icons
#
# This script allows you to set x and y sizes for your item and skill icons.
# Be sure to make the files in your icons folder reflect this- it does not
# stretch icons. This script was optimized for 50x50 icons, but any dimensions
# larger than 30x30 and smaller than 200x200 should work.
#
# It required a small menu edit for quantity and SP cost locations; and will
# not be compatible with most CMS's without editing.
#==============================================================================
module Theory_Greater_Icons
Width = 40
Height = 40
Background = 'back'
UncommonElement = 18
UncommonBackground = 'uncommon'
UncommonColor = Color.new(255, 255, 255, 255)
UncommonColorDisabled = Color.new(255, 255, 255, 128)
RareElement = 19
RareBackground = 'rare'
RareColor = Color.new(255, 255, 255, 255)
RareColorDisabled = Color.new(255, 255, 255, 128)
LegendaryElement = 20
LegendaryBackground = 'legendary'
LegendaryColor = Color.new(255, 255, 255, 255)
LegendaryColorDisabled = Color.new(255, 255, 255, 128)
end
#==============================================================================
# ** Window_Selectable
#==============================================================================
class Window_Selectable
#
# * Public Instance Variables
#
attr_writer :oh
#
# * Text Cursor Height
#
def oh
return @oh.nil? ? 32 : @oh
end
#
# * Get Top Row
#
def top_row
# Divide y-coordinate of window contents transfer origin by 1 row
# height of self.oh
return self.oy / self.oh
end
#
# * Set Top Row
# row : row shown on top
#
def top_row=(row)
# If row is less than 0, change it to 0
# If row exceeds row_max - 1, change it to row_max - 1
row = [[row, 0].max, row_max - 1].min
# Multiply 1 row height by 32 for y-coordinate of window contents
# transfer origin
self.oy = row * self.oh
end
#
# * Get Number of Rows Displayable on 1 Page
#
def page_row_max
# Subtract a frame height of 32 from the window height, and divide it by
# 1 row height of self.oh
return (self.height - 32) / self.oh
end
#
# * Update Cursor Rectangle
#
def update_cursor_rect
# If cursor position is less than 0
if @index < 0
self.cursor_rect.empty
return
end
# Get current row
row = @index / @column_max
# If current row is before top row
if row < self.top_row
# Scroll so that current row becomes top row
self.top_row = row
end
# If current row is more to back than back row
if row > self.top_row + (self.page_row_max - 1)
# Scroll so that current row becomes back row
self.top_row = row - (self.page_row_max - 1)
end
# Calculate cursor width
cursor_width = self.width / @column_max - 32
# Calculate cursor coordinates
x = @index % @column_max * (cursor_width + 32)
y = @index / @column_max * self.oh - self.oy
if self.active == true
# Update cursor rectangle
self.cursor_rect.set(x, y, cursor_width, self.oh)
end
end
end
#==============================================================================
# ** Window_Item
#
# This window displays items in possession on the item and battle screens.
#==============================================================================
class Window_Item < Window_Selectable
#
# * Object Initialization
#
def initialize
super(0, 64, 640, 416)
@column_max = 2
##set the parent selectable height
@oh = Theory_Greater_Icons::Height
refresh
self.index = 0
# If in battle, move window to center of screen
# and make it semi-transparent
if $game_temp.in_battle
self.y = 64
self.height = 256
self.back_opacity = 160
end
end
#
# * Get Item
#
def item
return @data[self.index]
end
#
# * Refresh
#
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
# Add item
for i in 1...$data_items.size
if $game_party.item_number(i) > 0
@data.push($data_items)
end
end
# Also add weapons and items if outside of battle
unless $game_temp.in_battle
for i in 1...$data_weapons.size
if $game_party.weapon_number(i) > 0
@data.push($data_weapons)
end
end
for i in 1...$data_armors.size
if $game_party.armor_number(i) > 0
@data.push($data_armors)
end
end
end
# If item count is not 0, make a bit map and draw all items
@item_max = @data.size
if @item_max > 0
self.contents = Bitmap.new(width - Theory_Greater_Icons::Width, row_max * Theory_Greater_Icons::Height)
for i in 0...@item_max
draw_item(i)
end
end
end
#
# * Draw Item
# index : item number
#
def draw_item(index)
item = @data[index]
case item
when RPG::Item
number = $game_party.item_number(item.id)
when RPG::Weapon
number = $game_party.weapon_number(item.id)
when RPG::Armor
number = $game_party.armor_number(item.id)
end
x = 4 + index % 2 * (288 + Theory_Greater_Icons::Width)
y = index / 2 * Theory_Greater_Icons::Height
rect = Rect.new(x, y, self.width / @column_max - Theory_Greater_Icons::Width, Theory_Greater_Icons::Height)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
@bitmap = RPG::Cache.icon(item.icon_name)
case item
when RPG::Weapon
weapon = $data_weapons[item.id]
if weapon.element_set.include?(Theory_Greater_Icons::LegendaryElement)
self.contents.font.color = Theory_Greater_Icons::LegendaryColorDisabled
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::LegendaryBackground)
elsif weapon.element_set.include?(Theory_Greater_Icons::RareElement)
self.contents.font.color = Theory_Greater_Icons::RareColorDisabled
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::RareBackground)
elsif weapon.element_set.include?(Theory_Greater_Icons::UncommonElement)
self.contents.font.color = Theory_Greater_Icons::UncommonColorDisabled
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::UncommonBackground)
elsif !weapon.element_set.include?(Theory_Greater_Icons::RareElement) and !weapon.element_set.include?(Theory_Greater_Icons::UncommonElement) and !weapon.element_set.include?(Theory_Greater_Icons::LegendaryElement)
self.contents.font.color = normal_color
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::Background)
end
when RPG::Armor
armor = $data_armors[item.id]
if armor.guard_element_set.include?(Theory_Greater_Icons::LegendaryElement)
self.contents.font.color = Theory_Greater_Icons::LegendaryColorDisabled
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::LegendaryBackground)
elsif armor.guard_element_set.include?(Theory_Greater_Icons::RareElement)
self.contents.font.color = Theory_Greater_Icons::RareColorDisabled
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::RareBackground)
elsif armor.guard_element_set.include?(Theory_Greater_Icons::UncommonElement)
self.contents.font.color = Theory_Greater_Icons::UncommonColorDisabled
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::UncommonBackground)
elsif !armor.guard_element_set.include?(Theory_Greater_Icons::RareElement) and !armor.guard_element_set.include?(Theory_Greater_Icons::UncommonElement) and !armor.guard_element_set.include?(Theory_Greater_Icons::LegendaryElement)
self.contents.font.color = disabled_color
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::Background)
end
when RPG::Item
itema = $data_items[item.id]
if itema.element_set.include?(Theory_Greater_Icons::LegendaryElement)
if $game_party.item_can_use?(item.id)
self.contents.font.color = Theory_Greater_Icons::LegendaryColor
else
self.contents.font.color = Theory_Greater_Icons::LegendaryColorDisabled
end
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::LegendaryBackground)
elsif itema.element_set.include?(Theory_Greater_Icons::RareElement)
if $game_party.item_can_use?(item.id)
self.contents.font.color = Theory_Greater_Icons::RareColor
else
self.contents.font.color = Theory_Greater_Icons::RareColorDisabled
end
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::RareBackground)
elsif itema.element_set.include?(Theory_Greater_Icons::UncommonElement)
if $game_party.item_can_use?(item.id)
self.contents.font.color = Theory_Greater_Icons::UncommonColor
else
self.contents.font.color = Theory_Greater_Icons::UncommonColorDisabled
end
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::UncommonBackground)
elsif !itema.element_set.include?(Theory_Greater_Icons::RareElement) and !itema.element_set.include?(Theory_Greater_Icons::UncommonElement) and !itema.element_set.include?(Theory_Greater_Icons::LegendaryElement)
if $game_party.item_can_use?(item.id)
self.contents.font.color = normal_color
else
self.contents.font.color = disabled_color
end
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::Background)
end
end
opacity = self.contents.font.color == normal_color ? 255 : 128
self.contents.draw_text(x + Theory_Greater_Icons::Width + 4, y, 212, Theory_Greater_Icons::Height, item.name, 0)
tempy = y + Theory_Greater_Icons::Height - 36
self.contents.draw_text(x - 5, tempy, 24, Theory_Greater_Icons::Height, number.to_s, 2)
end
end
#==============================================================================
# ** Window_Status
#
# This window displays full status specs on the status screen.
#==============================================================================
class Window_Status < Window_Base
#
# * Object Initialization
# actor : actor
#
def initialize(actor)
super(0, 0, 640, 480)
self.contents = Bitmap.new(width - 32, height - 32)
@actor = actor
refresh
end
#
# * 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)
self.contents.font.color = system_color
self.contents.draw_text(320, 48, 80, 32, "EXP")
self.contents.draw_text(320, 80, 80, 32, "NEXT")
self.contents.font.color = normal_color
self.contents.draw_text(320 + 80, 48, 84, 32, @actor.exp_s, 2)
self.contents.draw_text(320 + 80, 80, 84, 32, @actor.next_rest_exp_s, 2)
self.contents.font.color = system_color
self.contents.draw_text(320, 160, 96, 32, "equipment")
draw_item_name($data_weapons[@actor.weapon_id], 320 + 16, 203)
draw_item_name($data_armors[@actor.armor1_id], 320 + 16, 251)
draw_item_name($data_armors[@actor.armor2_id], 320 + 16, 299)
draw_item_name($data_armors[@actor.armor3_id], 320 + 16, 347)
draw_item_name($data_armors[@actor.armor4_id], 320 + 16, 395)
end
end
#==============================================================================
# ** Window_EquipItem
#
# This window displays choices when opting to change equipment on the
# equipment screen.
#==============================================================================
class Window_EquipItem < Window_Selectable
#
# * Object Initialization
# actor : actor
# equip_type : equip region (0-3)
#
def initialize(actor, equip_type)
super(0, 256, 640, 224)
@oh = Theory_Greater_Icons::Height
@actor = actor
@equip_type = equip_type
@column_max = 2
refresh
self.active = false
self.index = -1
end
#
# * Item Acquisition
#
def item
return @data[self.index]
end
#
# * Refresh
#
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
# Add equippable weapons
if @equip_type == 0
weapon_set = $data_classes[@actor.class_id].weapon_set
for i in 1...$data_weapons.size
if $game_party.weapon_number(i) > 0 and weapon_set.include?(i)
@data.push($data_weapons)
end
end
end
# Add equippable armor
if @equip_type != 0
armor_set = $data_classes[@actor.class_id].armor_set
for i in 1...$data_armors.size
if $game_party.armor_number(i) > 0 and armor_set.include?(i)
if $data_armors.kind == @equip_type-1
@data.push($data_armors)
end
end
end
end
# Add blank page
@data.push(nil)
# Make a bit map and draw all items
@item_max = @data.size
self.contents = Bitmap.new(width - Theory_Greater_Icons::Width, row_max * Theory_Greater_Icons::Height)
for i in 0...@item_max-1
draw_item(i)
end
end
#
# * Draw Item
# index : item number
#
def draw_item(index)
item = @data[index]
x = 4 + index % 2 * (288 + 32)
y = index / 2 * Theory_Greater_Icons::Height + 2
case item
when RPG::Weapon
number = $game_party.weapon_number(item.id)
when RPG::Armor
number = $game_party.armor_number(item.id)
end
@bitmap = RPG::Cache.icon(item.icon_name)
case item
when RPG::Weapon
weapon = @data[index]
if weapon.element_set.include?(Theory_Greater_Icons::LegendaryElement)
self.contents.font.color = Theory_Greater_Icons::LegendaryColor
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::LegendaryBackground)
elsif weapon.element_set.include?(Theory_Greater_Icons::RareElement)
self.contents.font.color = Theory_Greater_Icons::RareColor
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::RareBackground)
elsif weapon.element_set.include?(Theory_Greater_Icons::UncommonElement)
self.contents.font.color = Theory_Greater_Icons::UncommonColor
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::UncommonBackground)
elsif !weapon.element_set.include?(Theory_Greater_Icons::RareElement) and !weapon.element_set.include?(Theory_Greater_Icons::UncommonElement) and !weapon.element_set.include?(Theory_Greater_Icons::LegendaryElement)
self.contents.font.color = normal_color
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::Background)
end
when RPG::Armor
armor = @data[index]
if armor.guard_element_set.include?(Theory_Greater_Icons::LegendaryElement)
self.contents.font.color = Theory_Greater_Icons::LegendaryColor
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::LegendaryBackground)
elsif armor.guard_element_set.include?(Theory_Greater_Icons::RareElement)
self.contents.font.color = Theory_Greater_Icons::RareColor
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::RareBackground)
elsif armor.guard_element_set.include?(Theory_Greater_Icons::UncommonElement)
self.contents.font.color = Theory_Greater_Icons::UncommonColor
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::UncommonBackground)
elsif !armor.guard_element_set.include?(Theory_Greater_Icons::RareElement) and !armor.guard_element_set.include?(Theory_Greater_Icons::UncommonElement) and !armor.guard_element_set.include?(Theory_Greater_Icons::LegendaryElement)
self.contents.font.color = normal_color
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::Background)
end
end
self.contents.draw_text(x + Theory_Greater_Icons::Width + 3, y, 212, Theory_Greater_Icons::Height, item.name, 0)
tempy = y + Theory_Greater_Icons::Height - 36
self.contents.font.color = normal_color
self.contents.draw_text(x - 5, tempy, 24, Theory_Greater_Icons::Height, number.to_s, 2)
end
#
# * Help Text Update
#
def update_help
@help_window.set_text(self.item == nil ? "" : self.item.description)
end
end
#==============================================================================
# ** Window_EquipRight
#
# This window displays items the actor is currently equipped with on the
# equipment screen.
#==============================================================================
class Window_EquipRight < Window_Selectable
#
# * Object Initialization
# actor : actor
#
def initialize(actor)
super(272, 64, 368, 192)
@oh = Theory_Greater_Icons::Height
self.contents = Bitmap.new(width - Theory_Greater_Icons::Width, height + Theory_Greater_Icons::Height + 15)
@actor = actor
refresh
self.index = 0
end
#
# * Item Acquisition
#
def item
return @data[self.index]
end
#
# * Refresh
#
def refresh
self.contents.clear
@data = []
@data.push($data_weapons[@actor.weapon_id])
@data.push($data_armors[@actor.armor1_id])
@data.push($data_armors[@actor.armor2_id])
@data.push($data_armors[@actor.armor3_id])
@data.push($data_armors[@actor.armor4_id])
@item_max = @data.size
self.contents.font.color = system_color
self.contents.draw_text(4, Theory_Greater_Icons::Height * 0, 92, Theory_Greater_Icons::Height, $data_system.words.weapon)
self.contents.draw_text(4, Theory_Greater_Icons::Height * 1, 92, Theory_Greater_Icons::Height, $data_system.words.armor1)
self.contents.draw_text(4, Theory_Greater_Icons::Height * 2, 92, Theory_Greater_Icons::Height, $data_system.words.armor2)
self.contents.draw_text(4, Theory_Greater_Icons::Height * 3, 92, Theory_Greater_Icons::Height, $data_system.words.armor3)
self.contents.draw_text(5, Theory_Greater_Icons::Height * 4, 92, Theory_Greater_Icons::Height, $data_system.words.armor4)
draw_item_name(@data[0], 92, Theory_Greater_Icons::Height * 0)
draw_item_name(@data[1], 92, Theory_Greater_Icons::Height * 1)
draw_item_name(@data[2], 92, Theory_Greater_Icons::Height * 2)
draw_item_name(@data[3], 92, Theory_Greater_Icons::Height * 3)
draw_item_name(@data[4], 92, Theory_Greater_Icons::Height * 4)
end
#
# * Help Text Update
#
def update_help
@help_window.set_text(self.item == nil ? "" : self.item.description)
end
end
#==============================================================================
# ** Window_Skill
#
# This window displays usable skills on the skill and battle screens.
#==============================================================================
class Window_Skill < Window_Selectable
#
# * Object Initialization
# actor : actor
#
def initialize(actor)
super(0, 128, 640, 352)
@oh = Theory_Greater_Icons::Height
@actor = actor
@column_max = 2
refresh
self.index = 0
# If in battle, move window to center of screen
# and make it semi-transparent
if $game_temp.in_battle
self.y = 64
self.height = 256
self.back_opacity = 160
end
end
#
# * Acquiring Skill
#
def skill
return @data[self.index]
end
#
# * Refresh
#
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
for i in 0...@actor.skills.size
skill = $data_skills[@actor.skills]
if skill != nil
@data.push(skill)
end
end
# If item count is not 0, make a bit map and draw all items
@item_max = @data.size
if @item_max > 0
self.contents = Bitmap.new(width - Theory_Greater_Icons::Width, row_max * Theory_Greater_Icons::Height)
for i in 0...@item_max
draw_item(i)
end
end
end
#
# * Draw Item
# index : item number
#
def draw_item(index)
skill = @data[index]
x = 4 + index % 2 * (288 + Theory_Greater_Icons::Width)
y = index / 2 * Theory_Greater_Icons::Height
rect = Rect.new(x, y, self.width / @column_max - Theory_Greater_Icons::Width, Theory_Greater_Icons::Height)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
@bitmap = RPG::Cache.icon(skill.icon_name)
if skill.element_set.include?(Theory_Greater_Icons::LegendaryElement)
if @actor.skill_can_use?(skill.id)
self.contents.font.color = Theory_Greater_Icons::LegendaryColor
else
self.contents.font.color = Theory_Greater_Icons::LegendaryColorDisabled
end
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::LegendaryBackground)
elsif skill.element_set.include?(Theory_Greater_Icons::RareElement)
if @actor.skill_can_use?(skill.id)
self.contents.font.color = Theory_Greater_Icons::RareColor
else
self.contents.font.color = Theory_Greater_Icons::RareColorDisabled
end
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::RareBackground)
elsif skill.element_set.include?(Theory_Greater_Icons::UncommonElement)
if @actor.skill_can_use?(skill.id)
self.contents.font.color = Theory_Greater_Icons::UncommonColor
else
self.contents.font.color = Theory_Greater_Icons::UncommonColorDisabled
end
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::UncommonBackground)
elsif !skill.element_set.include?(Theory_Greater_Icons::RareElement) and !skill.element_set.include?(Theory_Greater_Icons::UncommonElement) and !skill.element_set.include?(Theory_Greater_Icons::LegendaryElement)
if @actor.skill_can_use?(skill.id)
self.contents.font.color = normal_color
else
self.contents.font.color = disabled_color
end
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::Background)
end
self.contents.draw_text(x + Theory_Greater_Icons::Width + 4, y - 10, 204, Theory_Greater_Icons::Height, skill.name, 0)
self.contents.draw_text(x + Theory_Greater_Icons::Width + 6, y + 10, 48, Theory_Greater_Icons::Height, skill.sp_cost.to_s, 2)
end
#
# * Help Text Update
#
def update_help
@help_window.set_text(self.skill == nil ? "" : self.skill.description)
end
end
#==============================================================================
# ** Window_BattleResult
#
# This window displays amount of gold and EXP acquired at the end of a battle.
#==============================================================================
class Window_BattleResult < Window_Base
#
# * Object Initialization
# exp : EXP
# gold : amount of gold
# treasures : treasures
#
def initialize(exp, gold, treasures)
@exp = exp
@gold = gold
@treasures = treasures
super(160, 0, 320, @treasures.size * Theory_Greater_Icons::Height + 64)
self.contents = Bitmap.new(width - 32, height - 32)
self.y = 160 - height / 2
self.back_opacity = 160
self.visible = false
refresh
end
#
# * Refresh
#
def refresh
self.contents.clear
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
self.contents.draw_text(x, 0, 128, 32, $data_system.words.gold)
y = 32
for item in @treasures
draw_item_name(item, 4, y)
y += Theory_Greater_Icons::Height
end
end
end
#==============================================================================
# ** Window_ShopBuy
#
# This window displays buyable goods on the shop screen.
#==============================================================================
class Window_ShopBuy < Window_Selectable
#
# * Object Initialization
# shop_goods : goods
#
def initialize(shop_goods)
super(0, 128, 368, 352)
@oh = Theory_Greater_Icons::Height
@shop_goods = shop_goods
refresh
self.index = 0
end
#
# * Refresh
#
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
for goods_item in @shop_goods
case goods_item[0]
when 0
item = $data_items[goods_item[1]]
when 1
item = $data_weapons[goods_item[1]]
when 2
item = $data_armors[goods_item[1]]
end
if item != nil
@data.push(item)
end
end
# If item count is not 0, make a bit map and draw all items
@item_max = @data.size
if @item_max > 0
self.contents = Bitmap.new(width - Theory_Greater_Icons::Width, row_max * Theory_Greater_Icons::Height)
for i in 0...@item_max
draw_item(i)
end
end
end
#
# * Draw Item
# index : item number
#
def draw_item(index)
item = @data[index]
x = 4
y = index * Theory_Greater_Icons::Height
case item
when RPG::Weapon
number = $game_party.weapon_number(item.id)
when RPG::Armor
number = $game_party.armor_number(item.id)
end
@bitmap = RPG::Cache.icon(item.icon_name)
case item
when RPG::Item
number = $game_party.item_number(item.id)
when RPG::Weapon
number = $game_party.weapon_number(item.id)
when RPG::Armor
number = $game_party.armor_number(item.id)
end
case item
when RPG::Weapon
weapon = @data[index]
if weapon.element_set.include?(Theory_Greater_Icons::LegendaryElement)
self.contents.font.color = Theory_Greater_Icons::LegendaryColor
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::LegendaryBackground)
elsif weapon.element_set.include?(Theory_Greater_Icons::RareElement)
self.contents.font.color = Theory_Greater_Icons::RareColor
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::RareBackground)
elsif weapon.element_set.include?(Theory_Greater_Icons::UncommonElement)
self.contents.font.color = Theory_Greater_Icons::UncommonColor
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::UncommonBackground)
elsif !weapon.element_set.include?(Theory_Greater_Icons::RareElement) and !weapon.element_set.include?(Theory_Greater_Icons::UncommonElement) and !weapon.element_set.include?(Theory_Greater_Icons::LegendaryElement)
self.contents.font.color = normal_color
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::Background)
end
when RPG::Armor
armor = @data[index]
if armor.guard_element_set.include?(Theory_Greater_Icons::LegendaryElement)
self.contents.font.color = Theory_Greater_Icons::LegendaryColor
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::LegendaryBackground)
elsif armor.guard_element_set.include?(Theory_Greater_Icons::RareElement)
self.contents.font.color = Theory_Greater_Icons::RareColor
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::RareBackground)
elsif armor.guard_element_set.include?(Theory_Greater_Icons::UncommonElement)
self.contents.font.color = Theory_Greater_Icons::UncommonColor
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::UncommonBackground)
elsif !armor.guard_element_set.include?(Theory_Greater_Icons::RareElement) and !armor.guard_element_set.include?(Theory_Greater_Icons::UncommonElement) and !armor.guard_element_set.include?(Theory_Greater_Icons::LegendaryElement)
self.contents.font.color = normal_color
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::Background)
end
when RPG::Item
itema = $data_items[item.id]
if itema.element_set.include?(Theory_Greater_Icons::LegendaryElement)
self.contents.font.color = Theory_Greater_Icons::LegendaryColor
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::LegendaryBackground)
elsif itema.element_set.include?(Theory_Greater_Icons::RareElement)
self.contents.font.color = Theory_Greater_Icons::RareColor
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::RareBackground)
elsif itema.element_set.include?(Theory_Greater_Icons::UncommonElement)
self.contents.font.color = Theory_Greater_Icons::UncommonColor
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::UncommonBackground)
elsif !itema.element_set.include?(Theory_Greater_Icons::RareElement) and !itema.element_set.include?(Theory_Greater_Icons::UncommonElement) and !itema.element_set.include?(Theory_Greater_Icons::LegendaryElement)
self.contents.font.color = normal_color
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::Background)
end
end
# Get items in possession
case item
when RPG::Item
number = $game_party.item_number(item.id)
when RPG::Weapon
number = $game_party.weapon_number(item.id)
when RPG::Armor
number = $game_party.armor_number(item.id)
end
# If price is less than money in possession, and amount in possession is
# not 99, then set to normal text color. Otherwise set to disabled color
if item.price <= $game_party.gold and number < 99
else
self.contents.font.color = disabled_color
end
pricea = item.price
self.contents.draw_text(x + Theory_Greater_Icons::Width + 3, y, 212, Theory_Greater_Icons::Height, item.name, 0)
tempy = y + Theory_Greater_Icons::Height - 36
self.contents.font.color = normal_color
self.contents.draw_text(x - 5, tempy, 24, Theory_Greater_Icons::Height, number.to_s, 2)
self.contents.draw_text(x + 200, y, 16, Theory_Greater_Icons::Height, ":", 1)
self.contents.draw_text(x + 206, y, 60, Theory_Greater_Icons::Height, pricea.to_s, 2)
end
end
#==============================================================================
# ** Window_ShopSell
#
# This window displays items in possession for selling on the shop screen.
#==============================================================================
class Window_ShopSell < Window_Selectable
#
# * Object Initialization
#
def initialize
super(0, 128, 640, 352)
@oh = Theory_Greater_Icons::Height
@column_max = 2
refresh
self.index = 0
end
#
# * Refresh
#
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
for i in 1...$data_items.size
if $game_party.item_number(i) > 0
@data.push($data_items)
end
end
for i in 1...$data_weapons.size
if $game_party.weapon_number(i) > 0
@data.push($data_weapons)
end
end
for i in 1...$data_armors.size
if $game_party.armor_number(i) > 0
@data.push($data_armors)
end
end
# If item count is not 0, make a bitmap and draw all items
@item_max = @data.size
if @item_max > 0
self.contents = Bitmap.new(width - Theory_Greater_Icons::Width, row_max * Theory_Greater_Icons::Height)
for i in 0...@item_max
draw_item(i)
end
end
end
#
# * Draw Item
# index : item number
#
def draw_item(index)
item = @data[index]
x = 4 + index % 2 * (288 + 32)
y = index / 2 * Theory_Greater_Icons::Height
case item
when RPG::Weapon
number = $game_party.weapon_number(item.id)
when RPG::Armor
number = $game_party.armor_number(item.id)
end
@bitmap = RPG::Cache.icon(item.icon_name)
case item
when RPG::Item
number = $game_party.item_number(item.id)
when RPG::Weapon
number = $game_party.weapon_number(item.id)
when RPG::Armor
number = $game_party.armor_number(item.id)
end
case item
when RPG::Weapon
weapon = @data[index]
if weapon.element_set.include?(Theory_Greater_Icons::LegendaryElement)
self.contents.font.color = Theory_Greater_Icons::LegendaryColor
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::LegendaryBackground)
elsif weapon.element_set.include?(Theory_Greater_Icons::RareElement)
self.contents.font.color = Theory_Greater_Icons::RareColor
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::RareBackground)
elsif weapon.element_set.include?(Theory_Greater_Icons::UncommonElement)
self.contents.font.color = Theory_Greater_Icons::UncommonColor
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::UncommonBackground)
elsif !weapon.element_set.include?(Theory_Greater_Icons::RareElement) and !weapon.element_set.include?(Theory_Greater_Icons::UncommonElement) and !weapon.element_set.include?(Theory_Greater_Icons::LegendaryElement)
self.contents.font.color = normal_color
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::Background)
end
when RPG::Armor
armor = @data[index]
if armor.guard_element_set.include?(Theory_Greater_Icons::LegendaryElement)
self.contents.font.color = Theory_Greater_Icons::LegendaryColor
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::LegendaryBackground)
elsif armor.guard_element_set.include?(Theory_Greater_Icons::RareElement)
self.contents.font.color = Theory_Greater_Icons::RareColor
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::RareBackground)
elsif armor.guard_element_set.include?(Theory_Greater_Icons::UncommonElement)
self.contents.font.color = Theory_Greater_Icons::UncommonColor
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::UncommonBackground)
elsif !armor.guard_element_set.include?(Theory_Greater_Icons::RareElement) and !armor.guard_element_set.include?(Theory_Greater_Icons::UncommonElement) and !armor.guard_element_set.include?(Theory_Greater_Icons::LegendaryElement)
self.contents.font.color = normal_color
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::Background)
end
when RPG::Item
itema = $data_items[item.id]
if itema.element_set.include?(Theory_Greater_Icons::LegendaryElement)
self.contents.font.color = Theory_Greater_Icons::LegendaryColor
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::LegendaryBackground)
elsif itema.element_set.include?(Theory_Greater_Icons::RareElement)
self.contents.font.color = Theory_Greater_Icons::RareColor
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::RareBackground)
elsif itema.element_set.include?(Theory_Greater_Icons::UncommonElement)
self.contents.font.color = Theory_Greater_Icons::UncommonColor
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::UncommonBackground)
elsif !itema.element_set.include?(Theory_Greater_Icons::RareElement) and !itema.element_set.include?(Theory_Greater_Icons::UncommonElement) and !itema.element_set.include?(Theory_Greater_Icons::LegendaryElement)
self.contents.font.color = normal_color
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::Background)
end
end
if item.price <= 0
self.contents.font.color = disabled_color
end
pricea = item.price / 2
self.contents.draw_text(x + Theory_Greater_Icons::Width + 3, y, 212, Theory_Greater_Icons::Height, item.name, 0)
tempy = y + Theory_Greater_Icons::Height - 36
self.contents.font.color = normal_color
self.contents.draw_text(x - 5, tempy, 24, Theory_Greater_Icons::Height, number.to_s, 2)
self.contents.draw_text(x + 200, y, 16, Theory_Greater_Icons::Height, ":", 1)
self.contents.draw_text(x + 206, y, 60, Theory_Greater_Icons::Height, pricea.to_s, 2)
end
end
class Bitmap
def draw_icon(x, y, filename, back='')
backdrop = RPG::Cache.icon(back)
center_x = Theory_Greater_Icons::Width / 2 + x
center_y = Theory_Greater_Icons::Height / 2 + y
left_x = center_x - backdrop.rect.width / 2
upper_y = center_y - backdrop.rect.height / 2
self.blt(left_x, upper_y, backdrop, backdrop.rect, 255)
bitmap = filename
left_x = center_x - bitmap.rect.width / 2
upper_y = center_y - bitmap.rect.height / 2
self.blt(left_x, upper_y - 2, bitmap, bitmap.rect, 255)
end
end
class Window_Base
#
# * Draw Item Name
# item : item
# x : draw spot x-coordinate
# y : draw spot y-coordinate
#
def draw_item_name(item, x, y)
if item == nil
return
end
@bitmap = RPG::Cache.icon(item.icon_name)
case item
when RPG::Weapon
weapon = $data_weapons[item.id]
if weapon.element_set.include?(Theory_Greater_Icons::LegendaryElement)
self.contents.font.color = Theory_Greater_Icons::LegendaryColor
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::LegendaryBackground)
elsif weapon.element_set.include?(Theory_Greater_Icons::RareElement)
self.contents.font.color = Theory_Greater_Icons::RareColor
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::RareBackground)
elsif weapon.element_set.include?(Theory_Greater_Icons::UncommonElement)
self.contents.font.color = Theory_Greater_Icons::UncommonColor
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::UncommonBackground)
elsif !weapon.element_set.include?(Theory_Greater_Icons::RareElement) and !weapon.element_set.include?(Theory_Greater_Icons::UncommonElement) and !weapon.element_set.include?(Theory_Greater_Icons::LegendaryElement)
self.contents.font.color = normal_color
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::Background)
end
when RPG::Armor
armor = $data_armors[item.id]
if armor.guard_element_set.include?(Theory_Greater_Icons::LegendaryElement)
self.contents.font.color = Theory_Greater_Icons::LegendaryColor
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::LegendaryBackground)
elsif armor.guard_element_set.include?(Theory_Greater_Icons::RareElement)
self.contents.font.color = Theory_Greater_Icons::RareColor
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::RareBackground)
elsif armor.guard_element_set.include?(Theory_Greater_Icons::UncommonElement)
self.contents.font.color = Theory_Greater_Icons::UncommonColor
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::UncommonBackground)
elsif !armor.guard_element_set.include?(Theory_Greater_Icons::RareElement) and !armor.guard_element_set.include?(Theory_Greater_Icons::UncommonElement) and !armor.guard_element_set.include?(Theory_Greater_Icons::LegendaryElement)
self.contents.font.color = normal_color
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::Background)
end
when RPG::Item
itema = $data_items[item.id]
if itema.element_set.include?(Theory_Greater_Icons::LegendaryElement)
self.contents.font.color = Theory_Greater_Icons::LegendaryColor
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::LegendaryBackground)
elsif itema.element_set.include?(Theory_Greater_Icons::RareElement)
self.contents.font.color = Theory_Greater_Icons::RareColor
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::RareBackground)
elsif itema.element_set.include?(Theory_Greater_Icons::UncommonElement)
self.contents.font.color = Theory_Greater_Icons::UncommonColor
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::UncommonBackground)
elsif !itema.element_set.include?(Theory_Greater_Icons::RareElement) and !itema.element_set.include?(Theory_Greater_Icons::UncommonElement) and !itema.element_set.include?(Theory_Greater_Icons::LegendaryElement)
self.contents.font.color = normal_color
self.contents.draw_icon(x, y, @bitmap, Theory_Greater_Icons::Background)
end
end
self.contents.draw_text(x + Theory_Greater_Icons::Width + 4, y, 212, Theory_Greater_Icons::Width, item.name)
end
end
Но с на русской версии мейкера пропадают шрифты.
Возможна ли его дороботка или что то подобное?
Theory's Greater Icons? Я им пользуюсь, и он у меня стабильно работает, без всяких вылетов. Тут дело в патче. Попробуй перенести проект на непатченную версию.
Пожалуйста Войти или Регистрация, чтобы присоединиться к беседе.
Пожалуйста Войти или Регистрация, чтобы присоединиться к беседе.
- Алексей Владимирович
-
- Не в сети
- Бывалый
-
- Сообщений: 72
- Спасибо получено: 0
Нарыл удобный скрипт Module Craft by Prexus - Version 2.0
Вот он.
# Module Craft by Prexus
# - Version 2.0 (12.31.06)
#
# This is the primary module of the PrexCraft script. Be sure to read the
# instructions to learn how to create new recipes. Do not change any of the
# constants in the DO NOT TOUCH section.
#===============================================================================
module Craft
#=============================================================================
# CONSTANTS :: DO NOT TOUCH
#=============================================================================
ITEM = 0; ARMOR = 1; WEAPON = 2
NOT_CONSUMED = false; CONSUMED = true;
#=============================================================================
# CONSTANTS :: PLEASE TOUCH THESE.. BABY!
#=============================================================================
USE_LEVELS = true # Use Levels for skills.
SHOW_COLORS = true # Use colorcoding (only for Levels)
SHOW_LEVELS = true # Show recipe level display
SHOW_LEVEL_UP = true # Show level up window
SHOW_LIST_ICONS = true # Show icons in recipe list
SHOW_RESULT_ICON = true # Show icons in result window
SHOW_COMPONENT_ICONS = true # Show icons in component window
#=============================================================================
# TRADE :: OFFSET LEVEL RANGE (edit with caution) (For use with levels only)
#=============================================================================
TRADE_LEVEL_OFFSET = 10
#=============================================================================
# COLORS :: EDIT WITH CAUTION (For use with Levels only)
#=============================================================================
TRIVIAL = Color.new( 64, 64, 64, 255)
LOW = Color.new( 0, 255, 0, 255)
MID = Color.new(255, 255, 0, 255)
HIGH = Color.new(255, 128, 0, 255)
IMPOSSIBLE = Color.new(255, 0, 0, 255)
#=============================================================================
# RECIPES :: Follow Instructions
#
# FORMAT :
# {'NAME' => 'RECIPE NAME AS STRING',
# 'TYPE' => 'RECIPE TYPE AS STRING',
# 'LEVEL' => LEVEL_AS_INTEGER, << Not Necessary with USE_LEVELS set to False
# 'RESULT' => [TYPE, ID, VALUE],
# 'COMPONENTS' => [
# [TYPE, ID, VALUE, CONSUMED?],
# [TYPE, ID, VALUE, CONSUMED?],
# ...
# ]
# }
#
# To setup a recipe, follow the example below:
#
# {'NAME' => 'Cold Iron Sword',
# 'TYPE' => 'Blacksmith',
# 'LEVEL' => 10,
# 'RESULT' => [WEAPON, 1, 1],
# 'COMPONENTS' => [
# [ITEM, 1, 1, CONSUMED],
# [ITEM, 2, 1, CONSUMED],
# [WEAPON, 3, 1, NOT_CONSUMED]
# ]
# } # End Recipe [WEAPON, 1, 1]
#=============================================================================
RECIPES = [
{'NAME' => 'Cold Sword',
'TYPE' => 'Blacksmith',
'LEVEL' => 1,
'RESULT' => [WEAPON, 33, 1],
'COMPONENTS' => [
[ITEM, 33, 1, CONSUMED],
[WEAPON, 1, 1, CONSUMED]
]
},
{'NAME' => 'Tempered Sword',
'TYPE' => 'Blacksmith',
'LEVEL' => 20,
'RESULT' => [WEAPON, 34, 1],
'COMPONENTS' => [
[ITEM, 38, 1, NOT_CONSUMED],
[WEAPON, 1, 1, CONSUMED]
]
},
{'NAME' => 'Apple Pie',
'TYPE' => 'Cook',
'LEVEL' => 1,
'RESULT' => [ITEM, 36, 1],
'COMPONENTS' => [
[ITEM, 34, 1, NOT_CONSUMED],
[ITEM, 35, 3, CONSUMED]
]
}
]
#=============================================================================
# Craft Methods
#
# valid_recipe? : name
# Checks if the recipe name given exists in the recipe data store.
#=============================================================================
def self.valid_recipe?(name)
for recipe in RECIPES
return true if name == recipe
end
return false
end
#=============================================================================
# Craft Methods
#
# can_make? : name
# Checks if the recipe is possible to make. First finds if the recipe given is
# valid, then checks if there are enough components in your inventory.
#=============================================================================
def self.can_make?(name)
return false unless self.valid_recipe?(name)
for r in RECIPES
next unless name == r
recipe = r
end
return false unless recipe
for component in recipe
case component[0]
when 0 # ITEM
return false unless $game_party.item_number(component[1]) >= component[2]
when 1 # ARMOR
return false unless $game_party.armor_number(component[1]) >= component[2]
when 2 # WEAPON
return false unless $game_party.weapon_number(component[1]) >= component[2]
end
end
return true
end
#=============================================================================
# Craft Methods
#
# get_recipe : name
# Returns the hash object containing the data information for the recipe if
# the recipe is valid. Else returns nil.
#=============================================================================
def self.get_recipe(name)
return nil unless self.valid_recipe?(name)
for recipe in RECIPES
return recipe if recipe == name
end
return nil
end
#=============================================================================
# Craft Methods for LEVELS
#
# color_chart : diff
# Returns the color suited for the recipe based on the difference between the
# recipe level and your party's skill level
#=============================================================================
def self.color_chart(diff)
if diff < 0
return IMPOSSIBLE
elsif (0...TRADE_LEVEL_OFFSET).to_a.include?(diff)
return HIGH
elsif (TRADE_LEVEL_OFFSET...TRADE_LEVEL_OFFSET * 2).to_a.include?(diff)
return MID
elsif (TRADE_LEVEL_OFFSET * 2...TRADE_LEVEL_OFFSET * 3).to_a.include?(diff)
return LOW
else
return TRIVIAL
end
end
#=============================================================================
# Craft Methods for LEVELS
#
# level_skill : skill, diff
# Raises the level of the skill based on the difference between the recipe
# level and the party's skill level.
#=============================================================================
def self.level_skill(skill, diff)
if (0...TRADE_LEVEL_OFFSET).to_a.include?(diff)
if rand(10) >= 1
$game_party.trade_level_up(skill, 1)
return true
else
return false
end
elsif (TRADE_LEVEL_OFFSET...TRADE_LEVEL_OFFSET * 2).to_a.include?(diff)
if rand(10) >= 3
$game_party.trade_level_up(skill, 1)
return true
else
return false
end
elsif (TRADE_LEVEL_OFFSET * 2...TRADE_LEVEL_OFFSET * 3).to_a.include?(diff)
if rand(10) >= 6
$game_party.trade_level_up(skill, 1)
return true
else
return false
end
else
return false
end
end
end
#===============================================================================
# Scene Craft
#
# This is the main interface for the crafting system. You can run it by using
# the callscript command '$scene = Scene_Craft.new' or by adding it to your own
# code in the same manner.
#===============================================================================
class Scene_Craft
def initialize(type = nil)
@type = type
end
def main
@recipe_list = Window_RecipeList.new(@type)
@result_info = Window_ResultInfo.new(@recipe_list.data)
@result_comp = Window_ResultComponents.new(@recipe_list.data)
Graphics.transition
loop do
Graphics.update
Input.update
update
break if $scene != self
end
Graphics.freeze
@recipe_list.dispose
@result_info.dispose
@result_comp.dispose
@level_window.dispose if @level_window
end
#
def update
@recipe_list.update
@result_info.update(@recipe_list.data)
@result_comp.update(@recipe_list.data)
if @level_window
@level_window.update
@level_window.opacity -= 2
@level_window.contents_opacity -= 2
if @level_window.opacity == 0
@level_window.dispose
@level_window = nil
end
end
if Input.trigger?(Input::
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Map.new
return
end
if Input.trigger?(Input::C)
if craft(@recipe_list.data)
$game_system.se_play($data_system.decision_se)
else
$game_system.se_play($data_system.buzzer_se)
end
@recipe_list.refresh
@result_info.refresh
@result_comp.refresh
return
end
end
#
def craft(recipe)
return false unless Craft.can_make?(recipe)
recipe = Craft.get_recipe(@recipe_list.data)
if Craft::USE_LEVELS
skill = (recipe ? recipe : nil)
level = (recipe ? recipe : 1)
if skill
return unless $game_party.trade_check?(skill, level)
diff = ($game_party.trade_skills[skill] - level).abs
old_level = $game_party.trade_skills[skill]
if Craft.level_skill(skill, diff)
if Craft::SHOW_LEVEL_UP
if @level_window
@level_window.dispose
@level_window = nil
end
@level_window = Window_Base.new(0, 0, 256, 64)
@level_window.contents = Bitmap.new(224, 32)
@level_window.x = 320 - @level_window.width / 2
@level_window.y = 240 - @level_window.height / 2
@level_window.z = 9998
@level_window.contents.draw_text(4, 0, 224, 32,
"#{skill} +#{($game_party.trade_skills[skill] - old_level).abs}", 1)
end
end
end
end
for component in recipe
case component[0]
when 0 # Item
$game_party.lose_item(component[1], component[2]) if component[3]
when 1 # Armor
$game_party.lose_armor(component[1], component[2]) if component[3]
when 2 # Weapon
$game_party.lose_weapon(component[1], component[2]) if component[3]
end
end
case recipe[0]
when 0 # Item
$game_party.gain_item(recipe[1], recipe[2])
when 1 # Armor
$game_party.gain_armor(recipe[1], recipe[2])
when 2 # Weapon
$game_party.gain_weapon(recipe[1], recipe[2])
end
return true
end
end
#===============================================================================
# Window RecipeList
#
# This is a standard command window which shows all the recipes known by the
# party. They will appear in White if you have the proper reagents to combine
# or grey otherwise.
#===============================================================================
class Window_RecipeList < Window_Selectable
def initialize(type)
super(0, 0, 224, 480)
self.contents = Bitmap.new(width - 32, height - 32)
@data = []
@type = type
refresh
end
#
def data
return @data[self.index]
end
#
def refresh
self.contents.clear
@data = []
for recipe in $game_party.recipes
if @type
next unless Craft.get_recipe(recipe) == @type
end
@data.push(recipe) if Craft.valid_recipe?(recipe)
end
@item_max = @data.size
self.index = [[self.index, 0].max, @item_max].min
for i in 0..@data.size
data = @data
next unless data
x = (Craft::SHOW_LIST_ICONS ? 32 : 4)
recipe = Craft.get_recipe(data)
if Craft::SHOW_LIST_ICONS
case recipe[0]
when 0 # ITEM
bitmap = RPG::Cache.icon($data_items[recipe[1]].icon_name)
self.contents.blt(4, i * 32 + 4, bitmap, Rect.new(0, 0, 24, 24))
when 1 # ARMOR
bitmap = RPG::Cache.icon($data_armors[recipe[1]].icon_name)
self.contents.blt(4, i * 32 + 4, bitmap, Rect.new(0, 0, 24, 24))
when 2 # WEAPON
bitmap = RPG::Cache.icon($data_weapons[recipe[1]].icon_name)
self.contents.blt(4, i * 32 + 4, bitmap, Rect.new(0, 0, 24, 24))
end
end
if Craft::USE_LEVELS
level = (recipe ? recipe : 1)
diff = $game_party.trade_skills[recipe] - level
if Craft::SHOW_COLORS
self.contents.font.color = Craft.color_chart(diff)
else
self.contents.font.color = (Craft.can_make?(data) ? normal_color : disabled_color)
end
if Craft::SHOW_LEVELS
self.contents.draw_text(x, i * 32, self.contents.width - x, 32,
"(#{recipe}) #{data}")
else
self.contents.draw_text(x, i * 32, self.contents.width - x, 32, data.to_s)
end
else
self.contents.font.color = (Craft.can_make?(data) ? normal_color : disabled_color)
self.contents.draw_text(x, i * 32, self.contents.width - x, 32, data.to_s)
end
end
end
end
#===============================================================================
# Window ResultInfo
#
# This window displays all the information regarding the resulting item.
#===============================================================================
class Window_ResultInfo < Window_Base
def initialize(recipe)
super(224, 0, 640-224, 272)
self.contents = Bitmap.new(width - 32, height - 32)
@recipe = recipe
refresh
end
#
def refresh
self.contents.clear
recipe = Craft.get_recipe(@recipe)
return unless recipe
case recipe[0]
when 0 # ITEM
item = $data_items[recipe[1]]
return unless item
if Craft::SHOW_RESULT_ICON
bitmap = RPG::Cache.icon(item.icon_name)
self.contents.blt(4, 4, bitmap, Rect.new(0, 0, 24, 24))
self.contents.draw_text(32, 0, self.contents.width - 36, 32, item.name.to_s)
else
self.contents.draw_text(4, 0, self.contents.width - 8, 32, item.name.to_s)
end
self.contents.draw_text(4, 0, self.contents.width - 8, 32, "#{item.price} #{$data_system.words.gold}", 2)
if item.recover_hp_rate != 0
self.contents.draw_text(4, 48, self.contents.width - 8, 32, "HP: #{item.recover_hp_rate}%")
elsif item.recover_hp != 0
self.contents.draw_text(4, 48, self.contents.width - 8, 32, "HP: #{item.recover_hp}")
end
if item.recover_sp_rate != 0
self.contents.draw_text(4, 48, self.contents.width - 8, 32, "SP: #{item.recover_sp_rate}%", 1)
elsif item.recover_sp != 0
self.contents.draw_text(4, 48, self.contents.width - 8, 32, "SP: #{item.recover_sp}", 1)
end
self.contents.draw_text(4, 80, self.contents.width - 8, 32, "Hit%: #{item.hit}")
self.contents.draw_text(4, 80, self.contents.width - 8, 32, "Variance: #{item.variance}", 2)
case item.parameter_type
when 1
self.contents.draw_text(4, 48, self.contents.width - 8, 32, "Max HP: +#{item.parameter_points}", 2)
when 2
self.contents.draw_text(4, 48, self.contents.width - 8, 32, "Max SP: +#{item.parameter_points}", 2)
when 3
self.contents.draw_text(4, 48, self.contents.width - 8, 32, "STR: +#{item.parameter_points}", 2)
when 4
self.contents.draw_text(4, 48, self.contents.width - 8, 32, "DEX: +#{item.parameter_points}", 2)
when 5
self.contents.draw_text(4, 48, self.contents.width - 8, 32, "AGI: +#{item.parameter_points}", 2)
when 6
self.contents.draw_text(4, 48, self.contents.width - 8, 32, "INT: +#{item.parameter_points}", 2)
end
state_text = 'State + '
for state in item.plus_state_set
state_text += ', ' unless state == item.plus_state_set.first
state_text += $data_states[state].name
end
self.contents.draw_text(4, 112, self.contents.width - 8, 32, "#{state_text}")
state_text = 'State - '
for state in item.minus_state_set
state_text += ', ' unless state == item.minus_state_set.first
state_text += $data_states[state].name
end
self.contents.draw_text(4, 144, self.contents.width - 8, 32, "#{state_text}")
when 1 # ARMOR
item = $data_armors[recipe[1]]
return unless item
if Craft::SHOW_RESULT_ICON
bitmap = RPG::Cache.icon(item.icon_name)
self.contents.blt(4, 4, bitmap, Rect.new(0, 0, 24, 24))
self.contents.draw_text(32, 0, self.contents.width - 36, 32, item.name.to_s)
else
self.contents.draw_text(4, 0, self.contents.width - 8, 32, item.name.to_s)
end
self.contents.draw_text(4, 0, self.contents.width - 8, 32, "#{item.price} #{$data_system.words.gold}", 2)
case item.kind
when 0 # Shield
self.contents.draw_text(4, 48, self.contents.width - 8, 32, 'Shield')
when 1 # Helmet
self.contents.draw_text(4, 48, self.contents.width - 8, 32, 'Helmet')
when 2 # Body Armor
self.contents.draw_text(4, 48, self.contents.width - 8, 32, 'Body Armor')
when 3 # Accessory
self.contents.draw_text(4, 48, self.contents.width - 8, 32, 'Accessory')
end
self.contents.draw_text(4, 48, self.contents.width - 8, 32, "EVA: #{item.eva}", 2)
self.contents.draw_text(4, 80, self.contents.width - 8, 32, "PDEF: #{item.pdef}")
self.contents.draw_text(4, 80, self.contents.width - 8, 32, "STR: #{item.str_plus}", 1)
self.contents.draw_text(4, 80, self.contents.width - 8, 32, "DEX: #{item.dex_plus}", 2)
self.contents.draw_text(4, 112, self.contents.width - 8, 32, "MDEF: #{item.mdef}")
self.contents.draw_text(4, 112, self.contents.width - 8, 32, "AGI: #{item.agi_plus}", 1)
self.contents.draw_text(4, 112, self.contents.width - 8, 32, "INT: #{item.int_plus}", 2)
state_text = 'State Guard: '
for state in item.guard_state_set
state_text += ', ' unless state == item.guard_state_set.first
state_text += $data_states[state].name
end
self.contents.draw_text(4, 144, self.contents.width - 8, 32, "#{state_text}")
state_text = 'Element Guard: '
for state in item.guard_element_set
state_text += ', ' unless state == item.guard_element_set.first
state_text += $data_system.elements[state]
end
self.contents.draw_text(4, 176, self.contents.width - 8, 32, "#{state_text}")
if item.auto_state_id != 0
self.contents.draw_text(4, 208, self.contents.width - 8, 32, "Auto State: #{$data_states[item.auto_state_id].name}")
end
when 2 # WEAPON
item = $data_weapons[recipe[1]]
return unless item
if Craft::SHOW_RESULT_ICON
bitmap = RPG::Cache.icon(item.icon_name)
self.contents.blt(4, 4, bitmap, Rect.new(0, 0, 24, 24))
self.contents.draw_text(32, 0, self.contents.width - 36, 32, item.name.to_s)
else
self.contents.draw_text(4, 0, self.contents.width - 8, 32, item.name.to_s)
end
self.contents.draw_text(4, 0, self.contents.width - 8, 32, "#{item.price} #{$data_system.words.gold}", 2)
self.contents.draw_text(4, 48, self.contents.width - 8, 32, "ATK: #{item.atk}")
self.contents.draw_text(4, 48, self.contents.width - 8, 32, "PDEF: #{item.pdef}", 1)
self.contents.draw_text(4, 48, self.contents.width - 8, 32, "MDEF: #{item.mdef}", 2)
self.contents.draw_text(4, 80, self.contents.width - 8, 32, "STR: #{item.str_plus}")
self.contents.draw_text(4, 80, self.contents.width - 8, 32, "DEX: #{item.dex_plus}", 2)
self.contents.draw_text(4, 112, self.contents.width - 8, 32, "AGI: #{item.agi_plus}")
self.contents.draw_text(4, 112, self.contents.width - 8, 32, "INT: #{item.int_plus}", 2)
state_text = 'State + '
for state in item.plus_state_set
state_text += ', ' unless state == item.plus_state_set.first
state_text += $data_states[state].name
end
self.contents.draw_text(4, 144, self.contents.width - 8, 32, "#{state_text}")
state_text = 'State - '
for state in item.minus_state_set
state_text += ', ' unless state == item.minus_state_set.first
state_text += $data_states[state].name
end
self.contents.draw_text(4, 176, self.contents.width - 8, 32, "#{state_text}")
state_text = 'Element: '
for state in item.element_set
state_text += ', ' unless state == item.element_set.first
state_text += $data_system.elements[state]
end
self.contents.draw_text(4, 208, self.contents.width - 8, 32, "#{state_text}")
end
end
#
def update(recipe)
super()
return unless recipe != @recipe
@recipe = recipe
refresh
end
end
#===============================================================================
# Window ResultComponents
#
# This window displays all the components required for the combination, as well
# as the amount you have and the amount required of each. If an item has a *
# after the name, it will not be consumed in the combination.
#===============================================================================
class Window_ResultComponents < Window_Base
def initialize(recipe)
super(224, 272, 640-224, 208)
self.contents = Bitmap.new(width - 32, height - 32)
@recipe = recipe
refresh
end
#
def refresh
self.contents.clear
recipe = Craft.get_recipe(@recipe)
return unless recipe
i = 0
for component in recipe
case component[0]
when 0 # ITEM
item = $data_items[component[1]]
number = $game_party.item_number(component[1])
when 1 # ARMOR
item = $data_armors[component[1]]
number = $game_party.armor_number(component[1])
when 2 # WEAPON
item = $data_weapons[component[1]]
number = $game_party.weapon_number(component[1])
end
next unless item
text = "#{item.name}"
text += ' (*)' unless component[3]
x = (Craft::SHOW_COMPONENT_ICONS ? 32 : 4)
if Craft::SHOW_COMPONENT_ICONS
bitmap = RPG::Cache.icon(item.icon_name)
self.contents.blt(4, i * 32 + 4, bitmap, Rect.new(0, 0, 24, 24))
end
self.contents.draw_text(x, i * 32, self.contents.width - x - 4, 32, "#{text}")
self.contents.draw_text(x, i * 32, self.contents.width - x - 4, 32, "#{number}/#{component[2]}", 2)
i += 1
end
end
#
def update(recipe)
super()
return unless recipe != @recipe
@recipe = recipe
refresh
end
end
#===============================================================================
# Game_Party
#
# This is a small edit of the original Game_Party class to add recognition for
# recipes. It also adds the methods below:
# add_recipe() : name
# - this will teach the party the recipe, if it's valid. name is the name
# of the recipe.
# remove_recipe() : name
# - this will force the party to forget the recipe, if it's known. name is
# the name of the recipe.
# have_recipe() : name
# - this will return true or false, depending on if the party knows the
# recipe. Primary used in the can_make? method of the Craft module.
# -- FOR LEVELS --
# learn_trade() : name
# - this will set the level of the 'trade skill' to 1, enabling it for use
# with recipes.
# forget_trade() : name
# - this will reset the level of the 'trade skill' to 0.
# trade_check() : name, level
# - this will return true or false, depending on if the arguement 'level' is
# less than or equal to the 'trade skill'.
# trade_level_up() : name, value = 1
# - this will add the value to the existing trade level. Used primary by
# the Craft module.
#===============================================================================
class Game_Party
attr_reader :recipes
attr_reader :trade_skills
#
alias prexcraft_g_party_initialize initialize
#
def initialize
prexcraft_g_party_initialize
@recipes = []
@trade_skills = Hash.new(0)
end
#
def add_recipe(name)
@recipes.push(name) if Craft.valid_recipe?(name) and !have_recipe(name)
end
#
def remove_recipe(name)
@recipes.delete(name)
end
#
def have_recipe(name)
return @recipes.include?(name)
end
#
def learn_trade(name)
@trade_skills[name] = 1
end
#
def forget_trade(name)
@trade_skills[name] = 0
end
#
def trade_check?(name, level)
return (@trade_skills[name] >= level)
end
#
def trade_level_up(name, value = 1)
@trade_skills[name] += value
end
end
Вроде сделал всё правильно но после вызова скрипта-команды $scene = Scene_Craft.new мейкер кричит ошибку и вылетает.Захожу в редактор скриптов а он стоит на строчке
for recipe in $game_party.recipes
Взял с; rmxp.pl/index.php?topic=1718.0
Что делать?
Пожалуйста Войти или Регистрация, чтобы присоединиться к беседе.
