1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

"Client files not found"

Discussion in 'Script Support' started by Victor, May 1, 2014.

  1. Victor
    Offline

    Victor Shard Owner

    Joined:
    Aug 6, 2013
    Messages:
    31
    Likes Received:
    2
    Code (C#):
    1. ----------------------------------------------------------------------------
    2. ServUO - [http://www.servuo.com] Version 0.5, Build 5233.39846
    3. Publish 54
    4. Core: Running with arguments: -debug
    5. Core: Optimizing for 4 64-bit processors
    6. RandomImpl: CSPRandom (Software)
    7. OpenUO Error: Client files not found.
    8. Scripts: Compiling C# scripts...Finished with: 0 errors, 0 warnings
    9. Scripts: Skipping VB.NET Scripts...done (use -vb to enable)
    10. Scripts: Verifying...
    11. Finished (3990 items, 998 mobiles, 11 customs) (0.84 seconds)
    12. Regions: Loading...done
    13. World: Loading...done (4 items, 0 mobiles, 3 customs) (0.18 seconds)
    14. Restricting client version to 7.0.34.23. Action to be taken: LenientKick
    15. ServerList: Auto-detecting public IP address...done (24.171.68.166)
    16. 04:09:46 Joeku's Staff Runebook: Loading...
    17. 04:09:46 Listening: 192.168.1.145:2593
    18. 04:09:46 Listening: 127.0.0.1:2593
    19. 04:09:46 ----------------------------------------------------------------------
    20. 04:15:07 Core: Using dual save strategy
    21. 04:15:07 World: Saving...Closing Save Files.
    22. 04:15:07 Save finished in 0.09 seconds.
    23.  

    I keep having this issue over and over. I had it a few months ago and i haven't messed with the server since then. Here recently i have been working with it to try and get it back up and running. So i get another server from the repo. Whole new server, nothing to do with my old server at all. But i still get this issue.

    Code (C#):
    1. using System;
    2. using System.IO;
    3. using Microsoft.Win32;
    4.  
    5. namespace Server.Misc
    6. {
    7.     public class DataPath
    8.     {
    9.         /* If you have not installed Ultima Online,
    10.         * or wish the server to use a separate set of datafiles,
    11.         * change the 'CustomPath' value.
    12.         * Example:
    13.         *  private static string CustomPath = @"C:\Program Files (x86)\Electronic Arts\Ultima Online Classic";
    14.         */
    15.         private static readonly string CustomPath = @"C:\Server";
    16.         /* The following is a list of files which a required for proper execution:
    17.         *
    18.         * Multi.idx
    19.         * Multi.mul
    20.         * VerData.mul
    21.         * TileData.mul
    22.         * Map*.mul or Map*LegacyMUL.uop
    23.         * StaIdx*.mul
    24.         * Statics*.mul
    25.         * MapDif*.mul
    26.         * MapDifL*.mul
    27.         * StaDif*.mul
    28.         * StaDifL*.mul
    29.         * StaDifI*.mul
    30.         */
    31.         public static void Configure()
    32.         {
    33.             string pathUO = GetPath(@"Origin Worlds Online\Ultima Online\1.0", "ExePath");
    34.             string pathTD = GetPath(@"Origin Worlds Online\Ultima Online Third Dawn\1.0", "ExePath"); //These refer to 2D & 3D, not the Third Dawn expansion
    35.             string pathKR = GetPath(@"Origin Worlds Online\Ultima Online\KR Legacy Beta", "ExePath"); //After KR, This is the new registry key for the 2D client
    36.             string pathSA = GetPath(@"Electronic Arts\EA Games\Ultima Online Stygian Abyss Classic", "InstallDir");
    37.             string pathHS = GetPath(@"Electronic Arts\EA Games\Ultima Online Classic", "InstallDir");
    38.        
    39.  
    40.             if (CustomPath != @"C:\Program Files (x86)\Electronic Arts\Ultima Online Classic")
    41.                 Core.DataDirectories.Add(CustomPath);
    42.  
    43.             if (pathUO != null)
    44.                 Core.DataDirectories.Add(pathUO);
    45.  
    46.             if (pathTD != null)
    47.                 Core.DataDirectories.Add(pathTD);
    48.  
    49.             if (pathKR != null)
    50.                 Core.DataDirectories.Add(pathKR);
    51.  
    52.             if (pathSA != null)
    53.                 Core.DataDirectories.Add(pathSA);
    54.  
    55.             if (pathHS != null)
    56.                 Core.DataDirectories.Add(pathHS);
    57.  
    58.             if (Core.DataDirectories.Count == 0 && !Core.Service)
    59.             {
    60.                 Console.WriteLine("Enter the Ultima Online directory:");
    61.                 Console.Write("> ");
    62.  
    63.                 Core.DataDirectories.Add(Console.ReadLine());
    64.             }
    65.         }
    66.  
    67.         private static string GetPath(string subName, string keyName)
    68.         {
    69.             try
    70.             {
    71.                 string keyString;
    72.  
    73.                 if (Core.Is64Bit)
    74.                     keyString = @"SOFTWARE\Wow6432Node\{0}";
    75.                 else
    76.                     keyString = @"SOFTWARE\{0}";
    77.  
    78.                 using (RegistryKey key = Registry.LocalMachine.OpenSubKey(String.Format(keyString, subName)))
    79.                 {
    80.                     if (key == null)
    81.                         return null;
    82.  
    83.                     string v = key.GetValue(keyName) as string;
    84.  
    85.                     if (String.IsNullOrEmpty(v))
    86.                         return null;
    87.  
    88.                     if (keyName == "InstallDir")
    89.                         v = v + @"\";
    90.  
    91.                     v = Path.GetDirectoryName(v);
    92.  
    93.                     if (String.IsNullOrEmpty(v))
    94.                         return null;
    95.  
    96.                     return v;
    97.                 }
    98.             }
    99.             catch
    100.             {
    101.                 return null;
    102.             }
    103.         }
    104.     }
    105. }


    I have altered my datapath file.


    Code (C#):
    1. #region Header
    2. // **********
    3. // ServUO - OpenUOSDK.cs
    4. // **********
    5. #endregion
    6.  
    7. #region References
    8. using System;
    9. using System.IO;
    10. using System.Linq;
    11.  
    12. using OpenUO.Core.Patterns;
    13. using OpenUO.Ultima;
    14. using OpenUO.Ultima.Windows.Forms;
    15. #endregion
    16.  
    17. namespace Server
    18. {
    19.     public class OpenUOSDK
    20.     {
    21.         //! You should point this to a directory containing a COPY of your client
    22.         //! files if you are having conflict issues with ServUO using the same files
    23.         //! that your client is using.
    24.         //!+ Example: private static string _ClientData = @"C:\Server Files";
    25.         public static string ClientDataPath = @"C:\Server";
    26.  
    27.         public static AnimationDataFactory AnimationDataFactory { get; set; }
    28.         public static AnimationFactory AnimationFactory { get; set; }
    29.         public static ArtworkFactory ArtFactory { get; set; }
    30.         public static ASCIIFontFactory AsciiFontFactory { get; set; }
    31.         public static ClilocFactory ClilocFactory { get; set; }
    32.         public static GumpFactory GumpFactory { get; set; }
    33.         public static SkillsFactory SkillsFactory { get; set; }
    34.         public static SoundFactory SoundFactory { get; set; }
    35.         public static TexmapFactory TexmapFactory { get; set; }
    36.         public static UnicodeFontFactory UnicodeFontFactory { get; set; }
    37.  
    38.         public OpenUOSDK(string path = "")
    39.         {
    40.             if (ClientDataPath == @"C:\Program Files (x86)\Electronic Arts\Ultima Online Classic")
    41.             {
    42.                 if (Directory.Exists(path))
    43.                 {
    44.                     ClientDataPath = path;
    45.                 }
    46.             }
    47.  
    48.             Container container = new Container();
    49.             container.RegisterModule<UltimaSDKCoreModule>();
    50.             container.RegisterModule<UltimaSDKBitmapModule>();
    51.  
    52.             InstallLocation location = (ClientDataPath == null
    53.                                             ? InstallationLocator.Locate().FirstOrDefault()
    54.                                             : (InstallLocation)ClientDataPath);
    55.  
    56.             if (location == null || String.IsNullOrWhiteSpace(location) || !Directory.Exists(location.ToString()))
    57.             {
    58.                 Utility.PushColor(ConsoleColor.Red);
    59.                 Console.WriteLine("OpenUO Error: Client files not found.");
    60.                 Utility.PopColor();
    61.             }
    62.  
    63.             AnimationDataFactory = new AnimationDataFactory(location, container);
    64.             AnimationFactory = new AnimationFactory(location, container);
    65.             ArtFactory = new ArtworkFactory(location, container);
    66.             AsciiFontFactory = new ASCIIFontFactory(location, container);
    67.             ClilocFactory = new ClilocFactory(location, container);
    68.             GumpFactory = new GumpFactory(location, container);
    69.             SkillsFactory = new SkillsFactory(location, container);
    70.             SoundFactory = new SoundFactory(location, container);
    71.             TexmapFactory = new TexmapFactory(location, container);
    72.             UnicodeFontFactory = new UnicodeFontFactory(location, container);
    73.         }
    74.     }
    75. }
    And i altered my OpenUOSDK.cs file.


    There is no previous data to go back to, this is a completely new server. Those are the only two files i have changed. I got my classic client from the UO main website. Its patched up completely. I have restarted my computer. I'm at a loss, any ideas?
     
  2. Kalamus
    Offline

    Kalamus Active Member

    Joined:
    Apr 24, 2013
    Messages:
    282
    Likes Received:
    32
    The only thing I can think of is Directory.Exist is returning false because it's getting Access Denied because of user permissions. You can try running the server as admin as see if that fixes the issue. Assuming the directory does exist and the path spelling is right in the edits you made, then it has to be something with permissions.
     
  3. Victor
    Offline

    Victor Shard Owner

    Joined:
    Aug 6, 2013
    Messages:
    31
    Likes Received:
    2
    I tried it. Didn't work unfortunately.
     
  4. Kalamus
    Offline

    Kalamus Active Member

    Joined:
    Apr 24, 2013
    Messages:
    282
    Likes Received:
    32
    First thing I probably should of asked was did you recompile the server. OpenUOSDK.cs is a server file and any changes you make won't show up unless you recompile. Besides that I'm clueless as to what would be causing your issue because I can't reproduce it.
     
  5. Victor
    Offline

    Victor Shard Owner

    Joined:
    Aug 6, 2013
    Messages:
    31
    Likes Received:
    2
    Yes i did compile. I do however have a question, seems there are two compile files. Compile.MONO and Compile.WIN. Does it matter which i use?
     
  6. Kalamus
    Offline

    Kalamus Active Member

    Joined:
    Apr 24, 2013
    Messages:
    282
    Likes Received:
    32
    Compile.MONO is for Unix systems. Compile.WIN is for Windows systems.
     
  7. Victor
    Offline

    Victor Shard Owner

    Joined:
    Aug 6, 2013
    Messages:
    31
    Likes Received:
    2
    K, still having the issue. I don't know what to do.
     
  8. Kalamus
    Offline

    Kalamus Active Member

    Joined:
    Apr 24, 2013
    Messages:
    282
    Likes Received:
    32
    Just looked through your code again. Didn't bother seeing if you changed anything other than the ClientDataPath variable. Sure enough I found your mistake. You are changing the 'if' check of the variable and not the variable itself.

    Change this code:
    Code (C#):
    1. if (ClientDataPath == @"C:\Program Files (x86)\Electronic Arts\Ultima Online Classic")
    Back to it's default state:
    Code (C#):
    1. if (ClientDataPath == null && !String.IsNullOrWhiteSpace(path))

    Then change this line to the path you need:
    Code (C#):
    1. public static string ClientDataPath = @"C:\Server";
    Should look something like this using the path you changed before:
    Code (C#):
    1. public static string ClientDataPath = @"C:\Program Files (x86)\Electronic Arts\Ultima Online Classic";

    I should note that if that's the path you are using and your client is using the same path you'll probably run into IO errors later on. You should use a copy of the client for OpenUOSDK.cs. All the instructions for this are located in the commented section at the top of the file:
    Code (C#):
    1. //! You should point this to a directory containing a COPY of your client
    2. //! files if you are having conflict issues with ServUO using the same files
    3. //! that your client is using.
    4. //!+ Example: private static string _ClientData = @"C:\Server Files";
    Don't forget to recompile after changes.
     
    • Two Thumbs Up Two Thumbs Up x 1
  9. Victor
    Offline

    Victor Shard Owner

    Joined:
    Aug 6, 2013
    Messages:
    31
    Likes Received:
    2
    Wow i feel dumb now. Done that 100 times and messed it up lol. Thank you! It worked everything is running great.
     
    • Like Like x 1
  10. Kalamus
    Offline

    Kalamus Active Member

    Joined:
    Apr 24, 2013
    Messages:
    282
    Likes Received:
    32
    Your welcome. Glad I could help :).
     
  11. demented
    Offline

    demented Member

    Joined:
    Jun 5, 2014
    Messages:
    221
    Likes Received:
    20
    Good Ketch Kal..just seen that myself in previos replies was going to suggest same thing lol
     
  12. Neshoba
    Offline

    Neshoba Member

    Joined:
    Feb 1, 2016
    Messages:
    127
    Likes Received:
    6
    search bar is awesome :):p:p was looking for this fix
     
Similar Threads: Client files
Forum Title Date
Archived Bug Reports Server & Client shared files Feb 28, 2017
General Discussion Ultima Art: Unable to read client files Feb 20, 2017
Mono Support Not able to read client files /[createworld command]. Jul 24, 2014
ServUO Discussion Issue with Custom Map, newest client Mar 11, 2017
Windows Support Enhanced Client and inventory Mar 2, 2017
Think Tank Modify Enhanced Client Feb 22, 2017
ServUO Discussion Using a Mondain's Legacy Client.? Feb 21, 2017