Rpg²S Forum uses cookies. Read the Privacy Policy for more info. To remove this message, please click the button to the right:    I accept the use of cookies

Vai al contenuto

Rpg²S Forum uses cookies. Read the Privacy Policy for more info. To remove this message, please click the button to the right:    I accept the use of cookies

Screen Contest #90

Kamikun






  • Si prega di effettuare il log in prima di rispondere
filtro oggetti non va...

    Lypsak
  • Nuovo Arrivato

  • Utenti
  • Rens: 0
  • 0
  • Stelletta
  • 31 messaggi
  • Sesso:Femmina
  • Provenienza:Arezzo
  • Abilità:Iniziato

#1 Inviato 30 November 2011 - 09:13 AM

Ciao a tutti, ho provato a usare lo script postato da Eikichi qui ma non riesco a capire come mai non funziona correttamente...
Quando vado a provare il gioco e ad aprire il menù oggetti, questo si apre e con le frecce si riesce a spostarsi senza problemi tra una sezione e l'altra (Tutti, Armi, etc). Solo che gli oggetti non vengono suddivisi per tipo, son sempre tutti lì! (e notate che ho anche inserito *KEY nelle note degli oggetti chiave, ho fatto tutti i miei compitini :sisi: )
La cosa peggiore però è che non riesco nemmeno a selezionarli, né usando le frecce, né C, né Shift né nient'altro.
E' capitato anche ad altri?
Come si risolve la cosa? Cosa sto sbagliando?

EDIT: Incredibile. Ho risolto. Non so assolutamente perché, ma ora, dopo due giorni, funziona.
Scusatemi, sono basita.

Modificato da Lypsak, 30 November 2011 - 09:23 AM.


    Guardian of Irael
  • Coniglietto Rosso

  • Rpg²S Admin
  • Rens: 195
  • 19
  • StellettaStellettaStellettaStellettaStellettaStelletta
  • 58424 messaggi
  • Sesso:Maschio
  • Provenienza:Bagnaia (Viterbo)
  • Abilità:Apprendista


#2 Inviato 30 November 2011 - 11:02 AM

Ricorda di postare direttamente lì sul topic dello script se esiste già senza aprirne altri! Almeno hai linkato lo script, grazie ;_______ ;
Contento che sia risolto... magari poteva dar problemi con altri script che hai poi tolto?
^ ^

(\_/)
(^ ^) <----coniglietto rosso, me!     
(> <)

 
Il mio Tumblr dove seguire i miei progetti, i progetti della Reverie : : Project ^ ^
 
KdUDtQt.png disponibile su Google Play, qui i dettagli! ^ ^
 
FwnGMI3.png completo! Giocabile online, qui i dettagli! ^ ^  
 
REVERIE : : RENDEZVOUS (In allenamento per apprendere le buone arti prima di cominciarlo per bene ^ ^) Trovate i dettagli qui insieme alla mia intervista (non utilizzerò più rpgmaker) ^ ^

Spoiler


    Lypsak
  • Nuovo Arrivato

  • Utenti
  • Rens: 0
  • 0
  • Stelletta
  • 31 messaggi
  • Sesso:Femmina
  • Provenienza:Arezzo
  • Abilità:Iniziato

#3 Inviato 30 November 2011 - 14:57 PM

Ricorda di postare direttamente lì sul topic dello script se esiste già senza aprirne altri! Almeno hai linkato lo script, grazie


Bravo che me l'hai detto, non sapevo se in quel modo facevo necroposting o no, non avevo capito bene!

In realtà non ho toccato nulla, sono piuttosto perplessa... vabbeh, meglio così!

    Holy87
  • Prode Guerriero

  • Rpg²S Staff
  • Rens: 458
  • 6
  • StellettaStellettaStellettaStellettaStellettaStelletta
  • 7431 messaggi
  • Sesso:Maschio
  • Provenienza:San Giorgio a Cremano
  • Abilità:Maestro

#4 Inviato 30 November 2011 - 20:27 PM

Bravo che me l'hai detto, non sapevo se in quel modo facevo necroposting o no, non avevo capito bene!

In realtà non ho toccato nulla, sono piuttosto perplessa... vabbeh, meglio così!

Se vuoi posso darti un altro script (che a me piace anche di più)

"Io non volevo solo partecipare alle discussioni. Volevo avere il potere di farle fallire" [cit.]

BannerOverdrive35.png
Cap3.png

578.png
 

Miei script per RPG Maker VX Ace:

Spoiler

 
I miei tutorial:
Spoiler

    Lypsak
  • Nuovo Arrivato

  • Utenti
  • Rens: 0
  • 0
  • Stelletta
  • 31 messaggi
  • Sesso:Femmina
  • Provenienza:Arezzo
  • Abilità:Iniziato

#5 Inviato 02 December 2011 - 23:18 PM

Sono curiosa, lo proverei volentieri, grazie!

    Holy87
  • Prode Guerriero

  • Rpg²S Staff
  • Rens: 458
  • 6
  • StellettaStellettaStellettaStellettaStellettaStelletta
  • 7431 messaggi
  • Sesso:Maschio
  • Provenienza:San Giorgio a Cremano
  • Abilità:Maestro

#6 Inviato 03 December 2011 - 00:46 AM

Sono curiosa, lo proverei volentieri, grazie!

Direttamente dal Melody Engine di Yanfly
#===============================================================================
# 
# Yanfly Engine Melody - Item Overhaul
# Last Date Updated: 2010.06.20
# Level: Normal, Hard
# 
# The item scene can become seriously lacking as it often keeps players in the
# dark as to what items actually do. This script rewrites the item scene and
# provides the player adequate information about how an item functions, be it
# a healing item, battle item, weapon, or a piece of armour. And if needed,
# custom data can be inserted, too.
# 
#===============================================================================
# Updates
# -----------------------------------------------------------------------------
# o 2010.06.20 - Finished Script.
# o 2010.06.18 - Started Script.
#===============================================================================
# Instructions
# -----------------------------------------------------------------------------
# To install this script, open up your script editor and copy/paste this script
# to an open slot below ▼ Materials but above ▼ Main. Remember to save.
# 
# -----------------------------------------------------------------------------
# Item and Equip Tags - For Items, Weapons, and Armours.
# -----------------------------------------------------------------------------
# <key item>
# This labels the item as a key item, making it appear in the key item category
# inside of the item scene. Does nothing else.
# 
# <custom data>
# icon, string1, string2
# </custom data>
# This allows you to input in custom data to be displayed in the item list
# data window. Replace "icon" with a number to depict which icon you want
# shown in the data. Replace "string1" with the category you want shown in the
# data. Replace "string2" with the text you want shown in the data.
#===============================================================================

$imported = {} if $imported == nil
$imported["ItemOverhaul"] = true

module YEM
  module ITEM
	
	#==========================================================================
=
	# Section I. Basic Settings
	# --------------------------------------------------------------------------
	# The following below will adjust the basic settings and vocabulary that
	# alter the basic item scene the players see before them.
	#==========================================================================
=
	
	# This adjusts the commands used within the item scene. The command window
	# is the window that lets you switch between various item scene options.
	# 
	# :usable		   Opens up usable menu items.
	# :battle		   Views battle-only items.
	# :weapons		  Views weapons list.
	# :armours		  Views armours list.
	# :misc			 Views miscellaneous items.
	# :key_items		Views key items.
	# :all_items		Views all items.
	# 
	COMMANDS =[
	  :usable,		# Opens up usable menu items.
	  :battle,		# Views battle-only items.
	  :weapons,	   # Views weapons list.
	  :armours,	   # Views armours list.
	  :misc,		  # Views miscellaneous items.
	  :key_items,	 # Views key items.
	  #:all_items,	 # Views all items.
	] # Do not remove this.
	
	# The following determines the vocabulary used for the remade item scene.
	# Adjust it accordingly to set the way text is displayed.
	VOCAB ={
	  :usable		 => "Usabili",
	  :battle		 => "Battaglia",
	  :weapons		=> "Armi",
	  :armours		=> "Armature",
	  :misc		   => "Varie",
	  :key_items	  => "Missione",
	  :all_items	  => "Tutti",
	} # Do not remove this.
	
	#==========================================================================
=
	# Section II. Data Window Settings
	# --------------------------------------------------------------------------
	# These settings adjust what you see in the data window shown to the lower
	# right of the item scene. The window shows the selected item's properties.
	# The data represented differs depending on the item, its tags, and whether
	# or not it is an item, weapon, or armour.
	#==========================================================================
