diff --git a/Core/Models/Eft/Common/Tables/BotBase.cs b/Core/Models/Eft/Common/Tables/BotBase.cs index efcff112..19d3e417 100644 --- a/Core/Models/Eft/Common/Tables/BotBase.cs +++ b/Core/Models/Eft/Common/Tables/BotBase.cs @@ -22,9 +22,9 @@ public class BotBase [JsonPropertyName("Customization")] public Customization Customization { get; set; } [JsonPropertyName("Health")] - public Health Health { get; set; } + public BotBaseHealth Health { get; set; } [JsonPropertyName("Inventory")] - public Inventory Inventory { get; set; } + public BotBaseInventory Inventory { get; set; } [JsonPropertyName("Skills")] public Skills Skills { get; set; } [JsonPropertyName("Stats")] @@ -180,7 +180,7 @@ public class Customization public string Hands { get; set; } } -public class Health +public class BotBaseHealth { public CurrentMax Hydration { get; set; } public CurrentMax Energy { get; set; } @@ -220,7 +220,7 @@ public class CurrentMax public int Maximum { get; set; } } -public class Inventory { +public class BotBaseInventory { [JsonPropertyName("items")] public List Items { get; set; } [JsonPropertyName("equipment")] diff --git a/Core/Models/Eft/Common/Tables/BotType.cs b/Core/Models/Eft/Common/Tables/BotType.cs index e9930fda..c836b4a0 100644 --- a/Core/Models/Eft/Common/Tables/BotType.cs +++ b/Core/Models/Eft/Common/Tables/BotType.cs @@ -1,6 +1,372 @@ -namespace Core.Models.Eft.Common.Tables; +using System.Text.Json.Serialization; +using Core.Models.Common; + +namespace Core.Models.Eft.Common.Tables; public class BotType { - + [JsonPropertyName("appearance")] + public Appearance BotAppearance { get; set; } + + [JsonPropertyName("chances")] + public Chances BotChances { get; set; } + + [JsonPropertyName("difficulty")] + public Difficulties BotDifficulty { get; set; } + + [JsonPropertyName("experience")] + public Experience BotExperience { get; set; } + + [JsonPropertyName("firstName")] + public List FirstNames { get; set; } + + [JsonPropertyName("generation")] + public Generation BotGeneration { get; set; } + + [JsonPropertyName("health")] + public BotTypeHealth BotHealth { get; set; } + + [JsonPropertyName("inventory")] + public BotTypeInventory BotInventory { get; set; } + + [JsonPropertyName("lastName")] + public List LastNames { get; set; } + + [JsonPropertyName("skills")] + public Skills BotSkills { get; set; } +} + +public class Appearance +{ + [JsonPropertyName("body")] + public Dictionary Body { get; set; } + + [JsonPropertyName("feet")] + public Dictionary Feet { get; set; } + + [JsonPropertyName("hands")] + public Dictionary Hands { get; set; } + + [JsonPropertyName("head")] + public Dictionary Head { get; set; } + + [JsonPropertyName("voice")] + public Dictionary Voice { get; set; } +} + +public class Chances +{ + [JsonPropertyName("equipment")] + public EquipmentChances EquipmentChances { get; set; } + + [JsonPropertyName("weaponMods")] + public ModsChances WeaponModsChances { get; set; } + + [JsonPropertyName("equipmentMods")] + public ModsChances EquipmentModsChances { get; set; } +} + +public class EquipmentChances +{ + [JsonPropertyName("ArmBand")] + public int ArmBand { get; set; } + + [JsonPropertyName("ArmorVest")] + public int ArmorVest { get; set; } + + [JsonPropertyName("Backpack")] + public int Backpack { get; set; } + + [JsonPropertyName("Earpiece")] + public int Earpiece { get; set; } + + [JsonPropertyName("Eyewear")] + public int Eyewear { get; set; } + + [JsonPropertyName("FaceCover")] + public int FaceCover { get; set; } + + [JsonPropertyName("FirstPrimaryWeapon")] + public int FirstPrimaryWeapon { get; set; } + + [JsonPropertyName("Headwear")] + public int Headwear { get; set; } + + [JsonPropertyName("Holster")] + public int Holster { get; set; } + + [JsonPropertyName("Pockets")] + public int Pockets { get; set; } + + [JsonPropertyName("Scabbard")] + public int Scabbard { get; set; } + + [JsonPropertyName("SecondPrimaryWeapon")] + public int SecondPrimaryWeapon { get; set; } + + [JsonPropertyName("SecuredContainer")] + public int SecuredContainer { get; set; } + + [JsonPropertyName("TacticalVest")] + public int TacticalVest { get; set; } +} + +public class ModsChances +{ + [JsonPropertyName("mod_charge")] + public double ModCharge { get; set; } + + [JsonPropertyName("mod_equipment")] + public double ModEquipment { get; set; } + + [JsonPropertyName("mod_equipment_000")] + public double ModEquipment000 { get; set; } + + [JsonPropertyName("mod_equipment_001")] + public double ModEquipment001 { get; set; } + + [JsonPropertyName("mod_equipment_002")] + public double ModEquipment002 { get; set; } + + [JsonPropertyName("mod_flashlight")] + public double ModFlashlight { get; set; } + + [JsonPropertyName("mod_foregrip")] + public double ModForegrip { get; set; } + + [JsonPropertyName("mod_launcher")] + public double ModLauncher { get; set; } + + [JsonPropertyName("mod_magazine")] + public double ModMagazine { get; set; } + + [JsonPropertyName("mod_mount")] + public double ModMount { get; set; } + + [JsonPropertyName("mod_mount_000")] + public double ModMount000 { get; set; } + + [JsonPropertyName("mod_mount_001")] + public double ModMount001 { get; set; } + + [JsonPropertyName("mod_muzzle")] + public double ModMuzzle { get; set; } + + [JsonPropertyName("mod_nvg")] + public double ModNvg { get; set; } + + [JsonPropertyName("mod_pistol_grip")] + public double ModPistolGrip { get; set; } + + [JsonPropertyName("mod_reciever")] + public double ModReceiver { get; set; } + + [JsonPropertyName("mod_scope")] + public double ModScope { get; set; } + + [JsonPropertyName("mod_scope_000")] + public double ModScope000 { get; set; } + + [JsonPropertyName("mod_scope_001")] + public double ModScope001 { get; set; } + + [JsonPropertyName("mod_scope_002")] + public double ModScope002 { get; set; } + + [JsonPropertyName("mod_scope_003")] + public double ModScope003 { get; set; } + + [JsonPropertyName("mod_sight_front")] + public double ModSightFront { get; set; } + + [JsonPropertyName("mod_sight_rear")] + public double ModSightRear { get; set; } + + [JsonPropertyName("mod_stock")] + public double ModStock { get; set; } + + [JsonPropertyName("mod_stock_000")] + public double ModStock000 { get; set; } + + [JsonPropertyName("mod_stock_akms")] + public double ModStockAkms { get; set; } + + [JsonPropertyName("mod_tactical")] + public double ModTactical { get; set; } + + [JsonPropertyName("mod_tactical_000")] + public double ModTactical000 { get; set; } + + [JsonPropertyName("mod_tactical_001")] + public double ModTactical001 { get; set; } + + [JsonPropertyName("mod_tactical_002")] + public double ModTactical002 { get; set; } + + [JsonPropertyName("mod_tactical_003")] + public double ModTactical003 { get; set; } + + [JsonPropertyName("mod_handguard")] + public double ModHandguard { get; set; } +} + +public class Difficulties +{ + public DifficultyCategories Easy { get; set; } + public DifficultyCategories Normal { get; set; } + public DifficultyCategories Hard { get; set; } + public DifficultyCategories Impossible { get; set; } +} + +public class DifficultyCategories +{ + public Dictionary Aiming { get; set; } // TODO: string | number | boolean + public Dictionary Boss { get; set; } // TODO: string | number | boolean + public Dictionary Change { get; set; } // TODO: string | number | boolean + public Dictionary Core { get; set; } // TODO: string | number | boolean + public Dictionary Cover { get; set; } // TODO: string | number | boolean + public Dictionary Grenade { get; set; } // TODO: string | number | boolean + public Dictionary Hearing { get; set; } // TODO: string | number | boolean + public Dictionary Lay { get; set; } // TODO: string | number | boolean + public Dictionary Look { get; set; } // TODO: string | number | boolean + public Dictionary Mind { get; set; } // TODO: string | number | boolean | string[] + public Dictionary Move { get; set; } // TODO: string | number | boolean + public Dictionary Patrol { get; set; } // TODO: string | number | boolean + public Dictionary Scattering { get; set; } // TODO: string | number | boolean + public Dictionary Shoot { get; set; } // TODO: string | number | boolean +} + +public class Experience +{ + /** key = bot difficulty */ + [JsonPropertyName("aggressorBonus")] + public Dictionary AggressorBonus { get; set; } + + public MinMax Level { get; set; } + + /** key = bot difficulty */ + [JsonPropertyName("reward")] + public Dictionary Reward { get; set; } + + /** key = bot difficulty */ + [JsonPropertyName("standingForKill")] + public Dictionary StandingForKill { get; set; } + + [JsonPropertyName("useSimpleAnimator")] + public bool UseSimpleAnimator { get; set; } +} + +public class Generation +{ + [JsonPropertyName("items")] + public GenerationWeightingItems Items { get; set; } +} + +public class GenerationWeightingItems +{ + [JsonPropertyName("grenades")] + public GenerationData Grenades { get; set; } + + [JsonPropertyName("healing")] + public GenerationData Healing { get; set; } + + [JsonPropertyName("drugs")] + public GenerationData Drugs { get; set; } + + [JsonPropertyName("food")] + public GenerationData Food { get; set; } + + [JsonPropertyName("drink")] + public GenerationData Drink { get; set; } + + [JsonPropertyName("currency")] + public GenerationData Currency { get; set; } + + [JsonPropertyName("stims")] + public GenerationData Stims { get; set; } + + [JsonPropertyName("backpackLoot")] + public GenerationData BackpackLoot { get; set; } + + [JsonPropertyName("pocketLoot")] + public GenerationData PocketLoot { get; set; } + + [JsonPropertyName("vestLoot")] + public GenerationData VestLoot { get; set; } + + [JsonPropertyName("magazines")] + public GenerationData Magazines { get; set; } + + [JsonPropertyName("specialItems")] + public GenerationData SpecialItems { get; set; } +} + +public class GenerationData +{ + /** key: number of items, value: weighting */ + [JsonPropertyName("weights")] + public Dictionary Weights { get; set; } + + /** Array of item tpls */ + [JsonPropertyName("whitelist")] + public Dictionary Whitelist { get; set; } +} + +public class BotTypeHealth +{ + public List BodyParts { get; set; } + public MinMax Energy { get; set; } + public MinMax Hydration { get; set; } + public MinMax Temperature { get; set; } +} + +public class BodyPart +{ + public MinMax Chest { get; set; } + public MinMax Head { get; set; } + public MinMax LeftArm { get; set; } + public MinMax LeftLeg { get; set; } + public MinMax RightArm { get; set; } + public MinMax RightLeg { get; set; } + public MinMax Stomach { get; set; } +} + +public class BotTypeInventory +{ + [JsonPropertyName("equipment")] + public Equipment Equipment { get; set; } + + public GlobalAmmo Ammo { get; set; } + + [JsonPropertyName("items")] + public ItemPools Items { get; set; } + + public GlobalMods Mods { get; set; } +} + +public class Equipment +{ + public Dictionary ArmBand { get; set; } + public Dictionary ArmorVest { get; set; } + public Dictionary Backpack { get; set; } + public Dictionary Earpiece { get; set; } + public Dictionary Eyewear { get; set; } + public Dictionary FaceCover { get; set; } + public Dictionary FirstPrimaryWeapon { get; set; } + public Dictionary Headwear { get; set; } + public Dictionary Holster { get; set; } + public Dictionary Pockets { get; set; } + public Dictionary Scabbard { get; set; } + public Dictionary SecondPrimaryWeapon { get; set; } + public Dictionary SecuredContainer { get; set; } + public Dictionary TacticalVest { get; set; } +} + +public class ItemPools +{ + public Dictionary Backpack { get; set; } + public Dictionary Pockets { get; set; } + public Dictionary SecuredContainer { get; set; } + public Dictionary SpecialLoot { get; set; } + public Dictionary TacticalVest { get; set; } } \ No newline at end of file diff --git a/Core/Models/Eft/Common/Tables/GlobalTablesUsings.cs b/Core/Models/Eft/Common/Tables/GlobalTablesUsings.cs new file mode 100644 index 00000000..64968b95 --- /dev/null +++ b/Core/Models/Eft/Common/Tables/GlobalTablesUsings.cs @@ -0,0 +1,2 @@ +global using GlobalAmmo = System.Collections.Generic.Dictionary>; +global using GlobalMods = System.Collections.Generic.Dictionary>; \ No newline at end of file diff --git a/Core/Models/Spt/Bots/Bots.cs b/Core/Models/Spt/Bots/Bots.cs index e951e0a3..2fc13d43 100644 --- a/Core/Models/Spt/Bots/Bots.cs +++ b/Core/Models/Spt/Bots/Bots.cs @@ -8,5 +8,5 @@ public class Bots public Dictionary types { get; } [JsonPropertyName("base")] public BotBase Base { get; } - public BotCode core { get; } + public BotCore core { get; } } \ No newline at end of file