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.
intLoad product number which always equals100stringIdentifier:【AIS_Chara】,【AIS_Clothes】, and【StudioNEOV2】indicate character, coordinate, and scene data respectivelyVersionLoad version which always equals1.0.0intLanguagestringUser IDstringData 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.
intSize in bytes of all combined (contiguous) Block headersBlockHeaderMessagePack object containing a list of information objects for object data stored in the cardstringName of the object typeVersionVersion of the object type which is constant for each type and it must match the constant to be considered valid- See the
AiCharaCardDefinitionsrecord at https://github.com/RobotsOnDrugs/LibMai/blob/master/LibMai/AI/Cards/AiCharaCardDefinitions.cs for these constants
- See the
longThe byte offset of the objectlongThe size in bytes of the object
AI/HS2 Character objects
string"Custom"
- Face
Versionversionfloat[]shapeValueFaceintheadIdintskinIdintdetailIdfloatdetailPowerinteyebrowIdColoreyebrowColorVector4eyebrowLayoutfloateyebrowTiltChaFileFace.EyesInfo[]pupilboolpupilSameSettingfloatpupilYinthlIdColorhlColorVector4hlLayoutfloathlTiltfloatwhiteShadowScaleinteyelashesIdColoreyelashesColorintmoleIdColormoleColorVector4moleLayoutChaFileFace.MakeupInfomakeupintbeardIdColorbeardColor
- Body
- Hair Coordinate Parameter GameInfo Status ParameterVerson2 GameInfoVersion2