=
	
	# These constants determine how the gold value appears in the data windows.
	DRAW_GOLD_ICON  = 205
	DRAW_GOLD_TEXT  = "Valore"
	
	# This adjusts the settings shown for items. Adjust as you see fit. The
	# majority of these keys are vocab settings.
	ITEM_DATA ={
	  :properties   => "Proprietà",
	  :gold_value   => true,
	  :fontsize	 => 16,
	  :hp_heal_icon => 128,
	  :hp_heal_text => "Cura PV:",
	  :mp_heal_icon => 600,
	  :mp_heal_text => "Cura PM:",
	  :dmg_icon	 => 119,
	  :base_dmg	 => "Danno di Base",
	  :heal_icon	=> 128,
	  :base_heal	=> "Cura di Base",
	  :multiplier   => "Moltiplicatore%s",
	  :element	  => "Elemento",
	  :add_state	=> "Causa",
	  :rem_state	=> "Cancella",
	  :growth	   => "Incremento %s",
	  :resist	   => "%s Resiste",
	  :bonus		=> "%s Bonus",
	} # Do not remove this.
	
	# This adjusts the settings shown for equipment. Adjust as you see fit. For
	# :shown_stats, valid stats to be shown are as follows:
	#   :hp, :mp, :atk, :def, :spi, :res, :dex, :agi
	EQUIP_DATA ={
	  :properties   => "Attributi",
	  :gold_value   => false,
	  :fontsize	 => 16,
	  :shown_stats  => [:hp, :mp, :atk, :def, :spi, :res, :dex, :agi],
	  :ele_weapon   => "Elemento",
	  :ele_armour   => "Dimezza",
	  :state_weapon => "Causa",
	  :state_armour => "Protegge da",
	} # Do not remove this.
	
	# This array contains all of the elements you want displayed and in which
	# order to display them in. You can display them as individual integers or
	# as number ranges.
	SHOWN_ELEMENTS = [9, 10, 11, 12..16]
	
	# Since elements do not have icons innately, use the following hash below
	# adjust and apply icons to them.
	ELEMENT_ICONS ={
	  9 => 104,  # Fire element.
	  10 => 105,  # Ice element.
	  11 => 106,  # Volt element.
	  12 => 108,  # Earth element.
	  13 => 107,  # Water element.
	  14 => 109,  # Air element.
	  15 => 110,  # Light element.
	  16 => 111,  # Dark element.
	} # Do not remove this.
	
  end # ITEM
end # YEM

#===============================================================================
# Editting anything past this point may potentially result in causing computer
# damage, incontinence, explosion of user's head, coma, death, and/or halitosis.
# Therefore, edit at your own risk.
#===============================================================================

module YEM
  module REGEXP
  module BASEITEM
	  
	KEY_ITEM = /<(?:KEY_ITEM|key item|key)>/i
	
	CUSTOM_DATA1 = /<(?:CUSTOM_DATA|custom data)>/i
	CUSTOM_DATA2 = /<\/(?:CUSTOM_DATA|custom data)>/i
	
  end # BASEITEM
  end # REGEXP
  module ITEM
	module_function
	#--------------------------------------------------------------------------
	# convert_integer_array
	#--------------------------------------------------------------------------
	def convert_integer_array(array)
	  result = []
	  array.each { |i|
		case i
		when Range; result |= i.to_a
		when Integer; result |= [i]
		end }
	  return result
	end
  
	#--------------------------------------------------------------------------
	# converted_contants
	#--------------------------------------------------------------------------
	SHOWN_ELEMENTS = convert_integer_array(SHOWN_ELEMENTS)
  end # ITEM
end # YEM

#===============================================================================
# module Icon
#===============================================================================

module Icon
  
  #--------------------------------------------------------------------------
  # self.gold_cost
  #--------------------------------------------------------------------------
  def self.gold_cost; return YEM::ITEM::DRAW_GOLD_ICON; end
  
  #--------------------------------------------------------------------------
  # self.element
  #--------------------------------------------------------------------------
  def self.element(element_id)
	icon = YEM::ITEM::ELEMENT_ICONS[element_id]
	return (icon == nil) ? 0 : icon
  end
  
  #--------------------------------------------------------------------------
  # self.hp_heal
  #--------------------------------------------------------------------------
  def self.hp_heal; return YEM::ITEM::ITEM_DATA[:hp_heal_icon]; end
  
  #--------------------------------------------------------------------------
  # self.mp_heal
  #--------------------------------------------------------------------------
  def self.mp_heal; return YEM::ITEM::ITEM_DATA[:mp_heal_icon]; end
  
  #--------------------------------------------------------------------------
  # self.base_damage
  #--------------------------------------------------------------------------
  def self.base_damage; return YEM::ITEM::ITEM_DATA[:dmg_icon]; end
  
  #--------------------------------------------------------------------------
  # self.base_healing
  #--------------------------------------------------------------------------
  def self.base_healing; return YEM::ITEM::ITEM_DATA[:heal_icon]; end
  
  #--------------------------------------------------------------------------
  # self.stat
  #--------------------------------------------------------------------------
  def self.stat(actor, item); return 0; end
  
end # Icon

#===============================================================================
# RPG::BaseItem
#===============================================================================

class RPG::BaseItem
  
  #--------------------------------------------------------------------------
  # public instance variables
  #--------------------------------------------------------------------------
  attr_accessor :custom_data
  attr_accessor :key_item
  
  #--------------------------------------------------------------------------
  # common cache: yem_cache_baseitem_io
  #--------------------------------------------------------------------------
  def yem_cache_baseitem_io
	return if @cached_baseitem_io; @cached_baseitem_io = true
	@key_item = false
	enable_custom_data = false
	@custom_data = [] unless self.is_a?(RPG::Skill)
	self.note.split(/[\r\n]+/).each { |line|
	  case line
	  #---
	  when YEM::REGEXP::BASEITEM::KEY_ITEM
		@key_item = true
	  #---
	  when YEM::REGEXP::BASEITEM::CUSTOM_DATA1
		next if self.is_a?(RPG::Skill)
		enable_custom_data = true
	  when YEM::REGEXP::BASEITEM::CUSTOM_DATA2
		next if self.is_a?(RPG::Skill)
		enable_custom_data = false
	  when /(\d+),[ ](.*),[ ](.*)/i
		next unless enable_custom_data
		next if self.is_a?(RPG::Skill)
		array = [$1.to_i, $2.to_s, $3.to_s]
		@custom_data.push(array)
	  end
	} # end self.note.split
  end # yem_cache_baseitem_io
  
end # RPG::BaseItem

#===============================================================================
# Scene_Title
#===============================================================================

class Scene_Title < Scene_Base
  
  #--------------------------------------------------------------------------
  # alias method: load_bt_database
  #--------------------------------------------------------------------------
  alias load_bt_database_io load_bt_database unless $@
  def load_bt_database
	load_bt_database_io
	load_io_cache
  end
  
  #--------------------------------------------------------------------------
  # alias method: load_database
  #--------------------------------------------------------------------------
  alias load_database_io load_database unless $@
  def load_database
	load_database_io
	load_io_cache
  end
  
  #--------------------------------------------------------------------------
  # new method: load_io_cache
  #--------------------------------------------------------------------------
  def load_io_cache
	groups = [$data_items, $data_weapons, $data_armors]
	for group in groups
	  for obj in group
		next if obj == nil
		obj.yem_cache_baseitem_io if obj.is_a?(RPG::BaseItem)
	  end
	end
  end
  
end # Scene_Title

#===============================================================================
# Window_ItemStatus
#===============================================================================

