Status
Not open for further replies.
Sure can...

Code:
public static void Configure()
    {
      AddMapDefinition(0, 0, new Point2D(10000, 10000), new Point2D(0, 0)); //felucca // changed for Shattered Map
      AddMapDefinition(1, 1, new Point2D(7168, 4096), new Point2D(5120, 4096)); //trammel
      AddMapDefinition(2, 2, new Point2D(2304, 1600), new Point2D(2304, 1600)); //Ilshenar
      AddMapDefinition(3, 3, new Point2D(2560, 2048), new Point2D(2560, 2048)); //Malas
      AddMapDefinition(4, 4, new Point2D(1448, 1448), new Point2D(1448, 1448)); //Tokuno
      AddMapDefinition(5, 5, new Point2D(1280, 4096), new Point2D(1280, 4096)); //TerMur

      //those are sample maps that use same original map...
      //AddMapDefinition(32, 0, new Point2D(7168, 4096), new Point2D(5120, 4096));
      //AddMapDefinition(33, 0, new Point2D(7168, 4096), new Point2D(5120, 4096));
      //AddMapDefinition(34, 1, new Point2D(7168, 4096), new Point2D(5120, 4096));

      EventSink.ServerList += new ServerListEventHandler(EventSink_OnServerList);
      EventSink.Login += new LoginEventHandler(EventSink_Login);
    }
 
This is the relevent portion of code on the client side:
Code:
bool UltimaLiveUpdateMapDefinitionsHandler::handlePacket(uint8_t* pPacketData)
{
  std::vector<MapDefinition> definitions;

  uint32_t count = ntohl(*reinterpret_cast<uint32_t*>(&pPacketData[7]));
  int newNumMaps = (count * 7) / 9;

  for (int i = 0; i < newNumMaps; i++)
  {
  int offset = 15 + (i * 9);
  uint8_t mapNumber = (uint8_t)pPacketData[offset]; //iteration byte 000  -  map file index number
  uint16_t width  = ntohs(*reinterpret_cast<uint16_t*>(&pPacketData[offset + 1]));  //iteration byte 001 to 002  -  map width
  uint16_t height  = ntohs(*reinterpret_cast<uint16_t*>(&pPacketData[offset + 3]));  //iteration byte 003 to 004  -  map height
  uint16_t wrapX  = ntohs(*reinterpret_cast<uint16_t*>(&pPacketData[offset + 5]));  //iteration byte 005 to 006  -  wrap around dimension X
  uint16_t wrapY  = ntohs(*reinterpret_cast<uint16_t*>(&pPacketData[offset + 7]));  //iteration byte 007 to 008  -  wrap around dimension Y

  if ((width > 0) && (height > 0) && (wrapX > 0) && (wrapY > 0))
  {
  MapDefinition def;
  def.mapNumber = mapNumber;
  def.mapWidthInTiles = width;
  def.mapHeightInTiles = height;
  def.mapWrapWidthInTiles = wrapX;
  def.mapWrapHeightInTiles = wrapY;
  definitions.push_back(def);
  }
  else
  {
  Logger::g_pLogger->LogPrint("Received bad definition for map %i\n", i);
  }
  }

  m_pManager->onMapDefinitionUpdate(definitions);
  return false;
}

For some reason it looks like the client receives a definition for map 0 with either a width / height of 0 (or less) or the wrap dimensions could have a 0 in them.
 
Change your wrap point from
Code:
AddMapDefinition(0, 0, new Point2D(10000, 10000), new Point2D(0, 0)); //felucca // changed for Shattered Map

to

Code:
AddMapDefinition(0, 0, new Point2D(10000, 10000), new Point2D(10000, 10000)); //felucca // changed for Shattered Map

The wrap points are just for the client's benefit. If you're not using the wrapping, just set it to the same size as the map.
 
Well, progress. The map is being recognized now, however it still crashes at login, with the following:

