|
||
|
|||||||
| Ultima SDK Support for the Ultima SDK. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Forum Expert
Join Date: Oct 2002
Age: 45
Posts: 4,304
|
I want to create a utility that will compare the contents between 2 sets of MUL files. The SDK gets the UO installation path from the registry,
Is it possible to dynamically change the directory the SDK uses to read the MUL files via code? |
|
|
|
|
|
#4 (permalink) |
|
Master of the Internet
Join Date: Oct 2005
Age: 44
Posts: 6,283
|
Well, if the SDK has the capability to read mul files, I would expect that the reading routines are separate from the path definition code (however, I could easily be wrong since I've never looked at it). It should be possible to simply specify a path in the code, then read the muls.
__________________
Why is it that I'm never as smart as I thought I was yesterday? My vast knowledge is only surpassed by my infinite ignorance. <TheOutkastDev> i might have to hire an assassin to killl mal so that i can jump in front of the bullet and piss on him |
|
|
|
|
|
#5 (permalink) |
|
Forum Expert
Join Date: Oct 2002
Age: 45
Posts: 4,304
|
Currently the SDK gets the UO path from the registry and uses that for its MUL access.
What I'm not sure about is whether or not there is a way to change the path it reads from via code, or if its possible to read from 2 seperate paths. |
|
|
|
|
|
#6 (permalink) |
|
Master of the Internet
Join Date: Oct 2005
Age: 44
Posts: 6,283
|
Right, but does it do it all in one method? If not, you should be able to call the code that does things with the mul files directly instead of starting from the point where it finds the path.
__________________
Why is it that I'm never as smart as I thought I was yesterday? My vast knowledge is only surpassed by my infinite ignorance. <TheOutkastDev> i might have to hire an assassin to killl mal so that i can jump in front of the bullet and piss on him |
|
|
|
|
|
#7 (permalink) |
|
ConnectUO Creator
Join Date: Jan 2004
Location: In your mom
Age: 27
Posts: 4,760
|
You'd have to code that all yourself
![]()
__________________
Jeff Boulanger ConnectUO - Core Developer Want to help make ConnectUO better? Click here to submit your ideas/requests Use your talent to compete against other community members in RunUO hosted coding competitions If you know XNA (even if its just a little) or are a good artist(2d or 3d) and are interested in making games for a hobby send me a pm or drop by #xna in irc.runuo.com. I'm looking to put together a small game development team. Please do not pm me for support. If you are having issues please post in the appropriate forum. Thanks for your continued support of both ConnectUO and RunUO |
|
|
|
|
|
#8 (permalink) |
|
Administrator
Join Date: Aug 2002
Location: Baltimore, MD
Age: 25
Posts: 4,832
|
In what universe would it *not* be possible to change what path it is reading by editing the code which reads the files?
__________________
Zippy, Razor Creator and RunUO Core Developer The RunUO Software Team "Intuition, like a flash of lightning, lasts only for a second. It generally comes when one is tormented by a difficult decipherment and when one reviews in his mind the fruitless experiments already tried. Suddenly the light breaks through and one finds after a few minutes what previous days of labor were unable to reveal." ~The Cryptonomicon |
|
|
|
|
|
#10 (permalink) |
|
Master of the Internet
Join Date: Oct 2005
Age: 44
Posts: 6,283
|
It seems improbable to me that there are no methods to be able to specify a path from which to read files from.
__________________
Why is it that I'm never as smart as I thought I was yesterday? My vast knowledge is only surpassed by my infinite ignorance. <TheOutkastDev> i might have to hire an assassin to killl mal so that i can jump in front of the bullet and piss on him |
|
|
|
|
|
#11 (permalink) |
|
ConnectUO Creator
Join Date: Jan 2004
Location: In your mom
Age: 27
Posts: 4,760
|
I modified them myself, for my project. All i had to change was the contructor. Where uofolder is, just make it whatever folder you want the idx and mul file to be in.
Code:
public FileIndex(string uoFolder, string idxFile, string mulFile, int length)
{
m_Index = new Entry3D[length];
string idxPath = Path.Combine(uoFolder, idxFile);
string mulPath = Path.Combine(uoFolder, mulFile);
if( idxPath != null && mulPath != null )
{
using( FileStream index = new FileStream(idxPath, FileMode.Open, FileAccess.Read, FileShare.Read) )
{
BinaryReader bin = new BinaryReader(index);
m_Stream = new FileStream(mulPath, FileMode.Open, FileAccess.Read, FileShare.Read);
int count = (int)( index.Length / 12 );
for( int i = 0; i < count && i < length; ++i )
{
m_Index[i].lookup = bin.ReadInt32();
m_Index[i].length = bin.ReadInt32();
m_Index[i].extra = bin.ReadInt32();
}
for( int i = count; i < length; ++i )
{
m_Index[i].lookup = -1;
m_Index[i].length = -1;
m_Index[i].extra = -1;
}
}
}
}
__________________
Jeff Boulanger ConnectUO - Core Developer Want to help make ConnectUO better? Click here to submit your ideas/requests Use your talent to compete against other community members in RunUO hosted coding competitions If you know XNA (even if its just a little) or are a good artist(2d or 3d) and are interested in making games for a hobby send me a pm or drop by #xna in irc.runuo.com. I'm looking to put together a small game development team. Please do not pm me for support. If you are having issues please post in the appropriate forum. Thanks for your continued support of both ConnectUO and RunUO |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|