Resource icon

Modified TileData.cs to extract AnimID/GumpID from ItemID 2017-05-15

No permission to download
A modified TileData.cs which extracts also AnimID from TileData.mul.

I've seen quite a few people asking for a way to find a paperdoll gump for an item - with this TileData.cs you can use the added function TileData.GumpFromID(int itemID, bool female = false) to get the GumpID of an item passing just the item's ItemID, e.g. for custom character creation gumps.

Installation:
- Create a backup of TileData.cs in /Server/ (e.g. C:/ServUO/Server/TileData.cs)
- Override original TileData.cs with this one

Usage:
To get a GumpID of an item use TileData.GumpFromID(). Pass the item's ItemID and whether the gump should be the female version or male, e.g. TileData.GumpFromID(0x1fa1, player.Female) will return GumpID for a Tunic, male or female depending on the gender of the previously defined 'player'.

Known issues:
- Items which are female-only by default (e.g. female leather shorts) have a male GumpID offset (GumpID = 50000 + AnimID instead of 60000 + AnimID). To get the proper GumpID for those you have to pass the 'female' parametre as 'false' even though a character is female.
Author
timginter
Downloads
54
Views
1,326
First release
Last update
Rating
0.00 star(s) 0 ratings

Latest Updates

  1. fwiffo fixed item creation at each callback

    Updated with fwiffo's code to avoid item creation at each callback. Thanks!
Back