|
||
|
|
#1 (permalink) |
|
Master of the Internet
Join Date: Feb 2005
Location: ShatteredSosaria.com
Posts: 9,231
|
Some of you may have noticed that, if you try to use the StringList (Clilocs) with the SDK 2.0, you'll experience a nasty crash.
Thankfully, Zippy provided a fix for this issue, so I was able to integrate the fix into the SDK. This 2.1 version is for use with RunUO 2.0 (.Net 2.0); I've uploaded the DLL and the source. Admins: this thread could use a sticky. Enjoy! |
|
|
|
|
|
#2 (permalink) |
|
Forum Expert
Join Date: Oct 2002
Age: 45
Posts: 4,335
|
I'd like to see an official RunUO SVN put up for the Ultima SDK. There have been a lot of fixes posted, but the lack of a central repository is resulting in lots of different versions of the SDK floating around. It would be good to have a place to submit bug fixes and improvements to so we could have one version with all the fixes in it.
|
|
|
|
|
|
#3 (permalink) |
|
Master of the Internet
Join Date: Feb 2005
Location: ShatteredSosaria.com
Posts: 9,231
|
That would be very nice.
Here's an example of how to use the new StringList methods: Code:
using System;
using Server;
using Ultima;
namespace Joeku.Test
{
public class Test_Main
{
public static StringList StringList = new StringList( "ENU" ); // Initialize an instance of the StringList.
public static void Initialize()
{
// If you want to simply convert a cliloc into a string...
Console.WriteLine( StringList.Table[1076267] ); // Boiling Cauldron
// Boiling Cauldron
// If you want to format a cliloc with args...
Console.WriteLine( StringList.Format( 1070749, "John", "Amy" ) ); // ~1_val~ has joined ~2_val~.
// John has joined Amy.
// If you want to format a cliloc with a single arg string that is separated by tabs...
string args = "Jim\tKelly"; // "\t" is the Tab character
Console.WriteLine( StringList.SplitFormat( 1070749, args ) ); // ~1_val~ has joined ~2_val~.
// Jim has joined Kelly.
}
}
}
|
|
|
|
|
|
#5 (permalink) |
|
ConnectUO Creator
Join Date: Jan 2004
Location: In your mom
Age: 27
Posts: 4,763
|
it has nothing to do with runuo. its for making 3rd party applications like pandora's box
__________________
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 |
|
|
|
|
|
#7 (permalink) |
|
Forum Expert
Join Date: Oct 2002
Age: 45
Posts: 4,335
|
Don't .NET DLL's and the programs they are used with need to be compiled with the same version of .NET?
Just wondering because I know I tried to use ultima.dll compiled under .NET 2.0 with a 1.3 compiled version of Pandora's Box and it wouldn't work, Pandora would just crash. |
|
|
|
|
|
#10 (permalink) |
|
Forum Expert
Join Date: Oct 2002
Age: 45
Posts: 4,335
|
(Edit - Found some problems with this, will re-post it once I have the kinks worked out!)
ULTIMA SDK 2.2 -------------------- 1. New Feature: You can now specify the UO directory path for use with the SDK by using the MyPath property. Here's an example: Ultima.FileIndex.MyPath = "C:/My UO Directory"; If MyPath is null or empty, the SDK will continue to use the system registry for the UO install path as before. 2. Bug Fix: Fixed a problem with the SDK being sometimes unable to read the UO install data from the system registry of Windows 64 Bit operating systems (due to Wow6432Node being inserted into the registry path under those OS'). Compiled under .NET Framework 2.0. Hope you find the updates useful! Last edited by HellRazor; 08-24-2008 at 05:55 PM. |
|
|
|
|
|
#11 (permalink) |
|
ConnectUO Creator
Join Date: Jan 2004
Location: In your mom
Age: 27
Posts: 4,763
|
Dictionary is slow.
__________________
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 |
|
|
|
|
|
#13 (permalink) |
|
ConnectUO Creator
Join Date: Jan 2004
Location: In your mom
Age: 27
Posts: 4,763
|
I'm pretty sure I've read that in a MS article for XNA, perhaps I'm wrong, however, come to think of it, i guess its faster since you don't have to box and unbox, so disregard my comment. One thing i do wish Dictionary didnt do was through a KeyNotFoundExcetion, just return null for damn sake....
__________________
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 |
|
|
|
|
|
#14 (permalink) |
|
Forum Expert
|
SomeObj val;
dictionary.TryGetValue(key, out val); Yeah but I agree that with those constructions the code looks a little ugly.
__________________
Angels are falling the very last time, down they're burning in hate and decline, unfaithful and violent we're breaking the spell, we're god, we're scissor, in heaven and hell! |
|
|
|
|
|
#15 (permalink) | |
|
ConnectUO Creator
Join Date: Jan 2004
Location: In your mom
Age: 27
Posts: 4,763
|
Quote:
![]()
__________________
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 |
|
|
|
|
|
|
#16 (permalink) |
|
Forum Expert
Join Date: Oct 2002
Age: 45
Posts: 4,335
|
Hey Jeff (or anyone else who can help):
I am attempting to modify the DLL to allow the the path to the UO directory to be changed programically from the calling application. I've tried using a public static variable to hold the file path, which is then used in FileIndex.cs. The problem I am running into is that once the path to the UO client has been set the first time, the DLL always uses that path, even when the static public variable has changed. Can anyone give me an idea as to why this happens and what I can do to work around it? Thanks! |
|
|
|
|
|
#18 (permalink) | |
|
ConnectUO Creator
Join Date: Jan 2004
Location: In your mom
Age: 27
Posts: 4,763
|
Quote:
__________________
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 |
|
|
|
|
|
|
#20 (permalink) |
|
ConnectUO Creator
Join Date: Jan 2004
Location: In your mom
Age: 27
Posts: 4,763
|
Well for instance Animations.cs you would do this
Code:
private static FileIndex m_FileIndex = new FileIndex( "Anim.idx", "Anim.mul", 0x40000, 6 );
public static FileIndex FileIndex{ get{ return m_FileIndex; } }
private static FileIndex m_FileIndex2 = new FileIndex( "Anim2.idx", "Anim2.mul", 0x10000, -1 );
public static FileIndex FileIndex2{ get{ return m_FileIndex; } }
private static FileIndex m_FileIndex3 = new FileIndex( "Anim3.idx", "Anim3.mul", 0x20000, -1 );
public static FileIndex FileIndex3{ get{ return m_FileIndex; } }
static Animations()
{
Initialize();
}
public static void Initialize()
{
Utility.EnsureClose(m_FileIndex);
Utility.EnsureClose(m_FileIndex2);
Utility.EnsureClose(m_FileIndex3);
m_FileIndex = new FileIndex("Anim.idx", "Anim.mul", 0x40000, 6);
m_FileIndex2 = new FileIndex("Anim2.idx", "Anim2.mul", 0x10000, -1);
m_FileIndex3 = new FileIndex("Anim3.idx", "Anim3.mul", 0x20000, -1);
}
Code:
public static void EnsureClose(FileIndex fileIndex)
{
if (fileIndex != null && fileIndex.Stream != null)
{
fileIndex.Stream.Close();
}
}
Be sure you inlude your custom paths, and whenenver the custom path changes call Animations.Initilize();, just do this for each class that has a FileIndex in it.
__________________
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 |
|
|
|
|
|
#24 (permalink) | |
|
ConnectUO Creator
Join Date: Jan 2004
Location: In your mom
Age: 27
Posts: 4,763
|
Quote:
![]()
__________________
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 | |
Lin |