RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Using an Actors Name in and Item Script ~ Tested

0 Members and 1 Guest are viewing this topic.

*
Full Metal Mod - He will pillage your women!
Rep:
Level 93
The RGSS Dude
Replace your Window_Item with the following script -

*forget it*
« Last Edit: September 27, 2006, 03:27:54 AM by Tsunokiette »
"The wonderful thing about Tiggers
Is Tiggers are wonderful things
Their tops are made out of rubber
Their bottoms are made out of springs

They’re bouncy, trouncy, flouncy, pouncy
Fun, fun, fun, fun, fun!
But the most wonderful thing about Tiggers
Is I’m the only one, I’m the only one."

***
Rep:
Level 89
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)
Zypher, Veltonvelton, and Dalton are secretly having a homosexual affair in hidden messages just like this one
research shows Fu is also involved, but not in a gross and creepy way

***
~Banned~
Rep:
Level 88
~Banned~
Yes, I'm already using this code, thanks.
~Banned~

*
Full Metal Mod - He will pillage your women!
Rep:
Level 93
The RGSS Dude
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.

Code: [Select]
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
« Last Edit: September 27, 2006, 03:43:29 AM by Tsunokiette »
"The wonderful thing about Tiggers
Is Tiggers are wonderful things
Their tops are made out of rubber
Their bottoms are made out of springs

They’re bouncy, trouncy, flouncy, pouncy
Fun, fun, fun, fun, fun!
But the most wonderful thing about Tiggers
Is I’m the only one, I’m the only one."

*
Full Metal Mod - He will pillage your women!
Rep:
Level 93
The RGSS Dude
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.

Code: [Select]
  #--------------------------------------------------------------------------
  # * 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
"The wonderful thing about Tiggers
Is Tiggers are wonderful things
Their tops are made out of rubber
Their bottoms are made out of springs

They’re bouncy, trouncy, flouncy, pouncy
Fun, fun, fun, fun, fun!
But the most wonderful thing about Tiggers
Is I’m the only one, I’m the only one."

*****
<3
Rep:
Level 90
it sounded interesting....maybe bliz can help?

~Winged



***
Rep:
Level 89
we need  :fred: (blizzard)

 :P
Zypher, Veltonvelton, and Dalton are secretly having a homosexual affair in hidden messages just like this one
research shows Fu is also involved, but not in a gross and creepy way

********
EXA
Rep:
Level 92
Pikachu on a toilet
Project of the Month winner for April 2007
*copies the code* I can´t right now, but I´ll tell you tomorrow if I succeeded with something.
Get King of Booze for Android, for iOS, for OUYA or for Windows!
Visit our website.
You can also love/hate us on Facebook or the game itself.


Get DropBox, the best free file syncing service there is!

***
Rep:
Level 89
Zypher, Veltonvelton, and Dalton are secretly having a homosexual affair in hidden messages just like this one
research shows Fu is also involved, but not in a gross and creepy way

********
EXA
Rep:
Level 92
Pikachu on a toilet
Project of the Month winner for April 2007
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.

Code: [Select]
#==============================================================================
# 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

Get King of Booze for Android, for iOS, for OUYA or for Windows!
Visit our website.
You can also love/hate us on Facebook or the game itself.


Get DropBox, the best free file syncing service there is!

***
Rep:
Level 89
description works, doesn't work for the name tho
Zypher, Veltonvelton, and Dalton are secretly having a homosexual affair in hidden messages just like this one
research shows Fu is also involved, but not in a gross and creepy way

********
EXA
Rep:
Level 92
Pikachu on a toilet
Project of the Month winner for April 2007
?_? It worked for me. Can somebody else test it?
Get King of Booze for Android, for iOS, for OUYA or for Windows!
Visit our website.
You can also love/hate us on Facebook or the game itself.


Get DropBox, the best free file syncing service there is!

*
Rep: +0/-0Level 88
good !thankyou!

***
~Banned~
Rep:
Level 88
~Banned~
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.
~Banned~

********
EXA
Rep:
Level 92
Pikachu on a toilet
Project of the Month winner for April 2007
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.
Get King of Booze for Android, for iOS, for OUYA or for Windows!
Visit our website.
You can also love/hate us on Facebook or the game itself.


Get DropBox, the best free file syncing service there is!

***
~Banned~
Rep:
Level 88
~Banned~
Well, if you could check for me, it would be most appreciated. I tried to edit the script myself, but to no avail.
~Banned~

***
Rep:
Level 89
I am yourself!
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.
Symphony of Alderra : Memoirs of Life

Storyline : 200% (Overimaginatives)
Scripting : 100% (At last...)
Eventing  : 100%
Mapping   : 0.125%