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!

Resource icon

Ultima Live Map Streamer and Editor 0.97

No permission to download
UltimaLive v.0.97
Introduction
The purpose of UltimaLive is to allow a shard to edit its maps while the game is running, stream those changes to its players in realtime, and use more than six map files.

Map Editing and Streaming
UltimaLive provides shard developers the ability to alter maps without the hassle of redistributing map files to their entire player base. This gives shard developers the possibility of scripting events that make changes to the game maps while the shard is running. e.g. If a shard wanted to simulate having a meteor crash into the terrain for example, they could script in the effects and actually make a crater in the map.

UltimaLive allows shard administrators the ability to edit the terrain and statics in realtime and see those changes immediately. Items can be frozen into the map while the game is running and the maps stored on the players computer are automatically updated when they get near the changed part of the map.

Players are not required to download shard maps at all if they would like to stream all the maps. On the other hand, shards can still distribute maps to their players and in that case players would only be sent parts of the map that have changed since the maps were released. They would only be streamed those changes when they came into contact with the part of the map that had changed.

User's Guide
The user's guide is a work in progress, but it can be found here:
https://drive.google.com/file/d/0B-WB4lZy0i9mRGFrNTRKc05nd00/edit?usp=sharing

Additional Maps
The regular Ultima Online client supports six map files. While shards can currently use those six map files to make as many logical maps (copies of a map file) as they want, all the logical maps will look the same.

UltimaLive allows shards to use more than the regular six map files. They can create upwards of 200 additional unique maps, which means the possibility for expansion has been greatly enhanced.
If shards only want the ability to use additional maps and not stream changes, the streaming can be disabled. Additional Maps have the limitation of being the same size (same number of blocks) or less than the post-ML Fel and Tram maps.

Limitations
The following are limitations of this system:
  • The game screen may flash black for a brief (less than a second) time when the system streams parts of the map. This is caused by the game client reloading its view of the game map.
  • UltimaLive only works with the classic client at this time.
  • Maps must have the same number or fewer blocks than the regular Felucca map.
System Requirements
  • Supports the latest client (at this time 7.0.30.3)
  • Supports some older clients
  • Supports Windows XP, Vista*, Windows 7, and Windows 8*
*Testing has only been done on XP and Windows 7, but there is no reason it shouldn't work on Vista and 8

Commands

