Changing the personality values of a .pet
This tutorial is based on information shared by Shaina @ Kizmet - for more information on personalities and editing the personality values of a breedfile, take a look at this RKC thread.
You will need a hex editor. I will be using Hexplorer for this tutorial. Other hex editors will also work.
You will need a hex editor. I will be using Hexplorer for this tutorial. Other hex editors will also work.
Before you edit your .pet, make sure you make a copy and put it somewhere safe. Editing .pet files in a hex editor can corrupt them if you make a mistake!
This is Merrlylegs. We are going to check her personality values using Reflet's goal descriptor. This isn't necessary to edit the traits but will give us some insight into what we might want to change!
Merrylegs is a Petz 4 pet so we need to look at the first column. If you use Petz 5, look at the second column.
Merrylegs is a first generation Orange Shorthair so, like all oshies, she has very low Confidence (7).
I would like to give Merrylegs higher confidence - say 50 - and I would like to also give her maximum (100) Insanity!
Merrylegs is a first generation Orange Shorthair so, like all oshies, she has very low Confidence (7).
I would like to give Merrylegs higher confidence - say 50 - and I would like to also give her maximum (100) Insanity!
Let's load up Merrylegs' file in Hexplorer. Then click the Edit menu and choose Find. In the "Text" field, type in YALP as shown in the image above and then click Find.
Now start scrolling down from here until you find the next instance of p. f. magic written on the right. It should look something like this:
The location of every personality value stays the same so all you need to know is how many bytes along each one is and you can easily find them! Here is a list:
Liveliness 968
Playfulness 991
Independence 1014
Confidence 1037
Naughtiness 1060
Acrobaticness 1083
Patience 1106
Kindness 1129
Nurturing 1152
Finickiness 1175
Intelligence 1198
Messiness 1221
Quirkiness 1244
Insanity 1267
Constitution 1290
Metabolism 1313
Dogginess 1336
In Hexplorer you can highlight the p in p.f. magic, hold shift, and start scrolling down. A counter at the bottom tells you how many bytes you have highlighted.
In this example I am scrolling down to the location of the Confidence trait. Watch the counter at the bottom that says "Selection:". We need to scroll down 1037 bytes and then the next number is our Confidence value!
Liveliness 968
Playfulness 991
Independence 1014
Confidence 1037
Naughtiness 1060
Acrobaticness 1083
Patience 1106
Kindness 1129
Nurturing 1152
Finickiness 1175
Intelligence 1198
Messiness 1221
Quirkiness 1244
Insanity 1267
Constitution 1290
Metabolism 1313
Dogginess 1336
In Hexplorer you can highlight the p in p.f. magic, hold shift, and start scrolling down. A counter at the bottom tells you how many bytes you have highlighted.
In this example I am scrolling down to the location of the Confidence trait. Watch the counter at the bottom that says "Selection:". We need to scroll down 1037 bytes and then the next number is our Confidence value!
I want to change this value to 50. However, I can't just type in '50' because the values in this file are not written in normal decimal numbers - they are in hexadecimal.
So the first thing I need to do is convert 50 to hex. Don't worry, you can do this really easily by just typing "50 in hex" into the Google search bar. Alternatively, there are many online converters such as this one.
50 in hexadecimal is 32.
Now replace the old value with this new one:
So the first thing I need to do is convert 50 to hex. Don't worry, you can do this really easily by just typing "50 in hex" into the Google search bar. Alternatively, there are many online converters such as this one.
50 in hexadecimal is 32.
Now replace the old value with this new one:
Now our pet has a Confidence value of 50. However, if we try to load the .pet in the game, it will appear to be corrupted.
That is because we need to balance something known as the 'checksum' which essentially means that adding a higher value anywhere in the file needs to be balanced by taking that value away somewhere else - and vice versa.
Luckily, Reflet created PetzByte which will do this for you!
You need to download Python to run it and it may not work as intended on some machines. If this happens, you will need to use the command line to run it.
If necessary, it's also possible to do this calculation manually...
That is because we need to balance something known as the 'checksum' which essentially means that adding a higher value anywhere in the file needs to be balanced by taking that value away somewhere else - and vice versa.
Luckily, Reflet created PetzByte which will do this for you!
You need to download Python to run it and it may not work as intended on some machines. If this happens, you will need to use the command line to run it.
If necessary, it's also possible to do this calculation manually...
The dreaded checksum - balancing it manually
Now stick with me! This specific example is more complicated than most because I wanted to show a 'worst case' scenario. Keep reading for the easier scenario!
Without going into detail, balancing the checksum just means that if we remove anything from the file, we need to add it in somewhere else. And vice versa. So in this case we changed a value of 07 to a value of 32. That means we added something that we will have to take away from somewhere else.
Start by converting these two numbers back to decimal:
07 in hex is in fact still 7 in decimal. And 32 is 50.
The difference between the two is 50-7=43. So we have to take out 43!
To do this we first need to subtract 43 from 100 (=57) and then convert this number back into hex.
Using the converter, we can see that 57 in decimal is 39 in hex.
So now we know that we need to replace a 64 (=100 in hex) with a 39.
Scroll back up to the p.f. magic you started counting bytes from. Above this, between "YALP" and this "p. f. magic", there is a section where it seems you can safely change values in order to balance the checksum. You will find various values here including 00s and 64s.
What we need to do in this case is replace one of these 64s with the number we calculated, 39.
Without going into detail, balancing the checksum just means that if we remove anything from the file, we need to add it in somewhere else. And vice versa. So in this case we changed a value of 07 to a value of 32. That means we added something that we will have to take away from somewhere else.
Start by converting these two numbers back to decimal:
07 in hex is in fact still 7 in decimal. And 32 is 50.
The difference between the two is 50-7=43. So we have to take out 43!
To do this we first need to subtract 43 from 100 (=57) and then convert this number back into hex.
Using the converter, we can see that 57 in decimal is 39 in hex.
So now we know that we need to replace a 64 (=100 in hex) with a 39.
Scroll back up to the p.f. magic you started counting bytes from. Above this, between "YALP" and this "p. f. magic", there is a section where it seems you can safely change values in order to balance the checksum. You will find various values here including 00s and 64s.
What we need to do in this case is replace one of these 64s with the number we calculated, 39.
Now save and check out your edited .pet!
The easier checksum scenario...
Ok Merrylegs doesn't tremble any more... But I also want to make her insane! So we're going to follow the same steps but now we're going to scroll 1267 bytes from the p in p.f. magic...
Merrylegs currently has an insanity value of 00. I am going to change it to 64.
This time balancing the checksum is easy! Scroll up again to above the p.f. magic, find any 64, and change it to 00!
Save!
If you change a personality value from anything to either 00 or 64, manually balancing the checksum is easy.
For example, if we had taken the initial confidence value of 07 and made it 64, all we would have had to do is find a 64 to change to 07... Or if we had changed the 07 to 00, we would have had to find an existing 00 and changed it to 07. Simple.
So balancing the checksum is easy if you stick to only changing the value to either the maximum (64) or minimum (00). But if you want to do anything else, you'll have to do a few simple calculations and conversions.
For example, if we had taken the initial confidence value of 07 and made it 64, all we would have had to do is find a 64 to change to 07... Or if we had changed the 07 to 00, we would have had to find an existing 00 and changed it to 07. Simple.
So balancing the checksum is easy if you stick to only changing the value to either the maximum (64) or minimum (00). But if you want to do anything else, you'll have to do a few simple calculations and conversions.