Thanks a thousand times for digging out this info although it's really bad news ;-)

Originally Posted by Raze

The responses:

- all new item instances will create a new handle. Even it the new item is added to an existing stack, it will have created a new one temporarily

This hits crafting really hard.
(Even splitting stacks is 'bad' if I understand correctly. If I'm wrong though it would mean that I could actually access two or more items by one _ItemHandle in Osiris ;-)

Would still be interesting if creating more than one item at a time uses only one handle, because if it did, using the 'Recipes' page of the crafting window could help some, since it allows for complete stacks to be created in a single step. The 'Experiment' page does not support this.
So an open question would still be if creating a stack in crafting is a 'single item instance'.

Looks like every 'extended crafting' mod is really poison in the whole 'new instance' context ... and I have to rethink a lot of my item conversion recipes ;-)

Originally Posted by Raze

- both cases in treasure use up handles in the same way. -1 is guaranteed to give you what you ask, while 1,1 may fail to find level-appropriate items and you won't get anything

I found this out in my recent tests but good to get confirmation hehe

Originally Posted by Raze

- if by incomplete objects, they mean scenery, yes those use handles as well, but they come from a different pool. Sceneries are objects which are purely decoration though. So as soon as you can to interact with it, or reason about in scripting, it will be an item. Globals can never be scenery, as scripting can reason about them.

So at least we do not start out with a horribly high number of used handles right at the beginning.
I might change some of my pre-placed stuff to 'Scenery' in the editor because it's pure decoration.
(And thanks, this also explains what the 'IsScenery' checkbox means.)

Originally Posted by Raze

- characters, items, scenery, triggers all get their handles from different pools. Handles never change for existing instances, but each time you spawn (by script/skills/...) a new instance, a new handle will be created.

That means we do not need to care about anything besides items because it would take far more of all the other stuff to create problems, far more.

Yesterday I found out that treasure is most likely NOT pre-generated on zoning or levelup but still on demand, only the algorithm for creation changed.
Some info about treasure generation

This makes me more confused than ever how the crash on zoning could happen, because if generation is no pre-generation, what could have caused the crashes ? Did we trade more than before ? That much more ?
(I had the crashes twice when I was already in Hunter's Edge, still very far from 500 hours. Others had them too when it had rarely happened in classic. All I had changed for my first successful playthrough was increase root template stack sizes and add recipes for item destruction/conversion. Seriously confused ... even more so since I think some people with zoning crashes could still continue playing but were locked out of the zones that caused crashes.)


I guess there is no chance we ever get a code fix which uses a 32bit int instead of a 16 bit small for handle counters in 'old EE'.
(Just mentioning because D:OS2 does not look very appetizing now that a lot of focus must be on 'the PvP thing', e.g. restricting amount of usable skills with 'Memory' is only explainable with making the upcoming 'PvP balancing hell' a little bit more bearable for Larian IMO ;-)