class Window_ItemStatus < Window_Base
  
  #--------------------------------------------------------------------------
  # initialize
  #--------------------------------------------------------------------------
  def initialize
	super(160, 0, Graphics.width - 160, 128)
	refresh
  end
  
  #--------------------------------------------------------------------------
  # refresh
  #--------------------------------------------------------------------------
  def refresh
	self.contents.clear
	@item = @item_window == nil ? nil : @item_window.item
	draw_item
	draw_party_members
  end
  
  #--------------------------------------------------------------------------
  # set_item_window
  #--------------------------------------------------------------------------
  def set_item_window(new_item_window)
	@item_window = new_item_window
	update
  end
  
  #--------------------------------------------------------------------------
  # update
  #--------------------------------------------------------------------------
  def update
	super
	return if @item_window == nil
	refresh if @item != @item_window.item
  end
  
  #--------------------------------------------------------------------------
  # draw_item
  #--------------------------------------------------------------------------
  def draw_item
	return if @item == nil
	draw_icon(@item.icon_index, 0, 0)
	self.contents.draw_text(24, 0, contents.width-28, WLH, @item.name, 0)
  end
  
  #--------------------------------------------------------------------------
  # draw_party_members
  #--------------------------------------------------------------------------
  def draw_party_members
	$game_temp.in_battle = true
	size = $game_party.members.size
	dx = (contents.width - (size * 64))/2 + 32
	dy = contents.height * 3/4
	for member in $game_party.members
	  next if member == nil
	  draw_member(member, dx, dy)
	  dx += 64
	end
	$game_temp.in_battle = false
  end
  
  #--------------------------------------------------------------------------
  # draw_member
  #--------------------------------------------------------------------------
  def draw_member(actor, dx, dy)
	bitmap = Cache.character(actor.character_name)
	sign = actor.character_name[/^[\!\$]./]
	if sign != nil and sign.include?('$')
	  cw = bitmap.width / 3
	  ch = bitmap.height / 4
	else
	  cw = bitmap.width / 12
	  ch = bitmap.height / 8
	end
	n = actor.character_index
	src_rect = Rect.new((n%4*3+1)*cw, (n/4*4)*ch, cw, ch)
	if @item.is_a?(RPG::Weapon) or @item.is_a?(RPG::Armor)
	  opacity = actor.equippable?(@item) ? 255 : 128
	elsif @item.is_a?(RPG::Item)
	  opacity = @item.for_friend? ? 255 : 128
	else
	  opacity = 255
	end
	self.contents.blt(dx - cw / 2, dy - ch, bitmap, src_rect, opacity)
  end
  
end # Window_ItemStatus

#===============================================================================
# Window_ItemList
#===============================================================================

class Window_ItemList < Window_Selectable
  
  #--------------------------------------------------------------------------
  # initialize
  #--------------------------------------------------------------------------
  def initialize(help_window)
	@help_window = help_window
	dy = @help_window.y + @help_window.height
	super(0, dy, Graphics.width - 240, Graphics.height - dy)
	refresh
	self.active = false
	self.index = 0
  end
  
  #--------------------------------------------------------------------------
  # item
  #--------------------------------------------------------------------------
  def item; return @data[[self.index, 0].max]; end
  
  #--------------------------------------------------------------------------
  # used_item_refresh
  #--------------------------------------------------------------------------
  def used_item_refresh(array)
	for item in array
	  next if item == nil
	  next unless @data.include?(item)
	  refresh
	  break
	end
  end
  
  #--------------------------------------------------------------------------
  # refresh
  #--------------------------------------------------------------------------
  def refresh
	@data = []
	for item in $game_party.items
	  next unless include?(item)
	  @data.push(item)
	end
	@data.push(nil) if @data.size <= 0
	@item_max = @data.size
	self.index = [self.index, @item_max - 1].min
	create_contents
	for i in 0...@item_max; draw_item(i); end
  end
  
  #--------------------------------------------------------------------------
  # include?
  #--------------------------------------------------------------------------
  def include?(item)
	return false if item == nil
	return false if item.name == ""
	return false unless item.is_a?(RPG::Item)
	return item.menu_ok?
  end
  
  #--------------------------------------------------------------------------
  # draw_item
  #--------------------------------------------------------------------------
  def draw_item(index)
	rect = item_rect(index)
	self.contents.clear_rect(rect)
	item = @data[index]
	return if item == nil
	enabled = enable?(item)
	draw_obj_name(item, rect.clone, enabled)
	draw_obj_charges(item, rect.clone, enabled)
	draw_obj_total(item, rect.clone, enabled)
  end
  
  #--------------------------------------------------------------------------
  # enable?
  #--------------------------------------------------------------------------
  def enable?(item)
	return false if item == nil
	return $game_party.has_item?(item)
  end
  
  #--------------------------------------------------------------------------
  # new method: draw_obj_name
  #--------------------------------------------------------------------------
  def draw_obj_name(obj, rect, enabled)
	draw_icon(obj.icon_index, rect.x, rect.y, enabled)
	self.contents.font.size = Font.default_size
	self.contents.font.color = normal_color
	self.contents.font.color.alpha = enabled ? 255 : 128
	rect.width -= 48
	self.contents.draw_text(rect.x+24, rect.y, rect.width-24, WLH, obj.name)
  end
  
  #--------------------------------------------------------------------------
  # new method: draw_obj_charges
  #--------------------------------------------------------------------------
  def draw_obj_charges(obj, rect, enabled)
	return unless $imported["BattleEngineMelody"]
	return unless obj.is_a?(RPG::Item)
	return unless obj.consumable
	return if obj.charges <= 1
	$game_party.item_charges = {} if $game_party.item_charges == nil
	$game_party.item_charges[obj.id] = obj.charges if
	  $game_party.item_charges[obj.id] == nil
	charges = $game_party.item_charges[obj.id]
	dx = rect.x; dy = rect.y + WLH/3
	self.contents.font.size = YEM::BATTLE_ENGINE::ITEM_SETTINGS[:charge]
	self.contents.font.color = normal_color
	self.contents.font.color.alpha = enabled ? 255 : 128
	self.contents.draw_text(dx, dy, 24, WLH * 2/3, charges, 2)
	self.contents.font.size = Font.default_size
  end
  
  #--------------------------------------------------------------------------
  # new method: draw_obj_total
  #--------------------------------------------------------------------------
  def draw_obj_total(obj, rect, enabled)
	if $imported["BattleEngineMelody"]
	  hash = YEM::BATTLE_ENGINE::ITEM_SETTINGS
	else
	  hash ={ :size => Font.default_size, :colour => 0, :text => "×%2d" }
	end
	number = $game_party.item_number(obj)
	dx = rect.x + rect.width - 36; dy = rect.y; dw = 32
	text = sprintf(hash[:text], number)
	self.contents.font.size = hash[:size]
	self.contents.font.color = text_color(hash[:colour])
	self.contents.font.color.alpha = enabled ? 255 : 128
	self.contents.draw_text(dx, dy, dw, WLH, text, 2)
  end
  
  #--------------------------------------------------------------------------
  # update_help
  #--------------------------------------------------------------------------
  def update_help
	@help_window.set_text(item == nil ? "" : item.description)
  end
  
end # Window_ItemList

#===============================================================================
# Window_BattleItemList
#===============================================================================

class Window_BattleItemList < Window_ItemList
  
  #--------------------------------------------------------------------------
  # include?
  #--------------------------------------------------------------------------
  def include?(item)
	return false if item == nil
	return false if item.name == ""
	return false unless item.is_a?(RPG::Item)
	return false if item.menu_ok?
	return item.battle_ok?
  end
  
end # Window_BattleItemList

#===============================================================================
# Window_WeaponItemList
#===============================================================================

class Window_WeaponItemList < Window_ItemList
  
  #--------------------------------------------------------------------------
  # include?
  #--------------------------------------------------------------------------
  def include?(item)
	return false if item == nil
	return false if item.name == ""
	return item.is_a?(RPG::Weapon)
  end
  
end # Window_WeaponItemList

#===============================================================================
# Window_ArmourItemList
#===============================================================================

class Window_ArmourItemList < Window_ItemList
  
  #--------------------------------------------------------------------------
  # include?
  #--------------------------------------------------------------------------
  def include?(item)
	return false if item == nil
	return false if item.name == ""
	return item.is_a?(RPG::Armor)
  end
  
end # Window_ArmourItemList

#===============================================================================
# Window_MiscItemList
#===============================================================================

class Window_MiscItemList < Window_ItemList
  
  #--------------------------------------------------------------------------
  # include?
  #--------------------------------------------------------------------------
  def include?(item)
	return false if item == nil
	return false if item.name == ""
	return false if item.is_a?(RPG::Weapon)
	return false if item.is_a?(RPG::Armor)
	return false if item.menu_ok?
	return false if item.battle_ok?
	return false if item.key_item
	return true
  end
  
end # Window_MiscItemList

#===============================================================================
# Window_KeyItemList
#===============================================================================

class Window_KeyItemList < Window_ItemList
  
  #--------------------------------------------------------------------------
  # include?
  #--------------------------------------------------------------------------
  def include?(item)
	return false if item == nil
	return false if item.name == ""
	return item.key_item
  end
  