There are several commands that can be used to alter the map while the game is running. They should be used as a basis to create better, more user friendly methods for editing the map.
[IncStaticAlt relative height
[SetStaticAlt absolute height
[SetStaticID graphic number
[DelStatic
[AddStatic
[MoveStatic
[IncLandAlt relativeheight
[SetLandAlt absolute height
[SetLandID graphic number
[CircularIndent relative height
[LiveFreeze

[incsy Increase the y coord of a static
[incsx Increase the x coord of a static
[setstatichue set the hue value of a static

These are debug commands:
[GetBlockNumber
[QueryClientHash
[UpdateBlock


Client Side Installation Instructions
  1. Rename Igrping.dll in the client folder to Igrping_.dll.
  2. Copy Igrping_0_97.dll from the UltimaLive release into the client folder.
  3. Rename Igrping_0_97.dll to Igrping.dll
The client will load the UltimaLive version of the Igrping.dll file, which in turn calls the Igrping_.dll when needed.
You may need to run Ultima Live with administrative privileges when it creates blank maps in the app folder. The client may seem to hang for a few seconds while it creates its blank maps in the app folder. (On Windows 7 this is typically located at c:\ProgramData\UltimaLive\ShardIdentifer)

Maps are stored in ProgramData\UltimaLive\shardidentifer for windows 7. (Windows XP uses a different location for its app data)

Server Side Installation Instructions
Drop the included server files into your customs folder.
Each shard should have a unique identifier. Alter UltimaLiveSettings.cs and change the unique shard identifier.

Make the following modifications to PlayerMobile.cs

Find the class declaration of PlayerMobile
Code:
public class PlayerMobile : Mobile, IHonorTarget

Add the keyword partial before the keyword class:
Code:
public partial class PlayerMobile : Mobile, IHonorTarget

Look in playermobile and find the SetLocation method and the OnMapChange method.
Code:
public override void SetLocation( Point3D loc, bool isTeleport )

Code:
 protected override void OnMapChange( Map oldMap )

Add this to the bottom of the SetLocation method and to the top of the OnMapChange method
Code:
/* Begin UltimaLive Mod */
if (BlockQuery != null)
{
  m_PreviousMapBlock = BlockQuery.QueryMobile(this, m_PreviousMapBlock);
}
 
/* End UltimaLive Mod */
You will need to go into the MapRegistry.cs and define the additional physical maps you want to use. You can see existing examples in the file.
You will also need to define maps in your regular server/misc/mapdefinitions.cs, for example
Code:
AddMapDefinition(33, 0, new Point2D(181, 181), new Point2D(181, 181));

Here is a screenshot of what the streaming looks like:


And another:


In Linux:

You can see the green portion on the minimap has not been explored yet. The portions that are visible have been streamed and stored in the app data folder.

Here is a youtube video showing the streaming portion of UltimaLive:
Here is a youtube video showing some of the early development of the system. It does show in game map editing (a small amount).

Server Side Installation Instructions - Core Mod for hued statics support

In TileList.cs around line 59, there is a method called Add

e.g.
Code:
public void Add( ushort id, sbyte z )

Right below that method add the following method which takes a hue as an argument.

Code:
/* Begin UltimaLive Mod */
public void Add(ushort id, sbyte z, short hue)
{
  if ((m_Count + 1) > m_Tiles.Length)
  {
    StaticTile[] old = m_Tiles;
    m_Tiles = new StaticTile[old.Length * 2];
 
    for (int i = 0; i < old.Length; ++i)
    m_Tiles[i] = old[i];
  }
 
  m_Tiles[m_Count].m_ID = id;
  m_Tiles[m_Count].m_Z = z;
  m_Tiles[m_Count].m_Hue = hue;
  ++m_Count;
}
/* End UltimaLive Mod*/

In TileMatrix.cs around line 426 in the ReadStaticBlock method
e.g.
Code:
private unsafe StaticTile[][][] ReadStaticBlock( int x, int y )
method, you should see a line:

Code:
lists[pCur->m_X & 0x7][pCur->m_Y & 0x7].Add( pCur->m_ID, pCur->m_Z );

replace that line with

Code:
lists[pCur->m_X & 0x7][pCur->m_Y & 0x7].Add( pCur->m_ID, pCur->m_Z, pCur->m_Hue );

For good measure, we're going to do the same modificatoin to TileMatrixPatch.cs. In TileMatrixPatch.cs around line 180, you should see the following line:

Code:
lists[pCur->m_X & 0x7][pCur->m_Y & 0x7].Add( (ushort)pCur->m_ID, pCur->m_Z );

replace it with

Code:
lists[pCur->m_X & 0x7][pCur->m_Y & 0x7].Add( (ushort)pCur->m_ID, pCur->m_Z, pCur->m_Hue );

Recompile your server core.

Change Log
v.0.97
Fixed a bug that caused some file handles to be closed twice
Fixed a bug that was causing map and graphic glitches on maps that were smaller than Felucca
Moved Client files save path into the UltimaLiveSettings.cs file to centralize it
Added path for lumber harvest system to the UltimaLiveSettings.cs file. If you are not using the system, you can remove these lines of code or leave them.
Cleaned up various warnings
Fixed a bug that was causing map operations to conflict
Moved ServerSide files into a subfolder called Core in preparation for systems that will leverage UltimaLive
Added Eric T. Benoit's modification to AddStaticCommand
Moved some of the PlayerMobile edits to PlayerMobilePartial.cs. This will require the player to mark the PlayerMobile class as partial, but will require less overall edits.
Added Eric T. Benoit's Set Hue Command
Added Fwiffo's fix for Tile sorting
Added Fwiffo's Fix for Client file export
Added Fwiffo's Fix for LiveFreeze command
Added Eric T. Benoit's incsx and incsy commands for moving statics


v.0.96
Fixed terrain refresh bug that caused black tiles to appear in some stock maps and in custom maps.
Removed some client function signatures that were no longer being used
Added Client Export fix patch submitted by fwiffo that properly handles exported maps when virtual maps are used
Fixed bug in serverside files that would reset the hues of statics in the same x,y to 0 when a static was deleted
Fixed a minor bug that prevented MapRegistry.cs from compiling on .NET < 3.0


v.0.95
Refactored client refresh method to avoid resynching with server each time. Eliminated black flashing that players hate.
Included patch by fwiffo to fix virtualized maps.
Included patch by fwiffo to fix CRASH BUG FOR "IncStaticAlt" "DelStatic" "SetStaticID"


v.0.91
Added support to Copy existing mul files if they're the correct dimensions instead of creating new ones (both pre-UOP and UOP)
Refactored to remove some duplicate code from subclassed file managers into basefilemanager
Changed various integer types to be more consistent
Added progress dialog window to let users know the current progress of importing existing game client maps
Fixed bug in FileManagers that would cause UltimaLive to write to the index file instead of the statics file in certain circumstances
Fixed bug in FileManagers that would cause the index file to reference a valid statics location, but with zero length for static content
Added support mod from fwiffo for clients > 6.0.6.2 && < 7.0.0.0
Added UltimaLive Version packet and support
Added Version information to the file properties. An Igrping.dll can be checked by right click on it in windows and checking it's properties.
Fixed bug that would cause a player not to refresh map after a relog resulting in a black screen
Fixed bug in writeStaticsBlock that would sometimes result in a client crash.
Fixed bug server/client side that prevented UltimaLive from streaming correcting across Map wrapping points
Add message that displays UltimaLive and the version

v.0.75
Released full source code under GPL
Refactored function searching code
Note: Compiling this project as DEBUG will open up a console when the client starts that shows all sorts of useful information including the order that things are being executed and any packets being passed back and forth between the client and the server.

v.0.70
Added support for older clients that use the map#.mul files.
Tested with clients 7.0.30.1, 7.0.3.0, 4.0.11c

v.0.63
Clientside has been completely rewritten in C++ to remove its dependency on Razor. UltimaLive now works standalone with the client, or with Razor, or with AssistUO.

Credits
Code that I have used in this project:

fwiffo for patches, testing and feedback
Eric T. Benoit for additional commands, testing and feedback
Márton Anka for mhook
The people here at RunUO.com that have helped me on this project.
The people over at ServUO.com that have helped me on this project.
GoldDraco13 for his gump project that supports UltimaLive
-hash- for undocumented client features and packets
Zippy for writing Razor that allowed me to write the first versions of UltimaLive
Xenoglyph for parts of MasterControl
Warstone for many of his ideas
The folks at UODEV.DE for UOP information
Everyone who has tested and provided feedback about this system.
If you want special recognition for your help on this project, just send me a PM to remind me and I will gladly add you to the credits.
  • streamingDemo.jpg
    285.2 KB · Views: 1,145
  • UltimaLiveLinux.png
    744.4 KB · Views: 2,036
Author
Praxiiz
Downloads
308
Views
606
First release
Last update
Rating
5.00 star(s) 8 ratings

More resources from Praxiiz

Latest updates

  1. UltimaLive v.0.96

    0.97 Fixed a bug that caused some file handles to be closed twice Fixed a bug that was causing...
  2. UltimaLive v.0.96

    0.96 Fixed terrain refresh bug that caused black tiles to appear in some stock maps and in...
  3. Eliminated Black Flashes

    0.95 Refactored client refresh method to avoid resynching with server each time. Eliminated...

Latest reviews

great !
This is the best script ever. Even better than the throwable cat. Thanks for this!
If you're not using this on your shard, you're going to fall behind...this should be a standard for RunUO.
very good !!
I would give 10 stars if I could!
Excellent - it simply outstands old style patching system, with this tool you can do whatever is necessary to your user base, for correct streaming/update of maps and statics, not counting that you can create new one with just one mod
Epic, just epic.
Everyone need to give it try!
Now in opensource; competent admins can really make own place a unique place :)
Great idea! Adds huge potential to the world of RunUO, and I am excited to see the future that comes with it.

I only wish I was as talented, that I could have made something as monumental a milestone for UO Emulation as this.
Awesome system.
With its features It gives a lot of opportunities to creatives RunUO shard's developers.
Top