The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SA Enhanced Client facetx.uop
Author Message
karma
Moderator
****

Posts: 178
Likes Given: 17
Likes Received: 32 in 29 posts
Joined: Jul 2012
Reputation: 3



Post: #1
SA Enhanced Client facetx.uop
Hi all guys, nearly 3 years ago, when i closed my (sphere) shard, which i loved, i quitted UO's world but now, with the Stygian Abyss Enhanced Client and some interesting screenshots of custom maps, i got quite excited and in the last days i did some experiments with this new client.
The main problem i'm having right now (which i think it's also the bigger) is using a custom map, i can't convert my ML one in another compatible with the EC. I'm writing here to ask for some help, maybe someone had some experience with this, but first i'll show you my findings.

I'm not a programmer so skilled to develop by myself the tools i need, so i searched through the internet and i find the following things:

- Kons developed a tool to convert pre-KR maps (mul) in SA ones (uop), but he didn't release it (maybe he will do it, but not soon)
Kons-Link: http://code.google.com/p/kprojects/wiki/Mul2Uop

- Radstar developed another tool, i think prior to kons' one, but converts pre-KR maps in KR maps.
Radstar-Link: http://ultima.manawydan.cz/download_uokr.php
When i saw that he released it this i said "oooooooh, great!", but at the time i didn't know that file format changed from KR to SA, even if the extension (uop) is the same, so i can't use it as it is..
Moreover, when i tried to convert my map or the SA Classic Client standard map, the app crashed.
However, Radstar released also the source code, so i MAY make it work, seeing where it crashes and solving the problem (i'm very doubtful about that, i'm not a C# programmer and i don't know the UO file structure).

Since i discovered that Mythic Package Editor can open both KR and SA uops, unpack and repack them, i thought that i can convert my custom ML map from mul to KR-uop with the fixed Radstar tool (if i ever get it work), then unpack it with MPE and repack in a SA-UOP.
To see if that's possible, i tried to unpack the standard KR map and repack it, so i tried the new, repacked facet0.uop with the SA Enhanced Client in a fresh sphere server (running with Classic Client files), but it didn't work, the character is in a black space and he can't move. However, i must say that i'm not very practical with MPE, maybe i did wrong.
Now i've run out of ideas, the only thing i can do is to wait Kons to release his Mul2Uop.

So, there's my experience. There's someone luckier than me, or just smarter or whatever, who succeeded in converting his custom map in EC format?
(This post was last modified: 11-29-2013 06:36 PM by karma.)
11-29-2013 06:00 AM
Find all posts by this user Like Post Quote this message in a reply
[+] 1 user Likes karma's post
karma
Moderator
****

Posts: 178
Likes Given: 17
Likes Received: 32 in 29 posts
Joined: Jul 2012
Reputation: 3



Post: #2
RE: SA Enhanced Client facetx.uop
News: i just recompiled Radstar's tool and it works, without any fix. I hope i can pack the data in a SA EC map, i'll keep you informed. Anyway, any help is much appreciated.



EDIT:
Ok, i goofed: in the shift from KR to SA, EA has changed not (or not only) the uop format itself, but the format of the files INSIDE (dat to bin, plus internal structure i guess) it, so uop is merely a container which has not great importance for our purposes. Mythic Package Editor can pack/unpack uop files, but it cannot convert its content from a type to another.

Right now, alternatives are: wait for Kons' tool or modify Radstar's one. Again, any suggestions?
(This post was last modified: 11-30-2013 09:02 PM by karma.)
11-29-2013 07:29 AM
Find all posts by this user Like Post Quote this message in a reply
karma
Moderator
****

Posts: 178
Likes Given: 17
Likes Received: 32 in 29 posts
Joined: Jul 2012
Reputation: 3



Post: #3
RE: SA Enhanced Client facetx.uop
New problem: Mythic Package Editor (v 1.03) does not recognize 1 file when unpacking facets (even if it doesn't say "x unknown hashes" in the dictionary, which is strange because it means the dictionary contains this hash and its translation in text). This problem means also that i can't repack the uop (including in it that file, wich i guess is needed Big Grin).
I wanted to know if this file contains info for a map block, like all the others in the uop, or other data, so i did this calculation:
- Learning from Kons (http://code.google.com/p/kprojects/wiki/Sector), each 64x64 tiles block is stored in a single file.
- Map/Facet 0 dimension is 7168 x 4096 (x,y)
- MPE says that inside facet0.uop there are 7169 files.

Now, if 7168*4096 = 29360128 tiles in the map and 64*64 = 4096 tiles per block (or, per file), so 29360128/4096 = 7168 blocks for map0, which is also the number of files that describe blocks in the uop.
If MPE tells me there are 7169 files in facet0.uop and i find that there are 7168 files for the map blocks, it means that there's 1 extra file, which does not contain info for a map block.
To get an idea of what it can contain, i looked up in the Radstar's map converter code (yes i know, file formats are different from KR to SA, but this part may have remained at least similar, i hope) and found that, in addition to map block files, there is another file that contains Height and Width of the map.
Code:
private static void WriteMapResolution( TileMatrix tileMatrix, string path, byte mapIndex )
        {
            FileStream mapBlock = new FileStream( path + "\\" + "facet" + mapIndex.ToString() + "-00_00.raw", FileMode.Create );
            BinaryWriter writer = new BinaryWriter( mapBlock );
            writer.Write( tileMatrix.Height );
            writer.Write( tileMatrix.Width );
            writer.Close();
        }
This is the first file written during the conversion process. TileMatrix comes from UltimaSDK (ultima.dll); in this function, tileMatrix.Height and tileMatrix.Width returns Height and Width of the map as integers (int) i think.

The only way to let MPE know the name of the unknown file is to guess it, so it hashes the name and checks if hashes coincide, if yes, we have found the file name. This because we can't crack the hash. I tried to guess its name (which i think must contain its path, which can be "build/sectors/facet0/") but i didn't succeed.


Does anyone know this file name or managed to convert the map? Valios, some other forum member, sphere devs like Khaos?
(This post was last modified: 11-30-2013 10:09 PM by karma.)
11-30-2013 09:45 PM
Find all posts by this user Like Post Quote this message in a reply
XuN
Sphere Developer
*****

Posts: 852
Likes Given: 102
Likes Received: 156 in 119 posts
Joined: Jul 2013
Reputation: 30



Post: #4
RE: SA Enhanced Client facetx.uop
I have no idea on how to handle with new files, but you are doing so nice findings so great job! I hope you find the way (or someone helps you out) Smile.
12-01-2013 12:35 AM
Find all posts by this user Like Post Quote this message in a reply
Feeh
Sphere Developer
*****

Posts: 156
Likes Given: 6
Likes Received: 40 in 29 posts
Joined: Sep 2012
Reputation: 4



Post: #5
RE: SA Enhanced Client facetx.uop
(11-29-2013 06:00 AM)karma Wrote:  So, there's my experience. There's someone luckier than me, or just smarter or whatever, who succeeded in converting his custom map in EC format?

Look at download sections, I've uploaded a UOFiddler plugin to convert UOP to MUL and back
or here
http://www.runuo.com/community/resources...lugin.125/

Feeh/Epila - Nightly releases / SphereWiki / Github Issues / Sphere's GitHub
12-01-2013 01:29 AM
Find all posts by this user Like Post Quote this message in a reply
[+] 2 users Like Feeh's post
karma
Moderator
****

Posts: 178
Likes Given: 17
Likes Received: 32 in 29 posts
Joined: Jul 2012
Reputation: 3



Post: #6
RE: SA Enhanced Client facetx.uop
Thanks XuN and Feeh!

It seems that the plugin you linked converts the Classic Client uops (like map0LegacyMUL.uop) into muls and back, unfortunately CC and EC uop packs different types of files inside, so it isn't useful for the EC.

Looking the directory of the CC (all patches done) there are some things i don't understand:
1) First, i have MapXLegacyMUL.uop AND facet0X.mul, staticsX.mul, staidxX.mul, stadifX.mul (same situation with anim files). Why? What's the usefulness of having both filetypes?
2) Does MapXLegacyMUL.uop contain also statics, like facetX.uop does in the EC?
3) What is the difference between client and client_tc? I have both of them.
4) What is UO-MCE, inside the GDF directory? It launches UO.exe with -mce argument.
5) There are now some new map files that has same file sizes, like map0LegacyMUL.uop and map0XLegacyMUL.uop (but there aren't facet00.mul and facet00X.mul). "Duplicated" maps appear also in EC's directory. What are they for? I calculated MD5 hashes of both map0 and map0x and they are different, so between these two maps there should be some differences (or, if the maps are identical and map0blah.uop files packs also statics, the differences may lie in the statics).


Now, the findings part.
I unpacked KR and SA EC facet0.uop and took the unknown file from both sources. Yes, Mythic Package Editor doesn't know the name of only one file in the KR uop. This file has the SAME size of the SA unknown file (8 bytes).
Another observation: MPE extract files from KR uop with the .bin extension, the same of SA EC uop contents, but Radstar map conversion tool creates .raw files and i also remember to have read that the file extension used was .dat, so lol, which one is the correct format? Maybe Radstar's one, because its tool was claimed to work.
So, i checked with the hex editor both the unknown files, see what i found:
[Image: Senzanome.png]
facet0.uop_0_00 is from KR (file in the block 0 of the uop, "number" 00, so it's the first in the list, or the first in the packaging order maybe, just an assumption)
facet0.uop_4_488 is from SA EC (file in block 4, number 488 of 1000 per block)

The file content is IDENTICAL.
I don't know much of hex editing, bits, bytes and so on, but i tried these conversions:
0x1c00 (hex) to decimal: 7168 (X of map0)
0x1000 (hex) to decimal: 4096 (Y of map0)

So, this unknown file contains informations about the current map resolution. And this file format remained unchanged from KR to SA, so this piece of Radstar's code is still good.
To develop a tool to convert pre-KR maps to SA EC ones we have to know map block files format (which we have, see the above link http://code.google.com/p/kprojects/wiki/Sector) and the name of this unknown file.
Radstar's map converter names that file "facet0-00_00.raw", so we should start from this to guess the SA file name.
Another observation is that KR converted raw files are all put in the same directory, no subdirs, while extracting with MPE SA facet0.uop the bin files are extracted in the build/sectors/facet0/ directory (except the unknown file, which is extracted in the root of the output directory, i think because the filename contains also the file path and we don't have it).
Moreover, i don't get another thing, maybe it's a bug: MPE says that in the block_7 (which is the eighth, because numeration starts from zero) there are 1000 files (like the other blocks), but actually there are 169 files. Unpacking and repacking facet0.uop (without the unknown file, because as i said before we must know its name to pack it), MPE reports the right file number in block_7, which is 168 (169-1, the unknown file).


Is there any C# programmer who can help me in upgrading Radstar's tool or someone who wants to help guessing the unknown file's name? Big Grin


EDIT: ah, i forgot this. Did anyone succeed in logging in using KR client? I tried UOKRLoader (with all encryption combinations), UOSALoader and Cheese but after selecting the shard the client waits until it returns to the login screen. Sphere console says i got disconnected as i double-clicked the shard to log in (or clicked the forward button).
I tried Sphere 0.56c and my old 0.56b (i tried also updating its old spherecrypt), which i remember worked like 3 or 4 years ago, so dunno.
(This post was last modified: 12-01-2013 05:38 AM by karma.)
12-01-2013 03:57 AM
Find all posts by this user Like Post Quote this message in a reply
karma
Moderator
****

Posts: 178
Likes Given: 17
Likes Received: 32 in 29 posts
Joined: Jul 2012
Reputation: 3



Post: #7
RE: SA Enhanced Client facetx.uop
Nice discovery for you all! I was trying to guess the name of the unknown file (failing), when i thought "what would happen if i pack the facet uop without that file"?
Simply, it appears to work. Right now, no crashes, cities, dungeons, monsters are showed correctly.

Maybe that file is not really necessary, maybe it is needed when overwriting standard map resolution (which in case of missing files, like in our repacked facet0.uop, or exeptions client uses as default), but i would be equally happy if i get a standard-sized map work Big Grin

Finding that file name now appears to be secundary, i think we can start develop the map converter, which is the most important thing to do right now.
So now i need someone to help me modify Radstar's program, C# programmers come to me!
(This post was last modified: 12-01-2013 08:51 PM by karma.)
12-01-2013 08:16 AM
Find all posts by this user Like Post Quote this message in a reply
[+] 1 user Likes karma's post
karma
Moderator
****

Posts: 178
Likes Given: 17
Likes Received: 32 in 29 posts
Joined: Jul 2012
Reputation: 3



Post: #8
RE: SA Enhanced Client facetx.uop
I'm modifying Radstar's map converter, i achieved some results but i'm far to obtain a perfect map conversion. Is there someone that would offer some help?
12-06-2013 02:42 AM
Find all posts by this user Like Post Quote this message in a reply
karma
Moderator
****

Posts: 178
Likes Given: 17
Likes Received: 32 in 29 posts
Joined: Jul 2012
Reputation: 3



Post: #9
RE: SA Enhanced Client facetx.uop
Hi all guys, i succeeded in writing the converter, some screens of the result:

[Image: image.png]
[Image: image.png]

However, the program has still a raw interface, it doesn't allow to choose files and directories and so on. Moreover, i won't be releasing it UNTIL i have finished developing my shard, so when i put up my server i'll share the final version (after a couple of months i think, because i have to study for the exams Tongue ). I wish to have a time advantage on other servers which may grow up after the release, that's why i'm not releasing it now.
Maybe i'll encounter some problems or errors during next stages of map building, so in this time i might improve the program.

Next project on my schedule (help is always much appreciated) is a converter for hues.mul.
So Sphere Devs, keep on improving the emulator and providing support for SA EC, as many servers may rise or switch client Big Grin
As always, many thanks for your work!
12-11-2013 11:15 PM
Find all posts by this user Like Post Quote this message in a reply
[+] 2 users Like karma's post
XuN
Sphere Developer
*****

Posts: 852
Likes Given: 102
Likes Received: 156 in 119 posts
Joined: Jul 2013
Reputation: 30



Post: #10
RE: SA Enhanced Client facetx.uop
Nice, congrats Smile, it's up to you release it or don't... but some many people will thank you if you decide so. Good luck in your exams Smile
12-12-2013 12:50 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)