end # Window_KeyItemList

#===============================================================================
# Window_AllItemList
#===============================================================================

class Window_AllItemList < Window_ItemList
  
  #--------------------------------------------------------------------------
  # include?
  #--------------------------------------------------------------------------
  def include?(item)
	return false if item == nil
	return false if item.name == ""
	return true
  end
  
end # Window_AllItemList

#===============================================================================
# Window_ItemData
#===============================================================================

class Window_ItemData < Window_Base
  
  #--------------------------------------------------------------------------
  # initialize
  #--------------------------------------------------------------------------
  def initialize(help_window)
	dy = help_window.y + help_window.height
	super(Graphics.width - 240, dy, 240, Graphics.height - dy)
	create_clone
  end
  
  #--------------------------------------------------------------------------
  # create_clone
  #--------------------------------------------------------------------------
  def create_clone
	@clone = Game_Actor.new(1)
	@clone.maxhp = @clone.base_maxhp
	@clone.maxmp = @clone.base_maxmp
	@clone.atk = @clone.base_atk
	@clone.def = @clone.base_def
	@clone.spi = @clone.base_spi
	@clone.res = @clone.base_res if $imported["RES Stat"]
	@clone.dex = @clone.base_dex if $imported["DEX Stat"]
	@clone.agi = @clone.base_agi
  end
  
  #--------------------------------------------------------------------------
  # set_item_window
  #--------------------------------------------------------------------------
  def set_item_window(new_item_window)
	@item_window = new_item_window
	update
  end
  
  #--------------------------------------------------------------------------
  # update
  #--------------------------------------------------------------------------
  def update
	super
	return if @item_window == nil
	refresh if @item != @item_window.item
  end
  
  #--------------------------------------------------------------------------
  # refresh
  #--------------------------------------------------------------------------
  def refresh
	self.contents.clear
	@item = @item_window.item
	return if @item == nil
	dx = 0; dy = 0
	dy = draw_item_name(dy)
	if @item.is_a?(RPG::Item)
	  @hash = YEM::ITEM::ITEM_DATA
	  dy = draw_item_properties(dy)
	elsif @item.is_a?(RPG::Weapon) or @item.is_a?(RPG::Armor)
	  @hash = YEM::ITEM::EQUIP_DATA
	  dy = draw_equip_properties(dy)
	end
  end
  
  #--------------------------------------------------------------------------
  # draw_item_name
  #--------------------------------------------------------------------------
  def draw_item_name(dy)
	draw_icon(@item.icon_index, 0, dy)
	self.contents.font.size = Font.default_size
	self.contents.font.color = normal_color
	self.contents.draw_text(24, dy, contents.width-28, WLH, @item.name)
	dy += WLH
	return dy
  end
  
  #--------------------------------------------------------------------------
  # draw_item_properties
  #--------------------------------------------------------------------------
  def draw_item_properties(dy)
	dy = draw_properties(dy)
	dy = draw_item_value(dy)
	dy = draw_healing_properties(dy)
	dy = draw_base_damage(dy)
	dy = draw_multipliers(dy)
	dy = draw_elements(dy)
	dy = draw_plus_states(dy)
	dy = draw_minus_states(dy)
	dy = draw_item_growth(dy)
	dy = draw_custom_data(dy)
	return dy
  end
  
  #--------------------------------------------------------------------------
  # draw_equip_properties
  #--------------------------------------------------------------------------
  def draw_equip_properties(dy)
	dy = draw_properties(dy)
	dy = draw_item_value(dy)
	dy = draw_equip_stats(dy)
	dy = draw_elements(dy)
	dy = draw_states(dy)
	dy = draw_custom_data(dy)
	return dy
  end
  
  #--------------------------------------------------------------------------
  # draw_properties
  #--------------------------------------------------------------------------
  def draw_properties(dy)
	text = @hash[:properties]
	self.contents.font.size = @hash[:fontsize]
	self.contents.font.color = system_color
	self.contents.draw_text(4, dy, contents.width-8, WLH, text, 1)
	dy += WLH
	return dy
  end
  
  #--------------------------------------------------------------------------
  # draw_item_value
  #--------------------------------------------------------------------------
  def draw_item_value(dy)
	return dy unless @hash[:gold_value]
	return dy if @item.price == 0
	draw_icon(Icon.gold_cost, 0, dy)
	text = YEM::ITEM::DRAW_GOLD_TEXT
	self.contents.draw_text(24, dy, contents.width-28, WLH, text, 0)
	text = sprintf("%d%s", @item.price, Vocab.gold)
	self.contents.font.color = normal_color
	self.contents.draw_text(24, dy, contents.width-28, WLH, text, 2)
	dy += WLH
	return dy
  end
  
  #--------------------------------------------------------------------------
  # draw_healing_properties
  #--------------------------------------------------------------------------
  def draw_healing_properties(dy)
	return dy if dy + WLH > contents.height
	#---
	if @item.hp_recovery_rate != 0 or @item.hp_recovery != 0
	  draw_icon(Icon.hp_heal, 0, dy)
	  self.contents.font.color = system_color
	  text = @hash[:hp_heal_text]
	  self.contents.draw_text(24, dy, contents.width-28, WLH, text, 0)
	  self.contents.font.color = normal_color
	  if @item.hp_recovery_rate != 0 and @item.hp_recovery != 0
		text = sprintf("%+d%%", @item.hp_recovery_rate)
		self.contents.draw_text(24, dy, (contents.width-28)*2/3, WLH, text, 2)
		text = sprintf("%+d", @item.hp_recovery)
		self.contents.draw_text(24, dy, contents.width-28, WLH, text, 2)
	  elsif @item.hp_recovery_rate != 0
		text = sprintf("%+d%%", @item.hp_recovery_rate)
		self.contents.draw_text(24, dy, contents.width-28, WLH, text, 2)
	  elsif @item.hp_recovery != 0
		text = sprintf("%+d", @item.hp_recovery)
		self.contents.draw_text(24, dy, contents.width-28, WLH, text, 2)
	  end
	  dy += WLH
	end
	#---
	return dy if dy + WLH > contents.height
	#---
	if @item.mp_recovery_rate != 0 or @item.mp_recovery != 0
	  draw_icon(Icon.mp_heal, 0, dy)
	  self.contents.font.color = system_color
	  text = @hash[:mp_heal_text]
	  self.contents.draw_text(24, dy, contents.width-28, WLH, text, 0)
	  self.contents.font.color = normal_color
	  if @item.mp_recovery_rate != 0 and @item.mp_recovery != 0
		text = sprintf("%+d%%", @item.mp_recovery_rate)
		self.contents.draw_text(24, dy, (contents.width-28)*2/3, WLH, text, 2)
		text = sprintf("%+d", @item.mp_recovery)
		self.contents.draw_text(24, dy, contents.width-28, WLH, text, 2)
	  elsif @item.mp_recovery_rate != 0
		text = sprintf("%+d%%", @item.mp_recovery_rate)
		self.contents.draw_text(24, dy, contents.width-28, WLH, text, 2)
	  elsif @item.mp_recovery != 0
		text = sprintf("%+d", @item.mp_recovery)
		self.contents.draw_text(24, dy, contents.width-28, WLH, text, 2)
	  end
	  dy += WLH
	end
	#---
	return dy
  end
  
  #--------------------------------------------------------------------------
  # draw_base_damage
  #--------------------------------------------------------------------------
  def draw_base_damage(dy)
	return dy if dy + WLH > contents.height
	return dy if (-5..5) === @item.base_damage
	if @item.base_damage > 0
	  draw_icon(Icon.base_damage, 0, dy)
	  text = @hash[:base_dmg]
	else
	  draw_icon(Icon.base_healing, 0, dy)
	  text = @hash[:base_heal]
	end
	self.contents.font.color = system_color
	self.contents.draw_text(24, dy, contents.width-28, WLH, text, 0)
	self.contents.font.color = normal_color
	text = (@item.base_damage).abs
	self.contents.draw_text(24, dy, contents.width-28, WLH, text, 2); dy += WLH
	return dy
  end
  
  #--------------------------------------------------------------------------
  # draw_multipliers
  #--------------------------------------------------------------------------
  def draw_multipliers(dy)
	return dy if dy + WLH > contents.height
	return dy if @item.base_damage == 0
	icon = @item.base_damage > 0 ? Icon.base_damage : Icon.base_healing
	#---
	if @item.atk_f > 0
	  draw_icon(icon, 0, dy)
	  text = sprintf(@hash[:multiplier], Vocab.atk)
	  self.contents.font.color = system_color
	  self.contents.draw_text(24, dy, contents.width-28, WLH, text, 0)
	  text = sprintf("%s%%", @item.atk_f)
	  self.contents.font.color = normal_color
	  self.contents.draw_text(24, dy, contents.width-28, WLH, text, 2)
	  dy += WLH
	end
	#---
	return dy if dy + WLH > contents.height
	#---
	if $imported["BattleEngineMelody"] and @item.def_f > 0
	  draw_icon(icon, 0, dy)
	  text = sprintf(@hash[:multiplier], Vocab.def)
	  self.contents.font.color = system_color
	  self.contents.draw_text(24, dy, contents.width-28, WLH, text, 0)
	  text = sprintf("%s%%", @item.def_f)
	  self.contents.font.color = normal_color
	  self.contents.draw_text(24, dy, contents.width-28, WLH, text, 2)
	  dy += WLH
	end
	#---
	return dy if dy + WLH > contents.height
	#---
	if @item.spi_f > 0
	  draw_icon(icon, 0, dy)
	  text = sprintf(@hash[:multiplier], Vocab.spi)
	  self.contents.font.color = system_color
	  self.contents.draw_text(24, dy, contents.width-28, WLH, text, 0)
	  text = sprintf("%s%%", @item.spi_f)
	  self.contents.font.color = normal_color
	  self.contents.draw_text(24, dy, contents.width-28, WLH, text, 2)
	  dy += WLH
	end
	#---
	return dy if dy + WLH > contents.height
	#---
	if $imported["BattleEngineMelody"] and $imported["RES Stat"] and
	@item.res_f > 0
	  draw_icon(icon, 0, dy)
	  text = sprintf(@hash[:multiplier], Vocab.res)
	  self.contents.font.color = system_color
	  self.contents.draw_text(24, dy, contents.width-28, WLH, text, 0)
	  text = sprintf("%s%%", @item.res_f)
	  self.contents.font.color = normal_color
	  self.contents.draw_text(24, dy, contents.width-28, WLH, text, 2)
	  dy += WLH
	end
	#---
	return dy if dy + WLH > contents.height
	#---
	if $imported["BattleEngineMelody"] and $imported["DEX Stat"] and
	@item.dex_f > 0
	  draw_icon(icon, 0, dy)
	  text = sprintf(@hash[:multiplier], Vocab.dex)
	  self.contents.font.color = system_color
	  self.contents.draw_text(24, dy, contents.width-28, WLH, text, 0)
	  text = sprintf("%s%%", @item.dex_f)
	  self.contents.font.color = normal_color
	  self.contents.draw_text(24, dy, contents.width-28, WLH, text, 2)
	  dy += WLH
	end
	#---
	return dy if dy + WLH > contents.height
	#---
	if $imported["BattleEngineMelody"] and @item.agi_f > 0
	  draw_icon(icon, 0, dy)
	  text = sprintf(@hash[:multiplier], Vocab.agi)
	  self.contents.font.color = system_color
	  self.contents.draw_text(24, dy, contents.width-28, WLH, text, 0)
	  text = sprintf("%s%%", @item.agi_f)
	  self.contents.font.color = normal_color
	  self.contents.draw_text(24, dy, contents.width-28, WLH, text, 2)
	  dy += WLH
	end
	#---
	return dy
  end
  
  #--------------------------------------------------------------------------
  # draw_elements
  #--------------------------------------------------------------------------
  def draw_elements(dy)
	return dy if @item.element_set == []
	for element_id in YEM::ITEM::SHOWN_ELEMENTS
	  break if dy + WLH > contents.height
	  next unless @item.element_set.include?(element_id)
	  draw_icon(Icon.element(element_id), 0, dy)
	  text = @hash[:element] if @item.is_a?(RPG::Item)
	  text = @hash[:ele_weapon] if @item.is_a?(RPG::Weapon)
	  text = @hash[:ele_armour] if @item.is_a?(RPG::Armor)
	  self.contents.font.color = system_color
	  self.contents.draw_text(24, dy, contents.width-28, WLH, text, 0)
	  text = $data_system.elements[element_id]
	  self.contents.font.color = normal_color
	  self.contents.draw_text(24, dy, contents.width-28, WLH, text, 2)
	  dy += WLH
	end
	return dy
  end
  
  #--------------------------------------------------------------------------
  # total_drawn_states
  #--------------------------------------------------------------------------
  def total_drawn_states(array)
	result = 0
	for state_id in array
	  next if $data_states[state_id] == nil
	  next if $data_states[state_id].icon_index == 0
	  result += 1
	end
	return [result, 8].min
  end
  
  #--------------------------------------------------------------------------
  # draw_states
  #--------------------------------------------------------------------------
  def draw_states(dy)
	return dy if @item.state_set == []
	total = total_drawn_states(@item.state_set)
	if total == 1
	  return dy if dy + WLH > contents.height
	  state = $data_states[@item.state_set[0]]
	  draw_icon(state.icon_index, 0, dy)
	  text = @hash[:state_weapon] if @item.is_a?(RPG::Weapon)
	  text = @hash[:state_armour] if @item.is_a?(RPG::Armor)
	  self.contents.font.color = system_color
	  self.contents.draw_text(24, dy, contents.width-28, WLH, text, 0)
	  text = state.name
	  self.contents.font.color = normal_color
	  self.contents.draw_text(24, dy, contents.width-28, WLH, text, 2)
	else
	  return dy if dy + WLH*2 > contents.height
	  text = @hash[:state_weapon] if @item.is_a?(RPG::Weapon)
	  text = @hash[:state_armour] if @item.is_a?(RPG::Armor)
	  self.contents.font.color = system_color
	  self.contents.draw_text(4, dy, contents.width-8, WLH, text, 1)
	  dy += WLH
	  dx = (contents.width - total*24)/2
	  for state_id in @item.state_set
		break if dx + 24 > contents.width
		state = $data_states[state_id]
		next if state.icon_index == 0
		draw_icon(state.icon_index, dx, dy)
		dx += 24
	  end
	end
	dy += WLH
	return dy
  end
  
  #--------------------------------------------------------------------------
  # draw_plus_states
  #--------------------------------------------------------------------------
  def draw_plus_states(dy)
	return dy if @item.plus_state_set == []
	total = total_drawn_states(@item.plus_state_set)
	if total == 1
	  return dy if dy + WLH > contents.height
	  state = $data_states[@item.plus_state_set[0]]
	  draw_icon(state.icon_index, 0, dy)
	  text = @hash[:add_state]
	  self.contents.font.color = system_color
	  self.contents.draw_text(24, dy, contents.width-28, WLH, text, 0)
	  text = state.name
	  self.contents.font.color = normal_color
	  self.contents.draw_text(24, dy, contents.width-28, WLH, text, 2)
	else
	  return dy if dy + WLH*2 > contents.height
	  text = @hash[:add_state]
	  self.contents.font.color = system_color
	  self.contents.draw_text(4, dy, contents.width-8, WLH, text, 1)
	  dy += WLH
	  dx = (contents.width - total*24)/2
	  for state_id in @item.plus_state_set
		break if dx + 24 > contents.width
		state = $data_states[state_id]
		next if state.icon_index == 0
		draw_icon(state.icon_index, dx, dy)
		dx += 24
	  end
	end
	dy += WLH
	return dy
  end
  
  #--------------------------------------------------------------------------
  # draw_minus_states
  #--------------------------------------------------------------------------
  def draw_minus_states(dy)
	return dy if @item.minus_state_set == []
	total = total_drawn_states(@item.minus_state_set)
	if total == 1
	  return dy if dy + WLH > contents.height
	  state = $data_states[@item.minus_state_set[0]]
	  draw_icon(state.icon_index, 0, dy)
	  text = @hash[:rem_state]
	  self.contents.font.color = system_color
	  self.contents.draw_text(24, dy, contents.width-28, WLH, text, 0)
	  text = state.name
	  self.contents.font.color = normal_color
	  self.contents.draw_text(24, dy, contents.width-28, WLH, text, 2)
	else
	  return dy if dy + WLH*2 > contents.height
	  text = @hash[:rem_state]
	  self.contents.font.color = system_color
	  self.contents.draw_text(4, dy, contents.width-8, WLH, text, 1)
	  dy += WLH
	  dx = (contents.width - total*24)/2
	  for state_id in @item.minus_state_set
		break if dx + 24 > contents.width
		state = $data_states[state_id]
		next if state.icon_index == 0
		draw_icon(state.icon_index, dx, dy)
		dx += 24
	  end
	end
	dy += WLH
	return dy
  end
  
  #--------------------------------------------------------------------------
  # draw_item_growth
  #--------------------------------------------------------------------------
  def draw_item_growth(dy)
	#---
	if @item.parameter_type != 0
	  case @item.parameter_type
	  when 1; text = sprintf(@hash[:growth], Vocab.hp)
	  when 2; text = sprintf(@hash[:growth], Vocab.mp)
	  when 3; text = sprintf(@hash[:growth], Vocab.atk)
	  when 4; text = sprintf(@hash[:growth], Vocab.def)
	  when 5; text = sprintf(@hash[:growth], Vocab.spi)
	  when 6; text = sprintf(@hash[:growth], Vocab.agi)
	  end
	  draw_icon(@item.icon_index, 0, dy)
	  self.contents.font.color = system_color
	  self.contents.draw_text(24, dy, contents.width-28, WLH, text, 0)
	  text = sprintf("%+d", @item.parameter_points)
	  self.contents.font.color = normal_color
	  self.contents.draw_text(24, dy, contents.width-28, WLH, text, 2)
	  dy += WLH
	end
	#---
	if $imported["StatusMenuMelody"]
	  for stat in [:hp, :mp, :atk, :def, :spi, :res, :dex, :agi]
		return dy if dy + WLH > contents.height
		next if stat == :res and !$imported["RES Stat"]
		next if stat == :dex and !$imported["DEX Stat"]
		next if @item.stat_growth[stat] == 0 or @item.stat_growth[stat] == nil
		text = sprintf(@hash[:growth], eval("Vocab." + stat.to_s))
		draw_icon(@item.icon_index, 0, dy)
		self.contents.font.color = system_color
		self.contents.draw_text(24, dy, contents.width-28, WLH, text, 0)
		text = sprintf("%+d", @item.stat_growth[stat])
		self.contents.font.color = normal_color
		self.contents.draw_text(24, dy, contents.width-28, WLH, text, 2)
		dy += WLH
	  end
	end
	#---
	if $imported["BattleEngineMelody"]
	  growth = []
	  for key in @item.element_growth
		growth.push(key[0]) if YEM::ITEM::SHOWN_ELEMENTS.include?(key[0])
	  end
	  growth.sort!
	  for element_id in growth
		return dy if dy + WLH > contents.height
		icon = Icon.element(element_id)
		next if icon == 0
		draw_icon(icon, 0, dy)
		text = sprintf(@hash[:resist], $data_system.elements[element_id])
		self.contents.font.color = system_color
		self.contents.draw_text(24, dy, contents.width-28, WLH, text, 0)
		text = sprintf("%+d%%", [email protected]_growth[element_id])
		self.contents.font.color = normal_color
		self.contents.draw_text(24, dy, contents.width-28, WLH, text, 2)
		dy += WLH
	  end
	end
	#---
	if $imported["BattleEngineMelody"]
	  growth = []
	  for key in @item.state_growth
		growth.push(key[0])
	  end
	  growth.sort!
	  for state_id in growth
		return dy if dy + WLH > contents.height
		state = $data_states[state_id]
		next if state == nil
		icon = state.icon_index
		next if icon == 0
		draw_icon(icon, 0, dy)
		text = sprintf(@hash[:resist], state.name)
		self.contents.font.color = system_color
		self.contents.draw_text(24, dy, contents.width-28, WLH, text, 0)
		text = sprintf("%+d%%", [email protected]_growth[state_id])
		self.contents.font.color = normal_color
		self.contents.draw_text(24, dy, contents.width-28, WLH, text, 2)
		dy += WLH
	  end
	end
	#---
	if $imported["EquipmentOverhaul"]
	  for stat in [:hp, :mp, :atk, :def, :spi, :res, :dex, :agi]
		return dy if dy + WLH > contents.height
		next if stat == :res and !$imported["RES Stat"]
		next if stat == :dex and !$imported["DEX Stat"]
		next if @item.apt_growth[stat] == 0 or @item.apt_growth[stat] == nil
		text = sprintf(@hash[:bonus], eval("Vocab." + stat.to_s))
		draw_icon(@item.icon_index, 0, dy)
		self.contents.font.color = system_color
		self.contents.draw_text(24, dy, contents.width-28, WLH, text, 0)
		text = sprintf("%+d%%", @item.apt_growth[stat])
		self.contents.font.color = normal_color
		self.contents.draw_text(24, dy, contents.width-28, WLH, text, 2)
		dy += WLH
	  end
	end
	#---
	return dy
  end
  
  #--------------------------------------------------------------------------
  # draw_equip_stats
  #--------------------------------------------------------------------------
  def draw_equip_stats(dy)
	dx = 0
	array = [:hp, :mp, :atk, :def, :spi, :res, :dex, :agi]
	for stat in @hash[:shown_stats]
	  return if dy + WLH > contents.height
	  next if stat == :res and !$imported["RES Stat"]
	  next if stat == :dex and !$imported["DEX Stat"]
	  next if [:hp, :mp].include?(stat) and !$imported["EquipmentOverhaul"]
	  next unless array.include?(stat)
	  draw_icon(Icon.stat(@clone, stat), dx, dy)
	  text = eval("Vocab." + stat.to_s)
	  self.contents.font.color = system_color
	  self.contents.draw_text(dx+24, dy, contents.width/2-28, WLH, text, 0)
	  stat_text = stat.to_s
	  stat_text = "max" + stat_text if ["hp", "mp"].include?(stat_text)
	  item_value = eval("@item." + stat_text)
	  text = sprintf("%+d", item_value)
	  self.contents.font.color = normal_color
	  self.contents.font.color.alpha = item_value == 0 ? 128 : 255
	  self.contents.draw_text(dx+24, dy, contents.width/2-28, WLH, text, 2)
	  if dx == 0
		dx = contents.width/2
	  else
		dx = 0
		dy += WLH
	  end
	end
	dy += WLH if dx != 0
	return dy
  end
  
  #--------------------------------------------------------------------------
  # draw_custom_data
  #--------------------------------------------------------------------------
  def draw_custom_data(dy)
	return dy if @item.custom_data == []
	for array in @item.custom_data
	  break if dy + WLH > contents.height
	  draw_icon(array[0], 0, dy)
	  text = array[1]
	  self.contents.font.color = system_color
	  self.contents.draw_text(24, dy, contents.width-28, WLH, text, 0)
	  text = array[2]
	  self.contents.font.color = normal_color
	  self.contents.draw_text(24, dy, contents.width-28, WLH, text, 2)
	  dy += WLH
	end
	return dy
  end
  
