CharacterAppearance
class SoftKitty.MasterCharacterCreator.CharacterAppearance
CharacterAppearance represents a data class for all the appearance settings of a character. Holding information such as its gender, race, body shape, skin color, hair setting, outfit id and custom outfit color.
Properties
public string _Name
The name of the character.
public CharacterData _CharacterData
The base data of the character, such as its gender, race, body shape, skin color, hair setting.
public class CharacterData{
public byte Sex = 0; //Gender 0-Male 1-Female
public byte Race=0; //Race id
public byte[] DataFloat = new byte[120]; //Float values for shape sliders (0~100)
public Uint8Color[] DataColor = new Uint8Color[15]; //Custom colors in Uint8Color format.
public byte[] DataInt = new byte[10]; //Int values for texture/model id, such as hair id, lip id, etc.
}
Uint8Color is a compressed format for colors, each color channel is a byte value from 0~255.
public class Uint8Color
{
public byte r;
public byte g;
public byte b;
public byte a;
}
public byte[] _OutfitID
The id list of the outfits. The array index matches the index of the OutfitSlots enum.
enum SoftKitty.MasterCharacterCreator.OutfitSlots
{
Armor, //0
Helmet, //1
Gauntlet, //2
Boot, //3
Pants, //4
Back, //5
Tail //6
}
public Uint8Color[] _CusColor1 | _CusColor2 | _CusColor3
The custom colors of the outfits. The array index matches the index of the OutfitSlots enum.
enum SoftKitty.MasterCharacterCreator.OutfitSlots
{
Armor, //0
Helmet, //1
Gauntlet, //2
Boot, //3
Pants, //4
Back, //5
Tail //6
}
Uint8Color is a compressed format for colors, each color channel is a byte value from 0~255.
public class Uint8Color
{
public byte r;
public byte g;
public byte b;
public byte a;
}
public Sex _Sex
The gender of the character.
enum SoftKitty.MasterCharacterCreator.Sex
{
Male,
Female
}
public int _Race
(readonly)
The race id of the character, this is a quick access of: _CharacterData.Race
Methods
public bool isSameAs(CharacterAppearance _target)
Compare two CharacterAppearance class and return whether their data is the same.
public void DefaultValue()
Reset the data to default values.
public void Load(byte[] _bytes, DataVersions _dataVersion= DataVersions.Lastest)
Load the CharacterAppearance from a byte array. Because we have changed the data structure in the previous versions, so a DataVersions parameter is required:
enum SoftKitty.MasterCharacterCreator.DataVersions
{
Before_v1_3,
Before_v1_5,
Lastest
}
public byte[] ToBytes(BlurPrintType _bluePrintType = BlurPrintType.AllAppearance)
Convert the CharacterAppearance to a byte array, BlurPrintType parameter is the filter of the data that will be included in the byte array:
enum SoftKitty.MasterCharacterCreator.BlurPrintType
{
BodyShape, //Only include the body shape data
Character, //Only include the character base data such as body shape, face shape, hair, accessories,skin color.
Outfits, //Only include the outfit id and custom outfit colors
AllAppearance //Include all data.
}