Titanium Trilogy custom mech lab

Post up issues you are encountering with MechWarrior 2 here, this includes Netmech.
Forum rules
Search before asking!
No Swearing!
Post Reply
User avatar
White Cat
I.S. Baby
Posts: 11
Joined: Mon Jun 02, 2008 7:01 pm

Titanium Trilogy custom mech lab

Post by White Cat »

So, I'm trying to play Ghost Bear Legacy Titanium on my WinXP SP2 system.

The game runs fine overall, but I can't get any custom .mek files to work (the "exceeds Keshik-defined maximum tonnage" error). Has anyone come up with a solution to this yet?

I have this problem intermittently with the Win95 (Pentium edition, I think) original Mech2 31CC, but was able to get around it by doing things like hitting "Exit Lab" after saving (instead of "Accept Mech"), or moving the .mek files out of and back into the MEK folder. None of these methods work here.

Does the "GBL_TitaniumXPpatcher.exe" file fix this problem, or is that just for making the game run overall? (I'm afraid to try it, in case it messes up my otherwise-working GBL.)

I also tried the "Titanium beta 1" patch from here, but it just says "You have a version of Mechwarrior 2 that isn't currently supported by this patch" and copies the following to the clipboard:

----------------------------------------------------------
[anet2.dll]
Size=84632
Checksum=c9952f3c1c745b19b1d8dc6a22c8d486

[gblwin.exe]
Size=16340
Checksum=104ad85c889bfac831aebac77ab685f7

[mw2shell.dll]
Size=534016
Checksum=541f55da21ae0147f3213e940a9ccf7d
----------------------------------------------------------

Now, according to this thread, there's a way to copy custom Mech configurations into the mw2.prj file, replacing the default mech configs. If no one knows of a simpler way, could someone tell me how to perform this procedure, either with the "PRJ explorer" mentioned in the thread, or even a hex editor like Xvi32? (I'm pretty computer-savvy, so I should be able to handle it if someone explains the process to me.)

In case you're wondering, I don't have the non-Titanium versions of GBL and Mercs, and IMHO the default mech setups are too awful to properly play the game with.
User avatar
Sir MMPD Radick
Clan Nova Captain
Clan Nova Captain
Posts: 1625
Joined: Tue Jan 22, 2008 10:07 am

Re: Titanium Trilogy custom mech lab

Post by Sir MMPD Radick »

Sorry to have to tell ya but the titanium versions have no solution except as you mentioned replacing the mechs via prj... (not quite accurate, there is a solution supposedly but I have never been able to verify it... slugs wrapper is supposed to solve the problem with titanium)
That however is less than fun to do every single time you need to switch mechs... my advice to you is to switch to MechWarrior 2 DOS, this problem is non existant in that version.

The MechWarrior 2 95 Pentium can be fixed though with a replacement dll from slugs patch.

You must use a hexeditor to do this, the prj viewer does not have the capability at present to add files to the prj.
The replacement in the prj file can be done via searching for MEK in MW2.prj .... but you have to have an exact file size.. in another words if you have a file that is of a different size... specifically larger you cannot add it without breaking the check that mech2 does to verify the prj... I have never done it, i never found a real reason to try.

I have only tried replacing the default config for a mission.. that is easier to do and may be a way around the problem, but I have never tried it in anything besides MW2 dos.. Catch with that is you would only be able to modify the default mech ... so in another words if the first mech is a Maddog you would be stuck in Maddog.. customized though if you chose a usr mech...

Sorry I wish I could help ya, but as i said... mw2 dos/ dos mercs/ dos gbl are the best solutions.
James 3:5-10: My Reminder
And the tongue is a fire, a world of iniquity: so is the tongue among our members, that it defileth the whole body. Out of the same mouth proceedeth blessing and cursing. My brethren, these things ought not so to be.
User avatar
White Cat
I.S. Baby
Posts: 11
Joined: Mon Jun 02, 2008 7:01 pm

Re: Titanium Trilogy custom mech lab

Post by White Cat »

Can the Titanium versions (in either enhanced or 8-bit installation) be converted to DOS or Win95 versions via CD spawns, or some other method?