end # Window_ItemData

#===============================================================================
# Scene_Item
#===============================================================================

class Scene_Item < Scene_Base

  #--------------------------------------------------------------------------
  # overwrite method: start
  #--------------------------------------------------------------------------
  def start
	super
	create_menu_background
	@viewport = Viewport.new(0, 0, Graphics.width, Graphics.height)
	@help_window = Window_Help.new
	@help_window.viewport = @viewport
	@help_window.y = 128
	@data_window = Window_ItemData.new(@help_window)
	@data_window.viewport = @viewport
	@windows = []
	@target_window = Window_MenuStatus.new(0, 0)
	@target_window.visible = false
	@target_window.active = false
	@status_window = Window_ItemStatus.new
	@status_window.viewport = @viewport
	create_command_window
	update_windows
  end
  
  #--------------------------------------------------------------------------
  # new method: create_command_window
  #--------------------------------------------------------------------------
  def create_command_window
	commands = []; @data = []
	for command in YEM::ITEM::COMMANDS
	  case command
	  when :usable
		@usable_window = Window_ItemList.new(@help_window)
		@windows.push(@usable_window)
	  when :battle
		@battle_window = Window_BattleItemList.new(@help_window)
		@windows.push(@battle_window)
	  when :weapons
		@weapon_window = Window_WeaponItemList.new(@help_window)
		@windows.push(@weapon_window)
	  when :armours
		@armour_window = Window_ArmourItemList.new(@help_window)
		@windows.push(@armour_window)
	  when :misc
		@misc_window = Window_MiscItemList.new(@help_window)
		@windows.push(@misc_window)
	  when :key_items
		@key_item_window = Window_KeyItemList.new(@help_window)
		@windows.push(@key_item_window)
	  when :all_items
		@all_item_window = Window_AllItemList.new(@help_window)
		@windows.push(@all_item_window)
	  else; next
	  end
	  @data.push(command)
	  if YEM::ITEM::VOCAB[command] != nil
		commands.push(YEM::ITEM::VOCAB[command])
	  end
	end
	for window in @windows
	  next if window == nil?
	  window.active = false
	  window.viewport = @viewport
	  window.help_window = @help_window if window.is_a?(Window_Selectable)
	end
	@command_window = Window_Command_Centered.new(160, commands)
	@command_window.viewport = @viewport
	@command_window.height = 128
	@command_window.active = true
  end
  
  #--------------------------------------------------------------------------
  # new method: update_windows
  #--------------------------------------------------------------------------
  def update_windows
	@last_command_index = @command_window.index
	@help_window.y = Graphics.height*8
	@data_window.y = Graphics.height*8
	for window in @windows
	  next if window == nil
	  window.y = Graphics.height*8
	end
	#---
	case @data[@command_window.index]
	when :usable
	  show_item_windows(@usable_window)
	when :battle
	  show_item_windows(@battle_window)
	when :weapons
	  show_item_windows(@weapon_window)
	when :armours
	  show_item_windows(@armour_window)
	when :misc
	  show_item_windows(@misc_window)
	when :key_items
	  show_item_windows(@key_item_window)
	when :all_items
	  show_item_windows(@all_item_window)
	end
  end
  
  #--------------------------------------------------------------------------
  # overwrite method: terminate
  #--------------------------------------------------------------------------
  def terminate
	super
	dispose_menu_background
	@help_window.dispose
	@command_window.dispose
	@status_window.dispose
	for window in @windows
	  next if window == nil
	  next if window.disposed?
	  window.dispose
	end
	@viewport.dispose
  end
  
  #--------------------------------------------------------------------------
  # overwrite method: update
  #--------------------------------------------------------------------------
  def update
	super
	update_menu_background
	if @command_window.active
	  update_command_selection
	elsif @target_window.active
	  update_target_selection
	elsif @item_window != nil and @item_window.active
	  update_item_selection
	end
  end
  
  #--------------------------------------------------------------------------
  # new method: update_command_selection
  #--------------------------------------------------------------------------
  def update_command_selection
	@command_window.update
	update_windows if @last_command_index != @command_window.index
	if Input.trigger?(Input::B)
	  Sound.play_cancel
	  return_scene
	elsif Input.trigger?(Input::C)
	  Sound.play_decision
	  @command_window.active = false
	  case @data[@command_window.index]
	  when :usable, :battle, :weapons, :armours, :misc, :key_items, :all_items
		@item_window.active = true
	  end
	end
  end
  
  #--------------------------------------------------------------------------
  # new method: show_usable_windows
  #--------------------------------------------------------------------------
  def show_item_windows(window)
	@help_window.y = 128
	@data_window.set_item_window(window)
	@status_window.set_item_window(window)
	@data_window.y = @help_window.y + @help_window.height
	window.y = @data_window.y
	window.update_help
	@item_window = window
  end
  
  #--------------------------------------------------------------------------
  # overwrite method: update_item_selection
  #--------------------------------------------------------------------------
  def update_item_selection
	@status_window.update
	@item_window.update
	@data_window.update
	if Input.trigger?(Input::B)
	  Sound.play_cancel
	  @item_window.active = false
	  @command_window.active = true
	  return unless @item_used
	  for window in @windows
		next unless window.is_a?(Window_ItemList)
		window.used_item_refresh(@item_used)
	  end
	  @item_used = []
	elsif Input.trigger?(Input::C)
	  @item = @item_window.item
	  if enable_item?
		Sound.play_decision
		determine_item
	  end
	end
  end
  
  #--------------------------------------------------------------------------
  # new method: enable_item?
  #--------------------------------------------------------------------------
  def enable_item?
	return false unless @item.is_a?(RPG::Item)
	return false unless @item.menu_ok?
	return false unless @item_window.enable?(@item)
	return true
  end
  
  #--------------------------------------------------------------------------
  # alias method: update_target_selection
  #--------------------------------------------------------------------------
  alias update_target_selection_io update_target_selection unless $@
  def update_target_selection
	@target_window.update
	update_target_selection_io
  end
  
  #--------------------------------------------------------------------------
  # alias method: show_target_window
  #--------------------------------------------------------------------------
  alias show_target_window_io show_target_window unless $@
  def show_target_window(right)
	show_target_window_io(true)
  end
  
  #--------------------------------------------------------------------------
  # alias method: use_item_nontarget
  #--------------------------------------------------------------------------
  alias use_item_nontarget_io use_item_nontarget unless $@
  def use_item_nontarget
	@item_used = [] if @item_used == nil
	@item_used.push(@item) unless @item_used.include?(@item)
	use_item_nontarget_io
	@status_window.refresh
  end
  
