Primitive 0x0013 - Make New Character


Use

There is no SimPe wizard for this instruction, so the following table details the meaning of each of the operands.

OperandDescriptionOperand Values
0 Skin Tone 0x00 or 0xFF: Use default skin tone, life stage and gender
Otherwise: Value from Local[Op0]
1 Life Stage (Age) Value from Local[Op1]
2 Gender Value from Local[Op2]
3 Parent 2 (see Op9 Bit1)
4 & 5 Qualifiers on the variable in operand 3
6 Parent 1 (see Op9 Bit1)
7 & 8 Qualifiers on the variable in operand 6
9 - bit 1 Specify Parents? Off: No
On: Yes (parent 1 from Op6 and parent 2 from Op3)
9 - bit 2 Use NID for parent 1? Off: No
On: Yes, Op6 specifies a NID
9 - bit 3 Use NID for parent 2? Off: No
On: Yes, Op3 specifies a NID
9 - bit 4 Person Data Source GUID in Temp 0,1 Off: False
On: True
9 - bit 5 Person Data Source GUID in Temp Token Off: False
On: True
9 - bit 6 Character from Bin? Off: False
On: True
9 - bit 7 Thumbnail Outfit Off: Default
On: GUID in ... see bit 8
9 - bit 8 Thumbnail Outfit GUID in ... Off: Variable in Op10
On: Temp 2,3
10 Thumbnail Outfit GUID
11 & 12 Qualifiers on the variable in operand 10
13 thru 15 Unused

See Also


SimPe Code

// Decompiled with JetBrains decompiler
// Type: pjse.BhavNameWizards.WizPrim0x0013
// Assembly: pjse.coder.plugin, Version=4.0.3349.37576, Culture=neutral, PublicKeyToken=null

using SimPe.PackedFiles.Wrapper;
using System;

namespace pjse.BhavNameWizards
{
  public class WizPrim0x0013 : BhavWizPrim
  {
    public WizPrim0x0013(Instruction i)
      : base(i)
    {
    }

    protected override string Operands(bool lng)
    {
      byte[] numArray = new byte[16];
      ((byte[]) this.instruction.Operands).CopyTo((Array) numArray, 0);
      ((byte[]) this.instruction.Reserved1).CopyTo((Array) numArray, 8);
      string str1 = "";
      string str2;
      if (((int) numArray[9] & 1) != 0)
        str2 = str1 + Localization.GetString("Parent") + " 1" + (((int) numArray[9] & 2) != 0 ? " " + Localization.GetString("NeighborID") : "") + ": " + this.dataOwner(lng, numArray[6], numArray[7], numArray[8]) + ", " + Localization.GetString("Parent") + " 2" + (((int) numArray[9] & 4) != 0 ? " " + Localization.GetString("NeighborID") : "") + ": " + this.dataOwner(lng, numArray[3], numArray[4], numArray[5]);
      else
        str2 = str1 + Localization.GetString("bwp13_noParents");
      if (lng)
      {
        string str3 = str2 + ", " + Localization.GetString("bwp13_personDataSource") + ": (GUID) " + this.dataOwner((byte) 8, (ushort) 0) + ",1: " + (((int) numArray[9] & 8) != 0).ToString() + ", " + Localization.GetString("bwp13_personDataSource") + ": (GUID) temp Token: " + (((int) numArray[9] & 16) != 0).ToString() + ", " + Localization.GetString("bwp13_characterFromBin") + ": " + (((int) numArray[9] & 32) != 0).ToString() + ", " + Localization.GetString("bwp13_thumbnailOutfit") + ": " + (((int) numArray[9] & 64) != 0 ? "(GUID) " + (((int) numArray[9] & 128) != 0 ? this.dataOwner((byte) 8, (ushort) 2) + ",3" : this.dataOwner(numArray[10], numArray[11], numArray[12])) : Localization.GetString("default"));
        if (numArray[0] != (byte) 0 && numArray[0] != byte.MaxValue)
          str2 = str3 + ", " + Localization.GetString("bwp13_skinColor") + ": " + this.dataOwner((byte) 25, (ushort) numArray[0]) + ", " + Localization.GetString("bwp13_age") + ": " + this.dataOwner((byte) 25, (ushort) numArray[1]) + ", " + Localization.GetString("bwp13_gender") + ": " + this.dataOwner((byte) 25, (ushort) numArray[2]);
        else
          str2 = str3 + ", " + Localization.GetString("bwp13_defAgeGenderSkin");
      }
      return str2;
    }
  }
}