AI character and coordinate card format - RobotsOnDrugs/LibMai GitHub Wiki
[Note: this document is incomplete and is primarily for my own use at the moment to understand and improve code I wrote a couple years ago]
General Layout
Character, coordinate, and scene card files typically begin with a PNG image, but it is not strictly required. If the file begins with a PNG header, the file is read until the PNG footer. This data is used as the image in PNG format. Otherwise, the beginning of the file is considered the start of the character, coordinate, or scene data.
This document outlines the binary data in order and specifies the data type used in the API.
Card Type Header
This header is used to determine the type of card and to verify that the card is valid.
See ParseAiCharaTypeData
in https://github.com/RobotsOnDrugs/LibMai/blob/master/IllusionCards/AI/Cards/AiCharaType.cs for the code that parses this.
int
Load product number which always equals100
string
Identifier:【AIS_Chara】
,【AIS_Clothes】
, and【StudioNEOV2】
indicate character, coordinate, and scene data respectivelyVersion
Load version which always equals1.0.0
int
Languagestring
User IDstring
Data ID
Data Header
This header outlines the position of all the data objects contained in the card. See the constructor in https://github.com/RobotsOnDrugs/LibMai/blob/master/IllusionCards/AI/Chara/AiChara.cs for the code that parses this.
int
Size in bytes of all combined (contiguous) Block headersBlockHeader
MessagePack object containing a list of information objects for object data stored in the cardstring
Name of the object typeVersion
Version of the object type which is constant for each type and it must match the constant to be considered valid- See the
AiCharaCardDefinitions
record at https://github.com/RobotsOnDrugs/LibMai/blob/master/LibMai/AI/Cards/AiCharaCardDefinitions.cs for these constants
- See the
long
The byte offset of the objectlong
The size in bytes of the object
AI/HS2 Character objects
string
"Custom"
- Face
Version
versionfloat[]
shapeValueFaceint
headIdint
skinIdint
detailIdfloat
detailPowerint
eyebrowIdColor
eyebrowColorVector4
eyebrowLayoutfloat
eyebrowTiltChaFileFace.EyesInfo[]
pupilbool
pupilSameSettingfloat
pupilYint
hlIdColor
hlColorVector4
hlLayoutfloat
hlTiltfloat
whiteShadowScaleint
eyelashesIdColor
eyelashesColorint
moleIdColor
moleColorVector4
moleLayoutChaFileFace.MakeupInfo
makeupint
beardIdColor
beardColor
- Body
- Hair Coordinate Parameter GameInfo Status ParameterVerson2 GameInfoVersion2