end # Scene_Base

#===============================================================================
# 
# END OF FILE
# 
#===============================================================================
Per gli oggetti chiave, devi inserire "<key item>" nella tag delle note che vuoi fare in modo che sia un oggetto chiave.

Modificato da Holy87, 05 December 2011 - 22:48 PM.

"Io non volevo solo partecipare alle discussioni. Volevo avere il potere di farle fallire" [cit.]

BannerOverdrive35.png
Cap3.png

578.png
 

Miei script per RPG Maker VX Ace:

Spoiler

 
I miei tutorial:
Spoiler

    Lypsak
  • Nuovo Arrivato

  • Utenti
  • Rens: 0
  • 0
  • Stelletta
  • 31 messaggi
  • Sesso:Femmina
  • Provenienza:Arezzo
  • Abilità:Iniziato

#7 Inviato 05 December 2011 - 22:13 PM

Uhm... ci deve essere qualcosa che non va... quando vado a provare il gioco non parte... mi dà una serie di punti interrogativi, poi il nome dello script e "47? SINTAX ERROR?????"...
Cosa ho sbagliato? T__T

    Guardian of Irael
  • Coniglietto Rosso

  • Rpg²S Admin
  • Rens: 195
  • 19
  • StellettaStellettaStellettaStellettaStellettaStelletta
  • 58424 messaggi
  • Sesso:Maschio
  • Provenienza:Bagnaia (Viterbo)
  • Abilità:Apprendista


