UO Unconvert

This is where you can post about tools related specifically to the POL Server itself

Moderator: POL Developer

Post Reply
blckfire
Apprentice Poster
Posts: 54
Joined: Thu Feb 26, 2015 10:28 am

UO Unconvert

Post by blckfire » Tue May 26, 2015 11:17 am

Is there any tool that can do this? Re-convert the .dat files into static files?

We want to rollback our map to previous point, but we are facing the problem of having lost the statics... Anyone has any ideas?

Turley
POL Developer
Posts: 645
Joined: Sun Feb 05, 2006 4:45 am

Re: UO Unconvert

Post by Turley » Tue May 26, 2015 11:42 am

You have two choices:
Write an converter based on the uoconvert sources with a language of your choice. Or you use escript functionalities: via getmapinfo and liststaticsatlocation you get all the needed information's and via openbinaryfile function you can write the corresponding mul files.
At least I do not know any existing tool which does the job for you.

blckfire
Apprentice Poster
Posts: 54
Joined: Thu Feb 26, 2015 10:28 am

Re: UO Unconvert

Post by blckfire » Tue May 26, 2015 12:02 pm

Turley wrote:Write an converter based on the uoconvert sources with a language of your choice.
This was what I was thinking. I even took a peak into uoconvert source code, but I think my knowledge of UO and C++ are kinda basic.
Turley wrote:Or you use escript functionalities: via getmapinfo and liststaticsatlocation you get all the needed information's and via openbinaryfile function you can write the corresponding mul files.
Could you be more specific? If you workout an example I'm sure I'll be able to write the thing. My main problem is that I don't know how I should compose the binary file to match the several static files. Although, in this matter I would rather write a program that could benefit others.

Turley
POL Developer
Posts: 645
Joined: Sun Feb 05, 2006 4:45 am

Re: UO Unconvert

Post by Turley » Tue May 26, 2015 9:25 pm

a classic lecture is also
http://uo.stratics.com/heptazane/fileformats.shtml#3.8
you can also check out the fiddler sources which are also available at github.

the easiest mul file is the map.mul. it just contains graphic and z value.
the file consists of (width/8 * height/8) blocks. each block has a unknown int as header and then the 64entries
thus to write the mul its just:

for (xblock<width/8; ++xblock)
for (yblock<height/8;++yblock)
mul.write((int)0)
for (xi<8) for (yi<8) // write the 64 entries
mul.write(graphic of xi/yi)
mul.write(z of xi/yi)

blckfire
Apprentice Poster
Posts: 54
Joined: Thu Feb 26, 2015 10:28 am

Re: UO Unconvert

Post by blckfire » Wed May 27, 2015 4:45 am

I won't promise I'll write this tool, but I'll look into it. :D

xeon
Forum Regular
Posts: 333
Joined: Fri Oct 31, 2008 3:18 am
Location: Italy
Contact:

Re: UO Unconvert

Post by xeon » Fri May 29, 2015 12:25 pm

Please refresh my memory, what UOconvert does? Manage static files?
Scripter Xeon | Zulu Hotel Italia 7th Age | www.zhi.it
Image

blckfire
Apprentice Poster
Posts: 54
Joined: Thu Feb 26, 2015 10:28 am

Re: UO Unconvert

Post by blckfire » Mon Jun 01, 2015 1:05 am

It transforms the statics into something POL can read, if I'm not mistaken...

Post Reply