I was able to compile and direct replace InventoryTXT all working fine.
Attempted to add new (4)columns and BOOM!! game loaded but everything displayed by inventory was scrambled.
Is it possible to expand InventoryTXT without rewriting a gazillion other functions?
Any Way to expand InventoryTXT?
Moderators: Nefarius, Havvoric
Any Way to expand InventoryTXT?
Assembly Reference | 1.13d Code Edits | UVLoD | BaseMod Plugin
Fiat paper money is the most elaborate and well devised form of slavery the world has ever seen..
Fiat paper money is the most elaborate and well devised form of slavery the world has ever seen..
Re: Any Way to expand InventoryTXT?
Inventory.txt is unique in that it is never used directly, the game looks up the appropriate record(s) and them memcpy's sections of them into a set of globals for later use.devurandom" wrote:I was able to compile and direct replace InventoryTXT all working fine.
Attempted to add new (4)columns and BOOM!! game loaded but everything displayed by inventory was scrambled.
A gazillion? no, but you need to replace every reference that uses it, else you cannot alter the structure (cause the record size will change). The better way is to create a separate memory table from the same txt file (read the same txt but pass only the new columns, and save this as a different tanble to inventory.txt)devurandom" wrote:Is it possible to expand InventoryTXT without rewriting a gazillion other functions?
Netiquette, Do you USE it?!?! | Nefarius' Fixed TXT Files | Terms Of Service
Blackened | Day of Death | D2GFEx
"What was yours is mine. Your land, your people, and now your life." - Lim-Dul, the Necromancer
Judgement is Final, Death is Eternal
Re: Any Way to expand InventoryTXT?
Very Interesting, thanks for sharing your wisdom!Necrolis" wrote: The better way is to create a separate memory table from the same txt file (read the same txt but pass only the new columns, and save this as a different tanble to inventory.txt)
Assembly Reference | 1.13d Code Edits | UVLoD | BaseMod Plugin
Fiat paper money is the most elaborate and well devised form of slavery the world has ever seen..
Fiat paper money is the most elaborate and well devised form of slavery the world has ever seen..
Re: Any Way to expand InventoryTXT?
You can lookup how D2 handles levels.bin & leveldefs.bin for an example of this. Just be aware that you will run into problems with files that already have 256 (or 255?) columns in vanilla. Monstats and Skills for example.
Re: Any Way to expand InventoryTXT?
Thanks for the tip, I'll see what I can do.
Assembly Reference | 1.13d Code Edits | UVLoD | BaseMod Plugin
Fiat paper money is the most elaborate and well devised form of slavery the world has ever seen..
Fiat paper money is the most elaborate and well devised form of slavery the world has ever seen..