#8 Inviato 05 December 2011 - 22:42 PM

Basta andare alla riga 47 dello script e cancellare l'=
Colpa dell'incolla che gli ha fatto saltare una riga! ^ ^
Potrebbe succedere in altri punti, dacci un occhio! ^ ^

(\_/)
(^ ^) <----coniglietto rosso, me!     
(> <)

 
Il mio Tumblr dove seguire i miei progetti, i progetti della Reverie : : Project ^ ^
 
KdUDtQt.png disponibile su Google Play, qui i dettagli! ^ ^
 
FwnGMI3.png completo! Giocabile online, qui i dettagli! ^ ^  
 
REVERIE : : RENDEZVOUS (In allenamento per apprendere le buone arti prima di cominciarlo per bene ^ ^) Trovate i dettagli qui insieme alla mia intervista (non utilizzerò più rpgmaker) ^ ^

Spoiler


    Holy87
  • Prode Guerriero

  • Rpg²S Staff
  • Rens: 458
  • 6
  • StellettaStellettaStellettaStellettaStellettaStelletta
  • 7431 messaggi
  • Sesso:Maschio
  • Provenienza:San Giorgio a Cremano
  • Abilità:Maestro

#9 Inviato 05 December 2011 - 22:43 PM

Uhm... ci deve essere qualcosa che non va... quando vado a provare il gioco non parte... mi dà una serie di punti interrogativi, poi il nome dello script e "47? SINTAX ERROR?????"...
Cosa ho sbagliato? T__T

Prova a ricopiarlo, forse non l'hai copiato tutto fino in fondo

"Io non volevo solo partecipare alle discussioni. Volevo avere il potere di farle fallire" [cit.]

BannerOverdrive35.png
Cap3.png

578.png
 

Miei script per RPG Maker VX Ace:

Spoiler

 
I miei tutorial:
Spoiler

    Guardian of Irael
  • Coniglietto Rosso

  • Rpg²S Admin
  • Rens: 195
  • 19
  • StellettaStellettaStellettaStellettaStellettaStelletta
  • 58424 messaggi
  • Sesso:Maschio
  • Provenienza:Bagnaia (Viterbo)
  • Abilità:Apprendista


