💾 Archived View for gemini.circumlunar.space › users › kalium › petz › rawlnz.gmi captured on 2023-11-04 at 12:13:56. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2023-09-28)
-=-=-=-=-=-=-
Raw LNZ files are a set of extra LNZ found in the poodle and alley cat breedfiles. These are used for breeding - when the game creates a second generation or higher pet from these breedfiles, it will reference the raw LNZ rather than the normal ones. This is done to make the second generation look different to the first. In the poodle, the raws ensure that all 2nd gens are born with the simple lamb cut rather than the fancy lion cut. In the alley cat, 2nd gen kittens have a rounder and more well-fed appearance, probably to reflect the fact that they were born and raised in your game as opposed to the 1st gens, which are implied to be tough street cats.
Using raw LNZ files, you can make breedfiles where the 2nd gens look very different to their parents, opening up more opportunities to get creative.
When the game creates a pet file, either at the AC or via breeding, it doesn't just look at one single LNZ file to determine how the pet would look, but several. Notice that at the top of a breedfile you'll have something like this:
[Default Linez File]
\ptzfiles\dog\dogmaster.lnz
This points to the shared dogmaster (or catmaster) lnz file, which are inside the respective resource.dll files. If you take a look at them (you can do this by opening the resource files in LNZ Pro) you'll see there isn't a lot of data except for a few items shared across all breeds. The breedfile inherits from this master LNZ and adds on the breed-specific features. It's basically saying to the game "hey, take this base file, and add on what's specified here".
In turn, the kitten/puppy stage inherits from the adult LNZ. So in the mutt puppy we have:
[Default Linez File]
\ptzfiles\dog\mt\mt.lnz
So in a basic breedfile we have a three-level chain of inheritance, in which each step adds extra information to the next, and the whole is used to create the adult and child lnz for the petfile:
puppy or kitten → adult → dogmaster or catmaster
(I don't know what would happen if you made a dog inherit from catmaster or a cat inherit from dogmaster. Maybe try it one day, but if things blow up or the results give you nightmares... uh, I didn't tell you to do anything. Honest.)
Now with a breed with raw files, the raws can either inherit from the master LNZ, or from the regular breed LNZ. In the poodle there's two separate inheritance chains. The regular puppy inherits from the regular adult, and the raw puppy inherits from the raw adult:
pdpup → pd → dogmaster (1st gen)
raw_pdpup → raw_pd → dogmaster (2nd gen)
And if you look at the poodle raws, you'll see they're full LNZ files. The game seems to reference the raws completely separately from the base LNZ to create a 2nd gen pet.
The Alley is a bit more complicated. In the adult raw we have:
[Default Linez File]
\ptzfiles\cat\ac\ac.lnz
and in the kitten raw:
[Default Linez File]
\ptzfiles\cat\ac\ackit.lnz
So the inheritance pattern for 2d gens here is:
raw_ackit → ackit → ac → catmaster (for creating the kitten stage)
and:
raw_ac → ac → catmaster (for creating the adult stage)
I would guess that this is because the Alley doesn't change as much as the poodle when bred, so there was no need to create a totally new file. If you look at the raw Alley files you'll see there isn't much in either. By contrast the 2nd gen poodle has a lot of changes and so having an entirely new set of LNZ was probably easier to implement.
If all of that seems a bit complex, think of the poodle as being two breedfiles in one, and the alley as having an extra set of overrides.
So now we know what raws are for and how they relate to the normal breed LNZ, what can we do with them?
The first experiment I tried was removing the raw LNZ files entirely from a breed that already has them, using the poodle as my test file. To do this, open LNZ Pro, right click on the LNZ filename in the left sidebar, and select the delete option. Do this for both the adult and baby LNZ, but only delete the raw files.
After saving the breed I then adopted a pair and bred them. They bred with no errors, and the baby had the same lion cut as a first gen poodle.
Second generation poodle with a lion cut
From this I would surmise that it is safe to remove existing raw files. Handy if you want to base a breed on the Alley or Poodle but don't need the raws because your 2nd gens don't change. I wouldn't say it's entirely safe, but my guess is that the game just checks for raws and falls back on the base lnz if they're not present.
So if it's possible to remove raws and not break anything, can you add raws to a file that didn't originally have them?
I tested this with the Mutt file. First of all I opened up the file and exported the existing adult and baby lnz (right click on the filename and select Save to File). Then I imported them back in. To do that click LNZ on the sidebar and select Add Resource. In the popup that appears, select the file you want to import it, the type LNZ, and the name of the file (keep the language as 1033). I named the imported files with the same naming convention as the poodle raws, so I now had:
MT
MTPUP
RAW_MT
RAW_MTPUP
Using this file I adopted two mutts and managed to breed them a couple of times with no crashes. But of course I didn't make any changes to the raw files, so the offspring didn't look unusual.
So then I tested making changes. In Ballz Info for the raw file, I changed the main body colour from the default mustard (105) to steel blue (115). Obviously 2nd gens can mutate into this colour, but my hopes were that adding it to the raw would make if the 2nd gen default. I adopted another pair from this file and bred them:
Second generation mutt with a steel blue coat
Success! I bred them a couple more times to make sure I hadn't gotten lucky with a chance mutation, but the offspring were consistently steel blue.
What happens if we try something a bit more ambitious? Using LNZ Live to preview (I pasted in the mutt raws and did the editing there), I added in some basic addball horns to the raw file:
Screenshot of a mutt with horns and a steel blue coat in LNZ Live
Nothing fancy, but this is just for testing. I saved the changes in LNZ Pro, and bred the mutts again:
A mutt with horns and a steel blue coat
Success! Well not totally, they came out fuzzy. But that's an issue with the quick and dirty addball work, not the raw lnz. If I was making a proper breedfile I'd have put in some real effort, but this was just to test the concept.
So in short it seems that yes, you can add raw lnz files to any breed, and the game will read from them as required. Just make sure they're named in the format RAW_(breed code) for the adult and RAW_(breed code and KIT/PUP) for the baby, and that they correctly inherit from the right files.
Note: I would suggest that for complex bodymods such as addballz, you should have your raw files inherit from dogmaster/catmaster.lnz instead of the default lnz for the breed, as the poodle does. Likewise, have the raw baby file inherit from the raw adult. That way you don't have to worry so much about things matching up perfectly, and it's not as complicated an inheritance pattern. If you have created them as I did, by exporting the base lnz and importing them back as raws, this should already be the case. Note also that your kitten/puppy raw should inherit from the adult raw. For example in my raw mutt puppy file, I have this:
[Default Linez File]
\ptzfiles\dog\mt\raw_mt.lnz
And in the adult raw file, point to the raw puppy file:
[Little one]
raw_mtpup.lnz
One frustrating aspect of hexing is that the scales and extensions can only get so big or small in 2nd gens - you can make 1st gens any size you want, but 2nd gens will only be born within certain size limitations. I had hoped that raw files could get around this limit by re-specifying the scales when breeding, but when I attempted to make giant poodles by adding oversize scales in the main and raw lnz, the offspring were still born smaller. So unfortunately they won't help with that particular problem.
Of course as the Alley demonstrates, you can still have different scales and extensions in the raw files. They just have to stay within the game's limits for 2nd gens.
Note also that using raws to make different looking 2nd gens only works if you're making a breedfile. If you just make a hexed pet without a separate breedfile and adopt it out, it won't breed true because the game will fall back on whatever breedfile it's from. So this is not a good way to do surprise adoptables! But its still opens up a new dimension of creativity for anyone who works wih breedfiles.