James

Member
I am unsure how to configure the data-path been a long time since I had to do it in the file and not on initial load with some of the other servers I been using.

here is my code

Code:
using System;
using System.IO;
using Microsoft.Win32;

namespace Server.Misc
{
    public class DataPath
    {
        /* If you have not installed Ultima Online,
        * or wish the server to use a separate set of datafiles,
        * change the 'CustomPath' value.
        * Example:
        *  private static string CustomPath = @"C:\Program Files\Ultima Online";
        */
        private static readonly string CustomPath = @"C:\Program Files (x86)\Electronic Arts\Ultima Online Worlds";
        /* The following is a list of files which a required for proper execution:
        *
        * Multi.idx
        * Multi.mul
        * VerData.mul
        * TileData.mul
        * Map*.mul or Map*LegacyMUL.uop
        * StaIdx*.mul
        * Statics*.mul
        * MapDif*.mul
        * MapDifL*.mul
        * StaDif*.mul
        * StaDifL*.mul
        * StaDifI*.mul
        */
        public static void Configure()
        {
            string pathUO = GetPath(@"Origin Worlds Online\Ultima Online\1.0", "ExePath");
            string pathTD = GetPath(@"Origin Worlds Online\Ultima Online Third Dawn\1.0", "ExePath"); //These refer to 2D & 3D, not the Third Dawn expansion
            string pathKR = GetPath(@"Origin Worlds Online\Ultima Online\KR Legacy Beta", "ExePath"); //After KR, This is the new registry key for the 2D client
            string pathSA = GetPath(@"Electronic Arts\EA Games\Ultima Online Stygian Abyss Classic", "InstallDir");
            string pathHS = GetPath(@"Electronic Arts\EA Games\Ultima Online Classic", "InstallDir");

            if (CustomPath != null)
                Core.DataDirectories.Add(CustomPath);

            if (pathUO != null)
                Core.DataDirectories.Add(pathUO);

            if (pathTD != null)
                Core.DataDirectories.Add(pathTD);

            if (pathKR != null)
                Core.DataDirectories.Add(pathKR);

            if (pathSA != null)
                Core.DataDirectories.Add(pathSA);

            if (pathHS != null)
                Core.DataDirectories.Add(pathHS);

            if (Core.DataDirectories.Count == 0 && !Core.Service)
            {
                Console.WriteLine("Enter the Ultima Online directory:");
                Console.Write("> ");

                Core.DataDirectories.Add(Console.ReadLine());
            }
        }

        private static string GetPath(string subName, string keyName)
        {
            try
            {
                string keyString;

                if (Core.Is64Bit)
                    keyString = @"SOFTWARE\Wow6432Node\{0}";
                else
                    keyString = @"SOFTWARE\{0}";

                using (RegistryKey key = Registry.LocalMachine.OpenSubKey(String.Format(keyString, subName)))
                {
                    if (key == null)
                        return null;

                    string v = key.GetValue(keyName) as string;

                    if (String.IsNullOrEmpty(v))
                        return null;

                    if (keyName == "InstallDir")
                        v = v + @"\";

                    v = Path.GetDirectoryName(v);

                    if (String.IsNullOrEmpty(v))
                        return null;

                    return v;
                }
            }
            catch
            {
                return null;
            }
        }
    }
}

The line I changed was
private static readonly string CustomPath = @"C:\Program Files (x86)\Electronic Arts\Ultima Online Worlds";
 
If thats the directory location of your client files, then you should be good to go.
 
I copy and pasted straight from the folder listing the client files. yet it still says Openuo error no client detected.

C:\Program Files (x86)\Electronic Arts\Ultima Online Worlds is copy and paste from the folder itself listing all the client files this is the root folder of the UO install.

I even shortened this to C:\Ultima and it still does not work line 15 is all that is needed for edit? I am using the most current as of one week ago UO client and current ServeUo as of today.

once again here is my code
Code:
using System;
using System.IO;
using Microsoft.Win32;

namespace Server.Misc
{
    public class DataPath
    {
        /* If you have not installed Ultima Online,
        * or wish the server to use a separate set of datafiles,
        * change the 'CustomPath' value.
        * Example:
        *  private static string CustomPath = @"C:\Program Files\Ultima Online";
        */
        private static readonly string CustomPath = @"C:\Ultima";
        /* The following is a list of files which a required for proper execution:
        *
        * Multi.idx
        * Multi.mul
        * VerData.mul
        * TileData.mul
        * Map*.mul or Map*LegacyMUL.uop
        * StaIdx*.mul
        * Statics*.mul
        * MapDif*.mul
        * MapDifL*.mul
        * StaDif*.mul
        * StaDifL*.mul
        * StaDifI*.mul
        */
        public static void Configure()
        {
            string pathUO = GetPath(@"Origin Worlds Online\Ultima Online\1.0", "ExePath");
            string pathTD = GetPath(@"Origin Worlds Online\Ultima Online Third Dawn\1.0", "ExePath"); //These refer to 2D & 3D, not the Third Dawn expansion
            string pathKR = GetPath(@"Origin Worlds Online\Ultima Online\KR Legacy Beta", "ExePath"); //After KR, This is the new registry key for the 2D client
            string pathSA = GetPath(@"Electronic Arts\EA Games\Ultima Online Stygian Abyss Classic", "InstallDir");
            string pathHS = GetPath(@"Electronic Arts\EA Games\Ultima Online Classic", "InstallDir");

            if (CustomPath != null)
                Core.DataDirectories.Add(CustomPath);

            if (pathUO != null)
                Core.DataDirectories.Add(pathUO);

            if (pathTD != null)
                Core.DataDirectories.Add(pathTD);

            if (pathKR != null)
                Core.DataDirectories.Add(pathKR);

            if (pathSA != null)
                Core.DataDirectories.Add(pathSA);

            if (pathHS != null)
                Core.DataDirectories.Add(pathHS);

            if (Core.DataDirectories.Count == 0 && !Core.Service)
            {
                Console.WriteLine("Enter the Ultima Online directory:");
                Console.Write("> ");

                Core.DataDirectories.Add(Console.ReadLine());
            }
        }

        private static string GetPath(string subName, string keyName)
        {
            try
            {
                string keyString;

                if (Core.Is64Bit)
                    keyString = @"SOFTWARE\Wow6432Node\{0}";
                else
                    keyString = @"SOFTWARE\{0}";

                using (RegistryKey key = Registry.LocalMachine.OpenSubKey(String.Format(keyString, subName)))
                {
                    if (key == null)
                        return null;

                    string v = key.GetValue(keyName) as string;

                    if (String.IsNullOrEmpty(v))
                        return null;

                    if (keyName == "InstallDir")
                        v = v + @"\";

                    v = Path.GetDirectoryName(v);

                    if (String.IsNullOrEmpty(v))
                        return null;

                    return v;
                }
            }
            catch
            {
                return null;
            }
        }
    }
}
 
Last edited:
Ok it ws saying no client files located I did not try to log on from there it is loading guess OpenUo is something else.
 
OpenUO takes its files from C:\Server by default. This is due to conflict errors sometimes arising from ServUO using the files at the same time as OpenUO. To change where OpenUO is looking take a look at your Server\OpenUOSDK.cs and change the appropriate value there. If you want that error to stop showing up, just make a copy of your client folder over in C:\Server or wherever it is you want it to be.

I try not to touch/edit the core and do everything in the Scripts folder - my server folder edits get pushed to the repo :)
 
You can edit the data path for OpenUO in the core and recompile to remove the error without any adverse effects.
 

Active Shards

Donations

Total amount
$0.00
Goal
$1,000.00
Back