I also found an issue with hued statics not displaying correctly. In the attached screen shot the whole bank should be the darker copperish color but it's not, even with my muls copied into the UltimaLive folder it showed the right color for a second and then switched to what you see below.
Originally when I started this project, I had gone through a website that details the file formats for UO. The statics file format, included a note which mentioned that clients don't use the hue number for each static. I now know that this is wrong. During implementation, I chose to stream the hue information because it would have been more work to take it out. That being said, UltimaLive does stream the hue information for each static. Now some of the map operations don't account for hue, but I have corrected that for this next release.
Your version of UltimaLive is streaming hue information,
but RunUO doesn't read the hue information from your statics#.mul file.
To fix this, you need to have the hue information from each static read into RunUO's memory. RunUO already allocates memory for the hue information, but it simply never populates it.
There are a couple of options that come to mind to fix this:
- Modify the core so it loads the hue numbers
- Load the hue numbers in a second pass for each map from a UltimaLive server script
Now I've tried really hard to have as little RunUO distro edits as possible. I could implement a script that would load all the hue information, but there are some drawbacks. First is that RunUO doesn't load the entire map when it first loads up. It loads portions of a map as they are needed. If I added a script that loaded all the hue information, it would essentially cause RunUO to load all the map info at once up front when the world loads. This would make loading from a save longer, but it would also cause RunUO to use some memory that it may not have otherwise used.
The cleanest way to implement this is a core mod:
In TileList.cs around line 59, there is a method called Add e.g. "public void Add( ushort id, sbyte z )"
Below that method, we're going to add a new method that 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 "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 );
You could also do a similar modification to MultiData.cs, keeping in mind that it could cascade into additional changes.