How exactly was the "replacement dll from slugs patch" fix done? If I know that, maybe I can figure out how to do it for Titanium.
User avatar
Skyfaller
Clan 1st MechWarrior
Clan 1st MechWarrior
Posts: 1017
Joined: Sat Apr 12, 2008 2:58 am
Location: Germany
Contact:

Re: Titanium Trilogy custom mech lab

Post by Skyfaller »

Nice to see someone read all of this so thoroughly, it's rare :)

I'll see if I can finish working on replacing and adding files in the next few days, when I find the time.
User avatar
Sir MMPD Radick
Clan Nova Captain
Clan Nova Captain
Posts: 1625
Joined: Tue Jan 22, 2008 10:07 am

Re: Titanium Trilogy custom mech lab

Post by Sir MMPD Radick »

Aff, what Skyfaller said is true. I cannot thank you enough for reading, not many people actually read what we have posted in the open.
It gets quite annoying repeating the same things over and over.

As for conversion, that is not possible with Titanium; it is a completely different beast.
The replacement DLL that slug did was extensively modified; I am unable to point out exactly how he did it, but from what I understand he dissassembled it and reworked parts of the code after he did that. It is no easy task by any means; it is well beyond my skill level that is for certain.
James 3:5-10: My Reminder
And the tongue is a fire, a world of iniquity: so is the tongue among our members, that it defileth the whole body. Out of the same mouth proceedeth blessing and cursing. My brethren, these things ought not so to be.
User avatar
Skyfaller
Clan 1st MechWarrior
Clan 1st MechWarrior
Posts: 1017
Joined: Sat Apr 12, 2008 2:58 am
Location: Germany
Contact:

Re: Titanium Trilogy custom mech lab

Post by Skyfaller »

Here's a high-level description of how to replace MEK files in the PRJ manually:

- Enter MW2's GBL's mech lab
- Select the config to replace
- Use customize function, but save the config unchanged
- Use a hex editor find the config in the PRJ, there may be several matches
- Replace the config in the PRJ using the hex editor

This works only if the file to replace has the same size as the old file or the new file is smaller than the old one. I have integrated
support for this method in my PRJ viewer, but if the new file is larger, you have to append the file and a local header to the end of
the PRJ and change the pointers to the file. The catch: the local header links it to the other files in the same directory, so if MW2
uses the information in the local header, the local header would have to be changed, too, otherwise it would suffice to copy the old
file's local header.

Locating files in the PRJ manually isn't fun. You have to find the directory entry and follow it to the file, so I advise against
doing it manually, but if you feel up to it, here's the necessary info:

=====
MW2.prj
=====

MW2.prj is a binary file storing a file system.
There is a PROJ signature at offset 0, followed by the file size-7 (dword).
The names in the main directory are 4 bytes long, and are
immediately followed by the file offset (dword). These entries
begin at offset 26 = 1Ah. There may be an additional entry at
offset 12 = 0ch, but it does not fit into this pattern.

The number of entries is stored at offset 18h.

The offsets from the main directory point to the string INDX,
followed by the directory entries. The first Dword
after INDX contains the relative index of the associated
file names. The pointer to the file data (DWord) and the size
of the files (DWord) follow 2Eh=46 bytes after the INDX entry.
The entries are completed by zeroes.

Each file also has a header. The file header starts with the word DATA.
Directly behind the header is the relative offset to the next file, from
the first byte after the the relative offset, or 8 bytes from the marker
"DATA". The next DWORD describes the absolute offset to the previous
file, subtract 33h=51 bytes to find the marker "DATA". The DWORD after
that points to the actual data for this archive entry if you add 3. The
next bytes give the name of the directory that this file resides in. The next
12 bytes have an unidentifiable purpose. Finally, there is the file name
first without file extension, then the same with a file extension. Both
file names are padded with zero bytes to 16 bytes.
Noone
I.S. Baby
Posts: 1
Joined: Mon Jul 22, 2013 1:12 am

Re: Titanium Trilogy custom mech lab

Post by Noone »

Honestly, I wonder how hard patching the titanium version would really be.

Looking into the 95 version shows that the issue is extremely insignificant, just that the return from Kernal32.FindFirstFile and Kernal32.FindNextFile are not what the game expects them to be.

Still making a mess because I can barely read ASM as is ;p but it is really only a small bit of code that needs to be changed, and in only 1 function.

*I'm boredish, what can I say.
Post Reply