Originally Posted by Raze
Originally Posted by FrauBlake
When I examined root templates after the patch that supposedly fixed the problem last year, I noticed that they had made a lot of stuff stackable that was not stackable before and increased stack sizes for other stuff.

One patch made a change to which items were global, which made the issue of running out of handles easier to hit with a lot of trading or crafting. A subsequent patch increased the limit to 64k, but it is still possible to reach that (a couple with playtimes on the order of 350 hours, and one person trying to make a mod to have traders regenerate their inventory each time a character talked to them).
One person ran into this problem in D:OS Classic, as well, though only after it was fixed in the EE, with a playtime about 550 hours.

Thanks for stepping in with some info and my big respect for helping us in your free time. (on a weekend, 5 in the morning in Belgium!)

I'd have a couple of questions on the subject ... for after your weekend ;-)
- do all placed objects in the world have a handle too ? (Like trees, bushes, any stuff that cannot be picked up. They could still be uniquely identified by their UUID without a handle and some scripts do that. If they used one, that would greatly reduce the pool of handles for all other processes.)
- does ItemHandleDelete() free a handle ?
- to which dump do items go that were removed with any of the ItemTemplateRemoveFrom... calls and are their handles freed ?
- can freed handles be re-used by the game or is it a simple 'count up without looking back' thing ? (like the sequences relational database systems often use to create PRIMARY KEYS) If they could be freed and reused, a trader who actually cleans up would help a lot, converting many items to a few ones that stack high with crafting would help as well.
- 'handles' in Osiris are no single item handles but handles to an object that can occupy one slot in any container (including a character inventory) and that's the reason why they have to be moved away with some ItemHandleMoveTo... call before they can be treated as single items ?
- do global items and local ones have two different pools of handles and if so, could the global pool even ever change when the game is running ?
- can the code be adjusted to use int for handles instead of unsigned small ? The limit would be a tiny bit harder to reach ... (okay, just kidding ;-)


Anyway, enjoy wour weekend hehe