Code:
(((((((((((((Initializing Shard Maps)))))))))))))))))
Checking for C:\ProgramData\UltimaLive\\TheShatteredEmpire\map0.mul
File exists and is ok
Checking for C:\ProgramData\UltimaLive\\TheShatteredEmpire\map1.mul
File exists and is ok
Checking for C:\ProgramData\UltimaLive\\TheShatteredEmpire\map2.mul
File exists and is ok
Checking for C:\ProgramData\UltimaLive\\TheShatteredEmpire\map3.mul
File exists and is ok
Checking for C:\ProgramData\UltimaLive\\TheShatteredEmpire\map4.mul
File exists and is ok
Checking for C:\ProgramData\UltimaLive\\TheShatteredEmpire\map5.mul
File exists and is ok
Loading Map: C:\ProgramData\UltimaLive\TheShatteredEmpire\map0.mul
CLIENT HAS CRASHED!  Crash Report:
0018dcb0  | f4 82 01 07 00 0f 01 00  00 00 00 00 00 4d 65 72 | .............Me
r |
0018dcc0  | 69 63 00 d1 6d 7c dc 18  00 fd 00 00 00 05 00 00 | ic..m|.........
. |
0018dcd0  | 00 0f 00 00 00 00 00 00  00 e0 46 fc 6d 4d 65 72 | ..........F.mMe
r |
0018dce0  | 69 63 00 00 00 00 00 00  00 00 00 00 00 00 00 00 | ic.............
. |
0018dcf0  | 00 00 00 00 00 00 00 00  00 00 00 00 00 31 39 32 | .............19
2 |
0018dd00  | 2e 31 36 38 2e 32 2e 39  00 00 00 00 00 00 00 76 | .168.2.9.......
v |
0018dd10  | c0 00 00 05 69 67 72 70  69 6e 67 2e 64 6c 6c 00 | ....igrping.dll
. |
0018dd20  | 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 | ...............
. |
0018dd30  | 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 | ...............
. |
0018dd40  | 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 | ...............
. |
0018dd50  | 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 | ...............
. |
0018dd60  | 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 | ...............
. |
0018dd70  | 00 00 00 00 00 00 00 00  43 52 41 53 48 00 00 00 | ........CRASH..
. |
0018dd80  | 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 | ...............
. |
0018dd90  | 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 | ...............
. |
0018dda0  | 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 | ...............
. |
0018ddb0  | 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 | ...............
. |
0018ddc0  | 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 | ...............
. |
0018ddd0  | 00 00 00 00 00 00 00 00  00 00 00 00 00 13 f9 e2 | ...............
. |
0018dde0  | ac 14 5e dc 18 59 5e dd  1d 1e 5e dd 08 37 5e dc | ..^..Y^...^..7^
. |
0018ddf0  | f9 cc 5e df bd 1b 5e df  d0 32 5e e0 a1 8c 5e e0 | ..^...^..2^...^
. |
0018de00  | 9d b5 5e e0 95 3b 5e e0  8d 6c 5e e0 84 b5 5e e0 | ..^..;^..l^...^
. |
0018de10  | 73 df 5e e0 3b 02 5e e1  1b 4a 5e e0 f0 e0 5e e0 | s.^.;.^..J^...^
. |
0018de20  | b2 74 5e e0 d5 4f 5e e0  d1 ec 5e db 9c 0c 00 46 | .t^..O^...^....
F |
0018de30  | 41 2a                                            | A*
  |

Thank you VERY much for the help, btw. I really appreciate it.
 
m309, sorry to side track, but id love to see an overview screenshot or somthin of your map sometime :)
 
Actually, you may need to use an unmodified client. I don't remember how I'm searching for the client map size structure, but if I'm using the map size then it could throw the searching function off.
 
Would that mean I'd have to not use map0 as my map then, make it 6 or 23 or whatever, since the client will be looking for a specific sized map for Felucca without the modification?
 
It just means that if you used a hex editor on the client to change the map dimensions, you need to change it back so that UltimaLive can find the correct location for the map dimensions structure.

