arvoreen

Member
Is there a reference as to what itemIDs are stackable? From my searching I've come up with that they are flagged as "generic" in tiledata, but I haven't been able to figure out how to determine even that. Just tinkering around with some stuff, and wanted to make a stackable thing, and was hoping there was an easy-ish way for me to look through the different graphic options available for a stackable item.
Thanks!
 
You'll need to modify your tiledata to make anything new stackable, as well as add the stackable property to the item code server-side.

If you look at any gems, the empty bottle graphic, arrows or bolts, and assign the exact same tiledata values to your new ItemID, then set the item as stackable code-wise - you'll be good to go.

PS - Use Fiddler.
 
From my searching I've come up with that they are flagged as "generic" in tiledata, but I haven't been able to figure out how to determine even that.

I think it's

Code:
ItemData.Flags.HasFlags()

But I've never used it.
 
Thanks Enroq! It wasn't precisely HasFlags, but you pointed me towards ItemData which I hadn't discovered yet. To test this out, I made a copy of a bottle item and gave it an OnDoubleClick() like so:
Code:
public override void OnDoubleClick(Mobile from)
{
	if (from is PlayerMobile)
        {
        	if((ItemData.Flags & TileFlag.Generic) != 0)
                	from.SendMessage("Flag is " + ItemData.Flags.ToString());
        }
}
When I added one in-game and double clicked it, it displayed the flags for the item. Changing the item ID of the bottle to an item I know isn't stackable and double clicking it resulted in nothing as expected.

Hope this helps others looking for stackable item IDs :)
 
You have to be careful with some things. You can really make anything stackable, but the problem is, not everything with pull apart properly. Think about how you take a pile of gold, and hold left click, you can select how much you want to grab. Not all items will do that, even if they are made stackable.
 
You have to be careful with some things. You can really make anything stackable, but the problem is, not everything with pull apart properly. Think about how you take a pile of gold, and hold left click, you can select how much you want to grab. Not all items will do that, even if they are made stackable.

Correct, however that's where the ItemData.Flags and TileData.Generic comes in.

If the item has that flag (this is based on the client, not server) in the tiledata, then it IS stackable, and can be pulled apart, etc.
That's why I was looking to figure out what itemIDs had that flag.
 
You have to be careful with some things. You can really make anything stackable, but the problem is, not everything with pull apart properly. Think about how you take a pile of gold, and hold left click, you can select how much you want to grab. Not all items will do that, even if they are made stackable.

Correct, however that's where the ItemData.Flags and TileData.Generic comes in.

If the item has that flag (this is based on the client, not server) in the tiledata, then it IS stackable, and can be pulled apart, etc.
That's why I was looking to figure out what itemIDs had that flag.
 

Active Shards

Donations

Total amount
$0.00
Goal
$1,000.00
Back