Monday, April 29, 2013

Screwing around with Starter Families

Most players of C3/DS are aware of the Welcome Screen that greets you whenever you create a new world. One of the options on this screen gives you two adult, pre-trained norns to start off with. This was fine and dandy back in the day, but now with all the improved genetics running around, the default genomes the starters use is really outdated.

So I decided to look into the possibility that the starters could be messed with. This sounds simple, but the starter families use a unique file type (.family), which I wasn't certain could be edited. However, changing these files around is not difficult at all - the way the .family files are composed is almost identical to the way normal .creature files are composed.

A little background info first: Compiling a .creature file uses PRAY, just like .agent files do. However, the way the file's set up looks quite a bit different from an .agent file:

"en-GB"

inline GLST "001-mist-jru57-bwdgq-xp8h2-65prp.glist.creature" "001-mist-jru57-bwdgq-xp8h2-65prp.glist.creature"

inline CREA "001-mist-jru57-bwdgq-xp8h2-65prp.creature" "001-mist-jru57-bwdgq-xp8h2-65prp.creature"

inline GENE "001-mist-jru57-bwdgq-xp8h2-65prp.genetics" "001-mist-jru57-bwdgq-xp8h2-65prp.genetics"

inline PHOT "001-mist-jru57-bwdgq-xp8h2-65prp-2.photo" "001-mist-jru57-bwdgq-xp8h2-65prp-2.photo"

group EXPC "001-mist-jru57-bwdgq-xp8h2-65prp"
  "Creature Age In Ticks" 552
  "Creature Life Stage" 4
  "Exported At Real Time" 1367289044
  "Exported At World Time" 8007
  "Gender" 2
  "Genus" 2
  "Pregnancy Status" 0
  "Variant" 4
  "Creature Name" ""
  "Exported From World Name" "Engineering"
  "Exported From World UID" "ship-6v34z-wncpq-65jll-srkjr"
  "Head Gallery" "A40a"

I'm not quite sure what GLST and CREA are supposed to do - I'm guessing the former has something to do with life events, but the latter just seems recursive (considering the finished file is a .creature file). GENE and PHOT are the creature's genetics and photographs, respectively. This particular PRAY file came from a C3 standalone creature, so there's probably some additional information in the PRAY files for a DS creature.

What exactly all this means isn't important at the moment, however - what's important is how this relates to .family files. As it turns out, .family files also use PRAY and are compiled almost identically to .creature files:

 "en-GB"

inline GLST "001-time-6rja3-nmfrr-hsfgz-ubtj2.glist.creature" "001-time-6rja3-nmfrr-hsfgz-ubtj2.glist.creature"

inline CREA "001-time-6rja3-nmfrr-hsfgz-ubtj2.creature" "001-time-6rja3-nmfrr-hsfgz-ubtj2.creature"

inline GENE "001-time-6rja3-nmfrr-hsfgz-ubtj2.genetics" "001-time-6rja3-nmfrr-hsfgz-ubtj2.genetics"

inline PHOT "001-time-6rja3-nmfrr-hsfgz-ubtj2-4.photo" "001-time-6rja3-nmfrr-hsfgz-ubtj2-4.photo"

group SFAM "001-time-6rja3-nmfrr-hsfgz-ubtj2"
  "Creature Age In Ticks" 856
  "Creature Life Stage" 4
  "Exported At Real Time" 965732356
  "Exported At World Time" 1357
  "Gender" 1
  "Genus" 1
  "Pregnancy Status" 0
  "Variant" 3
  "Creature Name" ""
  "Exported From World Name" "Training ground"
  "Exported From World UID" "ship-hd4jj-kfwpp-7ts2c-3qxay"
  "Head Gallery" "A00a"

Literally the only difference between .family files and .creature files is the fact that the PRAY group for .family files is SFAM rather than EXPC. Which means that if you take the PRAY file of a normal .creature file, change EXPC to SFAM, and recompile the file, you get a file that the game can use as a starter parent.

