import { nameToKey , TextMapEN } from "../../TextMapUtil" ; import { dumpFile } from "../../Util" ; import { CharacterGrowCurveKey } from "./characterExpCurve" ; type AvatarExcelConfigData = { "UseType" : string ; "BodyType" : string ; "ScriptDataPathHashSuffix" : number ; "ScriptDataPathHashPre" : number ; "IconName" : string ; "SideIconName" : string ; "QualityType" : string ; "ChargeEfficiency" : number ; "CombatConfigHashSuffix" : number ; "CombatConfigHashPre" : number ; "InitialWeapon" : number ; "WeaponType" : string ; "ManekinPathHashSuffix" : number ; "ManekinPathHashPre" : number ; "ImageName" : string ; "GachaCardNameHashSuffix" : number ; "GachaCardNameHashPre" : number ; "GachaImageNameHashSuffix" : number ; "GachaImageNameHashPre" : number ; "CoopPicNameHashSuffix" : number ; "CoopPicNameHashPre" : 116 ; "CutsceneShow" : string ; "SkillDepotId" : number ; "StaminaRecoverSpeed" : number ; "CandSkillDepotIds" : any [ ] ; "ManekinJsonConfigHashSuffix" : number ; "ManekinJsonConfigHashPre" : number ; "ManekinMotionConfig" : number ; "DescTextMapHash" : number ; "AvatarIdentityType" : string ; "AvatarPromoteId" : number ; "AvatarPromoteRewardLevelList" : number [ ] ; "AvatarPromoteRewardIdList" : number [ ] ; "FeatureTagGroupID" : number ; "InfoDescTextMapHash" : number ; "HpBase" : number ; "AttackBase" : number ; "DefenseBase" : number ; "Critical" : number ; "CriticalHurt" : number ; "PropGrowCurves" : [ { "Type" : "FIGHT_PROP_BASE_HP" ; "GrowCurve" : CharacterGrowCurveKey ; } , { "Type" : "FIGHT_PROP_BASE_ATTACK" ; "GrowCurve" : CharacterGrowCurveKey ; } , { "Type" : "FIGHT_PROP_BASE_DEFENSE" ; "GrowCurve" : CharacterGrowCurveKey ; } ] ; "PrefabPathRagdollHashSuffix" : number ; "PrefabPathRagdollHashPre" : number ; "Id" : number ; "NameTextMapHash" : number ; "PrefabPathHashSuffix" : number ; "PrefabPathHashPre" : number ; "PrefabPathRemoteHashSuffix" : number ; "PrefabPathRemoteHashPre" : number ; "ControllerPathHashSuffix" : number ; "ControllerPathHashPre" : number ; "ControllerPathRemoteHashSuffix" : number ; "ControllerPathRemoteHashPre" : number ; "LODPatternName" : string ; } ; const avatarExcelConfigDataSrc = require ( '../../GenshinData/ExcelBinOutput/AvatarExcelConfigData.json' ) as AvatarExcelConfigData [ ] ; const avatarExcelConfigData = Object . fromEntries ( avatarExcelConfigDataSrc . map ( data => [ data . Id , data ] ) ) as { [ charId ] : AvatarExcelConfigData ; } ; dumpFile ( `${ __dirname }/AvatarExcelConfigData_idmap_gen.json` , Object . fromEntries ( avatarExcelConfigDataSrc . map ( data => [ data . Id , nameToKey ( TextMapEN [ data . NameTextMapHash ] ) ] ) ) ) ; export default avatarExcelConfigData ;