Maine Coon cat from the Petz games

Kalium's Petz

Great Dane dog from the Petz games

SCP Reader

September 2020 note: the parser bug where the command params were incorrect should now be fixed, but take note of the issue with the rand2 command (see Issues and Todos) at the bottom of this page.

(or: the petzy adventures of your friendly local curatorial shut-in)

The SCP reader is a small program I wrote to break down .scp files into a human-readable format based on what is currently (time of writing May 2020) understood about the file structure (see SCP Research for details). It reads in an scp and outputs a text file with the details. Note that it does not edit the scp, and the purpose of many details is still unknown; this program is intended to help further research into understanding the scp format.

Pictured below is part of the output textfile from the mouse scp:

Part of the output from the mouse .scp

(Want to know more about this stuff? Come join us on the Petz Hacking and Modding Discord!)

You will need some basic understanding of how to navigate a command line terminal to run the reader. A quick search for "command line basics" should give you what you need - all you should need to know is how to move between folders and run programs.

If you don't want to use the command line, there is now a web based version - see below.

Using the Reader

There are two versions of the reader, one web based, one command line based.

Web based

Extract the SCP you want to read and upload it at the Petz SCP Parser. This will return a text output in your browser.

Command line based

You can download the reader from my Github repo (feel free to fork and improve if you wish) or directly from here. Unzip to whatever location you prefer.

If you don't already have NodeJS installed, go get it. If you have no idea what that is, don't panic, it's just a framework that allows you to run Javascript from your computer's command line instead of the browser, where it normally runs. If you're not sure about versions, just get the one labelled "Reccomended for Most Users".

Now, in the command line, navigate to the folder that you unzipped the files to - it should be the one that contains the file reader.js. It'll probably be called 'petz-scp-reader' unless you changed it.

Command prompt in the reader directory.

Install the reader by typing 'npm install' into the command line. This shouldn't take long.

Now you're ready to go. I've included several scp files extracted from the game (Petz 4, if you're curious). You can read these in by typing 'node reader.js (name of scp)' into the command line. For example to read the mouse scp, type 'node reader.js mouse.scp'. You should see something like this:

Results of successfully reading an scp.

If you don't, check that you installed the reader, that you're in the right directory (it should contain both reader.scp and the file you want to read) and you inputted the command properly.

If you do, everything worked okay! Inside the reader directory you should see a file called 'output'. This is a plain textfile so you can open it in any text editor you choose.

Start of output for mouse.scp.

Extracting SCPs from the game

If you want to read in any scps other than the samples, you'll need to extract them yourself. Fortunately LNZ Pro makes that easy. Open up the file that contains the scp you want to read in - this will be either a breedfile, or one of the rez.dll files. Navigate to the scp in the left hand menu, right click, and choose "Save to file"

Saving the mutt scp.

Save it to your petz-scp-reader directory:

Saving the mutt scp.

You can now run the reader on your extracted scp!

Output for the mutt scp.

Issues and Todos


A note about the rand2 command: due to the way the verb table is structured, rand2 appears to be a separate command. It's actually a parameter of the command that comes before it, with the rand2 parameters being the upper and lower bound for the random number it returns. So if you see something in the output like:

27: playAction2, 18
2F: rand2, 01, 02

then interpret this as "playaction2(18, random-number-between-1-and-2)". 18 is the first parameter, the random number is the second.


Things I'd like to do sometime:

  • Fix the above!
  • Display cue and fudger names as per Reflet's SCP notes. - done.
  • Note how actions relate and flow from one to another (requested by Reflet).
  • Make a web-based version of the whole thing so you don't have to mess about with the command line. - done.