[ACE] Making Window_Help able to access various data?

Arsist

Veteran
Veteran
Joined
May 16, 2014
Messages
140
Reaction score
10
Primarily Uses
I'm using a custom description script and a custom message codes script (of which I like where it lets you place strings like \#{10*$game_actors[1].hp} and I absolutely cannot access anything.

What I'm especially trying to access is whether the current object is an item/weapon/armor, and the objects numeric id from the database.

For example, I was trying to make descriptions for objects of an array if they haven't been "indentified" yet (via http://www.rpgmakervxace.net/topic/12352-identify-item/ ).

This was my modification to set_item in Window_Help.

def set_item(item) value = "" #If the object is an item if is_item? if !$game_party.identified_items[:item][id] [1,2,3].each {|data| if id == data then value = "Unknown vial." end} end end set_text((!item or value != "") ? value : item.description)I try viewing an unidentified standard potion I just get an undefined error for is_item? (item.is_item also returns this error).

But that's just an example.

From what I understand, using things like attr accessories, super, aliases, or that < function will allow for one class to have access to another, but I am unsure how to do it.

I think in this case I'm trying to access Game_BaseItem but I'm unsure.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,614
Reaction score
13,207
First Language
English
Primarily Uses
RMMV
item.is_item? should work.


is_item? is incorrect, and item.is_item is incorrect.
 

Peridot Gaming

Veteran
Veteran
Joined
Nov 25, 2012
Messages
125
Reaction score
16
First Language
English
Primarily Uses
I've used

item.is_a?(RPG::Item)in the past to check if the item is in fact an Item.
 

Arsist

Veteran
Veteran
Joined
May 16, 2014
Messages
140
Reaction score
10
Primarily Uses
But then how do I check for its numeric id?
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

In other news, my new computer is now ordered, and I'll have it in my hot little hands by the end of the week! CAN'T WAIT!!!
I've said my cat's name in such a baby-talk manner over the years, Biggs is now Biggoro, Bella is now Bellllyyaah, and somehow.....somehow Tessa is Sessashan
Did a massive ****up in my code that would have caused the game to crash on most computers and almost released an update without noticing it.
I keep thinking today is Thursday.
And I look forward to the next preview thread coming this afternoon.
And then I realise it's not Thursday at all.
And then I get sad :(

Forum statistics

Threads
100,449
Messages
976,075
Members
132,082
Latest member
nwr
Top