From The Mana World
Revision as of 17:02, 17 August 2006 by Crush (talk | contribs) (typo)

This proposal has been accepted

The development team has discussed the contents of this article and has decided that it should be implemented as described. But the implementation is not finished yet. You can help to bring the features described here into the game.

On IRC we had the idea to split up the item spriteset into single images to make changes and additions easier. The items.xml file will then map to the filenames of the item icons and no longer to the indexes on the spriteset.

As naming conventions i propose maincategory-subcategory-itemname(in one word).png. The subcategory is optional.

These are the main categories and the subcategories in them that i propose. I added only those that are necessary to categorize the items that are in the current item spriteset. Later additions might make new categories and subcategories necessary.

weapon

dagger
bow
arrow
sword
polearm
axe
thrown
wand

armor

legs
chest
feet
head
hands
shield

use (items that can be used)

potion
food

generic (generic items that can be sold)


Examples:

  • Sharp knife: weapon-dagger-sharpknive.png
  • Cactus drink: use-potion-cactusdrink.png
  • Scorpion stinger: generic-scorpionstinger.png


Sourcecode changes

The necessary changes at the sourcecode are marginal. The ItemInfo class will be created with a filename instead of an itemId and the getImage method will return a pointer to an image (optained from the resource manager when called) instead of an integer. This also simplifies the code of the calling procedures because they don't have to optain the image from the spriteset but can use the return value from ItemInfo::getImage() directly.