--> Litter Swapping

LITTER SWAPPING


When a pet becomes pregnant, its kittens' data is stored in two sections in its file: the kittens' LNZ sections, one for each kitten, and the gene section, which all kittens in a litter share.

The kitten LNZ data is individual and listed consecutively, found below the pet's gene section and above its post-YALP p f magic. Editing a kitten's LNZ data will not affect its genes, so the offspring of edited kittens will remain the same.

Note the term 'kittens' is used for offspring in this documentation, but these procedures will work on puppies as well.


To start, we have four gen1 catz: two Siamese cats, Miso (♀) and Sesame (♂), and two Japanese Bobtails, Bobbi (♀) and Beebee (♂).

Both pairs are mated and have four kittens each. The test subjects we'll be focussing on are the two mother cats, Miso and Bobbi.

First, using the method detailed in Balancing a Checksum, we'll prep and take the Sum-32s of each cat, noting them down for later. For this procedure to work, you will need to prep with both ÿ's and a significant amount of !'s, as balancing this edit requires an extra step.

Aim to prep with around 800 !'s. Yes, really. This procedure will be a lot easier once we can just regenerate petz' checksums, until then we must suffer and dirty our hands for science.

For this test, we will swap the first kittens of each litter. Navigating to under both pets' gene sections, we can see the first kitten's LNZ data start here:

Then end here:

We'll highlight from the first [Texture List] to the last byte before the 00s begin, this may be too many, or not enough, bytes to edit but we will shield our eyes from reality and edit this many anyway.

When both kittens are highlighted, you will be able to see the length of the data on your hex editor's UI somewhere. Each kitten has a different length depending on its breed, and swapping a smaller kitten for a bigger (without extra balancing) will corrupt the pet.

Note down the lengths of both kittens, this data is needed later.

After highlighting both, we'll copy the data from one and paste it into the other, and vice versa. It is worth pasting the data into notepad first, so you don't lose the second kitten as you paste over it.

Next generate another Sum-32 for each mother, and compare it with the first. If the second Sum-32 is lower than the first, balance the file as usual and save your edit.

If the second Sum-32 is higher than the first, you will need to delete bytes from your prep section until it is lower than the first. This is what the extra !'s are for from your prep, calculate how many bytes the bigger kitten had added to the file with [bigger kitten length - smaller kitten length] and delete as many ! bytes as needed.

Then just balance the file as normal, using the first Sum-32 and the new lower Sum-32.

With the edits saved, let's see the new litters! We'll start with Bobbi and Beebee's kittens.

Well, that's definitely not a Bobtail.

The transplanted kitten has been named Cuckoo, it seemed fitting as cuckoo birds throw other birds' eggs out of their nests and replace them with their own.

Bobbi seems equally wary of all her kittens, not noticing anything different with Cuckoo. Bobtails randomly mutating tails must be a normal occurrence then.

All grown up, it is clear that Cuckoo contains no trace of Siamese personality. She is lively and patient, though almost immediately picked a fight with Beebee when first introduced.

Weirdly enough, Cuckoo is a purebred Bobtail, despite clear evidence otherwise. When she was bred with a clone of herself, all of her kittens were perfect Japanese Bobtails, as her genes were still inherited from Bobbi and Beebee's.

She is also mute, which is unsurprising, considering how easy it is for petz' sound files to break.

Overall, Cuckoo is now a very cute Bobtail. Just a strange lady who was absolutely not adopted.

On the flip side, Miso and Sesame's kittens are equally normal.

As expected, a litter of four completely regular Siamese cats are born.

Miso is somewhat unconvinced, but ultimately sees no difference in her new kitten, Imposter.

Grown up, Imposter acts and poses as aloof as a typical Siamese. Mute as well, but ultimately fitting in normally.

Imposter is, of course, also a purebred Siamese. His offspring were all perfect Siamese kittens as well.

Moments after this picture was taken, Sesame picked a fight with all of his children. Another happy and natural family!


BONUS

Swapping a puppy for a kitten ends exactly as you would expect, with the transplated offspring coming out completely mangled.

Puppies generally have many more bytes than kittens, so balancing this took over 2000 !'s, which was tedious but doable with enough patience.

Certainly looks like a BW cat to me.

Aside from cross-species abominations, not many other uses have been found for this procedure. The mute offspring may be due to editing too much of the kitten LNZ data, as the first chunk generally handles the sounds used.

Either way, it can make for some mildly confusing family trees!


Untested possibilites:

- swapping all four kittens in a litter to be different breeds, purely as a test of patience
- swapping a litter for bunny/pig offspring, using Carolyn's breedable pig/bunny hex