- Joined
- Nov 25, 2014
- Messages
- 47
- Reaction score
- 9
- First Language
- English
- Primarily Uses
SOLVED:
Trough some further research I found this thread:
Since the latest forum update the code's been messed up so I repaired Zarby's lovely script for anyone interested:
For Modern Algebra's Item Icon List:
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
I'm using an instance item script for my procedurally generated dungeon crawler. If you don't know what an instance item script is; it basically makes different versions of the same item in the database so you can have varied stats for an item.
I noticed something that would be a great little addon to have whether you have instance items or items that dynamically change stats, where simply writing the stats in the description won't work. If you are playing the game and have many, let's say, scythes of the darkened elders, you might want to know which scythe of the darkened elders has the most attack before selling them so you can keep the best one. Or even if you only have one of an item, it's nice to know just how much DEF that armor gives you without having to do the math in the equip scene.
Concept: I'm imagining a simple script that lists the stats you choose — in the item description. I figured the game already has a way of knowing the item's stats since it uses them to describe the actor's stat changes in the shop and equip scene. So this idea is not far fetched, right? Regardless if it is, I don't doubt limitless scripters!
It surprised me I couldn't find any script that does this. But maybe any of you geniuses could put this together? I'd be very thankful and I think others will find use in this too. Or maybe there is a similar script that does this that I didn't find in my research?
Trough some further research I found this thread:
Since the latest forum update the code's been messed up so I repaired Zarby's lovely script for anyone interested:
Code:
#by Zarby
class Window_Help < Window_Base
def set_item(item)
set_text(item ? item.description : "")
if (item != nil)
sstring = item.description
sstring = sstring.gsub("[maxhp]", item.params[0].to_s) #Max HP
sstring = sstring.gsub("[maxmp]", item.params[1].to_s) #Max MP
sstring = sstring.gsub("[atk]", item.params[2].to_s) #Attack
sstring = sstring.gsub("[def]", item.params[3].to_s) #Defense
sstring = sstring.gsub("[matk]", item.params[4].to_s) #WOW MAGIC
sstring = sstring.gsub("[mdef]", item.params[5].to_s) #Magic Defense
sstring = sstring.gsub("[agi]", item.params[6].to_s) #Agility
sstring = sstring.gsub("[luk]", item.params[7].to_s) #You'll need it
set_text(item ? sstring : "")
end
end
end
For Modern Algebra's Item Icon List:
module Window_MAIIL_Help
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Set Item edited by Zarby
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def set_item(item, *args)
if item # if Item passed
text = MA_IconItemList::NAME_FORMAT.dup # Get Name Format
text.gsub!(/\\ICON/i, "\\i[#{item.icon_index}]") # Replace Icon
text.gsub!(/\\NAME/i, item.name) # Replace Name
sstring = item.description
if (!item.is_a?(RPG::Item))
sstring = sstring.gsub("[maxhp]", item.params[0].to_s) #Max HP
sstring = sstring.gsub("[maxmp]", item.params[1].to_s) #Max MP
sstring = sstring.gsub("[atk]", item.params[2].to_s) #Attack
sstring = sstring.gsub("[def]", item.params[3].to_s) #Defense
sstring = sstring.gsub("[matk]", item.params[4].to_s) #WOW MAGIC
sstring = sstring.gsub("[mdef]", item.params[5].to_s) #Magic Defense
sstring = sstring.gsub("[agi]", item.params[6].to_s) #Agility
sstring = sstring.gsub("[luk]", item.params[7].to_s) #You'll need it
end
text += sstring
if $imported[:"MA Customizable Item Menu 1.0.x"] && self.is_a?(Window_MACIM_Help) # if using Custom Item Menu
image = item.is_a?(MACIM_RPG_ItemWeaponArmor) ? item.macim_desc_image : ""
set_text(text, image) # Set Text (CIM)
else
set_text(text) # Set Text (NO CIM)
end
else # if nil Passed
set_text("") # Set Text when no item
end
end
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Set Item edited by Zarby
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def set_item(item, *args)
if item # if Item passed
text = MA_IconItemList::NAME_FORMAT.dup # Get Name Format
text.gsub!(/\\ICON/i, "\\i[#{item.icon_index}]") # Replace Icon
text.gsub!(/\\NAME/i, item.name) # Replace Name
sstring = item.description
if (!item.is_a?(RPG::Item))
sstring = sstring.gsub("[maxhp]", item.params[0].to_s) #Max HP
sstring = sstring.gsub("[maxmp]", item.params[1].to_s) #Max MP
sstring = sstring.gsub("[atk]", item.params[2].to_s) #Attack
sstring = sstring.gsub("[def]", item.params[3].to_s) #Defense
sstring = sstring.gsub("[matk]", item.params[4].to_s) #WOW MAGIC
sstring = sstring.gsub("[mdef]", item.params[5].to_s) #Magic Defense
sstring = sstring.gsub("[agi]", item.params[6].to_s) #Agility
sstring = sstring.gsub("[luk]", item.params[7].to_s) #You'll need it
end
text += sstring
if $imported[:"MA Customizable Item Menu 1.0.x"] && self.is_a?(Window_MACIM_Help) # if using Custom Item Menu
image = item.is_a?(MACIM_RPG_ItemWeaponArmor) ? item.macim_desc_image : ""
set_text(text, image) # Set Text (CIM)
else
set_text(text) # Set Text (NO CIM)
end
else # if nil Passed
set_text("") # Set Text when no item
end
end
end
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
I'm using an instance item script for my procedurally generated dungeon crawler. If you don't know what an instance item script is; it basically makes different versions of the same item in the database so you can have varied stats for an item.
I noticed something that would be a great little addon to have whether you have instance items or items that dynamically change stats, where simply writing the stats in the description won't work. If you are playing the game and have many, let's say, scythes of the darkened elders, you might want to know which scythe of the darkened elders has the most attack before selling them so you can keep the best one. Or even if you only have one of an item, it's nice to know just how much DEF that armor gives you without having to do the math in the equip scene.
Concept: I'm imagining a simple script that lists the stats you choose — in the item description. I figured the game already has a way of knowing the item's stats since it uses them to describe the actor's stat changes in the shop and equip scene. So this idea is not far fetched, right? Regardless if it is, I don't doubt limitless scripters!
It surprised me I couldn't find any script that does this. But maybe any of you geniuses could put this together? I'd be very thankful and I think others will find use in this too. Or maybe there is a similar script that does this that I didn't find in my research?
Last edited by a moderator:
