Replace your Window_Item with the following script -
*forget it*
omg I love you, almost all of my characters names are changed when you meet them (cept one cuz he looks cool so I'm giving him a cool name)
Yes, I'm already using this code, thanks.
Minor error realized, don't use this version. Will update with version 2 VERY soon.
EDIT : Forget it, the dang thing doesn't want to work. It keeps doing weird stuff, it won't even let me use the $game_actors class. I tried many different ways, but none worked, it always errored at the Game_Actors class.
The following is written off the top of my head, I did something similar to it but it didn't work. BTW: I tried the gsub method, but I kept getting errors.
text = item.name
temp = text.split(/ /)
for i in 0..(temp.size)
if temp[i].include?('[') and temp[i].include?(']')
temp[i].delete!('[')
temp[i].delete!(']')
values = 0
for j in 'a'...'z'
if !temp[i].include?(j)
values += 1
end
end
if values == 26
temp[i] = $game_actors[temp[i].to_i - 1].name
end
end
end
text = ''
for j in 0..(temp.size)
text = text + ' ' + temp[j]
end
I seriously need help, it keeps telling me there's no method " name". It doesn't matter what class I use, $data_actors or $game_actors. I even defined a name method, and it gives me the same crap.
#--------------------------------------------------------------------------
# * 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
if item.is_a?(RPG::Item) and
$game_party.item_can_use?(item.id)
self.contents.font.color = normal_color
else
self.contents.font.color = disabled_color
end
text = item.name
text.gsub!(/\[([0-9]+)\]/) { $data_actors[$1.to_i - 1].name }
x = 4 + index % 2 * (288 + 32)
y = index / 2 * 32
rect = Rect.new(x, y, self.width / @column_max - 32, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
bitmap = RPG::Cache.icon(item.icon_name)
opacity = self.contents.font.color == normal_color ? 255 : 128
self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
self.contents.draw_text(x + 28, y, 212, 32, text, 0)
self.contents.draw_text(x + 240, y, 16, 32, ":", 1)
self.contents.draw_text(x + 256, y, 24, 32, number.to_s, 2)
end
it sounded interesting....maybe bliz can help?
~Winged
we need :fred: (blizzard)
:P
*copies the code* I can´t right now, but I´ll tell you tomorrow if I succeeded with something.
ty ;D
Okay, since I know Tsuno will add me into the credits of this script no matter what even if I only changed one line, I also added the same support for item/weapon/armor descriptions. Just use \n[X] where X is the ID of the character in the database. You can use it in Item names AND descriptions.
#==============================================================================
# Window_Item
#==============================================================================
class Window_Item < Window_Selectable
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
if item.is_a?(RPG::Item) and
$game_party.item_can_use?(item.id)
self.contents.font.color = normal_color
else
self.contents.font.color = disabled_color
end
text = item.name
text.gsub!(/\\[Nn]\[([0-9]+)\]/) do
$game_actors[$1.to_i] != nil ? $game_actors[$1.to_i].name : ""
end
x = 4 + index % 2 * (288 + 32)
y = index / 2 * 32
rect = Rect.new(x, y, self.width / @column_max - 32, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
bitmap = RPG::Cache.icon(item.icon_name)
opacity = self.contents.font.color == normal_color ? 255 : 128
self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
self.contents.draw_text(x + 28, y, 212, 32, text, 0)
self.contents.draw_text(x + 240, y, 16, 32, ":", 1)
self.contents.draw_text(x + 256, y, 24, 32, number.to_s, 2)
end
end
#==============================================================================
# Window_Help
#==============================================================================
class Window_Help < Window_Base
alias set_text_playername_later set_text
def set_text(text)
text.gsub!(/\\[Nn]\[([0-9]+)\]/) do
$game_actors[$1.to_i] != nil ? $game_actors[$1.to_i].name : ""
end
set_text_playername_later(text)
end
end
description works, doesn't work for the name tho
?_? It worked for me. Can somebody else test it?
good !thankyou!
Just wondering if you can some how make this a little bit better. I was wondering if you could make it so you could also show item and skill names by \i[X] and \s[X] commands.
That's for a message system while this is supposed to be used directly in names and description. I think Dubealex' AMS might support such commands like \i[X] and \s[X], but I can't tell for sure.
Well, if you could check for me, it would be most appreciated. I tried to edit the script myself, but to no avail.
Well, well, well...
It works on me with one 'condition' :
Need open the Item window first.
Then it's appear on the Equip screen...
Else...
It shows "\n[1]" on the Window_Help.