Thanks a lot for your answer Raze. I really appreciate it.
I understand clearly about the handles, but if we deleted all these "Trash Handles" and rebuild the handles (and replace for the new handles accordingly), it will be able to get new free handles again. (Of course, it will need to save and reload the game). From 66,070 ItemIDs, 52,761 ItemIDs are "Trash Items", so the savegame only use 13,309 ItemIDs (it could use less if we delete all the crafting and old items that i sold to the traders).


More detail Info:
----------------------------------------------------------------------
My savegame has handles (among global.lsx and the rest of maps/levels) for
ItemIDs.............................. from 134283268(08010004h) to 135356346(08115FBAh)
InventoryIDs/ContainerIDs.... from 335610042(140100BAh) to 335808468(140407D4h)
CharacterIDs/OwnerIDs......... from 67174400(04010000h) to 67175849(040105A9h)

So, they use ranges very different.

The total of ItemIDs without duplicates among Globals & Maps/Levels is 66,070 (I discover that the game reuse ItemsIDs between Maps/Level, of course, because you can only use the Globals file plus 1 Map/Level at one time).
For example: Global+Cyseal has 64,512 ItemIDs without any duplicate. (Cyseal+Homestead has 142 ItemIDs duplicates, Cyseal+LuculaForest has 109 ItemIDs duplicates)

If we delete the 52,761 "Trash items"and rebuild the ItemsID handles, we will get all this space for new ItemIDs. Of course, as i said, you have to:
1) Create a list of all ItemIDs
2) Delete the "trash items" and their ItemIDs.
3) Rebuild the handles (create a list of new ItemIDs with a reset counter and link it to the old ItemIDs).
4) Replace every old ItemIDs with the new ItemIDs in every file of the savegame.
5) Save and Reload the new savegame.

Maybe it's not necesary to do all this. Because, it's weird, but i discovered that the game try to reuse old ItemIDs, many new items (like 20%) have older ItemIDs. Maybe If i delete all the "Trash Items" and their ItemIDs will be enough (the problem is still that as long as these "Trash Items" use ItemIDs the game can't reuse them). Also I still don't figure out what is the criteria for reusing this old ItemIDs.

Also I need to figure out if i can use the Official Modding Tools for this or modify the MooseEdit tool for it or use another programming IDE. My problem is loading 250Mb XML files and create a temporaly DB of 64k ItemIDs.








Last edited by pedro_vf; 30/07/18 01:44 AM.