Basically UltimaLive goes through and searches for the adjacent numbers 7168 and 4096. When it finds them it uses that memory location (or an offset from it, I don't remember) to know what memory to alter when it changes maps. If you have 10000 in place of the 7168 then UltimaLive will find the 7168 that refers to trammel, and all the memory locations will be off.
 
I may not be able to replicate the issue if that is the problem - can you grab a stock client and try to log in?
 
Yes it is, however all mentions of map definitions have been updated to reflect the custom size (MapRegistry.cs). I'm guessing the issue might be with either block sizes themselves somewhere, or the actual Igrping.dll needs recompiled with some changes. I tried to reallocate memory usage and recompile it, as Praxiiz suggested a few pages back in response to my initial question, but that doesn't allow the client to open at all.

Check that my math is correct:

10,000 tiles / 8 tiles per block = 1250 blocks

1250 x 1250 = 1562500 total blocks

1562500 blocks x 196 bytes per block = 306,250,000 bytes for the map file correct?

UltimaLive by default allocates 100,000,000 bytes for a single map file. What you're saying though is if you increase this number, it won't let the client open at all, probably an out of memory error?

Just to clarify, out of memory doesn't necessarily mean you've used up all the memory on your machine. It can mean that windows failed to allocated a contiguous chunk that size possibly due to memory fragmentation. A reboot of your machine may let you open the client where before it wouldn't.
 
Last edited:
Actually no error was being thrown, it just wasn't opening at all. I expanded the map, static and staidx memory - rounded each up to leave plenty of room.

There was 3 separate files which referred to those memory spaces if I remember right.
 
Did you compile the debug version also? I think I have it capturing the messagebox call so it may just appear to exit immediately, but you'll catch a glimpse of the message as the debug version closes.
 
I managed to grab a screenie as it flashed on the screen using the compiled debug version. Looks like you're right. It's claiming not enough virtual memory. But that really doesn't make sense to me, since everything works fine with the same map size without UltimaLive. Or am I missing something above my head?

adl.dropboxusercontent.com_u_5324554_UL_20Console.jpg
 
I am pretty confident about what is causing this issue.

http://msdn.microsoft.com/en-us/library/aa366778(v=vs.85).aspx

What essentially means is that 32 bit applications (like client.exe) have a virtual address space of 2 GB. Virtual address space isn't the amount of physical memory you have, but how much memory can be addressed. Since your map, statics, and staidx take up a lot of space other address space in the client gets fragmented and all of the files that the client needs to map into the virtual address space cannot fit.

We had this issue on our server about 6 years ago when the runuo.exe process went above 2gb when loading the world. Luckily, there is a workaround.
 
If you notice the note under x86, it says:

Up to 3 GB with IMAGE_FILE_LARGE_ADDRESS_AWARE and 4GT

That extra 1GB should be enough to load the client reliably. It's a flag that you can set on the client.exe, and will increase the limit.

There is a utility that is included with visual studio called editbin. You should be able to use it to modify your client exe and increase that limit to 3GB.

editbin /largeaddressaware client.exe
 
The fastest way of doing it is running the visual studio command prompt: start -> all programs -> visual studio version -> visual studio command prompt

Then change directory to where your client.exe is and use

Code:
editbin /largeaddressaware client.exe
Make sure you backup your client.exe first.
 
Ok, so that worked to now allow the client to open using the compiled debug .dll. However, still throwing what looks to be the exact error as before:

Code:
(((((((((((((Initializing Shard Maps)))))))))))))))))
Checking for C:\ProgramData\UltimaLive\\TheShatteredEmpire\map0.mul
File exists and is ok
Checking for C:\ProgramData\UltimaLive\\TheShatteredEmpire\map1.mul
File exists and is ok
Checking for C:\ProgramData\UltimaLive\\TheShatteredEmpire\map2.mul
File exists and is ok
Checking for C:\ProgramData\UltimaLive\\TheShatteredEmpire\map3.mul
File exists and is ok
Checking for C:\ProgramData\UltimaLive\\TheShatteredEmpire\map4.mul
File exists and is ok
Checking for C:\ProgramData\UltimaLive\\TheShatteredEmpire\map5.mul
File exists and is ok
Loading Map: C:\ProgramData\UltimaLive\TheShatteredEmpire\map0.mul
CLIENT HAS CRASHED!  Crash Report:
0018de70  | f4 7a 01 07 00 0f 01 00  00 00 00 00 00 4d 65 72 | .z...........Me
r |
0018de80  | 69 63 00 4d 63 3c de 18  00 83 00 00 00 05 00 00 | ic.Mc<.........
. |
0018de90  | 00 0f 00 00 00 00 00 00  00 58 77 76 63 4d 65 72 | .........XwvcMe
r |
0018dea0  | 69 63 00 00 00 00 00 00  00 00 00 00 00 00 00 00 | ic.............
. |
0018deb0  | 00 00 00 00 00 00 00 00  00 00 00 00 00 31 39 32 | .............19
2 |
0018dec0  | 2e 31 36 38 2e 32 2e 39  00 00 00 00 00 00 01 4b | .168.2.9.......
K |
0018ded0  | c0 00 00 05 69 67 72 70  69 6e 67 2e 64 6c 6c 00 | ....igrping.dll
. |
0018dee0  | 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 | ...............
. |
0018def0  | 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 | ...............
. |
0018df00  | 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 | ...............
. |
0018df10  | 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 | ...............
. |
0018df20  | 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 | ...............
. |
0018df30  | 00 00 00 00 00 00 00 00  43 52 41 53 48 00 00 00 | ........CRASH..
. |
0018df40  | 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 | ...............
. |
0018df50  | 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 | ...............
. |
0018df60  | 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 | ...............
. |
0018df70  | 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 | ...............
. |
0018df80  | 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 | ...............
. |
0018df90  | 00 00 00 00 00 00 00 00  00 00 00 00 00 d5 2b 40 | ..............+
@ |
0018dfa0  | a4 12 0f 31 94 64 0f 32  15 de 0f 32 12 f9 0f 31 | ...1.d.2...2...
1 |
0018dfb0  | df 4c 0f 35 d0 cb 0f 36  16 42 0f 35 c2 2c 0f 35 | .L.5...6.B.5.,.
5 |
0018dfc0  | 2c 3d 0f 35 08 fb 0f 35  10 ef 0f 35 e4 9b 0f 37 | ,=.5...5...5...
7 |
0018dfd0  | 49 73 0f 37 fc 7a 0f 36  31 7e 0f 37 54 47 0f 37 | Is.7.z.61~.7TG.
7 |
0018dfe0  | 55 25 0f 30 0b dc 00 46  41 2a                  | U%.0...FA*
  |

