RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

[RunUO 2.X] Extended DataPath

Vorspire

Knight
Ultima Online's registry keys have changed somewhat between versions and the standard RunUO DataPath does not support detection of most Ultima Online installations.

This extended DataPath will override the standard RunUO DataPath and provide better installation detection with updated search algorithms.

It works exactly the same as the standard DataPath, it utilizes the static Configure method hook and implements the CallPriorityAttribute to make sure that the extended DataPath is called before the standard version.

When the extended DataPath is called, it will attempt to detect your installations as usual and if it fails, will prompt to type the directory as expected.

I ended up writing this because, working with VNc and the latest SVN, I like to keep all distro files completely unchanged and that includes my DataPath - because of this, it prompted me for a directory on every launch, now I don't have to worry about it.

Drop the file anywhere you like, you don't need to modify or delete your standard DataPath.

The code supports .NET 2.0 and 4.0 which is toggled using the #Framework_4_0 preprocessor directive/tag.

[EDIT]
Updated code for Framework 2.0 when displaying detected paths.
 

Attachments

  • DataPathExtended.cs
    9 KB · Views: 103

AdminA

Sorceror
Thanks Vorspire

Question, will this fix the Ultima.dll file issue that some of us have?

I get a whole bunch of console spam about that file not being found when the server is started up, hehe
 

Vorspire

Knight
Add "Ultima.dll" to your Data/Assemblies.cfg file and make sure Ultima.dll is in the same folder as RunUO.exe
 

AdminA

Sorceror
Thankya, I'm running the Mondains legacy pack from Malganis right now, the error I get when using this extended datapath file is:

Code:
RunUO - [www.runuo.com] Version 2.1, Build 4590.32074
Core: Running on .NET Framework Version 2.0.50727
Core: Optimizing for 4 64-bit processors
Scripts: Compiling C# scripts...failed (1 errors, 0 warnings)
Errors:
+ Misc/DataPathExtended.cs:
    CS1526: Line 157: A new expression requires () or [] after type
    CS1526: Line 180: A new expression requires () or [] after type
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.
 

Vorspire

Knight
Thanks for reporting the syntax errors, I don't develop in a 2.0 environment so getting the backwards compatibility right can be an annoyance.
 
Top