And here's how you do that:
1. Export a creature of your choosing.
2. Decompile the .creature file into its component parts somehow (REVELATION works extremely well, and I believe the PRAY Decompiler at TCR can also break it down. Jagent can't handle .creature files as well as it can .agents files, unfortunately, so I wouldn't recommend using it in this case).
3. Find the .ps file and open it up (if you're using Windows, Notepad can open it and edit it without issues)
4. Find the line that begins "group EXPC..." Change EXPC to SFAM.
5. Now grab all the parts that decompiling the .creature file gave you (.creature, .glist.creature, .genetics, and .photo) in addition to to your altered .ps file and recompile it (I used PRAYBuilder for this - considering Monk's difficulty decompiling .creature files, I'm not sure if it'll work for compiling them).
6. You'll get a .agents file. Change the extension to .family (ignore any warnings your OS might give you about doing this).
7. That's it! You can now put the .family file into your "My Agents" folder (though I recommend replacing one of the default .family files - I haven't gotten around to testing what happens if you just drop it in there). When you create a new world, select the Starter Parent option and one of the creatures that gets dropped in should be the one you exported earlier.

More testing remains to be done concerning this subject (particularly if the choice of starter parent can be randomized), but the fact that it can be changed at all can make the early game a little more interesting. Let me know what you come up with!

Edit: So I just decompiled a .ds.creature file, and turns out PRAY files for those look a bit different:

 "en-GB"

inline GLST "001-star-tnhhf-mp5aj-nq88u-suksv.DSEX.glist.creature" "001-star-tnhhf-mp5aj-nq88u-suksv.DSEX.glist.creature"

inline CREA "001-star-tnhhf-mp5aj-nq88u-suksv.DSEX.creature" "001-star-tnhhf-mp5aj-nq88u-suksv.DSEX.creature"

inline GENE "001-star-tnhhf-mp5aj-nq88u-suksv.DSEX.genetics" "001-star-tnhhf-mp5aj-nq88u-suksv.DSEX.genetics"

inline PHOT "001-star-tnhhf-mp5aj-nq88u-suksv-2.DSEX.photo" "001-star-tnhhf-mp5aj-nq88u-suksv-2.DSEX.photo"

inline PHOT "001-star-tnhhf-mp5aj-nq88u-suksv-7.DSEX.photo" "001-star-tnhhf-mp5aj-nq88u-suksv-7.DSEX.photo"

group DSEX "001-star-tnhhf-mp5aj-nq88u-suksv.DSEX"
  "Creature Age In Ticks" 712
  "Creature Life Stage" 4
  "Exported At Real Time" 1367291960
  "Exported At World Time" 450487
  "Gender" 2
  "Genus" 1
  "Pray Extra Tint_Blue" 128
  "Pray Extra Tint_Green" 128
  "Pray Extra Tint_Red" 132
  "Pray Extra Tint_Rota" 128
  "Pray Extra Tint_Swap" 128
  "Pregnancy Status" 0
  "Variant" 4
  "Creature Name" ""
  "Exported From World Name" "Crystal Cave"
  "Exported From World UID" "dock-y8fwb-r7knm-65q4j-dja5a"
  "Head Gallery" "a40w"
  "Last Network User" ""
  "Native Network User" ""
  "Pray Extra Birthday" "29 Apr 2013 23:18"
  "Pray Extra Moniker" "001-star-tnhhf-mp5aj-nq88u-suksv"
  "Pray Extra Pregnant" ""

And here's what DS .family files look like:

"en-GB"

inline GLST "001-aqua-hgru4-5fevv-aaz32-7npj8.DFAM.glist.creature" "001-aqua-hgru4-5fevv-aaz32-7npj8.DFAM.glist.creature"

inline CREA "001-aqua-hgru4-5fevv-aaz32-7npj8.DFAM.creature" "001-aqua-hgru4-5fevv-aaz32-7npj8.DFAM.creature"

inline GENE "001-aqua-hgru4-5fevv-aaz32-7npj8.DFAM.genetics" "001-aqua-hgru4-5fevv-aaz32-7npj8.DFAM.genetics"

inline PHOT "001-aqua-hgru4-5fevv-aaz32-7npj8-3.DFAM.photo" "001-aqua-hgru4-5fevv-aaz32-7npj8-3.DFAM.photo"

group DFAM "001-aqua-hgru4-5fevv-aaz32-7npj8.DFAM"
  "Creature Age In Ticks" 1196
  "Creature Life Stage" 4
  "Exported At Real Time" 995030875
  "Exported At World Time" 1698
  "Gender" 1
  "Genus" 1
  "Pregnancy Status" 0
  "Variant" 7
  "Creature Name" ""
  "Exported From World Name" "Space camp"
  "Exported From World UID" "dock-rszby-82syq-c4an3-xpapx"
  "Head Gallery" "a00d"
  "Last Network User" ""
  "Native Network User" ""

Now that's a more significant difference than the C3 versions. I haven't tried making a DS .family file yet, but it's lesser priority for me since DS gives you the option to just go into the game, but I'm going to give it a shot eventually. If you want to give it a shot yourself, let me know what comes of it!