BUG in Texidx.mul saving

This is where you can discuss UOFiddler, by Turley.

Moderator: POL Developer

Post Reply
nibbio
New User
Posts: 22
Joined: Mon Aug 24, 2009 3:15 am

BUG in Texidx.mul saving

Post by nibbio »

i've found another bug in texture section.

When you load textures, fiddler load correctly from 0x0 to 0x0fff.
But texidx contains more than 0x1000 indexes: when you save the new textures, uofiddler trim the others indexes ( maybe introducted with SA ).

I wasn't able to test where are the new textures.
nibbio
New User
Posts: 22
Joined: Mon Aug 24, 2009 3:15 am

Re: BUG in Texidx.mul saving

Post by nibbio »

update:

the new texture file contains 0x4000, and not 0x1000.
Also the texidx indexes 0x4000 textures.

I have just checked, with correcting all the indexes in the uoFiddler project and Ultima SDK related project, downloaded from svn.

Maybe the true bug is when you save the new texture file, you save also the empty slot in textures.mul, and apply the right offset to texidx's related indexes.
But the correct thing to do maybe is save only the not empty textures, and apply the right offset related to the new texture file.
In this mode, you can build right texture.mul without use much useless bytes, and reducing its size.
Turley
POL Developer
Posts: 670
Joined: Sun Feb 05, 2006 4:45 am

Re: BUG in Texidx.mul saving

Post by Turley »

Jep the fileindex of texmaps has a fixed value of 0x1000 entries, dont know why i never looked at the idx i just took the value from ultima sdk.
And i think you missunderstood the saving code, it does not save empty entries into the mul it only writes -1 into the idx.
nibbio
New User
Posts: 22
Joined: Mon Aug 24, 2009 3:15 am

Re: BUG in Texidx.mul saving

Post by nibbio »

The portion of code that make the index works right, but the bug is in another point:

when you load the texture file, fiddler represent the empty texture with pink square.
This is useful for understand and modify the texture file without use the right click menu, and insert etc etc....
But when you ask to fiddler to save the modified file, fiddler save also the pink square, as a normal texture.

You can check this with loading and saving the original file of ultima: it is about 26MB, but when you saving ( with 0x0fff limit ) that file become about 46mb.
When you remove a texture from mul, fiddler save and load correctly the modification.
The problem is when you load the original file of ultima online.

Maybe you can leave the pink texture ( they are very useful ) but maybe fiddler needs a control to consider pink texture as empty texture.

I hope that my explanation was clear, sorry for my english :)


EDIT:

i've tested also with mulpatcher.
The Ultima original textures shows empty slots correctly.
The file made with fiddler haven't any empty slot; instead of empty slot, mulpatcher shows pink square.
Turley
POL Developer
Posts: 670
Joined: Sun Feb 05, 2006 4:45 am

Re: BUG in Texidx.mul saving

Post by Turley »

nibbio wrote:fiddler save also the pink square, as a normal texture.
Damn ....
nibbio
New User
Posts: 22
Joined: Mon Aug 24, 2009 3:15 am

Re: BUG in Texidx.mul saving

Post by nibbio »

i've made another test with texidx.

Ultima seems to use the "0" for unused textures, instead of "-1".
The problem is: fiddler loads the first texture (the only true pink square that exist in the ultima original file, associated to "VOID" art, 0x01 ) whenever it founds the "0" index in texidx, and duplicates it for all "0" indexes.
Maybe is better use the same notation of original file, adding a control to "0" index, and using "0" for unused textures instead of "-1".
Turley
POL Developer
Posts: 670
Joined: Sun Feb 05, 2006 4:45 am

Re: BUG in Texidx.mul saving

Post by Turley »

fix is in svn, thanks for the report
Post Reply