Some tips for ResHacker users
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I'm not going to make tutorials on how to use ResHacker, but there are one or two things which seem to puzzle people and they keep asking me to fix up their breedz for them, so I'll put tips up here sometimes for frequently asked questions.

First off, there's the bitmap problem. If ResHacker sees a file which has the extension .bmp, it sees it as type "BITMAP" and refuses to let you replace a type "BMP" with it. The fact that a .bmp file is a bitmap but that we need it to be inserted as type BMP when we're changing furfiles or Adoption Centre pictures is what causes all the confusion. What you need to do first is to choose the .bmp that you want to use, for instance furry.bmp, and then rename it so that the extension is different, say to furry.bmm.
Next, go to your breed's BMP section in ResHacker, and either choose "add new resource" or "replace other resource" (depending on whether you want to add a furfile or replace a picture). Now via the "open file with new resource" button, choose furry.bmm and fill out "Resource type" with BMP, "Resource Name" with whatever name it's to have (such as Homebody for the persian Adoption Centre pic), and 1033 for "Resource langage". Then hit the "replace" button, and save. The bitmap should now be in place.

Then there is the "what happened to my breed's name?" problem. The breed is fine, shows up at the Adoption Centre, but with no name or a blank line or some such where the name should be. Why ResHacker does this, I have no idea, but you're going to have to use ResHacker to fix it up again. It needs something added to the String Table. Go to String Table, then 63, then 1033 and you probably see something like this:

STRINGTABLE
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
{
1000, "Homebody"
1001, "Persian"
}

with the name of your breed where "Persian" is and the pet-name at the AC where "Homebody" is. Change that by adding a couple of lines, so it looks something like this:

STRINGTABLE
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
{
1000, "Homebody"
1001, "Persian"
1002, "Pr"
1004, "Persian"
}

once again, with the name of your breed where "Persian" is. You need the "Pr" for pets to breed. If it's already there, of course you don't need to add it, just add the line which starts with 1004. If you are hexing a breed other than the persian and this happens, then you must make sure that the 2-letter mnemonic is the correct one for that breed, such as "Sc" for Scotties etc. You can tell what the mnemonic should be by opening the LNZ section, you'll see SC and SCPUP for the Scottie, PR and PRKIT for the persian. Whatever the two letters are for the first LNZ, those are the ones you need in the String Table after 1002.

As for the "my breed works fine, but ResHacker won't open it any more" question, my advice is to save out the .lnz files and any bitmaps via a hex editor, and then start again with a fresh base breed, because you may find that there could be problems with the breed in future. And when ResHacker crashes, I have no idea why that happens or how to prevent it. That's one of the reasons that I don't use it very often for editing, although I do use it a lot for viewing the contents of a file.

Then there's the business of the ID number. When you've ResHacked a file, the ID number gets shifted from its usual place. Normally if you look at an original file in a hex editor, the ID number, along with an instance of the Sprite name, is situated directly underneath what I call the "List of All That's In The File", which is a list that starts something like this (in a clothes file)

00005220 0300 4300 4C00 5A00 0300 4600 4C00 4800 ..C.L.Z...F.L.H.
00005230 0300 4600 4C00 4D00 0300 5400 5800 5400 ..F.L.M...T.X.T.
00005240 0F00 4300 4C00 4F00 5400 5F00 4800 4100 ..C.L.O.T._.H.A.
00005250 5400 4200 4F00 5700 5000 4900 4E00 4B00 T.B.O.W.P.I.N.K.

or this (in a breedfile)

0000D230 0000 0000 0000 0000 0300 4200 4D00 5000 ..........B.M.P.
0000D240 0400 5300 5000 4F00 5400 0300 4C00 4E00 ..S.P.O.T...L.N.
0000D250 5A00 0200 4400 4D00 0500 4400 4D00 5000 Z...D.M...D.M.P.
0000D260 5500 5000 0300 5300 4300 5000 0300 5400 U.P...S.C.P...T.
0000D270 5800 5400 0D00 4200 4500 5600 4500 4E00 X.T...B.E.V.E.N.
0000D280 5400 5F00 4400 4F00 4700 5F00 4400 4D00 T._.D.O.G._.D.M.

But when the file has been compiled and saved in Resource Hacker, the ID section is moved, in most cases down to the naming area of the file, which you can find in a hex editor by searching for the hex string 50004600

The part that contains the ID number is in fact, if you look in ResHacker, contained in the RCData section. In there it looks like this -- this example is a Babyz diaper, but the same format is there in all P.F.Magic dog, cat, clo, toy, env files from Petz 3 onwards

00008350 01 00 00 00 53 70 72 69 74 65 5F 43 6C 6F 74 5F ....Sprite_Clot_
00008360 44 69 61 70 65 72 57 68 69 74 65 00 00 00 00 00 DiaperWhite.....
00008370 00 00 00 00 57 68 69 74 65 20 44 69 61 70 65 72 ....White Diaper
00008380 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00008390 00 00 00 00 AB 3A 00 00 03 00 80 ....:.....

In this case the ID number is AB3A, and if you try to change that and save in ResHacker, it doesn't actually save the change. What you need to do with this, and as far as I know with any binary section of a Resource file, is to choose Action, then Save it out (in this case choose Save [RCData] resources), then edit it externally (in this case, preferably in a hex editor) and then choose Action and Replace other Resource.

NOTE: With binary files such as RCData, FLH, FLM, SPR, etc if you want to edit them you need to do this business of Saving them out to the hard drive and then editing them, then "Replace other resource". If you want to edit text files such as CLZ, or LNZ, or String Table, then you can do so directly in Resource Hacker, but remember to then "compile" before saving.

There you go. Enjoy.


Carolyn Horn