#10 Inviato 05 December 2011 - 22:46 PM

No no c'è un uguale di troppo a capo, ora che ci faccio caso pure alla riga 53, edita magari Holy! ^ ^

(\_/)
(^ ^) <----coniglietto rosso, me!     
(> <)

 
Il mio Tumblr dove seguire i miei progetti, i progetti della Reverie : : Project ^ ^
 
KdUDtQt.png disponibile su Google Play, qui i dettagli! ^ ^
 
FwnGMI3.png completo! Giocabile online, qui i dettagli! ^ ^  
 
REVERIE : : RENDEZVOUS (In allenamento per apprendere le buone arti prima di cominciarlo per bene ^ ^) Trovate i dettagli qui insieme alla mia intervista (non utilizzerò più rpgmaker) ^ ^

Spoiler


    Holy87
  • Prode Guerriero

  • Rpg²S Staff
  • Rens: 458
  • 6
  • StellettaStellettaStellettaStellettaStellettaStelletta
  • 7431 messaggi
  • Sesso:Maschio
  • Provenienza:San Giorgio a Cremano
  • Abilità:Maestro

#11 Inviato 05 December 2011 - 22:50 PM

Dato che incollando il codice nel forum non so perchè mi mette quegli = a capo, ho deciso di usare pastebin.
Il codice è disponibile qui

"Io non volevo solo partecipare alle discussioni. Volevo avere il potere di farle fallire" [cit.]

BannerOverdrive35.png
Cap3.png

578.png
 

Miei script per RPG Maker VX Ace:

Spoiler

 
I miei tutorial:
Spoiler

    Lypsak
  • Nuovo Arrivato

  • Utenti
  • Rens: 0
  • 0
  • Stelletta
  • 31 messaggi
  • Sesso:Femmina
  • Provenienza:Arezzo
  • Abilità:Iniziato

#12 Inviato 06 December 2011 - 00:04 AM

Dunque, ora il gioco parte ma se cerco di aprire il menù oggetti mi dà quest'errore:

"????' 'item overhaul'? 1336??? NameError ?????
uninitialized constant Scene_Item::Window_Command_Centered"

Che ne pensate?

    Guardian of Irael
  • Coniglietto Rosso

  • Rpg²S Admin
  • Rens: 195
  • 19
  • StellettaStellettaStellettaStellettaStellettaStelletta
  • 58424 messaggi
  • Sesso:Maschio
  • Provenienza:Bagnaia (Viterbo)
  • Abilità:Apprendista


#13 Inviato 06 December 2011 - 00:48 AM

Dà lo stesso errore anche a me su un nuovo progetto, ma non saprei... Holy sicuro che lo script funzioni anche da solo senza il resto del Melody? Vedo un sacco di robaccia non standard che si riferisce ad altro! D: XD
^ ^

(\_/)
(^ ^) <----coniglietto rosso, me!     
(> <)

 
Il mio Tumblr dove seguire i miei progetti, i progetti della Reverie : : Project ^ ^
 
KdUDtQt.png disponibile su Google Play, qui i dettagli! ^ ^
 
FwnGMI3.png completo! Giocabile online, qui i dettagli! ^ ^  
 
REVERIE : : RENDEZVOUS (In allenamento per apprendere le buone arti prima di cominciarlo per bene ^ ^) Trovate i dettagli qui insieme alla mia intervista (non utilizzerò più rpgmaker) ^ ^

Spoiler


    Holy87
  • Prode Guerriero

  • Rpg²S Staff
  • Rens: 458
  • 6
  • StellettaStellettaStellettaStellettaStellettaStelletta
  • 7431 messaggi
  • Sesso:Maschio
  • Provenienza:San Giorgio a Cremano
  • Abilità:Maestro

#14 Inviato 06 December 2011 - 00:55 AM

Prova ad aggiungere questo script dopo quello degli oggetti:
class Window_Command_Centered < Window_Command
  
  #--------------------------------------------------------------------------
  # new method: draw_item
  #--------------------------------------------------------------------------
  def draw_item(index, enabled = true)
	rect = item_rect(index)
	rect.x += 4
	rect.width -= 8
	self.contents.clear_rect(rect)
	self.contents.font.color = normal_color
	self.contents.font.color.alpha = enabled ? 255 : 128
	self.contents.draw_text(rect, @commands[index],1)
  end
  
end # Window_Command_Centered
Non dovrebbe darti più errore, anche se è strano... Nei requisiti non c'è scritto, e io questo script non ce l'ho

EDIT: Capito perchè, questa funzionalità è integrata in un altro script di Yanfly, ma non qua.

Modificato da Holy87, 06 December 2011 - 00:57 AM.

"Io non volevo solo partecipare alle discussioni. Volevo avere il potere di farle fallire" [cit.]

BannerOverdrive35.png
Cap3.png

578.png
 

Miei script per RPG Maker VX Ace:

Spoiler

 
I miei tutorial:
Spoiler

    Lypsak
  • Nuovo Arrivato

  • Utenti
  • Rens: 0
  • 0
  • Stelletta
  • 31 messaggi
  • Sesso:Femmina
  • Provenienza:Arezzo
  • Abilità:Iniziato

#15 Inviato 07 December 2011 - 09:23 AM

Allora, stiamo andando sempre meglio ma c'è sempre qualcosa che non va...
Adesso non dà nessun tipo di errore, shift ti permette di spostarti correttamente dalla lista oggetti a quella dei tipi di oggetti e X ti fa fare il percorso inversoi, ma di fatto gli oggetti non vengono divisi, me li dà sempre tutti insieme. :(
In realtà non ho neanche ben capito in che cosa è diverso dall'altro script, mi sembra che graficamente funzioni più o meno nello stesso modo, o sbaglio?

    Holy87
  • Prode Guerriero

  • Rpg²S Staff
  • Rens: 458
  • 6
  • StellettaStellettaStellettaStellettaStellettaStelletta
  • 7431 messaggi
  • Sesso:Maschio
  • Provenienza:San Giorgio a Cremano
  • Abilità:Maestro

#16 Inviato 07 December 2011 - 09:49 AM

Allora, stiamo andando sempre meglio ma c'è sempre qualcosa che non va...
Adesso non dà nessun tipo di errore, shift ti permette di spostarti correttamente dalla lista oggetti a quella dei tipi di oggetti e X ti fa fare il percorso inversoi, ma di fatto gli oggetti non vengono divisi, me li dà sempre tutti insieme. :(
In realtà non ho neanche ben capito in che cosa è diverso dall'altro script, mi sembra che graficamente funzioni più o meno nello stesso modo, o sbaglio?

Scusa, ma... Che script hai messo? Hai almeno tolto prima quello vecchio? Perchè questo non cambia oggetti premendo Shift...

"Io non volevo solo partecipare alle discussioni. Volevo avere il potere di farle fallire" [cit.]

BannerOverdrive35.png
Cap3.png

578.png
 

Miei script per RPG Maker VX Ace:

Spoiler

 
I miei tutorial:
Spoiler

    Lypsak
  • Nuovo Arrivato

  • Utenti
  • Rens: 0
  • 0
  • Stelletta
  • 31 messaggi
  • Sesso:Femmina
  • Provenienza:Arezzo
  • Abilità:Iniziato

#17 Inviato 07 December 2011 - 10:12 AM

Ahhhhhhhhhhhhh, vedi che succede quando uno tiene svariate copie vecchie del gioco su cui provare gli script e poi la mattina alle 8 ne aggiorna una a caso...? Che vergogna... :sisi:
Adesso funziona tutto a meraviglia, ed è davvero uno script molto carino, avevi ragione!
Lo userò con moltissimo piacere... :)
Grazie a entrambi per tutto l'aiuto, siete splendidi! :rovatfl:

    Holy87
  • Prode Guerriero

  • Rpg²S Staff
  • Rens: 458
  • 6
  • StellettaStellettaStellettaStellettaStellettaStelletta
  • 7431 messaggi
  • Sesso:Maschio
  • Provenienza:San Giorgio a Cremano
  • Abilità:Maestro

#18 Inviato 07 December 2011 - 10:17 AM

Perfetto, non c'è di che ;)

"Io non volevo solo partecipare alle discussioni. Volevo avere il potere di farle fallire" [cit.]

BannerOverdrive35.png
Cap3.png

578.png
 

Miei script per RPG Maker VX Ace:

Spoiler

 
I miei tutorial:
Spoiler




  • Feed RSS