12-26-2005, 01:00 PM
This is a locked, single-post thread from Creation Asylum. Archived here to prevent its loss.
No support is given.
No support is given.
To use icons with other extensions then .png, go to Window_Itemdetialvieuw
Around line 315 u wil find
Code:
bitmap = RPG::Cache.icon(item_icon + ".png")
Code:
item = $currenthighlighteditem
bitmap = RPG::Cache.icon(item.icon_name)
There ya go ^^
Me™
original post:
[quote name='jackatrades' post='19089' date='May 20 2005, 04:51 AM']Item Detail Script
version 1.1
v1.1:
+ Support for Weapon and Armor description.
v1.0
+ Support for Item description by pressing SHIFT in Item Menu.
Note: fonts/colors/theme seen above may not apply to yours.
What is it?
This script allows the user to view an item's detailed description by pressing Button A ([SHIFT]) while highlighting an item in the Item Menu. Along with the 7-line description, the window also displays the item's monetary value and effect (One Ally, All Allies, etc.). The description for each item can be added and modified by the game creator.
How does it work?
It works by sending the data of highlighted item in the Item Menu to a global variable, where it will be interpreted by the Window_ItemDetailView class to create a new window that has the item's icon graphic, name, amount owned, value, effect, and the detailed description. All of the elements said previously are obtained from the Database; however, the detailed description is obtained through the file "Data/Item_Detail.rxdata"
When the script obtains the highlighted item data, it will read the item's ID# (from the Database), and use it to find the right description lines in the .rxdata file. The system works as such:
[item_id] * 7 = Description Line 1
[item_id] * 7 + 1 = Description Line 2
...
[item_id] * 7 + 6 = Description Line 7
The 7 description lines are stored in respective variables, and used to write the text in the Item Detail window.
Please note that the 7th line of each item description will be written in a different color. In the demo's case, it's yellow. The purpose of the 7th line is to display the item's game effect. You may modify it to use the 7th line as another description line.
What's the purpose?
Small details may actually count to your game. Having this not only dissolves the problem of having one-line, 100-characters description limited by RPGXP in the Database, but the script also provides more room for detailed description of an item, as given by the game demo. You could talk about the item's origin, side effects, ingredients, etc. to fill up the 7-line descriptions.
Any known bugs?
1. The script is designed to handle items that has no detailed description by assigning blank descriptions to the needed variables. This way, it should not cause a game error.
2. The only "fatal" error is that the game will crash if the user tries to view a non-existant item's detail. This would only happen if there are no items in the Item Menu, however, because it is highlighting nothing.
How can I transfer the script into my own game?
Simple. Either copy and paste or merge everything you see in the Scene_Item class, and then create a new class called Window_ItemDetailView and put it below the Window_Item class. Paste the script from the demo game to your game.
Get it now and get three cookies free![/quote]