Petz Seed BruteForcing

By Sharon | Category: Breeding | Tags: seeds, selective breeds | Visibility: public

What is a Seed?

Simply put, a seed is a number generated when you pull a new pet out of the Adoption Center. This number determines what variations are chosen out of all the possibilities. For example, different seeds cause AC Sheepdogs to have long or bobbed tails, and different seeds cause AC Mutts to have different configurations of white patches and brown ears. These seeds are passed on through the many generations of bred petz.

How to Find a Seed

Necessary Tools:

https://julialang.org/ (for running PetzBruteForce)

https://code.visualstudio.com/ (for editing PetzBruteForce code)

PetzBruteForce

Petz Hacking and Modding Discord Server (for updated PetzBruteForce and SeedSetter code, and other petz hacking tools. Thanks, Reflet!)

PetzBruteForce Code Layout

Lines 1-18 should be left alone aside from line 4, where the file name can be edited to be more descriptive regarding what variations you are seeking (for documenting and sorting purposes)

Commented out code can be left alone.

Every variation block in the lnz can be identified by a beginning #(number) and subsequent #(number-1) until the end, which is marked with ##

There are two types of variation blocks.

UNLINKED variation blocks will not have a letter after the first #(number).

LINKED variation blocks will have some letter after the first #(number)

In the PetzBruteForce code, each variation block has a line of code where you input values to indicate what variation you do (or do not) want. You start from the top of the lnz and go through each UNLINKED variation block, and then go through each letter of LINKED variation blocks.

Here is an example

The first “2” (after >>) should always be left alone. It’s just part of the math that crunches the seeds. The second “2” (after the %) indicates the number of variations in this block. If working within the same breedfile as the bruteforcer is coded for, you can leave this alone. The third thing of note is the “!=” and fourth is the next number, “0”. Together, these indicate what variation you want. “!=” in this case means “we want this particular variation and nothing else” and 0 means variation 1 (closest to the end, nearest the ##) There is another possibly here, where instead it will say “==” and this means “we want any variation BUT this one”

The last feature is unique to PetzBruteForceDALMATIAN and code written off of it. It includes a scoring system. This is because there are so many possible variations that a seed likely does not exist for any single exact combination of spots you may be looking for. It will display seeds that meet a threshold score. “score+=10” means we are adding 10 to the current score if the variation is correct. If you value some spots more than others, you can adjust the weights by making more valuable spots increase the score more than less valuable spots.

And the corresponding lnz section

As described above, you can see this line in PetzBruteForceDALMATIAN says there are 2 variations in this block, and we want variation 1 (i.e, we want this spot to appear)

Consider the hypothetical variation block

#5
#4
#3
;toe spot
(paintball lnz here)
#2
#1
##

The corresponding line in BruteForcerDALMATIAN would look something like this

if (((GenerateRandom(gs) >> 2) % 5) != 2) score+=10; end

This means there are 5 variations in this block, and we want variation 3.

NOTE: when editing the variation number in the code, it counts up from 0, not 1 (think how texture lists start at texture 0) therefore variation 3 is coded as 2

If, instead, we didn’t want this spot, the most logical way to write it would be this

if (((GenerateRandom(gs) >> 2) % 2) == 2) score+=10; end

This time, it’s accepting any of the 4 variations that AREN’T variation 3, because only 3 has a spot.

If we don’t care about a particular variation block, the code will look like this

We run the generator to advance it by one and keep it in sync with the variations, but we don’t specify anything else (notice no “if” precedes it). In this case, we don’t care because we are looking for very spotty dalmatians, and this block has only 2 variations, each with 1 unique spot.

LINKED variations are a little different.

Leave line 277 (or its equivalent) alone

As we can see in the comment and the following code, we care about the letters B-E, and they work backwards from E.

The code also works backwards, from Z. Because there are no Z (Y, X, etc) variations, we loop the generator 21 times (from 0 to 20) representing Z-F. Then we reach E, and it mostly continues as normal variations from there.

Because there is no A linked variation in the Dalmatian lnz (and it is the “last” letter) we can ignore it.

In the PetzBruteForceDALMATIAN code (and code based off of it), line 285 (or its equivalent) is where you specify the threshold score (default 580) for being included in the seed list. If you set it too high, you may not get any qualifying seeds. If you set it too low, the seeds may be low quality and not be close to your specifications.

All other PetzBruteForce(breed) code does NOT have a scoring system, a seed either matches perfectly or is discarded. This is okay because most breeds do not have as many possibilities as Dalmatians.

NOTE: I will include seed bruteforcers set up for a selection of Petz 4 original breeds with interesting variations for breeding. I do not include OW files for Petz 4 or 5 breeds because I simply cannot include every file, and picking and choosing OW files (on what basis?) is a mire I do not wish to find myself in. It is my hope that by providing documentation and examples, you are able to edit the PetzBruteForce code to suit your particular needs.

(note to self: calico, alley cat, siamese, b+w shorthair to be added)

How to Run the PetzBruteForce code

For ease of access I usually stick the one I'm using directly on my desktop, but you can put it in a folder somewhere if you wish.

Type the first line, click enter. The second line will pop up while its working. The third line will appear when it is finished, and a .txt file of the name provided in the code will be created.

How to Use the SeedSetter

  1. Put AA_SeedSetter.toy into “resource/toyz”
  2. Open Petz 4 and go to the Adoption Center
  3. Make sure “Options > Manually set AC pet seeds” is checked
  4. Take out desired breed
  5. Enter desired seed
  6. Adopt pet with your chosen variation seed!

Note: Up to seed FFFF (hexadecimal) come out of the AC naturally, HOWEVER: Petz accepts seeds up to FFFFFFFF (hexadecimal) BUT they only come out of the AC if forced with seedsetter

Comments

No comments yet. Be the first to say something!

Log in to post a comment.