These are the edits I'm making to the source, do they seem accurate?

BaseFileManager.h Line 88

Code:
static const int STATICS_MEMORY_SIZE = 400000000;//changed 200000000 to 400000000

FileManager_7_0_29_2.h Lines 56 and 57

Code:
static const int MAP_MEMORY_SIZE = 300000000;//changed 100000000 to 300000000
static const int STAIDX_MEMORY_SIZE = 20000000;//changed 100000000 to 200000000

and FileManager.h Lines 52, 53 and 54

Code:
    static const int MAP_MEMORY_SIZE = 300000000;//changed 100000000 to 300000000
    static const int STAIDX_MEMORY_SIZE = 20000000;//changed 100000000 to 200000000
    static const int STATICS_MEMORY_SIZE = 400000000;//changed 200000000 to 400000000

Am I missing any other locations that refer to the map size, be it dimension or memory, in the source?
 
PS - Seriously. Thanks for giving this more than 5 minutes of attention. I realize this is highly specific to only me and my shard, and I really do appreciate any and all time you've spent trying to figure this out.
 
PS - Seriously. Thanks for giving this more than 5 minutes of attention. I realize this is highly specific to only me and my shard, and I really do appreciate any and all time you've spent trying to figure this out.
Not a problem at all. Not many people have attempted this so, and I want to make this system as stable as possible. I don't mind at all.
 
I just realized I may not have allocated enough map memory based on your calculation on the last page...trying it with more map memory allocated...
 
I was using a straight kb -> byte equation, when I should have been doing the block size equation you posted.

WOOHOO! Success! Thank you SO much Praxiiz. My god...finally.

Increasing the

Code:
static const int MAP_MEMORY_SIZE = 300000000;

to

Code:
static const int MAP_MEMORY_SIZE = 400000000;

...did the trick!
 
You're welcome, I am glad that it works! On another note, gone are the days of playing Ultima Online on a 486 with 16 megs of ram.....
 
This is true. I'll have to put together some tests and see what the minimum requirement to fire up the client will be before opening.

"This shard is only for those who can afford 32 gig RAM pc's.." might not be a huge selling point.
 
This resource has been removed and is no longer available for download.

I have reliquished control of UltimaLive to gametec. For a long time I was under the impression that using the Ultima Online client was breaking only the Terms of Service (TOS) for the game, meaning they would simply terminate your EA account and you would not have access to the official servers. I foolishly thought that somehow I still had license to use the software being that it freely downloadable from their website.

Today I finally did a deep dive to fine the actual license for the software, not just the Terms of Service. While reading through the TOS, I noticed the End User License Agreement (EULA) is actually contained in the TOS.

The software license agreement for the Ultima Online client reads as follows:

EA said:
The Ultima Online License.
Ultima Online is an Internet-based online fantasy role-playing game service that allows you to play the "Ultima Online" computer game when you subscribe and pay a fee, or when you participate through an Internet Game Room (IGR) pursuant to the IGR's rules. As part of the Ultima Online service, Electronic Arts maintains a site on the World Wide Web with a URL address of "www.uo.com" (the "Web Site"). Throughout the remainder of this Agreement, the Ultima Online service (including the Web Site) will be referred to as the "Service", if you have purchased the Ultima Online game CD-ROM published by Electronic Arts Inc. it will be referred to as the "CD" and the software programs contained on the CD and provided to you through the Service will be referred to as the "Software". Electronic Arts grants to you a limited, non-exclusive license to use the CD, the Software and the Service subject to all of the terms and conditions of this Agreement, and the additional terms set forth in the documentation of the CD.

The important part is
Electronic Arts grants to you a limited, non-exclusive license to use the CD, the Software and the Service subject to all of the terms and conditions of this Agreement, and the additional terms set forth in the documentation of the CD.

Aside from having your service (official EA account) terminated, the license to use the game client is also linked to the terms and conditions of the TOS agreement. If you break the TOS, EA/Broadsword online revokes your license to use the software.

The full agreement can be found here.

For this reason, I am uninstalling the software.

I will still be around, lurking and commenting, but until I can find (or write) a legal client that doesn't use any of EA's assets, graphics, content, art, and protocols, I will not be contributing much.
 
Last edited:
Status
Not open for further replies.

Active Shards

Donations

Total amount
$0.00
Goal
$1,000.00
Back