Go Back   RunUO - Ultima Online Emulation > RunUO > Utility Support > Ultima SDK

Ultima SDK Support for the Ultima SDK.

Reply
 
Thread Tools Display Modes
Old 11-23-2006, 08:01 AM   #1 (permalink)
Forum Expert
 
arul's Avatar
 
Join Date: Jan 2005
Location: Hiding in your room.
Age: 21
Posts: 1,272
Send a message via MSN to arul
Post Ultima SDK [UPDATED]

I've been toying with the UO SDK lately, and since I was missing some features I've decided to code them.

Changelog:

Updated:
- Animation class now supports the ML exapnsion.

New features:
- ASCII text export.
- Sound export.

Suggestions & bug reports strongly appreciated.

Thanks to rsmiller21 for suggestions on sounds.
Attached Files
File Type: zip Ultima.zip (22.4 KB, 119 views)
File Type: zip Ultima_Source.zip (33.3 KB, 124 views)
__________________

Last edited by arul; 12-31-2006 at 05:27 PM.
arul is offline   Reply With Quote
Old 11-23-2006, 07:51 PM   #2 (permalink)
Forum Novice
 
rsmiller21's Avatar
 
Join Date: Feb 2005
Location: Stephenville, Tx
Age: 25
Posts: 225
Send a message via ICQ to rsmiller21 Send a message via MSN to rsmiller21
Default

Sweeeet. That is so going into my next program. Thanks, and great work!
__________________
This is a bad signature.
rsmiller21 is offline   Reply With Quote
Old 11-24-2006, 07:22 AM   #3 (permalink)
Forum Expert
 
Join Date: Oct 2002
Age: 45
Posts: 4,304
Default

Arul - YOU ARE THE MAN! Thanks for this!
HellRazor is online now   Reply With Quote
Old 12-13-2006, 11:22 PM   #4 (permalink)
Forum Novice
 
rsmiller21's Avatar
 
Join Date: Feb 2005
Location: Stephenville, Tx
Age: 25
Posts: 225
Send a message via ICQ to rsmiller21 Send a message via MSN to rsmiller21
Default

I have been working on a program dealing with the new Ultima.dll here and wanted to post a few code snippets.


Playing the sound:
Code:

publicstaticvoid PlaySound(MemoryStream ms)
{
System.Media.SoundPlayer sp = new System.Media.SoundPlayer();
sp.Stream = ms;
sp.Play();
}
Get sound file name with the sound id:
Code:

publicstaticstring GetSoundName(int soundID)
{
if (soundID < 0) { returnnull; }
 
m_Index.BaseStream.Seek((long)(soundID * 12), SeekOrigin.Begin);
 
int offset = m_Index.ReadInt32();
int length = m_Index.ReadInt32();
int extra = m_Index.ReadInt32();
if ((offset < 0) || (length <= 0))
{
if (!m_Translations.TryGetValue(soundID, out soundID)) { returnnull; }
m_Index.BaseStream.Seek((long)(soundID * 12), SeekOrigin.Begin);
offset = m_Index.ReadInt32();
length = m_Index.ReadInt32();
extra = m_Index.ReadInt32();
}
if ((offset < 0) || (length <= 0)) { returnnull; }
byte[] buffer = newbyte[40];
m_Stream.Seek((long)(offset), SeekOrigin.Begin);
m_Stream.Read(buffer, 0, 40);
return System.Text.Encoding.UTF8.GetString(buffer);
}
Sorry, that was basicly a rip off from GetSound lol. I needed a quick fix and that should do it.
__________________
This is a bad signature.
rsmiller21 is offline   Reply With Quote
Old 12-31-2006, 05:31 PM   #5 (permalink)
Forum Expert
 
arul's Avatar
 
Join Date: Jan 2005
Location: Hiding in your room.
Age: 21
Posts: 1,272
Send a message via MSN to arul
Default

Great idea!

I made some changes to the Sound class, so that now it should be easier to work with. Check out the new archives.

Thanks for the suggestion rsmiller21.
__________________
arul is offline   Reply With Quote
Old 01-01-2007, 06:17 PM   #6 (permalink)
Forum Novice
 
rsmiller21's Avatar
 
Join Date: Feb 2005
Location: Stephenville, Tx
Age: 25
Posts: 225
Send a message via ICQ to rsmiller21 Send a message via MSN to rsmiller21
Default

Np, thanks for putting it together
__________________
This is a bad signature.
rsmiller21 is offline   Reply With Quote
Old 02-06-2007, 09:27 PM   #7 (permalink)
Forum Expert
 
Join Date: Mar 2005
Location: Berlin, Germany
Age: 26
Posts: 1,136
Send a message via ICQ to Sotho Tal Ker Send a message via MSN to Sotho Tal Ker
Default

The wrong named dif files in TileMatrixPatch.cs are still present.
Sotho Tal Ker is offline   Reply With Quote
Old 02-08-2007, 10:50 PM   #8 (permalink)
Forum Expert
 
arul's Avatar
 
Join Date: Jan 2005
Location: Hiding in your room.
Age: 21
Posts: 1,272
Send a message via MSN to arul
Default

Quote:
Originally Posted by Sotho Tal Ker View Post
The wrong named dif files in TileMatrixPatch.cs are still present.
What's wrong with their names?
__________________
arul is offline   Reply With Quote
Old 02-09-2007, 01:35 AM   #9 (permalink)
Forum Expert
 
Join Date: Oct 2002
Age: 45
Posts: 4,304
Default

In the original source of the SDK the map dif files aren't named correctly, there is a minor typo. Which, if I was reading the source correctly, would result in the map patches never being loaded by the SDK.
HellRazor is online now   Reply With Quote
Old 03-20-2007, 04:42 PM   #10 (permalink)
Forum Expert
 
Join Date: Feb 2003
Location: Virginia Beach, VA
Posts: 1,347
Default

Updated TileMatrixPatch.cs for Ultima.dll
Attached Files
File Type: cs Copy of TileMatrixPatch.cs (4.3 KB, 30 views)
__________________
the-retelling.org : scripts and tech demo
Alari is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5