Documentation
¶
Index ¶
- Constants
- Variables
- func AddLengthPrefix(payload []byte) []byte
- func DecodeKCESJSONText(data []byte, extension string) (json.RawMessage, error)
- func DecodeKCESPayload(data []byte, extension string) (any, error)
- func EncodeClothParamsFile(params *ClothParams, extension string) ([]byte, error)
- func EncodeColorPreset(value *ColorPreset) ([]byte, error)
- func EncodeColorPresetOrderList(value *ColorPresetOrderList) ([]byte, error)
- func EncodeColorPresetSlot(value *ColorPresetSlot) ([]byte, error)
- func EncodeDB2Conf(value *MagicaClothSerializeData) ([]byte, error)
- func EncodeDBCol(value *ColliderPackage) ([]byte, error)
- func EncodeDBConf(status *DynamicBoneStatus) ([]byte, error)
- func EncodeDSB2Conf(value *MagicaClothSerializeData) ([]byte, error)
- func EncodeDSBConf(value *ClothParams) ([]byte, error)
- func EncodeDSL2Conf(value *MagicaClothSerializeData) ([]byte, error)
- func EncodeDSLCol(value *ColliderPackage) ([]byte, error)
- func EncodeDSLConf(value *ClothParams) ([]byte, error)
- func EncodeDynamicBoneStatusFile(status *DynamicBoneStatus) ([]byte, error)
- func EncodeExpandedKCESPreset(value *ExpandedKCESPreset) ([]byte, error)
- func EncodeGP03Bridge(value *GP03BridgeFile) ([]byte, error)
- func EncodeGradPointsData(value *GradPointsData) ([]byte, error)
- func EncodeHairMakeSave(value *HairMakeSave) ([]byte, error)
- func EncodeHitCheck(value *HitCheck) ([]byte, error)
- func EncodeIKCol(value *IKColliderPackage) ([]byte, error)
- func EncodeIKColBytes(value *IKColliderPackage) ([]byte, error)
- func EncodeKCES2GradPointsData(value *KCES2GradPointsData) ([]byte, error)
- func EncodeKCES2ItemFavouriteStateSetting(value KCES2ItemFavouriteStateSetting) ([]byte, error)
- func EncodeKCESBridgeSession(value *KCESBridgeSession) ([]byte, error)
- func EncodeKCESExportNameMap(value *KCESExportNameMap) ([]byte, error)
- func EncodeKCESExportNameMapJSON(value *KCESExportNameMap) ([]byte, error)
- func EncodeKCESJSONText(value json.RawMessage, extension string) ([]byte, error)
- func EncodeKCESPaths(value *KCESPathsFile) ([]byte, error)
- func EncodeKCESPayload(value any, extension string) ([]byte, error)
- func EncodeKCESPreset(preset *KCESPreset) ([]byte, error)
- func EncodeKCESPresetBodyData(value *KCESPresetBodyData) ([]byte, error)
- func EncodeKCESPresetColorData(value *KCESPresetColorData) ([]byte, error)
- func EncodeKCESPresetEditBaseData(value *KCESPresetEditBaseData) ([]byte, error)
- func EncodeKCESPresetEditUnitData(value *KCESPresetEditUnitData) ([]byte, error)
- func EncodeKCESPresetPropertyData(value *KCESPresetPropertyList) ([]byte, error)
- func EncodeKCESSystemData(value *KCESSystemData) ([]byte, error)
- func EncodeKCESUndressData(value *UndressArchiveTarget) ([]byte, error)
- func EncodeKCESUndressPartsData(value *UndressPrecomputeTarget) ([]byte, error)
- func EncodeKCMat(value *Material) ([]byte, error)
- func EncodeKCMatWithOptions(value *Material, options *LookupHashOptions) ([]byte, error)
- func EncodeKCMenu(value *Menu) ([]byte, error)
- func EncodeKCMenuWithOptions(value *Menu, options *LookupHashOptions) ([]byte, error)
- func EncodeKCMesh(value *KCMesh) ([]byte, error)
- func EncodeKCMetaData(value *KCMetaData) ([]byte, error)
- func EncodeKCModel(value *Model) ([]byte, error)
- func EncodeKCModelWithOptions(value *Model, options *LookupHashOptions) ([]byte, error)
- func EncodeKCTex(value *KCTexture) ([]byte, error)
- func EncodeLimbCol(value *LimbColliderPackage) ([]byte, error)
- func EncodeMaidCollider(value *MaidColliderFile) ([]byte, error)
- func EncodeMaterialAssets(assets *MaterialAssets) ([]byte, error)
- func EncodeMaterialAssetsWithOptions(assets *MaterialAssets, options *LookupHashOptions) ([]byte, error)
- func EncodeMenuAssets(assets *MenuAssets) ([]byte, error)
- func EncodeMenuAssetsWithOptions(assets *MenuAssets, options *LookupHashOptions) ([]byte, error)
- func EncodeModel(m *Model) ([]byte, error)
- func EncodeModelAssets(assets *ModelAssets) ([]byte, error)
- func EncodeModelAssetsWithOptions(assets *ModelAssets, options *LookupHashOptions) ([]byte, error)
- func EncodeModelWithOptions(m *Model, options *LookupHashOptions) ([]byte, error)
- func EncodeMoveablePanelSaveData(value *MoveablePanelSaveData) ([]byte, error)
- func EncodePaletteColorSaveData(value *PaletteColorSaveData) ([]byte, error)
- func EncodePartsColorGrada(values []PartsColorGrada) ([]byte, error)
- func EncodePresetColor(value *ColorPreset) ([]byte, error)
- func EncodePresetPanelNameSaveData(value *PresetPanelNameSaveData) ([]byte, error)
- func EncodePriorityMaterial(pm *PriorityMaterial) []interface{}
- func EncodePriorityMaterialAssets(assets *PriorityMaterialAssets) ([]byte, error)
- func EncodeSavedAttach(value *SavedAttachFile) ([]byte, error)
- func EncodeSharePreset(value *SharePreset) ([]byte, error)
- func IsGP03BridgeData(data []byte) bool
- func IsKCESBridgeSessionData(data []byte) bool
- func IsKCESJSONTextExtension(extension string) bool
- func IsKCESPayloadExtension(extension string) bool
- func IsKCESPresetData(data []byte) bool
- func IsKCESUnityJSONDocumentExtension(pathOrExt string) bool
- func IsLengthPrefixedKCESPayloadExtension(extension string) bool
- func KCESBridgeMenuFileID(path string) uint64
- func NormalizeKCESJSONTextExtension(pathOrExt string) string
- func NormalizeKCESPayloadExtension(pathOrExt string) string
- func NormalizeKCESUnityJSONDocumentExtension(pathOrExt string) string
- func ShouldRecalculateLookupHashes(options *LookupHashOptions) bool
- func StripLengthPrefix(data []byte) ([]byte, bool, error)
- type BaseDeformBoxData
- type BezierParam
- type BlendData
- type BunchDeformData
- type BunchDeformParameter
- type BunchDeformedData
- type ClothAdjustMode
- type ClothParams
- type ClothPenetrationAxis
- type ClothPenetrationMode
- type ClothTeleportMode
- type ColliderCapsule
- type ColliderMaidProp
- type ColliderObject
- type ColliderPackage
- type ColliderPlane
- type ColliderRef
- type ColliderSphere
- type ColliderState
- type ColliderStatusUnion
- type Color
- type Color32
- type ColorPreset
- func DecodeColorPreset(data []byte) (*ColorPreset, error)
- func DecodeColorPresetWithInstanceGUID(data []byte, constructorGUID string) (*ColorPreset, error)
- func DecodePresetColor(data []byte) (*ColorPreset, error)
- func NewColorPreset(instanceGUID string) (*ColorPreset, error)
- func NewKCES2ColorPreset(instanceGUID string) (*ColorPreset, error)
- type ColorPresetColorPack
- type ColorPresetControlSlider
- type ColorPresetFreeColor
- type ColorPresetGradationColor
- type ColorPresetLayerFreeColor
- type ColorPresetOrderList
- type ColorPresetPackType
- type ColorPresetSlot
- type ColorProp
- type Colvari
- type ColvariData
- type Command
- type DynamicBoneAnimationFrame
- type DynamicBoneStatus
- type ExpandedKCESPreset
- type ExpandedKCESPresetCore
- type FloatProp
- type GP03BridgeFile
- type GradPointsData
- type GradaColDef
- type HairMake
- type HairMakeBuildData
- type HairMakeSave
- type HairSilhouetteParameter
- type HairSilhouettePresetParameter
- type HitCheck
- type HitCheckEntry
- type IKColliderGroup
- type IKColliderPackage
- type InfColData
- type InfColorParam
- type KCES2GradPointsData
- type KCES2ItemFavouriteStateData
- type KCES2ItemFavouriteStateSetting
- type KCESBridgeSession
- type KCESBridgeSessionData
- type KCESEditDataFile
- type KCESEditDataKind
- type KCESExportNameMap
- type KCESExportNameMapEntry
- type KCESPathsFile
- type KCESPayloadDescriptor
- type KCESPreset
- type KCESPresetBodyData
- type KCESPresetColorData
- type KCESPresetCore
- type KCESPresetCutoutMask
- type KCESPresetEditBaseData
- type KCESPresetEditColorPreset
- type KCESPresetEditUnitData
- type KCESPresetGradationColorDef
- type KCESPresetInfinityColorData
- type KCESPresetInfinityPartsColor
- type KCESPresetInfinityPartsColorPoint
- type KCESPresetLegacyColor
- type KCESPresetMaterialPropertySlot
- type KCESPresetMaterialPropertyValue
- type KCESPresetMeta
- type KCESPresetNamedMaterialProperty
- type KCESPresetNamedProperty
- type KCESPresetNamedSavedTexture
- type KCESPresetPartColorDef
- type KCESPresetPartHide
- type KCESPresetPropBase
- type KCESPresetProperty
- type KCESPresetPropertyList
- type KCESPresetSavedHairLength
- type KCESPresetSavedTextureData
- type KCESPresetSubProperty
- type KCESPresetTextureMask
- type KCESPresetTextureTransform
- type KCESSystemData
- type KCMesh
- type KCMetaData
- type KCTexture
- type KeywordProp
- type LimbColliderItem
- type LimbColliderPackage
- type LookupHashOptions
- type MagicaAngleLimitConstraint
- type MagicaAngleRestorationConstraint
- type MagicaClothSerializeData
- type MagicaColliderCollisionConstraint
- type MagicaCullingSettings
- type MagicaCurveSerializeData
- type MagicaCustomSkinningSettings
- type MagicaDistanceConstraint
- type MagicaInertiaConstraint
- type MagicaMotionConstraint
- type MagicaNormalAlignmentSettings
- type MagicaReductionSettings
- type MagicaSelfCollisionConstraint
- type MagicaSpringConstraint
- type MagicaTetherConstraint
- type MagicaToggleValue
- type MagicaTriangleBendingConstraint
- type MagicaWindSettings
- type MaidCapsuleCollider
- type MaidColliderFile
- type MaskData
- type MaskParam
- type Material
- type MaterialAssets
- type Matrix4x4
- type Menu
- type MenuAssets
- type MixHairBuildData
- type Model
- type ModelAssets
- type MoveablePanelActiveStateEntry
- type MoveablePanelPositionEntry
- type MoveablePanelSaveData
- type Nei
- type NeiTextEncoding
- type PaletteColorSaveData
- type PartColDef
- type PartsColor
- type PartsColorGrada
- type PreMulTexDatas
- type PresetPanelNameSaveData
- type PriorityMaterial
- type PriorityMaterialAssets
- type SavedAttachData
- type SavedAttachFile
- type SavedAttachPosRotScale
- type SharePreset
- type SharePresetExportData
- type SharePresetThumbnail
- type SkinThickness
- type TextureProp
- type ThicknessDefPerAngle
- type ThicknessGroup
- type ThicknessPoint
- type TransData
- type TransTexData
- type TupleStringInt
- type UndressArchiveTarget
- type UndressCommonPeelInfo
- type UndressDegeneracyIndices
- type UndressExFixed
- type UndressGroup
- type UndressGroupKey
- type UndressGroupLooker
- type UndressGroupRef
- type UndressHPeelSelectLimit
- type UndressLayer
- type UndressMeshReduction
- type UndressMeshReductionEntry
- type UndressMeshReductionTable
- type UndressPeelLimitRange
- type UndressPeelLimits
- type UndressPeelThreshold
- type UndressPrecomputeTarget
- type UndressSubMeshSlideSub
- type UndressVPeelExInfo
- type UndressWidthMeasurer
- type UndressWidthMeasurerEntry
- type UndressWidthMeasurerRail
- type UndressWidthMeasurerTable
- type UnityAnimationCurve
- type UnityInstanceReference
- type UnityKeyframe
- type Vector2
- type Vector2Int
- type Vector3
- type Vector4
- type VectorProp
Constants ¶
const ( // GP03BridgeSignature 是 KCES ExportCM.ExportMaidData 所写每个桥接文件开头的 BinaryWriter 字符串 // GP03BridgeSignature is the BinaryWriter string at the start of every bridge file emitted by KCES ExportCM.ExportMaidData GP03BridgeSignature = "GP03_BRIDGE" // GP03BridgeVersion 是 KCES 1.34.4 写出的桥接版本 // GP03BridgeVersion is the bridge version emitted by KCES 1.34.4 GP03BridgeVersion int32 = 2001 // GP03BridgeCOM3D2Version 由 COM3D2_5 Maid.ExportBridgeGP03 为反向 COM3D2 到 KCES 传输写出,该版本的旧预设块必须为空 // GP03BridgeCOM3D2Version is emitted by COM3D2_5 Maid.ExportBridgeGP03 for reverse COM3D2-to-KCES transfer and requires an empty legacy-preset block GP03BridgeCOM3D2Version int32 = 2000 // KCESGP03BridgeFormat 是文件类型探测报告的格式标签,不再作为编辑 JSON 的字段写出 // KCESGP03BridgeFormat is the format label reported by file-type detection and is no longer written as an editing JSON field KCESGP03BridgeFormat = "kces-gp03-bridge" )
const ( ColliderTypePlane = 0 ColliderTypeCapsule = 1 ColliderTypeSphere = 2 ColliderTypeMaidProp = 3 )
ColliderType 映射(与 C# 的 ANativeColliderStatus.ColliderType 一致) ColliderType mapping (same as ANativeColliderStatus.ColliderType)
const ( VectorTypeX = 0 VectorTypeY = 1 VectorTypeZ = 2 )
VectorType 映射(与 Scourt.Utility.MathUtility.VectorType 一致) VectorType mapping (same as Scourt.Utility.MathUtility.VectorType)
const ( ColliderBoundOutside = 0 ColliderBoundInside = 1 )
const ( // KCESExportNameMapFormat 是文件类型探测报告的格式标签,不再作为编辑 JSON 的字段写出 // KCESExportNameMapFormat is the format label reported by file-type detection and is no longer written as an editing JSON field KCESExportNameMapFormat = "kces-export-name-map" // KCESExportNameMapSignature 用于探测没有自身二进制魔数的原生 JsonUtility 文档 // KCESExportNameMapSignature is used to probe native JsonUtility documents that have no binary magic string of their own KCESExportNameMapSignature = "KCES_EXPORT_NAME_MAP" // KCESExportNameMapVersion 是 KCES 1.34.4 中的 ExportFileNameMap.FixVersion // KCESExportNameMapVersion is ExportFileNameMap.FixVersion in KCES 1.34.4 KCESExportNameMapVersion int32 = 1000 )
const ( // KCES2ItemFavouriteStateSettingFileName 是场景编辑保存目录中的虚拟文件名 // KCES2ItemFavouriteStateSettingFileName is the virtual filename in the scene-edit save directory KCES2ItemFavouriteStateSettingFileName = "KCES2Edit::ItemFavouriteStateSetting" // KCES2ItemFavouriteStateSettingPath 是 system.dat 中收藏状态虚拟文件的完整路径 // KCES2ItemFavouriteStateSettingPath is the complete path of the favourite-state virtual file in system.dat KCES2ItemFavouriteStateSettingPath = "EditData/" + KCES2ItemFavouriteStateSettingFileName )
const ( // NeiTextEncodingUTF8 是 KCES 读取 .nei 时使用的 UTF-8 编码 // NeiTextEncodingUTF8 is the UTF-8 encoding KCES uses when reading .nei NeiTextEncodingUTF8 = nei.TextEncodingUTF8 // NeiTextEncodingShiftJIS 是 COM3D2 读取 .nei 时使用的 Shift-JIS(CP932)编码,KCES 表格不应写出该编码 // NeiTextEncodingShiftJIS is the Shift-JIS (CP932) encoding COM3D2 uses when reading .nei, which KCES tables should not emit NeiTextEncodingShiftJIS = nei.TextEncodingShiftJIS )
const ( PayloadKindDynamicBoneStatus = "dynamic-bone-status" PayloadKindJSONString = "msgpack-json-string" PayloadKindColliderPackage = "collider-package" PayloadKindLimbCollider = "limb-collider-package" PayloadKindIKCollider = "ik-collider-package" PayloadKindClothParams = "cloth-params" )
const ( KCESPresetExtension = ".preset" // KCESPresetFormat 是文件类型探测报告的格式标签,不再作为编辑 JSON 的字段写出 // KCESPresetFormat is the format label reported by file-type detection and is no longer written as an editing JSON field KCESPresetFormat = "kces-virtual-directory-preset" )
const ( KCESPresetEditBaseDataVersion = 1000 KCESPresetEditUnitDataVersion = 1000 )
const ( KCESPresetPropertyListSignature = "GP03_MPROP_LIST" KCESPresetPropertyListVersion int32 = 1270 KCESPresetPropertySignature = "GP03_MPROP" KCESPresetPropertyVersion int32 = 2100 KCESPresetColorSignature = "CM3D2_MULTI_COL" KCESPresetColorVersion int32 = 1270 KCESPresetBodySignature = "CM3D2_MAID_BODY" KCESPresetBodyVersion int32 = 1270 )
const ( // KCES2ColorPresetVersion 是 KCES2 中 CustomColorPresetBase<T>.FixVersion 的值 // KCES2ColorPresetVersion is the value of CustomColorPresetBase<T>.FixVersion in KCES2 KCES2ColorPresetVersion = 1005 // PresetColorExtension 是 KCES2 独立颜色预设文件扩展名 // PresetColorExtension is the standalone KCES2 color-preset file extension PresetColorExtension = ".presetcolor" )
const ( // SavedAttachSignature 由 ExportCM.ExportAttachData 写在文件版本和记录数之前 // SavedAttachSignature is written by ExportCM.ExportAttachData before the file-level version and record count SavedAttachSignature = "SAVED_ATTACH_DATA" // SavedAttachFileVersion 是 KCES 1.34.4 唯一写出的外层版本 // SavedAttachFileVersion is the only outer version emitted by KCES 1.34.4 SavedAttachFileVersion int32 = 2000 // SavedAttachRecordVersion 写在每条当前 SavedAttachData 记录的空可空字符串哨兵之后 // SavedAttachRecordVersion is emitted inside every current SavedAttachData record after an empty nullable-string sentinel SavedAttachRecordVersion int32 = 2001 // KCESSavedAttachFormat 是文件类型探测报告的格式标签,不再作为编辑 JSON 的字段写出 // KCESSavedAttachFormat is the format label reported by file-type detection and is no longer written as an editing JSON field KCESSavedAttachFormat = "kces-saved-attach" )
const ( // SharePresetExtension is the KCES2 shared-preset file extension SharePresetExtension = ".shpreset" // SharePresetSignature is the seven-byte shared-preset file signature SharePresetSignature = "SH_PRES" // SharePresetVersion is the shared-preset container version currently written by KCES2 SharePresetVersion uint32 = 2 )
const ( // ColorPresetVersion 是 KCES 1.34.4 中 CustomColorPresetBase<T>.FixVersion 的值 // ColorPresetVersion is the value of CustomColorPresetBase<T>.FixVersion in KCES 1.34.4 ColorPresetVersion = 1004 // ColorPresetNoAssetMigrationMinVersion 是 OnDeserializeVersionCheck 不再检查已安装头发预设菜单的首个根版本 // ColorPresetNoAssetMigrationMinVersion is the first root version for which OnDeserializeVersionCheck no longer inspects installed hair-preset menus ColorPresetNoAssetMigrationMinVersion = 1003 // ColorPresetPackVersion 是 CustomColorPresetColorPack.FixVersion 的值 // ColorPresetPackVersion is the value of CustomColorPresetColorPack.FixVersion ColorPresetPackVersion = 1001 // ColorPresetColorVersion 是 KCES 1.34.4 中 FreeColor、LayerFreeColor 与 GradationColor 共用的版本 // ColorPresetColorVersion is the version shared by FreeColor, LayerFreeColor, and GradationColor in KCES 1.34.4 ColorPresetColorVersion = 1000 )
const ( // KCESBridgeSessionFormat 是文件类型探测报告的格式标签,不再作为编辑 JSON 的字段写出 // KCESBridgeSessionFormat is the format label reported by file-type detection and is no longer written as an editing JSON field KCESBridgeSessionFormat = "kces-bridge-session" // 以下是显式构造函数使用的当前版本,解码器不会注入这些值 // These are the current versions used by the explicit constructor and are not injected by decoders KCESBridgeSessionContainerVersion = 1000 KCESBridgeSessionDataVersion = 0 )
const ( // ColorPresetOrderListVersion 是 KCES 1.34.4 中 ColorPresetProvider.PresetOrderList.FixVersion 的值 // ColorPresetOrderListVersion is the value of ColorPresetProvider.PresetOrderList.FixVersion in KCES 1.34.4 ColorPresetOrderListVersion = 1000 )
const HairMakeSaveExtension = ".harimakesave"
HairMakeSaveExtension 是 HairMake 继续编辑存档文件扩展名 HairMakeSaveExtension is the continue-editing HairMake save file extension
const HitCheckSignature = "HitCheck"
const KCES2GradationSaveFilePrefix = "KCES2GradSv"
KCES2GradationSaveFilePrefix 是 system.dat 中 KCES2 渐变保存虚拟文件的名称前缀 KCES2GradationSaveFilePrefix is the filename prefix for KCES2 gradation-save virtual files in system.dat
const KCESDB2ConfExtension = ".db2conf"
const KCESDBColExtension = ".dbcol"
const KCESDBConfExtension = ".dbconf"
const KCESDSB2ConfExtension = ".dsb2conf"
const KCESDSBConfExtension = ".dsbconf"
const KCESDSL2ConfExtension = ".dsl2conf"
const KCESDSLColExtension = ".dslcol"
const KCESDSLConfExtension = ".dslconf"
const KCESIKColBytesExtension = ".ikcol.bytes"
const KCESIKColExtension = ".ikcol"
const KCESLimbColExtension = ".limbcol"
const KCESNSONExtension = ".nson"
const (
KCESPathsSignature = "CM3D2_PATHS"
)
const KCESPersetExtension = ".perset"
const KCESSystemDataFormat = "kces-system-data"
KCESSystemDataFormat 是文件类型探测报告的格式标签,不再作为编辑 JSON 的字段写出 KCESSystemDataFormat is the format label reported by file-type detection and is no longer written as an editing JSON field
const KCESUndressDataExtension = ".undressdat"
const KCESUndressPartsDataExtension = ".undresspdat"
const KCMatExtension = ".kcmat"
KCMatExtension 是 KCMat 文件扩展名 KCMatExtension is the KCMat file extension
const KCMenuExtension = ".kcmenu"
KCMenuExtension 是 KCMenu 文件扩展名 KCMenuExtension is the KCMenu file extension
const ( // KCMeshExtension 是 KCMesh 文件扩展名 // KCMeshExtension is the KCMesh file extension KCMeshExtension = ".kcmesh" )
const ( // KCMetaDataExtension 是 KCMetaData 文件扩展名 // KCMetaDataExtension is the KCMetaData file extension KCMetaDataExtension = ".kcmmeta" )
const KCModelExtension = ".kcmodel"
KCModelExtension 是 KCModel 文件扩展名 KCModelExtension is the KCModel file extension
const ( // KCTexExtension 是 KCTexture 文件扩展名 // KCTexExtension is the KCTexture file extension KCTexExtension = ".kctex" )
const MaidColliderFormat = "kces-maid-capsule-colliders"
MaidColliderFormat 是文件类型探测报告的格式标签,不再作为编辑 JSON 的字段写出 MaidColliderFormat is the format label reported by file-type detection and is no longer written as an editing JSON field
const MaterialExtension = ".mate"
MaterialExtension 是容器内材质条目虚拟文件名使用的扩展名 KCES 没有独立的材质文件,该扩展名只出现在 .materialassets 条目的 fileName 中,游戏按它补全无扩展名的查找名 MaterialExtension is the extension used by the virtual filenames of material entries inside a container KCES has no standalone material files, so this extension appears only in the fileName of .materialassets entries, where the game uses it to complete extensionless lookup names
const MenuExtension = ".menu"
MenuExtension 是游戏内 Menu 文件名使用的扩展名 MenuExtension is the extension used by in-game menu filenames
Variables ¶
var NeiKey = nei.Key
NeiKey 是默认加密密钥 / NeiKey is the default encryption key
Functions ¶
func AddLengthPrefix ¶
AddLengthPrefix 在载荷前添加小端 UInt32 字节数 AddLengthPrefix prepends the payload byte count as a little-endian UInt32
func DecodeKCESJSONText ¶
func DecodeKCESJSONText(data []byte, extension string) (json.RawMessage, error)
DecodeKCESJSONText 校验并解码受支持扩展名的明文 JSON,仅保留 JSON 语义内容 DecodeKCESJSONText validates and decodes plain JSON for a supported extension while retaining only its semantic JSON content
func DecodeKCESPayload ¶
DecodeKCESPayload 按扩展名解码载荷并返回该扩展名的载荷根对象,根为 nil 表示 MessagePack 根值为 nil DecodeKCESPayload decodes a payload by extension and returns that extension's payload root object, where a nil root means a nil MessagePack root value
func EncodeClothParamsFile ¶
func EncodeClothParamsFile(params *ClothParams, extension string) ([]byte, error)
EncodeClothParamsFile 编码使用 ClothParams 线格式的 .dsbconf 或 .dslconf 文件,空扩展名默认使用 .dsbconf EncodeClothParamsFile encodes a .dsbconf or .dslconf file using the ClothParams wire model, with an empty extension defaulting to .dsbconf
func EncodeColorPreset ¶
func EncodeColorPreset(value *ColorPreset) ([]byte, error)
EncodeColorPreset 按记录的六槽、七槽或 KCES2 十一槽布局写出预设,不调用游戏迁移或序列化回调 所有显式版本以及数值和名称两组 MPN 数组都按调用者提供内容保留 EncodeColorPreset emits the recorded 6-slot, 7-slot, or KCES2 11-slot layout without invoking game migrations or serialization callbacks Every explicit version and both numeric and named MPN arrays are preserved as supplied by the caller
func EncodeColorPresetOrderList ¶
func EncodeColorPresetOrderList(value *ColorPresetOrderList) ([]byte, error)
EncodeColorPresetOrderList 使用固定两槽 indexed object 和 StandardLz4BlockArray 规则写出调用者版本 EncodeColorPresetOrderList uses a fixed two-slot indexed object and StandardLz4BlockArray rules while preserving the caller version
func EncodeColorPresetSlot ¶
func EncodeColorPresetSlot(value *ColorPresetSlot) ([]byte, error)
EncodeColorPresetSlot 写出与 ColorPreset 线格式相同的 ColorPresetSlot 载荷 EncodeColorPresetSlot emits the ColorPresetSlot payload whose wire form is identical to ColorPreset
func EncodeDB2Conf ¶
func EncodeDB2Conf(value *MagicaClothSerializeData) ([]byte, error)
EncodeDB2Conf 编码 .db2conf 的长度前缀 LZ4 MessagePack MagicaCloth ClothSerializeData 载荷 EncodeDB2Conf encodes the length-prefixed LZ4 MessagePack MagicaCloth ClothSerializeData payload of a .db2conf file
func EncodeDBCol ¶
func EncodeDBCol(value *ColliderPackage) ([]byte, error)
EncodeDBCol 编码 .dbcol 的长度前缀 LZ4 MessagePack ColliderPackage 载荷 EncodeDBCol encodes the length-prefixed LZ4 MessagePack ColliderPackage payload of a .dbcol file
func EncodeDBConf ¶
func EncodeDBConf(status *DynamicBoneStatus) ([]byte, error)
EncodeDBConf 编码 .dbconf 的长度前缀 LZ4 MessagePack DynamicBoneStatus 载荷 EncodeDBConf encodes the length-prefixed LZ4 MessagePack DynamicBoneStatus payload of a .dbconf file
func EncodeDSB2Conf ¶
func EncodeDSB2Conf(value *MagicaClothSerializeData) ([]byte, error)
EncodeDSB2Conf 编码 .dsb2conf 的长度前缀 LZ4 MessagePack MagicaCloth ClothSerializeData 载荷 EncodeDSB2Conf encodes the length-prefixed LZ4 MessagePack MagicaCloth ClothSerializeData payload of a .dsb2conf file
func EncodeDSBConf ¶
func EncodeDSBConf(value *ClothParams) ([]byte, error)
EncodeDSBConf 编码 .dsbconf 的长度前缀 LZ4 MessagePack ClothParams 载荷 EncodeDSBConf encodes the length-prefixed LZ4 MessagePack ClothParams payload of a .dsbconf file
func EncodeDSL2Conf ¶
func EncodeDSL2Conf(value *MagicaClothSerializeData) ([]byte, error)
EncodeDSL2Conf 编码 .dsl2conf 的长度前缀 LZ4 MessagePack MagicaCloth ClothSerializeData 载荷 EncodeDSL2Conf encodes the length-prefixed LZ4 MessagePack MagicaCloth ClothSerializeData payload of a .dsl2conf file
func EncodeDSLCol ¶
func EncodeDSLCol(value *ColliderPackage) ([]byte, error)
EncodeDSLCol 编码 .dslcol 的长度前缀 LZ4 MessagePack ColliderPackage 载荷 EncodeDSLCol encodes the length-prefixed LZ4 MessagePack ColliderPackage payload of a .dslcol file
func EncodeDSLConf ¶
func EncodeDSLConf(value *ClothParams) ([]byte, error)
EncodeDSLConf 编码 .dslconf 的长度前缀 LZ4 MessagePack ClothParams 载荷 EncodeDSLConf encodes the length-prefixed LZ4 MessagePack ClothParams payload of a .dslconf file
func EncodeDynamicBoneStatusFile ¶
func EncodeDynamicBoneStatusFile(status *DynamicBoneStatus) ([]byte, error)
EncodeDynamicBoneStatusFile 将 DynamicBoneStatus 编码为带长度前缀的 .dbconf 载荷 EncodeDynamicBoneStatusFile encodes DynamicBoneStatus as a length-prefixed .dbconf payload
func EncodeExpandedKCESPreset ¶
func EncodeExpandedKCESPreset(value *ExpandedKCESPreset) ([]byte, error)
EncodeExpandedKCESPreset 重建三个内部 BinaryWriter 块后写出普通 KCES 预设封套 每个保存版本均来自 value,不调用游戏迁移回调或当前版本构造函数 EncodeExpandedKCESPreset rebuilds all three inner BinaryWriter blocks and then writes the ordinary KCES preset envelope Every stored version comes from value without invoking a game migration callback or current-version constructor
func EncodeGP03Bridge ¶
func EncodeGP03Bridge(value *GP03BridgeFile) ([]byte, error)
EncodeGP03Bridge 写出准确的共用 BinaryWriter 布局,不会补默认版本或升级版本,新建 KCES 到 COM3D2 桥接时应使用 NewGP03BridgeFile EncodeGP03Bridge writes the exact shared BinaryWriter layout without defaulting or upgrading the version, and NewGP03BridgeFile should be used for a new KCES-to-COM3D2 bridge
func EncodeGradPointsData ¶
func EncodeGradPointsData(value *GradPointsData) ([]byte, error)
EncodeGradPointsData 将当前七个类型化 indexed 字段编码为 Standard MessagePack 字典键按数值升序写出以得到确定输出,调用者的切片与映射只读且不会被重排或修改 EncodeGradPointsData encodes the seven current typed indexed fields as Standard MessagePack Dictionary keys are emitted in ascending numeric order for deterministic output while caller slices and maps are only read and never reordered or modified
func EncodeHairMakeSave ¶
func EncodeHairMakeSave(value *HairMakeSave) ([]byte, error)
EncodeHairMakeSave 编码未压缩的字符串键 .harimakesave MessagePack 数据 EncodeHairMakeSave encodes uncompressed string-keyed .harimakesave MessagePack data
func EncodeHitCheck ¶
EncodeHitCheck 编码一个完整的 hitcheck 球形检测列表 EncodeHitCheck encodes one complete hitcheck sphere list
func EncodeIKCol ¶
func EncodeIKCol(value *IKColliderPackage) ([]byte, error)
EncodeIKCol 编码 .ikcol 的长度前缀 LZ4 MessagePack IKColliderPackage 载荷 EncodeIKCol encodes the length-prefixed LZ4 MessagePack IKColliderPackage payload of a .ikcol file
func EncodeIKColBytes ¶
func EncodeIKColBytes(value *IKColliderPackage) ([]byte, error)
EncodeIKColBytes 编码 .ikcol.bytes 的长度前缀 LZ4 MessagePack IKColliderPackage 载荷 EncodeIKColBytes encodes the length-prefixed LZ4 MessagePack IKColliderPackage payload of a .ikcol.bytes file
func EncodeKCES2GradPointsData ¶
func EncodeKCES2GradPointsData(value *KCES2GradPointsData) ([]byte, error)
EncodeKCES2GradPointsData 编码 EditData/KCES2GradSv{index} 使用的未压缩 MessagePack 数据 EncodeKCES2GradPointsData encodes uncompressed MessagePack data used by EditData/KCES2GradSv{index}
func EncodeKCES2ItemFavouriteStateSetting ¶
func EncodeKCES2ItemFavouriteStateSetting(value KCES2ItemFavouriteStateSetting) ([]byte, error)
EncodeKCES2ItemFavouriteStateSetting 编码收藏状态虚拟文件并原样保留状态字符串和 nil 项 EncodeKCES2ItemFavouriteStateSetting encodes the favourite-state virtual file while preserving raw state strings and nil entries
func EncodeKCESBridgeSession ¶
func EncodeKCESBridgeSession(value *KCESBridgeSession) ([]byte, error)
EncodeKCESBridgeSession 从 typed sessionId 生成两个已知虚拟文件并复制真正未知文件 EncodeKCESBridgeSession generates both known virtual files from the typed sessionId and copies genuinely unknown files
func EncodeKCESExportNameMap ¶
func EncodeKCESExportNameMap(value *KCESExportNameMap) ([]byte, error)
EncodeKCESExportNameMap 写出原生 Unity JsonUtility 封套,嵌套键值保留提供的顺序和拼写,并采用 ScourtExtensionsDictionary.FromJson 读取的布局 EncodeKCESExportNameMap writes the native Unity JsonUtility wrapper while retaining supplied key and value order and spelling in the layout consumed by ScourtExtensionsDictionary.FromJson
func EncodeKCESExportNameMapJSON ¶
func EncodeKCESExportNameMapJSON(value *KCESExportNameMap) ([]byte, error)
EncodeKCESExportNameMapJSON 写出服务和 CLI 使用的确定性编辑表示,不修改 value 或其 Entries 切片 EncodeKCESExportNameMapJSON writes the deterministic editing representation used by the service and CLI without mutating value or its Entries slice
func EncodeKCESJSONText ¶
func EncodeKCESJSONText(value json.RawMessage, extension string) ([]byte, error)
EncodeKCESJSONText 将 JSON 语义内容写为稳定缩进的 UTF-8 JSON EncodeKCESJSONText writes semantic JSON content as stably indented UTF-8 JSON
func EncodeKCESPaths ¶
func EncodeKCESPaths(value *KCESPathsFile) ([]byte, error)
EncodeKCESPaths 编码一个完整的 paths.dat 路径列表 EncodeKCESPaths encodes one complete paths.dat path list
func EncodeKCESPayload ¶
EncodeKCESPayload 按扩展名编码载荷根对象,并要求根对象类型与扩展名声明的载荷类型一致 EncodeKCESPayload encodes a payload root object by extension and requires the root type to match the payload type declared by that extension
func EncodeKCESPreset ¶
func EncodeKCESPreset(preset *KCESPreset) ([]byte, error)
EncodeKCESPreset 在不调用游戏 OnBeforeSerialize 回调的情况下编码 KCES VirtualDirectory 预设 所有保存的版本整数均按提供值写出,新建当前预设的调用方应使用下方构造函数而不能依赖隐式版本升级 EncodeKCESPreset encodes a KCES VirtualDirectory preset without invoking game OnBeforeSerialize callbacks All stored version integers are emitted exactly as supplied, so callers creating a new current preset should use the constructors below instead of relying on implicit version upgrades
func EncodeKCESPresetBodyData ¶
func EncodeKCESPresetBodyData(value *KCESPresetBodyData) ([]byte, error)
EncodeKCESPresetBodyData 验证身体块签名并写回版本 EncodeKCESPresetBodyData validates the body-block signature and writes its version
func EncodeKCESPresetColorData ¶
func EncodeKCESPresetColorData(value *KCESPresetColorData) ([]byte, error)
EncodeKCESPresetColorData 按版本写回旧式颜色项或以 MAX 终止的新版名称列表 EncodeKCESPresetColorData writes either legacy color entries or the newer MAX-terminated name list according to the version
func EncodeKCESPresetEditBaseData ¶
func EncodeKCESPresetEditBaseData(value *KCESPresetEditBaseData) ([]byte, error)
EncodeKCESPresetEditBaseData 按固定三槽布局编码 PropBase.editBaseData EncodeKCESPresetEditBaseData encodes PropBase.editBaseData using its fixed three-slot layout
func EncodeKCESPresetEditUnitData ¶
func EncodeKCESPresetEditUnitData(value *KCESPresetEditUnitData) ([]byte, error)
EncodeKCESPresetEditUnitData 按固定四槽布局编码 SubProp.editUnitData EncodeKCESPresetEditUnitData encodes SubProp.editUnitData using its fixed four-slot layout
func EncodeKCESPresetPropertyData ¶
func EncodeKCESPresetPropertyData(value *KCESPresetPropertyList) ([]byte, error)
EncodeKCESPresetPropertyData 编码 GP03_MPROP_LIST 属性字典并保留属性顺序和重复键 EncodeKCESPresetPropertyData encodes the GP03_MPROP_LIST property dictionary while preserving order and repeated keys
func EncodeKCESSystemData ¶
func EncodeKCESSystemData(value *KCESSystemData) ([]byte, error)
EncodeKCESSystemData 写入 VirtualDirectory 表示而不更改或补默认存储版本 EncodeKCESSystemData writes the VirtualDirectory representation without changing or defaulting the stored version
func EncodeKCESUndressData ¶
func EncodeKCESUndressData(value *UndressArchiveTarget) ([]byte, error)
EncodeKCESUndressData 编码一个完整的 .undressdat 文档 EncodeKCESUndressData encodes one complete .undressdat document
func EncodeKCESUndressPartsData ¶
func EncodeKCESUndressPartsData(value *UndressPrecomputeTarget) ([]byte, error)
EncodeKCESUndressPartsData 编码一个完整的 .undresspdat 文档 EncodeKCESUndressPartsData encodes one complete .undresspdat document
func EncodeKCMat ¶
EncodeKCMat 编码单个 Parts.Material 的 LZ4 MessagePack .kcmat 数据,并默认重算可确定的查找字段 EncodeKCMat encodes LZ4 MessagePack .kcmat data containing one Parts.Material and recalculates determinable lookup fields by default
func EncodeKCMatWithOptions ¶
func EncodeKCMatWithOptions(value *Material, options *LookupHashOptions) ([]byte, error)
EncodeKCMatWithOptions 编码单个 Parts.Material 的 LZ4 MessagePack .kcmat 数据,并允许显式关闭或按输出文件名执行查找字段重算 EncodeKCMatWithOptions encodes LZ4 MessagePack .kcmat data containing one Parts.Material and allows lookup-field recalculation to be explicitly disabled or performed from the output filename
func EncodeKCMenu ¶
EncodeKCMenu 编码单个 Parts.Menu 的 LZ4 MessagePack .kcmenu 数据,并默认重算查找字段 缺少 HairMake.ExportedGUID 来源时 GUID 取自新的 UUID v4,需要逐字节复现时应显式关闭重算 EncodeKCMenu encodes LZ4 MessagePack .kcmenu data containing one Parts.Menu and recalculates lookup fields by default GUID comes from a fresh UUID v4 when the HairMake.ExportedGUID source is absent, so callers needing byte-for-byte reproducible output should disable recalculation explicitly
func EncodeKCMenuWithOptions ¶
func EncodeKCMenuWithOptions(value *Menu, options *LookupHashOptions) ([]byte, error)
EncodeKCMenuWithOptions 编码单个 Parts.Menu 的 LZ4 MessagePack .kcmenu 数据,并允许显式关闭或按输出文件名执行查找字段重算 EncodeKCMenuWithOptions encodes LZ4 MessagePack .kcmenu data containing one Parts.Menu and allows lookup-field recalculation to be explicitly disabled or performed from the output filename
func EncodeKCMesh ¶
EncodeKCMesh 编码未压缩的 .kcmesh MessagePack 数据并保留调用方版本 EncodeKCMesh encodes uncompressed .kcmesh MessagePack data while preserving the caller version
func EncodeKCMetaData ¶
func EncodeKCMetaData(value *KCMetaData) ([]byte, error)
EncodeKCMetaData 编码未压缩的 .kcmmeta MessagePack 数据并保留调用方版本 EncodeKCMetaData encodes uncompressed .kcmmeta MessagePack data while preserving the caller version
func EncodeKCModel ¶
EncodeKCModel 编码与 Parts.Model 相同的 LZ4 MessagePack .kcmodel 数据,并默认重算可确定的查找字段 EncodeKCModel encodes LZ4 MessagePack .kcmodel data that uses the Parts.Model layout and recalculates determinable lookup fields by default
func EncodeKCModelWithOptions ¶
func EncodeKCModelWithOptions(value *Model, options *LookupHashOptions) ([]byte, error)
EncodeKCModelWithOptions 编码与 Parts.Model 相同的 LZ4 MessagePack .kcmodel 数据,并允许显式关闭或按输出文件名执行查找字段重算 EncodeKCModelWithOptions encodes .kcmodel data using the Parts.Model layout and allows lookup-field recalculation to be explicitly disabled or performed from the output filename
func EncodeKCTex ¶
EncodeKCTex 编码 CM3D2_TEX 1000 .kctex 数据而不改写签名或版本 EncodeKCTex encodes CM3D2_TEX version-1000 .kctex data without rewriting its signature or version
func EncodeLimbCol ¶
func EncodeLimbCol(value *LimbColliderPackage) ([]byte, error)
EncodeLimbCol 编码 .limbcol 的长度前缀 LZ4 MessagePack LimbColliderPackage 载荷 EncodeLimbCol encodes the length-prefixed LZ4 MessagePack LimbColliderPackage payload of a .limbcol file
func EncodeMaidCollider ¶
func EncodeMaidCollider(value *MaidColliderFile) ([]byte, error)
EncodeMaidCollider 编码一个完整的无签名女仆胶囊碰撞体列表 EncodeMaidCollider encodes one complete signatureless maid capsule-collider list
func EncodeMaterialAssets ¶
func EncodeMaterialAssets(assets *MaterialAssets) ([]byte, error)
EncodeMaterialAssets 将 MaterialAssets 编码为 Lz4BlockArray 压缩的 MessagePack 数据,并默认按每个 Material 自身字段重算可确定的查找字段 EncodeMaterialAssets encodes MaterialAssets as Lz4BlockArray-compressed MessagePack data and recalculates determinable lookup fields from each Material's own fields by default
func EncodeMaterialAssetsWithOptions ¶
func EncodeMaterialAssetsWithOptions(assets *MaterialAssets, options *LookupHashOptions) ([]byte, error)
EncodeMaterialAssetsWithOptions 将 MaterialAssets 编码为 Lz4BlockArray 压缩的 MessagePack 数据,并允许显式关闭每个 Material 自身可确定的查找字段重算 EncodeMaterialAssetsWithOptions encodes MaterialAssets as Lz4BlockArray-compressed MessagePack data and allows recalculation of lookup fields determined by each Material itself to be explicitly disabled
func EncodeMenuAssets ¶
func EncodeMenuAssets(assets *MenuAssets) ([]byte, error)
EncodeMenuAssets 将 MenuAssets 编码为 Lz4BlockArray 压缩的 MessagePack 数据,并默认按每个 Menu 自身字段重算查找字段 缺少 HairMake.ExportedGUID 来源的 Menu 会取得新的随机 GUID,需要逐字节复现时应显式关闭重算 EncodeMenuAssets encodes MenuAssets as Lz4BlockArray-compressed MessagePack data and recalculates lookup fields from each Menu's own fields by default A Menu without a HairMake.ExportedGUID source receives a new random GUID, so callers needing byte-for-byte reproducible output should disable recalculation explicitly
func EncodeMenuAssetsWithOptions ¶
func EncodeMenuAssetsWithOptions(assets *MenuAssets, options *LookupHashOptions) ([]byte, error)
EncodeMenuAssetsWithOptions 将 MenuAssets 编码为 Lz4BlockArray 压缩的 MessagePack 数据,并允许显式关闭每个 Menu 自身可确定的查找字段重算 EncodeMenuAssetsWithOptions encodes MenuAssets as Lz4BlockArray-compressed MessagePack data and allows recalculation of lookup fields determined by each Menu itself to be explicitly disabled
func EncodeModel ¶
EncodeModel 将单个 Model 编码为 Lz4BlockArray 压缩的 MessagePack 数据,并默认按自身 FileName 重算 ID 生成的数据可直接作为 .model TextAsset 的 m_Script EncodeModel encodes one Model as Lz4BlockArray-compressed MessagePack data and recalculates its ID from its own FileName by default The resulting data can be used directly as .model TextAsset m_Script
func EncodeModelAssets ¶
func EncodeModelAssets(assets *ModelAssets) ([]byte, error)
EncodeModelAssets 将 ModelAssets 编码为 Lz4BlockArray 压缩的 MessagePack 数据,并默认按每个 Model 自身字段重算可确定的查找字段 EncodeModelAssets encodes ModelAssets as Lz4BlockArray-compressed MessagePack data and recalculates determinable lookup fields from each Model's own fields by default
func EncodeModelAssetsWithOptions ¶
func EncodeModelAssetsWithOptions(assets *ModelAssets, options *LookupHashOptions) ([]byte, error)
EncodeModelAssetsWithOptions 将 ModelAssets 编码为 Lz4BlockArray 压缩的 MessagePack 数据,并允许显式关闭每个 Model 自身可确定的查找字段重算 EncodeModelAssetsWithOptions encodes ModelAssets as Lz4BlockArray-compressed MessagePack data and allows recalculation of lookup fields determined by each Model itself to be explicitly disabled
func EncodeModelWithOptions ¶
func EncodeModelWithOptions(m *Model, options *LookupHashOptions) ([]byte, error)
EncodeModelWithOptions 将单个 Model 编码为 Lz4BlockArray 压缩的 MessagePack 数据,并允许显式关闭或按输出文件名执行查找字段重算 EncodeModelWithOptions encodes one Model as Lz4BlockArray-compressed MessagePack data and allows lookup-field recalculation to be explicitly disabled or performed from the output filename
func EncodeMoveablePanelSaveData ¶
func EncodeMoveablePanelSaveData(value *MoveablePanelSaveData) ([]byte, error)
EncodeMoveablePanelSaveData 使用固定两槽根对象、两槽 KeyValuePair 与三槽 Vector3 布局 Vector3 使用 float32 标记 0xca,调用者不会被修改 调用者不会被修改 EncodeMoveablePanelSaveData uses a fixed two-slot root, two-slot KeyValuePair, and three-slot Vector3 layout Vector3 values use the float32 marker 0xca and the caller is never modified
func EncodePaletteColorSaveData ¶
func EncodePaletteColorSaveData(value *PaletteColorSaveData) ([]byte, error)
EncodePaletteColorSaveData 按固定三槽 indexed object 编码调色板颜色 字典键按数值排序以得到确定输出,源映射只读且不会被重排或修改 EncodePaletteColorSaveData encodes palette colors using the fixed three-slot indexed object Dictionary keys are sorted numerically for deterministic output while the source map is only read and is never reordered or mutated
func EncodePartsColorGrada ¶
func EncodePartsColorGrada(values []PartsColorGrada) ([]byte, error)
EncodePartsColorGrada 按 SerializeGrada 写出的布局编码梯度色数组 EncodePartsColorGrada encodes a gradient-color array using the layout written by SerializeGrada
func EncodePresetColor ¶
func EncodePresetColor(value *ColorPreset) ([]byte, error)
EncodePresetColor 编码独立 .presetcolor 文件并保留调用方选择的数组宽度 EncodePresetColor encodes a standalone .presetcolor file while preserving the caller-selected array width
func EncodePresetPanelNameSaveData ¶
func EncodePresetPanelNameSaveData(value *PresetPanelNameSaveData) ([]byte, error)
EncodePresetPanelNameSaveData 按固定一槽 indexed object 编码面板名称 nil 对象按 C# 类格式化器行为编码为 MessagePack nil,调用者及其切片不会被修改 EncodePresetPanelNameSaveData encodes panel names using the fixed one-slot indexed object A nil object is encoded as MessagePack nil to match the C# class formatter, and neither the caller nor its slice is modified
func EncodePriorityMaterial ¶
func EncodePriorityMaterial(pm *PriorityMaterial) []interface{}
EncodePriorityMaterial 将 PriorityMaterial 编码为 MessagePack indexed array 此兼容辅助函数没有 error 返回值,因此无法报告超出 Int32 的 Version,需检查游戏线格式时应使用 EncodePriorityMaterialAssets EncodePriorityMaterial encodes PriorityMaterial as a MessagePack indexed array This compatibility helper has no error return and cannot report an out-of-Int32 Version, so use EncodePriorityMaterialAssets for checked game wire
func EncodePriorityMaterialAssets ¶
func EncodePriorityMaterialAssets(assets *PriorityMaterialAssets) ([]byte, error)
EncodePriorityMaterialAssets 将 PriorityMaterialAssets 编码为 Lz4BlockArray 压缩的 MessagePack 数据 EncodePriorityMaterialAssets encodes PriorityMaterialAssets as Lz4BlockArray-compressed MessagePack data
func EncodeSavedAttach ¶
func EncodeSavedAttach(value *SavedAttachFile) ([]byte, error)
EncodeSavedAttach 按每个条目的 Version 写出规范化的显式 2000 或 2001 记录布局 旧版隐式 2000 输入在重新编码时统一使用游戏读取器接受的空字符串哨兵与显式版本 EncodeSavedAttach emits the canonical explicit 2000 or 2001 record layout selected by each item's Version Legacy implicit-2000 input is normalized on re-encoding to the empty-string sentinel and explicit version accepted by the game reader
func EncodeSharePreset ¶
func EncodeSharePreset(value *SharePreset) ([]byte, error)
EncodeSharePreset 编码 SH_PRES 容器并原样写出调用方版本、载荷和服务端追加字节 EncodeSharePreset encodes an SH_PRES container while emitting the caller-supplied version, payloads, and server-appended bytes unchanged
func IsGP03BridgeData ¶
IsGP03BridgeData 判断数据是否以 GP03_BRIDGE 的 BinaryWriter 编码开头,完整校验仍由 DecodeGP03Bridge 负责 IsGP03BridgeData reports whether data begins with BinaryWriter's encoding of GP03_BRIDGE, while DecodeGP03Bridge remains responsible for full validation
func IsKCESBridgeSessionData ¶
IsKCESBridgeSessionData 判断数据是否具有 VirtualDirectory 二进制签名 这只是低成本候选检查,需要与其他 VirtualDirectory 区分时仍须调用 DecodeKCESBridgeSession 并验证两个保留文件及其模式 IsKCESBridgeSessionData reports whether data has the VirtualDirectory binary signature This is only a cheap candidate check, so callers distinguishing bridge_session.vd from another VirtualDirectory must still call DecodeKCESBridgeSession and validate its two reserved files and schema
func IsKCESJSONTextExtension ¶
IsKCESJSONTextExtension 判断扩展名或路径是否属于受支持的 KCES 明文 JSON 格式 IsKCESJSONTextExtension reports whether an extension or path belongs to a supported KCES plain-JSON format
func IsKCESPayloadExtension ¶
IsKCESPayloadExtension 判断扩展名或路径是否属于支持的 KCES 载荷格式 IsKCESPayloadExtension reports whether an extension or path belongs to a supported KCES payload format
func IsKCESPresetData ¶
IsKCESPresetData 判断数据是否以当前 KCES 预设使用的 VirtualDirectory 签名开头 探测不包含序列化类型字节,因此不支持的 MemoryPack 预设仍会交给 KCES 解析器得到准确错误,而不会被误判为旧版 COM3D2 预设 IsKCESPresetData reports whether data begins with the VirtualDirectory signature used by current KCES presets Detection excludes the serialize-type byte so an unsupported MemoryPack preset is still routed to the KCES parser for an accurate error instead of being mistaken for a legacy COM3D2 preset
func IsKCESUnityJSONDocumentExtension ¶
IsKCESUnityJSONDocumentExtension 判断扩展名或路径的原生文件是否为受支持的 Unity JsonUtility 文档 IsKCESUnityJSONDocumentExtension reports whether the native file of an extension or path is a supported Unity JsonUtility document
func IsLengthPrefixedKCESPayloadExtension ¶
IsLengthPrefixedKCESPayloadExtension 判断扩展名的原生载荷是否要求长度前缀 IsLengthPrefixedKCESPayloadExtension reports whether an extension requires a length prefix for its native payload
func KCESBridgeMenuFileID ¶
KCESBridgeMenuFileID 显式计算游戏回调对一个非 nil 名称生成的值 计算依次提取 Windows 文件名、将扩展名替换为 .menu、执行与区域无关的 Unicode 小写转换,再计算 AssetManager 的 UTF-8 FNV-1a C# 源码调用 ToLower,严格来说依赖 bridge_session.vd 未保存的 CurrentCulture,因此土耳其语 I 等区域敏感情况应直接使用线格式 ID 编码器不会调用此辅助函数,也不会从 IgnoreMember 名称标注推导 ID,C# 的空字符串与 nil 字符串都会生成 .menu 的结果 KCESBridgeMenuFileID explicitly computes the value produced by the game callback for one non-nil name The calculation extracts a Windows filename, replaces its extension with .menu, applies locale-independent Unicode lower-casing, and then computes AssetManager UTF-8 FNV-1a The C# source calls ToLower and therefore technically depends on CurrentCulture which bridge_session.vd does not store, so locale-sensitive cases such as Turkish I should use explicit wire IDs The encoder does not call this helper or derive IDs from the IgnoreMember name annotation, and empty and nil C# strings both produce the result for .menu
func NormalizeKCESJSONTextExtension ¶
NormalizeKCESJSONTextExtension 从路径或扩展名提取规范化的受支持扩展名 NormalizeKCESJSONTextExtension extracts a normalized supported extension from a path or extension
func NormalizeKCESPayloadExtension ¶
NormalizeKCESPayloadExtension 从路径或扩展名提取规范化的受支持扩展名 NormalizeKCESPayloadExtension extracts a normalized supported extension from a path or extension
func NormalizeKCESUnityJSONDocumentExtension ¶
NormalizeKCESUnityJSONDocumentExtension 从路径或扩展名提取规范化的受支持扩展名 NormalizeKCESUnityJSONDocumentExtension extracts a normalized supported extension from a path or extension
func ShouldRecalculateLookupHashes ¶
func ShouldRecalculateLookupHashes(options *LookupHashOptions) bool
ShouldRecalculateLookupHashes 判断派生哈希字段是否应按默认值或显式选项重算 ShouldRecalculateLookupHashes reports whether derived hash fields should be recalculated under the default or explicitly selected behavior
Types ¶
type BaseDeformBoxData ¶
type BaseDeformBoxData struct {
Version int32 `codec:"v" json:"version"` // 形变框版本 / Deformation-box version
Bunch int32 `codec:"bno" json:"bunch"` // 所属发束编号 / Owning bunch number
No int32 `codec:"no" json:"number"` // 框编号 / Box number
Start Vector3 `codec:"sp" json:"start"` // 框中心线起点 / Box center-line start
End Vector3 `codec:"ep" json:"end"` // 框中心线终点 / Box center-line end
DivisionCount int32 `codec:"dn" json:"divisionCount"` // 中心线分段数量 / Center-line division count
UpDownVector Vector3 `codec:"uv" json:"upDownVector"` // 上下方向向量 / Up-down direction vector
ForwardVector Vector3 `codec:"fv" json:"forwardVector"` // 前后方向向量 / Forward-backward direction vector
SideVector Vector3 `codec:"sv" json:"sideVector"` // 左右方向向量 / Side direction vector
IsMesh bool `codec:"bm" json:"isMesh"` // 是否使用网格模式 / Whether mesh mode is used
IgnoreTriangles []int32 `codec:"igt" json:"ignoreTriangles"` // 忽略的三角形索引 / Ignored triangle indices
IgnoreGroups []int32 `codec:"igg" json:"ignoreGroups"` // 忽略的分组索引 / Ignored group indices
}
BaseDeformBoxData 对应 HairMake.BaseDeformBoxData 的形变框几何和忽略列表 / BaseDeformBoxData matches the deformation-box geometry and ignore lists in HairMake.BaseDeformBoxData
type BezierParam ¶
type BezierParam struct {
StartValue float32 `json:"startValue"` // 起始值 / Start value
EndValue float32 `json:"endValue"` // 结束值 / End value
UseEndValue bool `json:"useEndValue"` // 是否使用结束值 / Whether the end value is used
CurveValue float32 `json:"curveValue"` // 曲线值 / Curve value
UseCurveValue bool `json:"useCurveValue"` // 是否使用曲线值 / Whether the curve value is used
// contains filtered or unexported fields
}
BezierParam 对应 MagicaCloth.BezierParam BezierParam corresponds to MagicaCloth.BezierParam
func (*BezierParam) CodecDecodeSelf ¶
func (v *BezierParam) CodecDecodeSelf(d *codec.Decoder)
CodecDecodeSelf 按共享 indexed-object 规则解码 BezierParam CodecDecodeSelf decodes BezierParam using the shared indexed-object rules
func (BezierParam) CodecEncodeSelf ¶
func (v BezierParam) CodecEncodeSelf(e *codec.Encoder)
CodecEncodeSelf 按共享 indexed-object 规则编码 BezierParam CodecEncodeSelf encodes BezierParam using the shared indexed-object rules
type BlendData ¶
type BlendData struct {
Name *string `json:"name"` // 可空 morph 名称 / Nullable morph name
VIndex []int32 `json:"v_index"` // 受影响顶点索引 / Affected vertex indices
Vert []Vector3 `json:"vert"` // 顶点位置差分 / Vertex position deltas
Norm []Vector3 `json:"norm"` // 法线差分 / Normal deltas
Tan []Vector4 `json:"tan"` // 切线差分 / Tangent deltas
// contains filtered or unexported fields
}
BlendData 对应游戏 BlendData,保存模型 morph 顶点差分 BlendData maps the game's BlendData and stores model morph vertex deltas
func (*BlendData) CodecDecodeSelf ¶
CodecDecodeSelf 按共享 indexed-object 规则解码 BlendData CodecDecodeSelf decodes BlendData using the shared indexed-object rules
func (BlendData) CodecEncodeSelf ¶
CodecEncodeSelf 按共享 indexed-object 规则编码 BlendData CodecEncodeSelf encodes BlendData using the shared indexed-object rules
type BunchDeformData ¶
type BunchDeformData struct {
BaseBox *BaseDeformBoxData `codec:"bbox" json:"baseBox"` // 可空基础形变框 / Nullable base deformation box
UseBox *BaseDeformBoxData `codec:"ubox" json:"useBox"` // 可空实际形变框 / Nullable active deformation box
Param *BunchDeformParameter `codec:"prm" json:"parameter"` // 可空发束形变参数 / Nullable bunch deformation parameters
}
BunchDeformData 对应 BunchDeformedData.DeformData 的基础框、使用框和参数 / BunchDeformData matches the base box, active box, and parameters in BunchDeformedData.DeformData
type BunchDeformParameter ¶
type BunchDeformParameter struct {
Version int32 `codec:"v" json:"version"` // 形变参数版本 / Deformation-parameter version
DeformFlags int32 `codec:"df" json:"deformFlags"` // DeformBitFlg 标志 / DeformBitFlg flags
LengthPowers []float32 `codec:"nl" json:"lengthPowers"` // 各控制点长度形变量 / Length deformation at each control point
WidthH []Vector2 `codec:"nwh" json:"horizontalWidth"` // 各控制点水平方向宽度形变量 / Horizontal width deformation at each control point
WidthV []Vector2 `codec:"nwv" json:"verticalWidth"` // 各控制点垂直方向宽度形变量 / Vertical width deformation at each control point
MovePowers []Vector3 `codec:"nmp" json:"movePowers"` // 各控制点移动形变量 / Movement deformation at each control point
CurlPosition float32 `codec:"cp" json:"curlPosition"` // 卷曲位置 / Curl position
CurlRadius float32 `codec:"cr" json:"curlRadius"` // 卷曲角度 / Curl angle
CurlPower float32 `codec:"cw" json:"curlPower"` // 卷曲强度 / Curl strength
RollParams []float32 `codec:"rpl" json:"rollParameters"` // 卷绕参数 / Roll parameters
}
BunchDeformParameter 对应 HairMake.BunchDeformParameter 的长度、宽度、移动、卷曲和卷绕参数 / BunchDeformParameter matches the length, width, movement, curl, and roll parameters in HairMake.BunchDeformParameter
type BunchDeformedData ¶
type BunchDeformedData struct {
HairID *string `codec:"hid" json:"hairId"` // 可空基础头发标识 / Nullable base-hair identifier
BunchNo int32 `codec:"bno" json:"bunchNo"` // 发束编号 / Bunch number
Position Vector3 `codec:"op" json:"position"` // 发束局部位置 / Bunch local position
Rotation Vector4 `codec:"or" json:"rotation"` // 发束局部旋转四元数 / Bunch local rotation quaternion
Scale Vector3 `codec:"os" json:"scale"` // 发束局部缩放 / Bunch local scale
DeformList []*BunchDeformData `codec:"dlst" json:"deformList"` // 可空形变步骤列表 / Nullable deformation-step list
IsBase bool `codec:"base" json:"isBase"` // 是否为基础发束 / Whether this is a base bunch
}
BunchDeformedData 对应 HairMake.BunchDeformedData 的发束实例变换和形变数据 / BunchDeformedData matches the instance transform and deformation data in HairMake.BunchDeformedData
type ClothAdjustMode ¶
type ClothAdjustMode int32
ClothAdjustMode 表示 MagicaCloth 的位置调整模式 ClothAdjustMode represents a MagicaCloth position adjustment mode
const ( ClothAdjustModeFixed ClothAdjustMode = iota ClothAdjustModeXYMove ClothAdjustModeXZMove ClothAdjustModeYZMove )
type ClothParams ¶
type ClothParams struct {
Radius *BezierParam `json:"radius"` // 可空粒子半径曲线参数 / Nullable particle-radius curve parameter
Mass *BezierParam `json:"mass"` // 可空质量曲线参数 / Nullable mass curve parameter
UseGravity bool `json:"useGravity"` // 是否使用重力 / Whether gravity is enabled
Gravity *BezierParam `json:"gravity"` // 可空重力强度曲线参数 / Nullable gravity-strength curve parameter
UseDrag bool `json:"useDrag"` // 是否使用阻力 / Whether drag is enabled
Drag *BezierParam `json:"drag"` // 可空阻力曲线参数 / Nullable drag curve parameter
UseMaxVelocity bool `json:"useMaxVelocity"` // 是否限制最大速度 / Whether maximum velocity is limited
MaxVelocity *BezierParam `json:"maxVelocity"` // 可空最大速度曲线参数 / Nullable maximum-velocity curve parameter
WorldMoveInfluence *BezierParam `json:"worldMoveInfluence"` // 可空世界移动影响曲线参数 / Nullable world-movement influence curve parameter
WorldRotationInfluence *BezierParam `json:"worldRotationInfluence"` // 可空世界旋转影响曲线参数 / Nullable world-rotation influence curve parameter
MassInfluence float32 `json:"massInfluence"` // 质量影响系数 / Mass influence factor
WindInfluence float32 `json:"windInfluence"` // 风力影响系数 / Wind influence factor
WindRandomScale float32 `json:"windRandomScale"` // 风力随机缩放 / Wind random scale
UseDistanceDisable bool `json:"useDistanceDisable"` // 是否按距离禁用布料 / Whether cloth is disabled by distance
DisableDistance float32 `json:"disableDistance"` // 禁用距离 / Disable distance
DisableFadeDistance float32 `json:"disableFadeDistance"` // 禁用淡出距离 / Disable fade distance
UseResetTeleport bool `json:"useResetTeleport"` // 是否在传送后重置 / Whether teleport reset is enabled
TeleportDistance float32 `json:"teleportDistance"` // 触发传送的距离阈值 / Distance threshold for teleport handling
TeleportRotation float32 `json:"teleportRotation"` // 触发传送的旋转阈值 / Rotation threshold for teleport handling
UseClampDistanceRatio bool `json:"useClampDistanceRatio"` // 是否启用距离比例约束 / Whether distance-ratio clamp is enabled
ClampDistanceMinRatio float32 `json:"clampDistanceMinRatio"` // 距离比例最小值 / Minimum distance ratio
ClampDistanceMaxRatio float32 `json:"clampDistanceMaxRatio"` // 距离比例最大值 / Maximum distance ratio
ClampDistanceVelocityInfluence float32 `json:"clampDistanceVelocityInfluence"` // 距离约束速度影响系数 / Velocity influence for distance clamp
UseClampPositionLength bool `json:"useClampPositionLength"` // 是否启用位置长度约束 / Whether position-length clamp is enabled
ClampPositionLength *BezierParam `json:"clampPositionLength"` // 可空位置长度约束曲线参数 / Nullable position-length clamp curve parameter
ClampPositionRatioX float32 `json:"clampPositionRatioX"` // X 轴位置约束比例 / X-axis position clamp ratio
ClampPositionRatioY float32 `json:"clampPositionRatioY"` // Y 轴位置约束比例 / Y-axis position clamp ratio
ClampPositionRatioZ float32 `json:"clampPositionRatioZ"` // Z 轴位置约束比例 / Z-axis position clamp ratio
ClampPositionVelocityInfluence float32 `json:"clampPositionVelocityInfluence"` // 位置约束速度影响系数 / Velocity influence for position clamp
UseClampRotation bool `json:"useClampRotation"` // 是否启用旋转约束 / Whether rotation clamp is enabled
ClampRotationAngle *BezierParam `json:"clampRotationAngle"` // 可空旋转角度约束曲线参数 / Nullable rotation-angle clamp curve parameter
ClampRotationVelocityInfluence float32 `json:"clampRotationVelocityInfluence"` // 旋转约束速度影响系数 / Velocity influence for rotation clamp
RestoreDistanceVelocityInfluence float32 `json:"restoreDistanceVelocityInfluence"` // 距离恢复速度影响系数 / Velocity influence for distance restoration
StructDistanceStiffness *BezierParam `json:"structDistanceStiffness"` // 可空结构距离刚性曲线参数 / Nullable structural-distance stiffness curve parameter
UseBendDistance bool `json:"useBendDistance"` // 是否启用弯曲距离约束 / Whether bend-distance constraint is enabled
BendDistanceMaxCount int32 `json:"bendDistanceMaxCount"` // 弯曲距离最大计算数量 / Maximum bend-distance count
BendDistanceStiffness *BezierParam `json:"bendDistanceStiffness"` // 可空弯曲距离刚性曲线参数 / Nullable bend-distance stiffness curve parameter
UseNearDistance bool `json:"useNearDistance"` // 是否启用近邻距离约束 / Whether near-distance constraint is enabled
NearDistanceMaxCount int32 `json:"nearDistanceMaxCount"` // 近邻距离最大计算数量 / Maximum near-distance count
NearDistanceMaxDepth float32 `json:"nearDistanceMaxDepth"` // 近邻距离最大深度 / Maximum near-distance depth
NearDistanceLength *BezierParam `json:"nearDistanceLength"` // 可空近邻距离长度曲线参数 / Nullable near-distance length curve parameter
NearDistanceStiffness *BezierParam `json:"nearDistanceStiffness"` // 可空近邻距离刚性曲线参数 / Nullable near-distance stiffness curve parameter
UseRestoreRotation bool `json:"useRestoreRotation"` // 是否启用旋转恢复 / Whether rotation restoration is enabled
RestoreRotation *BezierParam `json:"restoreRotation"` // 可空旋转恢复曲线参数 / Nullable rotation-restoration curve parameter
RestoreRotationVelocityInfluence float32 `json:"restoreRotationVelocityInfluence"` // 旋转恢复速度影响系数 / Velocity influence for rotation restoration
UseSpring bool `json:"useSpring"` // 是否启用弹簧力 / Whether spring force is enabled
SpringPower float32 `json:"springPower"` // 弹簧力强度 / Spring force power
SpringRadius float32 `json:"springRadius"` // 弹簧影响半径 / Spring influence radius
SpringScaleX float32 `json:"springScaleX"` // 弹簧 X 轴缩放 / Spring X-axis scale
SpringScaleY float32 `json:"springScaleY"` // 弹簧 Y 轴缩放 / Spring Y-axis scale
SpringScaleZ float32 `json:"springScaleZ"` // 弹簧 Z 轴缩放 / Spring Z-axis scale
SpringIntensity float32 `json:"springIntensity"` // 弹簧强度 / Spring intensity
SpringDirectionAtten *BezierParam `json:"springDirectionAtten"` // 可空弹簧方向衰减曲线参数 / Nullable spring-direction attenuation curve parameter
SpringDistanceAtten *BezierParam `json:"springDistanceAtten"` // 可空弹簧距离衰减曲线参数 / Nullable spring-distance attenuation curve parameter
AdjustMode ClothAdjustMode `json:"adjustMode"` // 调整模式枚举 / Adjustment mode enum
AdjustRotationPower float32 `json:"adjustRotationPower"` // 调整旋转力度 / Adjustment rotation power
UseTriangleBend bool `json:"useTriangleBend"` // 是否启用三角形弯曲 / Whether triangle bend is enabled
TriangleBend *BezierParam `json:"triangleBend"` // 可空三角形弯曲曲线参数 / Nullable triangle-bend curve parameter
UseVolume bool `json:"useVolume"` // 是否启用体积约束 / Whether volume constraint is enabled
MaxVolumeLength float32 `json:"maxVolumeLength"` // 最大体积边长 / Maximum volume length
VolumeStretchStiffness *BezierParam `json:"volumeStretchStiffness"` // 可空体积拉伸刚性曲线参数 / Nullable volume-stretch stiffness curve parameter
VolumeShearStiffness *BezierParam `json:"volumeShearStiffness"` // 可空体积剪切刚性曲线参数 / Nullable volume-shear stiffness curve parameter
UseCollision bool `json:"useCollision"` // 是否启用碰撞 / Whether collision is enabled
Friction float32 `json:"friction"` // 摩擦系数 / Friction coefficient
KeepInitialShape bool `json:"keepInitialShape"` // 是否保持初始形状 / Whether the initial shape is kept
UsePenetration bool `json:"usePenetration"` // 是否启用穿透修正 / Whether penetration correction is enabled
PenetrationMode ClothPenetrationMode `json:"penetrationMode"` // 穿透修正模式枚举 / Penetration correction mode enum
PenetrationAxis ClothPenetrationAxis `json:"penetrationAxis"` // 穿透修正轴枚举 / Penetration correction axis enum
PenetrationMaxDepth float32 `json:"penetrationMaxDepth"` // 最大穿透深度 / Maximum penetration depth
PenetrationConnectDistance *BezierParam `json:"penetrationConnectDistance"` // 可空穿透连接距离曲线参数 / Nullable penetration-connection distance curve parameter
PenetrationDistance *BezierParam `json:"penetrationDistance"` // 可空穿透距离曲线参数 / Nullable penetration-distance curve parameter
PenetrationRadius *BezierParam `json:"penetrationRadius"` // 可空穿透半径曲线参数 / Nullable penetration-radius curve parameter
UseLineAvarageRotation bool `json:"useLineAvarageRotation"` // 是否使用线段平均旋转,字段名保留游戏 Avarage 拼写 / Whether line average rotation is used, keeping the game's Avarage spelling
UseFixedNonRotation bool `json:"useFixedNonRotation"` // 是否固定非旋转姿态 / Whether non-rotation pose is fixed
GravityDirection Vector3 `json:"gravityDirection"` // 重力方向 / Gravity direction
MaxMoveSpeed float32 `json:"maxMoveSpeed"` // 最大移动速度 / Maximum movement speed
MaxRotationSpeed float32 `json:"maxRotationSpeed"` // 最大旋转速度 / Maximum rotation speed
TeleportMode ClothTeleportMode `json:"teleportMode"` // 传送处理模式枚举 / Teleport handling mode enum
ResetStabilizationTime float32 `json:"resetStabilizationTime"` // 重置后稳定时间 / Stabilization time after reset
ClampRotationVelocityLimit float32 `json:"clampRotationVelocityLimit"` // 旋转约束速度上限 / Rotation clamp velocity limit
// contains filtered or unexported fields
}
ClothParams 对应 MagicaCloth.ClothParams MessagePack-CSharp 以 Key(0) 至 Key(82) 的固定 indexed array 写入,Key(4)、Key(5) 和 Key(56) 是当前游戏类型中必须为 nil 的稀疏槽 ClothParams corresponds to MagicaCloth.ClothParams MessagePack-CSharp writes Key(0) through Key(82) as a fixed indexed array whose sparse slots at Key(4), Key(5), and Key(56) must be nil
func DecodeClothParamsFile ¶
func DecodeClothParamsFile(data []byte, extension string) (*ClothParams, error)
DecodeClothParamsFile 解码使用 ClothParams 线格式的 .dsbconf 或 .dslconf 文件 DecodeClothParamsFile decodes a .dsbconf or .dslconf file that uses the ClothParams wire model
func DecodeDSBConf ¶
func DecodeDSBConf(data []byte) (*ClothParams, error)
DecodeDSBConf 解码 .dsbconf 的长度前缀 LZ4 MessagePack ClothParams 载荷 DecodeDSBConf decodes the length-prefixed LZ4 MessagePack ClothParams payload of a .dsbconf file
func DecodeDSLConf ¶
func DecodeDSLConf(data []byte) (*ClothParams, error)
DecodeDSLConf 解码 .dslconf 的长度前缀 LZ4 MessagePack ClothParams 载荷 DecodeDSLConf decodes the length-prefixed LZ4 MessagePack ClothParams payload of a .dslconf file
func NewClothParams ¶
func NewClothParams() *ClothParams
NewClothParams 返回与 MagicaCloth.ClothParams 的 C# 字段初始化器相同的默认值,直接在 Go 中创建配置时应使用此函数,MessagePack 解码和 JSON 反序列化只保留提供的线格式或编辑字段,不会运行此构造逻辑 NewClothParams returns the same field defaults as the C# field initializers of MagicaCloth.ClothParams for direct Go construction, while MessagePack decoding and JSON unmarshalling deliberately retain only supplied wire or editing fields and do not run this constructor
func (*ClothParams) CodecDecodeSelf ¶
func (v *ClothParams) CodecDecodeSelf(d *codec.Decoder)
CodecDecodeSelf 按共享 indexed-object 规则解码 ClothParams CodecDecodeSelf decodes ClothParams using the shared indexed-object rules
func (ClothParams) CodecEncodeSelf ¶
func (v ClothParams) CodecEncodeSelf(e *codec.Encoder)
CodecEncodeSelf 按共享 indexed-object 规则编码 ClothParams CodecEncodeSelf encodes ClothParams using the shared indexed-object rules
func (*ClothParams) UnmarshalJSON ¶
func (p *ClothParams) UnmarshalJSON(data []byte) error
UnmarshalJSON 将省略的编辑字段保持在线格式模型零值,新建当前游戏对象时应显式调用 NewClothParams UnmarshalJSON keeps omitted editing fields at their wire-model zero values, and NewClothParams should be called explicitly for a new current-game object
type ClothPenetrationAxis ¶
type ClothPenetrationAxis int32
ClothPenetrationAxis 表示 MagicaCloth 的穿透修正轴 ClothPenetrationAxis represents a MagicaCloth penetration-correction axis
const ( ClothPenetrationAxisX ClothPenetrationAxis = iota ClothPenetrationAxisY ClothPenetrationAxisZ ClothPenetrationAxisInverseX ClothPenetrationAxisInverseY ClothPenetrationAxisInverseZ )
type ClothPenetrationMode ¶
type ClothPenetrationMode int32
ClothPenetrationMode 表示 MagicaCloth 的穿透修正模式 ClothPenetrationMode represents a MagicaCloth penetration-correction mode
const ( ClothPenetrationModeSurfacePenetration ClothPenetrationMode = iota ClothPenetrationModeColliderPenetration )
type ClothTeleportMode ¶
type ClothTeleportMode int32
ClothTeleportMode 表示 MagicaCloth 的传送处理模式 ClothTeleportMode represents a MagicaCloth teleport handling mode
const ( ClothTeleportModeReset ClothTeleportMode = iota ClothTeleportModeKeep )
type ColliderCapsule ¶
type ColliderCapsule struct {
ColliderObject `codec:",inline"` // ANativeColliderStatus 基类字段 / ANativeColliderStatus base fields
Direction int32 `json:"direction"` // 胶囊主轴方向 / Capsule axis direction
IsDirectionInverse bool `json:"isDirectionInverse"` // 方向反转 / Direction reversed
StartRadius float32 `json:"startRadius"` // 起点半径 / Start radius
EndRadius float32 `json:"endRadius"` // 终点半径 / End radius
Height float32 `json:"height"` // 长度 / Height
// contains filtered or unexported fields
}
ColliderCapsule 对应游戏 NativeCapsuleColliderStatus ColliderCapsule corresponds to the game's NativeCapsuleColliderStatus
func NewColliderCapsule ¶
func NewColliderCapsule() *ColliderCapsule
NewColliderCapsule 按当前 C# 构造函数与字段初始化器创建新的胶囊碰撞体 NewColliderCapsule creates a new capsule collider from current C# constructors and field initializers
func (*ColliderCapsule) CodecDecodeSelf ¶
func (v *ColliderCapsule) CodecDecodeSelf(d *codec.Decoder)
CodecDecodeSelf 按共享 indexed-object 规则解码 ColliderCapsule CodecDecodeSelf decodes ColliderCapsule using the shared indexed-object rules
func (ColliderCapsule) CodecEncodeSelf ¶
func (v ColliderCapsule) CodecEncodeSelf(e *codec.Encoder)
CodecEncodeSelf 按共享 indexed-object 规则编码 ColliderCapsule CodecEncodeSelf encodes ColliderCapsule using the shared indexed-object rules
func (*ColliderCapsule) UnmarshalJSON ¶
func (v *ColliderCapsule) UnmarshalJSON(data []byte) error
UnmarshalJSON 解码 ColliderCapsule 而不注入构造默认值 UnmarshalJSON decodes ColliderCapsule without injecting constructor defaults
type ColliderMaidProp ¶
type ColliderMaidProp struct {
ColliderObject `codec:",inline"` // NativeCapsuleColliderStatus 与基类字段 / NativeCapsuleColliderStatus and base fields
Direction int32 `json:"direction"` // 胶囊主轴方向 / Capsule axis direction
IsDirectionInverse bool `json:"isDirectionInverse"` // 方向反转 / Direction reversed
StartRadius float32 `json:"startRadius"` // 起点半径 / Start radius
EndRadius float32 `json:"endRadius"` // 终点半径 / End radius
Height float32 `json:"height"` // 长度 / Height
CenterMpnList []int32 `json:"centerMpnList"` // 中心MPN枚举列表,对应 C# List<MPN> / Center MPN enum list, matching C# List<MPN>
CenterRateMax Vector3 `json:"centerRateMax"` // 中心最大比率 / Max center rate
StartRadiusMpnList []int32 `json:"startRadiusMpnList"` // 起点半径MPN枚举列表 / Start-radius MPN enum list
MaxStartRadius float32 `json:"maxStartRadius"` // 起点半径最大值 / Max start radius
EndRadiusMpnList []int32 `json:"endRadiusMpnList"` // 终点半径MPN枚举列表 / End-radius MPN enum list
MaxEndRadius float32 `json:"maxEndRadius"` // 终点半径最大值 / Max end radius
CenterMpnNameList []*string `json:"centerMpnNameList"` // 可空中心 MPN 名称列表 / List of nullable center MPN names
StartRadiusMpnNameList []*string `json:"startRadiusMpnNameList"` // 可空起点半径 MPN 名称列表 / List of nullable start-radius MPN names
EndRadiusMpnNameList []*string `json:"endRadiusMpnNameList"` // 可空终点半径 MPN 名称列表 / List of nullable end-radius MPN names
// contains filtered or unexported fields
}
ColliderMaidProp 对应游戏 NativeMaidPropColliderStatus ColliderMaidProp corresponds to the game's NativeMaidPropColliderStatus
func NewColliderMaidProp ¶
func NewColliderMaidProp() *ColliderMaidProp
NewColliderMaidProp 按当前 C# 构造函数与字段初始化器创建新的女仆属性碰撞体 NewColliderMaidProp creates a new maid-property collider from current C# constructors and field initializers
func (*ColliderMaidProp) CodecDecodeSelf ¶
func (v *ColliderMaidProp) CodecDecodeSelf(d *codec.Decoder)
CodecDecodeSelf 按共享 indexed-object 规则解码 ColliderMaidProp CodecDecodeSelf decodes ColliderMaidProp using the shared indexed-object rules
func (ColliderMaidProp) CodecEncodeSelf ¶
func (v ColliderMaidProp) CodecEncodeSelf(e *codec.Encoder)
CodecEncodeSelf 按共享 indexed-object 规则编码 ColliderMaidProp CodecEncodeSelf encodes ColliderMaidProp using the shared indexed-object rules
func (*ColliderMaidProp) UnmarshalJSON ¶
func (v *ColliderMaidProp) UnmarshalJSON(data []byte) error
UnmarshalJSON 解码 ColliderMaidProp 而不注入构造默认值或运行游戏回调 UnmarshalJSON decodes ColliderMaidProp without injecting constructor defaults or running game callbacks
type ColliderObject ¶
type ColliderObject struct {
Version int32 `json:"version"` // 版本号 / Version value
ParentName *string `json:"parentName"` // 可空父对象名称 / Nullable parent object name
SelfName *string `json:"selfName"` // 可空自身对象名称 / Nullable own object name
LocalPosition Vector3 `json:"localPosition"` // 本地位置 / Local position
LocalRotation Vector4 `json:"localRotation"` // 本地旋转四元数 / Local rotation quaternion
LocalScale Vector3 `json:"localScale"` // 本地缩放 / Local scale
Center Vector3 `json:"center"` // 碰撞体中心 / Collider center
Bound int32 `json:"bound"` // 修正方式:0=Outside,1=Inside / Correction mode: 0=Outside,1=Inside
}
ColliderObject 表示游戏 ANativeColliderStatus 的共用基类字段 ColliderObject represents shared base fields from the game's ANativeColliderStatus
type ColliderPackage ¶
type ColliderPackage struct {
Version int32 `json:"version"` // 版本号 / Version value
Colliders []*ColliderRef `json:"colliders"` // 可空碰撞体引用列表 / List of nullable collider references
LimbEnableList []*ColliderState `json:"limbEnableList"` // 可空 DynamicYureBone.LimbColliderInfo 列表 / List of nullable DynamicYureBone.LimbColliderInfo objects
// contains filtered or unexported fields
}
ColliderPackage 表示通用碰撞体包 ColliderPackage represents a generic collider package
func DecodeDBCol ¶
func DecodeDBCol(data []byte) (*ColliderPackage, error)
DecodeDBCol 解码 .dbcol 的长度前缀 LZ4 MessagePack ColliderPackage 载荷 DecodeDBCol decodes the length-prefixed LZ4 MessagePack ColliderPackage payload of a .dbcol file
func DecodeDSLCol ¶
func DecodeDSLCol(data []byte) (*ColliderPackage, error)
DecodeDSLCol 解码 .dslcol 的长度前缀 LZ4 MessagePack ColliderPackage 载荷 DecodeDSLCol decodes the length-prefixed LZ4 MessagePack ColliderPackage payload of a .dslcol file
func (*ColliderPackage) CodecDecodeSelf ¶
func (v *ColliderPackage) CodecDecodeSelf(d *codec.Decoder)
CodecDecodeSelf 按共享 indexed-object 规则解码 ColliderPackage CodecDecodeSelf decodes ColliderPackage using the shared indexed-object rules
func (ColliderPackage) CodecEncodeSelf ¶
func (v ColliderPackage) CodecEncodeSelf(e *codec.Encoder)
CodecEncodeSelf 按共享 indexed-object 规则编码 ColliderPackage CodecEncodeSelf encodes ColliderPackage using the shared indexed-object rules
func (ColliderPackage) MarshalJSON ¶
func (p ColliderPackage) MarshalJSON() ([]byte, error)
MarshalJSON 将 ColliderPackage 编码为当前 JSON 字段名 MarshalJSON encodes ColliderPackage using the current JSON field names
func (*ColliderPackage) UnmarshalJSON ¶
func (p *ColliderPackage) UnmarshalJSON(data []byte) error
UnmarshalJSON 解码 ColliderPackage 并拒绝已移除的 states 字段 UnmarshalJSON decodes ColliderPackage and rejects the removed states field
type ColliderPlane ¶
type ColliderPlane struct {
ColliderObject `codec:",inline"` // ANativeColliderStatus 基类字段 / ANativeColliderStatus base fields
Direction int32 `json:"direction"` // 平面法线方向 / Plane normal direction
IsDirectionInverse bool `json:"isDirectionInverse"` // 法线方向反转 / Reverse normal direction
// contains filtered or unexported fields
}
ColliderPlane 对应游戏 NativePlaneColliderStatus ColliderPlane corresponds to the game's NativePlaneColliderStatus
func NewColliderPlane ¶
func NewColliderPlane() *ColliderPlane
NewColliderPlane 按当前 C# 构造函数与字段初始化器创建新的平面碰撞体,线格式和 JSON 解码始终从零值开始且不运行游戏迁移 NewColliderPlane creates a new plane collider from current C# constructors and field initializers, while wire and JSON decoding always start from zero values and never run game migrations
func (*ColliderPlane) CodecDecodeSelf ¶
func (v *ColliderPlane) CodecDecodeSelf(d *codec.Decoder)
CodecDecodeSelf 按共享 indexed-object 规则解码 ColliderPlane CodecDecodeSelf decodes ColliderPlane using the shared indexed-object rules
func (ColliderPlane) CodecEncodeSelf ¶
func (v ColliderPlane) CodecEncodeSelf(e *codec.Encoder)
CodecEncodeSelf 按共享 indexed-object 规则编码 ColliderPlane CodecEncodeSelf encodes ColliderPlane using the shared indexed-object rules
func (*ColliderPlane) UnmarshalJSON ¶
func (v *ColliderPlane) UnmarshalJSON(data []byte) error
UnmarshalJSON 解码 ColliderPlane 而不注入构造默认值 UnmarshalJSON decodes ColliderPlane without injecting constructor defaults
type ColliderRef ¶
type ColliderRef struct {
Type int32 `json:"type"` // 碰撞体类型枚举 / Collider type enum
Collider ColliderStatusUnion `json:"collider"` // 碰撞体对象数据 / Collider object data
}
ColliderRef 表示带 union 类型枚举的碰撞体引用 ColliderRef represents a collider reference with its union type enum
func (*ColliderRef) CodecDecodeSelf ¶
func (c *ColliderRef) CodecDecodeSelf(d *codec.Decoder)
CodecDecodeSelf 解码 MessagePack-CSharp union 并拒绝未知类型标记 CodecDecodeSelf decodes a MessagePack-CSharp union and rejects unknown type tags
func (ColliderRef) CodecEncodeSelf ¶
func (c ColliderRef) CodecEncodeSelf(e *codec.Encoder)
CodecEncodeSelf 将 ColliderRef 的强类型载荷编码为 MessagePack-CSharp union CodecEncodeSelf encodes the typed payload of ColliderRef as a MessagePack-CSharp union
func (ColliderRef) MarshalJSON ¶
func (c ColliderRef) MarshalJSON() ([]byte, error)
MarshalJSON 编码碰撞体引用及其强类型载荷 MarshalJSON encodes a collider reference and its typed payload
func (*ColliderRef) UnmarshalJSON ¶
func (c *ColliderRef) UnmarshalJSON(data []byte) error
UnmarshalJSON 按 Type 解码已知碰撞体并拒绝未知 union 标记 UnmarshalJSON decodes a known collider according to Type and rejects unknown union tags
type ColliderSphere ¶
type ColliderSphere struct {
ColliderObject `codec:",inline"` // ANativeColliderStatus 基类字段 / ANativeColliderStatus base fields
Radius float32 `json:"radius"` // 半径 / Radius
// contains filtered or unexported fields
}
ColliderSphere 对应游戏 NativeSphereColliderStatus ColliderSphere corresponds to the game's NativeSphereColliderStatus
func NewColliderSphere ¶
func NewColliderSphere() *ColliderSphere
NewColliderSphere 按当前 C# 构造函数与字段初始化器创建新的球形碰撞体 NewColliderSphere creates a new sphere collider from current C# constructors and field initializers
func (*ColliderSphere) CodecDecodeSelf ¶
func (v *ColliderSphere) CodecDecodeSelf(d *codec.Decoder)
CodecDecodeSelf 按共享 indexed-object 规则解码 ColliderSphere CodecDecodeSelf decodes ColliderSphere using the shared indexed-object rules
func (ColliderSphere) CodecEncodeSelf ¶
func (v ColliderSphere) CodecEncodeSelf(e *codec.Encoder)
CodecEncodeSelf 按共享 indexed-object 规则编码 ColliderSphere CodecEncodeSelf encodes ColliderSphere using the shared indexed-object rules
func (*ColliderSphere) UnmarshalJSON ¶
func (v *ColliderSphere) UnmarshalJSON(data []byte) error
UnmarshalJSON 解码 ColliderSphere 而不注入构造默认值 UnmarshalJSON decodes ColliderSphere without injecting constructor defaults
type ColliderState ¶
type ColliderState struct {
Version int32 `json:"version"` // 版本号 / Version value
LimbType int32 `json:"limbType"` // limbType 枚举值 / LimbType enum value
IsEnable bool `json:"isEnable"` // 是否启用 / Enabled
// contains filtered or unexported fields
}
ColliderState 表示 DynamicYureBone.LimbColliderInfo ColliderState represents DynamicYureBone.LimbColliderInfo
func (*ColliderState) CodecDecodeSelf ¶
func (v *ColliderState) CodecDecodeSelf(d *codec.Decoder)
CodecDecodeSelf 按共享 indexed-object 规则解码 ColliderState CodecDecodeSelf decodes ColliderState using the shared indexed-object rules
func (ColliderState) CodecEncodeSelf ¶
func (v ColliderState) CodecEncodeSelf(e *codec.Encoder)
CodecEncodeSelf 按共享 indexed-object 规则编码 ColliderState CodecEncodeSelf encodes ColliderState using the shared indexed-object rules
func (*ColliderState) UnmarshalJSON ¶
func (s *ColliderState) UnmarshalJSON(data []byte) error
UnmarshalJSON 解码 ColliderState 并拒绝已移除的旧字段名 UnmarshalJSON decodes ColliderState and rejects removed legacy field names
type ColliderStatusUnion ¶
type ColliderStatusUnion interface {
// contains filtered or unexported methods
}
ColliderStatusUnion 表示强类型碰撞体状态可实现的 union 接口 ColliderStatusUnion represents the union interface implemented by typed collider states
type Color ¶
type Color struct {
R float32 `json:"r"` // 红色分量 / Red channel
G float32 `json:"g"` // 绿色分量 / Green channel
B float32 `json:"b"` // 蓝色分量 / Blue channel
A float32 `json:"a"` // 透明度分量 / Alpha channel
// contains filtered or unexported fields
}
Color 对应 MessagePack.Unity.ColorFormatter 的四槽浮点颜色 / Color matches the four-slot floating-point color used by MessagePack.Unity.ColorFormatter
func (*Color) CodecDecodeSelf ¶
CodecDecodeSelf 按共享 indexed-object 规则解码 Color CodecDecodeSelf decodes Color using the shared indexed-object rules
func (Color) CodecEncodeSelf ¶
CodecEncodeSelf 按共享 indexed-object 规则编码 Color CodecEncodeSelf encodes Color using the shared indexed-object rules
type Color32 ¶
type Color32 struct {
R uint8 `json:"r"` // 红色分量 / Red channel
G uint8 `json:"g"` // 绿色分量 / Green channel
B uint8 `json:"b"` // 蓝色分量 / Blue channel
A uint8 `json:"a"` // 透明度分量 / Alpha channel
// contains filtered or unexported fields
}
Color32 对应 MessagePack.Unity.Color32Formatter 的四槽八位颜色 / Color32 matches the four-slot eight-bit color used by MessagePack.Unity.Color32Formatter
func (*Color32) CodecDecodeSelf ¶
CodecDecodeSelf 按共享 indexed-object 规则解码 Color32 CodecDecodeSelf decodes Color32 using the shared indexed-object rules
func (Color32) CodecEncodeSelf ¶
CodecEncodeSelf 按共享 indexed-object 规则编码 Color32 CodecEncodeSelf encodes Color32 using the shared indexed-object rules
type ColorPreset ¶
type ColorPreset struct {
Version int32 `json:"version"` // Key 0 的预设版本,KCES FixVersion 为 1004,KCES2 为 1005 / Preset version at Key 0, with FixVersion 1004 in KCES and 1005 in KCES2
ID *string `json:"id"` // Key 1 的预设标识,用户预设保存时也作为虚拟文件名 / Preset identifier at Key 1, also used as the virtual filename for user presets
BaseMenuFile *string `json:"baseMenuFile"` // Key 2 的基础颜色预设菜单文件名 / Base color-preset menu filename at Key 2
UserCreated bool `json:"userCreated"` // Key 3 的用户创建标志,游戏据此决定是否保存预设二进制 / User-created flag at Key 3, used by the game to decide whether to save preset bytes
IsAdvancedMode bool `json:"isAdvancedMode"` // Key 4 的高级模式状态 / Advanced-mode state at Key 4
ColorPackList []*ColorPresetColorPack `json:"colorPackList"` // Key 5 的颜色层包列表 / Color-layer pack list at Key 5
InstanceGUID *string `json:"instanceGuid"` // Key 6 的可空实例标识,非空值由游戏作为不透明字符串使用 / Nullable instance identifier at Key 6, with non-empty values treated as opaque strings by the game
SaveLocationHash uint64 `json:"saveLocationHash"` // Key 7 的保存目录哈希,KCES2 新增 / Save-directory hash at Key 7, added by KCES2
CreationTicks int64 `json:"creationTicks"` // Key 8 的创建时间 DateTime ticks,KCES2 新增 / Creation time as DateTime ticks at Key 8, added by KCES2
LastUpdateTicks int64 `json:"lastUpdateTicks"` // Key 9 的最后更新时间 DateTime ticks,KCES2 新增 / Last update time as DateTime ticks at Key 9, added by KCES2
MetaTexts map[string]*string `json:"metaTexts"` // Key 10 的可空元数据文本字典,KCES2 新增 / Nullable metadata text map at Key 10, added by KCES2
IndexedArrayWidth int32 `json:"indexedArrayWidth,omitempty"` // 解码时记录的 6、7 或 11 槽线格式宽度,并非游戏成员 / Decoded 6-slot, 7-slot, or 11-slot wire width, not a game member
LegacyInstanceGUIDOmitted bool `json:"legacyInstanceGuidOmitted,omitempty"` // 旧版六槽对象未保存 Key 6 的线格式标记,并非游戏成员 / Wire marker for a legacy six-slot object that did not store Key 6, not a game member
}
ColorPreset 表示 MaidEdit.ColorPreset 与 MaidEdit.ColorPresetSlot 共用的序列化基类 两个派生类没有增加 MessagePack Key,因此线格式字节完全相同 ID、BaseMenuFile 与 InstanceGUID 使用指针,因为 C# 字符串格式化器允许 nil 普通解码不会重现游戏 Guid.NewGuid 回调,非空线格式值保持不透明,因为游戏不会对它调用 Guid.Parse LegacyInstanceGUIDOmitted 仅保留 instanceGuid 加入前的数组宽度,不对应游戏类成员 ColorPreset represents the serialized base shared by MaidEdit.ColorPreset and MaidEdit.ColorPresetSlot Neither derived class adds MessagePack keys, so their wire bytes are identical ID, BaseMenuFile, and InstanceGUID use pointers because the C# string formatter permits nil Ordinary decoding does not reproduce the game Guid.NewGuid callback, and a non-empty wire value remains opaque because the game never passes it through Guid.Parse LegacyInstanceGUIDOmitted only preserves the array width from before instanceGuid was added and does not correspond to a game-class member
func DecodeColorPreset ¶
func DecodeColorPreset(data []byte) (*ColorPreset, error)
DecodeColorPreset 解码完整 PrivateLz4BlockArray 用户预设而不调用构造默认值、迁移或序列化回调 DecodeColorPreset decodes a complete PrivateLz4BlockArray user preset without invoking constructor defaults, migrations, or serialization callbacks
func DecodeColorPresetWithInstanceGUID ¶
func DecodeColorPresetWithInstanceGUID(data []byte, constructorGUID string) (*ColorPreset, error)
DecodeColorPresetWithInstanceGUID 在 Key 6 缺失、nil 或为空时提供 C# 对象构造函数与 OnAfterDeserialize 回调原本会生成的确定值 这是显式选择的便利接口,非空线格式值仍具权威性并作为不透明文本处理 DecodeColorPresetWithInstanceGUID supplies the deterministic value otherwise generated by the C# object constructor and OnAfterDeserialize callback when Key 6 is absent, nil, or empty This is an explicit opt-in convenience while a non-empty wire value remains authoritative and is treated as opaque text
func DecodePresetColor ¶
func DecodePresetColor(data []byte) (*ColorPreset, error)
DecodePresetColor 解码独立 .presetcolor 文件并保留实际数组宽度 DecodePresetColor decodes a standalone .presetcolor file while preserving its actual array width
func NewColorPreset ¶
func NewColorPreset(instanceGUID string) (*ColorPreset, error)
NewColorPreset 创建与 C# 构造函数一致的确定性默认值,但要求调用者提供 GUID,避免 Guid.NewGuid 在序列化代码中隐藏身份变化 NewColorPreset creates the same deterministic defaults as the C# constructor but requires the caller to supply the GUID so Guid.NewGuid cannot hide identity changes inside serialization code
func NewKCES2ColorPreset ¶
func NewKCES2ColorPreset(instanceGUID string) (*ColorPreset, error)
NewKCES2ColorPreset 创建使用 1005 版本和十一槽布局的新 KCES2 颜色预设 NewKCES2ColorPreset creates a new KCES2 color preset using version 1005 and the 11-slot layout
type ColorPresetColorPack ¶
type ColorPresetColorPack struct {
Version int32 `json:"version"` // Key 0 的色包版本,当前 FixVersion 为 1001 / Color-pack version at Key 0, with a current FixVersion of 1001
MPNs []int32 `json:"mpns"` // Key 1 的 MPN 数值数组,当前版本反序列化回调会用 MPNNames 解析结果覆盖它 / Numeric MPN array at Key 1, overwritten by parsed MPNNames in the current-version deserialization callback
LayerName *string `json:"layerName"` // Key 2 的 SavedTexData 层名称 / SavedTexData layer name at Key 2
ViewName *string `json:"viewName"` // Key 3 的界面显示名称 / UI display name at Key 3
Type ColorPresetPackType `json:"type"` // Key 4 的颜色与透明度应用模式 / Color and alpha application mode at Key 4
ColorList []*ColorPresetLayerFreeColor `json:"colorList"` // Key 5 的普通层颜色列表 / Normal layer-color list at Key 5
GradationColorList []*ColorPresetGradationColor `json:"gradationColorList"` // Key 6 的渐变颜色点列表 / Gradation-color point list at Key 6
Alpha float32 `json:"alpha"` // Key 7 的乘算透明度 / Multiplied alpha at Key 7
AllowedMPNOverride bool `json:"allowedMpnOverRide"` // Key 8 的 MPN 覆盖许可标志 / MPN override permission flag at Key 8
MPNNames []*string `json:"mpnNames"` // Key 9 的项目可空 MPN 名称数组,当前反序列化回调用它重建 MPNs / MPN-name array with nullable entries at Key 9, used by the current deserialization callback to rebuild MPNs
LegacyMPNNamesOmitted bool `json:"legacyMpnNamesOmitted,omitempty"` // 旧版九槽对象未保存 Key 9 的线格式标记,并非游戏成员 / Wire marker for a legacy nine-slot object that did not store Key 9, not a game member
}
ColorPresetColorPack 保留 CustomColorPresetColorPack 的全部序列化字段,包括私有 mpnNames 与 allowedMpnOverRide 游戏 CopyTo 方法意外漏掉 allowedMpnOverRide,但本编解码器面向线格式本身,因此不会丢弃它 LegacyMPNNamesOmitted 仅保留 mpnNames 加入前的数组宽度,不对应游戏类成员 ColorPresetColorPack preserves every serialized CustomColorPresetColorPack field including private mpnNames and allowedMpnOverRide The game CopyTo method accidentally omits allowedMpnOverRide, but this codec models the wire itself and therefore does not discard it LegacyMPNNamesOmitted only preserves the array width from before mpnNames was added and does not correspond to a game-class member
type ColorPresetControlSlider ¶
type ColorPresetControlSlider struct {
Value float32 `json:"value"` // Key 0 的私有原始滑块值 value_,私有成员解析不会钳制它 / Private raw slider value_ at Key 0, not clamped by private-member deserialization
}
ColorPresetControlSlider 只包含 ControlSlider 唯一序列化的私有 value_ 字段 readonly range 被 MessagePack 忽略,并由 C# 构造函数重建为 0 至 1 ColorPresetControlSlider contains the only serialized private value_ field of ControlSlider Its readonly range is ignored by MessagePack and rebuilt as 0 through 1 by the C# constructor
type ColorPresetFreeColor ¶
type ColorPresetFreeColor struct {
Version int32 `json:"version"` // Key 0 的 FreeColor 版本,当前 FixVersion 为 1000 / FreeColor version at Key 0, with a current FixVersion of 1000
Hue int32 `json:"hue"` // Key 1 的私有原始色相 hue_ / Private raw hue_ value at Key 1
Saturation int32 `json:"saturation"` // Key 2 的私有原始饱和度 saturation_ / Private raw saturation_ value at Key 2
Brightness int32 `json:"brightness"` // Key 3 的私有原始亮度 brightness_,不是 rawBrighteness 加 255 表示 / Private raw brightness_ value at Key 3, not the rawBrighteness plus-255 representation
Contrast int32 `json:"contrast"` // Key 4 的私有原始对比度 contrast_ / Private raw contrast_ value at Key 4
}
ColorPresetFreeColor 公开 FreeColor 的四个私有原始字段 MessagePack 私有成员解析器不会让这些值经过带范围钳制的公开属性 ColorPresetFreeColor exposes the four private raw fields of FreeColor The MessagePack private-member resolver does not pass these values through the clamping public properties
type ColorPresetGradationColor ¶
type ColorPresetGradationColor struct {
Version int32 `json:"version"` // Key 0 的 GradationColor 版本,当前 FixVersion 为 1000 / GradationColor version at Key 0, with a current FixVersion of 1000
BaseColor *ColorPresetFreeColor `json:"baseColor"` // Key 1 的可空基础 FreeColor / Nullable base FreeColor at Key 1
ShadowColor *ColorPresetFreeColor `json:"shadowColor"` // Key 2 的可空阴影 FreeColor / Nullable shadow FreeColor at Key 2
ShadowRate int32 `json:"shadowRate"` // Key 3 的私有原始阴影比例 shadowRate_ / Private raw shadowRate_ value at Key 3
Position *ColorPresetControlSlider `json:"controlPointPosition"` // Key 4 的渐变控制点中心位置滑块 / Gradation control-point center-position slider at Key 4
RangeBefore *ColorPresetControlSlider `json:"controlPointRangeBefore"` // Key 5 的控制点前侧范围滑块 / Control-point before-range slider at Key 5
RangeAfter *ColorPresetControlSlider `json:"controlPointRangeAfter"` // Key 6 的控制点后侧范围滑块 / Control-point after-range slider at Key 6
}
ColorPresetGradationColor 在 LayerFreeColor 四个槽位后增加三个 ControlSlider ColorPresetGradationColor extends the four LayerFreeColor slots with three ControlSlider values
type ColorPresetLayerFreeColor ¶
type ColorPresetLayerFreeColor struct {
Version int32 `json:"version"` // Key 0 的 LayerFreeColor 版本,当前 FixVersion 为 1000 / LayerFreeColor version at Key 0, with a current FixVersion of 1000
BaseColor *ColorPresetFreeColor `json:"baseColor"` // Key 1 的可空基础 FreeColor / Nullable base FreeColor at Key 1
ShadowColor *ColorPresetFreeColor `json:"shadowColor"` // Key 2 的可空阴影 FreeColor / Nullable shadow FreeColor at Key 2
ShadowRate int32 `json:"shadowRate"` // Key 3 的私有原始阴影比例 shadowRate_ / Private raw shadowRate_ value at Key 3
}
ColorPresetLayerFreeColor 表示 LayerFreeColor 包含继承版本在内的四槽 indexed object ColorPresetLayerFreeColor represents the four-slot LayerFreeColor indexed object including its inherited version
type ColorPresetOrderList ¶
type ColorPresetOrderList struct {
Version int32 `json:"version"` // Key 0 的版本,当前 FixVersion 为 1000 / Version at Key 0, with a current FixVersion of 1000
IDOrderList []*string `json:"idOrderList"` // Key 1 的可空颜色预设 instanceGuid 顺序列表 / Nullable ordered list of color-preset instanceGuid values at Key 1
}
ColorPresetOrderList 表示 system.dat/EditData/color_preset 下名为 preset_orderlist 的 VirtualFile 载荷 它对应 MaidEdit.ColorPresetProvider.PresetOrderList,Key 0 是继承版本,Key 1 是 ID 顺序列表 IDOrderList 及其项目都可为 nil,游戏加载时会报告空、nil 和重复 ID 但不会拒绝序列化对象,因此此无损载荷层保留这些值 ColorPresetOrderList represents the payload in a VirtualFile named preset_orderlist below system.dat/EditData/color_preset It corresponds to MaidEdit.ColorPresetProvider.PresetOrderList with the inherited version at Key 0 and the ID order list at Key 1 IDOrderList and its entries may be nil, and the game reports empty, nil, and duplicate IDs while loading without rejecting the serialized object, so this lossless payload layer preserves them
func DecodeColorPresetOrderList ¶
func DecodeColorPresetOrderList(data []byte) (*ColorPresetOrderList, error)
DecodeColorPresetOrderList 解码直接保存在 preset_orderlist VirtualFile 中的 StandardLz4BlockArray 字节 此载荷没有 BinaryWriter 长度前缀,因为 SetFileData 直接接收 MessagePackSerializer.Serialize 的结果,LoadPresetOrder 也将完整 VirtualFile 字节交给反序列化器 根对象必须使用固定两槽布局并完整消费解压后的输入,空 Migrate 实现不会被调用,旧版本解码后也不重写 DecodeColorPresetOrderList decodes StandardLz4BlockArray bytes stored directly in the preset_orderlist VirtualFile This payload has no BinaryWriter length prefix because SetFileData receives MessagePackSerializer.Serialize output directly and LoadPresetOrder passes complete VirtualFile bytes to the deserializer The root must use the fixed two-slot layout and consume all decompressed input, while the empty Migrate implementation is not invoked and legacy versions are not rewritten after decoding
func NewColorPresetOrderList ¶
func NewColorPresetOrderList() *ColorPresetOrderList
NewColorPresetOrderList 返回 C# 构造流程产生的状态 AMessagePackSerializationVersionControlIntKey 将版本初始化为 FixVersion,而没有初始化器的 idOrderList 自动属性保持 nil NewColorPresetOrderList returns the state produced by the C# construction flow AMessagePackSerializationVersionControlIntKey initializes the version to FixVersion while the idOrderList auto-property has no initializer and remains nil
type ColorPresetPackType ¶
type ColorPresetPackType int32
ColorPresetPackType 表示 CustomColorPresetColorPack.Type 的 Int32 线格式值 ColorPresetPackType represents the Int32 wire value of CustomColorPresetColorPack.Type
const ( ColorPresetPackColorAndAlpha ColorPresetPackType = iota ColorPresetPackOnlyColor ColorPresetPackOnlyAlpha )
type ColorPresetSlot ¶
type ColorPresetSlot = ColorPreset
ColorPresetSlot 是 ColorPreset 的线格式别名,游戏派生类型没有新增 Key ColorPresetSlot is a wire alias of ColorPreset because the game-derived type adds no keys
func DecodeColorPresetSlot ¶
func DecodeColorPresetSlot(data []byte) (*ColorPresetSlot, error)
DecodeColorPresetSlot 解码与 ColorPreset 线格式相同的 ColorPresetSlot 载荷 DecodeColorPresetSlot decodes the ColorPresetSlot payload whose wire form is identical to ColorPreset
func DecodeColorPresetSlotWithInstanceGUID ¶
func DecodeColorPresetSlotWithInstanceGUID(data []byte, constructorGUID string) (*ColorPresetSlot, error)
DecodeColorPresetSlotWithInstanceGUID 为 instanceGuid 缺失的 ColorPresetSlot 载荷提供确定性构造形式 DecodeColorPresetSlotWithInstanceGUID provides the deterministic constructor form for a ColorPresetSlot payload with a missing instanceGuid field
func NewColorPresetSlot ¶
func NewColorPresetSlot(instanceGUID string) (*ColorPresetSlot, error)
NewColorPresetSlot 是线格式相同的 ColorPresetSlot 对应显式构造函数 NewColorPresetSlot is the corresponding explicit constructor for the wire-identical ColorPresetSlot type
type ColorProp ¶
type ColorProp struct {
Type int32 `json:"type"` // 属性类型枚举值,如 100=_Color, 101=_ShadowColor / Property type enum, e.g. 100=_Color, 101=_ShadowColor
R float32 `json:"r"` // 红色分量 (0.0~1.0) / Red channel (0.0 to 1.0)
G float32 `json:"g"` // 绿色分量 / Green channel
B float32 `json:"b"` // 蓝色分量 / Blue channel
A float32 `json:"a"` // 透明度分量 / Alpha channel
// contains filtered or unexported fields
}
ColorProp 表示材质的颜色属性,MessagePack indexed array 依次保存类型与 RGBA 分量 ColorProp represents a material color property whose MessagePack indexed array stores the type and RGBA components in order
func (*ColorProp) CodecDecodeSelf ¶
CodecDecodeSelf 按共享 indexed-object 规则解码 ColorProp CodecDecodeSelf decodes ColorProp using the shared indexed-object rules
func (ColorProp) CodecEncodeSelf ¶
CodecEncodeSelf 按共享 indexed-object 规则编码 ColorProp CodecEncodeSelf encodes ColorProp using the shared indexed-object rules
type Colvari ¶
type Colvari struct {
Version int32 `json:"version"` // 版本号,游戏 FixVersion 为 1000 / Version value; the game's FixVersion is 1000
IconColor PartsColor `json:"iconColor"` // 颜色变体图标色 / Color-variant icon color
IconFileName *string `json:"iconFileName"` // 可空颜色变体图标文件名 / Nullable color-variant icon file name
ReqDefine *string `json:"reqDefine"` // 可空 DEFINE 要求 / Nullable DEFINE requirement
ColvariDatas []*ColvariData `json:"colvariDatas"` // 可空颜色变体数据对象列表 / List of nullable color-variant data objects
// contains filtered or unexported fields
}
Colvari 对应 Parts.Menu.Colvari,保存一个颜色变体菜单的入口信息 Colvari maps Parts.Menu.Colvari and stores color-variant menu entry data
func (*Colvari) CodecDecodeSelf ¶
CodecDecodeSelf 按共享 indexed-object 规则解码 Colvari CodecDecodeSelf decodes Colvari using the shared indexed-object rules
func (Colvari) CodecEncodeSelf ¶
CodecEncodeSelf 按共享 indexed-object 规则编码 Colvari CodecEncodeSelf encodes Colvari using the shared indexed-object rules
type ColvariData ¶
type ColvariData struct {
Version int32 `json:"version"` // 版本号,游戏 FixVersion 为 1000 / Version value; the game's FixVersion is 1000
MPN *string `json:"mpn"` // 可空目标 MPN 名称,多个值用竖线分隔 / Nullable target MPN names, pipe-separated when multiple
LayerName *string `json:"layerName"` // 可空保存图层名 / Nullable saved layer name
ColorType int32 `json:"colorType"` // 主颜色类型枚举 / Primary color type enum
MaskData []*MaskData `json:"maskData"` // 可空蒙版状态对象列表 / List of nullable mask-state objects
Alpha float32 `json:"alpha"` // 乘算透明度 / Multiplicative alpha
ColData PartsColor `json:"colData"` // 单色颜色数据 / Single color data
PartColDefs []*PartColDef `json:"partColDefs"` // 可空分部颜色定义对象列表 / List of nullable part-color definitions
GradaColDef *GradaColDef `json:"gradaColDef"` // 渐变色定义 / Gradient color definition
MamaFileName *string `json:"mamaFileName"` // 可空关联 MAMA 文件名 / Nullable related MAMA file name
ColorTypeSub int32 `json:"colorTypeSub"` // 渐变/复合颜色的子类型 / Subtype for gradient or compound color
UseType uint8 `json:"useType"` // 使用标志,bit0=alpha,bit1=color / Use flags, bit0=alpha and bit1=color
SaveInfColDataLinkLayer *string `json:"saveInfColDataLinkLayer"` // 可空共享无限色数据源图层名 / Nullable source layer name for shared infinity-color data
ViewName *string `json:"viewName"` // 可空编辑界面显示名 / Nullable display name in the edit UI
// contains filtered or unexported fields
}
ColvariData 对应 Parts.Menu.Colvari.ColvariData,描述一条颜色变体规则 ColvariData maps Parts.Menu.Colvari.ColvariData and describes one color-variant rule
func (*ColvariData) CodecDecodeSelf ¶
func (v *ColvariData) CodecDecodeSelf(d *codec.Decoder)
CodecDecodeSelf 按共享 indexed-object 规则解码 ColvariData CodecDecodeSelf decodes ColvariData using the shared indexed-object rules
func (ColvariData) CodecEncodeSelf ¶
func (v ColvariData) CodecEncodeSelf(e *codec.Encoder)
CodecEncodeSelf 按共享 indexed-object 规则编码 ColvariData CodecEncodeSelf encodes ColvariData using the shared indexed-object rules
type Command ¶
type Command struct {
Type int32 `json:"type"` // 命令类型枚举值 / Command type enum value
Args []*string `json:"args"` // 可空命令参数字符串数组 / Array of nullable command-argument strings
// contains filtered or unexported fields
}
Command 表示一条 Parts.Menu 菜单命令 MessagePack indexed array 依次保存命令类型和参数数组 Command represents one Parts.Menu command Its MessagePack indexed array stores the command type followed by the argument array
func (*Command) CodecDecodeSelf ¶
CodecDecodeSelf 按共享 indexed-object 规则解码 Command CodecDecodeSelf decodes Command using the shared indexed-object rules
func (Command) CodecEncodeSelf ¶
CodecEncodeSelf 按共享 indexed-object 规则编码 Command CodecEncodeSelf encodes Command using the shared indexed-object rules
type DynamicBoneAnimationFrame ¶
type DynamicBoneAnimationFrame struct {
Time float32 `json:"time"` // 关键帧时间 / Keyframe time
Value float32 `json:"value"` // 关键帧值 / Keyframe value
InTangent float32 `json:"inTangent"` // 入切线 / Incoming tangent
OutTangent float32 `json:"outTangent"` // 出切线 / Outgoing tangent
// contains filtered or unexported fields
}
DynamicBoneAnimationFrame 表示 DynamicBoneStatus 的一个动画关键帧 / DynamicBoneAnimationFrame represents one animation keyframe in DynamicBoneStatus
func (*DynamicBoneAnimationFrame) CodecDecodeSelf ¶
func (v *DynamicBoneAnimationFrame) CodecDecodeSelf(d *codec.Decoder)
CodecDecodeSelf 按游戏的 indexed-array 格式解码 DynamicBoneAnimationFrame CodecDecodeSelf decodes DynamicBoneAnimationFrame using the game's indexed-array format
func (DynamicBoneAnimationFrame) CodecEncodeSelf ¶
func (v DynamicBoneAnimationFrame) CodecEncodeSelf(e *codec.Encoder)
CodecEncodeSelf 按游戏的 indexed-array 格式编码 DynamicBoneAnimationFrame CodecEncodeSelf encodes DynamicBoneAnimationFrame using the game's indexed-array format
type DynamicBoneStatus ¶
type DynamicBoneStatus struct {
Version int32 `json:"version"` // 版本号,通常为 1000 / Version value, usually 1000
Damping float32 `json:"damping"` // 阻尼值 / Damping value
DampingKeyFrames []*DynamicBoneAnimationFrame `json:"dampingKeyFrames"` // 可空阻尼动画关键帧对象数组 / Array of nullable damping animation keyframe objects
Elasticity float32 `json:"elasticity"` // 弹性值 / Elasticity value
ElasticityKeyFrames []*DynamicBoneAnimationFrame `json:"elasticityKeyFrames"` // 可空弹性动画关键帧对象数组 / Array of nullable elasticity animation keyframe objects
Stiffness float32 `json:"stiffness"` // 刚性值 / Stiffness value
StiffnessKeyFrames []*DynamicBoneAnimationFrame `json:"stiffnessKeyFrames"` // 可空刚性动画关键帧对象数组 / Array of nullable stiffness animation keyframe objects
Inert float32 `json:"inert"` // 惯性值 / Inert value
InertKeyFrames []*DynamicBoneAnimationFrame `json:"inertKeyFrames"` // 可空惯性动画关键帧对象数组 / Array of nullable inert animation keyframe objects
Radius float32 `json:"radius"` // 碰撞半径 / Collision radius
RadiusKeyFrames []*DynamicBoneAnimationFrame `json:"radiusKeyFrames"` // 可空半径动画关键帧对象数组 / Array of nullable radius animation keyframe objects
EndLength float32 `json:"endLength"` // 末端长度 / End length
EndOffset Vector3 `json:"endOffset"` // 末端偏移 / End offset
Gravity Vector3 `json:"gravity"` // 重力向量 / Gravity vector
Force Vector3 `json:"force"` // 外力向量 / External force vector
FreezeAxis int32 `json:"freezeAxis"` // 冻结轴枚举 / Freeze-axis enum
// contains filtered or unexported fields
}
DynamicBoneStatus 对应游戏按 Key(0) 至 Key(15) 写入的 DynamicBoneStatus indexed-array / DynamicBoneStatus corresponds to the game's DynamicBoneStatus indexed array stored at Key(0) through Key(15)
func DecodeDBConf ¶
func DecodeDBConf(data []byte) (*DynamicBoneStatus, error)
DecodeDBConf 解码 .dbconf 的长度前缀 LZ4 MessagePack DynamicBoneStatus 载荷 DecodeDBConf decodes the length-prefixed LZ4 MessagePack DynamicBoneStatus payload of a .dbconf file
func DecodeDynamicBoneStatusFile ¶
func DecodeDynamicBoneStatusFile(data []byte) (*DynamicBoneStatus, error)
DecodeDynamicBoneStatusFile 解码 .dbconf 中的 DynamicBoneStatus 载荷 DecodeDynamicBoneStatusFile decodes the DynamicBoneStatus payload in a .dbconf file
func NewDynamicBoneStatus ¶
func NewDynamicBoneStatus() *DynamicBoneStatus
NewDynamicBoneStatus 返回当前游戏构造新对象时使用的默认值 解码已有文件时不会注入这些默认值 NewDynamicBoneStatus returns the defaults used by the current game when constructing a new object These defaults are not injected while decoding an existing file
func (*DynamicBoneStatus) CodecDecodeSelf ¶
func (v *DynamicBoneStatus) CodecDecodeSelf(d *codec.Decoder)
CodecDecodeSelf 按游戏的 indexed-array 格式解码 DynamicBoneStatus CodecDecodeSelf decodes DynamicBoneStatus using the game's indexed-array format
func (DynamicBoneStatus) CodecEncodeSelf ¶
func (v DynamicBoneStatus) CodecEncodeSelf(e *codec.Encoder)
CodecEncodeSelf 按游戏的 indexed-array 格式编码 DynamicBoneStatus CodecEncodeSelf encodes DynamicBoneStatus using the game's indexed-array format
func (*DynamicBoneStatus) UnmarshalJSON ¶
func (s *DynamicBoneStatus) UnmarshalJSON(data []byte) error
UnmarshalJSON 解码 DynamicBoneStatus 的 JSON 表示而不注入构造默认值 UnmarshalJSON decodes the JSON representation of DynamicBoneStatus without injecting constructor defaults
type ExpandedKCESPreset ¶
type ExpandedKCESPreset struct {
ContainerVersion int32 `json:"containerVersion"` // VirtualDirectory 容器版本 / VirtualDirectory container version
ContainerFraming ct.VirtualDirectoryFraming `json:"containerFraming,omitempty"` // VirtualDirectory MessagePack 目录的外层尾部封装 / Outer footer frame around the VirtualDirectory MessagePack directory
ContainerDirectories map[string]ct.VirtualDirectoryMetadata `json:"containerDirectories,omitempty"` // 虚拟目录的真实版本字段 / Real version fields of virtual directories
Thumbnail []byte `json:"thumbnail"` // thumbnail 虚拟文件字节 / Bytes of the thumbnail virtual file
MaidData ExpandedKCESPresetCore `json:"maidData"` // 展开三个内部块的必需 maiddata 核心 / Required maiddata core with all three inner blocks expanded
Meta *KCESPresetMeta `json:"meta,omitempty"` // 可选 meta 虚拟文件记录 / Optional record from the meta virtual file
ExtraFiles map[string][]byte `json:"extraFiles,omitempty"` // 除三个已知名称外的虚拟文件 / Virtual files other than the three known names
}
ExpandedKCESPreset 是 KCES VirtualDirectory 预设的完整解码编辑表示,三个 MaidPresetCore 字节串只以实际游戏结构表示 / ExpandedKCESPreset is the fully decoded editing representation of a KCES VirtualDirectory preset whose three MaidPresetCore byte strings are represented only by actual game structures
func DecodeExpandedKCESPreset ¶
func DecodeExpandedKCESPreset(data []byte) (*ExpandedKCESPreset, error)
DecodeExpandedKCESPreset 解码 VirtualDirectory 和 MessagePack 封套以及三个已知 MaidPresetCore 字节串载荷 DecodeExpandedKCESPreset decodes the VirtualDirectory and MessagePack envelope together with all three known MaidPresetCore byte-string payloads
func ExpandKCESPreset ¶
func ExpandKCESPreset(preset *KCESPreset) (*ExpandedKCESPreset, error)
ExpandKCESPreset 将已解码的不透明 KCESPreset 转换为完整强类型编辑表示 nil 内部字节串保持为 nil,存在但格式错误的块会被拒绝而不是作为无法解释的字节数组公开 ExpandKCESPreset converts an already decoded opaque KCESPreset into its fully typed editing representation Nil inner byte strings remain nil, while a present but malformed block is rejected instead of being exposed as an unexplained byte array
func (*ExpandedKCESPreset) UnmarshalJSON ¶
func (value *ExpandedKCESPreset) UnmarshalJSON(data []byte) error
UnmarshalJSON 严格解码完整预设编辑对象并要求所有非可选封套字段显式存在 UnmarshalJSON strictly decodes a complete preset editing object and requires every non-optional envelope field to be present
type ExpandedKCESPresetCore ¶
type ExpandedKCESPresetCore struct {
Version int32 `json:"version"` // MaidPresetCore 对象版本 / MaidPresetCore object version
PropData *KCESPresetPropertyList `json:"propData"` // 展开的 Maid.SerializeProp 块 / Expanded Maid.SerializeProp block
ColorData *KCESPresetColorData `json:"colorData"` // 展开的 Maid.SerializeMultiColor 块 / Expanded Maid.SerializeMultiColor block
BodyData *KCESPresetBodyData `json:"bodyData"` // 展开的 Maid.SerializeBody 块 / Expanded Maid.SerializeBody block
}
ExpandedKCESPresetCore 是将 propData、colorData 和 bodyData 解码为各自 BinaryWriter 结构的 MaidPresetCore / ExpandedKCESPresetCore is MaidPresetCore with propData, colorData, and bodyData decoded into their respective BinaryWriter structures
func (*ExpandedKCESPresetCore) UnmarshalJSON ¶
func (value *ExpandedKCESPresetCore) UnmarshalJSON(data []byte) error
UnmarshalJSON 严格解码 maiddata 核心并要求版本及三个可空内部块字段显式出现 UnmarshalJSON strictly decodes the maiddata core and requires the version and all three nullable inner-block fields to be explicitly present
type FloatProp ¶
type FloatProp struct {
Type int32 `json:"type"` // 属性类型枚举值,如 200=_Shininess, 202=_OutlineWidth / Property type enum, e.g. 200=_Shininess, 202=_OutlineWidth
V float32 `json:"v"` // 浮点值 / Float value
// contains filtered or unexported fields
}
FloatProp 表示材质的浮点属性,MessagePack indexed array 依次保存类型和值 FloatProp represents a material float property whose MessagePack indexed array stores the type and value in order
func (*FloatProp) CodecDecodeSelf ¶
CodecDecodeSelf 按共享 indexed-object 规则解码 FloatProp CodecDecodeSelf decodes FloatProp using the shared indexed-object rules
func (FloatProp) CodecEncodeSelf ¶
CodecEncodeSelf 按共享 indexed-object 规则编码 FloatProp CodecEncodeSelf encodes FloatProp using the shared indexed-object rules
type GP03BridgeFile ¶
type GP03BridgeFile struct {
Signature string // 文件签名 GP03_BRIDGE / File signature GP03_BRIDGE
Version int32 // 外层桥接版本 / Outer bridge version
GUID string // 传输角色的 GUID / GUID of the transferred character
LegacyPreset []byte `json:"-"` // v2001 的 COM3D2 preset wire 块,v2000 必须为空 / COM3D2 preset wire block for v2001, required to be empty for v2000
CurrentPreset []byte `json:"-"` // 可空 KCES preset wire 块 / Nullable KCES preset wire block
}
GP03BridgeFile 表示 KCES ExportCM.cs v2001 与 COM3D2_5 Maid.ExportBridgeGP03 v2000 共用的内部 wire framing,两个预设块会在 service 层立即解码且不进入 editing JSON / GP03BridgeFile represents the internal wire framing shared by KCES ExportCM.cs v2001 and COM3D2_5 Maid.ExportBridgeGP03 v2000, with both preset blocks immediately decoded by the service layer and excluded from editing JSON
func DecodeGP03Bridge ¶
func DecodeGP03Bridge(data []byte) (*GP03BridgeFile, error)
DecodeGP03Bridge 解码共用桥接 framing 并严格校验支持的版本、块长度和文件结尾 DecodeGP03Bridge decodes the shared bridge framing and strictly validates the supported version, block lengths, and file end
func NewGP03BridgeFile ¶
func NewGP03BridgeFile() *GP03BridgeFile
NewGP03BridgeFile 创建使用 KCES 当前签名和版本的新桥接文件 NewGP03BridgeFile creates a new bridge file with the current KCES signature and version
type GradPointsData ¶
type GradPointsData struct {
GradPointParam []map[int32]int32 `json:"gradPointParam"` // Key 0 的各渐变点颜色参数字典,键布局与 PaletteColorSaveData 相同 / Per-point color-parameter maps at Key 0 using the same key layout as PaletteColorSaveData
ControlPointPosValue []float32 `json:"controlPointPosValue"` // Key 1 的各渐变控制点中心位置 / Center positions of gradation control points at Key 1
GradationPointPositionRates []float32 `json:"gradationPointPositionRates"` // Key 2 的旧式渐变点位置比例,当前游戏界面不读取 / Legacy gradation-point position rates at Key 2, not read by the current game UI
EditMPN int32 `json:"editMpn"` // Key 3 的旧式编辑 MPN 整数,当前游戏界面不读取 / Legacy edited MPN integer at Key 3, not read by the current game UI
PointRangeAfterRates []float32 `json:"pointRangeAfterRates"` // Key 4 的各控制点后侧范围值 / After-range values for control points at Key 4
PointRangeBeforeRates []float32 `json:"pointRangeBeforeRates"` // Key 5 的各控制点前侧范围值 / Before-range values for control points at Key 5
IsSave int32 `json:"isSave"` // Key 6 的保存状态,游戏以 1 表示已保存 / Save state at Key 6, with 1 indicating saved in the game
}
GradPointsData 表示 system.dat/EditData/GradSv 加索引文件中的类型化 Standard MessagePack 对象 它对应游戏 GradPointsData 类的固定 indexed array 字段,GradationPointPositionRates 与 EditMPN 是当前界面不读取但仍按真实类型建模的旧字段 GradPointsData represents the typed Standard MessagePack object stored in a system.dat/EditData/GradSv file suffixed by its index It corresponds to the fixed indexed-array fields of the game GradPointsData class, while GradationPointPositionRates and EditMPN are legacy fields not read by the current UI but still modeled with their real types
func DecodeGradPointsData ¶
func DecodeGradPointsData(data []byte) (*GradPointsData, error)
DecodeGradPointsData 解码一个固定七槽且完整消费输入的未压缩 Standard MessagePack 值 DecodeGradPointsData decodes one uncompressed Standard MessagePack value with the fixed seven-slot layout and consumes the complete input
func NewGradPointsData ¶
func NewGradPointsData() *GradPointsData
NewGradPointsData 显式返回当前游戏字段初始化器为新对象创建的默认空列表 NewGradPointsData explicitly returns the default empty lists created by the current game field initializers for a new object
type GradaColDef ¶
type GradaColDef struct {
NotUse *string `json:"notUse"` // 用途未知的可空字符串字段 notUse / Nullable string field notUse whose purpose is unknown
GradaNum int32 `json:"gradaNum"` // 渐变点数量 / Number of gradient points
GradaRates []float32 `json:"gradaRates"` // 渐变点位置比例 / Gradient point rates
GradaRateRanges []Vector4 `json:"gradaRateRanges"` // 渐变点影响范围 / Gradient point influence ranges
MultiCol PartsColor `json:"multi_col"` // 渐变用多色数据 / Multi-color data used by the gradient
// contains filtered or unexported fields
}
GradaColDef 对应 InfinityColorTexMgr2.GradaColDef,描述渐变色定义 GradaColDef maps InfinityColorTexMgr2.GradaColDef and describes a gradient color definition
func (*GradaColDef) CodecDecodeSelf ¶
func (v *GradaColDef) CodecDecodeSelf(d *codec.Decoder)
CodecDecodeSelf 按共享 indexed-object 规则解码 GradaColDef CodecDecodeSelf decodes GradaColDef using the shared indexed-object rules
func (GradaColDef) CodecEncodeSelf ¶
func (v GradaColDef) CodecEncodeSelf(e *codec.Encoder)
CodecEncodeSelf 按共享 indexed-object 规则编码 GradaColDef CodecEncodeSelf encodes GradaColDef using the shared indexed-object rules
type HairMake ¶
type HairMake struct {
Version int32 `json:"version"` // 版本号,当前为 1001 / Version value, currently 1001
ExportedGUID *string `json:"exportedGuid"` // 导出 GUID / Exported GUID
ExportedHairBuildVersion int32 `json:"exportedHairBuildVersion"` // 导出 HairMake 构建版本 / Exported HairMake build version
ExportedHairGameVersion int32 `json:"exportedHairGameVersion"` // 导出游戏版本 / Exported game version
SuspendedSaveFileName *string `json:"suspendedSaveFileName"` // 继续编辑存档文件名 / Continue-editing save filename
MaterialPerOriginalMenuFileName []*string `json:"materialPerOriginalMenuFileName"` // 原始菜单文件名 / Original menu filenames
MaterialPerOriginalMenuVersion []int32 `json:"materialPerOriginalMenuVersion"` // 原始菜单版本 / Original menu versions
IndexedArrayWidth int32 `codec:"-" json:"indexedArrayWidth,omitempty"` // 解码时记录的线格式数组宽度,并非游戏成员 / Wire array width recorded during decoding, not a game member
// contains filtered or unexported fields
}
HairMake 表示 KCES2 Menu 中的 HairMake 导出信息 / HairMake represents HairMake export information embedded in a KCES2 Menu
func NewHairMake ¶
func NewHairMake() *HairMake
NewHairMake 创建使用当前固定版本的新 HairMake 导出信息 NewHairMake creates new HairMake export information using the current fixed version
func (*HairMake) CodecDecodeSelf ¶
CodecDecodeSelf 按共享 indexed-object 规则解码 HairMake CodecDecodeSelf decodes HairMake using the shared indexed-object rules
func (HairMake) CodecEncodeSelf ¶
CodecEncodeSelf 按共享 indexed-object 规则编码 HairMake CodecEncodeSelf encodes HairMake using the shared indexed-object rules
func (*HairMake) MessagePackIndexedObjectWidth ¶
MessagePackIndexedObjectWidth 返回 HairMake 应写出的 indexed-array 宽度 MessagePackIndexedObjectWidth returns the indexed-array width that HairMake should emit
func (*HairMake) SetMessagePackIndexedObjectWidth ¶
SetMessagePackIndexedObjectWidth 设置 HairMake 应写出的 indexed-array 宽度 SetMessagePackIndexedObjectWidth sets the indexed-array width that HairMake should emit
type HairMakeBuildData ¶
type HairMakeBuildData struct {
MixHair *MixHairBuildData `codec:"hair" json:"hair"` // 混合头发构建数据 / Mixed-hair build data
SilhouettePreset *HairSilhouettePresetParameter `codec:"preset" json:"preset"` // 轮廓预设参数 / Silhouette preset parameters
SilhouetteData *HairSilhouetteParameter `codec:"silhouette" json:"silhouette"` // 轮廓形变数据 / Silhouette deformation data
BuildVersion int32 `codec:"build_ver" json:"buildVersion"` // HairMake 构建版本 / HairMake build version
GameVersion int32 `codec:"game_ver" json:"gameVersion"` // 游戏版本 / Game version
}
HairMakeBuildData 对应 HairMake.HairMakeBuildData 的字符串键 MessagePack 根对象 / HairMakeBuildData matches the string-keyed MessagePack root object HairMake.HairMakeBuildData
type HairMakeSave ¶
type HairMakeSave = HairMakeBuildData
HairMakeSave 是 .harimakesave 根对象的语义别名 / HairMakeSave is the semantic alias for a .harimakesave root object
func DecodeHairMakeSave ¶
func DecodeHairMakeSave(data []byte) (*HairMakeSave, error)
DecodeHairMakeSave 解码未压缩的字符串键 .harimakesave MessagePack 数据 DecodeHairMakeSave decodes uncompressed string-keyed .harimakesave MessagePack data
type HairSilhouetteParameter ¶
type HairSilhouetteParameter struct {
XDivisionPoints []int32 `codec:"xdiv" json:"xDivisionPoints"` // X 轴分割点 / X-axis division points
YDivisionPoints []int32 `codec:"ydiv" json:"yDivisionPoints"` // Y 轴分割点 / Y-axis division points
ZDivisionPoints []int32 `codec:"zdiv" json:"zDivisionPoints"` // Z 轴分割点 / Z-axis division points
DeformValues []Vector3 `codec:"values" json:"deformValues"` // 各网格点形变值 / Deformation values at each lattice point
}
HairSilhouetteParameter 对应 HairMake.HairSilhouetteParameter 的三轴分割点和形变值 / HairSilhouetteParameter matches the three-axis division points and deformation values in HairMake.HairSilhouetteParameter
type HairSilhouettePresetParameter ¶
type HairSilhouettePresetParameter struct {
Number int32 `codec:"no" json:"number"` // 轮廓预设编号 / Silhouette preset number
Version int32 `codec:"ver" json:"version"` // 轮廓预设版本 / Silhouette preset version
Deform float32 `codec:"deform" json:"deform"` // 预设形变量 / Preset deformation amount
Blend float32 `codec:"blend" json:"blend"` // 预设混合量 / Preset blend amount
}
HairSilhouettePresetParameter 对应 HairMake.HairSilhouettePresetParameter 的预设编号和混合参数 / HairSilhouettePresetParameter matches the preset number and blend parameters in HairMake.HairSilhouettePresetParameter
type HitCheck ¶
type HitCheck struct {
Signature string `json:"signature"` // 文件签名,通常为 HitCheck / File signature, usually HitCheck
Entries []HitCheckEntry `json:"entries"` // hitcheck 条目列表 / Hitcheck entry list
}
HitCheck 表示 KCES hitcheck 二进制文件 HitCheck represents a KCES hitcheck binary file
func DecodeHitCheck ¶
DecodeHitCheck 解码一个完整的 hitcheck 球形检测列表并拒绝根记录后的尾部数据 DecodeHitCheck decodes one complete hitcheck sphere list and rejects trailing data after the root record
func NewHitCheck ¶
func NewHitCheck() *HitCheck
NewHitCheck 显式创建当前识别的文件头,编码已有解码值时不会补默认值或升级 NewHitCheck explicitly creates the current recognized file header, while existing decoded values are never defaulted or upgraded during encoding
type HitCheckEntry ¶
type HitCheckEntry struct {
Type int32 `json:"type"` // 碰撞响应类型:0=通常球,1=头部等特殊球 / Collision response type: 0=normal sphere, 1=head/special sphere
Radius float32 `json:"radius"` // 半径,对应游戏 THitSphere.len / Radius, matching game THitSphere.len
RadiusSqr float32 `json:"radiusSqr"` // 半径平方,对应游戏 THitSphere.lenxlen / Squared radius, matching game THitSphere.lenxlen
Name string `json:"name"` // 碰撞球对象名,对应游戏 THitSphere.name / Hit sphere object name, matching game THitSphere.name
Parent string `json:"parent"` // 父骨骼名,对应游戏 THitSphere.pname / Parent bone name, matching game THitSphere.pname
Position Vector3 `json:"position"` // 本地位置,对应游戏 THitSphere.vs / Local position, matching game THitSphere.vs
SKRT int32 `json:"skrt"` // 裙/胸等用途标记,对应游戏 THitSphere.SKRT / Skirt/bust usage marker, matching game THitSphere.SKRT
RL int32 `json:"rl"` // 左右标记,对应游戏 THitSphere.RL / Left/right marker, matching game THitSphere.RL
}
HitCheckEntry 表示一个 hitcheck 球形检测条目 HitCheckEntry represents one spherical hitcheck entry
type IKColliderGroup ¶
type IKColliderGroup struct {
Version int32 `json:"version"` // 版本号 / Version value
Target int32 `json:"target"` // effectorType 枚举值 / Effector type enum
Colliders []*ColliderRef `json:"colliders"` // 可空碰撞体引用列表 / List of nullable collider references
// contains filtered or unexported fields
}
IKColliderGroup 表示一个 IK 效果器的碰撞体列表 IKColliderGroup represents colliders for one IK effector
func (*IKColliderGroup) CodecDecodeSelf ¶
func (v *IKColliderGroup) CodecDecodeSelf(d *codec.Decoder)
CodecDecodeSelf 按共享 indexed-object 规则解码 IKColliderGroup CodecDecodeSelf decodes IKColliderGroup using the shared indexed-object rules
func (IKColliderGroup) CodecEncodeSelf ¶
func (v IKColliderGroup) CodecEncodeSelf(e *codec.Encoder)
CodecEncodeSelf 按共享 indexed-object 规则编码 IKColliderGroup CodecEncodeSelf encodes IKColliderGroup using the shared indexed-object rules
type IKColliderPackage ¶
type IKColliderPackage struct {
Version int32 `json:"version"` // 版本号 / Version value
Groups []*IKColliderGroup `json:"groups"` // 可空 IK 效果器分组列表 / List of nullable IK effector groups
// contains filtered or unexported fields
}
IKColliderPackage 对应 IKColliderSaveLoader 保存的 IK collider 包 IKColliderPackage maps the IK-collider package saved by IKColliderSaveLoader
func DecodeIKCol ¶
func DecodeIKCol(data []byte) (*IKColliderPackage, error)
DecodeIKCol 解码 .ikcol 的长度前缀 LZ4 MessagePack IKColliderPackage 载荷 DecodeIKCol decodes the length-prefixed LZ4 MessagePack IKColliderPackage payload of a .ikcol file
func DecodeIKColBytes ¶
func DecodeIKColBytes(data []byte) (*IKColliderPackage, error)
DecodeIKColBytes 解码 .ikcol.bytes 的长度前缀 LZ4 MessagePack IKColliderPackage 载荷 DecodeIKColBytes decodes the length-prefixed LZ4 MessagePack IKColliderPackage payload of a .ikcol.bytes file
func (*IKColliderPackage) CodecDecodeSelf ¶
func (v *IKColliderPackage) CodecDecodeSelf(d *codec.Decoder)
CodecDecodeSelf 按共享 indexed-object 规则解码 IKColliderPackage CodecDecodeSelf decodes IKColliderPackage using the shared indexed-object rules
func (IKColliderPackage) CodecEncodeSelf ¶
func (v IKColliderPackage) CodecEncodeSelf(e *codec.Encoder)
CodecEncodeSelf 按共享 indexed-object 规则编码 IKColliderPackage CodecEncodeSelf encodes IKColliderPackage using the shared indexed-object rules
type InfColData ¶
type InfColData struct {
IsIndependenceMultiColor bool `json:"isIndependenceMultiColor"` // 是否使用独立多色表 / Whether independent multi-color table data is used
InfColType int32 `json:"infColType"` // 无限色类型枚举 / Infinity-color type enum
PartsColorType int32 `json:"partsColorType"` // MaidInfinityColor.PARTS_COLOR 枚举值 / MaidInfinityColor.PARTS_COLOR enum value
ColData PartsColor `json:"colData"` // 单色无限色数据 / Single infinity-color data
PartColDefs []*PartColDef `json:"partColDefs"` // 可空分部颜色数据对象列表 / List of nullable part-color data objects
GradaColDef *GradaColDef `json:"gradaColDef"` // 渐变色数据 / Gradient color data
GradaIsMugen bool `json:"gradaIsMugen"` // 渐变是否按无限色处理 / Whether the gradient is treated as infinity color
// contains filtered or unexported fields
}
InfColData 对应 InfinityColorTexMgr2.InfColData,保存应用后的无限色数据 InfColData maps InfinityColorTexMgr2.InfColData and stores applied infinity-color data
func NewInfColData ¶
func NewInfColData() *InfColData
NewInfColData 创建使用游戏默认无部件颜色 ID 的无限色数据 NewInfColData creates infinity-color data with the game's default no-part-color ID
func (*InfColData) CodecDecodeSelf ¶
func (v *InfColData) CodecDecodeSelf(d *codec.Decoder)
CodecDecodeSelf 按共享 indexed-object 规则解码 InfColData CodecDecodeSelf decodes InfColData using the shared indexed-object rules
func (InfColData) CodecEncodeSelf ¶
func (v InfColData) CodecEncodeSelf(e *codec.Encoder)
CodecEncodeSelf 按共享 indexed-object 规则编码 InfColData CodecEncodeSelf encodes InfColData using the shared indexed-object rules
func (*InfColData) UnmarshalJSON ¶
func (v *InfColData) UnmarshalJSON(data []byte) error
UnmarshalJSON 解码 InfColData 的 JSON 表示而不注入构造默认值 UnmarshalJSON decodes the JSON representation of InfColData without injecting constructor defaults
type InfColorParam ¶
type InfColorParam struct {
Tag *string `json:"tag"` // 可空无限色目标标签 / Nullable infinity-color target tag
InfColType int32 `json:"infColType"` // 颜色类型枚举:NONE/INF_COLOR/PART_COLOR/GRADA_COLOR / Color type enum
InfColorID int32 `json:"infColorId"` // MaidInfinityColor.PARTS_COLOR 枚举值 / MaidInfinityColor.PARTS_COLOR enum value
IsIndependenceMultiColor bool `json:"isIndependenceMultiColor"` // 是否使用独立多色数据 / Whether independent multi-color data is used
PC PartsColor `json:"pc"` // 单色无限色参数 / Single infinity-color parameters
IDTexName []*string `json:"idTexName"` // 可空 ID 贴图文件名列表 / List of nullable ID texture file names
PartCols []*PartColDef `json:"partCols"` // 可空分部颜色定义对象列表 / List of nullable part-color definition objects
GradeCols *GradaColDef `json:"gradeCols"` // 渐变色定义,字段名沿用游戏 gradeCols 拼写 / Gradient color definition, keeping the game's spelling
GradaLines []Vector4 `json:"gradaLines"` // 渐变线段数组 / Gradient line array
IDTexIsRGB bool `json:"idTexIsRGB"` // 是否把 ID 贴图按 RGB 通道分区解释 / Whether ID textures are interpreted by RGB channels
GradaIsMugen bool `json:"gradaIsMugen"` // 渐变是否使用无限色表 / Whether the gradient uses the infinity-color table
// contains filtered or unexported fields
}
InfColorParam 对应 TexLay.InfColorParam,描述无限色合成输入 InfColorParam maps TexLay.InfColorParam and describes infinity-color composition input
func NewInfColorParam ¶
func NewInfColorParam() *InfColorParam
NewInfColorParam 创建使用游戏默认无颜色 ID 的无限色参数 NewInfColorParam creates infinity-color parameters with the game's default no-color ID
func (*InfColorParam) CodecDecodeSelf ¶
func (v *InfColorParam) CodecDecodeSelf(d *codec.Decoder)
CodecDecodeSelf 按共享 indexed-object 规则解码 InfColorParam CodecDecodeSelf decodes InfColorParam using the shared indexed-object rules
func (InfColorParam) CodecEncodeSelf ¶
func (v InfColorParam) CodecEncodeSelf(e *codec.Encoder)
CodecEncodeSelf 按共享 indexed-object 规则编码 InfColorParam CodecEncodeSelf encodes InfColorParam using the shared indexed-object rules
func (*InfColorParam) UnmarshalJSON ¶
func (v *InfColorParam) UnmarshalJSON(data []byte) error
UnmarshalJSON 解码 InfColorParam 的 JSON 表示而不注入构造默认值 UnmarshalJSON decodes the JSON representation of InfColorParam without injecting constructor defaults
type KCES2GradPointsData ¶
type KCES2GradPointsData struct {
GradPointParam []map[int32]int32 `json:"gradPointParam"` // 各控制点的九项颜色整数参数 / Nine integer color parameters for each control point
ControlPointPosValue []float32 `json:"controlPointPosValue"` // 控制点中心位置值 / Control-point center position values
GradationPointPositionRates []float32 `json:"gradationPointPositionRates"` // 渐变点位置比例 / Gradation-point position rates
PointRangeAfterRates []float32 `json:"pointRangeAfterRates"` // 控制点后侧范围比例 / Control-point after-range rates
PointRangeBeforeRates []float32 `json:"pointRangeBeforeRates"` // 控制点前侧范围比例 / Control-point before-range rates
IsSave int32 `json:"isSave"` // 是否存在保存数据,0 表示否,1 表示是 / Whether saved data exists with zero for false and one for true
// contains filtered or unexported fields
}
KCES2GradPointsData 对应 KCES2.KCES2GradPointsData 的六槽渐变保存对象 / KCES2GradPointsData matches the six-slot gradation-save object KCES2.KCES2GradPointsData
func DecodeKCES2GradPointsData ¶
func DecodeKCES2GradPointsData(data []byte) (*KCES2GradPointsData, error)
DecodeKCES2GradPointsData 解码 EditData/KCES2GradSv{index} 中未压缩的 MessagePack 数据 DecodeKCES2GradPointsData decodes uncompressed MessagePack data stored at EditData/KCES2GradSv{index}
func NewKCES2GradPointsData ¶
func NewKCES2GradPointsData(isSave bool) *KCES2GradPointsData
NewKCES2GradPointsData 创建带空列表和明确保存状态的新 KCES2 渐变记录 NewKCES2GradPointsData creates a new KCES2 gradation record with empty lists and an explicit saved state
func (*KCES2GradPointsData) CodecDecodeSelf ¶
func (v *KCES2GradPointsData) CodecDecodeSelf(d *codec.Decoder)
CodecDecodeSelf 按共享 indexed-object 规则解码 KCES2GradPointsData CodecDecodeSelf decodes KCES2GradPointsData using the shared indexed-object rules
func (KCES2GradPointsData) CodecEncodeSelf ¶
func (v KCES2GradPointsData) CodecEncodeSelf(e *codec.Encoder)
CodecEncodeSelf 按共享 indexed-object 规则编码 KCES2GradPointsData CodecEncodeSelf encodes KCES2GradPointsData using the shared indexed-object rules
type KCES2ItemFavouriteStateData ¶
type KCES2ItemFavouriteStateData struct {
ItemFileName *string `json:"itemFileName"` // 可空菜单文件名 / Nullable menu filename
ItemFavouriteStateString *string `json:"favouriteStateString"` // 可空原始状态字符串,编解码器不会解析或过滤 / Nullable raw state string which the codec does not parse or filter
// contains filtered or unexported fields
}
KCES2ItemFavouriteStateData 对应 KCES2ItemFavouriteManager.ItemFavouriteStateData 的两槽记录 / KCES2ItemFavouriteStateData matches the two-slot KCES2ItemFavouriteManager.ItemFavouriteStateData record
func (*KCES2ItemFavouriteStateData) CodecDecodeSelf ¶
func (v *KCES2ItemFavouriteStateData) CodecDecodeSelf(d *codec.Decoder)
CodecDecodeSelf 按共享 indexed-object 规则解码 KCES2ItemFavouriteStateData CodecDecodeSelf decodes KCES2ItemFavouriteStateData using the shared indexed-object rules
func (KCES2ItemFavouriteStateData) CodecEncodeSelf ¶
func (v KCES2ItemFavouriteStateData) CodecEncodeSelf(e *codec.Encoder)
CodecEncodeSelf 按共享 indexed-object 规则编码 KCES2ItemFavouriteStateData CodecEncodeSelf encodes KCES2ItemFavouriteStateData using the shared indexed-object rules
type KCES2ItemFavouriteStateSetting ¶
type KCES2ItemFavouriteStateSetting []*KCES2ItemFavouriteStateData
KCES2ItemFavouriteStateSetting 对应 KCES2 收藏状态虚拟文件中的未压缩 MessagePack 列表 / KCES2ItemFavouriteStateSetting matches the uncompressed MessagePack list in the KCES2 favourite-state virtual file
func DecodeKCES2ItemFavouriteStateSetting ¶
func DecodeKCES2ItemFavouriteStateSetting(data []byte) (KCES2ItemFavouriteStateSetting, error)
DecodeKCES2ItemFavouriteStateSetting 解码收藏状态虚拟文件中的未压缩 MessagePack 列表 DecodeKCES2ItemFavouriteStateSetting decodes the uncompressed MessagePack list stored in the favourite-state virtual file
type KCESBridgeSession ¶
type KCESBridgeSession struct {
ContainerVersion int32 `json:"containerVersion"` // 外层 VirtualDirectory 对象版本 / Outer VirtualDirectory object version
ContainerFraming ct.VirtualDirectoryFraming `json:"containerFraming,omitempty"` // VirtualDirectory MessagePack 目录的外层尾部封装 / Outer footer frame around the VirtualDirectory MessagePack directory
ContainerDirectories map[string]ct.VirtualDirectoryMetadata `json:"containerDirectories,omitempty"` // 各虚拟目录的真实版本字段 / Real version fields of each virtual directory
SessionData KCESBridgeSessionData `json:"sessionData"` // session_data 文件中的必需 EditBridgeSessionData 根值 / Required EditBridgeSessionData root value in the session_data file
ExtraFiles map[string][]byte `json:"extraFiles,omitempty"` // 两个保留名称之外虚拟文件的真实 byte[] 载荷 / Real byte-array payloads of virtual files other than the two reserved names
}
KCESBridgeSession 表示写入 bridge_session.vd 的完整 VirtualDirectory,两个已知文件公开为专用字段,其余独立虚拟文件原样保留 / KCESBridgeSession represents the complete VirtualDirectory written to bridge_session.vd, exposing its two known files as dedicated fields while retaining other independent virtual files verbatim
func DecodeKCESBridgeSession ¶
func DecodeKCESBridgeSession(data []byte) (*KCESBridgeSession, error)
DecodeKCESBridgeSession 解析并验证完整 bridge_session.vd VirtualDirectory DecodeKCESBridgeSession parses and validates the complete bridge_session.vd VirtualDirectory
func NewKCESBridgeSession ¶
func NewKCESBridgeSession(sessionID string) *KCESBridgeSession
NewKCESBridgeSession 显式创建当前格式对象,解码器不会调用它或注入这些默认值 NewKCESBridgeSession explicitly creates a current-format object while decoders neither call it nor inject these defaults
type KCESBridgeSessionData ¶
type KCESBridgeSessionData struct {
Version int32 `json:"version"` // Key 0 的版本,当前 FixVersion 为 0 / Version at Key 0, with a current FixVersion of 0
SessionID string `json:"sessionId"` // Key 1 的桥接会话标识,完整容器还要求与 session_id 文件一致 / Bridge session identifier at Key 1, also required to match the session_id file in a complete container
HideMenuFileIDs []uint64 `json:"hideMenuFileIds"` // Key 2 中需要隐藏的菜单文件 FNV-1a RID 集合 / Set of menu-file FNV-1a RIDs to hide at Key 2
}
KCESBridgeSessionData 对应 session_data 虚拟文件中的固定三槽 Standard MessagePack indexed object,依次保存版本、sessionId 和 HashSet<ulong> / KCESBridgeSessionData corresponds to the fixed three-slot Standard MessagePack indexed object in session_data, storing the version, sessionId, and HashSet<ulong> in order
type KCESEditDataFile ¶
type KCESEditDataFile struct {
Path string `json:"path"` // 游戏用于选择解析器的完整 VirtualDirectory 路径 / Complete VirtualDirectory path used by the game to select a parser
Kind KCESEditDataKind `json:"kind"` // 从路径确定的强类型载荷种类 / Typed payload kind determined from the path
PresetPanelNames *PresetPanelNameSaveData `json:"presetPanelNames,omitempty"` // 预设面板框名称载荷,仅用于对应种类 / Preset-panel box-name payload used only for its matching kind
PaletteColor *PaletteColorSaveData `json:"paletteColor,omitempty"` // 调色板颜色槽载荷,仅用于对应种类 / Palette-color slot payload used only for its matching kind
GradPoints *GradPointsData `json:"gradPoints,omitempty"` // 渐变控制点载荷,仅用于对应种类 / Gradation control-point payload used only for its matching kind
KCES2GradPoints *KCES2GradPointsData `json:"kces2GradPoints,omitempty"` // KCES2 六槽渐变控制点载荷,仅用于对应种类 / KCES2 six-slot gradation control-point payload used only for its matching kind
ItemFavouriteStateSetting KCES2ItemFavouriteStateSetting `json:"itemFavouriteStateSetting,omitempty"` // KCES2 物品收藏状态载荷,仅用于对应种类 / KCES2 item-favourite state payload used only for its matching kind
MoveablePanel *MoveablePanelSaveData `json:"moveablePanel,omitempty"` // 可移动面板状态载荷,仅用于对应种类 / Moveable-panel state payload used only for its matching kind
PresetOrderList *ColorPresetOrderList `json:"presetOrderList,omitempty"` // 颜色预设顺序载荷,仅用于对应种类 / Color-preset order payload used only for its matching kind
ColorPreset *ColorPreset `json:"colorPreset,omitempty"` // 用户颜色预设载荷,仅用于对应种类 / User color-preset payload used only for its matching kind
}
KCESEditDataFile 表示 system.dat 的 EditData 目录下一个已识别文件 Path 保留存档槽位索引,Kind 防止编辑后的 JSON 将一种强类型对象静默解释为另一种 KCESEditDataFile represents one recognized file below the EditData directory in system.dat Path retains the save-slot index while Kind prevents edited JSON from silently interpreting one typed object as another
func (KCESEditDataFile) MarshalJSON ¶
func (entry KCESEditDataFile) MarshalJSON() ([]byte, error)
MarshalJSON 仅写出 Kind 对应的活动 EditData 分支并让类型化 nil 根显式成为 JSON null MarshalJSON emits only the EditData branch selected by Kind and represents a typed nil root as explicit JSON null
func (*KCESEditDataFile) UnmarshalJSON ¶
func (entry *KCESEditDataFile) UnmarshalJSON(data []byte) error
UnmarshalJSON 严格解码一个 EditData union,要求活动分支存在并拒绝未知字段或任何非活动分支 UnmarshalJSON strictly decodes one EditData union, requires the active branch, and rejects unknown fields or every inactive branch
type KCESEditDataKind ¶
type KCESEditDataKind string
KCESEditDataKind 标识游戏根据 system.dat 虚拟路径选择的已知 EditData 载荷模式 KCESEditDataKind identifies a known EditData payload schema selected by the game from its system.dat virtual path
const ( KCESEditDataPresetPanelNames KCESEditDataKind = "preset-panel-names" KCESEditDataPaletteColor KCESEditDataKind = "palette-color" KCESEditDataGradPoints KCESEditDataKind = "gradation-points" KCESEditDataKCES2GradPoints KCESEditDataKind = "kces2-gradation-points" KCESEditDataItemFavouriteStateSetting KCESEditDataKind = "item-favourite-state-setting" KCESEditDataMoveablePanel KCESEditDataKind = "moveable-panel" KCESEditDataPresetOrderList KCESEditDataKind = "color-preset-order-list" KCESEditDataColorPreset KCESEditDataKind = "color-preset" )
func KCESEditDataKindForPath ¶
func KCESEditDataKindForPath(path string) KCESEditDataKind
KCESEditDataKindForPath 返回游戏对给定精确 VirtualDirectory 路径采用的载荷模式 未知 EditData 文件有意返回空种类并保持不透明 KCESEditDataKindForPath returns the payload schema consumed by the game for an exact VirtualDirectory path Unknown EditData files deliberately return an empty kind and remain opaque
type KCESExportNameMap ¶
type KCESExportNameMap struct {
Version int32 `json:"version"` // ExportFileNameMap 对象版本 / ExportFileNameMap object version
Entries []KCESExportNameMapEntry `json:"entries"` // 按原生字典序列化顺序保存的映射条目 / Mapping entries in native dictionary serialization order
}
KCESExportNameMap 是 export_map.enm 的稳定强类型编辑表示 KCESExportNameMap is the stable typed editing representation of export_map.enm
func DecodeKCESExportNameMap ¶
func DecodeKCESExportNameMap(data []byte) (*KCESExportNameMap, error)
DecodeKCESExportNameMap 解析原生 Unity JsonUtility 表示 因 File.ReadAllText 会处理 BOM,允许一个前导 UTF-8 BOM,外层文档和嵌套字典都必须恰好包含一个 JSON 值 DecodeKCESExportNameMap parses the native Unity JsonUtility representation shown above One leading UTF-8 BOM is accepted because File.ReadAllText consumes it, and both the outer document and nested dictionary must contain exactly one JSON value
{"version":1000,"serializeData":"{\"keys\":[...],\"values\":[...]}"}
func DecodeKCESExportNameMapJSON ¶
func DecodeKCESExportNameMapJSON(data []byte) (*KCESExportNameMap, error)
DecodeKCESExportNameMapJSON 解析带格式标记的可编辑 JSON,条目列表必须存在且不能为 null DecodeKCESExportNameMapJSON parses the marker-based editable JSON form and requires a present, non-null entry list
type KCESExportNameMapEntry ¶
type KCESExportNameMapEntry struct {
InternalName string `json:"internalName"` // KCES 内部资源名 / KCES internal resource name
FileName string `json:"fileName"` // 导出到 COM3D2 目录的短文件名 / Short filename exported to the COM3D2 directory
}
KCESExportNameMapEntry 将原始内部资源名映射到实际写在 export_map.enm 旁的短文件名 KCESExportNameMapEntry maps an original internal resource name to the short filename actually written next to export_map.enm
type KCESPathsFile ¶
type KCESPathsFile struct {
Signature string `json:"signature"` // 文件签名 CM3D2_PATHS / File signature CM3D2_PATHS
Version int32 `json:"version"` // 路径列表格式版本 / Path-list format version
Paths []string `json:"paths"` // 原生资源搜索路径 / Native resource search paths
}
KCESPathsFile 表示 NativeFileManager.ReadAutoPathFile 读取的 paths.dat 路径列表,依次包含 .NET 字符串签名、Int32 版本、Int32 数量和对应数量的 .NET 字符串 KCESPathsFile represents the paths.dat list consumed by NativeFileManager.ReadAutoPathFile, containing a .NET string signature, Int32 version, Int32 count, and that many .NET strings
func DecodeKCESPaths ¶
func DecodeKCESPaths(data []byte) (*KCESPathsFile, error)
DecodeKCESPaths 解码一个完整的 paths.dat 路径列表并拒绝根记录后的尾部数据 DecodeKCESPaths decodes one complete paths.dat path list and rejects trailing data after the root record
func NewKCESPathsFile ¶
func NewKCESPathsFile() *KCESPathsFile
NewKCESPathsFile 创建使用当前签名和版本的新路径列表 NewKCESPathsFile creates a new path list with the current signature and version
type KCESPayloadDescriptor ¶
type KCESPayloadDescriptor struct {
Extension string // 文件扩展名 / File extension
Kind string // 原生 KCES 载荷类型 / Native KCES payload kind
LengthPrefixed bool // 原生载荷是否要求 Int32 长度前缀 / Whether the native payload requires an Int32 length prefix
}
KCESPayloadDescriptor 是一个受支持载荷扩展名的只读线格式约定 / KCESPayloadDescriptor is the read-only wire contract for one supported payload extension
func DescribeKCESPayload ¶
func DescribeKCESPayload(extension string) (KCESPayloadDescriptor, bool)
DescribeKCESPayload 返回扩展名的原生线格式描述符,返回副本不能修改注册表 DescribeKCESPayload returns the native wire descriptor for an extension as a copy that cannot mutate the registry
type KCESPreset ¶
type KCESPreset struct {
ContainerVersion int32 `json:"containerVersion"` // VirtualDirectory 容器版本 / VirtualDirectory container version
ContainerFraming ct.VirtualDirectoryFraming `json:"containerFraming,omitempty"` // VirtualDirectory MessagePack 目录的外层尾部封装 / Outer footer frame around the VirtualDirectory MessagePack directory
ContainerDirectories map[string]ct.VirtualDirectoryMetadata `json:"containerDirectories,omitempty"` // 虚拟目录的真实版本字段 / Real version fields of virtual directories
Thumbnail []byte `json:"thumbnail"` // thumbnail 虚拟文件字节 / Bytes of the thumbnail virtual file
MaidData *KCESPresetCore `json:"maidData"` // maiddata 虚拟文件中的内部线记录 / Inner wire record from the maiddata virtual file
Meta *KCESPresetMeta `json:"meta,omitempty"` // 可选 meta 虚拟文件记录 / Optional record from the meta virtual file
ExtraFiles map[string][]byte `json:"extraFiles,omitempty"` // 除三个已知名称外的虚拟文件 / Virtual files other than the three known names
}
KCESPreset 表示仅供二进制封装层使用的 KCES VirtualDirectory 预设 面向 editing JSON 的服务使用 ExpandedKCESPreset,不公开三个已知内部块的原始字节 KCESPreset represents the KCES VirtualDirectory preset used only by the binary envelope layer Editing JSON services use ExpandedKCESPreset and do not expose raw bytes for the three known inner blocks
func CollapseExpandedKCESPreset ¶
func CollapseExpandedKCESPreset(value *ExpandedKCESPreset) (*KCESPreset, error)
CollapseExpandedKCESPreset 将编辑表示转换回 MaidPresetCore MessagePack 线格式需要的字节串形式 CollapseExpandedKCESPreset converts the editing representation back to the byte-string form required by the MaidPresetCore MessagePack wire layout
func DecodeKCESPreset ¶
func DecodeKCESPreset(data []byte) (*KCESPreset, error)
DecodeKCESPreset 解码当前 KCES VirtualDirectory 预设并保留容器元数据与额外文件 DecodeKCESPreset decodes a current KCES VirtualDirectory preset and preserves container metadata and extra files
func NewKCES2Preset ¶
func NewKCES2Preset() (*KCESPreset, error)
NewKCES2Preset 创建容器和核心仍为 1000、元数据为 1001 的新 KCES2 预设 NewKCES2Preset creates a new KCES2 preset whose container and core remain version 1000 while its metadata uses version 1001
func NewKCESPreset ¶
func NewKCESPreset() (*KCESPreset, error)
NewKCESPreset 在有效的当前 MaidPresetCore 外创建空的当前容器,缩略图可为 nil,与游戏可选 createThumbnail 路径一致 NewKCESPreset creates an empty current container around a valid current MaidPresetCore, allowing nil thumbnail data to match the game's optional createThumbnail path
func (KCESPreset) MarshalJSON ¶
func (preset KCESPreset) MarshalJSON() ([]byte, error)
MarshalJSON 将底层预设封套转换为完整类型化编辑表示,禁止公开三个已知内部块的 Base64 字节 MarshalJSON converts the binary preset envelope to the fully typed editing representation and forbids exposing the three known inner blocks as Base64 bytes
func (*KCESPreset) UnmarshalJSON ¶
func (preset *KCESPreset) UnmarshalJSON(data []byte) error
UnmarshalJSON 严格读取完整类型化编辑表示并重建底层预设封套 UnmarshalJSON strictly reads the fully typed editing representation and rebuilds the binary preset envelope
type KCESPresetBodyData ¶
type KCESPresetBodyData struct {
Signature string `json:"signature"` // 身体块签名 CM3D2_MAID_BODY / Body-block signature CM3D2_MAID_BODY
Version int32 `json:"version"` // 身体块版本,当前游戏写入 1270 / Body-block version, written as 1270 by the current game
}
KCESPresetBodyData 表示 Maid.SerializeBody 当前只含签名和版本的身体块 KCESPresetBodyData represents the body block that currently contains only the signature and version in Maid.SerializeBody
func DecodeKCESPresetBodyData ¶
func DecodeKCESPresetBodyData(data []byte) (*KCESPresetBodyData, error)
DecodeKCESPresetBodyData 解码当前仅含签名和版本的完整身体块 DecodeKCESPresetBodyData decodes the complete body block that currently contains only a signature and version
func NewKCESPresetBodyData ¶
func NewKCESPresetBodyData() *KCESPresetBodyData
NewKCESPresetBodyData 创建使用当前游戏签名和 1270 版本的空身体块 NewKCESPresetBodyData creates an empty body block using the current game signature and version 1270
type KCESPresetColorData ¶
type KCESPresetColorData struct {
Signature string `json:"signature"` // 颜色块签名 CM3D2_MULTI_COL / Color-block signature CM3D2_MULTI_COL
Version int32 `json:"version"` // 颜色块版本 / Color-block version
PartCount int32 `json:"partCount"` // 线格式中的部件数量,新版游戏读取后不使用此值 / Part count stored on the wire and ignored after reading by the newer game branch
LegacyParts []KCESPresetLegacyColor `json:"legacyParts,omitempty"` // 版本不高于 1200 时按 PartCount 保存的旧式颜色值 / Legacy color values stored by PartCount for versions up to 1200
PartNames []string `json:"partNames,omitempty"` // 新版从线格式读取到大小写敏感 MAX 终止符之前的 PARTS_COLOR 名称 / Newer PARTS_COLOR names read until the case-sensitive MAX terminator
}
KCESPresetColorData 表示 MaidInfinityColor.Serialize 的颜色预设块 当前 1270 版只写入 22 个枚举名称和 MAX 终止符,实际自定义颜色保存在 PropBase.savedTexDatas 中 KCESPresetColorData represents the color preset block written by MaidInfinityColor.Serialize Current v1270 writes only 22 enum names and a MAX terminator, while actual customized colors live in PropBase.savedTexDatas
func DecodeKCESPresetColorData ¶
func DecodeKCESPresetColorData(data []byte) (*KCESPresetColorData, error)
DecodeKCESPresetColorData 解码 maiddata 的完整 CM3D2_MULTI_COL 块 DecodeKCESPresetColorData decodes the complete CM3D2_MULTI_COL block in maiddata
func NewKCESPresetColorData ¶
func NewKCESPresetColorData() *KCESPresetColorData
NewKCESPresetColorData 创建与当前游戏 1270 版二十二个 PARTS_COLOR 名称一致的颜色块 NewKCESPresetColorData creates a color block matching the current game's 22 PARTS_COLOR names for version 1270
type KCESPresetCore ¶
type KCESPresetCore struct {
Version int32 `json:"version"` // MaidPresetCore 对象版本 / MaidPresetCore object version
PropData []byte `json:"-"` // Maid.SerializeProp 生成的内部线块 / Inner wire block produced by Maid.SerializeProp
ColorData []byte `json:"-"` // Maid.SerializeMultiColor 生成的内部线块 / Inner wire block produced by Maid.SerializeMultiColor
BodyData []byte `json:"-"` // Maid.SerializeBody 生成的内部线块 / Inner wire block produced by Maid.SerializeBody
// contains filtered or unexported fields
}
KCESPresetCore 对应 MaidPreset.MaidPresetCore 的 indexed MessagePack 数组,依次保存版本、propData、colorData 和 bodyData KCESPresetCore matches the indexed MessagePack array of MaidPreset.MaidPresetCore, storing version, propData, colorData, and bodyData in order
func NewKCESPresetCore ¶
func NewKCESPresetCore() (*KCESPresetCore, error)
NewKCESPresetCore 创建新 KCES 1.34.4 预设使用的三个明确当前线格式块,不会更改从旧版本解码的核心 NewKCESPresetCore creates the three explicit current wire blocks used by a newly created KCES 1.34.4 preset without altering cores decoded from older versions
func (*KCESPresetCore) CodecDecodeSelf ¶
func (v *KCESPresetCore) CodecDecodeSelf(d *codec.Decoder)
CodecDecodeSelf 按共享 indexed-object 规则解码 KCESPresetCore CodecDecodeSelf decodes KCESPresetCore using the shared indexed-object rules
func (KCESPresetCore) CodecEncodeSelf ¶
func (v KCESPresetCore) CodecEncodeSelf(e *codec.Encoder)
CodecEncodeSelf 按共享 indexed-object 规则编码 KCESPresetCore CodecEncodeSelf encodes KCESPresetCore using the shared indexed-object rules
type KCESPresetCutoutMask ¶
type KCESPresetCutoutMask struct {
MaxLevel int32 `json:"maxLevel"` // 裁切遮罩最大等级 / Maximum cutout-mask level
NowLevel int32 `json:"nowLevel"` // 裁切遮罩当前等级 / Current cutout-mask level
Enabled bool `json:"enabled"` // 裁切遮罩待应用标志 dut / Cutout-mask pending-application flag dut
}
KCESPresetCutoutMask 表示 MaterialMgr.CutoutMask 的三个线格式字段 KCESPresetCutoutMask represents the three wire fields of MaterialMgr.CutoutMask
type KCESPresetEditBaseData ¶
type KCESPresetEditBaseData struct {
Version int32 `json:"version"` // BaseData 对象版本 / BaseData object version
ColorPreset *KCESPresetEditColorPreset `json:"colorPreset"` // 属性颜色预设引用 / Property color-preset reference
Flags map[string]*string `json:"flags"` // 编辑自定义字符串标志字典,值可为 nil / Edit-customization string flag map with nullable values
}
KCESPresetEditBaseData 是保存在 PropBase.editBaseData 中的 Standard MessagePack 对象 KCESPresetEditBaseData is the Standard MessagePack object stored in PropBase.editBaseData
func DecodeKCESPresetEditBaseData ¶
func DecodeKCESPresetEditBaseData(data []byte) (*KCESPresetEditBaseData, error)
DecodeKCESPresetEditBaseData 解码 PropBase.editBaseData 的 Standard MessagePack 根值 DecodeKCESPresetEditBaseData decodes the Standard MessagePack root stored in PropBase.editBaseData
func NewKCESPresetEditBaseData ¶
func NewKCESPresetEditBaseData() *KCESPresetEditBaseData
NewKCESPresetEditBaseData 创建使用当前版本和游戏字段默认值的新 BaseData NewKCESPresetEditBaseData creates new BaseData with the current version and game field defaults
type KCESPresetEditColorPreset ¶
type KCESPresetEditColorPreset struct {
ID *string `json:"id"` // 颜色预设标识,游戏也会保存菜单文件名 / Color-preset identifier, also populated with a menu filename by the game
SerializedPreset *ColorPreset `json:"serializedPreset"` // 解码后的嵌套颜色预设 / Decoded nested color preset
}
KCESPresetEditColorPreset 对应 EditCustomizeData.ColorPreset 嵌套 serializeBinary 字节串本身是完整且已知的 ColorPreset 或 ColorPresetSlot MessagePack 值,因此公开为强类型模型 KCESPresetEditColorPreset corresponds to EditCustomizeData.ColorPreset Its nested serializeBinary byte string is a complete known ColorPreset or ColorPresetSlot MessagePack value and is therefore exposed as a typed model
type KCESPresetEditUnitData ¶
type KCESPresetEditUnitData struct {
Version int32 `json:"version"` // UnitData 对象版本 / UnitData object version
PositionX float32 `json:"positionX"` // 编辑单位的 X 位置 / X position of the edit unit
PositionY float32 `json:"positionY"` // 编辑单位的 Y 位置 / Y position of the edit unit
WarpointName *string `json:"warpointName"` // 编辑单位的定位点名称 / Positioning-point name of the edit unit
}
KCESPresetEditUnitData 是保存在 SubProp.editUnitData 中的 Standard MessagePack 对象 KCESPresetEditUnitData is the Standard MessagePack object stored in SubProp.editUnitData
func DecodeKCESPresetEditUnitData ¶
func DecodeKCESPresetEditUnitData(data []byte) (*KCESPresetEditUnitData, error)
DecodeKCESPresetEditUnitData 解码 SubProp.editUnitData 的 Standard MessagePack 根值 DecodeKCESPresetEditUnitData decodes the Standard MessagePack root stored in SubProp.editUnitData
func NewKCESPresetEditUnitData ¶
func NewKCESPresetEditUnitData() *KCESPresetEditUnitData
NewKCESPresetEditUnitData 创建使用当前版本的新 UnitData NewKCESPresetEditUnitData creates new UnitData with the current version
type KCESPresetGradationColorDef ¶
type KCESPresetGradationColorDef struct {
NotUse *string `json:"notUse"` // 游戏字段名为 notUse 的可空保留字符串,当前源码未赋予用途 / Nullable reserved string named notUse by the game, with no use assigned in the current source
PointCount int32 `json:"pointCount"` // 渐变点数量 gradaNum / Gradation-point count gradaNum
Rates []float32 `json:"rates"` // 可空的渐变点比率数组 / Nullable gradation-point rate array
Ranges []Vector4 `json:"ranges"` // 可空的渐变比率范围数组 / Nullable gradation-rate range array
Color KCESPresetInfinityPartsColor `json:"color"` // 包含各渐变点颜色的多色参数 / Multi-color parameters containing the gradation-point colors
}
KCESPresetGradationColorDef 表示 InfinityColorTexMgr2.GradaColDef 的旧式线格式 KCESPresetGradationColorDef represents the legacy wire form of InfinityColorTexMgr2.GradaColDef
type KCESPresetInfinityColorData ¶
type KCESPresetInfinityColorData struct {
Independent bool `json:"independent"` // 是否使用独立多色数据 / Whether independent multi-color data is used
ColorType string `json:"colorType"` // InfinityColorTexMgr2.InfColData.COLOR_TYPE 的名称 / Name of InfinityColorTexMgr2.InfColData.COLOR_TYPE
PartsColorType string `json:"partsColorType"` // MaidInfinityColor.PARTS_COLOR 的名称 / Name of MaidInfinityColor.PARTS_COLOR
Color KCESPresetInfinityPartsColor `json:"color"` // 基础无限色参数 / Base infinity-color parameters
PartColors []KCESPresetPartColorDef `json:"partColors"` // 可空的分部颜色定义列表 / Nullable list of per-part color definitions
Gradation *KCESPresetGradationColorDef `json:"gradation"` // 可空的渐变色定义 / Nullable gradation-color definition
GradationMugen bool `json:"gradationMugen"` // 渐变颜色是否使用无限色模式 / Whether gradation color uses infinity-color mode
}
KCESPresetInfinityColorData 表示 InfinityColorTexMgr2.InfColData 的旧式 BinaryWriter 布局 KCESPresetInfinityColorData represents the legacy BinaryWriter layout of InfinityColorTexMgr2.InfColData
type KCESPresetInfinityPartsColor ¶
type KCESPresetInfinityPartsColor struct {
MainHue int32 `json:"mainHue"` // 主色相 / Main hue
MainChroma int32 `json:"mainChroma"` // 主彩度 / Main chroma
MainBrightness int32 `json:"mainBrightness"` // 主明度 / Main brightness
MainContrast int32 `json:"mainContrast"` // 主对比度 / Main contrast
ShadowRate int32 `json:"shadowRate"` // 阴影混合比例 / Shadow blend rate
ShadowHue int32 `json:"shadowHue"` // 阴影色相 / Shadow hue
ShadowChroma int32 `json:"shadowChroma"` // 阴影彩度 / Shadow chroma
ShadowBrightness int32 `json:"shadowBrightness"` // 阴影明度 / Shadow brightness
ShadowContrast int32 `json:"shadowContrast"` // 阴影对比度 / Shadow contrast
Gradation []KCESPresetInfinityPartsColorPoint `json:"gradation"` // 渐变点颜色数组,零长度时游戏恢复为 nil / Gradation-point color array, restored as nil by the game when its length is zero
}
KCESPresetInfinityPartsColor 表示 MaidInfinityColor.PartsColor 的九个颜色参数及可选渐变点 KCESPresetInfinityPartsColor represents the nine color parameters and optional gradation points of MaidInfinityColor.PartsColor
type KCESPresetInfinityPartsColorPoint ¶
type KCESPresetInfinityPartsColorPoint struct {
MainHue int32 `json:"mainHue"` // 主色相 / Main hue
MainChroma int32 `json:"mainChroma"` // 主彩度 / Main chroma
MainBrightness int32 `json:"mainBrightness"` // 主明度 / Main brightness
MainContrast int32 `json:"mainContrast"` // 主对比度 / Main contrast
ShadowRate int32 `json:"shadowRate"` // 阴影混合比例 / Shadow blend rate
ShadowHue int32 `json:"shadowHue"` // 阴影色相 / Shadow hue
ShadowChroma int32 `json:"shadowChroma"` // 阴影彩度 / Shadow chroma
ShadowBrightness int32 `json:"shadowBrightness"` // 阴影明度 / Shadow brightness
ShadowContrast int32 `json:"shadowContrast"` // 阴影对比度 / Shadow contrast
}
KCESPresetInfinityPartsColorPoint 表示渐变中的一个九参数 PartsColor 点 KCESPresetInfinityPartsColorPoint represents one nine-parameter PartsColor point in a gradation
type KCESPresetLegacyColor ¶
type KCESPresetLegacyColor struct {
Use bool `json:"use"` // 旧式颜色是否启用 / Whether the legacy color is enabled
MainHue int32 `json:"mainHue"` // 主色相 / Main hue
MainChroma int32 `json:"mainChroma"` // 主彩度 / Main chroma
MainBrightness int32 `json:"mainBrightness"` // 主明度 / Main brightness
MainContrast int32 `json:"mainContrast"` // 主对比度 / Main contrast
ShadowRate int32 `json:"shadowRate"` // 阴影混合比例 / Shadow blend rate
ShadowHue int32 `json:"shadowHue"` // 阴影色相 / Shadow hue
ShadowChroma int32 `json:"shadowChroma"` // 阴影彩度 / Shadow chroma
ShadowBrightness int32 `json:"shadowBrightness"` // 阴影明度 / Shadow brightness
ShadowContrast int32 `json:"shadowContrast"` // 阴影对比度 / Shadow contrast
}
KCESPresetLegacyColor 表示版本 1201 前 CM3D2_MULTI_COL 中的一项 KCES 改为 PARTS_COLOR 名称列表之前每项正好写入这十个值,此模型不执行迁移或默认颜色展开 KCESPresetLegacyColor represents one pre-v1201 CM3D2_MULTI_COL entry Before KCES switched to a PARTS_COLOR name list each entry wrote exactly these ten values, with no migration or default-color expansion applied here
type KCESPresetMaterialPropertySlot ¶
type KCESPresetMaterialPropertySlot struct {
SlotID string `json:"slotId"` // TBody.SlotID 的字符串名称 / String name of TBody.SlotID
SlotValue int32 `json:"slotValue"` // SlotPair 的整数值,仅从属性版本 2002 起在线格式中存在 / Integer value of SlotPair, present on the wire only since property version 2002
Properties []KCESPresetNamedMaterialProperty `json:"properties"` // 此槽位分组内按字典顺序保存的材质属性 / Material properties in this slot group in dictionary order
}
KCESPresetMaterialPropertySlot 表示 MaidProp.m_dicMaterialProp 中一个 SlotPair 分组 KCESPresetMaterialPropertySlot represents one SlotPair group in MaidProp.m_dicMaterialProp
type KCESPresetMaterialPropertyValue ¶
type KCESPresetMaterialPropertyValue struct {
MaterialNumber int32 `json:"materialNumber"` // 材质编号 / Material index
PropertyName *string `json:"propertyName"` // 可空的材质属性名称 / Nullable material-property name
TypeName *string `json:"typeName"` // 可空的属性类型名称 / Nullable property type name
Value *string `json:"value"` // 可空的序列化属性值 / Nullable serialized property value
}
KCESPresetMaterialPropertyValue 表示 MatPropSave.Serialize 写出的材质覆盖值 KCESPresetMaterialPropertyValue represents a material override written by MatPropSave.Serialize
type KCESPresetMeta ¶
type KCESPresetMeta struct {
Version int32 `json:"version"` // MaidPresetMeta 对象版本 / MaidPresetMeta object version
Data map[string]*string `json:"metaData"` // 预设元数据字符串字典,游戏明确读取 presetName / Preset metadata string map, with presetName explicitly read by the game
// contains filtered or unexported fields
}
KCESPresetMeta 对应 MaidPreset.MaidPresetMeta 的 indexed MessagePack 数组,依次保存版本和 metaData 字符串字典 KCESPresetMeta matches the indexed MessagePack array of MaidPreset.MaidPresetMeta, storing version followed by the metaData string map
func (*KCESPresetMeta) CodecDecodeSelf ¶
func (v *KCESPresetMeta) CodecDecodeSelf(d *codec.Decoder)
CodecDecodeSelf 按共享 indexed-object 规则解码 KCESPresetMeta CodecDecodeSelf decodes KCESPresetMeta using the shared indexed-object rules
func (KCESPresetMeta) CodecEncodeSelf ¶
func (v KCESPresetMeta) CodecEncodeSelf(e *codec.Encoder)
CodecEncodeSelf 按共享 indexed-object 规则编码 KCESPresetMeta CodecEncodeSelf encodes KCESPresetMeta using the shared indexed-object rules
func (*KCESPresetMeta) PresetName ¶
func (meta *KCESPresetMeta) PresetName() string
PresetName 返回与元数据版本对应的预设名称而不迁移字典键 PresetName returns the preset name selected by the metadata version without migrating dictionary keys
func (*KCESPresetMeta) SetPresetName ¶
func (meta *KCESPresetMeta) SetPresetName(value string)
SetPresetName 使用与元数据版本对应的键设置预设名称而不修改版本 SetPresetName sets the preset name using the key selected by the metadata version without changing that version
type KCESPresetNamedMaterialProperty ¶
type KCESPresetNamedMaterialProperty struct {
Key string `json:"key"` // 材质属性字典键 / Material-property dictionary key
RID uint64 `json:"rid"` // 与该覆盖值一同保存的资源 RID / Resource RID stored with this override
Property KCESPresetMaterialPropertyValue `json:"property"` // MatPropSave 保存的属性值 / Property value stored by MatPropSave
}
KCESPresetNamedMaterialProperty 表示材质属性字典中带 RID 的命名项 KCESPresetNamedMaterialProperty represents a named material-property dictionary entry with its RID
type KCESPresetNamedProperty ¶
type KCESPresetNamedProperty struct {
Key string `json:"key"` // Maid 属性字典中的键 / Key in the Maid property dictionary
Property KCESPresetProperty `json:"property"` // 键对应的 MaidProp 二进制块 / MaidProp binary block associated with the key
}
KCESPresetNamedProperty 表示属性字典中单独保存键名与 MaidProp 值的一项 KCESPresetNamedProperty represents one property-dictionary entry with its separately stored key and MaidProp value
type KCESPresetNamedSavedTexture ¶
type KCESPresetNamedSavedTexture struct {
Key string `json:"key"` // 纹理层或颜色变化数据的字典键 / Dictionary key for the texture layer or color-variation data
Value KCESPresetSavedTextureData `json:"value"` // SavedTexData 二进制内容 / SavedTexData binary contents
}
KCESPresetNamedSavedTexture 表示 PropBase.savedTexDatas 字典中的一项 KCESPresetNamedSavedTexture represents one entry in the PropBase.savedTexDatas dictionary
type KCESPresetPartColorDef ¶
type KCESPresetPartColorDef struct {
PartName *string `json:"partName"` // 可空的部件名称 / Nullable part name
Color KCESPresetInfinityPartsColor `json:"color"` // 此部件的多色参数 / Multi-color parameters for this part
PatternScale Vector2 `json:"patternScale"` // 此部件的图案缩放 / Pattern scale for this part
PatternRot float32 `json:"patternRotation"` // 此部件的图案旋转 / Pattern rotation for this part
}
KCESPresetPartColorDef 表示 InfinityColorTexMgr2.PartColDef 的旧式线格式 KCESPresetPartColorDef represents the legacy wire form of InfinityColorTexMgr2.PartColDef
type KCESPresetPartHide ¶
type KCESPresetPartHide struct {
PartName *string `json:"partName"` // 可空的身体部件名称 / Nullable body-part name
Enabled bool `json:"enabled"` // 是否隐藏此部件的保存值 / Saved value controlling whether this part is hidden
}
KCESPresetPartHide 表示 TBodySkin.PartHide 在线格式中保存的名称和启用值 KCESPresetPartHide represents the name and enable value stored on the wire for TBodySkin.PartHide
type KCESPresetPropBase ¶
type KCESPresetPropBase struct {
Index int32 `json:"index"` // 线格式中的属性索引,游戏反序列化后会用属性名称解析出的 MPN 覆盖此值 / Property index on the wire, overwritten after game deserialization by the MPN resolved from the property name
Type string `json:"type"` // PropBase.Type 的字符串名称 / String name of PropBase.Type
SubType string `json:"subType"` // 子属性使用的 PropBase.Type 字符串名称 / String name of the PropBase.Type used by sub-properties
FileName *string `json:"fileName"` // 可空的当前菜单文件名 / Nullable current menu filename
FileNameRID uint64 `json:"fileNameRid"` // 当前菜单文件的 RID / RID of the current menu file
Enabled bool `json:"enabled"` // PropBase 的待处理标志 bDut / PropBase processing-pending flag bDut
BeforeFileNameRID uint64 `json:"beforeFileNameRid"` // 前一个菜单文件的 RID / RID of the previous menu file
Defines uint64 `json:"defines"` // 应用当前属性时使用的 Menu.DEFINE 位掩码 / Menu.DEFINE bit mask used when applying the current property
SavedTextureDataRID uint64 `json:"savedTextureDataRid"` // 保存纹理编辑数据时对应的菜单文件 RID / Menu-file RID associated with the saved texture-edit data
SavedTextureDataDefines uint64 `json:"savedTextureDataDefines"` // 保存纹理编辑数据时对应的 Menu.DEFINE 位掩码 / Menu.DEFINE bit mask associated with the saved texture-edit data
SavedTextureData []KCESPresetNamedSavedTexture `json:"savedTextureData"` // 按层名称保存的纹理编辑数据,nil 与空集合在线格式中不同 / Texture-edit data keyed by layer name, with nil distinct from an empty collection on the wire
EditBaseData *KCESPresetEditBaseData `json:"editBaseData"` // EditCustomizeData.BaseData 的 Standard MessagePack 对象 / Standard MessagePack object for EditCustomizeData.BaseData
SavedCutoutMaskRID uint64 `json:"savedCutoutMaskRid"` // 保存裁切遮罩时对应的菜单文件 RID / Menu-file RID associated with the saved cutout mask
SavedCutoutMask *KCESPresetCutoutMask `json:"savedCutoutMask"` // 可空的材质裁切遮罩状态 / Nullable material cutout-mask state
SavedPartHideRID uint64 `json:"savedPartHideRid"` // 保存部件隐藏状态时对应的菜单文件 RID / Menu-file RID associated with the saved part-hide state
SavedPartHide []KCESPresetPartHide `json:"savedPartHide"` // 可空的部件隐藏状态列表 / Nullable list of part-hide states
UsePartHide bool `json:"usePartHide"` // 部件隐藏状态需要重新应用的标志 dutPartHide / Flag dutPartHide indicating that part-hide state needs to be reapplied
SavedAttachPositionRID uint64 `json:"savedAttachPositionRid"` // 保存附着位置时对应的菜单文件 RID / Menu-file RID associated with the saved attachment positions
SavedAttachPositions []SavedAttachData `json:"savedAttachPositions"` // 可空的部件附着位置编辑列表 / Nullable list of edited part attachment positions
NoScale bool `json:"noScale"` // 设置属性时请求不应用缩放的标志 / Flag requesting that scaling not be applied when setting the property
SubPropertyIsTuftTexture bool `json:"subPropertyIsTuftTexture"` // 标记此属性的子属性用于房状发束纹理 / Marks this property's sub-properties as tuft-hair textures
SavedHairLengthRID uint64 `json:"savedHairLengthRid"` // 保存发长数据时对应的菜单文件 RID / Menu-file RID associated with the saved hair-length data
SavedHairLengths []KCESPresetSavedHairLength `json:"savedHairLengths"` // 可空的发长控制点列表 / Nullable list of hair-length control points
SubProperties []*KCESPresetSubProperty `json:"subProperties"` // 可空且允许包含 nil 项的 SubProp 列表 / Nullable SubProp list whose entries may also be nil
}
KCESPresetPropBase 保留当前 PropBase.Serialize 的布局 nil 切片与非 nil 空切片有意区分,因为每个集合前都在线格式中写入存在性布尔值 KCESPresetPropBase preserves the current PropBase.Serialize layout Nil and non-nil empty slices are intentionally distinct because the wire writes a presence Boolean before each collection
type KCESPresetProperty ¶
type KCESPresetProperty struct {
Signature string `json:"signature"` // MaidProp 签名,当前游戏写入 GP03_MPROP / MaidProp signature, written as GP03_MPROP by the current game
Version int32 `json:"version"` // MaidProp 版本,当前游戏写入 2100 / MaidProp version, written as 2100 by the current game
Name string `json:"name"` // 属性名称,PropBase 反序列化时也用它解析 MPN / Property name, also used to resolve the MPN during PropBase deserialization
DefaultValue int32 `json:"defaultValue"` // 属性默认值,对应 MaidProp.def / Property default value corresponding to MaidProp.def
Value int32 `json:"value"` // 属性当前值,对应 MaidProp.value / Current property value corresponding to MaidProp.value
TempValue int32 `json:"tempValue"` // 属性临时值,对应 MaidProp.temp / Temporary property value corresponding to MaidProp.temp
FileNameRID uint64 `json:"fileNameRid"` // MaidProp 层保存的菜单文件 RID / Menu-file RID stored by the MaidProp layer
Enabled bool `json:"enabled"` // MaidProp 层的待处理标志 bDut / MaidProp processing-pending flag bDut
Max int32 `json:"max"` // 属性允许的最大值 / Maximum allowed property value
Min int32 `json:"min"` // 属性允许的最小值 / Minimum allowed property value
MaterialProperties []KCESPresetMaterialPropertySlot `json:"materialProperties"` // 按 SlotPair 分组的材质属性覆盖 / Material-property overrides grouped by SlotPair
Base KCESPresetPropBase `json:"base"` // 随后的 PropBase 继承字段 / Following inherited PropBase fields
}
KCESPresetProperty 表示 MaidProp.Serialize 写出的当前 2100 版字段以及随后继承的 PropBase 二进制块 KCESPresetProperty represents the current v2100 fields written by MaidProp.Serialize followed by the inherited PropBase binary block
type KCESPresetPropertyList ¶
type KCESPresetPropertyList struct {
Signature string `json:"signature"` // 属性列表签名,当前游戏写入 GP03_MPROP_LIST / Property-list signature, written as GP03_MPROP_LIST by the current game
Version int32 `json:"version"` // 属性列表版本,当前游戏写入 1270 / Property-list version, written as 1270 by the current game
Properties []KCESPresetNamedProperty `json:"properties"` // 按游戏字典枚举顺序保存的属性项 / Property entries in game dictionary enumeration order
}
KCESPresetPropertyList 表示 MaidPresetCore.propData 中的 GP03_MPROP_LIST 块 属性使用切片而非映射,以便在 JSON 往返期间保留游戏字典的枚举顺序以及线格式中的重复键 KCESPresetPropertyList represents the GP03_MPROP_LIST block stored in MaidPresetCore.propData Properties use a slice instead of a map so dictionary enumeration order and repeated wire keys survive a JSON round trip
func DecodeKCESPresetPropertyData ¶
func DecodeKCESPresetPropertyData(data []byte) (*KCESPresetPropertyList, error)
DecodeKCESPresetPropertyData 解码 Maid.SerializeProp 写出的完整属性字典 DecodeKCESPresetPropertyData decodes the complete property dictionary written by Maid.SerializeProp
func NewKCESPresetPropertyList ¶
func NewKCESPresetPropertyList() *KCESPresetPropertyList
NewKCESPresetPropertyList 创建使用当前游戏签名和 1270 版本的空属性列表 NewKCESPresetPropertyList creates an empty property list using the current game signature and version 1270
type KCESPresetSavedHairLength ¶
type KCESPresetSavedHairLength struct {
PartName *string `json:"partName"` // 可空的发长控制组名称 / Nullable hair-length control-group name
Value float32 `json:"value"` // 保存的发长控制值,游戏默认值为 0.5 / Saved hair-length control value, defaulting to 0.5 in the game
}
KCESPresetSavedHairLength 表示 SavedHairLength 的部件名称和长度值 KCESPresetSavedHairLength represents the part name and length value of SavedHairLength
type KCESPresetSavedTextureData ¶
type KCESPresetSavedTextureData struct {
UseLayer bool `json:"useLayer"` // 是否使用保存的纹理层 / Whether the saved texture layer is used
UseMultiplyAlpha bool `json:"useMultiplyAlpha"` // 是否使用乘算透明度 / Whether multiplied alpha is used
MultiplyAlpha float32 `json:"multiplyAlpha"` // 保存的乘算透明度值 / Saved multiplied-alpha value
Masks []KCESPresetTextureMask `json:"masks"` // 可空的纹理遮罩状态数组 / Nullable array of texture-mask states
Transforms []KCESPresetTextureTransform `json:"transforms"` // 可空的纹理变换列表,列表项本身不可为 nil / Nullable texture-transform list whose entries are not nullable
InfinityColor *KCESPresetInfinityColorData `json:"infinityColor"` // 可空的无限色纹理参数 / Nullable infinity-color texture parameters
InfinityColorLinkLayer *string `json:"infinityColorLinkLayer"` // 可空的无限色数据链接层名称 / Nullable layer name linked to the infinity-color data
UseAlphaMaskTransform bool `json:"useAlphaMaskTransform"` // 是否使用透明遮罩变换 / Whether alpha-mask transformation is used
}
KCESPresetSavedTextureData 表示 SavedTexData.Serialize 写出的纹理编辑状态 KCESPresetSavedTextureData represents texture-edit state written by SavedTexData.Serialize
type KCESPresetSubProperty ¶
type KCESPresetSubProperty struct {
Number int32 `json:"number"` // 父属性列表中的子属性编号 nNo / Sub-property number nNo within the parent property list
DefaultHokuroTattooSlotID string `json:"defaultHokuroTattooSlotId"` // 痣或纹身的默认放置槽位名称 / Default placement slot name for a mole or tattoo
EditUnitData *KCESPresetEditUnitData `json:"editUnitData"` // EditCustomizeData.UnitData 的 Standard MessagePack 对象 / Standard MessagePack object for EditCustomizeData.UnitData
SavedDefaultHokuroTattooRID uint64 `json:"savedDefaultHokuroTattooRid"` // 保存默认痣或纹身位置时对应的 RID,仅从属性版本 2001 起存在 / RID associated with the saved default mole or tattoo position, present only since property version 2001
Base KCESPresetPropBase `json:"base"` // 随后的 PropBase 继承字段 / Following inherited PropBase fields
}
KCESPresetSubProperty 表示 SubProp.Serialize 写出的专用字段及其后继承的 PropBase 块 KCESPresetSubProperty represents the dedicated fields written by SubProp.Serialize and its following inherited PropBase block
type KCESPresetTextureMask ¶
type KCESPresetTextureMask struct {
Name *string `json:"name"` // 可空的遮罩名称 / Nullable mask name
Mask bool `json:"mask"` // 遮罩启用值 / Mask enable value
}
KCESPresetTextureMask 表示 TexLay.MaskData 的可空名称和遮罩开关 KCESPresetTextureMask represents the nullable name and mask switch of TexLay.MaskData
type KCESPresetTextureTransform ¶
type KCESPresetTextureTransform struct {
AreaUVDefault Vector4 `json:"areaUvDefault"` // 序列化时保存的 TexLay.TransTexData.areaUVDefault 静态值 / Serialized static value of TexLay.TransTexData.areaUVDefault
ScaleDefault Vector2 `json:"scaleDefault"` // 序列化时保存的 TexLay.TransTexData.scaleDefault 静态值 / Serialized static value of TexLay.TransTexData.scaleDefault
Position Vector2 `json:"position"` // 纹理归一化位置 / Normalized texture position
Scale Vector2 `json:"scale"` // 纹理缩放 / Texture scale
Rotation float32 `json:"rotation"` // 纹理旋转角度 / Texture rotation angle
AreaUV Vector4 `json:"areaUv"` // 纹理作用区域的 UV 范围 / UV range of the texture application area
SourcePixels Vector2Int `json:"sourcePixels"` // 源纹理像素尺寸 / Source texture pixel dimensions
Default *KCESPresetTextureTransform `json:"default"` // 重置变换时使用的可空默认变换 / Nullable default transform used when resetting the transformation
}
KCESPresetTextureTransform 表示 TexLay.TransTexData 的递归纹理变换状态 KCESPresetTextureTransform represents recursive texture-transform state from TexLay.TransTexData
type KCESSystemData ¶
type KCESSystemData struct {
Version int32 `json:"version"` // VirtualDirectory 对象版本 / VirtualDirectory object version
ContainerFraming ct.VirtualDirectoryFraming `json:"containerFraming,omitempty"` // VirtualDirectory MessagePack 目录的外层尾部封装 / Outer footer frame around the VirtualDirectory MessagePack directory
Directories map[string]ct.VirtualDirectoryMetadata `json:"directories,omitempty"` // 各虚拟目录的真实版本字段 / Real version fields of each virtual directory
EditData []KCESEditDataFile `json:"editData,omitempty"` // 按虚拟路径识别并解码的 EditData 文件 / EditData files recognized and decoded by virtual path
ExtraFiles map[string][]byte `json:"extraFiles,omitempty"` // 未识别虚拟文件的真实 byte[] 载荷 / Real byte-array payloads of unrecognized virtual files
}
KCESSystemData 是 system.dat 的 VirtualDirectory 语义视图 已知 EditData 载荷公开为强类型,只有不匹配任何已知路径的独立虚拟文件才逐字节保存在 ExtraFiles 中,已知路径解析失败必须返回错误 KCESSystemData is the semantic view of the system.dat VirtualDirectory Known EditData payloads are typed while only independent virtual files matching no known path are retained byte-for-byte in ExtraFiles, and a parse failure at a known path must return an error
func DecodeKCESSystemData ¶
func DecodeKCESSystemData(data []byte) (*KCESSystemData, error)
DecodeKCESSystemData 验证 VirtualDirectory 容器并解码 KCES 与 KCES2 已知的所有强类型载荷 已知路径中的畸形文件会返回错误而不会退回不透明数据,因为游戏也会按该路径选择同一解析器并在加载 system.dat 时失败 DecodeKCESSystemData validates a VirtualDirectory container and decodes every strongly typed payload known to KCES and KCES2 A malformed file at a known path returns an error instead of falling back to opaque data because the game selects the same parser by path and fails while loading system.dat
func NewKCESSystemData ¶
func NewKCESSystemData() *KCESSystemData
NewKCESSystemData 创建显式使用当前 VirtualDirectory 版本 1000 的空系统数据 NewKCESSystemData creates empty system data explicitly using the current VirtualDirectory version 1000
func (*KCESSystemData) UnmarshalJSON ¶
func (value *KCESSystemData) UnmarshalJSON(data []byte) error
UnmarshalJSON 严格解码 system.dat 编辑封套并要求 format 与 version 显式出现 UnmarshalJSON strictly decodes the system.dat editing envelope and requires format and version to be explicitly present
type KCMesh ¶
type KCMesh struct {
Version int32 `json:"version"` // 网格导出版本,当前 FixVersion 为 10001 / Mesh export version whose current FixVersion is 10001
IndexFormat int32 `json:"indexFormat"` // UnityEngine.Rendering.IndexFormat 枚举值 / UnityEngine.Rendering.IndexFormat enum value
VertexBufferCount int32 `json:"vertexBufferCount"` // Unity Mesh 顶点缓冲数量 / Unity Mesh vertex-buffer count
VertexBufferTargetStr *string `json:"vertexBufferTargetStr"` // GraphicsBuffer.Target 顶点缓冲标志字符串 / GraphicsBuffer.Target vertex-buffer flag string
IndexBufferTargetStr *string `json:"indexBufferTargetStr"` // GraphicsBuffer.Target 索引缓冲标志字符串 / GraphicsBuffer.Target index-buffer flag string
BlendShapeCount int32 `json:"blendShapeCount"` // BlendShape 数量 / Blend-shape count
BlendShapeNames []*string `json:"blendShapeNames"` // 可空 BlendShape 名称数组 / Array of nullable blend-shape names
BlendShapeFrameCount []int32 `json:"blendShapeFrameCount"` // 每个 BlendShape 的帧数量 / Frame counts for each blend shape
DeltaVertices [][]Vector3 `json:"deltaVertices"` // 各 BlendShape 帧的顶点位移 / Vertex deltas for each blend-shape frame
DeltaNormals [][]Vector3 `json:"deltaNormals"` // 各 BlendShape 帧的法线位移 / Normal deltas for each blend-shape frame
DeltaTangents [][]Vector3 `json:"deltaTangents"` // 各 BlendShape 帧的切线位移 / Tangent deltas for each blend-shape frame
BlendShapeFrameWeight []float32 `json:"blendShapeFrameWeight"` // 各 BlendShape 帧的权重 / Weights for each blend-shape frame
BindPoses []Matrix4x4 `json:"bindposes"` // 骨骼绑定姿势矩阵 / Bone bind-pose matrices
IsReadable bool `json:"isReadable"` // Unity Mesh 是否可读 / Whether the Unity Mesh is readable
VertexCount int32 `json:"vertexCount"` // 顶点数量 / Vertex count
SubMeshCount int32 `json:"subMeshCount"` // 子网格数量 / Sub-mesh count
Vertices []Vector3 `json:"vertices"` // 顶点位置 / Vertex positions
Normals []Vector3 `json:"normals"` // 顶点法线 / Vertex normals
Tangents []Vector4 `json:"tangents"` // 顶点切线 / Vertex tangents
UV []Vector2 `json:"uv"` // 第一组 UV / First UV set
UV2 []Vector2 `json:"uv2"` // 第二组 UV / Second UV set
UV3 []Vector2 `json:"uv3"` // 第三组 UV / Third UV set
UV4 []Vector2 `json:"uv4"` // 第四组 UV / Fourth UV set
UV5 []Vector2 `json:"uv5"` // 第五组 UV / Fifth UV set
UV6 []Vector2 `json:"uv6"` // 第六组 UV / Sixth UV set
UV7 []Vector2 `json:"uv7"` // 第七组 UV / Seventh UV set
UV8 []Vector2 `json:"uv8"` // 第八组 UV / Eighth UV set
Colors []Color `json:"colors"` // 浮点顶点颜色 / Floating-point vertex colors
Colors32 []Color32 `json:"colors32"` // 八位顶点颜色 / Eight-bit vertex colors
Triangles []int32 `json:"triangles"` // 合并后的三角形索引 / Combined triangle indices
TrianglesInSubmesh [][]int32 `json:"trianglesInSubmesh"` // 按子网格分组的三角形索引 / Triangle indices grouped by sub-mesh
BoneWeightWeight []float32 `json:"boneWeightWeight"` // 展平 BoneWeight1 权重 / Flattened BoneWeight1 weights
BoneWeightIndex []int32 `json:"boneWeightIndex"` // 展平 BoneWeight1 骨骼索引 / Flattened BoneWeight1 bone indices
BonePerVertex []byte `json:"bonePerVertex"` // 每个顶点使用的骨骼权重数量 / Number of bone weights used by each vertex
// contains filtered or unexported fields
}
KCMesh 对应 ExportKCES.KCMesh 的三十四槽未压缩 MessagePack 网格 / KCMesh matches the 34-slot uncompressed MessagePack mesh in ExportKCES.KCMesh
func DecodeKCMesh ¶
DecodeKCMesh 解码未压缩的 .kcmesh MessagePack 数据 DecodeKCMesh decodes uncompressed .kcmesh MessagePack data
func NewKCMesh ¶
func NewKCMesh() *KCMesh
NewKCMesh 创建当前 10001 版本的新 KCMesh NewKCMesh creates a new KCMesh using the current version 10001
func (*KCMesh) CodecDecodeSelf ¶
CodecDecodeSelf 按共享 indexed-object 规则解码 KCMesh CodecDecodeSelf decodes KCMesh using the shared indexed-object rules
func (KCMesh) CodecEncodeSelf ¶
CodecEncodeSelf 按共享 indexed-object 规则编码 KCMesh CodecEncodeSelf encodes KCMesh using the shared indexed-object rules
type KCMetaData ¶
type KCMetaData struct {
Version int32 `json:"version"` // 导出元数据版本,当前 FixVersion 为 10001 / Export metadata version whose current FixVersion is 10001
ModelFileName *string `json:"modelFileName"` // 可空 KCModel 文件名 / Nullable KCModel filename
FormTextureFileName *string `json:"formTextureFileName"` // 可空形态纹理 KCTex 文件名 / Nullable form-texture KCTex filename
MaterialPerOriginalMenuFileName []*string `json:"materialPerOriginalMenuFileName"` // 各材质对应的原始菜单文件名 / Original menu filenames corresponding to each material
BuildVersion int32 `json:"buildVersion"` // 导出时记录的构建版本 / Build version recorded during export
GameVersion int32 `json:"gameVersion"` // 导出时记录的游戏版本 / Game version recorded during export
GUID *string `json:"guid"` // 可空分享模型 GUID / Nullable shared-model GUID
SuspendedSaveFileName *string `json:"suspendedSaveFileName"` // 可空继续编辑 HairMake 存档文件名 / Nullable HairMake save filename used to continue editing
MaterialPerOriginalMenuVersion []int32 `json:"materialPerOriginalMenuVersion"` // 各原始菜单的部件版本 / Parts versions of the original menus
// contains filtered or unexported fields
}
KCMetaData 对应 ExportKCES.KCMetaData 的九槽未压缩 MessagePack 元数据 / KCMetaData matches the nine-slot uncompressed MessagePack metadata in ExportKCES.KCMetaData
func DecodeKCMetaData ¶
func DecodeKCMetaData(data []byte) (*KCMetaData, error)
DecodeKCMetaData 解码未压缩的 .kcmmeta MessagePack 数据 DecodeKCMetaData decodes uncompressed .kcmmeta MessagePack data
func NewKCMetaData ¶
func NewKCMetaData() *KCMetaData
NewKCMetaData 创建当前 10001 版本的新 KCMetaData NewKCMetaData creates new KCMetaData using the current version 10001
func (*KCMetaData) CodecDecodeSelf ¶
func (v *KCMetaData) CodecDecodeSelf(d *codec.Decoder)
CodecDecodeSelf 按共享 indexed-object 规则解码 KCMetaData CodecDecodeSelf decodes KCMetaData using the shared indexed-object rules
func (KCMetaData) CodecEncodeSelf ¶
func (v KCMetaData) CodecEncodeSelf(e *codec.Encoder)
CodecEncodeSelf 按共享 indexed-object 规则编码 KCMetaData CodecEncodeSelf encodes KCMetaData using the shared indexed-object rules
type KCTexture ¶
type KCTexture struct {
Signature string `json:"signature"` // 文件签名,KCES2 写入 CM3D2_TEX / File signature written as CM3D2_TEX by KCES2
Version int32 `json:"version"` // 纹理线格式版本,KCES2 写入 1000 / Texture wire version written as 1000 by KCES2
TextureName string `json:"textureName"` // 原始 Unity 纹理名称 / Original Unity texture name
Data []byte `json:"data"` // PNG 图像载荷 / PNG image payload
}
KCTexture 对应 ExportKCES.ExportTexture 写出的 CM3D2_TEX 1000 载荷 / KCTexture matches the CM3D2_TEX version-1000 payload written by ExportKCES.ExportTexture
func DecodeKCTex ¶
DecodeKCTex 解码 ExportKCES 写出的 CM3D2_TEX 1000 .kctex 数据并拒绝尾部字节 DecodeKCTex decodes CM3D2_TEX version-1000 .kctex data written by ExportKCES and rejects trailing bytes
type KeywordProp ¶
type KeywordProp struct {
Type int32 `json:"type"` // 属性类型枚举值 / Property type enum value
Value bool `json:"value"` // 是否启用 / Whether the keyword is enabled
// contains filtered or unexported fields
}
KeywordProp 表示材质的 Shader keyword 开关 / KeywordProp represents a material Shader keyword switch
func (*KeywordProp) CodecDecodeSelf ¶
func (v *KeywordProp) CodecDecodeSelf(d *codec.Decoder)
CodecDecodeSelf 按共享 indexed-object 规则解码 KeywordProp CodecDecodeSelf decodes KeywordProp using the shared indexed-object rules
func (KeywordProp) CodecEncodeSelf ¶
func (v KeywordProp) CodecEncodeSelf(e *codec.Encoder)
CodecEncodeSelf 按共享 indexed-object 规则编码 KeywordProp CodecEncodeSelf encodes KeywordProp using the shared indexed-object rules
type LimbColliderItem ¶
type LimbColliderItem struct {
Version int32 `json:"version"` // 版本号 / Version value
Target int32 `json:"target"` // limbType 枚举值 / LimbType enum value
Collider *ColliderMaidProp `json:"collider"` // 游戏声明的 NativeMaidPropColliderStatus / NativeMaidPropColliderStatus declared by the game
}
LimbColliderItem 表示一个 limb 类型和 NativeMaidPropColliderStatus LimbColliderItem represents one limb type and NativeMaidPropColliderStatus
func (*LimbColliderItem) CodecDecodeSelf ¶
func (item *LimbColliderItem) CodecDecodeSelf(d *codec.Decoder)
CodecDecodeSelf 将三槽 LimbColliderData 解码为固定 NativeMaidPropColliderStatus CodecDecodeSelf decodes the three-slot LimbColliderData as its fixed NativeMaidPropColliderStatus
func (LimbColliderItem) CodecEncodeSelf ¶
func (item LimbColliderItem) CodecEncodeSelf(e *codec.Encoder)
CodecEncodeSelf 将 LimbColliderItem 的固定 MaidProp 碰撞体编码为三槽布局 CodecEncodeSelf encodes the fixed MaidProp collider of LimbColliderItem in its three-slot layout
type LimbColliderPackage ¶
type LimbColliderPackage struct {
Version int32 `json:"version"` // 版本号 / Version value
Items []*LimbColliderItem `json:"items"` // 可空 limb 碰撞体条目列表 / List of nullable limb collider items
// contains filtered or unexported fields
}
LimbColliderPackage 对应 LimbColliderMgr 保存的 limb collider 包 LimbColliderPackage maps the limb-collider package saved by LimbColliderMgr
func DecodeLimbCol ¶
func DecodeLimbCol(data []byte) (*LimbColliderPackage, error)
DecodeLimbCol 解码 .limbcol 的长度前缀 LZ4 MessagePack LimbColliderPackage 载荷 DecodeLimbCol decodes the length-prefixed LZ4 MessagePack LimbColliderPackage payload of a .limbcol file
func (*LimbColliderPackage) CodecDecodeSelf ¶
func (v *LimbColliderPackage) CodecDecodeSelf(d *codec.Decoder)
CodecDecodeSelf 按共享 indexed-object 规则解码 LimbColliderPackage CodecDecodeSelf decodes LimbColliderPackage using the shared indexed-object rules
func (LimbColliderPackage) CodecEncodeSelf ¶
func (v LimbColliderPackage) CodecEncodeSelf(e *codec.Encoder)
CodecEncodeSelf 按共享 indexed-object 规则编码 LimbColliderPackage CodecEncodeSelf encodes LimbColliderPackage using the shared indexed-object rules
type LookupHashOptions ¶
type LookupHashOptions struct {
RecalculateHash bool `json:"-"` // 是否在写出时重算 ID 与 GUID,显式提供 false 可保留原值;Menu.GUID 缺少 HairMake.ExportedGUID 来源时按新 UUID v4 重算,因此写出结果不可复现 / Whether to recalculate IDs and GUIDs during encoding, with an explicitly supplied false preserving stored values; Menu.GUID is recalculated from a fresh UUID v4 when the HairMake.ExportedGUID source is absent, so those writes are not reproducible
FileName string `json:"-"` // 单对象重算时写入副本的规范 wire 文件名,服务层应由目标路径推导,空值表示使用结构中的 FileName / Canonical wire filename written into the output copy during single-object recalculation, derived by the service from the destination path, with an empty value using the structure's FileName
}
LookupHashOptions 控制 KCES 部件写出时是否重算由名称派生的哈希字段,未提供选项时默认重算 / LookupHashOptions controls whether KCES part writers recalculate hash fields derived from names, with recalculation enabled by default when options are omitted
type MagicaAngleLimitConstraint ¶
type MagicaAngleLimitConstraint struct {
UseAngleLimit *bool `json:"useAngleLimit,omitempty"` // 是否启用角度限制 / Whether the angle limit is enabled
LimitAngle *MagicaCurveSerializeData `json:"limitAngle,omitempty"` // 限制角度值或角度曲线 / Limit angle value or angle curve
Stiffness *float32 `json:"stiffness,omitempty"` // 刚性值 / Stiffness value
}
MagicaAngleLimitConstraint 表示 ClothSerializeData 的 angleLimitConstraint 成员 / MagicaAngleLimitConstraint represents the angleLimitConstraint member of ClothSerializeData
type MagicaAngleRestorationConstraint ¶
type MagicaAngleRestorationConstraint struct {
UseAngleRestoration *bool `json:"useAngleRestoration,omitempty"` // 是否启用角度复原 / Whether angle restoration is enabled
Stiffness *MagicaCurveSerializeData `json:"stiffness,omitempty"` // 刚性值或刚性曲线 / Stiffness value or stiffness curve
VelocityAttenuation *float32 `json:"velocityAttenuation,omitempty"` // 速度衰减系数 / Velocity attenuation factor
GravityFalloff *float32 `json:"gravityFalloff,omitempty"` // 重力衰减系数 / Gravity falloff factor
}
MagicaAngleRestorationConstraint 表示 ClothSerializeData 的 angleRestorationConstraint 成员 / MagicaAngleRestorationConstraint represents the angleRestorationConstraint member of ClothSerializeData
type MagicaClothSerializeData ¶
type MagicaClothSerializeData struct {
ClothType *int32 `json:"clothType,omitempty"` // 布料类型枚举,允许值未核实 / Cloth-type enum with unverified allowed values
SourceRenderers *[]UnityInstanceReference `json:"sourceRenderers,omitempty"` // 源 Renderer 引用数组 / Array of source Renderer references
MeshWriteMode *int32 `json:"meshWriteMode,omitempty"` // 网格写回模式枚举,较早写出的文件没有这个成员 / Mesh write-back mode enum, absent from files written by earlier versions
PaintMode *int32 `json:"paintMode,omitempty"` // 绘制模式枚举,允许值未核实 / Paint-mode enum with unverified allowed values
PaintMaps *[]UnityInstanceReference `json:"paintMaps,omitempty"` // 绘制贴图引用数组 / Array of paint-map references
PaintMapUvChannel *int32 `json:"paintMapUvChannel,omitempty"` // 绘制贴图使用的 UV 通道,较早写出的文件没有这个成员 / UV channel used by the paint maps, absent from files written by earlier versions
RootBones *[]UnityInstanceReference `json:"rootBones,omitempty"` // 根骨骼 Transform 引用数组 / Array of root-bone Transform references
ConnectionMode *int32 `json:"connectionMode,omitempty"` // 连接模式枚举,允许值未核实 / Connection-mode enum with unverified allowed values
RotationalInterpolation *float32 `json:"rotationalInterpolation,omitempty"` // 旋转插值系数 / Rotational interpolation factor
RootRotation *float32 `json:"rootRotation,omitempty"` // 根旋转系数 / Root rotation factor
UpdateMode *int32 `json:"updateMode,omitempty"` // 更新模式枚举,允许值未核实 / Update-mode enum with unverified allowed values
AnimationPoseRatio *float32 `json:"animationPoseRatio,omitempty"` // 动画姿态混合比例 / Animation pose blend ratio
ReductionSetting *MagicaReductionSettings `json:"reductionSetting,omitempty"` // 顶点缩减设置 / Vertex reduction settings
CustomSkinningSetting *MagicaCustomSkinningSettings `json:"customSkinningSetting,omitempty"` // 自定义蒙皮设置 / Custom skinning settings
NormalAlignmentSetting *MagicaNormalAlignmentSettings `json:"normalAlignmentSetting,omitempty"` // 法线对齐设置 / Normal alignment settings
CullingSettings *MagicaCullingSettings `json:"cullingSettings,omitempty"` // 剔除设置,较早写出的文件没有这个成员 / Culling settings, absent from files written by earlier versions
NormalAxis *int32 `json:"normalAxis,omitempty"` // 法线轴枚举,允许值未核实 / Normal-axis enum with unverified allowed values
Gravity *float32 `json:"gravity,omitempty"` // 重力强度 / Gravity magnitude
GravityDirection *Vector3 `json:"gravityDirection,omitempty"` // 重力方向向量 / Gravity direction vector
GravityFalloff *float32 `json:"gravityFalloff,omitempty"` // 重力衰减系数 / Gravity falloff factor
StablizationTimeAfterReset *float32 `json:"stablizationTimeAfterReset,omitempty"` // 重置后的稳定时间,键名的拼写沿用线格式 / Stabilization time after a reset, with the key spelled as stored
BlendWeight *float32 `json:"blendWeight,omitempty"` // 混合权重,较早写出的文件没有这个成员 / Blend weight, absent from files written by earlier versions
Damping *MagicaCurveSerializeData `json:"damping,omitempty"` // 阻尼值或阻尼曲线 / Damping value or damping curve
Radius *MagicaCurveSerializeData `json:"radius,omitempty"` // 粒子半径值或半径曲线 / Particle radius value or radius curve
InertiaConstraint *MagicaInertiaConstraint `json:"inertiaConstraint,omitempty"` // 惯性约束 / Inertia constraint
TetherConstraint *MagicaTetherConstraint `json:"tetherConstraint,omitempty"` // 系绳约束 / Tether constraint
DistanceConstraint *MagicaDistanceConstraint `json:"distanceConstraint,omitempty"` // 距离约束 / Distance constraint
TriangleBendingConstraint *MagicaTriangleBendingConstraint `json:"triangleBendingConstraint,omitempty"` // 三角面弯曲约束 / Triangle bending constraint
AngleRestorationConstraint *MagicaAngleRestorationConstraint `json:"angleRestorationConstraint,omitempty"` // 角度复原约束 / Angle restoration constraint
AngleLimitConstraint *MagicaAngleLimitConstraint `json:"angleLimitConstraint,omitempty"` // 角度限制约束 / Angle limit constraint
MotionConstraint *MagicaMotionConstraint `json:"motionConstraint,omitempty"` // 运动范围约束 / Motion range constraint
ColliderCollisionConstraint *MagicaColliderCollisionConstraint `json:"colliderCollisionConstraint,omitempty"` // 碰撞体碰撞约束 / Collider collision constraint
SelfCollisionConstraint *MagicaSelfCollisionConstraint `json:"selfCollisionConstraint,omitempty"` // 自碰撞约束 / Self collision constraint
Wind *MagicaWindSettings `json:"wind,omitempty"` // 风力设置 / Wind settings
SpringConstraint *MagicaSpringConstraint `json:"springConstraint,omitempty"` // 弹簧约束,较早写出的文件没有这个成员 / Spring constraint, absent from files written by earlier versions
}
MagicaClothSerializeData 表示 MagicaCloth2 ClothSerializeData 的 Unity JSON 表示,成员顺序与 Unity JsonUtility 的写出顺序一致 / MagicaClothSerializeData represents the Unity JSON form of MagicaCloth2 ClothSerializeData with members ordered as Unity JsonUtility writes them
func DecodeDB2Conf ¶
func DecodeDB2Conf(data []byte) (*MagicaClothSerializeData, error)
DecodeDB2Conf 解码 .db2conf 的长度前缀 LZ4 MessagePack MagicaCloth ClothSerializeData 载荷 DecodeDB2Conf decodes the length-prefixed LZ4 MessagePack MagicaCloth ClothSerializeData payload of a .db2conf file
func DecodeDSB2Conf ¶
func DecodeDSB2Conf(data []byte) (*MagicaClothSerializeData, error)
DecodeDSB2Conf 解码 .dsb2conf 的长度前缀 LZ4 MessagePack MagicaCloth ClothSerializeData 载荷 DecodeDSB2Conf decodes the length-prefixed LZ4 MessagePack MagicaCloth ClothSerializeData payload of a .dsb2conf file
func DecodeDSL2Conf ¶
func DecodeDSL2Conf(data []byte) (*MagicaClothSerializeData, error)
DecodeDSL2Conf 解码 .dsl2conf 的长度前缀 LZ4 MessagePack MagicaCloth ClothSerializeData 载荷 DecodeDSL2Conf decodes the length-prefixed LZ4 MessagePack MagicaCloth ClothSerializeData payload of a .dsl2conf file
type MagicaColliderCollisionConstraint ¶
type MagicaColliderCollisionConstraint struct {
Mode *int32 `json:"mode,omitempty"` // 碰撞模式枚举,允许值未核实 / Collision mode enum with unverified allowed values
Friction *float32 `json:"friction,omitempty"` // 摩擦系数 / Friction factor
ColliderList *[]UnityInstanceReference `json:"colliderList,omitempty"` // 参与碰撞的碰撞体组件引用数组 / Array of collider component references used for collision
CollisionBones *[]UnityInstanceReference `json:"collisionBones,omitempty"` // 参与碰撞的骨骼引用数组,较早写出的文件没有这个成员 / Array of collision bone references, absent from files written by earlier versions
LimitDistance *MagicaCurveSerializeData `json:"limitDistance,omitempty"` // 限制距离值或距离曲线,较早写出的文件没有这个成员 / Limit distance value or distance curve, absent from files written by earlier versions
}
MagicaColliderCollisionConstraint 表示 ClothSerializeData 的 colliderCollisionConstraint 成员 / MagicaColliderCollisionConstraint represents the colliderCollisionConstraint member of ClothSerializeData
type MagicaCullingSettings ¶
type MagicaCullingSettings struct {
CameraCullingMode *int32 `json:"cameraCullingMode,omitempty"` // 摄像机剔除模式枚举,允许值未核实 / Camera culling mode enum with unverified allowed values
CameraCullingMethod *int32 `json:"cameraCullingMethod,omitempty"` // 摄像机剔除方式枚举,允许值未核实 / Camera culling method enum with unverified allowed values
CameraCullingRenderers *[]UnityInstanceReference `json:"cameraCullingRenderers,omitempty"` // 参与摄像机剔除判定的 Renderer 引用数组 / Array of Renderer references used for camera culling
DistanceCullingLength *MagicaToggleValue `json:"distanceCullingLength,omitempty"` // 距离剔除长度开关值,较早写出的文件没有这个成员 / Toggled distance-culling length, absent from files written by earlier versions
DistanceCullingFadeRatio *float32 `json:"distanceCullingFadeRatio,omitempty"` // 距离剔除淡出比例,较早写出的文件没有这个成员 / Distance-culling fade ratio, absent from files written by earlier versions
DistanceCullingReferenceObject *UnityInstanceReference `json:"distanceCullingReferenceObject,omitempty"` // 距离剔除参考对象引用,较早写出的文件没有这个成员 / Reference object for distance culling, absent from files written by earlier versions
}
MagicaCullingSettings 表示 ClothSerializeData 的 cullingSettings 成员 / MagicaCullingSettings represents the cullingSettings member of ClothSerializeData
type MagicaCurveSerializeData ¶
type MagicaCurveSerializeData struct {
Value *float32 `json:"value,omitempty"` // 常量取值 / Constant value
UseCurve *bool `json:"useCurve,omitempty"` // 是否改用曲线取值 / Whether the curve is used instead
Curve *UnityAnimationCurve `json:"curve,omitempty"` // 曲线 / The curve
}
MagicaCurveSerializeData 表示可以退化为常量的曲线参数,useCurve 为 false 时游戏取 value / MagicaCurveSerializeData represents a curve parameter that can degrade to a constant, with the game taking value when useCurve is false
type MagicaCustomSkinningSettings ¶
type MagicaCustomSkinningSettings struct {
Enable *bool `json:"enable,omitempty"` // 是否启用自定义蒙皮 / Whether custom skinning is enabled
SkinningBones *[]UnityInstanceReference `json:"skinningBones,omitempty"` // 参与蒙皮的骨骼引用数组 / Array of skinning bone references
}
MagicaCustomSkinningSettings 表示 ClothSerializeData 的 customSkinningSetting 成员 / MagicaCustomSkinningSettings represents the customSkinningSetting member of ClothSerializeData
type MagicaDistanceConstraint ¶
type MagicaDistanceConstraint struct {
Stiffness *MagicaCurveSerializeData `json:"stiffness,omitempty"` // 刚性值或刚性曲线 / Stiffness value or stiffness curve
}
MagicaDistanceConstraint 表示 ClothSerializeData 的 distanceConstraint 成员 / MagicaDistanceConstraint represents the distanceConstraint member of ClothSerializeData
type MagicaInertiaConstraint ¶
type MagicaInertiaConstraint struct {
Anchor *UnityInstanceReference `json:"anchor,omitempty"` // 惯性锚点 Transform 引用 / Reference to the inertia anchor Transform
AnchorInertia *float32 `json:"anchorInertia,omitempty"` // 锚点惯性系数 / Anchor inertia factor
MovementInertia *float32 `json:"movementInertia,omitempty"` // 早期布局的移动惯性系数,当前布局改用 worldInertia 与 localInertia / Movement inertia factor in the earlier layout, replaced by worldInertia and localInertia in the current layout
RotationInertia *float32 `json:"rotationInertia,omitempty"` // 早期布局的旋转惯性系数,当前布局改用 worldInertia 与 localInertia / Rotation inertia factor in the earlier layout, replaced by worldInertia and localInertia in the current layout
WorldInertia *float32 `json:"worldInertia,omitempty"` // 世界空间惯性系数 / World-space inertia factor
MovementInertiaSmoothing *float32 `json:"movementInertiaSmoothing,omitempty"` // 移动惯性平滑系数 / Movement inertia smoothing factor
MovementSpeedLimit *MagicaToggleValue `json:"movementSpeedLimit,omitempty"` // 移动速度上限开关值 / Toggled movement speed limit
RotationSpeedLimit *MagicaToggleValue `json:"rotationSpeedLimit,omitempty"` // 旋转速度上限开关值 / Toggled rotation speed limit
LocalInertia *float32 `json:"localInertia,omitempty"` // 局部空间惯性系数 / Local-space inertia factor
LocalMovementSpeedLimit *MagicaToggleValue `json:"localMovementSpeedLimit,omitempty"` // 局部移动速度上限开关值 / Toggled local movement speed limit
LocalRotationSpeedLimit *MagicaToggleValue `json:"localRotationSpeedLimit,omitempty"` // 局部旋转速度上限开关值 / Toggled local rotation speed limit
DepthInertia *float32 `json:"depthInertia,omitempty"` // 按深度衰减的惯性系数 / Depth-scaled inertia factor
CentrifualAcceleration *float32 `json:"centrifualAcceleration,omitempty"` // 离心加速度系数,键名的拼写沿用线格式 / Centrifugal acceleration factor, with the key spelled as stored
ParticleSpeedLimit *MagicaToggleValue `json:"particleSpeedLimit,omitempty"` // 粒子速度上限开关值 / Toggled particle speed limit
TeleportMode *int32 `json:"teleportMode,omitempty"` // 传送处理模式枚举,允许值未核实 / Teleport handling mode enum with unverified allowed values
TeleportDistance *float32 `json:"teleportDistance,omitempty"` // 判定为传送的位移阈值 / Displacement threshold treated as a teleport
TeleportRotation *float32 `json:"teleportRotation,omitempty"` // 判定为传送的旋转阈值 / Rotation threshold treated as a teleport
}
MagicaInertiaConstraint 表示 ClothSerializeData 的 inertiaConstraint 成员,成员顺序按当前 KCES 写出的布局,早期布局的成员顺序不同但集合是它的子集加上 movementInertia 与 rotationInertia / MagicaInertiaConstraint represents the inertiaConstraint member of ClothSerializeData, ordered as the current KCES layout writes it, while the earlier layout orders its members differently and is otherwise a subset plus movementInertia and rotationInertia
type MagicaMotionConstraint ¶
type MagicaMotionConstraint struct {
UseMaxDistance *bool `json:"useMaxDistance,omitempty"` // 是否启用最大距离限制 / Whether the maximum distance limit is enabled
MaxDistance *MagicaCurveSerializeData `json:"maxDistance,omitempty"` // 最大距离值或距离曲线 / Maximum distance value or distance curve
UseBackstop *bool `json:"useBackstop,omitempty"` // 是否启用背面阻挡 / Whether the backstop is enabled
BackstopRadius *float32 `json:"backstopRadius,omitempty"` // 背面阻挡半径 / Backstop radius
BackstopDistance *MagicaCurveSerializeData `json:"backstopDistance,omitempty"` // 背面阻挡距离值或距离曲线 / Backstop distance value or distance curve
Stiffness *float32 `json:"stiffness,omitempty"` // 刚性值 / Stiffness value
}
MagicaMotionConstraint 表示 ClothSerializeData 的 motionConstraint 成员 / MagicaMotionConstraint represents the motionConstraint member of ClothSerializeData
type MagicaNormalAlignmentSettings ¶
type MagicaNormalAlignmentSettings struct {
AlignmentMode *int32 `json:"alignmentMode,omitempty"` // 法线对齐模式枚举,允许值未核实 / Normal alignment mode enum with unverified allowed values
AdjustmentTransform *UnityInstanceReference `json:"adjustmentTransform,omitempty"` // 调整基准 Transform 引用 / Reference to the adjustment Transform
}
MagicaNormalAlignmentSettings 表示 ClothSerializeData 的 normalAlignmentSetting 成员 / MagicaNormalAlignmentSettings represents the normalAlignmentSetting member of ClothSerializeData
type MagicaReductionSettings ¶
type MagicaReductionSettings struct {
SimpleDistance *float32 `json:"simpleDistance,omitempty"` // 简单合并距离 / Simple merge distance
ShapeDistance *float32 `json:"shapeDistance,omitempty"` // 形状合并距离 / Shape merge distance
}
MagicaReductionSettings 表示 ClothSerializeData 的 reductionSetting 成员 / MagicaReductionSettings represents the reductionSetting member of ClothSerializeData
type MagicaSelfCollisionConstraint ¶
type MagicaSelfCollisionConstraint struct {
SelfMode *int32 `json:"selfMode,omitempty"` // 自碰撞模式枚举,允许值未核实 / Self collision mode enum with unverified allowed values
SurfaceThickness *MagicaCurveSerializeData `json:"surfaceThickness,omitempty"` // 表面厚度值或厚度曲线 / Surface thickness value or thickness curve
SyncMode *int32 `json:"syncMode,omitempty"` // 同步模式枚举,允许值未核实 / Sync mode enum with unverified allowed values
SyncPartner *UnityInstanceReference `json:"syncPartner,omitempty"` // 同步对象引用 / Reference to the sync partner
ClothMass *float32 `json:"clothMass,omitempty"` // 布料质量 / Cloth mass
}
MagicaSelfCollisionConstraint 表示 ClothSerializeData 的 selfCollisionConstraint 成员 / MagicaSelfCollisionConstraint represents the selfCollisionConstraint member of ClothSerializeData
type MagicaSpringConstraint ¶
type MagicaSpringConstraint struct {
UseSpring *bool `json:"useSpring,omitempty"` // 是否启用弹簧约束 / Whether the spring constraint is enabled
SpringPower *float32 `json:"springPower,omitempty"` // 弹簧强度 / Spring power
LimitDistance *float32 `json:"limitDistance,omitempty"` // 限制距离 / Limit distance
NormalLimitRatio *float32 `json:"normalLimitRatio,omitempty"` // 法线方向限制比例 / Normal-direction limit ratio
SpringNoise *float32 `json:"springNoise,omitempty"` // 弹簧噪声强度 / Spring noise magnitude
}
MagicaSpringConstraint 表示 ClothSerializeData 的 springConstraint 成员 / MagicaSpringConstraint represents the springConstraint member of ClothSerializeData
type MagicaTetherConstraint ¶
type MagicaTetherConstraint struct {
DistanceCompression *float32 `json:"distanceCompression,omitempty"` // 距离压缩系数 / Distance compression factor
}
MagicaTetherConstraint 表示 ClothSerializeData 的 tetherConstraint 成员 / MagicaTetherConstraint represents the tetherConstraint member of ClothSerializeData
type MagicaToggleValue ¶
type MagicaToggleValue struct {
Value *float32 `json:"value,omitempty"` // 数值 / Numeric value
Use *bool `json:"use,omitempty"` // 是否启用该数值 / Whether the value is in use
}
MagicaToggleValue 表示由一个数值和一个启用标志组成的开关值对 / MagicaToggleValue is the pair of one numeric value and one enable flag
type MagicaTriangleBendingConstraint ¶
type MagicaTriangleBendingConstraint struct {
Stiffness *float32 `json:"stiffness,omitempty"` // 刚性值 / Stiffness value
}
MagicaTriangleBendingConstraint 表示 ClothSerializeData 的 triangleBendingConstraint 成员 / MagicaTriangleBendingConstraint represents the triangleBendingConstraint member of ClothSerializeData
type MagicaWindSettings ¶
type MagicaWindSettings struct {
Influence *float32 `json:"influence,omitempty"` // 风力影响强度 / Wind influence magnitude
Frequency *float32 `json:"frequency,omitempty"` // 风力频率 / Wind frequency
Turbulence *float32 `json:"turbulence,omitempty"` // 风力扰动强度 / Wind turbulence magnitude
Blend *float32 `json:"blend,omitempty"` // 风力混合系数 / Wind blend factor
Synchronization *float32 `json:"synchronization,omitempty"` // 风力同步系数 / Wind synchronization factor
DepthWeight *float32 `json:"depthWeight,omitempty"` // 按深度加权的系数 / Depth-based weighting factor
MovingWind *float32 `json:"movingWind,omitempty"` // 移动风力系数 / Moving wind factor
}
MagicaWindSettings 表示 ClothSerializeData 的 wind 成员 / MagicaWindSettings represents the wind member of ClothSerializeData
type MaidCapsuleCollider ¶
type MaidCapsuleCollider struct {
BonePath string `json:"bonePath"` // 相对于角色根节点的骨骼路径 / Bone path relative to the character root
Center Vector3 `json:"center"` // 胶囊碰撞体局部中心 / Local center of the capsule collider
Direction int32 `json:"direction"` // Unity CapsuleCollider.direction 主轴枚举 / Unity CapsuleCollider.direction primary-axis enum
Height float32 `json:"height"` // 胶囊高度 / Capsule height
Radius float32 `json:"radius"` // 胶囊半径 / Capsule radius
}
MaidCapsuleCollider 表示一个绑定到骨骼路径的 Unity 胶囊碰撞体 MaidCapsuleCollider represents one Unity capsule collider bound to a bone path
type MaidColliderFile ¶
type MaidColliderFile struct {
Colliders []MaidCapsuleCollider `json:"colliders"` // 胶囊碰撞体列表 / Capsule-collider list
}
MaidColliderFile 表示 MaidColliderCollect 读取的自定义 BinaryReader 载荷 在 System AssetBundle 中,这些 TextAsset 名为 maid_collider 和 maid_collider_touch,源资源名另带 .bytes MaidColliderFile represents the custom BinaryReader payload consumed by MaidColliderCollect In the System AssetBundle these TextAssets are named maid_collider and maid_collider_touch, while source resource names additionally use .bytes
func DecodeMaidCollider ¶
func DecodeMaidCollider(data []byte) (*MaidColliderFile, error)
DecodeMaidCollider 解码一个完整的无签名女仆胶囊碰撞体列表并拒绝尾部字节 DecodeMaidCollider decodes one complete signatureless maid capsule-collider list and rejects trailing bytes
type MaskData ¶
type MaskData struct {
Name *string `json:"name"` // 可空蒙版名称 / Nullable mask name
Mask bool `json:"mask"` // 是否启用该蒙版 / Whether this mask is enabled
// contains filtered or unexported fields
}
MaskData 对应 TexLay.MaskData,记录单个蒙版开关 MaskData maps TexLay.MaskData and stores one mask toggle
func (*MaskData) CodecDecodeSelf ¶
CodecDecodeSelf 按共享 indexed-object 规则解码 MaskData CodecDecodeSelf decodes MaskData using the shared indexed-object rules
func (MaskData) CodecEncodeSelf ¶
CodecEncodeSelf 按共享 indexed-object 规则编码 MaskData CodecEncodeSelf encodes MaskData using the shared indexed-object rules
type MaskParam ¶
type MaskParam struct {
MaskData []*MaskData `json:"maskData"` // 可空蒙版对象列表 / List of nullable mask objects
MaskTexName *string `json:"maskTexName"` // 可空蒙版贴图文件名 / Nullable mask texture file name
MaskRanges []Vector4 `json:"maskRanges"` // 蒙版 UV/范围数组 / Mask UV/range array
LinkMaskName *string `json:"linkMaskName"` // 可空关联蒙版名称 / Nullable linked mask name
LinkMaskNo int32 `json:"linkMaskNo"` // 关联蒙版编号 / Linked mask index
// contains filtered or unexported fields
}
MaskParam 对应 TexLay.MaskParam,描述蒙版贴图和区域 MaskParam maps TexLay.MaskParam and describes mask texture and ranges
func (*MaskParam) CodecDecodeSelf ¶
CodecDecodeSelf 按共享 indexed-object 规则解码 MaskParam CodecDecodeSelf decodes MaskParam using the shared indexed-object rules
func (MaskParam) CodecEncodeSelf ¶
CodecEncodeSelf 按共享 indexed-object 规则编码 MaskParam CodecEncodeSelf encodes MaskParam using the shared indexed-object rules
type Material ¶
type Material struct {
Version int32 `json:"version"` // 存储的版本;当前游戏 FixVersion 为 1000 / Stored version; current-game FixVersion is 1000
ID uint64 `json:"id"` // 材质文件名的 FNV-1a 64 位哈希,写入默认按当前大小写重算且可显式保留 / FNV-1a 64-bit hash of the material filename, recalculated with its current casing by default during encoding and explicitly preservable
FileName *string `json:"fileName"` // 可空材质文件名,如 "xxx.mate" / Nullable material file name, for example "xxx.mate"
ShaderName *string `json:"shaderName"` // 可空 Unity shader 名称 / Nullable Unity shader name
TextureProps []*TextureProp `json:"textureProps"` // 可空纹理属性对象数组 / Array of nullable texture-property objects
ColorProps []*ColorProp `json:"colorProps"` // 可空颜色属性对象数组 / Array of nullable color-property objects
VectorProps []*VectorProp `json:"vectorProps"` // 可空向量属性对象数组 / Array of nullable vector-property objects
FloatProps []*FloatProp `json:"floatProps"` // 可空浮点属性对象数组 / Array of nullable float-property objects
KeywordProps []*KeywordProp `json:"keywordProps"` // 可空着色器关键字属性对象数组 / Array of nullable shader-keyword property objects
RenderQueue int32 `json:"renderQueue"` // Unity 渲染队列 / Unity render queue
IndexedArrayWidth int32 `codec:"-" json:"indexedArrayWidth,omitempty"` // 解码时记录的线格式数组宽度,并非游戏成员 / Wire array width recorded during decoding, not a game member
// contains filtered or unexported fields
}
Material 表示 KCES 材质数据 对应 C# Parts.Material,继承自 AMessagePackSerializationVersionControlIntKey MessagePack indexed array 在 KCES 中保存版本、ID、文件名、着色器名和四类属性数组,KCES2 追加 keyword 与渲染队列
Material represents KCES material data It matches C# Parts.Material derived from AMessagePackSerializationVersionControlIntKey Its MessagePack indexed array stores the version, ID, filename, shader name, and four property arrays in KCES, then appends keywords and the render queue in KCES2
func DecodeKCMat ¶
DecodeKCMat 解码单个 Parts.Material 的 LZ4 MessagePack .kcmat 数据 DecodeKCMat decodes LZ4 MessagePack .kcmat data containing one Parts.Material
func NewKCES2Material ¶
func NewKCES2Material() *Material
NewKCES2Material 创建使用 KCES2 10 槽布局的新材质 NewKCES2Material creates a new material using the 10-slot KCES2 layout
func NewMaterial ¶
func NewMaterial() *Material
NewMaterial 创建使用当前固定版本的新材质 NewMaterial creates a new material with the current fixed version
func (*Material) CodecDecodeSelf ¶
CodecDecodeSelf 按共享 indexed-object 规则解码 Material CodecDecodeSelf decodes Material using the shared indexed-object rules
func (Material) CodecEncodeSelf ¶
CodecEncodeSelf 按共享 indexed-object 规则编码 Material CodecEncodeSelf encodes Material using the shared indexed-object rules
func (*Material) MessagePackIndexedObjectWidth ¶
MessagePackIndexedObjectWidth 返回 Material 应写出的 indexed-array 宽度 MessagePackIndexedObjectWidth returns the indexed-array width that Material should emit
func (*Material) SetMessagePackIndexedObjectWidth ¶
SetMessagePackIndexedObjectWidth 设置 Material 应写出的 indexed-array 宽度 SetMessagePackIndexedObjectWidth sets the indexed-array width that Material should emit
type MaterialAssets ¶
type MaterialAssets struct {
FileName *string `json:"fileName"` // 可空容器文件名,如 "xxx.materialassets" / Nullable container file name, for example "xxx.materialassets"
Assets []*Material `json:"assetArray"` // 可空材质对象数组,对应 C# assetArray / Array of nullable material objects matching C# assetArray
// contains filtered or unexported fields
}
MaterialAssets 表示材质资源容器 对应 C# Parts.MaterialAssets,继承自 SerializPartsAssets<Material> MessagePack indexed array 依次保存容器文件名和材质数组 MaterialAssets represents a material asset container It matches C# Parts.MaterialAssets derived from SerializPartsAssets<Material> Its MessagePack indexed array stores the container filename followed by the material array
func DecodeMaterialAssets ¶
func DecodeMaterialAssets(data []byte) (*MaterialAssets, error)
DecodeMaterialAssets 从 Lz4BlockArray 压缩的 MessagePack 数据解码 MaterialAssets DecodeMaterialAssets decodes MaterialAssets from Lz4BlockArray-compressed MessagePack data
func (*MaterialAssets) CodecDecodeSelf ¶
func (v *MaterialAssets) CodecDecodeSelf(d *codec.Decoder)
CodecDecodeSelf 按共享 indexed-object 规则解码 MaterialAssets CodecDecodeSelf decodes MaterialAssets using the shared indexed-object rules
func (MaterialAssets) CodecEncodeSelf ¶
func (v MaterialAssets) CodecEncodeSelf(e *codec.Encoder)
CodecEncodeSelf 按共享 indexed-object 规则编码 MaterialAssets CodecEncodeSelf encodes MaterialAssets using the shared indexed-object rules
type Matrix4x4 ¶
type Matrix4x4 struct {
M00 float32 `json:"m00"` // 第零列第零行 / Column zero row zero
M10 float32 `json:"m10"` // 第零列第一行 / Column zero row one
M20 float32 `json:"m20"` // 第零列第二行 / Column zero row two
M30 float32 `json:"m30"` // 第零列第三行 / Column zero row three
M01 float32 `json:"m01"` // 第一列第零行 / Column one row zero
M11 float32 `json:"m11"` // 第一列第一行 / Column one row one
M21 float32 `json:"m21"` // 第一列第二行 / Column one row two
M31 float32 `json:"m31"` // 第一列第三行 / Column one row three
M02 float32 `json:"m02"` // 第二列第零行 / Column two row zero
M12 float32 `json:"m12"` // 第二列第一行 / Column two row one
M22 float32 `json:"m22"` // 第二列第二行 / Column two row two
M32 float32 `json:"m32"` // 第二列第三行 / Column two row three
M03 float32 `json:"m03"` // 第三列第零行 / Column three row zero
M13 float32 `json:"m13"` // 第三列第一行 / Column three row one
M23 float32 `json:"m23"` // 第三列第二行 / Column three row two
M33 float32 `json:"m33"` // 第三列第三行 / Column three row three
// contains filtered or unexported fields
}
Matrix4x4 对应 MessagePack.Unity.Matrix4x4Formatter 的列优先十六槽布局 / Matrix4x4 matches the column-major 16-slot layout of MessagePack.Unity.Matrix4x4Formatter
func (*Matrix4x4) CodecDecodeSelf ¶
CodecDecodeSelf 按共享 indexed-object 规则解码 Matrix4x4 CodecDecodeSelf decodes Matrix4x4 using the shared indexed-object rules
func (Matrix4x4) CodecEncodeSelf ¶
CodecEncodeSelf 按共享 indexed-object 规则编码 Matrix4x4 CodecEncodeSelf encodes Matrix4x4 using the shared indexed-object rules
type Menu ¶
type Menu struct {
Version int32 `json:"version"` // 存储的版本;当前游戏 FixVersion 为 1005 / Stored version; current-game FixVersion is 1005
GUID uint64 `json:"guid"` // 来源 GUID 字符串的大小写无关 FNV-1a 64 位哈希,写入默认重算,来源为 HairMake.ExportedGUID 或缺少该来源时新生成的 UUID v4,可显式保留 / Case-insensitive FNV-1a 64-bit hash of the source GUID string, recalculated by default during encoding from HairMake.ExportedGUID or from a freshly generated UUID v4 when that source is absent, and explicitly preservable
ID uint64 `json:"id"` // Menu 文件名的大小写无关 FNV-1a 64 位哈希,写入默认重算且可显式保留 / Case-insensitive FNV-1a 64-bit hash of the menu filename, recalculated by default during encoding and explicitly preservable
FileName *string `json:"fileName"` // 可空菜单文件名,如 xxx.menu / Nullable menu file name such as xxx.menu
ItemName *string `json:"itemName"` // 可空物品显示名称 / Nullable display name of the item
IconFileName *string `json:"iconFileName"` // 可空图标文件名 / Nullable icon file name
InfoText *string `json:"infoText"` // 可空说明文本 / Nullable description text
Priority int32 `json:"priority"` // 优先级 / Priority
ParentID uint64 `json:"parentId"` // 父菜单 ID,0 表示无父级 / Parent menu ID, zero means no parent
IsMan bool `json:"isMan"` // 是否为男性用 / Whether this menu is for male characters
IsDiff bool `json:"isDiff"` // 是否为差分 / Whether this menu is a variation
IsDelete bool `json:"isDelete"` // 是否为删除项 / Whether this menu removes an item
Commands []*Command `json:"commandList"` // 可空命令对象数组 / Array of nullable command objects
CategoryText *string `json:"categoryText"` // 可空分类文本,通常为 MPN 枚举名 / Nullable category text, usually an MPN enum name
ColorSetText *string `json:"colorSetText"` // 可空颜色集文本,通常为 MPN 枚举名 / Nullable color-set text, usually an MPN enum name
DefineTagNames uint64 `json:"defineTagNames"` // DEFINE 标志位 / DEFINE flag bits
PreMulTexDatas map[uint64]*PreMulTexDatas `json:"preMulTexDatas"` // 可空预乘纹理数据对象表 / Map of nullable pre-multiplied texture data objects
ColvariFileNameExp *string `json:"colvariFileNameExp"` // 可空颜色变体文件名表达式 / Nullable color-variant file-name expression
ColvariInfo *Colvari `json:"colvariInfo"` // 颜色变体信息 / Color-variant information
SrcFileHashCRC32 uint32 `json:"srcFileHashCRC32"` // 源文件 CRC32 哈希 / Source-file CRC32 hash
DefineFirst uint64 `json:"defineFirst"` // 首要 DEFINE 标志位 / Primary DEFINE flag bits
PartsVer *TupleStringInt `json:"partsVer"` // 部件版本元组 / Parts version tuple
IsRecommendMan bool `json:"isRecommendMan"` // 是否推荐男性使用 / Whether male use is recommended
TargetBodyType int32 `json:"targetBodyType"` // 目标体型枚举,0=None, 1=Woman, 2=Man / Target body-type enum, 0=None, 1=Woman, 2=Man
Attribute uint64 `json:"attribute"` // 属性标志位 / Attribute flag bits
HideInEdit bool `json:"hideInEdit"` // 是否在编辑界面隐藏 / Whether hidden in edit mode
ToeLockSlotId *string `json:"toeLockSlotId"` // 可空脚趾锁定槽位 ID / Nullable toe-lock slot ID
ExportModelFormTextureName *string `json:"exportModelFormTextureName"` // 可空导出模型纹理名 / Nullable exported model texture name
IsHarayureAvailable int32 `json:"isHarayureAvailable"` // 腹揺れ可用性枚举,0=None, 1=Available, 2=Disable / Belly-jiggle availability enum, 0=None, 1=Available, 2=Disable
SkirtPhys int32 `json:"skirt_phys"` // 裙子物理类型 / Skirt physics type
HairMake *HairMake `json:"hairMake"` // KCES2 HairMake 导出信息 / KCES2 HairMake export information
IndexedArrayWidth int32 `codec:"-" json:"indexedArrayWidth,omitempty"` // 解码时记录的线格式数组宽度,并非游戏成员 / Wire array width recorded during decoding, not a game member
// contains filtered or unexported fields
}
Menu 表示 Parts.Menu 的菜单数据 对应 C# Parts.Menu,继承自 AMessagePackSerializationVersionControlIntKey MessagePack indexed array 在 KCES 中包含 Key(0) 至 Key(30),KCES2 在 Key(31) 追加 HairMake,Key(24) 在 C# 中没有成员 Menu represents menu data from Parts.Menu It matches C# Parts.Menu derived from AMessagePackSerializationVersionControlIntKey Its MessagePack indexed array contains Key(0) through Key(30) in KCES and appends HairMake at Key(31) in KCES2, with no C# member at Key(24)
func DecodeKCMenu ¶
DecodeKCMenu 解码单个 Parts.Menu 的 LZ4 MessagePack .kcmenu 数据 DecodeKCMenu decodes LZ4 MessagePack .kcmenu data containing one Parts.Menu
func NewKCES2Menu ¶
func NewKCES2Menu() *Menu
NewKCES2Menu 创建使用 KCES2 32 槽布局的新菜单 NewKCES2Menu creates a new menu using the 32-slot KCES2 layout
func NewMenu ¶
func NewMenu() *Menu
NewMenu 创建使用当前固定版本及游戏默认分类文本的新菜单 NewMenu creates a new menu with the current fixed version and the game's default category text
func (*Menu) CodecDecodeSelf ¶
CodecDecodeSelf 按共享 indexed-object 规则解码 Menu CodecDecodeSelf decodes Menu using the shared indexed-object rules
func (Menu) CodecEncodeSelf ¶
CodecEncodeSelf 按共享 indexed-object 规则编码 Menu CodecEncodeSelf encodes Menu using the shared indexed-object rules
func (*Menu) MessagePackIndexedObjectWidth ¶
MessagePackIndexedObjectWidth 返回 Menu 应写出的 indexed-array 宽度 MessagePackIndexedObjectWidth returns the indexed-array width that Menu should emit
func (*Menu) SetMessagePackIndexedObjectWidth ¶
SetMessagePackIndexedObjectWidth 设置 Menu 应写出的 indexed-array 宽度 SetMessagePackIndexedObjectWidth sets the indexed-array width that Menu should emit
type MenuAssets ¶
type MenuAssets struct {
FileName *string `json:"fileName"` // 可空容器文件名,如 xxx.menuassets / Nullable container file name such as xxx.menuassets
Assets []*Menu `json:"assetArray"` // 可空菜单对象数组 / Array of nullable menu objects
// contains filtered or unexported fields
}
MenuAssets 表示菜单资源容器 对应 C# Parts.MenuAssets,继承自 SerializPartsAssets<Menu> MessagePack indexed array 依次保存容器文件名和菜单数组 MenuAssets represents a menu asset container It matches C# Parts.MenuAssets derived from SerializPartsAssets<Menu> Its MessagePack indexed array stores the container filename followed by the menu array
func DecodeMenuAssets ¶
func DecodeMenuAssets(data []byte) (*MenuAssets, error)
DecodeMenuAssets 从 Lz4BlockArray 压缩的 MessagePack 数据解码 MenuAssets DecodeMenuAssets decodes MenuAssets from Lz4BlockArray-compressed MessagePack data
func (*MenuAssets) CodecDecodeSelf ¶
func (v *MenuAssets) CodecDecodeSelf(d *codec.Decoder)
CodecDecodeSelf 按共享 indexed-object 规则解码 MenuAssets CodecDecodeSelf decodes MenuAssets using the shared indexed-object rules
func (MenuAssets) CodecEncodeSelf ¶
func (v MenuAssets) CodecEncodeSelf(e *codec.Encoder)
CodecEncodeSelf 按共享 indexed-object 规则编码 MenuAssets CodecEncodeSelf encodes MenuAssets using the shared indexed-object rules
type MixHairBuildData ¶
type MixHairBuildData struct {
Version int32 `codec:"v" json:"version"` // 混合头发数据版本 / Mixed-hair data version
GUID *string `codec:"guid" json:"guid"` // 可空混合头发 GUID / Nullable mixed-hair GUID
Type int32 `codec:"type" json:"type"` // 混合头发类型 / Mixed-hair type
MixName *string `codec:"name" json:"name"` // 可空混合头发名称 / Nullable mixed-hair name
Category int32 `codec:"cat" json:"category"` // HairMake 头发分类 / HairMake hair category
UserName *string `codec:"creater" json:"creator"` // 可空创建者名称,线格式保留游戏 creater 拼写 / Nullable creator name with the game's creater spelling retained on the wire
Date *string `codec:"date" json:"date"` // 可空创建日期文本 / Nullable creation date text
Description *string `codec:"desc" json:"description"` // 可空说明文本 / Nullable description text
Bunches []*BunchDeformedData `codec:"bunchs" json:"bunches"` // 可空发束形变列表,线格式保留游戏 bunchs 拼写 / Nullable deformed-bunch list with the game's bunchs spelling retained on the wire
}
MixHairBuildData 对应 HairMake.MixHairBuildData 的字符串键 MessagePack 对象 / MixHairBuildData matches the string-keyed MessagePack object HairMake.MixHairBuildData
type Model ¶
type Model struct {
Version int32 `json:"version"` // 版本号,固定为 1001 / Version value, fixed to 1001
ID uint64 `json:"id"` // 模型文件名的 FNV-1a 64 位哈希,游戏导出器会先小写文件名,写入默认按当前值重算且可显式保留 / FNV-1a 64-bit hash of the model filename, which the game exporter lowercases before encoding and which is recalculated from the current value by default during encoding and explicitly preservable
FileName *string `json:"fileName"` // 可空模型文件名 / Nullable model file name
MeshFileName *string `json:"meshFileName"` // 可空网格文件名 / Nullable mesh file name
ModelName *string `json:"modelName"` // 可空模型名称 / Nullable model name
TransData []*TransData `json:"transData"` // 可空骨骼变换对象数组 / Array of nullable bone-transform objects
BoneNames []*string `json:"boneNames"` // 可空骨骼名称数组 / Array of nullable bone names
MaterialFileName []*string `json:"materialFileName"` // 可空材质文件名数组 / Array of nullable material file names
Morphs []*BlendData `json:"morphs"` // 可空变形对象数组 / Array of nullable morph objects
SkinThick *SkinThickness `json:"skinThick"` // 皮肤厚度数据 / Skin-thickness data
ShadowModeFlags int32 `json:"shadowModeFlags"` // 阴影模式标志,0=Default, 1=CastShadow, 2=NoCastShadow / Shadow-mode flags, 0=Default, 1=CastShadow, 2=NoCastShadow
IndexedArrayWidth int32 `codec:"-" json:"indexedArrayWidth,omitempty"` // 解码时记录的线格式数组宽度,并非游戏成员 / Wire array width recorded during decoding, not a game member
// contains filtered or unexported fields
}
Model 表示 KCES Parts.Model 模型数据 对应 C# Parts.Model,继承自 AMessagePackSerializationVersionControlIntKey MessagePack indexed array 依次保存版本、标识、文件名、骨骼、材质、变形、皮肤厚度和阴影标志 Model represents KCES Parts.Model data It matches C# Parts.Model derived from AMessagePackSerializationVersionControlIntKey Its MessagePack indexed array stores the version, identifiers, filenames, bones, materials, morphs, skin thickness, and shadow flags in order
func DecodeKCModel ¶
DecodeKCModel 解码与 Parts.Model 相同的 LZ4 MessagePack .kcmodel 数据 DecodeKCModel decodes LZ4 MessagePack .kcmodel data that uses the Parts.Model layout
func DecodeModel ¶
DecodeModel 从 Lz4BlockArray 压缩的 MessagePack 数据解码单个 Model 这是 .model TextAsset m_Script 的实际解码方式,游戏通过 PartsUtility.Deserialize<Model>(GameResource.LoadBinary(...)) 加载 DecodeModel decodes one Model from Lz4BlockArray-compressed MessagePack data This is the actual format of .model TextAsset m_Script loaded by the game through PartsUtility.Deserialize<Model>(GameResource.LoadBinary(...))
func NewModel ¶
func NewModel() *Model
NewModel 创建使用当前固定版本的新模型描述 NewModel creates a new model description with the current fixed version
func (*Model) CodecDecodeSelf ¶
CodecDecodeSelf 按共享 indexed-object 规则解码 Model CodecDecodeSelf decodes Model using the shared indexed-object rules
func (Model) CodecEncodeSelf ¶
CodecEncodeSelf 按共享 indexed-object 规则编码 Model CodecEncodeSelf encodes Model using the shared indexed-object rules
func (*Model) MessagePackIndexedObjectWidth ¶
MessagePackIndexedObjectWidth 返回 Model 应写出的 indexed-array 宽度 MessagePackIndexedObjectWidth returns the indexed-array width that Model should emit
func (*Model) SetMessagePackIndexedObjectWidth ¶
SetMessagePackIndexedObjectWidth 设置 Model 应写出的 indexed-array 宽度 SetMessagePackIndexedObjectWidth sets the indexed-array width that Model should emit
type ModelAssets ¶
type ModelAssets struct {
FileName *string `json:"fileName"` // 可空容器文件名 / Nullable container file name
Assets []*Model `json:"assetArray"` // 可空模型对象数组 / Array of nullable model objects
// contains filtered or unexported fields
}
ModelAssets 表示可能存在的批量模型资源容器 游戏中 .model TextAsset 的 m_Script 实际直接包含单个 Model 而不是此容器,应使用 DecodeModel 和 EncodeModel 处理 ModelAssets represents a possible batch model asset container A game .model TextAsset m_Script actually contains one Model directly rather than this container and should be handled with DecodeModel and EncodeModel
func DecodeModelAssets ¶
func DecodeModelAssets(data []byte) (*ModelAssets, error)
DecodeModelAssets 从 Lz4BlockArray 压缩的 MessagePack 数据解码 ModelAssets 容器 DecodeModelAssets decodes a ModelAssets container from Lz4BlockArray-compressed MessagePack data
func (*ModelAssets) CodecDecodeSelf ¶
func (v *ModelAssets) CodecDecodeSelf(d *codec.Decoder)
CodecDecodeSelf 按共享 indexed-object 规则解码 ModelAssets CodecDecodeSelf decodes ModelAssets using the shared indexed-object rules
func (ModelAssets) CodecEncodeSelf ¶
func (v ModelAssets) CodecEncodeSelf(e *codec.Encoder)
CodecEncodeSelf 按共享 indexed-object 规则编码 ModelAssets CodecEncodeSelf encodes ModelAssets using the shared indexed-object rules
type MoveablePanelActiveStateEntry ¶
type MoveablePanelActiveStateEntry struct {
PanelName *string `json:"panelName"` // KeyValuePair Key 中用于匹配 MoveablePanel.PanelName 的可空名称 / Nullable name in the KeyValuePair Key used to match MoveablePanel.PanelName
Active bool `json:"active"` // KeyValuePair Value 中决定游戏显示或隐藏面板的打开状态 / Open state in the KeyValuePair Value used by the game to show or hide the panel
}
MoveablePanelActiveStateEntry 表示 KeyValuePair<string, bool> MessagePack KeyValuePair 格式化器始终使用精确的 array 2 MoveablePanelActiveStateEntry represents KeyValuePair<string, bool> The MessagePack KeyValuePair formatter always uses an exact array of 2
type MoveablePanelPositionEntry ¶
type MoveablePanelPositionEntry struct {
PanelName *string `json:"panelName"` // KeyValuePair Key 中用于查找 MoveablePanel.PanelName 的可空名称 / Nullable name in the KeyValuePair Key used to find MoveablePanel.PanelName
Position Vector3 `json:"position"` // KeyValuePair Value 中恢复到 RectTransform.anchoredPosition3D 的位置 / Position in the KeyValuePair Value restored to RectTransform.anchoredPosition3D
}
MoveablePanelPositionEntry 表示 KeyValuePair<string, UnityEngine.Vector3> MessagePack KeyValuePair 格式化器始终使用精确的 array 2 MoveablePanelPositionEntry represents KeyValuePair<string, UnityEngine.Vector3> The MessagePack KeyValuePair formatter always uses an exact array of 2
type MoveablePanelSaveData ¶
type MoveablePanelSaveData struct {
MoveablePanelPosition []MoveablePanelPositionEntry `json:"moveablePanelPosition"` // Key 0 的有序面板名称和 anchoredPosition3D 列表 / Ordered panel-name and anchoredPosition3D list at Key 0
MoveablePanelActiveState []MoveablePanelActiveStateEntry `json:"moveablePanelActiveState"` // Key 1 的有序面板名称和打开状态列表 / Ordered panel-name and open-state list at Key 1
}
MoveablePanelSaveData 表示 system.dat 中 EditData/MoveablePanelManager::SceneEdit::savedata 保存的类型化未压缩 Standard MessagePack 对象 两个切片有意保持顺序,因为 MoveablePanelManager 会遍历 MoveablePanelPosition 并调用 Transform.SetAsLastSibling 恢复面板同级顺序 将任一线格式列表转换为映射都会丢失游戏中可观察的状态 MoveablePanelSaveData represents the typed uncompressed Standard MessagePack object stored at EditData/MoveablePanelManager::SceneEdit::savedata in system.dat Both slices intentionally retain order because MoveablePanelManager restores panel sibling order by iterating MoveablePanelPosition and calling Transform.SetAsLastSibling Converting either wire list to a map would lose observable game state
func DecodeMoveablePanelSaveData ¶
func DecodeMoveablePanelSaveData(data []byte) (*MoveablePanelSaveData, error)
DecodeMoveablePanelSaveData 解码 MessagePackSerializer.Serialize<MoveablePanelSaveData> 写出的裸 Standard MessagePack 载荷 根对象固定为两槽,KeyValuePair 固定为两槽,Vector3 固定为三槽,并要求完整消费输入 MessagePackReader.ReadSingle 接受 float32、float64 和所有整数编码并转换为 System.Single,可空列表与名称、重复名称及所有 IEEE-754 值均会保留 畸形 UTF-8 按 MessagePackReader.ReadString 的行为使用 U+FFFD 规范化 DecodeMoveablePanelSaveData decodes the bare Standard MessagePack payload written by MessagePackSerializer.Serialize<MoveablePanelSaveData> The root object uses exactly two slots, KeyValuePair uses exactly two slots, Vector3 uses exactly three slots, and the complete input must be consumed MessagePackReader.ReadSingle accepts float32, float64, and every integer encoding and converts to System.Single, while nullable lists and names, duplicate names, and all IEEE-754 values are preserved Malformed UTF-8 is normalized with U+FFFD to match MessagePackReader.ReadString
type Nei ¶
Nei 表示解密后的 .nei CSV 表格数据 / Nei represents decrypted .nei CSV table data
func NewNei ¶
NewNei 创建使用 KCES 单元格编码的空表格 写出 KCES 表格时必须设置 UTF-8,否则游戏会把日文读成乱码 NewNei creates an empty table using the KCES cell encoding KCES tables must be written as UTF-8 or the game reads Japanese text as garbage
func ReadNei ¶
ReadNei 从 r 中读取一个 .nei 文件,并解析为 Nei 结构 单元格编码按内容探测,KCES 自带的表格会得到 UTF-8,纯 ASCII 表格无法区分编码并按 Shift-JIS 报告 neiKey 传入 nil 则使用默认密钥 ReadNei reads a .nei file from r and parses it into a Nei structure The cell encoding is detected from content and KCES's own tables resolve to UTF-8, while ASCII-only tables carry no encoding evidence and are reported as Shift-JIS Passing nil as neiKey selects the default key
type NeiTextEncoding ¶
type NeiTextEncoding = nei.TextEncoding
NeiTextEncoding 表示 .nei 单元格文本使用的字符编码 / NeiTextEncoding represents the character encoding used by .nei cell text
type PaletteColorSaveData ¶
type PaletteColorSaveData struct {
Color map[int32]int32 `json:"color"` // Key 0 的颜色参数字典,索引 0 至 3 为基础色、4 至 7 为阴影色、8 为阴影比例 / Color-parameter map at Key 0 with indices 0 through 3 for base color, 4 through 7 for shadow color, and 8 for shadow rate
Index int32 `json:"index"` // Key 1 的调色板槽位索引 / Palette slot index at Key 1
IsSave int32 `json:"isSave"` // Key 2 的保存状态,游戏构造未保存项时为 0、保存项时为 1 / Save state at Key 2, constructed as 0 for unsaved and 1 for saved entries by the game
}
PaletteColorSaveData 表示 system.dat 中 PaletteColorSave 索引文件的固定三槽 typed MessagePack 对象,依次保存 Int32 字典 color、index 和 isSave / PaletteColorSaveData represents the fixed three-slot typed MessagePack object in an indexed PaletteColorSave file in system.dat, storing the Int32 map color, index, and isSave in order
func DecodePaletteColorSaveData ¶
func DecodePaletteColorSaveData(data []byte) (*PaletteColorSaveData, error)
DecodePaletteColorSaveData 解码一个未压缩且无长度前缀的固定三槽 PaletteColorSaveData MessagePack 值,字典按真实 Int32 键值完整解析且不应用 SaveDataToLayerFreeColor 行为 DecodePaletteColorSaveData decodes one uncompressed and unprefixed fixed three-slot PaletteColorSaveData MessagePack value, fully parsing the dictionary as real Int32 keys and values without applying SaveDataToLayerFreeColor behavior
type PartColDef ¶
type PartColDef struct {
PartName *string `json:"part_name"` // 可空部位名称,字段名对应 part_name / Nullable part name, matching part_name
MultiCol PartsColor `json:"multi_col"` // 部位颜色参数 / Part color parameters
PatternScale Vector2 `json:"patternScale"` // 纹样缩放 / Pattern texture scale
PatternRot float32 `json:"patternRot"` // 纹样旋转角度 / Pattern texture rotation in degrees
// contains filtered or unexported fields
}
PartColDef 对应 InfinityColorTexMgr2.PartColDef,描述 ID 贴图的一个部位颜色 PartColDef maps InfinityColorTexMgr2.PartColDef and describes one ID-texture part color
func NewPartColDef ¶
func NewPartColDef() *PartColDef
NewPartColDef 创建使用游戏默认纹样缩放的新部位颜色定义 NewPartColDef creates a new part-color definition with the game's default pattern scale
func (*PartColDef) CodecDecodeSelf ¶
func (v *PartColDef) CodecDecodeSelf(d *codec.Decoder)
CodecDecodeSelf 按共享 indexed-object 规则解码 PartColDef CodecDecodeSelf decodes PartColDef using the shared indexed-object rules
func (PartColDef) CodecEncodeSelf ¶
func (v PartColDef) CodecEncodeSelf(e *codec.Encoder)
CodecEncodeSelf 按共享 indexed-object 规则编码 PartColDef CodecEncodeSelf encodes PartColDef using the shared indexed-object rules
func (*PartColDef) UnmarshalJSON ¶
func (v *PartColDef) UnmarshalJSON(data []byte) error
UnmarshalJSON 解码 PartColDef 的 JSON 表示而不注入构造默认值 UnmarshalJSON decodes the JSON representation of PartColDef without injecting constructor defaults
type PartsColor ¶
type PartsColor struct {
MainHue int32 `json:"m_nMainHue"` // 主色相,对应 m_nMainHue / Main hue, matching m_nMainHue
MainChroma int32 `json:"m_nMainChroma"` // 主色彩度,对应 m_nMainChroma / Main chroma, matching m_nMainChroma
MainBrightness int32 `json:"m_nMainBrightness"` // 主色亮度,对应 m_nMainBrightness / Main brightness, matching m_nMainBrightness
MainContrast int32 `json:"m_nMainContrast"` // 主色对比度,对应 m_nMainContrast / Main contrast, matching m_nMainContrast
ShadowRate int32 `json:"m_nShadowRate"` // 阴影混合比例,对应 m_nShadowRate / Shadow blend rate, matching m_nShadowRate
ShadowHue int32 `json:"m_nShadowHue"` // 阴影色相,对应 m_nShadowHue / Shadow hue, matching m_nShadowHue
ShadowChroma int32 `json:"m_nShadowChroma"` // 阴影彩度,对应 m_nShadowChroma / Shadow chroma, matching m_nShadowChroma
ShadowBrightness int32 `json:"m_nShadowBrightness"` // 阴影亮度,对应 m_nShadowBrightness / Shadow brightness, matching m_nShadowBrightness
ShadowContrast int32 `json:"m_nShadowContrast"` // 阴影对比度,对应 m_nShadowContrast / Shadow contrast, matching m_nShadowContrast
Grada []PartsColorGrada `json:"m_grada" codec:"-"` // 回调从 Key 9 字节完整还原的渐变色点 / Gradient-color points fully restored by the callback from the bytes at Key 9
// contains filtered or unexported fields
}
PartsColor 对应游戏源码 MaidInfinityColor.PartsColor,editing JSON 直接公开回调还原后的 m_grada MessagePack codec 在内部按 OnBeforeSerialize 和 OnAfterDeserialize 回调转换 Key 9 的 m_gradaBytes PartsColor corresponds to the game's MaidInfinityColor.PartsColor and exposes callback-restored m_grada directly in editing JSON The MessagePack codec internally converts the m_gradaBytes value at Key 9 according to the OnBeforeSerialize and OnAfterDeserialize callbacks
func (*PartsColor) CodecDecodeSelf ¶
func (p *PartsColor) CodecDecodeSelf(d *codec.Decoder)
CodecDecodeSelf 解码固定十槽对象并立即将 Key 9 的 byte[] 完整还原为 typed m_grada CodecDecodeSelf decodes the fixed ten-slot object and immediately restores the Key 9 byte array into typed m_grada
func (PartsColor) CodecEncodeSelf ¶
func (p PartsColor) CodecEncodeSelf(e *codec.Encoder)
CodecEncodeSelf 按游戏回调将 typed m_grada 转换为内部 byte[] 并编码固定十槽对象 CodecEncodeSelf converts typed m_grada to the callback byte array and encodes the fixed ten-slot object
func (PartsColor) MarshalJSON ¶
func (p PartsColor) MarshalJSON() ([]byte, error)
MarshalJSON 只输出 typed m_grada,不公开内部 byte[] 载体 MarshalJSON emits only typed m_grada and does not expose the internal byte-array carrier
func (*PartsColor) UnmarshalJSON ¶
func (p *PartsColor) UnmarshalJSON(data []byte) error
UnmarshalJSON 解码 typed m_grada,内部 byte[] 将在 MessagePack 编码时重新生成 UnmarshalJSON decodes typed m_grada while the internal byte array is rebuilt during MessagePack encoding
type PartsColorGrada ¶
type PartsColorGrada struct {
MainHue int32 `json:"m_nMainHue"` // 主色相 / Main hue
MainChroma int32 `json:"m_nMainChroma"` // 主色彩度 / Main chroma
MainBrightness int32 `json:"m_nMainBrightness"` // 主色亮度 / Main brightness
MainContrast int32 `json:"m_nMainContrast"` // 主色对比度 / Main contrast
ShadowRate int32 `json:"m_nShadowRate"` // 阴影混合比例 / Shadow blend rate
ShadowHue int32 `json:"m_nShadowHue"` // 阴影色相 / Shadow hue
ShadowChroma int32 `json:"m_nShadowChroma"` // 阴影彩度 / Shadow chroma
ShadowBrightness int32 `json:"m_nShadowBrightness"` // 阴影亮度 / Shadow brightness
ShadowContrast int32 `json:"m_nShadowContrast"` // 阴影对比度 / Shadow contrast
}
PartsColorGrada 表示一个 m_grada 元素,SerializeGrada 按小端顺序写入这九个有符号 Int32 字段,并且不会递归序列化元素自身的 m_grada 或 m_gradaBytes 字段 PartsColorGrada represents one m_grada element, with SerializeGrada writing these nine signed Int32 fields in little-endian order without recursively serializing the element's own m_grada or m_gradaBytes fields
func DecodePartsColorGrada ¶
func DecodePartsColorGrada(data []byte) ([]PartsColorGrada, error)
DecodePartsColorGrada 实现 MaidInfinityColor.PartsColor.DeserializeGrada 并要求声明记录完整消费输入 DecodePartsColorGrada implements MaidInfinityColor.PartsColor.DeserializeGrada and requires the declared records to consume the complete input
type PreMulTexDatas ¶
type PreMulTexDatas struct {
Version int32 `json:"version"` // 版本号,游戏 FixVersion 为 1001 / Version value; the game's FixVersion is 1001
SlotID *string `json:"slotId"` // 可空目标槽位 ID / Nullable target slot ID
SaveTag *string `json:"saveTag"` // 可空保存用图层标签 / Nullable saved texture layer tag
MatNo int32 `json:"f_nMatNo"` // 目标材质编号 / Target material index
PropName *string `json:"f_strPropName"` // 可空目标材质属性名 / Nullable target material property name
LayerNo int32 `json:"f_nLayerNo"` // 贴图层编号 / Texture layer number
FileName *string `json:"f_strFileName"` // 可空合成源贴图文件名 / Nullable source texture file name for composition
BlendMode *string `json:"f_eBlendMode"` // 可空合成模式字符串 / Nullable blend-mode string
MaskParam *MaskParam `json:"maskParam"` // 蒙版参数 / Mask parameters
InfColParam *InfColorParam `json:"infColParam"` // 无限色参数 / Infinity-color parameters
TexGroup bool `json:"f_bTexGroup"` // 是否属于贴图组 / Whether this layer belongs to a texture group
LayNoInGroup int32 `json:"f_nLayNoInGroup"` // 组内层编号 / Layer index inside the group
Alpha float32 `json:"f_fAlpha"` // 合成透明度 / Composition alpha
TargetBodyTexSize int32 `json:"f_nTargetBodyTexSize"` // 目标身体贴图尺寸 / Target body texture size
PosDefHokuroTatooSlot *string `json:"posDefHokuroTatooSlotId"` // 可空默认痣/纹身位置槽位 / Nullable default mole/tattoo position slot
PreMaskData []*MaskData `json:"preMaskData"` // 可空预计算蒙版对象数组 / Array of nullable precomputed mask objects
PreTransTexData []*TransTexData `json:"preTransTexData"` // 可空预计算贴图变换对象列表 / List of nullable precomputed texture-transform objects
PreInfColData *InfColData `json:"preInfColData"` // 预计算无限色数据 / Precomputed infinity-color data
PreTexCompoTypeStr *string `json:"preTexCompoTypeStr"` // 可空预合成系统材质模式字符串 / Nullable pre-composition system material mode string
// contains filtered or unexported fields
}
PreMulTexDatas 对应 Parts.Menu.PreMulTexDatas 的贴图预合成记录 PreMulTexDatas maps Parts.Menu.PreMulTexDatas texture pre-composition records
func NewPreMulTexDatas ¶
func NewPreMulTexDatas() *PreMulTexDatas
NewPreMulTexDatas 返回 C# 基类构造函数和字段初始化器在 MessagePack 或 JSON 成员赋值前设置的默认值 NewPreMulTexDatas returns the defaults installed by the C# base constructor and field initializers before MessagePack or JSON member assignment
func (*PreMulTexDatas) ApplyMessagePackConstructorDefaults ¶
func (p *PreMulTexDatas) ApplyMessagePackConstructorDefaults()
ApplyMessagePackConstructorDefaults 在 MessagePack 成员赋值前安装 C# 构造默认值,使旧宽度 18 缺失的 preTexCompoTypeStr 保留 "Alpha" ApplyMessagePackConstructorDefaults installs the C# constructor defaults before MessagePack member assignment so preTexCompoTypeStr missing from the older width 18 keeps "Alpha"
func (*PreMulTexDatas) CodecDecodeSelf ¶
func (v *PreMulTexDatas) CodecDecodeSelf(d *codec.Decoder)
CodecDecodeSelf 按共享 indexed-object 规则解码 PreMulTexDatas CodecDecodeSelf decodes PreMulTexDatas using the shared indexed-object rules
func (PreMulTexDatas) CodecEncodeSelf ¶
func (v PreMulTexDatas) CodecEncodeSelf(e *codec.Encoder)
CodecEncodeSelf 按共享 indexed-object 规则编码 PreMulTexDatas CodecEncodeSelf encodes PreMulTexDatas using the shared indexed-object rules
func (*PreMulTexDatas) UnmarshalJSON ¶
func (p *PreMulTexDatas) UnmarshalJSON(data []byte) error
UnmarshalJSON 解码 PreMulTexDatas 的 JSON 表示而不注入构造默认值 UnmarshalJSON decodes the JSON representation of PreMulTexDatas without injecting constructor defaults
type PresetPanelNameSaveData ¶
type PresetPanelNameSaveData struct {
BoxNameList []*string `json:"boxNameList"` // Key 0 的可空名称列表,nil 项触发游戏默认名称 / Nullable name list at Key 0 whose nil entries trigger game defaults
}
PresetPanelNameSaveData 表示 system.dat 中 EditData/PresetPanelNameSaveData::SceneEdit::savedata 的类型化 MessagePack 对象 C# 对象是只有 Key 0 BoxNameList 的 indexed object,列表项使用指针是因为 MessagePack-CSharp 字符串格式化器接受 nil PresetPanel.LoadBoxName 会把 nil 项视为缺失名称并回退到 BOX 加序号的默认名称 PresetPanelNameSaveData represents the typed MessagePack object stored at EditData/PresetPanelNameSaveData::SceneEdit::savedata in system.dat The C# object is an indexed object containing only BoxNameList at Key 0, and list elements use pointers because the MessagePack-CSharp string formatter accepts nil PresetPanel.LoadBoxName treats a nil entry as a missing name and falls back to a BOX name with its number
func DecodePresetPanelNameSaveData ¶
func DecodePresetPanelNameSaveData(data []byte) (*PresetPanelNameSaveData, error)
DecodePresetPanelNameSaveData 解码一个未压缩且无长度前缀的 PresetPanelNameSaveData MessagePack 值 根对象必须使用固定一槽布局且完整消费输入 DecodePresetPanelNameSaveData decodes one uncompressed and unprefixed PresetPanelNameSaveData MessagePack value The root must use the fixed one-slot layout and consume the complete input
type PriorityMaterial ¶
type PriorityMaterial struct {
Version int32 `json:"version"` // 版本号,固定为 1000 / Version value, fixed to 1000
ID uint64 `json:"id"` // 材质 ID,通常为 fileName 去扩展名后小写的 FNV hash / Material ID, usually lowercase extensionless fileName FNV hash
FileName *string `json:"fileName"` // 可空材质文件名,如 xxx.pmat / Nullable material file name such as xxx.pmat
RenderQueue float32 `json:"renderQueue"` // 渲染队列值,控制渲染顺序 / Render queue value controlling draw order
TargetID uint64 `json:"targetId"` // 目标材质 ID,指向被覆盖的材质 / Target material ID pointing to the overridden material
// contains filtered or unexported fields
}
PriorityMaterial 表示优先级材质数据 对应 C# Parts.PriorityMaterial,继承自 AMessagePackSerializationVersionControlIntKey MessagePack indexed-array 布局如下
[Key(0)] version int 固定 1000 (FixVersion) [Key(1)] id uint64 材质 ID(文件名的 FNV hash) [Key(2)] fileName string 材质文件名(含 .pmat 扩展名) [Key(3)] renderQueue float32 渲染队列值 [Key(4)] targetId uint64 目标材质 ID
PriorityMaterial represents KCES Parts.PriorityMaterial data It matches C# Parts.PriorityMaterial derived from AMessagePackSerializationVersionControlIntKey Its MessagePack indexed-array layout is as follows
[Key(0)] version int fixed at 1000 by FixVersion [Key(1)] id uint64 material ID using the filename FNV hash [Key(2)] fileName string material filename including the .pmat extension [Key(3)] renderQueue float32 render queue value [Key(4)] targetId uint64 target material ID
func DecodePriorityMaterial ¶
func DecodePriorityMaterial(arr []interface{}) (*PriorityMaterial, error)
DecodePriorityMaterial 从 MessagePack indexed array 解码单个 PriorityMaterial DecodePriorityMaterial decodes one PriorityMaterial from a MessagePack indexed array
func NewPriorityMaterial ¶
func NewPriorityMaterial() *PriorityMaterial
NewPriorityMaterial 创建使用当前固定版本的新优先级材质 NewPriorityMaterial creates a new priority material with the current fixed version
func (*PriorityMaterial) CodecDecodeSelf ¶
func (v *PriorityMaterial) CodecDecodeSelf(d *codec.Decoder)
CodecDecodeSelf 按共享 indexed-object 规则解码 PriorityMaterial CodecDecodeSelf decodes PriorityMaterial using the shared indexed-object rules
func (PriorityMaterial) CodecEncodeSelf ¶
func (v PriorityMaterial) CodecEncodeSelf(e *codec.Encoder)
CodecEncodeSelf 按共享 indexed-object 规则编码 PriorityMaterial CodecEncodeSelf encodes PriorityMaterial using the shared indexed-object rules
type PriorityMaterialAssets ¶
type PriorityMaterialAssets struct {
FileName *string `json:"fileName"` // 可空容器文件名,如 xxx.pmatassets / Nullable container file name such as xxx.pmatassets
Assets []*PriorityMaterial `json:"assetArray"` // 可空优先级材质对象数组 / Array of nullable priority-material objects
// contains filtered or unexported fields
}
PriorityMaterialAssets 表示优先级材质资源容器 对应 C# Parts.PriorityMaterialAssets,继承自 SerializPartsAssets<PriorityMaterial> MessagePack indexed-array 依次保存容器文件名和 PriorityMaterial 数组 数据存储在 .aba TextAsset 的 m_Script 中并使用 Lz4BlockArray 压缩 PriorityMaterialAssets represents a priority-material asset container It matches C# Parts.PriorityMaterialAssets derived from SerializPartsAssets<PriorityMaterial> Its MessagePack indexed array stores the container filename followed by the PriorityMaterial array The data is stored in TextAsset m_Script inside .aba and compressed with Lz4BlockArray
func DecodePriorityMaterialAssets ¶
func DecodePriorityMaterialAssets(data []byte) (*PriorityMaterialAssets, error)
DecodePriorityMaterialAssets 从 Lz4BlockArray 压缩的 MessagePack 数据解码 PriorityMaterialAssets data 应为 TextAsset m_Script 的原始字节 DecodePriorityMaterialAssets decodes PriorityMaterialAssets from Lz4BlockArray-compressed MessagePack data data should contain the raw TextAsset m_Script bytes
func (*PriorityMaterialAssets) CodecDecodeSelf ¶
func (v *PriorityMaterialAssets) CodecDecodeSelf(d *codec.Decoder)
CodecDecodeSelf 按共享 indexed-object 规则解码 PriorityMaterialAssets CodecDecodeSelf decodes PriorityMaterialAssets using the shared indexed-object rules
func (PriorityMaterialAssets) CodecEncodeSelf ¶
func (v PriorityMaterialAssets) CodecEncodeSelf(e *codec.Encoder)
CodecEncodeSelf 按共享 indexed-object 规则编码 PriorityMaterialAssets CodecEncodeSelf encodes PriorityMaterialAssets using the shared indexed-object rules
type SavedAttachData ¶
type SavedAttachData struct {
Version int32 `json:"version"` // 记录布局版本,隐式旧布局为 2000 / Record layout version, with 2000 for the implicit legacy layout
PartName *string `json:"partName"` // 附着记录的部件标签名 / Part tag name for the attachment record
Enabled bool `json:"enabled"` // 该附着记录是否启用 / Whether this attachment record is enabled
MyRID uint64 `json:"myRid"` // 源部件菜单 RID,用于确认源菜单仍匹配 / Source-part menu RID used to verify that the source menu still matches
MySlotID string `json:"mySlotId"` // 源部件的 TBody.SlotID 名称 / TBody.SlotID name of the source part
TargetRID uint64 `json:"targetRid"` // 目标部件菜单 RID,用于确认目标菜单仍匹配 / Target-part menu RID used to verify that the target menu still matches
TargetSlotID string `json:"targetSlotId"` // 目标部件的 TBody.SlotID 名称 / TBody.SlotID name of the target part
TargetSlotNo int32 `json:"targetSlotNo"` // 目标槽位中的子部件编号,记录版本 2001 起存在 / Target slot sub-part number, present since record version 2001
TargetAttachPointName *string `json:"targetAttachPointName"` // 目标新附着点名称 / Target new-attachment-point name
TargetVertexCount int32 `json:"targetVertexCount"` // 保存时的目标网格顶点数,用于拒绝已变化网格 / Target mesh vertex count when saved, used to reject a changed mesh
TargetVertexIndex int32 `json:"targetVertexIndex"` // 线格式保存的目标顶点索引,当前加载路径未直接消费 / Target vertex index stored on the wire and not directly consumed by the current loading path
NewAttachVertexIndices []int32 `json:"newAttachVertexIndices"` // 重建新附着点使用的顶点索引 / Vertex indices used to rebuild the new attachment point
PRS2 *SavedAttachPosRotScale `json:"prs2"` // center_tr2 的局部位置与旋转,游戏也保存缩放槽位 / Local position and rotation of center_tr2, with a scale slot also stored by the game
PRS3 *SavedAttachPosRotScale `json:"prs3"` // center_tr3 的完整局部变换 / Complete local transform of center_tr3
BoneAttachedHierarchy map[string]SavedAttachPosRotScale `json:"boneAttachedHierarchy"` // 按骨骼名保存的附着层级局部变换 / Attachment-hierarchy local transforms keyed by bone name
BoneAttachEdited bool `json:"boneAttachEdited"` // 骨骼附着层级是否已在编辑器中修改 / Whether the bone attachment hierarchy was edited
}
SavedAttachData 对应游戏 SavedAttachData.Serialize 和 Deserialize 实现的 BinaryWriter 布局 指针字段保留 WriteNaS 与两个 PosRotScale 值使用的 null 和非 null 标志 SavedAttachData mirrors the BinaryWriter layout implemented by the game's SavedAttachData.Serialize and Deserialize methods Pointer fields preserve the null and non-null flags used by WriteNaS and both PosRotScale values
type SavedAttachFile ¶
type SavedAttachFile struct {
Signature string `json:"signature"` // 文件签名 SAVED_ATTACH_DATA / File signature SAVED_ATTACH_DATA
Version int32 `json:"version"` // 外层文件版本 / Outer file version
Items []SavedAttachData `json:"items"` // 部件附着记录 / Part-attachment records
}
SavedAttachFile 表示一个导出的 KCES/GP03 .sad 文件 SavedAttachFile represents one exported KCES/GP03 .sad file
func DecodeSavedAttach ¶
func DecodeSavedAttach(data []byte) (*SavedAttachFile, error)
DecodeSavedAttach 解码导出的 .sad 文件,槽位 ID 保持为不透明线格式字符串,枚举解释由消费游戏负责 DecodeSavedAttach decodes an exported .sad file while keeping slot IDs as opaque wire strings whose enum interpretation belongs to the consuming game
func NewSavedAttachFile ¶
func NewSavedAttachFile() *SavedAttachFile
NewSavedAttachFile 创建当前外层文件头,记录版本仍由调用方在受支持的 2000 与 2001 中选择 NewSavedAttachFile creates the current outer header while callers still select a supported record version of 2000 or 2001
type SavedAttachPosRotScale ¶
type SavedAttachPosRotScale struct {
Position Vector3 `json:"position"` // 局部位置 / Local position
Scale Vector3 `json:"scale"` // 局部缩放 / Local scale
Rotation Vector4 `json:"rotation"` // 局部旋转四元数 / Local rotation quaternion
}
SavedAttachPosRotScale 是 Scourt.Utility.UnityUtility.PosRotScale 的二进制形式,依次保存 Vector3 位置、Vector3 缩放和 Quaternion 旋转 SavedAttachPosRotScale is the binary form of Scourt.Utility.UnityUtility.PosRotScale, storing Vector3 position, Vector3 scale, and Quaternion rotation in order
type SharePreset ¶
type SharePreset struct {
}
SharePreset 对应 ExportSharePreset 写出的分享容器 / SharePreset matches the sharing container written by ExportSharePreset
func DecodeSharePreset ¶
func DecodeSharePreset(data []byte) (*SharePreset, error)
DecodeSharePreset 解码 SH_PRES 容器并保留版本、全部图像、未知元数据字段和服务端追加字节 DecodeSharePreset decodes an SH_PRES container while preserving its version, every image, unknown metadata fields, and server-appended bytes
func NewSharePreset ¶
func NewSharePreset() *SharePreset
NewSharePreset 创建使用当前签名和版本且带空 MPN 字典的新分享预设 NewSharePreset creates a new shared preset using the current signature and version with empty MPN maps
type SharePresetExportData ¶
type SharePresetExportData struct {
}
SharePresetExportData 对应 ExportSharePreset.ExportPresetData 中不含文件位置的角色摘要 / SharePresetExportData matches the character summary in ExportSharePreset.ExportPresetData without file positions
type SharePresetThumbnail ¶
type SharePresetThumbnail struct {
}
SharePresetThumbnail 表示分享预设中带原始扩展名的一个图像载荷 / SharePresetThumbnail represents one image payload with its original extension in a shared preset
type SkinThickness ¶
type SkinThickness struct {
Use bool `json:"use"` // 是否启用皮肤厚度修正 / Whether skin-thickness correction is enabled
Groups map[string]*ThicknessGroup `json:"groups"` // 按组名索引的可空厚度修正组 / Nullable thickness correction groups keyed by group name
// contains filtered or unexported fields
}
SkinThickness 对应 Parts.Model.SkinThickness,保存皮肤厚度修正 SkinThickness maps Parts.Model.SkinThickness and stores skin-thickness correction data
func (*SkinThickness) CodecDecodeSelf ¶
func (v *SkinThickness) CodecDecodeSelf(d *codec.Decoder)
CodecDecodeSelf 按共享 indexed-object 规则解码 SkinThickness CodecDecodeSelf decodes SkinThickness using the shared indexed-object rules
func (SkinThickness) CodecEncodeSelf ¶
func (v SkinThickness) CodecEncodeSelf(e *codec.Encoder)
CodecEncodeSelf 按共享 indexed-object 规则编码 SkinThickness CodecEncodeSelf encodes SkinThickness using the shared indexed-object rules
type TextureProp ¶
type TextureProp struct {
Type int32 `json:"type"` // 属性类型枚举值,如 0=_MainTex, 1=_BumpMap / Property type enum, e.g. 0=_MainTex, 1=_BumpMap
FileName *string `json:"fileName"` // 可空纹理文件名 / Nullable texture file name
Ox float32 `json:"ox"` // 纹理偏移 X / Texture offset X
Oy float32 `json:"oy"` // 纹理偏移 Y / Texture offset Y
Sx float32 `json:"sx"` // 纹理缩放 X / Texture scale X
Sy float32 `json:"sy"` // 纹理缩放 Y / Texture scale Y
// contains filtered or unexported fields
}
TextureProp 表示材质的纹理属性,MessagePack indexed array 依次保存类型、文件名、偏移和缩放 TextureProp represents a material texture property whose MessagePack indexed array stores type, filename, offset, and scale in order
func (*TextureProp) CodecDecodeSelf ¶
func (v *TextureProp) CodecDecodeSelf(d *codec.Decoder)
CodecDecodeSelf 按共享 indexed-object 规则解码 TextureProp CodecDecodeSelf decodes TextureProp using the shared indexed-object rules
func (TextureProp) CodecEncodeSelf ¶
func (v TextureProp) CodecEncodeSelf(e *codec.Encoder)
CodecEncodeSelf 按共享 indexed-object 规则编码 TextureProp CodecEncodeSelf encodes TextureProp using the shared indexed-object rules
type ThicknessDefPerAngle ¶
type ThicknessDefPerAngle struct {
AngleDegree int32 `json:"angleDgree"` // 角度,字段名保留游戏拼写 angleDgree / Angle in degrees, preserving the game's angleDgree spelling
VertexIndex int32 `json:"vidx"` // 顶点索引 vidx / Vertex index, vidx
DefaultDistance float32 `json:"defaultDistance"` // 默认厚度距离 / Default thickness distance
// contains filtered or unexported fields
}
ThicknessDefPerAngle 对应 Parts.Model.SkinThickness.Group.Point.DefPerAngle ThicknessDefPerAngle maps Parts.Model.SkinThickness.Group.Point.DefPerAngle
func (*ThicknessDefPerAngle) CodecDecodeSelf ¶
func (v *ThicknessDefPerAngle) CodecDecodeSelf(d *codec.Decoder)
CodecDecodeSelf 按共享 indexed-object 规则解码 ThicknessDefPerAngle CodecDecodeSelf decodes ThicknessDefPerAngle using the shared indexed-object rules
func (ThicknessDefPerAngle) CodecEncodeSelf ¶
func (v ThicknessDefPerAngle) CodecEncodeSelf(e *codec.Encoder)
CodecEncodeSelf 按共享 indexed-object 规则编码 ThicknessDefPerAngle CodecEncodeSelf encodes ThicknessDefPerAngle using the shared indexed-object rules
type ThicknessGroup ¶
type ThicknessGroup struct {
GroupName *string `json:"groupName"` // 可空厚度组名称 / Nullable thickness group name
StartBoneName *string `json:"startBoneName"` // 可空线段起始骨骼名 / Nullable segment start bone name
EndBoneName *string `json:"endBoneName"` // 可空线段结束骨骼名 / Nullable segment end bone name
StepAngleDegree int32 `json:"stepAngleDgree"` // 角度采样步进,字段名保留游戏拼写 stepAngleDgree / Angle sampling step, preserving the game's stepAngleDgree spelling
Points []*ThicknessPoint `json:"points"` // 可空厚度采样点列表 / List of nullable thickness sample points
// contains filtered or unexported fields
}
ThicknessGroup 对应 Parts.Model.SkinThickness.Group ThicknessGroup maps Parts.Model.SkinThickness.Group
func (*ThicknessGroup) CodecDecodeSelf ¶
func (v *ThicknessGroup) CodecDecodeSelf(d *codec.Decoder)
CodecDecodeSelf 按共享 indexed-object 规则解码 ThicknessGroup CodecDecodeSelf decodes ThicknessGroup using the shared indexed-object rules
func (ThicknessGroup) CodecEncodeSelf ¶
func (v ThicknessGroup) CodecEncodeSelf(e *codec.Encoder)
CodecEncodeSelf 按共享 indexed-object 规则编码 ThicknessGroup CodecEncodeSelf encodes ThicknessGroup using the shared indexed-object rules
type ThicknessPoint ¶
type ThicknessPoint struct {
TargetBoneName *string `json:"targetBoneName"` // 可空采样点目标骨骼名 / Nullable target bone name for this sample point
RatioSegmentStartToEnd float32 `json:"ratioSegmentStartToEnd"` // 点位于起止骨骼线段上的比例 / Ratio along the start-to-end bone segment
DistanceParAngle []*ThicknessDefPerAngle `json:"distanceParAngle"` // 可空按角度默认距离对象列表,字段名保留游戏拼写 Par / List of nullable default-distance objects by angle, preserving the game's Par spelling
// contains filtered or unexported fields
}
ThicknessPoint 对应 Parts.Model.SkinThickness.Group.Point ThicknessPoint maps Parts.Model.SkinThickness.Group.Point
func (*ThicknessPoint) CodecDecodeSelf ¶
func (v *ThicknessPoint) CodecDecodeSelf(d *codec.Decoder)
CodecDecodeSelf 按共享 indexed-object 规则解码 ThicknessPoint CodecDecodeSelf decodes ThicknessPoint using the shared indexed-object rules
func (ThicknessPoint) CodecEncodeSelf ¶
func (v ThicknessPoint) CodecEncodeSelf(e *codec.Encoder)
CodecEncodeSelf 按共享 indexed-object 规则编码 ThicknessPoint CodecEncodeSelf encodes ThicknessPoint using the shared indexed-object rules
type TransData ¶
type TransData struct {
Name *string `json:"name"` // 可空骨骼名称 / Nullable bone name
ParentNo int32 `json:"parentNo"` // 父骨骼索引,-1 表示根节点 / Parent bone index, with -1 indicating a root node
IsSCL bool `json:"isSCL"` // 是否为缩放骨骼 / Whether this is a scale bone
Pos Vector3 `json:"pos"` // 本地位置 / Local position
Rot Vector4 `json:"rot"` // 本地旋转四元数 / Local rotation quaternion
Scale Vector3 `json:"scale"` // 本地缩放 / Local scale
// contains filtered or unexported fields
}
TransData 表示一项骨骼变换数据 对应 C# Model.TransData,MessagePack indexed array 依次保存骨骼名称、父索引、缩放骨骼标志及局部变换 TransData represents one bone transform entry It matches C# Model.TransData whose MessagePack indexed array stores the bone name, parent index, scale-bone flag, and local transform in order
func (*TransData) CodecDecodeSelf ¶
CodecDecodeSelf 按共享 indexed-object 规则解码 TransData CodecDecodeSelf decodes TransData using the shared indexed-object rules
func (TransData) CodecEncodeSelf ¶
CodecEncodeSelf 按共享 indexed-object 规则编码 TransData CodecEncodeSelf encodes TransData using the shared indexed-object rules
type TransTexData ¶
type TransTexData struct {
Pos Vector2 `json:"pos"` // 贴图中心位置,通常为目标 RT 归一化坐标 / Texture center position, usually normalized in the target render texture
Scale Vector2 `json:"scale"` // 贴图缩放,负值表示翻转 / Texture scale; negative values indicate flipping
RotDeg float32 `json:"rotDeg"` // 以角度表示的旋转量 / Rotation in degrees
AreaUV Vector4 `json:"areaUV"` // 使用的源贴图 UV 区域 / Source texture UV area
SrcTexPixcel Vector2Int `json:"srcTexPixcel"` // 源贴图像素尺寸,保留游戏字段原拼写 / Source texture pixel size, preserving the game's spelling
DefTrans *TransTexData `json:"defTrans"` // 默认变换,用于 ResetTrans 恢复 / Default transform used by ResetTrans
// contains filtered or unexported fields
}
TransTexData 对应 TexLay.TransTexData,描述合成贴图的平移、缩放和旋转 TransTexData maps TexLay.TransTexData and describes texture translation, scale, and rotation
func NewTransTexData ¶
func NewTransTexData() *TransTexData
NewTransTexData 创建使用游戏字段初始化默认变换的新记录 NewTransTexData creates a new record with the game's field-initializer transform defaults
func (*TransTexData) CodecDecodeSelf ¶
func (v *TransTexData) CodecDecodeSelf(d *codec.Decoder)
CodecDecodeSelf 按共享 indexed-object 规则解码 TransTexData CodecDecodeSelf decodes TransTexData using the shared indexed-object rules
func (TransTexData) CodecEncodeSelf ¶
func (v TransTexData) CodecEncodeSelf(e *codec.Encoder)
CodecEncodeSelf 按共享 indexed-object 规则编码 TransTexData CodecEncodeSelf encodes TransTexData using the shared indexed-object rules
func (*TransTexData) UnmarshalJSON ¶
func (v *TransTexData) UnmarshalJSON(data []byte) error
UnmarshalJSON 解码 TransTexData 的 JSON 表示而不注入构造默认值 UnmarshalJSON decodes the JSON representation of TransTexData without injecting constructor defaults
type TupleStringInt ¶
type TupleStringInt struct {
Item1 *string `json:"item1"` // 可空第一个元组字符串值 / Nullable first tuple string value
Item2 int32 `json:"item2"` // 第二个元组值 / Second tuple value
// contains filtered or unexported fields
}
TupleStringInt 对应 C# Tuple<string,int> 的 MessagePack 数组布局 TupleStringInt maps the MessagePack array layout of C# Tuple<string,int>
func (*TupleStringInt) CodecDecodeSelf ¶
func (v *TupleStringInt) CodecDecodeSelf(d *codec.Decoder)
CodecDecodeSelf 按共享 indexed-object 规则解码 TupleStringInt CodecDecodeSelf decodes TupleStringInt using the shared indexed-object rules
func (TupleStringInt) CodecEncodeSelf ¶
func (v TupleStringInt) CodecEncodeSelf(e *codec.Encoder)
CodecEncodeSelf 按共享 indexed-object 规则编码 TupleStringInt CodecEncodeSelf encodes TupleStringInt using the shared indexed-object rules
type UndressArchiveTarget ¶
type UndressArchiveTarget struct {
Format *string `json:"format,omitempty"` // 数据格式版本,形如 1.2.2,ArchiveTargetFormatter 据此迁移 / Data format version such as 1.2.2, used by ArchiveTargetFormatter to migrate
EditVer *int32 `json:"editVer,omitempty"` // 写出该文件的编辑器版本 / Version of the editor that wrote the file
MeshRelPath *string `json:"meshRelPath,omitempty"` // 网格相对路径,缺少 peelCategory 时用于推断分类 / Mesh-relative path, also used to infer the category when peelCategory is missing
FbxName *string `json:"fbxName,omitempty"` // 目标 FBX 名,setupDataType 为 None 时由内衣资源名回填 / Target FBX name, backfilled from the garment resource name when setupDataType is None
SetupDataType *int32 `json:"setupDataType,omitempty"` // 设置数据种类枚举 eSeupDataType:0 None、1 Body、2 Pants、3 Bra / Setup data kind enum eSeupDataType: 0 None, 1 Body, 2 Pants, 3 Bra
Layers *[]UndressLayer `json:"layers,omitempty"` // 剥法通道列表,游戏载入时补齐到 MyConstants.MAXLayerCount 即 15 条 / Peel channel list, which the game pads to MyConstants.MAXLayerCount, that is 15 entries, while loading
SubMeshRootVertexIndices *[]int32 `json:"subMeshRootVertexIndices,omitempty"` // 各子网格的根顶点索引 / Root vertex index of each sub-mesh
SubMeshRootVertexSubIndices *[]UndressSubMeshSlideSub `json:"subMeshRootVertexSubIndices,omitempty"` // 各子网格根顶点的附加滑动索引 / Additional slide indices for each sub-mesh root vertex
DataGroup *[]UndressGroup `json:"dataGroup,omitempty"` // 顶点分组列表,每组是一圈可拉动的顶点 / Vertex group list where each group is one pullable ring of vertices
TempIndex *int32 `json:"tempIndex,omitempty"` // 编辑器分配新组标签时使用的计数器 / Counter the editor uses when allocating a new group label
PeelCategory *int32 `json:"peelCategory,omitempty"` // 剥离分类枚举 MyEnum.PeelCategory:0 Bra、1 Shorts、2 Other、3 Body、99 None / Peel category enum MyEnum.PeelCategory: 0 Bra, 1 Shorts, 2 Other, 3 Body, 99 None
HPeelLimits *UndressPeelLimits `json:"hPeelLimits,omitempty"` // 横向剥离的限位与逐组阈值 / Horizontal peel limits and per-group thresholds
VPeelExInfo *UndressVPeelExInfo `json:"vPeelExInfo,omitempty"` // 纵向剥离的附加形变参数 / Additional vertical peel deformation parameters
CommonPeelInfo *UndressCommonPeelInfo `json:"commonPeelInfo,omitempty"` // 全部剥法共用的参数 / Parameters shared by every peel mode
}
UndressArchiveTarget 表示 UndressCore.ArchiveTarget 的 Unity JSON 表示,成员顺序与 JsonUtility 的写出顺序一致 UndressArchiveTarget represents the Unity JSON form of UndressCore.ArchiveTarget with members ordered as JsonUtility writes them
func DecodeKCESUndressData ¶
func DecodeKCESUndressData(data []byte) (*UndressArchiveTarget, error)
DecodeKCESUndressData 解码一个完整的 .undressdat 文档 DecodeKCESUndressData decodes one complete .undressdat document
type UndressCommonPeelInfo ¶
type UndressCommonPeelInfo struct {
FixedPullLength *float32 `json:"fixedPullLength,omitempty"` // 固定拉动长度,毫米,游戏侧除以 1000 使用 / Fixed pull length in millimeters, divided by 1000 on the game side
}
UndressCommonPeelInfo 表示 ArchiveTarget.CommonPeelInfo,全部剥法共用的参数 UndressCommonPeelInfo represents ArchiveTarget.CommonPeelInfo, the parameters shared by every peel mode
type UndressDegeneracyIndices ¶
type UndressDegeneracyIndices struct {
Idcs *[]int32 `json:"idcs,omitempty"` // 被移动的顶点索引,空数组表示该项不生效 / Vertex indices to be moved, an empty array disables the item
Idx *int32 `json:"idx,omitempty"` // 目标顶点索引,idcs 中的顶点都移动到它的位置 / Target vertex index that every vertex in idcs is moved onto
}
UndressDegeneracyIndices 表示 VPeelTransPatchCompressor.DegeneracyTargetIndices 运行时会把 idcs 列出的每个顶点都移动到 idx 顶点的位置上,从而缝合该处网格 UndressDegeneracyIndices represents VPeelTransPatchCompressor.DegeneracyTargetIndices At runtime every vertex listed in idcs is moved onto the position of the idx vertex, welding the mesh there
type UndressExFixed ¶
type UndressExFixed struct {
FromIndex *int32 `json:"fromIndex,omitempty"` // 源顶点索引 / Source vertex index
ToIndex *int32 `json:"toIndex,omitempty"` // 目标顶点索引 / Destination vertex index
}
UndressExFixed 表示 OneGroup.ExFixed,一对附加固定顶点 UndressExFixed represents OneGroup.ExFixed, one pair of additional fixed vertices
type UndressGroup ¶
type UndressGroup struct {
Label *string `json:"label,omitempty"` // 组标签,形如 Group_0000L;标签在不同 layer 之间会重复,(layer,label) 才是 .undresspdat 回指本组时使用的键 / Group label such as Group_0000L; labels repeat across layers, and the (layer, label) pair is the key .undresspdat uses to refer back to this group
IsInactive *bool `json:"isInactive,omitempty"` // 是否停用该组 / Whether the group is disabled
IsFloat *bool `json:"isFloat,omitempty"` // 该组是否浮起 / Whether the group floats
IsOverPeel *bool `json:"isOverPeel,omitempty"` // 是否允许超出常规范围继续剥离 / Whether peeling may continue past the normal range
IsFloatGuide *bool `json:"isFloatGuide,omitempty"` // 该组是否作为浮起引导线 / Whether the group itself serves as a float guide line
IsSolid *bool `json:"isSolid,omitempty"` // 该组是否作为实体处理 / Whether the group is treated as solid
IsPaste *bool `json:"isPaste,omitempty"` // 该组是否贴附到引导线 / Whether the group is pasted onto its guide lines
IsToForce *bool `json:"isToForce,omitempty"` // 该组是否强制参与 / Whether the group participates unconditionally
SolidPriority *int32 `json:"solidPriority,omitempty"` // 实体处理的优先级 / Priority used when solid handling applies
FloatGuideLine0 *string `json:"floatGuideLine0,omitempty"` // 浮起引导线组标签之一,空串表示未设置 / One float guide line group label, empty when unset
FloatGuideLine1 *string `json:"floatGuideLine1,omitempty"` // 浮起引导线组标签之二,空串表示未设置 / The other float guide line group label, empty when unset
PasteGuideLine0 *string `json:"pasteGuideLine0,omitempty"` // 贴附引导线组标签之一,空串表示未设置 / One paste guide line group label, empty when unset
PasteGuideLine1 *string `json:"pasteGuideLine1,omitempty"` // 贴附引导线组标签之二,空串表示未设置 / The other paste guide line group label, empty when unset
Weights *[]float32 `json:"weights,omitempty"` // 组内逐顶点权重,样本中通常为空数组 / Per-vertex weights inside the group, usually an empty array in samples
Vertices *[]Vector3 `json:"vertices,omitempty"` // 组内顶点坐标,样本中通常为空数组 / Vertex positions inside the group, usually an empty array in samples
Layer *int32 `json:"layer,omitempty"` // 所属层号:0 到 14 对应 layers 的下标,100 起是 MyEnum.LayerCategory 的子网格层,样本中还出现 15 到 17 这些超出通道上限的编辑层 / Owning layer number: 0 through 14 index layers, 100 and above are the MyEnum.LayerCategory sub-mesh layers, and samples also use 15 through 17, which are above the channel limit
VCategory *int32 `json:"vCategory,omitempty"` // 边缘分类枚举 RetensionCategory:0 无、1 右前、2 右后、3 左前、4 左后、5 腹 / Edge category enum RetensionCategory: 0 none, 1 right front, 2 right back, 3 left front, 4 left back, 5 belly
FloatMode *uint32 `json:"floatMode,omitempty"` // 浮起模式,保存 FloatMode 的无符号取值:0 NONE、1 前右、2 前左、3 后右、4 后左 / Float mode holding the unsigned FloatMode value: 0 NONE, 1 front right, 2 front left, 3 back right, 4 back left
ExFixeds *[]UndressExFixed `json:"exFixeds,omitempty"` // 附加固定顶点对,样本中通常为空数组 / Additional fixed vertex pairs, usually an empty array in samples
Indices *[]int32 `json:"indices,omitempty"` // 组内网格顶点索引,按 autoSortMode 排成一条拉动轨道 / Mesh vertex indices of the group, ordered into a pull rail by autoSortMode
}
UndressGroup 表示 UndressCore.OneGroup,即一圈可拉动顶点及其行为标记 UndressGroup represents UndressCore.OneGroup, one pullable ring of vertices together with its behavior flags
type UndressGroupKey ¶
type UndressGroupKey struct {
Lyr *int32 `json:"lyr,omitempty"` // 目标组的 layer,需与 dataGroup 中的 layer 对应 / Layer of the target group, which must match the layer in dataGroup
Lbl *string `json:"lbl,omitempty"` // 目标组的 label,需与 dataGroup 中的 label 对应 / Label of the target group, which must match the label in dataGroup
}
UndressGroupKey 表示 UndressCore.OneGroupKey,按剥法通道与组标签定位 .undressdat 中的一个组 UndressGroupKey represents UndressCore.OneGroupKey, locating one group in the .undressdat by peel channel and group label
type UndressGroupLooker ¶
type UndressGroupLooker struct {
Targets *[]UndressGroupKey `json:"Targets,omitempty"` // 组键数组,下标即后两张表引用组时使用的 index / Group key array whose subscript is the index the two following tables use to refer to a group
}
UndressGroupLooker 表示 UndressCore.OneGroupLooker,只有烘焙出的 Targets 会写入文件 UndressGroupLooker represents UndressCore.OneGroupLooker, of which only the baked Targets member is written to the file
type UndressGroupRef ¶
type UndressGroupRef struct {
Index *int32 `json:"index,omitempty"` // OneGroupLooker.Targets 的下标 / Subscript into OneGroupLooker.Targets
}
UndressGroupRef 表示 UndressCore.OneGroupValue,按序号引用 OneGroupLooker.Targets 中的一个组 UndressGroupRef represents UndressCore.OneGroupValue, referring by subscript to one group in OneGroupLooker.Targets
type UndressHPeelSelectLimit ¶
type UndressHPeelSelectLimit struct {
Label *string `json:"label,omitempty"` // 目标组标签,空串表示该项无效 / Target group label, empty when the item is invalid
Value *int32 `json:"value,omitempty"` // 0 表示该组不参与横向剥离 / A value of 0 excludes the group from horizontal peeling
}
UndressHPeelSelectLimit 表示 ArchiveTarget.HPeelSelectLimit,一条逐组横向剥离开关 UndressHPeelSelectLimit represents ArchiveTarget.HPeelSelectLimit, one per-group horizontal peel switch
type UndressLayer ¶
type UndressLayer struct {
Label *string `json:"label,omitempty"` // 通道显示名,可为空 / Channel display name, may be empty
FixMode *int32 `json:"fixMode,omitempty"` // 固定模式枚举 FixMode:0 Plain、1 Pre、2 Fix / Fix mode enum FixMode: 0 Plain, 1 Pre, 2 Fix
AutoSortMode *int32 `json:"autoSortMode,omitempty"` // 组内顶点排序方向枚举 AutoSortMode:0 None、1 XAsc、2 XDesc、3 YAsc、4 YDesc / In-group vertex sort direction enum AutoSortMode: 0 None, 1 XAsc, 2 XDesc, 3 YAsc, 4 YDesc
UseMode *int32 `json:"useMode,omitempty"` // 剥法枚举 UseMode:0 None、10 纵、14 纵逆、20/21 前横、30/31 股间、40/41 后横、50 已废弃、90 脱衣引导 / Peel mode enum UseMode: 0 None, 10 vertical, 14 vertical reverse, 20/21 front sideways, 30/31 crotch, 40/41 back sideways, 50 obsolete, 90 undress guide
}
UndressLayer 表示 UndressCore.OneLayer,即一条剥法通道 UndressLayer represents UndressCore.OneLayer, one peel channel
type UndressMeshReduction ¶
type UndressMeshReduction struct {
P *UndressDegeneracyIndices `json:"p,omitempty"` // 前段退化目标,对应 OneGroup.DegeneracyTargetIndicesPre / Preceding degeneracy target matching OneGroup.DegeneracyTargetIndicesPre
S *UndressDegeneracyIndices `json:"s,omitempty"` // 后段退化目标,对应 OneGroup.DegeneracyTargetIndicesSuf / Succeeding degeneracy target matching OneGroup.DegeneracyTargetIndicesSuf
}
UndressMeshReduction 表示 UndressCore.MeshReductionDto,一个组在剥离前后各自的顶点退化目标 UndressMeshReduction represents UndressCore.MeshReductionDto, the vertex degeneracy targets of one group before and after peeling
type UndressMeshReductionEntry ¶
type UndressMeshReductionEntry struct {
V *UndressGroupRef `json:"v,omitempty"` // 目标组引用 / Reference to the target group
Dat *UndressMeshReduction `json:"dat,omitempty"` // 该组的顶点退化数据 / Vertex degeneracy data of the group
}
UndressMeshReductionEntry 表示 TempMeshReduction.Pac,一个组及其顶点退化数据 UndressMeshReductionEntry represents TempMeshReduction.Pac, one group together with its vertex degeneracy data
type UndressMeshReductionTable ¶
type UndressMeshReductionTable struct {
D *[]UndressMeshReductionEntry `json:"d,omitempty"` // 逐组顶点退化条目,键名的单字母缩写沿用线格式 / Per-group vertex degeneracy entries, with the single-letter key spelled as stored
}
UndressMeshReductionTable 表示 PrecomputeTarget.TempMeshReduction UndressMeshReductionTable represents PrecomputeTarget.TempMeshReduction
type UndressPeelLimitRange ¶
type UndressPeelLimitRange struct {
Valid *bool `json:"valid,omitempty"` // 是否启用该手动区间 / Whether the manual range is enabled
Begin *float32 `json:"begin,omitempty"` // 区间起点 / Range start
End *float32 `json:"end,omitempty"` // 区间终点 / Range end
}
UndressPeelLimitRange 表示 PeelLimits.LimitPac,一段手动限位区间 UndressPeelLimitRange represents PeelLimits.LimitPac, one manual limit range
type UndressPeelLimits ¶
type UndressPeelLimits struct {
FormatVersion *int32 `json:"format_version,omitempty"` // 限位结构自身的版本号,键名的下划线拼写沿用线格式 / Version of the limit structure itself, with the underscored key spelled as stored
Heads *[]float32 `json:"heads,omitempty"` // 逐档剥离进度下限,游戏保证 heads 不大于同档 tails / Per-step peel progress lower bound, which the game keeps no greater than the tails value of the same step
Thrs *[]UndressPeelThreshold `json:"thrs,omitempty"` // 逐组剥离阈值 / Per-group peel threshold
ManualLimitPac *UndressPeelLimitRange `json:"manualLimitPac,omitempty"` // 手动限位区间,valid 为真时覆盖自动限位 / Manual limit range that overrides the automatic limits when valid is true
Tails *[]float32 `json:"tails,omitempty"` // 逐档剥离进度上限 / Per-step peel progress upper bound
HPeelSelectLimits *[]UndressHPeelSelectLimit `json:"hPeelSelectLimits,omitempty"` // 逐组是否参与横向剥离 / Whether each group participates in horizontal peeling
}
UndressPeelLimits 表示 ArchiveTarget.PeelLimits,横向剥离的限位集合 format_version 有独立于顶层 format 的迁移链(PeelLimits.CheckVer,0 到 1 到 2),且 1 到 2 会就地改写 thrs 的数值 UndressPeelLimits represents ArchiveTarget.PeelLimits, the horizontal peel limit set format_version has its own migration chain independent of the top-level format (PeelLimits.CheckVer, 0 to 1 to 2), and 1 to 2 rewrites the thrs values in place
type UndressPeelThreshold ¶
type UndressPeelThreshold struct {
Label *string `json:"label,omitempty"` // 目标组标签,需与 dataGroup 中的 label 对应 / Target group label, which must match a label in dataGroup
Thr *float32 `json:"thr,omitempty"` // 该组的剥离阈值 / Peel threshold of the group
}
UndressPeelThreshold 表示 PeelLimits.ThrSet,一条逐组剥离阈值 UndressPeelThreshold represents PeelLimits.ThrSet, one per-group peel threshold
type UndressPrecomputeTarget ¶
type UndressPrecomputeTarget struct {
EditVer *int32 `json:"editVer,omitempty"` // 写出该文件的编辑器版本 / Version of the editor that wrote the file
OneGroupLooker *UndressGroupLooker `json:"OneGroupLooker,omitempty"` // 组序号表,键名的大写拼写沿用线格式 / Group index table, with the capitalized key spelled as stored
WidthMeasurerValidPixelThreshold *float32 `json:"WidthMeasurerValidPixelThreshold,omitempty"` // 宽度测量的有效像素阈值,键名的大写拼写沿用线格式 / Valid-pixel threshold of the width measurer, with the capitalized key spelled as stored
MeshReduction *UndressMeshReductionTable `json:"meshReduction,omitempty"` // 逐组顶点退化表 / Per-group vertex degeneracy table
WidthMeasurer *UndressWidthMeasurerTable `json:"widthMeasurer,omitempty"` // 逐组宽度测量表 / Per-group width measurement table
}
UndressPrecomputeTarget 表示 UndressCore.PrecomputeTarget 的 Unity JSON 表示,成员顺序与 JsonUtility 的写出顺序一致 UndressPrecomputeTarget represents the Unity JSON form of UndressCore.PrecomputeTarget with members ordered as JsonUtility writes them
func DecodeKCESUndressPartsData ¶
func DecodeKCESUndressPartsData(data []byte) (*UndressPrecomputeTarget, error)
DecodeKCESUndressPartsData 解码一个完整的 .undresspdat 文档 DecodeKCESUndressPartsData decodes one complete .undresspdat document
type UndressSubMeshSlideSub ¶
type UndressSubMeshSlideSub struct {
Sub1 *int32 `json:"sub1,omitempty"` // 附加滑动顶点索引 1,负值表示未设置 / Additional slide vertex index 1, negative when unset
Sub2 *int32 `json:"sub2,omitempty"` // 附加滑动顶点索引 2,负值表示未设置 / Additional slide vertex index 2, negative when unset
Sub3 *int32 `json:"sub3,omitempty"` // 附加滑动顶点索引 3,负值表示未设置 / Additional slide vertex index 3, negative when unset
}
UndressSubMeshSlideSub 表示 ArchiveTarget.SubMeshSlideSub,三个分量全为负表示该项无效 UndressSubMeshSlideSub represents ArchiveTarget.SubMeshSlideSub, where all three negative components mean the item is invalid
type UndressVPeelExInfo ¶
type UndressVPeelExInfo struct {
FrontAdjustLength *float32 `json:"frontAdjustLength,omitempty"` // 正面调整长度,Unity 单位 / Front adjustment length in Unity units
BackAdjustLength *float32 `json:"backAdjustLength,omitempty"` // 背面调整长度,Unity 单位 / Back adjustment length in Unity units
RetensionWidthPar *float32 `json:"retensionWidthPar,omitempty"` // 边缘勒入宽度百分比,游戏侧除以 100 使用 / Edge bite-in width percentage, divided by 100 on the game side
RetensionDepthFrontPar *float32 `json:"retensionDepthFrontPar,omitempty"` // 正面边缘勒入深度百分比,游戏侧除以 100 使用 / Front edge bite-in depth percentage, divided by 100 on the game side
RetensionDepthBackPar *float32 `json:"retensionDepthBackPar,omitempty"` // 背面边缘勒入深度百分比,游戏侧除以 100 使用 / Back edge bite-in depth percentage, divided by 100 on the game side
VPeelVerticalFoldingWidthFront *float32 `json:"vPeelVerticalFoldingWidthFront,omitempty"` // 正面纵向折叠宽度,毫米 / Front vertical folding width in millimeters
VPeelVerticalFoldingWidthBack *float32 `json:"vPeelVerticalFoldingWidthBack,omitempty"` // 背面纵向折叠宽度,毫米 / Back vertical folding width in millimeters
VPeelFoldingWidth *float32 `json:"vPeelFoldingWidth,omitempty"` // 折叠宽度,毫米 / Folding width in millimeters
VPeelFoldingCorrectWidth *float32 `json:"vPeelFoldingCorrectWidth,omitempty"` // 侧面折叠宽度的修正量,毫米,与 vPeelFoldingWidth 相加后使用 / Side folding width correction in millimeters, added to vPeelFoldingWidth before use
}
UndressVPeelExInfo 表示 ArchiveTarget.VPeelExInfo,纵向剥离的附加形变参数 单位由游戏侧的属性访问器确定:retension 三项是百分比,folding 三项是毫米,两项 adjustLength 直接是 Unity 单位 UndressVPeelExInfo represents ArchiveTarget.VPeelExInfo, the additional vertical peel deformation parameters Units follow the game-side property accessors: the three retension members are percentages, the three folding members are millimeters, and the two adjustLength members are already in Unity units
type UndressWidthMeasurer ¶
type UndressWidthMeasurer struct {
Hvp *bool `json:"hvp,omitempty"` // 该组是否有有效的宽度测量结果,对应 OneGroup.hasValidWidthMeasurer / Whether the group has a valid width measurement, matching OneGroup.hasValidWidthMeasurer
Info *UndressWidthMeasurerRail `json:"info,omitempty"` // 正向剥离轨道的测量结果,对应 OneGroup.validPeelRailInfo / Measurement of the forward peel rail matching OneGroup.validPeelRailInfo
InfoR *UndressWidthMeasurerRail `json:"infoR,omitempty"` // 反向剥离轨道的测量结果,对应 OneGroup.validPeelRailInfoRev / Measurement of the reverse peel rail matching OneGroup.validPeelRailInfoRev
}
UndressWidthMeasurer 表示 UndressCore.WidthMeasurerDto UndressWidthMeasurer represents UndressCore.WidthMeasurerDto
type UndressWidthMeasurerEntry ¶
type UndressWidthMeasurerEntry struct {
V *UndressGroupRef `json:"v,omitempty"` // 目标组引用 / Reference to the target group
Dat *UndressWidthMeasurer `json:"dat,omitempty"` // 该组的宽度测量数据 / Width measurement data of the group
}
UndressWidthMeasurerEntry 表示 TempWidthMeasurer.Pac,一个组及其宽度测量数据 UndressWidthMeasurerEntry represents TempWidthMeasurer.Pac, one group together with its width measurement data
type UndressWidthMeasurerRail ¶
type UndressWidthMeasurerRail struct {
VIdx *int32 `json:"vIdx,omitempty"` // 轨道上的顶点序号 / Vertex ordinal along the rail
VPer *float32 `json:"vPer,omitempty"` // 该顶点处的归一化进度 / Normalized progress at that vertex
MIdx *int32 `json:"mIdx,omitempty"` // 对应的网格顶点索引 / Corresponding mesh vertex index
}
UndressWidthMeasurerRail 表示 WidthMeasurerDto.ReductionInfo,一条剥离轨道的测量结果 UndressWidthMeasurerRail represents WidthMeasurerDto.ReductionInfo, the measurement of one peel rail
type UndressWidthMeasurerTable ¶
type UndressWidthMeasurerTable struct {
D *[]UndressWidthMeasurerEntry `json:"d,omitempty"` // 逐组宽度测量条目,键名的单字母缩写沿用线格式 / Per-group width measurement entries, with the single-letter key spelled as stored
}
UndressWidthMeasurerTable 表示 PrecomputeTarget.TempWidthMeasurer UndressWidthMeasurerTable represents PrecomputeTarget.TempWidthMeasurer
type UnityAnimationCurve ¶
type UnityAnimationCurve struct {
SerializedVersion *string `json:"serializedVersion,omitempty"` // Unity 序列化版本,按字符串写出 / Unity serialization version written as a string
Curve *[]UnityKeyframe `json:"m_Curve,omitempty"` // 关键帧数组 / Array of keyframes
PreInfinity *int32 `json:"m_PreInfinity,omitempty"` // 曲线起点外推模式 / Pre-extrapolation mode of the curve
PostInfinity *int32 `json:"m_PostInfinity,omitempty"` // 曲线终点外推模式 / Post-extrapolation mode of the curve
RotationOrder *int32 `json:"m_RotationOrder,omitempty"` // 旋转顺序枚举,允许值未核实 / Rotation-order enum with unverified allowed values
}
UnityAnimationCurve 表示 Unity JsonUtility 写出的 UnityEngine.AnimationCurve / UnityAnimationCurve is the UnityEngine.AnimationCurve form emitted by Unity JsonUtility
type UnityInstanceReference ¶
type UnityInstanceReference struct {
InstanceID *int32 `json:"instanceID,omitempty"` // Unity 运行时实例 ID,跨会话没有稳定含义 / Unity runtime instance ID with no stable meaning across sessions
}
UnityInstanceReference 表示 Unity JsonUtility 写出的 UnityEngine.Object 引用,instanceID 为 0 表示空引用 / UnityInstanceReference is the UnityEngine.Object reference emitted by Unity JsonUtility, where instanceID 0 means a null reference
type UnityKeyframe ¶
type UnityKeyframe struct {
SerializedVersion *string `json:"serializedVersion,omitempty"` // Unity 序列化版本,按字符串写出 / Unity serialization version written as a string
Time *float32 `json:"time,omitempty"` // 关键帧时间 / Keyframe time
Value *float32 `json:"value,omitempty"` // 关键帧值 / Keyframe value
InSlope *float32 `json:"inSlope,omitempty"` // 入斜率 / Incoming slope
OutSlope *float32 `json:"outSlope,omitempty"` // 出斜率 / Outgoing slope
TangentMode *int32 `json:"tangentMode,omitempty"` // 切线模式枚举,允许值未核实 / Tangent-mode enum with unverified allowed values
WeightedMode *int32 `json:"weightedMode,omitempty"` // 权重模式枚举,允许值未核实 / Weighted-mode enum with unverified allowed values
InWeight *float32 `json:"inWeight,omitempty"` // 入权重 / Incoming weight
OutWeight *float32 `json:"outWeight,omitempty"` // 出权重 / Outgoing weight
}
UnityKeyframe 表示 Unity JsonUtility 写出的 UnityEngine.Keyframe / UnityKeyframe is the UnityEngine.Keyframe form emitted by Unity JsonUtility
type Vector2 ¶
type Vector2 struct {
X float32 `json:"x"` // X 轴分量 / X-axis component
Y float32 `json:"y"` // Y 轴分量 / Y-axis component
// contains filtered or unexported fields
}
Vector2 表示 UnityEngine.Vector2 的 MessagePack 数组布局 Vector2 represents UnityEngine.Vector2 in MessagePack array layout
func (*Vector2) CodecDecodeSelf ¶
CodecDecodeSelf 按共享 indexed-object 规则解码 Vector2 CodecDecodeSelf decodes Vector2 using the shared indexed-object rules
func (Vector2) CodecEncodeSelf ¶
CodecEncodeSelf 按共享 indexed-object 规则编码 Vector2 CodecEncodeSelf encodes Vector2 using the shared indexed-object rules
type Vector2Int ¶
type Vector2Int struct {
X int32 `json:"x"` // X 轴整数分量 / Integer X-axis component
Y int32 `json:"y"` // Y 轴整数分量 / Integer Y-axis component
// contains filtered or unexported fields
}
Vector2Int 表示 UnityEngine.Vector2Int 的 MessagePack 数组布局 Vector2Int represents UnityEngine.Vector2Int in MessagePack array layout
func (*Vector2Int) CodecDecodeSelf ¶
func (v *Vector2Int) CodecDecodeSelf(d *codec.Decoder)
CodecDecodeSelf 按共享 indexed-object 规则解码 Vector2Int CodecDecodeSelf decodes Vector2Int using the shared indexed-object rules
func (Vector2Int) CodecEncodeSelf ¶
func (v Vector2Int) CodecEncodeSelf(e *codec.Encoder)
CodecEncodeSelf 按共享 indexed-object 规则编码 Vector2Int CodecEncodeSelf encodes Vector2Int using the shared indexed-object rules
type Vector3 ¶
type Vector3 struct {
X float32 `json:"x"` // X 轴分量 / X-axis component
Y float32 `json:"y"` // Y 轴分量 / Y-axis component
Z float32 `json:"z"` // Z 轴分量 / Z-axis component
// contains filtered or unexported fields
}
Vector3 表示 UnityEngine.Vector3 的 MessagePack 数组布局 Vector3 represents UnityEngine.Vector3 in MessagePack array layout
func (*Vector3) CodecDecodeSelf ¶
CodecDecodeSelf 按共享 indexed-object 规则解码 Vector3 CodecDecodeSelf decodes Vector3 using the shared indexed-object rules
func (Vector3) CodecEncodeSelf ¶
CodecEncodeSelf 按共享 indexed-object 规则编码 Vector3 CodecEncodeSelf encodes Vector3 using the shared indexed-object rules
type Vector4 ¶
type Vector4 struct {
X float32 `json:"x"` // X 轴分量或四元数 X / X-axis component or quaternion X
Y float32 `json:"y"` // Y 轴分量或四元数 Y / Y-axis component or quaternion Y
Z float32 `json:"z"` // Z 轴分量或四元数 Z / Z-axis component or quaternion Z
W float32 `json:"w"` // W 分量或四元数 W / W component or quaternion W
// contains filtered or unexported fields
}
Vector4 表示 UnityEngine.Vector4 或 Quaternion 的 MessagePack 数组布局 Vector4 represents UnityEngine.Vector4 or Quaternion in MessagePack array layout
func (*Vector4) CodecDecodeSelf ¶
CodecDecodeSelf 按共享 indexed-object 规则解码 Vector4 CodecDecodeSelf decodes Vector4 using the shared indexed-object rules
func (Vector4) CodecEncodeSelf ¶
CodecEncodeSelf 按共享 indexed-object 规则编码 Vector4 CodecEncodeSelf encodes Vector4 using the shared indexed-object rules
type VectorProp ¶
type VectorProp struct {
Type int32 `json:"type"` // 属性类型枚举值 / Property type enum value
X float32 `json:"x"` // 向量 X 分量 / Vector X component
Y float32 `json:"y"` // 向量 Y 分量 / Vector Y component
Z float32 `json:"z"` // 向量 Z 分量 / Vector Z component
W float32 `json:"w"` // 向量 W 分量 / Vector W component
// contains filtered or unexported fields
}
VectorProp 表示材质的向量属性,MessagePack indexed array 依次保存类型与 XYZW 分量 VectorProp represents a material vector property whose MessagePack indexed array stores the type and XYZW components in order
func (*VectorProp) CodecDecodeSelf ¶
func (v *VectorProp) CodecDecodeSelf(d *codec.Decoder)
CodecDecodeSelf 按共享 indexed-object 规则解码 VectorProp CodecDecodeSelf decodes VectorProp using the shared indexed-object rules
func (VectorProp) CodecEncodeSelf ¶
func (v VectorProp) CodecEncodeSelf(e *codec.Encoder)
CodecEncodeSelf 按共享 indexed-object 规则编码 VectorProp CodecEncodeSelf encodes VectorProp using the shared indexed-object rules
Source Files
¶
- brd.go
- cloth_params.go
- collider_payload.go
- count_capacity.go
- db2conf.go
- dbcol.go
- dbconf.go
- dsb2conf.go
- dsbconf.go
- dsl2conf.go
- dslcol.go
- dslconf.go
- enm.go
- hairmake_save.go
- helpers.go
- hitcheck.go
- ikcol.go
- ikcol_bytes.go
- json_string_payload.go
- json_text.go
- kces2_grad.go
- kces2_item_favourite.go
- kcmat.go
- kcmenu.go
- kcmesh.go
- kcmmeta.go
- kcmodel.go
- kctex.go
- limbcol.go
- lookup_hash.go
- magica_cloth_serialize_data.go
- maid_collider_bytes.go
- materialassets.go
- menuassets.go
- model.go
- nei.go
- nson.go
- parts_types.go
- paths_dat.go
- payload.go
- perset.go
- pmatassets.go
- preset.go
- preset_edit_customize.go
- preset_expanded.go
- preset_inner.go
- preset_inner_prop.go
- presetcolor.go
- sad.go
- shpreset.go
- system_dat.go
- system_dat_color_preset.go
- system_dat_editdata.go
- system_dat_grad.go
- system_dat_moveable.go
- system_dat_preset_orderlist.go
- undressdat.go
- undresspdat.go
- unity_json_document.go
- vd.go