diff --git a/Bots.sln b/Bots.sln new file mode 100644 index 0000000..ff8e5e7 --- /dev/null +++ b/Bots.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.31424.327 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Generator", "Generator\Generator.csproj", "{79CD3722-D6A7-4BA1-8CDF-533A77566D93}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {79CD3722-D6A7-4BA1-8CDF-533A77566D93}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {79CD3722-D6A7-4BA1-8CDF-533A77566D93}.Debug|Any CPU.Build.0 = Debug|Any CPU + {79CD3722-D6A7-4BA1-8CDF-533A77566D93}.Release|Any CPU.ActiveCfg = Release|Any CPU + {79CD3722-D6A7-4BA1-8CDF-533A77566D93}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {D699C02A-AD6B-404C-B792-53E00F98E563} + EndGlobalSection +EndGlobal diff --git a/Generator/BaseBotGenerator.cs b/Generator/BaseBotGenerator.cs new file mode 100644 index 0000000..4608056 --- /dev/null +++ b/Generator/BaseBotGenerator.cs @@ -0,0 +1,125 @@ +using Generator.Helpers; +using Generator.Models; +using Generator.Models.Input; +using Generator.Models.Output; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; + +namespace Generator +{ + public class BaseBotGenerator + { + private readonly List _rawParsedBots; + + public BaseBotGenerator(List parsedBots) + { + _rawParsedBots = parsedBots; + } + + public List AddBaseDetails() + { + var stopwatch = Stopwatch.StartNew(); + LoggingHelpers.LogToConsole("Started processing bot base"); + + var assaultBot = new Bot(BotType.assault); + var raiderBot = new Bot(BotType.pmcBot); + var marksmanBot = new Bot(BotType.marksman); + + var rawBots = new List + { + assaultBot, + raiderBot, + marksmanBot + }; + + foreach (var botToUpdate in rawBots) + { + var rawBotData = _rawParsedBots + .Where(x => string.Equals(x.Info.Settings.Role, botToUpdate.botType.ToString(), StringComparison.OrdinalIgnoreCase)).ToList(); + UpdateBodyPartHealth(botToUpdate, rawBotData); + } + + foreach (var bot in rawBots) + { + AddDifficulties(bot, _rawParsedBots); + foreach (var rawParsedBot in _rawParsedBots) + { + AddVisualAppearanceItems(bot, rawParsedBot); + AddName(bot, rawParsedBot.Info.Nickname); + + } + } + + stopwatch.Stop(); + LoggingHelpers.LogToConsole($"Time taken to generate base bot files: {LoggingHelpers.LogTimeTaken(stopwatch.Elapsed.TotalSeconds)} seconds"); + + + return rawBots; + } + + private void AddDifficulties(Bot bot, List rawParsedBots) + { + var botType = bot.botType; + var firstBotOfDesiredType = rawParsedBots.First(x => x.Info.Settings.Role == botType.ToString()); + + switch (botType) + { + case BotType.assault: + DifficultyHelper.AddAssaultDifficulties(bot); + break; + case BotType.pmcBot: + break; + case BotType.marksman: + break; + default: + break; + } + } + + private void UpdateBodyPartHealth(Bot botToUpdate, List rawParsedBots) + { + var firstBotOfDesiredType = rawParsedBots.First(x => x.Info.Settings.Role == botToUpdate.botType.ToString()); + botToUpdate.health.BodyParts.Head.min = firstBotOfDesiredType.Health.BodyParts.Head.Health.Current; + botToUpdate.health.BodyParts.Head.max = firstBotOfDesiredType.Health.BodyParts.Head.Health.Maximum; + + botToUpdate.health.BodyParts.Chest.min = firstBotOfDesiredType.Health.BodyParts.Chest.Health.Current; + botToUpdate.health.BodyParts.Chest.max = firstBotOfDesiredType.Health.BodyParts.Chest.Health.Maximum; + + botToUpdate.health.BodyParts.Stomach.min = firstBotOfDesiredType.Health.BodyParts.Stomach.Health.Current; + botToUpdate.health.BodyParts.Stomach.max = firstBotOfDesiredType.Health.BodyParts.Stomach.Health.Maximum; + + botToUpdate.health.BodyParts.LeftArm.min = firstBotOfDesiredType.Health.BodyParts.LeftArm.Health.Current; + botToUpdate.health.BodyParts.LeftArm.max = firstBotOfDesiredType.Health.BodyParts.LeftArm.Health.Maximum; + + botToUpdate.health.BodyParts.RightArm.min = firstBotOfDesiredType.Health.BodyParts.RightArm.Health.Current; + botToUpdate.health.BodyParts.RightArm.max = firstBotOfDesiredType.Health.BodyParts.RightArm.Health.Maximum; + + botToUpdate.health.BodyParts.LeftLeg.min = firstBotOfDesiredType.Health.BodyParts.LeftLeg.Health.Current; + botToUpdate.health.BodyParts.LeftLeg.max = firstBotOfDesiredType.Health.BodyParts.LeftLeg.Health.Maximum; + + botToUpdate.health.BodyParts.RightLeg.min = firstBotOfDesiredType.Health.BodyParts.RightLeg.Health.Current; + botToUpdate.health.BodyParts.RightLeg.max = firstBotOfDesiredType.Health.BodyParts.RightLeg.Health.Maximum; + } + + private void AddVisualAppearanceItems(Bot finalAssaultBot, Datum bot) + { + finalAssaultBot.appearance.head.AddUnique(bot.Customization.Head); + finalAssaultBot.appearance.body.AddUnique(bot.Customization.Body); + finalAssaultBot.appearance.hands.AddUnique(bot.Customization.Hands); + finalAssaultBot.appearance.feet.AddUnique(bot.Customization.Feet); + finalAssaultBot.appearance.voice.AddUnique(bot.Info.Voice); + } + + private void AddName(Bot finalAssaultBot, string nickName) + { + var name = nickName.Split(); + finalAssaultBot.firstName.AddUnique(name[0]); + if (name.Length > 1) + { + finalAssaultBot.lastName.AddUnique(name[1]); + } + } + } +} diff --git a/Generator/BotGearGenerator.cs b/Generator/BotGearGenerator.cs new file mode 100644 index 0000000..6782e47 --- /dev/null +++ b/Generator/BotGearGenerator.cs @@ -0,0 +1,231 @@ +using Generator.Helpers; +using Generator.Models; +using Generator.Models.Input; +using Generator.Models.Output; +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; + +namespace Generator +{ + public class BotGearGenerator + { + private readonly List _baseBots; + private readonly List _rawParsedBots; + + public BotGearGenerator(List baseBots, List parsedBots) + { + _baseBots = baseBots; + _rawParsedBots = parsedBots; + } + + internal List AddGear() + { + var stopwatch = Stopwatch.StartNew(); + LoggingHelpers.LogToConsole("Started processing bot gear"); + + foreach (var bot in _baseBots) + { + AddEquipmentChances(bot); + AddGenerationChances(bot); + AddModChances(bot); + foreach (var rawParsedBot in _rawParsedBots) + { + AddEquippedGear(bot, rawParsedBot); + AddEquippedMods(bot, rawParsedBot); + } + } + + stopwatch.Stop(); + LoggingHelpers.LogToConsole($"Time taken to generate gear: {LoggingHelpers.LogTimeTaken(stopwatch.Elapsed.TotalSeconds)} seconds"); + + return _baseBots; + } + + private void AddEquippedMods(Bot botToUpdate, Datum rawParsedBot) + { + var modItemsInRawBot = new List(); + var itemsWithModsInRawBot = new List(); + + modItemsInRawBot = rawParsedBot.Inventory.items + .Where(x => x.slotId?.StartsWith("mod_") == true).ToList(); + + // get items with Mods by iterating over mod items and getting the parent item + itemsWithModsInRawBot.AddRange(modItemsInRawBot + .Select(modItem => rawParsedBot.Inventory.items + .Find(x => x._id == modItem.parentId))); + + var itemsWithModsDictionary = botToUpdate.inventory.mods; + foreach (var itemToAdd in itemsWithModsInRawBot) + { + var modsToAdd = modItemsInRawBot.Where(x => x.parentId == itemToAdd._id).ToList(); + + AddItemToDictionary(itemToAdd, modsToAdd, itemsWithModsDictionary); + } + + botToUpdate.inventory.mods = itemsWithModsDictionary; + } + + private void AddItemToDictionary( + Item itemToAdd, + List modsToAdd, + Dictionary>> itemsWithModsDictionary) + { + // item key already exists, need to merge mods + if (itemsWithModsDictionary.ContainsKey(itemToAdd.slotId)) + { + foreach (var modItem in modsToAdd) + { + var itemToAddModsTo = itemsWithModsDictionary[itemToAdd.slotId]; + // Item doesnt have this mod, add it then add template id + if (!itemToAddModsTo.ContainsKey(modItem.slotId)) + { + // Mod doesnt exist on item + itemToAddModsTo.Add(modItem.slotId, new List()); // add mod + itemToAddModsTo[modItem.slotId].AddUnique(modItem._tpl); + } + + itemToAddModsTo[modItem.slotId].AddUnique(modItem._tpl); // add template id to it + } + } + else // item doesnt exist, create it + { + itemsWithModsDictionary.Add(itemToAdd.slotId, new Dictionary>()); + // Add mod types to item + foreach (var modItem in modsToAdd) + { + itemsWithModsDictionary[itemToAdd.slotId].Add(modItem.slotId, new List()); + } + + // Get item we're adding mod templateIds to + var itemToUpdate = itemsWithModsDictionary[itemToAdd.slotId]; + foreach (var modItem in modsToAdd) + { + var modToUpdate = itemToUpdate[modItem.slotId]; + modToUpdate.Add(modItem._tpl); + } + + } + var result = JsonConvert.SerializeObject(itemsWithModsDictionary, Formatting.Indented); + } + + private void AddModChances(Bot bot) + { + switch (bot.botType) + { + case BotType.assault: + bot.chances.mods = new Mods(muzzle: 18, barrel: 100, handguard: 100, stock: 66, magazine: 100, + mount: 15, flashlight: 100, tactical_001: 99, tactical_002: 0, tactical_003: 0, + mount_000: 15, pistol_grip: 97, tactical: 87, scope: 17, reciever: 92, + sight_rear: 56, charge: 13, mount_001: 0, equipment: 30, gas_block: 100, + launcher: 0, sight_front: 25, stock_000: 0, foregrip: 0, tactical_000: 0, + nvg: 0, pistol_grip_akms: 100, stock_akms: 100, equipment_000: 0, equipment_001: 0, + equipment_002: 0, bipod: 0); + break; + case BotType.pmcBot: + bot.chances.mods = new Mods(muzzle: 67, barrel: 100, handguard: 97, stock: 81, magazine: 100, + mount: 35, flashlight: 100, tactical_001: 9, tactical_002: 0, tactical_003: 0, + mount_000: 28, pistol_grip: 97, tactical: 32, scope: 57, reciever: 100, + sight_rear: 58, charge: 81, mount_001: 38, equipment: 0, gas_block: 100, + launcher: 0, sight_front: 65, stock_000: 100, foregrip: 30, tactical_000: 18, + nvg: 25, pistol_grip_akms: 97, stock_akms: 0, equipment_000: 0, equipment_001: 0, + equipment_002: 0, bipod: 0); + break; + case BotType.marksman: + bot.chances.mods = new Mods(muzzle: 0, barrel: 100, handguard: 0, stock: 73, magazine: 100, + mount: 100, flashlight: 0, tactical_001: 0, tactical_002: 0, tactical_003: 0, + mount_000: 0, pistol_grip: 0, tactical: 33, scope: 89, reciever: 0, + sight_rear: 17, charge: 0, mount_001: 0, equipment: 0, gas_block: 0, + launcher: 0, sight_front: 25, stock_000: 0, foregrip: 0, tactical_000: 33, + nvg: 100, pistol_grip_akms: 0, stock_akms: 0, equipment_000: 0, equipment_001: 0, + equipment_002: 0, bipod: 0); + break; + } + } + + private void AddGenerationChances(Bot bot) + { + switch (bot.botType) + { + case BotType.assault: + case BotType.pmcBot: + case BotType.marksman: + bot.generation = new GenerationChances(0, 1, 1, 2, 0, 3, 2, 4, 0, 5); + break; + } + } + + private void AddEquipmentChances(Bot bot) + { + switch (bot.botType) + { + case BotType.assault: + bot.chances.equipment = new EquipmentChances(73, 0, 62, 28, 36, 0, 100, 38, 95, 0, 5, 72, 100, 100); + break; + case BotType.pmcBot: + bot.chances.equipment = new EquipmentChances(89, 56, 58, 49, 84, 0, 100, 58, 100, 0, 18, 0, 100, 100); + break; + case BotType.marksman: + bot.chances.equipment = new EquipmentChances(8, 8, 8, 42, 0, 0, 100, 25, 100, 0, 0, 33, 100, 100); + break; + } + } + + private void AddEquippedGear(Bot finalAssaultBot, Datum bot) + { + // add equipped gear + foreach (var inventoryItem in bot.Inventory.items) + { + switch (inventoryItem.slotId?.ToLower()) + { + case "headwear": + finalAssaultBot.inventory.equipment.Headwear.AddUnique(inventoryItem._tpl); + break; + case "earpiece": + finalAssaultBot.inventory.equipment.Earpiece.AddUnique(inventoryItem._tpl); + break; + case "facecover": + finalAssaultBot.inventory.equipment.FaceCover.AddUnique(inventoryItem._tpl); + break; + case "armorvest": + finalAssaultBot.inventory.equipment.ArmorVest.AddUnique(inventoryItem._tpl); + break; + case "eyewear": + finalAssaultBot.inventory.equipment.Eyewear.AddUnique(inventoryItem._tpl); + break; + case "armband": + finalAssaultBot.inventory.equipment.ArmBand.AddUnique(inventoryItem._tpl); + break; + case "tacticalvest": + finalAssaultBot.inventory.equipment.TacticalVest.AddUnique(inventoryItem._tpl); + break; + case "backpack": + finalAssaultBot.inventory.equipment.Backpack.AddUnique(inventoryItem._tpl); + break; + case "firstprimaryweapon": + finalAssaultBot.inventory.equipment.FirstPrimaryWeapon.AddUnique(inventoryItem._tpl); + break; + case "secondprimaryweapon": + finalAssaultBot.inventory.equipment.SecondPrimaryWeapon.AddUnique(inventoryItem._tpl); + break; + case "holster": + finalAssaultBot.inventory.equipment.Holster.AddUnique(inventoryItem._tpl); + break; + case "scabbard": + finalAssaultBot.inventory.equipment.Scabbard.AddUnique(inventoryItem._tpl); + break; + case "pockets": + finalAssaultBot.inventory.equipment.Pockets.AddUnique(inventoryItem._tpl); + break; + case "securedcontainer": + finalAssaultBot.inventory.equipment.SecuredContainer.AddUnique(inventoryItem._tpl); + break; + default: + break; + } + } + } + } +} diff --git a/Generator/BotLootGenerator.cs b/Generator/BotLootGenerator.cs new file mode 100644 index 0000000..364f0ad --- /dev/null +++ b/Generator/BotLootGenerator.cs @@ -0,0 +1,103 @@ +using Generator.Helpers; +using Generator.Models.Input; +using Generator.Models.Output; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; + +namespace Generator +{ + public class BotLootGenerator + { + private readonly List _botsWithGear; + private readonly List _rawParsedBots; + + public BotLootGenerator(List botsWithGear, List rawParsedBots) + { + _botsWithGear = botsWithGear; + _rawParsedBots = rawParsedBots; + } + + internal List AddLoot() + { + var stopwatch = Stopwatch.StartNew(); + LoggingHelpers.LogToConsole("Started processing bot loot"); + + // Iterate over assault/raider etc + foreach (var bot in _botsWithGear) + { + foreach (var rawParsedBot in _rawParsedBots) + { + AddPocketLoot(bot, rawParsedBot); + } + + AddTacticalVestLoot(bot, _rawParsedBots); + AddBackbackLoot(bot, _rawParsedBots); + AddSecureContainerLoot(bot, _rawParsedBots); + } + + stopwatch.Stop(); + LoggingHelpers.LogToConsole($"Time taken to generate loot: {LoggingHelpers.LogTimeTaken(stopwatch.Elapsed.TotalSeconds)} seconds"); + + return _botsWithGear; + } + + private void AddTacticalVestLoot(Bot finalAssaultBot, List bots) + { + var tacVestItems = GetItemsStoredInEquipmentItem(bots, "TacticalVest"); + finalAssaultBot.inventory.items.TacticalVest.AddRange(tacVestItems); + } + + private void AddBackbackLoot(Bot finalAssaultBot, List bots) + { + var backpackItems = GetItemsStoredInEquipmentItem(bots, "Backpack"); + finalAssaultBot.inventory.items.Backpack.AddRange(backpackItems); + } + + + + private void AddSecureContainerLoot(Bot finalAssaultBot, List bots) + { + var tacVestItems = GetItemsStoredInEquipmentItem(bots, "SecuredContainer"); + finalAssaultBot.inventory.items.SecuredContainer.AddRange(tacVestItems); + } + + private void AddPocketLoot(Bot finalBot, Datum bot) + { + // pocket loot + foreach (var lootItem in bot.Inventory.items.Where(x => x?.slotId?.StartsWith("pocket") == true)) + { + finalBot.inventory.items.Pockets.AddUnique(lootItem._tpl); + } + } + + private List GetItemsStoredInEquipmentItem(List bots, string containerName) + { + var itemsStoredInContainer = new List(); + var containers = new List(); + foreach (var bot in bots) + { + // find the container type we want on this bot (backpack etc) + // Add to list + var botContainers = bot.Inventory.items.Where(x => x.slotId == containerName); + foreach (var c in botContainers) + { + containers.AddUnique(c._id); + } + + foreach (var item in bot.Inventory.items) + { + if (containers.Contains(item.parentId)) + { + itemsStoredInContainer.AddUnique(item._tpl); + } + } + } + + return itemsStoredInContainer; + } + + + + } +} diff --git a/Generator/BotParser.cs b/Generator/BotParser.cs new file mode 100644 index 0000000..858e67b --- /dev/null +++ b/Generator/BotParser.cs @@ -0,0 +1,85 @@ +using Generator.Helpers; +using Generator.Models.Input; +using Generator.Models.Output; +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Linq; + +namespace Generator +{ + internal class BotParser + { + private readonly string _workingPath; + private readonly string _dumpPath; + private readonly string[] _botTypes; + + public BotParser(string workingPath, string dumpPath, string[] botTypes) + { + _workingPath = workingPath; + _dumpPath = dumpPath; + _botTypes = botTypes; + } + + public List Parse() + { + var stopwatch = Stopwatch.StartNew(); + + var failedFiles = 0; + CreateDirIfDoesntExist(_dumpPath); + + var botFiles = Directory.GetFiles(_dumpPath, "*.json", SearchOption.TopDirectoryOnly).ToList(); + Console.WriteLine($"{botFiles.Count} files found"); + + var parsedBots = new List(); + foreach (var file in botFiles) + { + var splitFile = file.Split("\\"); + failedFiles++; + + var json = File.ReadAllText(file); + try + { + var bots = ParseJson(json, file); + Console.WriteLine($"parsing: {bots.Count} bots in file {splitFile.Last()}"); + foreach (var bot in bots) + { + parsedBots.Add(bot); + } + } + catch (JsonException jex) + { + + Console.WriteLine($"JSON Error message: {jex.Message} || file: {splitFile.Last()}"); + continue; + } + } + + stopwatch.Stop(); + + Console.WriteLine($"Parsed: {parsedBots.Count} Failed: {failedFiles}. Took {LoggingHelpers.LogTimeTaken(stopwatch.Elapsed.TotalSeconds)} seconds"); + + + + return parsedBots; + } + + private void CreateDirIfDoesntExist(string path) + { + if (!Directory.Exists($"{path}")) + { + //create dump dir + Directory.CreateDirectory($"{path}"); + } + } + + private static List ParseJson(string json, string file) + { + //Console.WriteLine($"parsing file {file}"); + var serialisedObject = JsonConvert.DeserializeObject(json); + return serialisedObject.data; + } + } +} \ No newline at end of file diff --git a/Generator/Generator.csproj b/Generator/Generator.csproj new file mode 100644 index 0000000..58bb9eb --- /dev/null +++ b/Generator/Generator.csproj @@ -0,0 +1,12 @@ + + + + Exe + netcoreapp3.1 + + + + + + + diff --git a/Generator/Helpers/DifficultHelper.cs b/Generator/Helpers/DifficultHelper.cs new file mode 100644 index 0000000..7afdc59 --- /dev/null +++ b/Generator/Helpers/DifficultHelper.cs @@ -0,0 +1,181 @@ +using Generator.Models.Output.Difficulty; + +namespace Generator.Helpers +{ + public static class DifficultHelper + { + public static Lay GenerateLay() + { + return new Lay(cHECK_SHOOT_WHEN_LAYING: false, dELTA_LAY_CHECK: 2, dELTA_GETUP: 2.7, dELTA_AFTER_GETUP: 10, + cLEAR_POINTS_OF_SCARE_SEC: 20, mAX_LAY_TIME: 35, dELTA_WANT_LAY_CHECL_SEC: 5, aTTACK_LAY_CHANCE: 25, + dIST_TO_COVER_TO_LAY: 3.5, dIST_TO_COVER_TO_LAY_SQRT: 12.5, dIST_GRASS_TERRAIN_SQRT: 0.160000011, dIST_ENEMY_NULL_DANGER_LAY: 15, + dIST_ENEMY_NULL_DANGER_LAY_SQRT: 225, dIST_ENEMY_GETUP_LAY: 10, dIST_ENEMY_GETUP_LAY_SQRT: 100, dIST_ENEMY_CAN_LAY: 15, + dIST_ENEMY_CAN_LAY_SQRT: 225, lAY_AIM: 0.6, mIN_CAN_LAY_DIST_SQRT: 121, mIN_CAN_LAY_DIST: 11, + mAX_CAN_LAY_DIST_SQRT: 40000, mAX_CAN_LAY_DIST: 200, lAY_CHANCE_DANGER: 40, dAMAGE_TIME_TO_GETUP: 3); + } + + public static Core GenerateCore() + { + return new Core(visibleAngle: 140, visibleDistance: 130, gainSightCoef: 0.1, + scatteringPerMeter: 0.1, scatteringClosePerMeter: 0.1, damageCoeff: 1, hearingSense: 2.85, + canRun: true, canGrenade: true, aimingType: "normal", pistolFireDistancePref: 35, + shotgunFireDistancePref: 50, rifleFireDistancePref: 100, accuratySpeed: 0.3, waitInCoverBetweenShotsSec: 1.5); + } + + public static Scattering GenerateScattering() + { + return new Scattering(minScatter: 0.015, workingScatter: 0.15, maxScatter: 0.3, + speedUp: 0.6, speedUpAim: 1.8, speedDown: -0.2, toSlowBotSpeed: 1.8, toLowBotSpeed: 2.8, toUpBotSpeed: 4.3, + movingSlowCoef: 1.4, toLowBotAngularSpeed: 140, toStopBotAngularSpeed: 80, fromShot: 0.001, tracerCoef: 1.3, + handDamageScatteringMinMax: 0.7, handDamageAccuracySpeed: 1.3, bloodFall: 1.45, caution: 0.03, toCaution: 0.6, + recoilControlCoefShootDone: 0.0003, recoilControlCoefShootDoneAuto: 0.00015, aMPLITUDE_FACTOR: 0.015, + aMPLITUDE_SPEED: 0.001, dIST_FROM_OLD_POINT_TO_NOT_AIM: 15, dIST_FROM_OLD_POINT_TO_NOT_AIM_SQRT: 225, + dIST_NOT_TO_SHOOT: 0.3, poseChnageCoef: 0.1, layFactor: 0.1, recoilYCoef: 0.0005, recoilYCoefSppedDown: -0.52, recoilYMax: 1); + } + + public static Boss GenerateBoss() + { + return new Boss(bOSS_DIST_TO_WARNING: 34, bOSS_DIST_TO_WARNING_SQRT: 1156, bOSS_DIST_TO_WARNING_OUT: 43, + bOSS_DIST_TO_WARNING_OUT_SQRT: 1849, bOSS_DIST_TO_SHOOT: 16, bOSS_DIST_TO_SHOOT_SQRT: 256, cHANCE_TO_SEND_GRENADE_100: 100, + mAX_DIST_COVER_BOSS: 25, mAX_DIST_COVER_BOSS_SQRT: 625, mAX_DIST_DECIDER_TO_SEND: 35, mAX_DIST_DECIDER_TO_SEND_SQRT: 1225, + tIME_AFTER_LOSE: 15, tIME_AFTER_LOSE_DELTA: 60, pERSONS_SEND: 2, dELTA_SEARCH_TIME: 18, + cOVER_TO_SEND: true, wAIT_NO_ATTACK_SAVAGE: 10, cHANCE_USE_RESERVE_PATROL_100: 50, kILLA_Y_DELTA_TO_BE_ENEMY_BOSS: 5, + kILLA_DITANCE_TO_BE_ENEMY_BOSS: 45, kILLA_START_SEARCH_SEC: 40, kILLA_CONTUTION_TIME: 5, kILLA_CLOSE_ATTACK_DIST: 8, + kILLA_MIDDLE_ATTACK_DIST: 22, kILLA_LARGE_ATTACK_DIST: 41, kILLA_SEARCH_METERS: 30, kILLA_DEF_DIST_SQRT: 225, + kILLA_SEARCH_SEC_STOP_AFTER_COMING: 25, kILLA_DIST_TO_GO_TO_SUPPRESS: 6, kILLA_AFTER_GRENADE_SUPPRESS_DELAY: 2, + kILLA_CLOSEATTACK_TIMES: 3, kILLA_CLOSEATTACK_DELAY: 10, kILLA_HOLD_DELAY: 5, kILLA_BULLET_TO_RELOAD: 15, + sHALL_WARN: true, kILLA_ENEMIES_TO_ATTACK: 3, kILLA_ONE_IS_CLOSE: 30, kILLA_TRIGGER_DOWN_DELAY: 1, kILLA_WAIT_IN_COVER_COEF: 1, + kOJANIY_DIST_WHEN_READY: 40, kOJANIY_DIST_TO_BE_ENEMY: 200, kOJANIY_MIN_DIST_TO_LOOT: 20, kOJANIY_MIN_DIST_TO_LOOT_SQRT: 400, + kOJANIY_DIST_ENEMY_TOO_CLOSE: 17, kOJANIY_MANY_ENEMIES_COEF: 1.5); + } + + public static Mind GenerateMind() + { + return new Mind(hOW_WORK_OVER_DEAD_BODY: 2, mIN_SHOOTS_TIME: 2, mAX_SHOOTS_TIME: 4, + tIME_LEAVE_MAP: 23, tIME_TO_RUN_TO_COVER_CAUSE_SHOOT_SEC: 15, dAMAGE_REDUCTION_TIME_SEC: 20, mIN_DAMAGE_SCARE: 20, + cHANCE_TO_RUN_CAUSE_DAMAGE_0_100: 35, tIME_TO_FORGOR_ABOUT_ENEMY_SEC: 52, tIME_TO_FIND_ENEMY: 22, mAX_AGGRO_BOT_DIST: 100, + hIT_POINT_DETECTION: 4, dANGER_POINT_CHOOSE_COEF: 1, sIMPLE_POINT_CHOOSE_COEF: 0.4, lASTSEEN_POINT_CHOOSE_COEF: 0.2, + cOVER_DIST_COEF: 1.5, dIST_TO_FOUND_SQRT: 400, mAX_AGGRO_BOT_DIST_SQR: 10000, dIST_TO_STOP_RUN_ENEMY: 15, + eNEMY_LOOK_AT_ME_ANG: 15, mIN_START_AGGRESION_COEF: 1, mAX_START_AGGRESION_COEF: 3, bULLET_FEEL_DIST: 360, + bULLET_FEEL_CLOSE_SDIST: 1, aTTACK_IMMEDIATLY_CHANCE_0_100: 40, cHANCE_FUCK_YOU_ON_CONTACT_100: 10, fRIEND_DEAD_AGR_LOW: -0.2, + fRIEND_AGR_KILL: 0.2, lAST_ENEMY_LOOK_TO: 40, cAN_RECIVE_PLAYER_REQUESTS: true, cAN_TAKE_ITEMS: true, + cAN_USE_MEDS: true, sUSPETION_POINT_CHANCE_ADD100: 0, aMBUSH_WHEN_UNDER_FIRE: true, aMBUSH_WHEN_UNDER_FIRE_TIME_RESIST: 60, + aTTACK_ENEMY_IF_PROTECT_DELTA_LAST_TIME_SEEN: 1.5, hOLD_IF_PROTECT_DELTA_LAST_TIME_SEEN: 8.5, fIND_COVER_TO_GET_POSITION_WITH_SHOOT: 2, + pROTECT_TIME_REAL: true, cHANCE_SHOOT_WHEN_WARN_PLAYER_100: 25, cAN_PANIC_IS_PROTECT: false, nO_RUN_AWAY_FOR_SAFE: false, + pART_PERCENT_TO_HEAL: 0.65, pROTECT_DELTA_HEAL_SEC: 10, cAN_STAND_BY: true, cAN_THROW_REQUESTS: true, + gROUP_ANY_PHRASE_DELAY: 4, gROUP_EXACTLY_PHRASE_DELAY: 4, dIST_TO_ENEMY_YO_CAN_HEAL: 30, cHANCE_TO_STAY_WHEN_WARN_PLAYER_100: 80, + dOG_FIGHT_OUT: 6, dOG_FIGHT_IN: 3, sHOOT_INSTEAD_DOG_FIGHT: 9, pISTOL_SHOTGUN_AMBUSH_DIST: 60, + sTANDART_AMBUSH_DIST: 200, aI_POWER_COEF: 120, cOVER_SECONDS_AFTER_LOSE_VISION: 10, cOVER_SELF_ALWAYS_IF_DAMAGED: false, + sEC_TO_MORE_DIST_TO_RUN: 10, hEAL_DELAY_SEC: 5, hIT_DELAY_WHEN_HAVE_SMT: -1, hIT_DELAY_WHEN_PEACE: -1, + tALK_WITH_QUERY: true, wILL_PERSUE_AXEMAN: true); + } + + internal static Hearing GenerateHearing() + { + return new Hearing(bOT_CLOSE_PANIC_DIST: 2, cHANCE_TO_HEAR_SIMPLE_SOUND_0_1: 0.45, + dISPERSION_COEF: 1.6, cLOSE_DIST: 10, fAR_DIST: 30, sOUND_DIR_DEEFREE: 30, dIST_PLACE_TO_FIND_POINT: 70, + dEAD_BODY_SOUND_RAD: 30, lOOK_ONLY_DANGER: false, rESET_TIMER_DIST: 17, hEAR_DELAY_WHEN_PEACE: 0.85, + hEAR_DELAY_WHEN_HAVE_SMT: 0.56, lOOK_ONLY_DANGER_DELTA: 9); + } + + public static Patrol GeneratePatrol() + { + return new Patrol(dEAD_BODY_LOOK_PERIOD: 8, lOOK_TIME_BASE: 12, cAN_CHOOSE_RESERV: true, + tRY_CHOOSE_RESERV_WAY_ON_START: false, cAN_LOOK_TO_DEADBODIES: true, cAN_FRIENDLY_TILT: true, + cAN_HARD_AIM: true, rESERVE_TIME_STAY: 72, fRIEND_SEARCH_SEC: 12, tALK_DELAY: 1.1, + mIN_TALK_DELAY: 35, tALK_DELAY_BIG: 15.1, cHANGE_WAY_TIME: 125.1, mIN_DIST_TO_CLOSE_TALK: 5, + vISION_DIST_COEF_PEACE: 0.5, mIN_DIST_TO_CLOSE_TALK_SQR: 25, cHANCE_TO_CUT_WAY_0_100: 75, cUT_WAY_MIN_0_1: 0.4, + cUT_WAY_MAX_0_1: 0.65, cHANCE_TO_CHANGE_WAY_0_100: 50, cHANCE_TO_SHOOT_DEADBODY: 52, sUSPETION_PLACE_LIFETIME: 7, + rESERVE_OUT_TIME: 30, cLOSE_TO_SELECT_RESERV_WAY: 25, mAX_YDIST_TO_START_WARN_REQUEST_TO_REQUESTER: 5); + } + + public static Cover GenerateCover() + { + return new Cover(rETURN_TO_ATTACK_AFTER_AMBUSH_MIN: 20, rETURN_TO_ATTACK_AFTER_AMBUSH_MAX: 50, + sOUND_TO_GET_SPOTTED: 2, tIME_TO_MOVE_TO_COVER: 15, mAX_DIST_OF_COVER: 4, cHANGE_RUN_TO_COVER_SEC: 5, + cHANGE_RUN_TO_COVER_SEC_GREANDE: 0.6, mIN_DIST_TO_ENEMY: 9, dIST_CANT_CHANGE_WAY: 5, dIST_CHECK_SFETY: 9, + tIME_CHECK_SAFE: 2, hIDE_TO_COVER_TIME: 1.5, mAX_DIST_OF_COVER_SQR: 16, dIST_CANT_CHANGE_WAY_SQR: 25, + sPOTTED_COVERS_RADIUS: 3, lOOK_LAST_ENEMY_POS_MOVING: 1.5, lOOK_TO_HIT_POINT_IF_LAST_ENEMY: 3, lOOK_LAST_ENEMY_POS_LOOKAROUND: 45, + oFFSET_LOOK_ALONG_WALL_ANG: 20, sPOTTED_GRENADE_RADIUS: 16, mAX_SPOTTED_TIME_SEC: 45, wAIT_INT_COVER_FINDING_ENEMY: 2, + cLOSE_DIST_POINT_SQRT: 4, dELTA_SEEN_FROM_COVE_LAST_POS: 15, mOVE_TO_COVER_WHEN_TARGET: false, rUN_COVER_IF_CAN_AND_NO_ENEMIES: false, + sPOTTED_GRENADE_TIME: 7, dEPENDS_Y_DIST_TO_BOT: false, rUN_IF_FAR: 10, rUN_IF_FAR_SQRT: 225, + sTAY_IF_FAR: 25, sTAY_IF_FAR_SQRT: 625, cHECK_COVER_ENEMY_LOOK: true, sHOOT_NEAR_TO_LEAVE: 2, + sHOOT_NEAR_SEC_PERIOD: 0.5, hITS_TO_LEAVE_COVER: 1, hITS_TO_LEAVE_COVER_UNKNOWN: 1, dOG_FIGHT_AFTER_LEAVE: 4, + nOT_LOOK_AT_WALL_IS_DANGER: true, mIN_DEFENCE_LEVEL: 22, gOOD_DIST_TO_POINT_COEF: 1.8, eNEMY_DIST_TO_GO_OUT: 1, + sTATIONARY_WEAPON_NO_ENEMY_GETUP: 20, sTATIONARY_WEAPON_MAX_DIST_TO_USE: 25); + } + + public static Change GenerateChange() + { + return new Change(sMOKE_VISION_DIST: 0.6, sMOKE_GAIN_SIGHT: 1.6, sMOKE_SCATTERING: 1.6, + sMOKE_PRECICING: 1.6, sMOKE_HEARING: 1, sMOKE_ACCURATY: 1.6, sMOKE_LAY_CHANCE: 1.6, + fLASH_VISION_DIST: 0.05, fLASH_GAIN_SIGHT: 1.8, fLASH_SCATTERING: 1.6, fLASH_PRECICING: 1.6, + fLASH_HEARING: 1, fLASH_ACCURATY: 1.6, fLASH_LAY_CHANCE: 1, sTUN_HEARING: 0.01); + } + + public static Grenade GenerateGrenade() + { + return new Grenade(dELTA_NEXT_ATTEMPT_FROM_COVER: 5, dELTA_NEXT_ATTEMPT: 10, mIN_DIST_NOT_TO_THROW: 8, + nEAR_DELTA_THROW_TIME_SEC: 2, mIN_THROW_GRENADE_DIST: 12, mIN_THROW_GRENADE_DIST_SQRT: 144, mIN_DIST_NOT_TO_THROW_SQR: 64, + rUN_AWAY: 22, rUN_AWAY_SQR: 484, aDD_GRENADE_AS_DANGER: 65, aDD_GRENADE_AS_DANGER_SQR: 4225, + cHANCE_TO_NOTIFY_ENEMY_GR_100: 99, grenadePerMeter: 0.2, rEQUEST_DIST_MUST_THROW_SQRT: 4, rEQUEST_DIST_MUST_THROW: 2, + bEWARE_TYPE: 2, sHOOT_TO_SMOKE_CHANCE_100: 30, cHANCE_RUN_FLASHED_100: 0, mAX_FLASHED_DIST_TO_SHOOT: 10, + mAX_FLASHED_DIST_TO_SHOOT_SQRT: 100, fLASH_GRENADE_TIME_COEF: 0.3, sIZE_SPOTTED_COEF: 2, bE_ATTENTION_COEF: 4, + tIME_SHOOT_TO_FLASH: 4, cLOSE_TO_SMOKE_TO_SHOOT: 5, cLOSE_TO_SMOKE_TO_SHOOT_SQRT: 25, cLOSE_TO_SMOKE_TIME_DELTA: 7, + sMOKE_CHECK_DELTA: 1, dELTA_GRENADE_START_TIME: 0.7, aMBUSH_IF_SMOKE_IN_ZONE_100: 40, aMBUSH_IF_SMOKE_RETURN_TO_ATTACK_SEC: 30, + nO_RUN_FROM_AI_GRENADES: false, mAX_THROW_POWER: 15.7, grenadePrecision: 0.3, sTOP_WHEN_THROW_GRENADE: true, + wAIT_TIME_TURN_AWAY: 0.2, sMOKE_SUPPRESS_DELTA: 20, dAMAGE_GRENADE_SUPPRESS_DELTA: 8, sTUN_SUPPRESS_DELTA: 9, + cHEAT_START_GRENADE_PLACE: false, cAN_THROW_STRAIGHT_CONTACT: true, sTRAIGHT_CONTACT_DELTA_SEC: -1, aNG_TYPE: 4); + } + + public static Move GenerateMove() + { + return new Move(bASE_ROTATE_SPEED: 270, rEACH_DIST: 0.5, rEACH_DIST_RUN: 0.8, sTART_SLOW_DIST: 1.5, + bASESTART_SLOW_DIST: 1.1, sLOW_COEF: 7, dIST_TO_CAN_CHANGE_WAY: 8, dIST_TO_START_RAYCAST: 15, bASE_START_SERACH: 35, + uPDATE_TIME_RECAL_WAY: 7, fAR_DIST: 4, fAR_DIST_SQR: 16, dIST_TO_CAN_CHANGE_WAY_SQR: 64, dIST_TO_START_RAYCAST_SQR: 225, + bASE_SQRT_START_SERACH: 1225, y_APPROXIMATION: 0.7, dELTA_LAST_SEEN_ENEMY: 20, rEACH_DIST_COVER: 2, rUN_TO_COVER_MIN: 2, + cHANCE_TO_RUN_IF_NO_AMMO_0_100: 100, rUN_IF_CANT_SHOOT: false, rUN_IF_GAOL_FAR_THEN: 10, sEC_TO_CHANGE_TO_RUN: 3); + } + + public static Shoot GenerateShoot() + { + return new Shoot(rECOIL_TIME_NORMALIZE: 2, rECOIL_PER_METER: 0.1, mAX_RECOIL_PER_METER: 0.2, + hORIZONT_RECOIL_COEF: 0.4, wAIT_NEXT_SINGLE_SHOT: 0.3, wAIT_NEXT_SINGLE_SHOT_LONG_MAX: 3.3, wAIT_NEXT_SINGLE_SHOT_LONG_MIN: 0.8, + mARKSMAN_DIST_SEK_COEF: 44, fINGER_HOLD_SINGLE_SHOT: 0.14, bASE_AUTOMATIC_TIME: 0.1, aUTOMATIC_FIRE_SCATTERING_COEF: 1.5, + cHANCE_TO_CHANGE_TO_AUTOMATIC_FIRE_100: 76, fAR_DIST_ENEMY: 20, sHOOT_FROM_COVER: 4, fAR_DIST_ENEMY_SQR: 400, + mAX_DIST_COEF: 1.35, rECOIL_DELTA_PRESS: 0.15, rUN_DIST_NO_AMMO: 25, rUN_DIST_NO_AMMO_SQRT: 625, + cAN_SHOOTS_TIME_TO_AMBUSH: 333, nOT_TO_SEE_ENEMY_TO_WANT_RELOAD_PERCENT: 0.5, nOT_TO_SEE_ENEMY_TO_WANT_RELOAD_SEC: 2, + rELOAD_PECNET_NO_ENEMY: 0.6, cHANCE_TO_CHANGE_WEAPON: 0, cHANCE_TO_CHANGE_WEAPON_WITH_HELMET: 0, + lOW_DIST_TO_CHANGE_WEAPON: 10, fAR_DIST_TO_CHANGE_WEAPON: 50, sUPPRESS_BY_SHOOT_TIME: 6, sUPPRESS_TRIGGERS_DOWN: 3, + wAIT_NEXT_STATIONARY_GRENADE: 1, fINGER_HOLD_STATIONARY_GRENADE: 0.3); + } + + public static Look GenerateLook() + { + return new Look(oLD_TIME_POINT: 11, wAIT_NEW_SENSOR: 2.1,wAIT_NEW__LOOK_SENSOR: 7.8, lOOK_AROUND_DELTA: 1.1, + mAX_VISION_GRASS_METERS: 0.4, mAX_VISION_GRASS_METERS_FLARE: 7,mAX_VISION_GRASS_METERS_OPT: 0.9090909, + mAX_VISION_GRASS_METERS_FLARE_OPT: 0.125, lightOnVisionDistance: 30, + fAR_DISTANCE: 160, farDeltaTimeSec: 3, mIDDLE_DIST: 90, middleDeltaTimeSec: 1, closeDeltaTimeSec: 0.1, + pOSIBLE_VISION_SPACE: 1.2, gOAL_TO_FULL_DISSAPEAR: 0.25, gOAL_TO_FULL_DISSAPEAR_SHOOT: 0.0001, bODY_DELTA_TIME_SEARCH_SEC: 1.7, + cOME_TO_BODY_DIST: 1.2, mARKSMAN_VISIBLE_DIST_COEF: 1.15, vISIBLE_DISNACE_WITH_LIGHT: 43, eNEMY_LIGHT_ADD: 45, + eNEMY_LIGHT_START_DIST: 40, cAN_LOOK_TO_WALL: false, dIST_NOT_TO_IGNORE_WALL: 15, dIST_CHECK_WALL: 20, + lOOK_LAST_POSENEMY_IF_NO_DANGER_SEC: 25, mIN_LOOK_AROUD_TIME: 20, oPTIMIZE_TO_ONLY_BODY: true); + } + + public static Aiming GenerateAiming() + { + return new Aiming(mAX_AIM_PRECICING: 4, bETTER_PRECICING_COEF: 0.7, rECALC_DIST: 0.7, rECALC_SQR_DIST: 0.48999998, + cOEF_FROM_COVER: 0.8, pANIC_COEF: 1.2, pANIC_ACCURATY_COEF: 1.2, hARD_AIM: 0.75, pANIC_TIME: 2, rECALC_MUST_TIME: 3, + dAMAGE_PANIC_TIME: 15, dANGER_UP_POINT: 1.3, mAX_AIMING_UPGRADE_BY_TIME: 0.85, dAMAGE_TO_DISCARD_AIM_0_100: 100, + mIN_TIME_DISCARD_AIM_SEC: 2.9, mAX_TIME_DISCARD_AIM_SEC: 3.2, xZ_COEF: 0.75, sHOOT_TO_CHANGE_PRIORITY: 5525, + bOTTOM_COEF: 0.3, fIRST_CONTACT_ADD_SEC: 0.1, fIRST_CONTACT_ADD_CHANCE_100: 80, bASE_HIT_AFFECTION_DELAY_SEC: 1.77, + bASE_HIT_AFFECTION_MIN_ANG: 14, bASE_HIT_AFFECTION_MAX_ANG: 28, bASE_SHIEF: 1, sCATTERING_HAVE_DAMAGE_COEF: 2, + sCATTERING_DIST_MODIF: 0.7, sCATTERING_DIST_MODIF_CLOSE: 0.85, aIMING_TYPE: 5, dIST_TO_SHOOT_TO_CENTER: 3, + dIST_TO_SHOOT_NO_OFFSET: 3, sHPERE_FRIENDY_FIRE_SIZE: -1, cOEF_IF_MOVE: 1.9, tIME_COEF_IF_MOVE: 1.5, bOT_MOVE_IF_DELTA: 0.01, + nEXT_SHOT_MISS_CHANCE_100: 100, nEXT_SHOT_MISS_Y_OFFSET: 1, aNYTIME_LIGHT_WHEN_AIM_100: -1, aNY_PART_SHOOT_TIME: 30, + wEAPON_ROOT_OFFSET: 0.35, mIN_DAMAGE_TO_GET_HIT_AFFETS: 1, mAX_AIM_TIME: 1.5, oFFSET_RECAL_ANYWAY_TIME: 1, y_TOP_OFFSET_COEF: 0.001, + y_BOTTOM_OFFSET_COEF: 0.015, bASE_SHIEF_STATIONARY_GRENADE: 1.1, xZ_COEF_STATIONARY_GRENADE: 0.8, dEAD_BODY_LOOK_PERIOD: 8, + cAN_HARD_AIM: true); + } + } +} diff --git a/Generator/Helpers/DifficultyHelper.cs b/Generator/Helpers/DifficultyHelper.cs new file mode 100644 index 0000000..c713551 --- /dev/null +++ b/Generator/Helpers/DifficultyHelper.cs @@ -0,0 +1,81 @@ +using Generator.Models.Output; + +namespace Generator.Helpers +{ + public static class DifficultyHelper + { + public static void AddAssaultDifficulties(Bot bot) + { + bot.difficulty.easy = new Models.Output.Difficulty.DifficultySettings + { + Lay = EasyHelper.GenerateLay(), + Aiming = EasyHelper.GenerateAiming(), + Look = EasyHelper.GenerateLook(), + Shoot = EasyHelper.GenerateShoot(), + Move = EasyHelper.GenerateMove(), + Grenade = EasyHelper.GenerateGrenade(), + Change = EasyHelper.GenerateChange(), + Cover = EasyHelper.GenerateCover(), + Patrol = EasyHelper.GeneratePatrol(), + Hearing = EasyHelper.GenerateHearing(), + Mind = EasyHelper.GenerateMind(), + Boss = EasyHelper.GenerateBoss(), + Core = EasyHelper.GenerateCore(), + Scattering = EasyHelper.GenerateScattering() + }; + + bot.difficulty.normal = new Models.Output.Difficulty.DifficultySettings(){ + Lay = NormalHelper.GenerateLay(), + Aiming = NormalHelper.GenerateAiming(), + Look = NormalHelper.GenerateLook(), + Shoot = NormalHelper.GenerateShoot(), + Move = NormalHelper.GenerateMove(), + Grenade = NormalHelper.GenerateGrenade(), + Change = NormalHelper.GenerateChange(), + Cover = NormalHelper.GenerateCover(), + Patrol = NormalHelper.GeneratePatrol(), + Hearing = NormalHelper.GenerateHearing(), + Mind = NormalHelper.GenerateMind(), + Boss = NormalHelper.GenerateBoss(), + Core = NormalHelper.GenerateCore(), + Scattering = NormalHelper.GenerateScattering() + }; + + bot.difficulty.hard = new Models.Output.Difficulty.DifficultySettings() + { + Lay = DifficultHelper.GenerateLay(), + Aiming = DifficultHelper.GenerateAiming(), + Look = DifficultHelper.GenerateLook(), + Shoot = DifficultHelper.GenerateShoot(), + Move = DifficultHelper.GenerateMove(), + Grenade = DifficultHelper.GenerateGrenade(), + Change = DifficultHelper.GenerateChange(), + Cover = DifficultHelper.GenerateCover(), + Patrol = DifficultHelper.GeneratePatrol(), + Hearing = DifficultHelper.GenerateHearing(), + Mind = DifficultHelper.GenerateMind(), + Boss = DifficultHelper.GenerateBoss(), + Core = DifficultHelper.GenerateCore(), + Scattering = DifficultHelper.GenerateScattering() + }; + bot.difficulty.impossible = new Models.Output.Difficulty.DifficultySettings() + { + Lay = ImpossibleHelper.GenerateLay(), + Aiming = ImpossibleHelper.GenerateAiming(), + Look = ImpossibleHelper.GenerateLook(), + Shoot = ImpossibleHelper.GenerateShoot(), + Move = ImpossibleHelper.GenerateMove(), + Grenade = ImpossibleHelper.GenerateGrenade(), + Change = ImpossibleHelper.GenerateChange(), + Cover = ImpossibleHelper.GenerateCover(), + Patrol = ImpossibleHelper.GeneratePatrol(), + Hearing = ImpossibleHelper.GenerateHearing(), + Mind = ImpossibleHelper.GenerateMind(), + Boss = ImpossibleHelper.GenerateBoss(), + Core = ImpossibleHelper.GenerateCore(), + Scattering = ImpossibleHelper.GenerateScattering() + }; + } + + } +} diff --git a/Generator/Helpers/EasyHelper.cs b/Generator/Helpers/EasyHelper.cs new file mode 100644 index 0000000..d14e00c --- /dev/null +++ b/Generator/Helpers/EasyHelper.cs @@ -0,0 +1,181 @@ +using Generator.Models.Output.Difficulty; + +namespace Generator.Helpers +{ + public static class EasyHelper + { + public static Lay GenerateLay() + { + return new Lay(cHECK_SHOOT_WHEN_LAYING: false, dELTA_LAY_CHECK: 2, dELTA_GETUP: 2.7, dELTA_AFTER_GETUP: 10, + cLEAR_POINTS_OF_SCARE_SEC: 20, mAX_LAY_TIME: 35, dELTA_WANT_LAY_CHECL_SEC: 5, aTTACK_LAY_CHANCE: 25, + dIST_TO_COVER_TO_LAY: 3.5, dIST_TO_COVER_TO_LAY_SQRT: 12.25, dIST_GRASS_TERRAIN_SQRT: 0.160000011, dIST_ENEMY_NULL_DANGER_LAY: 15, + dIST_ENEMY_NULL_DANGER_LAY_SQRT: 225, dIST_ENEMY_GETUP_LAY: 10, dIST_ENEMY_GETUP_LAY_SQRT: 100, dIST_ENEMY_CAN_LAY: 15, + dIST_ENEMY_CAN_LAY_SQRT: 225, lAY_AIM: 0.6, mIN_CAN_LAY_DIST_SQRT: 121, mIN_CAN_LAY_DIST: 11, + mAX_CAN_LAY_DIST_SQRT: 40000, mAX_CAN_LAY_DIST: 200, lAY_CHANCE_DANGER: 40, dAMAGE_TIME_TO_GETUP: 3); + } + + public static Core GenerateCore() + { + return new Core(visibleAngle: 130, visibleDistance: 110, gainSightCoef: 0.2, + scatteringPerMeter: 0.12, scatteringClosePerMeter: 0.12, damageCoeff: 1, hearingSense: 1.05, + canRun: true, canGrenade: true, aimingType: "normal", pistolFireDistancePref: 35, + shotgunFireDistancePref: 50, rifleFireDistancePref: 100, accuratySpeed: 0.3, waitInCoverBetweenShotsSec: 1.5); + } + + public static Scattering GenerateScattering() + { + return new Scattering(minScatter: 0.015, workingScatter: 0.15, maxScatter: 0.3, + speedUp: 0.6, speedUpAim: 1.8, speedDown: -0.2, toSlowBotSpeed: 1.8, toLowBotSpeed: 2.8, toUpBotSpeed: 4.3, + movingSlowCoef: 1.4, toLowBotAngularSpeed: 140, toStopBotAngularSpeed: 80, fromShot: 0.001, tracerCoef: 1.3, + handDamageScatteringMinMax: 0.7, handDamageAccuracySpeed: 1.3, bloodFall: 1.45, caution: 0.03, toCaution: 0.6, + recoilControlCoefShootDone: 0.0003, recoilControlCoefShootDoneAuto: 0.00015, aMPLITUDE_FACTOR: 0.015, + aMPLITUDE_SPEED: 0.001, dIST_FROM_OLD_POINT_TO_NOT_AIM: 15, dIST_FROM_OLD_POINT_TO_NOT_AIM_SQRT: 225, + dIST_NOT_TO_SHOOT: 0.3, poseChnageCoef: 0.1, layFactor: 0.1, recoilYCoef: 0.0005, recoilYCoefSppedDown: -0.52, recoilYMax: 1); + } + + public static Boss GenerateBoss() + { + return new Boss(bOSS_DIST_TO_WARNING: 34, bOSS_DIST_TO_WARNING_SQRT: 1156, bOSS_DIST_TO_WARNING_OUT: 43, + bOSS_DIST_TO_WARNING_OUT_SQRT: 1849, bOSS_DIST_TO_SHOOT: 16, bOSS_DIST_TO_SHOOT_SQRT: 256, cHANCE_TO_SEND_GRENADE_100: 100, + mAX_DIST_COVER_BOSS: 25, mAX_DIST_COVER_BOSS_SQRT: 625, mAX_DIST_DECIDER_TO_SEND: 35, mAX_DIST_DECIDER_TO_SEND_SQRT: 1225, + tIME_AFTER_LOSE: 15, tIME_AFTER_LOSE_DELTA: 60, pERSONS_SEND: 2, dELTA_SEARCH_TIME: 18, + cOVER_TO_SEND: true, wAIT_NO_ATTACK_SAVAGE: 10, cHANCE_USE_RESERVE_PATROL_100: 50, kILLA_Y_DELTA_TO_BE_ENEMY_BOSS: 5, + kILLA_DITANCE_TO_BE_ENEMY_BOSS: 45, kILLA_START_SEARCH_SEC: 40, kILLA_CONTUTION_TIME: 5, kILLA_CLOSE_ATTACK_DIST: 8, + kILLA_MIDDLE_ATTACK_DIST: 22, kILLA_LARGE_ATTACK_DIST: 41, kILLA_SEARCH_METERS: 30, kILLA_DEF_DIST_SQRT: 225, + kILLA_SEARCH_SEC_STOP_AFTER_COMING: 25, kILLA_DIST_TO_GO_TO_SUPPRESS: 6, kILLA_AFTER_GRENADE_SUPPRESS_DELAY: 2, + kILLA_CLOSEATTACK_TIMES: 3, kILLA_CLOSEATTACK_DELAY: 10, kILLA_HOLD_DELAY: 5, kILLA_BULLET_TO_RELOAD: 15, + sHALL_WARN: true, kILLA_ENEMIES_TO_ATTACK: 3, kILLA_ONE_IS_CLOSE: 30, kILLA_TRIGGER_DOWN_DELAY: 1, kILLA_WAIT_IN_COVER_COEF: 1, + kOJANIY_DIST_WHEN_READY: 40, kOJANIY_DIST_TO_BE_ENEMY: 200, kOJANIY_MIN_DIST_TO_LOOT: 20, kOJANIY_MIN_DIST_TO_LOOT_SQRT: 400, + kOJANIY_DIST_ENEMY_TOO_CLOSE: 17, kOJANIY_MANY_ENEMIES_COEF: 1.5); + } + + public static Mind GenerateMind() + { + return new Mind(hOW_WORK_OVER_DEAD_BODY: 2, mIN_SHOOTS_TIME: 2, mAX_SHOOTS_TIME: 4, + tIME_LEAVE_MAP: 23, tIME_TO_RUN_TO_COVER_CAUSE_SHOOT_SEC: 15, dAMAGE_REDUCTION_TIME_SEC: 20, mIN_DAMAGE_SCARE: 20, + cHANCE_TO_RUN_CAUSE_DAMAGE_0_100: 35, tIME_TO_FORGOR_ABOUT_ENEMY_SEC: 52, tIME_TO_FIND_ENEMY: 22, mAX_AGGRO_BOT_DIST: 100, + hIT_POINT_DETECTION: 4, dANGER_POINT_CHOOSE_COEF: 1, sIMPLE_POINT_CHOOSE_COEF: 0.4, lASTSEEN_POINT_CHOOSE_COEF: 0.2, + cOVER_DIST_COEF: 1.5, dIST_TO_FOUND_SQRT: 400, mAX_AGGRO_BOT_DIST_SQR: 10000, dIST_TO_STOP_RUN_ENEMY: 15, + eNEMY_LOOK_AT_ME_ANG: 15, mIN_START_AGGRESION_COEF: 1, mAX_START_AGGRESION_COEF: 3, bULLET_FEEL_DIST: 360, + bULLET_FEEL_CLOSE_SDIST: 1, aTTACK_IMMEDIATLY_CHANCE_0_100: 40, cHANCE_FUCK_YOU_ON_CONTACT_100: 10, fRIEND_DEAD_AGR_LOW: -0.2, + fRIEND_AGR_KILL: 0.2, lAST_ENEMY_LOOK_TO: 40, cAN_RECIVE_PLAYER_REQUESTS: true, cAN_TAKE_ITEMS: true, + cAN_USE_MEDS: true, sUSPETION_POINT_CHANCE_ADD100: 0, aMBUSH_WHEN_UNDER_FIRE: true, aMBUSH_WHEN_UNDER_FIRE_TIME_RESIST: 60, + aTTACK_ENEMY_IF_PROTECT_DELTA_LAST_TIME_SEEN: 1.5, hOLD_IF_PROTECT_DELTA_LAST_TIME_SEEN: 8.5, fIND_COVER_TO_GET_POSITION_WITH_SHOOT: 2, + pROTECT_TIME_REAL: true, cHANCE_SHOOT_WHEN_WARN_PLAYER_100: 25, cAN_PANIC_IS_PROTECT: false, nO_RUN_AWAY_FOR_SAFE: false, + pART_PERCENT_TO_HEAL: 0.65, pROTECT_DELTA_HEAL_SEC: 10, cAN_STAND_BY: true, cAN_THROW_REQUESTS: true, + gROUP_ANY_PHRASE_DELAY: 4, gROUP_EXACTLY_PHRASE_DELAY: 4, dIST_TO_ENEMY_YO_CAN_HEAL: 30, cHANCE_TO_STAY_WHEN_WARN_PLAYER_100: 80, + dOG_FIGHT_OUT: 6, dOG_FIGHT_IN: 3, sHOOT_INSTEAD_DOG_FIGHT: 9, pISTOL_SHOTGUN_AMBUSH_DIST: 60, + sTANDART_AMBUSH_DIST: 200, aI_POWER_COEF: 120, cOVER_SECONDS_AFTER_LOSE_VISION: 10, cOVER_SELF_ALWAYS_IF_DAMAGED: false, + sEC_TO_MORE_DIST_TO_RUN: 10, hEAL_DELAY_SEC: 5, hIT_DELAY_WHEN_HAVE_SMT: -1, hIT_DELAY_WHEN_PEACE: -1, + tALK_WITH_QUERY: true, wILL_PERSUE_AXEMAN: true); + } + + internal static Hearing GenerateHearing() + { + return new Hearing(bOT_CLOSE_PANIC_DIST: 2, cHANCE_TO_HEAR_SIMPLE_SOUND_0_1: 0.45, + dISPERSION_COEF: 1.6, cLOSE_DIST: 10, fAR_DIST: 30, sOUND_DIR_DEEFREE: 30, dIST_PLACE_TO_FIND_POINT: 70, + dEAD_BODY_SOUND_RAD: 30, lOOK_ONLY_DANGER: false, rESET_TIMER_DIST: 17, hEAR_DELAY_WHEN_PEACE: 0.85, + hEAR_DELAY_WHEN_HAVE_SMT: 0.56, lOOK_ONLY_DANGER_DELTA: 9); + } + + public static Patrol GeneratePatrol() + { + return new Patrol(dEAD_BODY_LOOK_PERIOD: 8, lOOK_TIME_BASE: 12, cAN_CHOOSE_RESERV: true, + tRY_CHOOSE_RESERV_WAY_ON_START: false, cAN_LOOK_TO_DEADBODIES: true, cAN_FRIENDLY_TILT: true, + cAN_HARD_AIM: true, rESERVE_TIME_STAY: 72, fRIEND_SEARCH_SEC: 12, tALK_DELAY: 1.1, + mIN_TALK_DELAY: 35, tALK_DELAY_BIG: 15.1, cHANGE_WAY_TIME: 125.1, mIN_DIST_TO_CLOSE_TALK: 5, + vISION_DIST_COEF_PEACE: 0.5, mIN_DIST_TO_CLOSE_TALK_SQR: 25, cHANCE_TO_CUT_WAY_0_100: 75, cUT_WAY_MIN_0_1: 0.4, + cUT_WAY_MAX_0_1: 0.65, cHANCE_TO_CHANGE_WAY_0_100: 50, cHANCE_TO_SHOOT_DEADBODY: 52, sUSPETION_PLACE_LIFETIME: 7, + rESERVE_OUT_TIME: 30, cLOSE_TO_SELECT_RESERV_WAY: 25, mAX_YDIST_TO_START_WARN_REQUEST_TO_REQUESTER: 5); + } + + public static Cover GenerateCover() + { + return new Cover(rETURN_TO_ATTACK_AFTER_AMBUSH_MIN: 20, rETURN_TO_ATTACK_AFTER_AMBUSH_MAX: 50, + sOUND_TO_GET_SPOTTED: 2, tIME_TO_MOVE_TO_COVER: 15, mAX_DIST_OF_COVER: 4, cHANGE_RUN_TO_COVER_SEC: 5, + cHANGE_RUN_TO_COVER_SEC_GREANDE: 0.6, mIN_DIST_TO_ENEMY: 9, dIST_CANT_CHANGE_WAY: 5, dIST_CHECK_SFETY: 9, + tIME_CHECK_SAFE: 2, hIDE_TO_COVER_TIME: 1.5, mAX_DIST_OF_COVER_SQR: 16, dIST_CANT_CHANGE_WAY_SQR: 25, + sPOTTED_COVERS_RADIUS: 3, lOOK_LAST_ENEMY_POS_MOVING: 1.5, lOOK_TO_HIT_POINT_IF_LAST_ENEMY: 3, lOOK_LAST_ENEMY_POS_LOOKAROUND: 45, + oFFSET_LOOK_ALONG_WALL_ANG: 20, sPOTTED_GRENADE_RADIUS: 16, mAX_SPOTTED_TIME_SEC: 45, wAIT_INT_COVER_FINDING_ENEMY: 2, + cLOSE_DIST_POINT_SQRT: 4, dELTA_SEEN_FROM_COVE_LAST_POS: 15, mOVE_TO_COVER_WHEN_TARGET: false, rUN_COVER_IF_CAN_AND_NO_ENEMIES: false, + sPOTTED_GRENADE_TIME: 7, dEPENDS_Y_DIST_TO_BOT: false, rUN_IF_FAR: 10, rUN_IF_FAR_SQRT: 225, + sTAY_IF_FAR: 25, sTAY_IF_FAR_SQRT: 625, cHECK_COVER_ENEMY_LOOK: true, sHOOT_NEAR_TO_LEAVE: 2, + sHOOT_NEAR_SEC_PERIOD: 0.5, hITS_TO_LEAVE_COVER: 1, hITS_TO_LEAVE_COVER_UNKNOWN: 1, dOG_FIGHT_AFTER_LEAVE: 4, + nOT_LOOK_AT_WALL_IS_DANGER: true, mIN_DEFENCE_LEVEL: 22, gOOD_DIST_TO_POINT_COEF: 1.8, eNEMY_DIST_TO_GO_OUT: 1, + sTATIONARY_WEAPON_NO_ENEMY_GETUP: 20, sTATIONARY_WEAPON_MAX_DIST_TO_USE: 25); + } + + public static Change GenerateChange() + { + return new Change(sMOKE_VISION_DIST: 0.6, sMOKE_GAIN_SIGHT: 1.6, sMOKE_SCATTERING: 1.6, + sMOKE_PRECICING: 1.6, sMOKE_HEARING: 1, sMOKE_ACCURATY: 1.6, sMOKE_LAY_CHANCE: 1.6, + fLASH_VISION_DIST: 0.05, fLASH_GAIN_SIGHT: 1.8, fLASH_SCATTERING: 1.6, fLASH_PRECICING: 1.6, + fLASH_HEARING: 1, fLASH_ACCURATY: 1.6, fLASH_LAY_CHANCE: 1, sTUN_HEARING: 0.01); + } + + public static Grenade GenerateGrenade() + { + return new Grenade(dELTA_NEXT_ATTEMPT_FROM_COVER: 5, dELTA_NEXT_ATTEMPT: 10, mIN_DIST_NOT_TO_THROW: 8, + nEAR_DELTA_THROW_TIME_SEC: 2, mIN_THROW_GRENADE_DIST: 12, mIN_THROW_GRENADE_DIST_SQRT: 144, mIN_DIST_NOT_TO_THROW_SQR: 64, + rUN_AWAY: 22, rUN_AWAY_SQR: 484, aDD_GRENADE_AS_DANGER: 65, aDD_GRENADE_AS_DANGER_SQR: 4225, + cHANCE_TO_NOTIFY_ENEMY_GR_100: 99, grenadePerMeter: 0.2, rEQUEST_DIST_MUST_THROW_SQRT: 4, rEQUEST_DIST_MUST_THROW: 2, + bEWARE_TYPE: 2, sHOOT_TO_SMOKE_CHANCE_100: 30, cHANCE_RUN_FLASHED_100: 0, mAX_FLASHED_DIST_TO_SHOOT: 10, + mAX_FLASHED_DIST_TO_SHOOT_SQRT: 100, fLASH_GRENADE_TIME_COEF: 0.3, sIZE_SPOTTED_COEF: 2, bE_ATTENTION_COEF: 4, + tIME_SHOOT_TO_FLASH: 4, cLOSE_TO_SMOKE_TO_SHOOT: 5, cLOSE_TO_SMOKE_TO_SHOOT_SQRT: 25, cLOSE_TO_SMOKE_TIME_DELTA: 7, + sMOKE_CHECK_DELTA: 1, dELTA_GRENADE_START_TIME: 0.7, aMBUSH_IF_SMOKE_IN_ZONE_100: 40, aMBUSH_IF_SMOKE_RETURN_TO_ATTACK_SEC: 30, + nO_RUN_FROM_AI_GRENADES: false, mAX_THROW_POWER: 15.7, grenadePrecision: 0.3, sTOP_WHEN_THROW_GRENADE: true, + wAIT_TIME_TURN_AWAY: 0.2, sMOKE_SUPPRESS_DELTA: 20, dAMAGE_GRENADE_SUPPRESS_DELTA: 8, sTUN_SUPPRESS_DELTA: 9, + cHEAT_START_GRENADE_PLACE: false, cAN_THROW_STRAIGHT_CONTACT: true, sTRAIGHT_CONTACT_DELTA_SEC: -1, aNG_TYPE: 4); + } + + public static Move GenerateMove() + { + return new Move(bASE_ROTATE_SPEED: 270, rEACH_DIST: 0.5, rEACH_DIST_RUN: 0.8, sTART_SLOW_DIST: 1.5, + bASESTART_SLOW_DIST: 1.1, sLOW_COEF: 7, dIST_TO_CAN_CHANGE_WAY: 8, dIST_TO_START_RAYCAST: 15, bASE_START_SERACH: 35, + uPDATE_TIME_RECAL_WAY: 7, fAR_DIST: 4, fAR_DIST_SQR: 16, dIST_TO_CAN_CHANGE_WAY_SQR: 64, dIST_TO_START_RAYCAST_SQR: 225, + bASE_SQRT_START_SERACH: 1225, y_APPROXIMATION: 0.7, dELTA_LAST_SEEN_ENEMY: 20, rEACH_DIST_COVER: 2, rUN_TO_COVER_MIN: 2, + cHANCE_TO_RUN_IF_NO_AMMO_0_100: 100, rUN_IF_CANT_SHOOT: false, rUN_IF_GAOL_FAR_THEN: 10, sEC_TO_CHANGE_TO_RUN: 3); + } + + public static Shoot GenerateShoot() + { + return new Shoot(rECOIL_TIME_NORMALIZE: 2, rECOIL_PER_METER: 0.1, mAX_RECOIL_PER_METER: 0.2, + hORIZONT_RECOIL_COEF: 0.4, wAIT_NEXT_SINGLE_SHOT: 0.3, wAIT_NEXT_SINGLE_SHOT_LONG_MAX: 3.3, wAIT_NEXT_SINGLE_SHOT_LONG_MIN: 0.8, + mARKSMAN_DIST_SEK_COEF: 44, fINGER_HOLD_SINGLE_SHOT: 0.14, bASE_AUTOMATIC_TIME: 0.1, aUTOMATIC_FIRE_SCATTERING_COEF: 1.5, + cHANCE_TO_CHANGE_TO_AUTOMATIC_FIRE_100: 76, fAR_DIST_ENEMY: 20, sHOOT_FROM_COVER: 4, fAR_DIST_ENEMY_SQR: 400, + mAX_DIST_COEF: 1.35, rECOIL_DELTA_PRESS: 0.15, rUN_DIST_NO_AMMO: 25, rUN_DIST_NO_AMMO_SQRT: 625, + cAN_SHOOTS_TIME_TO_AMBUSH: 333, nOT_TO_SEE_ENEMY_TO_WANT_RELOAD_PERCENT: 0.5, nOT_TO_SEE_ENEMY_TO_WANT_RELOAD_SEC: 2, + rELOAD_PECNET_NO_ENEMY: 0.6, cHANCE_TO_CHANGE_WEAPON: 0, cHANCE_TO_CHANGE_WEAPON_WITH_HELMET: 0, + lOW_DIST_TO_CHANGE_WEAPON: 10, fAR_DIST_TO_CHANGE_WEAPON: 50, sUPPRESS_BY_SHOOT_TIME: 6, sUPPRESS_TRIGGERS_DOWN: 3, + wAIT_NEXT_STATIONARY_GRENADE: 1, fINGER_HOLD_STATIONARY_GRENADE: 0.3); + } + + public static Look GenerateLook() + { + return new Look(oLD_TIME_POINT: 11, wAIT_NEW_SENSOR: 2.1,wAIT_NEW__LOOK_SENSOR: 7.8, lOOK_AROUND_DELTA: 1.1, + mAX_VISION_GRASS_METERS: 0.4, mAX_VISION_GRASS_METERS_FLARE: 7,mAX_VISION_GRASS_METERS_OPT: 0.9090909, + mAX_VISION_GRASS_METERS_FLARE_OPT: 0.125, lightOnVisionDistance: 30, + fAR_DISTANCE: 160, farDeltaTimeSec: 3, mIDDLE_DIST: 90, middleDeltaTimeSec: 1, closeDeltaTimeSec: 0.1, + pOSIBLE_VISION_SPACE: 1.2, gOAL_TO_FULL_DISSAPEAR: 0.25, gOAL_TO_FULL_DISSAPEAR_SHOOT: 0.0001, bODY_DELTA_TIME_SEARCH_SEC: 1.7, + cOME_TO_BODY_DIST: 1.2, mARKSMAN_VISIBLE_DIST_COEF: 1.15, vISIBLE_DISNACE_WITH_LIGHT: 43, eNEMY_LIGHT_ADD: 45, + eNEMY_LIGHT_START_DIST: 40, cAN_LOOK_TO_WALL: false, dIST_NOT_TO_IGNORE_WALL: 15, dIST_CHECK_WALL: 20, + lOOK_LAST_POSENEMY_IF_NO_DANGER_SEC: 25, mIN_LOOK_AROUD_TIME: 20, oPTIMIZE_TO_ONLY_BODY: true); + } + + public static Aiming GenerateAiming() + { + return new Aiming(mAX_AIM_PRECICING: 4, bETTER_PRECICING_COEF: 0.7, rECALC_DIST: 0.7, rECALC_SQR_DIST: 0.48999998, + cOEF_FROM_COVER: 0.8, pANIC_COEF: 1.2, pANIC_ACCURATY_COEF: 1.2, hARD_AIM: 0.75, pANIC_TIME: 2, rECALC_MUST_TIME: 3, + dAMAGE_PANIC_TIME: 15, dANGER_UP_POINT: 1.3, mAX_AIMING_UPGRADE_BY_TIME: 0.85, dAMAGE_TO_DISCARD_AIM_0_100: 100, + mIN_TIME_DISCARD_AIM_SEC: 2.9, mAX_TIME_DISCARD_AIM_SEC: 3.2, xZ_COEF: 0.75, sHOOT_TO_CHANGE_PRIORITY: 5525, + bOTTOM_COEF: 0.3, fIRST_CONTACT_ADD_SEC: 0.1, fIRST_CONTACT_ADD_CHANCE_100: 80, bASE_HIT_AFFECTION_DELAY_SEC: 1.77, + bASE_HIT_AFFECTION_MIN_ANG: 14, bASE_HIT_AFFECTION_MAX_ANG: 28, bASE_SHIEF: 1, sCATTERING_HAVE_DAMAGE_COEF: 2, + sCATTERING_DIST_MODIF: 0.7, sCATTERING_DIST_MODIF_CLOSE: 0.85, aIMING_TYPE: 5, dIST_TO_SHOOT_TO_CENTER: 3, + dIST_TO_SHOOT_NO_OFFSET: 3, sHPERE_FRIENDY_FIRE_SIZE: -1, cOEF_IF_MOVE: 1.9, tIME_COEF_IF_MOVE: 1.5, bOT_MOVE_IF_DELTA: 0.01, + nEXT_SHOT_MISS_CHANCE_100: 100, nEXT_SHOT_MISS_Y_OFFSET: 1, aNYTIME_LIGHT_WHEN_AIM_100: -1, aNY_PART_SHOOT_TIME: 30, + wEAPON_ROOT_OFFSET: 0.35, mIN_DAMAGE_TO_GET_HIT_AFFETS: 1, mAX_AIM_TIME: 1.5, oFFSET_RECAL_ANYWAY_TIME: 1, y_TOP_OFFSET_COEF: 0.001, + y_BOTTOM_OFFSET_COEF: 0.015, bASE_SHIEF_STATIONARY_GRENADE: 1.1, xZ_COEF_STATIONARY_GRENADE: 0.8, dEAD_BODY_LOOK_PERIOD: 8, + cAN_HARD_AIM: true); + } + } +} diff --git a/Generator/Helpers/ImpossibleHelper.cs b/Generator/Helpers/ImpossibleHelper.cs new file mode 100644 index 0000000..6e97396 --- /dev/null +++ b/Generator/Helpers/ImpossibleHelper.cs @@ -0,0 +1,181 @@ +using Generator.Models.Output.Difficulty; + +namespace Generator.Helpers +{ + public static class ImpossibleHelper + { + public static Lay GenerateLay() + { + return new Lay(cHECK_SHOOT_WHEN_LAYING: false, dELTA_LAY_CHECK: 2, dELTA_GETUP: 2.7, dELTA_AFTER_GETUP: 10, + cLEAR_POINTS_OF_SCARE_SEC: 20, mAX_LAY_TIME: 35, dELTA_WANT_LAY_CHECL_SEC: 5, aTTACK_LAY_CHANCE: 25, + dIST_TO_COVER_TO_LAY: 3.5, dIST_TO_COVER_TO_LAY_SQRT: 12.5, dIST_GRASS_TERRAIN_SQRT: 0.160000011, dIST_ENEMY_NULL_DANGER_LAY: 15, + dIST_ENEMY_NULL_DANGER_LAY_SQRT: 225, dIST_ENEMY_GETUP_LAY: 10, dIST_ENEMY_GETUP_LAY_SQRT: 100, dIST_ENEMY_CAN_LAY: 15, + dIST_ENEMY_CAN_LAY_SQRT: 225, lAY_AIM: 0.6, mIN_CAN_LAY_DIST_SQRT: 121, mIN_CAN_LAY_DIST: 11, + mAX_CAN_LAY_DIST_SQRT: 40000, mAX_CAN_LAY_DIST: 200, lAY_CHANCE_DANGER: 40, dAMAGE_TIME_TO_GETUP: 3); + } + + public static Core GenerateCore() + { + return new Core(visibleAngle: 140, visibleDistance: 130, gainSightCoef: 0.1, + scatteringPerMeter: 0.1, scatteringClosePerMeter: 0.1, damageCoeff: 1, hearingSense: 2.85, + canRun: true, canGrenade: true, aimingType: "normal", pistolFireDistancePref: 35, + shotgunFireDistancePref: 50, rifleFireDistancePref: 100, accuratySpeed: 0.3, waitInCoverBetweenShotsSec: 1.5); + } + + public static Scattering GenerateScattering() + { + return new Scattering(minScatter: 0.015, workingScatter: 0.15, maxScatter: 0.3, + speedUp: 0.6, speedUpAim: 1.8, speedDown: -0.2, toSlowBotSpeed: 1.8, toLowBotSpeed: 2.8, toUpBotSpeed: 4.3, + movingSlowCoef: 1.4, toLowBotAngularSpeed: 140, toStopBotAngularSpeed: 80, fromShot: 0.001, tracerCoef: 1.3, + handDamageScatteringMinMax: 0.7, handDamageAccuracySpeed: 1.3, bloodFall: 1.45, caution: 0.03, toCaution: 0.6, + recoilControlCoefShootDone: 0.0003, recoilControlCoefShootDoneAuto: 0.00015, aMPLITUDE_FACTOR: 0.015, + aMPLITUDE_SPEED: 0.001, dIST_FROM_OLD_POINT_TO_NOT_AIM: 15, dIST_FROM_OLD_POINT_TO_NOT_AIM_SQRT: 225, + dIST_NOT_TO_SHOOT: 0.3, poseChnageCoef: 0.1, layFactor: 0.1, recoilYCoef: 0.0005, recoilYCoefSppedDown: -0.52, recoilYMax: 1); + } + + public static Boss GenerateBoss() + { + return new Boss(bOSS_DIST_TO_WARNING: 34, bOSS_DIST_TO_WARNING_SQRT: 1156, bOSS_DIST_TO_WARNING_OUT: 43, + bOSS_DIST_TO_WARNING_OUT_SQRT: 1849, bOSS_DIST_TO_SHOOT: 16, bOSS_DIST_TO_SHOOT_SQRT: 256, cHANCE_TO_SEND_GRENADE_100: 100, + mAX_DIST_COVER_BOSS: 25, mAX_DIST_COVER_BOSS_SQRT: 625, mAX_DIST_DECIDER_TO_SEND: 35, mAX_DIST_DECIDER_TO_SEND_SQRT: 1225, + tIME_AFTER_LOSE: 15, tIME_AFTER_LOSE_DELTA: 60, pERSONS_SEND: 2, dELTA_SEARCH_TIME: 18, + cOVER_TO_SEND: true, wAIT_NO_ATTACK_SAVAGE: 10, cHANCE_USE_RESERVE_PATROL_100: 50, kILLA_Y_DELTA_TO_BE_ENEMY_BOSS: 5, + kILLA_DITANCE_TO_BE_ENEMY_BOSS: 45, kILLA_START_SEARCH_SEC: 40, kILLA_CONTUTION_TIME: 5, kILLA_CLOSE_ATTACK_DIST: 8, + kILLA_MIDDLE_ATTACK_DIST: 22, kILLA_LARGE_ATTACK_DIST: 41, kILLA_SEARCH_METERS: 30, kILLA_DEF_DIST_SQRT: 225, + kILLA_SEARCH_SEC_STOP_AFTER_COMING: 25, kILLA_DIST_TO_GO_TO_SUPPRESS: 6, kILLA_AFTER_GRENADE_SUPPRESS_DELAY: 2, + kILLA_CLOSEATTACK_TIMES: 3, kILLA_CLOSEATTACK_DELAY: 10, kILLA_HOLD_DELAY: 5, kILLA_BULLET_TO_RELOAD: 15, + sHALL_WARN: true, kILLA_ENEMIES_TO_ATTACK: 3, kILLA_ONE_IS_CLOSE: 30, kILLA_TRIGGER_DOWN_DELAY: 1, kILLA_WAIT_IN_COVER_COEF: 1, + kOJANIY_DIST_WHEN_READY: 40, kOJANIY_DIST_TO_BE_ENEMY: 200, kOJANIY_MIN_DIST_TO_LOOT: 20, kOJANIY_MIN_DIST_TO_LOOT_SQRT: 400, + kOJANIY_DIST_ENEMY_TOO_CLOSE: 17, kOJANIY_MANY_ENEMIES_COEF: 1.5); + } + + public static Mind GenerateMind() + { + return new Mind(hOW_WORK_OVER_DEAD_BODY: 2, mIN_SHOOTS_TIME: 2, mAX_SHOOTS_TIME: 4, + tIME_LEAVE_MAP: 23, tIME_TO_RUN_TO_COVER_CAUSE_SHOOT_SEC: 15, dAMAGE_REDUCTION_TIME_SEC: 20, mIN_DAMAGE_SCARE: 20, + cHANCE_TO_RUN_CAUSE_DAMAGE_0_100: 35, tIME_TO_FORGOR_ABOUT_ENEMY_SEC: 52, tIME_TO_FIND_ENEMY: 22, mAX_AGGRO_BOT_DIST: 100, + hIT_POINT_DETECTION: 4, dANGER_POINT_CHOOSE_COEF: 1, sIMPLE_POINT_CHOOSE_COEF: 0.4, lASTSEEN_POINT_CHOOSE_COEF: 0.2, + cOVER_DIST_COEF: 1.5, dIST_TO_FOUND_SQRT: 400, mAX_AGGRO_BOT_DIST_SQR: 10000, dIST_TO_STOP_RUN_ENEMY: 15, + eNEMY_LOOK_AT_ME_ANG: 15, mIN_START_AGGRESION_COEF: 1, mAX_START_AGGRESION_COEF: 3, bULLET_FEEL_DIST: 360, + bULLET_FEEL_CLOSE_SDIST: 1, aTTACK_IMMEDIATLY_CHANCE_0_100: 40, cHANCE_FUCK_YOU_ON_CONTACT_100: 10, fRIEND_DEAD_AGR_LOW: -0.2, + fRIEND_AGR_KILL: 0.2, lAST_ENEMY_LOOK_TO: 40, cAN_RECIVE_PLAYER_REQUESTS: true, cAN_TAKE_ITEMS: true, + cAN_USE_MEDS: true, sUSPETION_POINT_CHANCE_ADD100: 0, aMBUSH_WHEN_UNDER_FIRE: true, aMBUSH_WHEN_UNDER_FIRE_TIME_RESIST: 60, + aTTACK_ENEMY_IF_PROTECT_DELTA_LAST_TIME_SEEN: 1.5, hOLD_IF_PROTECT_DELTA_LAST_TIME_SEEN: 8.5, fIND_COVER_TO_GET_POSITION_WITH_SHOOT: 2, + pROTECT_TIME_REAL: true, cHANCE_SHOOT_WHEN_WARN_PLAYER_100: 25, cAN_PANIC_IS_PROTECT: false, nO_RUN_AWAY_FOR_SAFE: false, + pART_PERCENT_TO_HEAL: 0.65, pROTECT_DELTA_HEAL_SEC: 10, cAN_STAND_BY: true, cAN_THROW_REQUESTS: true, + gROUP_ANY_PHRASE_DELAY: 4, gROUP_EXACTLY_PHRASE_DELAY: 4, dIST_TO_ENEMY_YO_CAN_HEAL: 30, cHANCE_TO_STAY_WHEN_WARN_PLAYER_100: 80, + dOG_FIGHT_OUT: 6, dOG_FIGHT_IN: 3, sHOOT_INSTEAD_DOG_FIGHT: 9, pISTOL_SHOTGUN_AMBUSH_DIST: 60, + sTANDART_AMBUSH_DIST: 200, aI_POWER_COEF: 120, cOVER_SECONDS_AFTER_LOSE_VISION: 10, cOVER_SELF_ALWAYS_IF_DAMAGED: false, + sEC_TO_MORE_DIST_TO_RUN: 10, hEAL_DELAY_SEC: 5, hIT_DELAY_WHEN_HAVE_SMT: -1, hIT_DELAY_WHEN_PEACE: -1, + tALK_WITH_QUERY: true, wILL_PERSUE_AXEMAN: true); + } + + internal static Hearing GenerateHearing() + { + return new Hearing(bOT_CLOSE_PANIC_DIST: 2, cHANCE_TO_HEAR_SIMPLE_SOUND_0_1: 0.45, + dISPERSION_COEF: 1.6, cLOSE_DIST: 10, fAR_DIST: 30, sOUND_DIR_DEEFREE: 30, dIST_PLACE_TO_FIND_POINT: 70, + dEAD_BODY_SOUND_RAD: 30, lOOK_ONLY_DANGER: false, rESET_TIMER_DIST: 17, hEAR_DELAY_WHEN_PEACE: 0.85, + hEAR_DELAY_WHEN_HAVE_SMT: 0.56, lOOK_ONLY_DANGER_DELTA: 9); + } + + public static Patrol GeneratePatrol() + { + return new Patrol(dEAD_BODY_LOOK_PERIOD: 8, lOOK_TIME_BASE: 12, cAN_CHOOSE_RESERV: true, + tRY_CHOOSE_RESERV_WAY_ON_START: false, cAN_LOOK_TO_DEADBODIES: true, cAN_FRIENDLY_TILT: true, + cAN_HARD_AIM: true, rESERVE_TIME_STAY: 72, fRIEND_SEARCH_SEC: 12, tALK_DELAY: 1.1, + mIN_TALK_DELAY: 35, tALK_DELAY_BIG: 15.1, cHANGE_WAY_TIME: 125.1, mIN_DIST_TO_CLOSE_TALK: 5, + vISION_DIST_COEF_PEACE: 0.5, mIN_DIST_TO_CLOSE_TALK_SQR: 25, cHANCE_TO_CUT_WAY_0_100: 75, cUT_WAY_MIN_0_1: 0.4, + cUT_WAY_MAX_0_1: 0.65, cHANCE_TO_CHANGE_WAY_0_100: 50, cHANCE_TO_SHOOT_DEADBODY: 52, sUSPETION_PLACE_LIFETIME: 7, + rESERVE_OUT_TIME: 30, cLOSE_TO_SELECT_RESERV_WAY: 25, mAX_YDIST_TO_START_WARN_REQUEST_TO_REQUESTER: 5); + } + + public static Cover GenerateCover() + { + return new Cover(rETURN_TO_ATTACK_AFTER_AMBUSH_MIN: 20, rETURN_TO_ATTACK_AFTER_AMBUSH_MAX: 50, + sOUND_TO_GET_SPOTTED: 2, tIME_TO_MOVE_TO_COVER: 15, mAX_DIST_OF_COVER: 4, cHANGE_RUN_TO_COVER_SEC: 5, + cHANGE_RUN_TO_COVER_SEC_GREANDE: 0.6, mIN_DIST_TO_ENEMY: 9, dIST_CANT_CHANGE_WAY: 5, dIST_CHECK_SFETY: 9, + tIME_CHECK_SAFE: 2, hIDE_TO_COVER_TIME: 1.5, mAX_DIST_OF_COVER_SQR: 16, dIST_CANT_CHANGE_WAY_SQR: 25, + sPOTTED_COVERS_RADIUS: 3, lOOK_LAST_ENEMY_POS_MOVING: 1.5, lOOK_TO_HIT_POINT_IF_LAST_ENEMY: 3, lOOK_LAST_ENEMY_POS_LOOKAROUND: 45, + oFFSET_LOOK_ALONG_WALL_ANG: 20, sPOTTED_GRENADE_RADIUS: 16, mAX_SPOTTED_TIME_SEC: 45, wAIT_INT_COVER_FINDING_ENEMY: 2, + cLOSE_DIST_POINT_SQRT: 4, dELTA_SEEN_FROM_COVE_LAST_POS: 15, mOVE_TO_COVER_WHEN_TARGET: false, rUN_COVER_IF_CAN_AND_NO_ENEMIES: false, + sPOTTED_GRENADE_TIME: 7, dEPENDS_Y_DIST_TO_BOT: false, rUN_IF_FAR: 10, rUN_IF_FAR_SQRT: 225, + sTAY_IF_FAR: 25, sTAY_IF_FAR_SQRT: 625, cHECK_COVER_ENEMY_LOOK: true, sHOOT_NEAR_TO_LEAVE: 2, + sHOOT_NEAR_SEC_PERIOD: 0.5, hITS_TO_LEAVE_COVER: 1, hITS_TO_LEAVE_COVER_UNKNOWN: 1, dOG_FIGHT_AFTER_LEAVE: 4, + nOT_LOOK_AT_WALL_IS_DANGER: true, mIN_DEFENCE_LEVEL: 22, gOOD_DIST_TO_POINT_COEF: 1.8, eNEMY_DIST_TO_GO_OUT: 1, + sTATIONARY_WEAPON_NO_ENEMY_GETUP: 20, sTATIONARY_WEAPON_MAX_DIST_TO_USE: 25); + } + + public static Change GenerateChange() + { + return new Change(sMOKE_VISION_DIST: 0.6, sMOKE_GAIN_SIGHT: 1.6, sMOKE_SCATTERING: 1.6, + sMOKE_PRECICING: 1.6, sMOKE_HEARING: 1, sMOKE_ACCURATY: 1.6, sMOKE_LAY_CHANCE: 1.6, + fLASH_VISION_DIST: 0.05, fLASH_GAIN_SIGHT: 1.8, fLASH_SCATTERING: 1.6, fLASH_PRECICING: 1.6, + fLASH_HEARING: 1, fLASH_ACCURATY: 1.6, fLASH_LAY_CHANCE: 1, sTUN_HEARING: 0.01); + } + + public static Grenade GenerateGrenade() + { + return new Grenade(dELTA_NEXT_ATTEMPT_FROM_COVER: 5, dELTA_NEXT_ATTEMPT: 10, mIN_DIST_NOT_TO_THROW: 8, + nEAR_DELTA_THROW_TIME_SEC: 2, mIN_THROW_GRENADE_DIST: 12, mIN_THROW_GRENADE_DIST_SQRT: 144, mIN_DIST_NOT_TO_THROW_SQR: 64, + rUN_AWAY: 22, rUN_AWAY_SQR: 484, aDD_GRENADE_AS_DANGER: 65, aDD_GRENADE_AS_DANGER_SQR: 4225, + cHANCE_TO_NOTIFY_ENEMY_GR_100: 99, grenadePerMeter: 0.2, rEQUEST_DIST_MUST_THROW_SQRT: 4, rEQUEST_DIST_MUST_THROW: 2, + bEWARE_TYPE: 2, sHOOT_TO_SMOKE_CHANCE_100: 30, cHANCE_RUN_FLASHED_100: 0, mAX_FLASHED_DIST_TO_SHOOT: 10, + mAX_FLASHED_DIST_TO_SHOOT_SQRT: 100, fLASH_GRENADE_TIME_COEF: 0.3, sIZE_SPOTTED_COEF: 2, bE_ATTENTION_COEF: 4, + tIME_SHOOT_TO_FLASH: 4, cLOSE_TO_SMOKE_TO_SHOOT: 5, cLOSE_TO_SMOKE_TO_SHOOT_SQRT: 25, cLOSE_TO_SMOKE_TIME_DELTA: 7, + sMOKE_CHECK_DELTA: 1, dELTA_GRENADE_START_TIME: 0.7, aMBUSH_IF_SMOKE_IN_ZONE_100: 40, aMBUSH_IF_SMOKE_RETURN_TO_ATTACK_SEC: 30, + nO_RUN_FROM_AI_GRENADES: false, mAX_THROW_POWER: 15.7, grenadePrecision: 0.3, sTOP_WHEN_THROW_GRENADE: true, + wAIT_TIME_TURN_AWAY: 0.2, sMOKE_SUPPRESS_DELTA: 20, dAMAGE_GRENADE_SUPPRESS_DELTA: 8, sTUN_SUPPRESS_DELTA: 9, + cHEAT_START_GRENADE_PLACE: false, cAN_THROW_STRAIGHT_CONTACT: true, sTRAIGHT_CONTACT_DELTA_SEC: -1, aNG_TYPE: 4); + } + + public static Move GenerateMove() + { + return new Move(bASE_ROTATE_SPEED: 270, rEACH_DIST: 0.5, rEACH_DIST_RUN: 0.8, sTART_SLOW_DIST: 1.5, + bASESTART_SLOW_DIST: 1.1, sLOW_COEF: 7, dIST_TO_CAN_CHANGE_WAY: 8, dIST_TO_START_RAYCAST: 15, bASE_START_SERACH: 35, + uPDATE_TIME_RECAL_WAY: 7, fAR_DIST: 4, fAR_DIST_SQR: 16, dIST_TO_CAN_CHANGE_WAY_SQR: 64, dIST_TO_START_RAYCAST_SQR: 225, + bASE_SQRT_START_SERACH: 1225, y_APPROXIMATION: 0.7, dELTA_LAST_SEEN_ENEMY: 20, rEACH_DIST_COVER: 2, rUN_TO_COVER_MIN: 2, + cHANCE_TO_RUN_IF_NO_AMMO_0_100: 100, rUN_IF_CANT_SHOOT: false, rUN_IF_GAOL_FAR_THEN: 10, sEC_TO_CHANGE_TO_RUN: 3); + } + + public static Shoot GenerateShoot() + { + return new Shoot(rECOIL_TIME_NORMALIZE: 2, rECOIL_PER_METER: 0.1, mAX_RECOIL_PER_METER: 0.2, + hORIZONT_RECOIL_COEF: 0.4, wAIT_NEXT_SINGLE_SHOT: 0.3, wAIT_NEXT_SINGLE_SHOT_LONG_MAX: 3.3, wAIT_NEXT_SINGLE_SHOT_LONG_MIN: 0.8, + mARKSMAN_DIST_SEK_COEF: 44, fINGER_HOLD_SINGLE_SHOT: 0.14, bASE_AUTOMATIC_TIME: 0.1, aUTOMATIC_FIRE_SCATTERING_COEF: 1.5, + cHANCE_TO_CHANGE_TO_AUTOMATIC_FIRE_100: 76, fAR_DIST_ENEMY: 20, sHOOT_FROM_COVER: 4, fAR_DIST_ENEMY_SQR: 400, + mAX_DIST_COEF: 1.35, rECOIL_DELTA_PRESS: 0.15, rUN_DIST_NO_AMMO: 25, rUN_DIST_NO_AMMO_SQRT: 625, + cAN_SHOOTS_TIME_TO_AMBUSH: 333, nOT_TO_SEE_ENEMY_TO_WANT_RELOAD_PERCENT: 0.5, nOT_TO_SEE_ENEMY_TO_WANT_RELOAD_SEC: 2, + rELOAD_PECNET_NO_ENEMY: 0.6, cHANCE_TO_CHANGE_WEAPON: 0, cHANCE_TO_CHANGE_WEAPON_WITH_HELMET: 0, + lOW_DIST_TO_CHANGE_WEAPON: 10, fAR_DIST_TO_CHANGE_WEAPON: 50, sUPPRESS_BY_SHOOT_TIME: 6, sUPPRESS_TRIGGERS_DOWN: 3, + wAIT_NEXT_STATIONARY_GRENADE: 1, fINGER_HOLD_STATIONARY_GRENADE: 0.3); + } + + public static Look GenerateLook() + { + return new Look(oLD_TIME_POINT: 11, wAIT_NEW_SENSOR: 2.1,wAIT_NEW__LOOK_SENSOR: 7.8, lOOK_AROUND_DELTA: 1.1, + mAX_VISION_GRASS_METERS: 0.4, mAX_VISION_GRASS_METERS_FLARE: 7,mAX_VISION_GRASS_METERS_OPT: 0.9090909, + mAX_VISION_GRASS_METERS_FLARE_OPT: 0.125, lightOnVisionDistance: 30, + fAR_DISTANCE: 160, farDeltaTimeSec: 3, mIDDLE_DIST: 90, middleDeltaTimeSec: 1, closeDeltaTimeSec: 0.1, + pOSIBLE_VISION_SPACE: 1.2, gOAL_TO_FULL_DISSAPEAR: 0.25, gOAL_TO_FULL_DISSAPEAR_SHOOT: 0.0001, bODY_DELTA_TIME_SEARCH_SEC: 1.7, + cOME_TO_BODY_DIST: 1.2, mARKSMAN_VISIBLE_DIST_COEF: 1.15, vISIBLE_DISNACE_WITH_LIGHT: 43, eNEMY_LIGHT_ADD: 45, + eNEMY_LIGHT_START_DIST: 40, cAN_LOOK_TO_WALL: false, dIST_NOT_TO_IGNORE_WALL: 15, dIST_CHECK_WALL: 20, + lOOK_LAST_POSENEMY_IF_NO_DANGER_SEC: 25, mIN_LOOK_AROUD_TIME: 20, oPTIMIZE_TO_ONLY_BODY: true); + } + + public static Aiming GenerateAiming() + { + return new Aiming(mAX_AIM_PRECICING: 4, bETTER_PRECICING_COEF: 0.7, rECALC_DIST: 0.7, rECALC_SQR_DIST: 0.48999998, + cOEF_FROM_COVER: 0.8, pANIC_COEF: 1.2, pANIC_ACCURATY_COEF: 1.2, hARD_AIM: 0.75, pANIC_TIME: 2, rECALC_MUST_TIME: 3, + dAMAGE_PANIC_TIME: 15, dANGER_UP_POINT: 1.3, mAX_AIMING_UPGRADE_BY_TIME: 0.85, dAMAGE_TO_DISCARD_AIM_0_100: 100, + mIN_TIME_DISCARD_AIM_SEC: 2.9, mAX_TIME_DISCARD_AIM_SEC: 3.2, xZ_COEF: 0.75, sHOOT_TO_CHANGE_PRIORITY: 5525, + bOTTOM_COEF: 0.3, fIRST_CONTACT_ADD_SEC: 0.1, fIRST_CONTACT_ADD_CHANCE_100: 80, bASE_HIT_AFFECTION_DELAY_SEC: 1.77, + bASE_HIT_AFFECTION_MIN_ANG: 14, bASE_HIT_AFFECTION_MAX_ANG: 28, bASE_SHIEF: 1, sCATTERING_HAVE_DAMAGE_COEF: 2, + sCATTERING_DIST_MODIF: 0.7, sCATTERING_DIST_MODIF_CLOSE: 0.85, aIMING_TYPE: 5, dIST_TO_SHOOT_TO_CENTER: 3, + dIST_TO_SHOOT_NO_OFFSET: 3, sHPERE_FRIENDY_FIRE_SIZE: -1, cOEF_IF_MOVE: 1.9, tIME_COEF_IF_MOVE: 1.5, bOT_MOVE_IF_DELTA: 0.01, + nEXT_SHOT_MISS_CHANCE_100: 100, nEXT_SHOT_MISS_Y_OFFSET: 1, aNYTIME_LIGHT_WHEN_AIM_100: -1, aNY_PART_SHOOT_TIME: 30, + wEAPON_ROOT_OFFSET: 0.35, mIN_DAMAGE_TO_GET_HIT_AFFETS: 1, mAX_AIM_TIME: 1.5, oFFSET_RECAL_ANYWAY_TIME: 1, y_TOP_OFFSET_COEF: 0.001, + y_BOTTOM_OFFSET_COEF: 0.015, bASE_SHIEF_STATIONARY_GRENADE: 1.1, xZ_COEF_STATIONARY_GRENADE: 0.8, dEAD_BODY_LOOK_PERIOD: 8, + cAN_HARD_AIM: true); + } + } +} diff --git a/Generator/Helpers/LoggingHelpers.cs b/Generator/Helpers/LoggingHelpers.cs new file mode 100644 index 0000000..0342256 --- /dev/null +++ b/Generator/Helpers/LoggingHelpers.cs @@ -0,0 +1,17 @@ +using System; + +namespace Generator.Helpers +{ + public static class LoggingHelpers + { + internal static string LogTimeTaken(double totalSeconds) + { + return Math.Round(totalSeconds, 2, MidpointRounding.ToEven).ToString(); + } + + public static void LogToConsole(string message) + { + Console.WriteLine(message); + } + } +} diff --git a/Generator/Helpers/NormalHelper.cs b/Generator/Helpers/NormalHelper.cs new file mode 100644 index 0000000..5dc221c --- /dev/null +++ b/Generator/Helpers/NormalHelper.cs @@ -0,0 +1,182 @@ +using Generator.Models.Output.Difficulty; + +namespace Generator.Helpers +{ + public static class NormalHelper + { + public static Lay GenerateLay() + { + return new Lay(cHECK_SHOOT_WHEN_LAYING: false, dELTA_LAY_CHECK: 2, dELTA_GETUP: 2.7, dELTA_AFTER_GETUP: 10, + cLEAR_POINTS_OF_SCARE_SEC: 20, mAX_LAY_TIME: 35, dELTA_WANT_LAY_CHECL_SEC: 5, aTTACK_LAY_CHANCE: 25, + dIST_TO_COVER_TO_LAY: 3.5, dIST_TO_COVER_TO_LAY_SQRT: 12.25, dIST_GRASS_TERRAIN_SQRT: 0.160000011, + dIST_ENEMY_NULL_DANGER_LAY: 15, dIST_ENEMY_NULL_DANGER_LAY_SQRT: 225, dIST_ENEMY_GETUP_LAY: 10, + dIST_ENEMY_GETUP_LAY_SQRT: 100, dIST_ENEMY_CAN_LAY: 15, dIST_ENEMY_CAN_LAY_SQRT: 225, lAY_AIM: 0.6, + mIN_CAN_LAY_DIST_SQRT: 121, mIN_CAN_LAY_DIST: 11, mAX_CAN_LAY_DIST_SQRT: 40000, mAX_CAN_LAY_DIST: 200, + lAY_CHANCE_DANGER: 40, dAMAGE_TIME_TO_GETUP: 3); + } + + public static Core GenerateCore() + { + return new Core(visibleAngle: 140, visibleDistance: 130, gainSightCoef: 0.1, + scatteringPerMeter: 0.1, scatteringClosePerMeter: 0.1, damageCoeff: 1, hearingSense: 2.85, + canRun: true, canGrenade: true, aimingType: "normal", pistolFireDistancePref: 35, + shotgunFireDistancePref: 50, rifleFireDistancePref: 100, accuratySpeed: 0.3, waitInCoverBetweenShotsSec: 1.5); + } + + public static Scattering GenerateScattering() + { + return new Scattering(minScatter: 0.015, workingScatter: 0.15, maxScatter: 0.3, + speedUp: 0.6, speedUpAim: 1.8, speedDown: -0.2, toSlowBotSpeed: 1.8, toLowBotSpeed: 2.8, toUpBotSpeed: 4.3, + movingSlowCoef: 1.4, toLowBotAngularSpeed: 140, toStopBotAngularSpeed: 80, fromShot: 0.001, tracerCoef: 1.3, + handDamageScatteringMinMax: 0.7, handDamageAccuracySpeed: 1.3, bloodFall: 1.45, caution: 0.03, toCaution: 0.6, + recoilControlCoefShootDone: 0.0003, recoilControlCoefShootDoneAuto: 0.00015, aMPLITUDE_FACTOR: 0.015, + aMPLITUDE_SPEED: 0.001, dIST_FROM_OLD_POINT_TO_NOT_AIM: 15, dIST_FROM_OLD_POINT_TO_NOT_AIM_SQRT: 225, + dIST_NOT_TO_SHOOT: 0.3, poseChnageCoef: 0.1, layFactor: 0.1, recoilYCoef: 0.0005, recoilYCoefSppedDown: -0.52, recoilYMax: 1); + } + + public static Boss GenerateBoss() + { + return new Boss(bOSS_DIST_TO_WARNING: 34, bOSS_DIST_TO_WARNING_SQRT: 1156, bOSS_DIST_TO_WARNING_OUT: 43, + bOSS_DIST_TO_WARNING_OUT_SQRT: 1849, bOSS_DIST_TO_SHOOT: 16, bOSS_DIST_TO_SHOOT_SQRT: 256, cHANCE_TO_SEND_GRENADE_100: 100, + mAX_DIST_COVER_BOSS: 25, mAX_DIST_COVER_BOSS_SQRT: 625, mAX_DIST_DECIDER_TO_SEND: 35, mAX_DIST_DECIDER_TO_SEND_SQRT: 1225, + tIME_AFTER_LOSE: 15, tIME_AFTER_LOSE_DELTA: 60, pERSONS_SEND: 2, dELTA_SEARCH_TIME: 18, + cOVER_TO_SEND: true, wAIT_NO_ATTACK_SAVAGE: 10, cHANCE_USE_RESERVE_PATROL_100: 50, kILLA_Y_DELTA_TO_BE_ENEMY_BOSS: 5, + kILLA_DITANCE_TO_BE_ENEMY_BOSS: 45, kILLA_START_SEARCH_SEC: 40, kILLA_CONTUTION_TIME: 5, kILLA_CLOSE_ATTACK_DIST: 8, + kILLA_MIDDLE_ATTACK_DIST: 22, kILLA_LARGE_ATTACK_DIST: 41, kILLA_SEARCH_METERS: 30, kILLA_DEF_DIST_SQRT: 225, + kILLA_SEARCH_SEC_STOP_AFTER_COMING: 25, kILLA_DIST_TO_GO_TO_SUPPRESS: 6, kILLA_AFTER_GRENADE_SUPPRESS_DELAY: 2, + kILLA_CLOSEATTACK_TIMES: 3, kILLA_CLOSEATTACK_DELAY: 10, kILLA_HOLD_DELAY: 5, kILLA_BULLET_TO_RELOAD: 15, + sHALL_WARN: true, kILLA_ENEMIES_TO_ATTACK: 3, kILLA_ONE_IS_CLOSE: 30, kILLA_TRIGGER_DOWN_DELAY: 1, kILLA_WAIT_IN_COVER_COEF: 1, + kOJANIY_DIST_WHEN_READY: 40, kOJANIY_DIST_TO_BE_ENEMY: 200, kOJANIY_MIN_DIST_TO_LOOT: 20, kOJANIY_MIN_DIST_TO_LOOT_SQRT: 400, + kOJANIY_DIST_ENEMY_TOO_CLOSE: 17, kOJANIY_MANY_ENEMIES_COEF: 1.5); + } + + public static Mind GenerateMind() + { + return new Mind(hOW_WORK_OVER_DEAD_BODY: 2, mIN_SHOOTS_TIME: 2, mAX_SHOOTS_TIME: 4, + tIME_LEAVE_MAP: 23, tIME_TO_RUN_TO_COVER_CAUSE_SHOOT_SEC: 15, dAMAGE_REDUCTION_TIME_SEC: 20, mIN_DAMAGE_SCARE: 20, + cHANCE_TO_RUN_CAUSE_DAMAGE_0_100: 35, tIME_TO_FORGOR_ABOUT_ENEMY_SEC: 52, tIME_TO_FIND_ENEMY: 22, mAX_AGGRO_BOT_DIST: 100, + hIT_POINT_DETECTION: 4, dANGER_POINT_CHOOSE_COEF: 1, sIMPLE_POINT_CHOOSE_COEF: 0.4, lASTSEEN_POINT_CHOOSE_COEF: 0.2, + cOVER_DIST_COEF: 1.5, dIST_TO_FOUND_SQRT: 400, mAX_AGGRO_BOT_DIST_SQR: 10000, dIST_TO_STOP_RUN_ENEMY: 15, + eNEMY_LOOK_AT_ME_ANG: 15, mIN_START_AGGRESION_COEF: 1, mAX_START_AGGRESION_COEF: 3, bULLET_FEEL_DIST: 360, + bULLET_FEEL_CLOSE_SDIST: 1, aTTACK_IMMEDIATLY_CHANCE_0_100: 40, cHANCE_FUCK_YOU_ON_CONTACT_100: 10, fRIEND_DEAD_AGR_LOW: -0.2, + fRIEND_AGR_KILL: 0.2, lAST_ENEMY_LOOK_TO: 40, cAN_RECIVE_PLAYER_REQUESTS: true, cAN_TAKE_ITEMS: true, + cAN_USE_MEDS: true, sUSPETION_POINT_CHANCE_ADD100: 0, aMBUSH_WHEN_UNDER_FIRE: true, aMBUSH_WHEN_UNDER_FIRE_TIME_RESIST: 60, + aTTACK_ENEMY_IF_PROTECT_DELTA_LAST_TIME_SEEN: 1.5, hOLD_IF_PROTECT_DELTA_LAST_TIME_SEEN: 8.5, fIND_COVER_TO_GET_POSITION_WITH_SHOOT: 2, + pROTECT_TIME_REAL: true, cHANCE_SHOOT_WHEN_WARN_PLAYER_100: 25, cAN_PANIC_IS_PROTECT: false, nO_RUN_AWAY_FOR_SAFE: false, + pART_PERCENT_TO_HEAL: 0.65, pROTECT_DELTA_HEAL_SEC: 10, cAN_STAND_BY: true, cAN_THROW_REQUESTS: true, + gROUP_ANY_PHRASE_DELAY: 4, gROUP_EXACTLY_PHRASE_DELAY: 4, dIST_TO_ENEMY_YO_CAN_HEAL: 30, cHANCE_TO_STAY_WHEN_WARN_PLAYER_100: 80, + dOG_FIGHT_OUT: 6, dOG_FIGHT_IN: 3, sHOOT_INSTEAD_DOG_FIGHT: 9, pISTOL_SHOTGUN_AMBUSH_DIST: 60, + sTANDART_AMBUSH_DIST: 200, aI_POWER_COEF: 120, cOVER_SECONDS_AFTER_LOSE_VISION: 10, cOVER_SELF_ALWAYS_IF_DAMAGED: false, + sEC_TO_MORE_DIST_TO_RUN: 10, hEAL_DELAY_SEC: 5, hIT_DELAY_WHEN_HAVE_SMT: -1, hIT_DELAY_WHEN_PEACE: -1, + tALK_WITH_QUERY: true, wILL_PERSUE_AXEMAN: true); + } + + internal static Hearing GenerateHearing() + { + return new Hearing(bOT_CLOSE_PANIC_DIST: 2, cHANCE_TO_HEAR_SIMPLE_SOUND_0_1: 0.45, + dISPERSION_COEF: 1.6, cLOSE_DIST: 10, fAR_DIST: 30, sOUND_DIR_DEEFREE: 30, dIST_PLACE_TO_FIND_POINT: 70, + dEAD_BODY_SOUND_RAD: 30, lOOK_ONLY_DANGER: false, rESET_TIMER_DIST: 17, hEAR_DELAY_WHEN_PEACE: 0.85, + hEAR_DELAY_WHEN_HAVE_SMT: 0.56, lOOK_ONLY_DANGER_DELTA: 9); + } + + public static Patrol GeneratePatrol() + { + return new Patrol(dEAD_BODY_LOOK_PERIOD: 8, lOOK_TIME_BASE: 12, cAN_CHOOSE_RESERV: true, + tRY_CHOOSE_RESERV_WAY_ON_START: false, cAN_LOOK_TO_DEADBODIES: true, cAN_FRIENDLY_TILT: true, + cAN_HARD_AIM: true, rESERVE_TIME_STAY: 72, fRIEND_SEARCH_SEC: 12, tALK_DELAY: 1.1, + mIN_TALK_DELAY: 35, tALK_DELAY_BIG: 15.1, cHANGE_WAY_TIME: 125.1, mIN_DIST_TO_CLOSE_TALK: 5, + vISION_DIST_COEF_PEACE: 0.5, mIN_DIST_TO_CLOSE_TALK_SQR: 25, cHANCE_TO_CUT_WAY_0_100: 75, cUT_WAY_MIN_0_1: 0.4, + cUT_WAY_MAX_0_1: 0.65, cHANCE_TO_CHANGE_WAY_0_100: 50, cHANCE_TO_SHOOT_DEADBODY: 52, sUSPETION_PLACE_LIFETIME: 7, + rESERVE_OUT_TIME: 30, cLOSE_TO_SELECT_RESERV_WAY: 25, mAX_YDIST_TO_START_WARN_REQUEST_TO_REQUESTER: 5); + } + + public static Cover GenerateCover() + { + return new Cover(rETURN_TO_ATTACK_AFTER_AMBUSH_MIN: 20, rETURN_TO_ATTACK_AFTER_AMBUSH_MAX: 50, + sOUND_TO_GET_SPOTTED: 2, tIME_TO_MOVE_TO_COVER: 15, mAX_DIST_OF_COVER: 4, cHANGE_RUN_TO_COVER_SEC: 5, + cHANGE_RUN_TO_COVER_SEC_GREANDE: 0.6, mIN_DIST_TO_ENEMY: 9, dIST_CANT_CHANGE_WAY: 5, dIST_CHECK_SFETY: 9, + tIME_CHECK_SAFE: 2, hIDE_TO_COVER_TIME: 1.5, mAX_DIST_OF_COVER_SQR: 16, dIST_CANT_CHANGE_WAY_SQR: 25, + sPOTTED_COVERS_RADIUS: 3, lOOK_LAST_ENEMY_POS_MOVING: 1.5, lOOK_TO_HIT_POINT_IF_LAST_ENEMY: 3, lOOK_LAST_ENEMY_POS_LOOKAROUND: 45, + oFFSET_LOOK_ALONG_WALL_ANG: 20, sPOTTED_GRENADE_RADIUS: 16, mAX_SPOTTED_TIME_SEC: 45, wAIT_INT_COVER_FINDING_ENEMY: 2, + cLOSE_DIST_POINT_SQRT: 4, dELTA_SEEN_FROM_COVE_LAST_POS: 15, mOVE_TO_COVER_WHEN_TARGET: false, rUN_COVER_IF_CAN_AND_NO_ENEMIES: false, + sPOTTED_GRENADE_TIME: 7, dEPENDS_Y_DIST_TO_BOT: false, rUN_IF_FAR: 10, rUN_IF_FAR_SQRT: 225, + sTAY_IF_FAR: 25, sTAY_IF_FAR_SQRT: 625, cHECK_COVER_ENEMY_LOOK: true, sHOOT_NEAR_TO_LEAVE: 2, + sHOOT_NEAR_SEC_PERIOD: 0.5, hITS_TO_LEAVE_COVER: 1, hITS_TO_LEAVE_COVER_UNKNOWN: 1, dOG_FIGHT_AFTER_LEAVE: 4, + nOT_LOOK_AT_WALL_IS_DANGER: true, mIN_DEFENCE_LEVEL: 22, gOOD_DIST_TO_POINT_COEF: 1.8, eNEMY_DIST_TO_GO_OUT: 1, + sTATIONARY_WEAPON_NO_ENEMY_GETUP: 20, sTATIONARY_WEAPON_MAX_DIST_TO_USE: 25); + } + + public static Change GenerateChange() + { + return new Change(sMOKE_VISION_DIST: 0.6, sMOKE_GAIN_SIGHT: 1.6, sMOKE_SCATTERING: 1.6, + sMOKE_PRECICING: 1.6, sMOKE_HEARING: 1, sMOKE_ACCURATY: 1.6, sMOKE_LAY_CHANCE: 1.6, + fLASH_VISION_DIST: 0.05, fLASH_GAIN_SIGHT: 1.8, fLASH_SCATTERING: 1.6, fLASH_PRECICING: 1.6, + fLASH_HEARING: 1, fLASH_ACCURATY: 1.6, fLASH_LAY_CHANCE: 1, sTUN_HEARING: 0.01); + } + + public static Grenade GenerateGrenade() + { + return new Grenade(dELTA_NEXT_ATTEMPT_FROM_COVER: 5, dELTA_NEXT_ATTEMPT: 10, mIN_DIST_NOT_TO_THROW: 8, + nEAR_DELTA_THROW_TIME_SEC: 2, mIN_THROW_GRENADE_DIST: 12, mIN_THROW_GRENADE_DIST_SQRT: 144, mIN_DIST_NOT_TO_THROW_SQR: 64, + rUN_AWAY: 22, rUN_AWAY_SQR: 484, aDD_GRENADE_AS_DANGER: 65, aDD_GRENADE_AS_DANGER_SQR: 4225, + cHANCE_TO_NOTIFY_ENEMY_GR_100: 99, grenadePerMeter: 0.2, rEQUEST_DIST_MUST_THROW_SQRT: 4, rEQUEST_DIST_MUST_THROW: 2, + bEWARE_TYPE: 2, sHOOT_TO_SMOKE_CHANCE_100: 30, cHANCE_RUN_FLASHED_100: 0, mAX_FLASHED_DIST_TO_SHOOT: 10, + mAX_FLASHED_DIST_TO_SHOOT_SQRT: 100, fLASH_GRENADE_TIME_COEF: 0.3, sIZE_SPOTTED_COEF: 2, bE_ATTENTION_COEF: 4, + tIME_SHOOT_TO_FLASH: 4, cLOSE_TO_SMOKE_TO_SHOOT: 5, cLOSE_TO_SMOKE_TO_SHOOT_SQRT: 25, cLOSE_TO_SMOKE_TIME_DELTA: 7, + sMOKE_CHECK_DELTA: 1, dELTA_GRENADE_START_TIME: 0.7, aMBUSH_IF_SMOKE_IN_ZONE_100: 40, aMBUSH_IF_SMOKE_RETURN_TO_ATTACK_SEC: 30, + nO_RUN_FROM_AI_GRENADES: false, mAX_THROW_POWER: 15.7, grenadePrecision: 0.3, sTOP_WHEN_THROW_GRENADE: true, + wAIT_TIME_TURN_AWAY: 0.2, sMOKE_SUPPRESS_DELTA: 20, dAMAGE_GRENADE_SUPPRESS_DELTA: 8, sTUN_SUPPRESS_DELTA: 9, + cHEAT_START_GRENADE_PLACE: false, cAN_THROW_STRAIGHT_CONTACT: true, sTRAIGHT_CONTACT_DELTA_SEC: -1, aNG_TYPE: 4); + } + + public static Move GenerateMove() + { + return new Move(bASE_ROTATE_SPEED: 270, rEACH_DIST: 0.5, rEACH_DIST_RUN: 0.8, sTART_SLOW_DIST: 1.5, + bASESTART_SLOW_DIST: 1.1, sLOW_COEF: 7, dIST_TO_CAN_CHANGE_WAY: 8, dIST_TO_START_RAYCAST: 15, bASE_START_SERACH: 35, + uPDATE_TIME_RECAL_WAY: 7, fAR_DIST: 4, fAR_DIST_SQR: 16, dIST_TO_CAN_CHANGE_WAY_SQR: 64, dIST_TO_START_RAYCAST_SQR: 225, + bASE_SQRT_START_SERACH: 1225, y_APPROXIMATION: 0.7, dELTA_LAST_SEEN_ENEMY: 20, rEACH_DIST_COVER: 2, rUN_TO_COVER_MIN: 2, + cHANCE_TO_RUN_IF_NO_AMMO_0_100: 100, rUN_IF_CANT_SHOOT: false, rUN_IF_GAOL_FAR_THEN: 10, sEC_TO_CHANGE_TO_RUN: 3); + } + + public static Shoot GenerateShoot() + { + return new Shoot(rECOIL_TIME_NORMALIZE: 2, rECOIL_PER_METER: 0.1, mAX_RECOIL_PER_METER: 0.2, + hORIZONT_RECOIL_COEF: 0.4, wAIT_NEXT_SINGLE_SHOT: 0.3, wAIT_NEXT_SINGLE_SHOT_LONG_MAX: 3.3, wAIT_NEXT_SINGLE_SHOT_LONG_MIN: 0.8, + mARKSMAN_DIST_SEK_COEF: 44, fINGER_HOLD_SINGLE_SHOT: 0.14, bASE_AUTOMATIC_TIME: 0.1, aUTOMATIC_FIRE_SCATTERING_COEF: 1.5, + cHANCE_TO_CHANGE_TO_AUTOMATIC_FIRE_100: 76, fAR_DIST_ENEMY: 20, sHOOT_FROM_COVER: 4, fAR_DIST_ENEMY_SQR: 400, + mAX_DIST_COEF: 1.35, rECOIL_DELTA_PRESS: 0.15, rUN_DIST_NO_AMMO: 25, rUN_DIST_NO_AMMO_SQRT: 625, + cAN_SHOOTS_TIME_TO_AMBUSH: 333, nOT_TO_SEE_ENEMY_TO_WANT_RELOAD_PERCENT: 0.5, nOT_TO_SEE_ENEMY_TO_WANT_RELOAD_SEC: 2, + rELOAD_PECNET_NO_ENEMY: 0.6, cHANCE_TO_CHANGE_WEAPON: 0, cHANCE_TO_CHANGE_WEAPON_WITH_HELMET: 0, + lOW_DIST_TO_CHANGE_WEAPON: 10, fAR_DIST_TO_CHANGE_WEAPON: 50, sUPPRESS_BY_SHOOT_TIME: 6, sUPPRESS_TRIGGERS_DOWN: 3, + wAIT_NEXT_STATIONARY_GRENADE: 1, fINGER_HOLD_STATIONARY_GRENADE: 0.3); + } + + public static Look GenerateLook() + { + return new Look(oLD_TIME_POINT: 11, wAIT_NEW_SENSOR: 2.1,wAIT_NEW__LOOK_SENSOR: 7.8, lOOK_AROUND_DELTA: 1.1, + mAX_VISION_GRASS_METERS: 0.4, mAX_VISION_GRASS_METERS_FLARE: 7,mAX_VISION_GRASS_METERS_OPT: 0.9090909, + mAX_VISION_GRASS_METERS_FLARE_OPT: 0.125, lightOnVisionDistance: 30, + fAR_DISTANCE: 160, farDeltaTimeSec: 3, mIDDLE_DIST: 90, middleDeltaTimeSec: 1, closeDeltaTimeSec: 0.1, + pOSIBLE_VISION_SPACE: 1.2, gOAL_TO_FULL_DISSAPEAR: 0.25, gOAL_TO_FULL_DISSAPEAR_SHOOT: 0.0001, bODY_DELTA_TIME_SEARCH_SEC: 1.7, + cOME_TO_BODY_DIST: 1.2, mARKSMAN_VISIBLE_DIST_COEF: 1.15, vISIBLE_DISNACE_WITH_LIGHT: 43, eNEMY_LIGHT_ADD: 45, + eNEMY_LIGHT_START_DIST: 40, cAN_LOOK_TO_WALL: false, dIST_NOT_TO_IGNORE_WALL: 15, dIST_CHECK_WALL: 20, + lOOK_LAST_POSENEMY_IF_NO_DANGER_SEC: 25, mIN_LOOK_AROUD_TIME: 20, oPTIMIZE_TO_ONLY_BODY: true); + } + + public static Aiming GenerateAiming() + { + return new Aiming(mAX_AIM_PRECICING: 4, bETTER_PRECICING_COEF: 0.7, rECALC_DIST: 0.7, rECALC_SQR_DIST: 0.48999998, + cOEF_FROM_COVER: 0.8, pANIC_COEF: 1.2, pANIC_ACCURATY_COEF: 1.2, hARD_AIM: 0.75, pANIC_TIME: 2, rECALC_MUST_TIME: 3, + dAMAGE_PANIC_TIME: 15, dANGER_UP_POINT: 1.3, mAX_AIMING_UPGRADE_BY_TIME: 0.85, dAMAGE_TO_DISCARD_AIM_0_100: 100, + mIN_TIME_DISCARD_AIM_SEC: 2.9, mAX_TIME_DISCARD_AIM_SEC: 3.2, xZ_COEF: 0.75, sHOOT_TO_CHANGE_PRIORITY: 5525, + bOTTOM_COEF: 0.3, fIRST_CONTACT_ADD_SEC: 0.1, fIRST_CONTACT_ADD_CHANCE_100: 80, bASE_HIT_AFFECTION_DELAY_SEC: 1.77, + bASE_HIT_AFFECTION_MIN_ANG: 14, bASE_HIT_AFFECTION_MAX_ANG: 28, bASE_SHIEF: 1, sCATTERING_HAVE_DAMAGE_COEF: 2, + sCATTERING_DIST_MODIF: 0.7, sCATTERING_DIST_MODIF_CLOSE: 0.85, aIMING_TYPE: 5, dIST_TO_SHOOT_TO_CENTER: 3, + dIST_TO_SHOOT_NO_OFFSET: 3, sHPERE_FRIENDY_FIRE_SIZE: -1, cOEF_IF_MOVE: 1.9, tIME_COEF_IF_MOVE: 1.5, bOT_MOVE_IF_DELTA: 0.01, + nEXT_SHOT_MISS_CHANCE_100: 100, nEXT_SHOT_MISS_Y_OFFSET: 1, aNYTIME_LIGHT_WHEN_AIM_100: -1, aNY_PART_SHOOT_TIME: 30, + wEAPON_ROOT_OFFSET: 0.35, mIN_DAMAGE_TO_GET_HIT_AFFETS: 1, mAX_AIM_TIME: 1.5, oFFSET_RECAL_ANYWAY_TIME: 1, y_TOP_OFFSET_COEF: 0.001, + y_BOTTOM_OFFSET_COEF: 0.015, bASE_SHIEF_STATIONARY_GRENADE: 1.1, xZ_COEF_STATIONARY_GRENADE: 0.8, dEAD_BODY_LOOK_PERIOD: 8, + cAN_HARD_AIM: true); + } + } +} diff --git a/Generator/JsonWriter.cs b/Generator/JsonWriter.cs new file mode 100644 index 0000000..26800d1 --- /dev/null +++ b/Generator/JsonWriter.cs @@ -0,0 +1,44 @@ +using Generator.Models.Output; +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.IO; + +namespace Generator +{ + public class JsonWriter + { + private readonly string _workingPath; + private readonly string _outputFolderName; + + public JsonWriter(string workingPath, string outputFolderName) + { + _workingPath = workingPath; + _outputFolderName = outputFolderName; + } + + public void WriteJson(List bots) + { + var outputPath = $"{_workingPath}\\{_outputFolderName}"; + CreateDirIfDoesntExist(outputPath); + + foreach (var bot in bots) + { + var output = JsonConvert.SerializeObject(bot, Formatting.Indented); + Console.WriteLine($"Writing json file {bot.botType} to {outputPath}"); + File.WriteAllText($"{outputPath}\\{bot.botType}.json", output); + Console.WriteLine($"file {bot.botType} written to {outputPath}"); + } + + } + + private void CreateDirIfDoesntExist(string path) + { + if (!Directory.Exists($"{path}")) + { + //create dump dir + Directory.CreateDirectory($"{path}"); + } + } + } +} diff --git a/Generator/Models/Enums.cs b/Generator/Models/Enums.cs new file mode 100644 index 0000000..c579708 --- /dev/null +++ b/Generator/Models/Enums.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Generator.Models +{ + public enum BotType + { + assault = 1, + pmcBot = 2, + marksman = 3 + } +} diff --git a/Generator/Models/Input/Settings.cs b/Generator/Models/Input/Settings.cs new file mode 100644 index 0000000..6676f92 --- /dev/null +++ b/Generator/Models/Input/Settings.cs @@ -0,0 +1,282 @@ +using Newtonsoft.Json; +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace Generator.Models.Input +{ + public class Settings + { + public string Role { get; set; } + public string BotDifficulty { get; set; } + public int Experience { get; set; } + public double StandingForKill { get; set; } + public double AggressorBonus { get; set; } + } + + public class Info + { + public string Nickname { get; set; } + public string LowerNickname { get; set; } + public string Side { get; set; } + public string Voice { get; set; } + public int Level { get; set; } + public int Experience { get; set; } + public int RegistrationDate { get; set; } + public string GameVersion { get; set; } + public int AccountType { get; set; } + public int MemberCategory { get; set; } + public bool lockedMoveCommands { get; set; } + public int SavageLockTime { get; set; } + public int LastTimePlayedAsSavage { get; set; } + public Settings Settings { get; set; } + public int NicknameChangeDate { get; set; } + public List NeedWipeOptions { get; set; } + public object lastCompletedWipe { get; set; } + public bool BannedState { get; set; } + public int BannedUntil { get; set; } + public bool IsStreamerModeAvailable { get; set; } + } + + public class Customization + { + public string Head { get; set; } + public string Body { get; set; } + public string Feet { get; set; } + public string Hands { get; set; } + } + + public class Hydration + { + public int Current { get; set; } + public int Maximum { get; set; } + } + + public class Energy + { + public int Current { get; set; } + public int Maximum { get; set; } + } + + public class Temperature + { + public double Current { get; set; } + public int Maximum { get; set; } + } + + public class Health + { + public int Current { get; set; } + public int Maximum { get; set; } + public Hydration Hydration { get; set; } + public Energy Energy { get; set; } + public Temperature Temperature { get; set; } + public BodyParts BodyParts { get; set; } + public int UpdateTime { get; set; } + } + + public class Head + { + public BodyPartHealth Health { get; set; } + } + + public class Chest + { + public BodyPartHealth Health { get; set; } + } + + public class Stomach + { + public BodyPartHealth Health { get; set; } + } + + public class LeftArm + { + public BodyPartHealth Health { get; set; } + } + + public class RightArm + { + public BodyPartHealth Health { get; set; } + } + + public class LeftLeg + { + public BodyPartHealth Health { get; set; } + } + + public class RightLeg + { + public BodyPartHealth Health { get; set; } + } + + [DataContract(Name = "Health")] + public class BodyPartHealth + { + [DataMember] + public int Current { get; set; } + [DataMember] + public int Maximum { get; set; } + } + + public class BodyParts + { + public Head Head { get; set; } + public Chest Chest { get; set; } + public Stomach Stomach { get; set; } + public LeftArm LeftArm { get; set; } + public RightArm RightArm { get; set; } + public LeftLeg LeftLeg { get; set; } + public RightLeg RightLeg { get; set; } + } + + public class Repairable + { + public int Durability { get; set; } + public int MaxDurability { get; set; } + } + + public class FoodDrink + { + public int HpPercent { get; set; } + } + + public class FireMode + { + [JsonProperty("FireMode")] + public string WeaponFireMode { get; set; } + } + + public class Foldable + { + public bool Folded { get; set; } + } + + public class MedKit + { + public int HpResource { get; set; } + } + + public class Upd + { + public Repairable Repairable { get; set; } + public int? StackObjectsCount { get; set; } + public FoodDrink FoodDrink { get; set; } + public FireMode FireMode { get; set; } + public Foldable Foldable { get; set; } + public MedKit MedKit { get; set; } + } + + public class Location + { + public int x { get; set; } + public int y { get; set; } + public int r { get; set; } + } + + public class Item + { + public string _id { get; set; } + public string _tpl { get; set; } + public string parentId { get; set; } + public string slotId { get; set; } + public Upd upd { get; set; } + public Location location { get; set; } + } + + public class FastPanel + { + } + + public class Inventory + { + public List items { get; set; } + public string equipment { get; set; } + public string stash { get; set; } + public string sortingTable { get; set; } + public string questRaidItems { get; set; } + public string questStashItems { get; set; } + public FastPanel fastPanel { get; set; } + } + + public class Skills + { + public List Common { get; set; } + public List Mastering { get; set; } + public int Points { get; set; } + } + + public class SessionCounters + { + public List Items { get; set; } + } + + public class OverallCounters + { + public List Items { get; set; } + } + + public class Stats + { + public SessionCounters SessionCounters { get; set; } + public OverallCounters OverallCounters { get; set; } + } + + public class ConditionCounters + { + public List Counters { get; set; } + } + + public class BackendCounters + { + } + + public class Production + { + } + + public class Area + { + public int type { get; set; } + public int level { get; set; } + public bool active { get; set; } + public bool passiveBonusesEnabled { get; set; } + public int completeTime { get; set; } + public bool constructing { get; set; } + public List slots { get; set; } + public object lastRecipe { get; set; } + } + + public class Hideout + { + public Production Production { get; set; } + public List Areas { get; set; } + } + + public class Datum + { + public string _id { get; set; } + public int aid { get; set; } + public object savage { get; set; } + public Info Info { get; set; } + public Customization Customization { get; set; } + public Health Health { get; set; } + public Inventory Inventory { get; set; } + public Skills Skills { get; set; } + public Stats Stats { get; set; } + public object Encyclopedia { get; set; } + public ConditionCounters ConditionCounters { get; set; } + public BackendCounters BackendCounters { get; set; } + public List InsuredItems { get; set; } + public Hideout Hideout { get; set; } + public List Bonuses { get; set; } + } + + public class Root + { + public int err { get; set; } + public object errmsg { get; set; } + public List data { get; set; } + } + + +} diff --git a/Generator/Models/Output/Difficulty/Difficulty.cs b/Generator/Models/Output/Difficulty/Difficulty.cs new file mode 100644 index 0000000..c604336 --- /dev/null +++ b/Generator/Models/Output/Difficulty/Difficulty.cs @@ -0,0 +1,1082 @@ +namespace Generator.Models.Output.Difficulty +{ + public class Difficulty + { + public DifficultySettings easy { get; set; } + public DifficultySettings normal { get; set; } + public DifficultySettings hard { get; set; } + public DifficultySettings impossible { get; set; } + } + + public class DifficultySettings + { + public Lay Lay { get; set; } + public Aiming Aiming { get; set; } + public Look Look { get; set; } + public Shoot Shoot { get; set; } + public Move Move { get; set; } + public Grenade Grenade { get; set; } + public Change Change { get; set; } + public Cover Cover { get; set; } + public Patrol Patrol { get; set; } + public Hearing Hearing { get; set; } + public Mind Mind { get; set; } + public Boss Boss { get; set; } + public Core Core { get; set; } + public Scattering Scattering { get; set; } + } + + public class Lay + { + public Lay(bool cHECK_SHOOT_WHEN_LAYING, int dELTA_LAY_CHECK, double dELTA_GETUP, int dELTA_AFTER_GETUP, + int cLEAR_POINTS_OF_SCARE_SEC, int mAX_LAY_TIME, int dELTA_WANT_LAY_CHECL_SEC, int aTTACK_LAY_CHANCE, + double dIST_TO_COVER_TO_LAY, double dIST_TO_COVER_TO_LAY_SQRT, double dIST_GRASS_TERRAIN_SQRT, int dIST_ENEMY_NULL_DANGER_LAY, + int dIST_ENEMY_NULL_DANGER_LAY_SQRT, int dIST_ENEMY_GETUP_LAY, int dIST_ENEMY_GETUP_LAY_SQRT, int dIST_ENEMY_CAN_LAY, + int dIST_ENEMY_CAN_LAY_SQRT, double lAY_AIM, int mIN_CAN_LAY_DIST_SQRT, int mIN_CAN_LAY_DIST, + int mAX_CAN_LAY_DIST_SQRT, int mAX_CAN_LAY_DIST, int lAY_CHANCE_DANGER, int dAMAGE_TIME_TO_GETUP) + { + CHECK_SHOOT_WHEN_LAYING = cHECK_SHOOT_WHEN_LAYING; + DELTA_LAY_CHECK = dELTA_LAY_CHECK; + DELTA_GETUP = dELTA_GETUP; + DELTA_AFTER_GETUP = dELTA_AFTER_GETUP; + CLEAR_POINTS_OF_SCARE_SEC = cLEAR_POINTS_OF_SCARE_SEC; + MAX_LAY_TIME = mAX_LAY_TIME; + DELTA_WANT_LAY_CHECL_SEC = dELTA_WANT_LAY_CHECL_SEC; + ATTACK_LAY_CHANCE = aTTACK_LAY_CHANCE; + DIST_TO_COVER_TO_LAY = dIST_TO_COVER_TO_LAY; + DIST_TO_COVER_TO_LAY_SQRT = dIST_TO_COVER_TO_LAY_SQRT; + DIST_GRASS_TERRAIN_SQRT = dIST_GRASS_TERRAIN_SQRT; + DIST_ENEMY_NULL_DANGER_LAY = dIST_ENEMY_NULL_DANGER_LAY; + DIST_ENEMY_NULL_DANGER_LAY_SQRT = dIST_ENEMY_NULL_DANGER_LAY_SQRT; + DIST_ENEMY_GETUP_LAY = dIST_ENEMY_GETUP_LAY; + DIST_ENEMY_GETUP_LAY_SQRT = dIST_ENEMY_GETUP_LAY_SQRT; + DIST_ENEMY_CAN_LAY = dIST_ENEMY_CAN_LAY; + DIST_ENEMY_CAN_LAY_SQRT = dIST_ENEMY_CAN_LAY_SQRT; + LAY_AIM = lAY_AIM; + MIN_CAN_LAY_DIST_SQRT = mIN_CAN_LAY_DIST_SQRT; + MIN_CAN_LAY_DIST = mIN_CAN_LAY_DIST; + MAX_CAN_LAY_DIST_SQRT = mAX_CAN_LAY_DIST_SQRT; + MAX_CAN_LAY_DIST = mAX_CAN_LAY_DIST; + LAY_CHANCE_DANGER = lAY_CHANCE_DANGER; + DAMAGE_TIME_TO_GETUP = dAMAGE_TIME_TO_GETUP; + } + + public bool CHECK_SHOOT_WHEN_LAYING { get; set; } + public int DELTA_LAY_CHECK { get; set; } + public double DELTA_GETUP { get; set; } + public int DELTA_AFTER_GETUP { get; set; } + public int CLEAR_POINTS_OF_SCARE_SEC { get; set; } + public int MAX_LAY_TIME { get; set; } + public int DELTA_WANT_LAY_CHECL_SEC { get; set; } + public int ATTACK_LAY_CHANCE { get; set; } + public double DIST_TO_COVER_TO_LAY { get; set; } + public double DIST_TO_COVER_TO_LAY_SQRT { get; set; } + public double DIST_GRASS_TERRAIN_SQRT { get; set; } + public int DIST_ENEMY_NULL_DANGER_LAY { get; set; } + public int DIST_ENEMY_NULL_DANGER_LAY_SQRT { get; set; } + public int DIST_ENEMY_GETUP_LAY { get; set; } + public int DIST_ENEMY_GETUP_LAY_SQRT { get; set; } + public int DIST_ENEMY_CAN_LAY { get; set; } + public int DIST_ENEMY_CAN_LAY_SQRT { get; set; } + public double LAY_AIM { get; set; } + public int MIN_CAN_LAY_DIST_SQRT { get; set; } + public int MIN_CAN_LAY_DIST { get; set; } + public int MAX_CAN_LAY_DIST_SQRT { get; set; } + public int MAX_CAN_LAY_DIST { get; set; } + public int LAY_CHANCE_DANGER { get; set; } + public int DAMAGE_TIME_TO_GETUP { get; set; } + } + + public class Aiming + { + public Aiming(int mAX_AIM_PRECICING, double bETTER_PRECICING_COEF, double rECALC_DIST, double rECALC_SQR_DIST, + double cOEF_FROM_COVER, double pANIC_COEF, double pANIC_ACCURATY_COEF, double hARD_AIM, + int pANIC_TIME, int rECALC_MUST_TIME, int dAMAGE_PANIC_TIME, double dANGER_UP_POINT, + double mAX_AIMING_UPGRADE_BY_TIME, int dAMAGE_TO_DISCARD_AIM_0_100, double mIN_TIME_DISCARD_AIM_SEC, double mAX_TIME_DISCARD_AIM_SEC, + double xZ_COEF, int sHOOT_TO_CHANGE_PRIORITY, double bOTTOM_COEF, double fIRST_CONTACT_ADD_SEC, + int fIRST_CONTACT_ADD_CHANCE_100, double bASE_HIT_AFFECTION_DELAY_SEC, int bASE_HIT_AFFECTION_MIN_ANG, int bASE_HIT_AFFECTION_MAX_ANG, + int bASE_SHIEF, int sCATTERING_HAVE_DAMAGE_COEF, double sCATTERING_DIST_MODIF, double sCATTERING_DIST_MODIF_CLOSE, + int aIMING_TYPE, int dIST_TO_SHOOT_TO_CENTER, int dIST_TO_SHOOT_NO_OFFSET, int sHPERE_FRIENDY_FIRE_SIZE, + double cOEF_IF_MOVE, double tIME_COEF_IF_MOVE, double bOT_MOVE_IF_DELTA, int nEXT_SHOT_MISS_CHANCE_100, + int nEXT_SHOT_MISS_Y_OFFSET, int aNYTIME_LIGHT_WHEN_AIM_100, int aNY_PART_SHOOT_TIME, double wEAPON_ROOT_OFFSET, + int mIN_DAMAGE_TO_GET_HIT_AFFETS, double mAX_AIM_TIME, int oFFSET_RECAL_ANYWAY_TIME, double y_TOP_OFFSET_COEF, + double y_BOTTOM_OFFSET_COEF, double bASE_SHIEF_STATIONARY_GRENADE, double xZ_COEF_STATIONARY_GRENADE, int dEAD_BODY_LOOK_PERIOD, bool cAN_HARD_AIM) + { + MAX_AIM_PRECICING = mAX_AIM_PRECICING; + BETTER_PRECICING_COEF = bETTER_PRECICING_COEF; + RECALC_DIST = rECALC_DIST; + RECALC_SQR_DIST = rECALC_SQR_DIST; + COEF_FROM_COVER = cOEF_FROM_COVER; + PANIC_COEF = pANIC_COEF; + PANIC_ACCURATY_COEF = pANIC_ACCURATY_COEF; + HARD_AIM = hARD_AIM; + PANIC_TIME = pANIC_TIME; + RECALC_MUST_TIME = rECALC_MUST_TIME; + DAMAGE_PANIC_TIME = dAMAGE_PANIC_TIME; + DANGER_UP_POINT = dANGER_UP_POINT; + MAX_AIMING_UPGRADE_BY_TIME = mAX_AIMING_UPGRADE_BY_TIME; + DAMAGE_TO_DISCARD_AIM_0_100 = dAMAGE_TO_DISCARD_AIM_0_100; + MIN_TIME_DISCARD_AIM_SEC = mIN_TIME_DISCARD_AIM_SEC; + MAX_TIME_DISCARD_AIM_SEC = mAX_TIME_DISCARD_AIM_SEC; + XZ_COEF = xZ_COEF; + SHOOT_TO_CHANGE_PRIORITY = sHOOT_TO_CHANGE_PRIORITY; + BOTTOM_COEF = bOTTOM_COEF; + FIRST_CONTACT_ADD_SEC = fIRST_CONTACT_ADD_SEC; + FIRST_CONTACT_ADD_CHANCE_100 = fIRST_CONTACT_ADD_CHANCE_100; + BASE_HIT_AFFECTION_DELAY_SEC = bASE_HIT_AFFECTION_DELAY_SEC; + BASE_HIT_AFFECTION_MIN_ANG = bASE_HIT_AFFECTION_MIN_ANG; + BASE_HIT_AFFECTION_MAX_ANG = bASE_HIT_AFFECTION_MAX_ANG; + BASE_SHIEF = bASE_SHIEF; + SCATTERING_HAVE_DAMAGE_COEF = sCATTERING_HAVE_DAMAGE_COEF; + SCATTERING_DIST_MODIF = sCATTERING_DIST_MODIF; + SCATTERING_DIST_MODIF_CLOSE = sCATTERING_DIST_MODIF_CLOSE; + AIMING_TYPE = aIMING_TYPE; + DIST_TO_SHOOT_TO_CENTER = dIST_TO_SHOOT_TO_CENTER; + DIST_TO_SHOOT_NO_OFFSET = dIST_TO_SHOOT_NO_OFFSET; + SHPERE_FRIENDY_FIRE_SIZE = sHPERE_FRIENDY_FIRE_SIZE; + COEF_IF_MOVE = cOEF_IF_MOVE; + TIME_COEF_IF_MOVE = tIME_COEF_IF_MOVE; + BOT_MOVE_IF_DELTA = bOT_MOVE_IF_DELTA; + NEXT_SHOT_MISS_CHANCE_100 = nEXT_SHOT_MISS_CHANCE_100; + NEXT_SHOT_MISS_Y_OFFSET = nEXT_SHOT_MISS_Y_OFFSET; + ANYTIME_LIGHT_WHEN_AIM_100 = aNYTIME_LIGHT_WHEN_AIM_100; + ANY_PART_SHOOT_TIME = aNY_PART_SHOOT_TIME; + WEAPON_ROOT_OFFSET = wEAPON_ROOT_OFFSET; + MIN_DAMAGE_TO_GET_HIT_AFFETS = mIN_DAMAGE_TO_GET_HIT_AFFETS; + MAX_AIM_TIME = mAX_AIM_TIME; + OFFSET_RECAL_ANYWAY_TIME = oFFSET_RECAL_ANYWAY_TIME; + Y_TOP_OFFSET_COEF = y_TOP_OFFSET_COEF; + Y_BOTTOM_OFFSET_COEF = y_BOTTOM_OFFSET_COEF; + BASE_SHIEF_STATIONARY_GRENADE = bASE_SHIEF_STATIONARY_GRENADE; + XZ_COEF_STATIONARY_GRENADE = xZ_COEF_STATIONARY_GRENADE; + DEAD_BODY_LOOK_PERIOD = dEAD_BODY_LOOK_PERIOD; + CAN_HARD_AIM = cAN_HARD_AIM; + } + + public int MAX_AIM_PRECICING { get; set; } + public double BETTER_PRECICING_COEF { get; set; } + public double RECALC_DIST { get; set; } + public double RECALC_SQR_DIST { get; set; } + public double COEF_FROM_COVER { get; set; } + public double PANIC_COEF { get; set; } + public double PANIC_ACCURATY_COEF { get; set; } + public double HARD_AIM { get; set; } + public int PANIC_TIME { get; set; } + public int RECALC_MUST_TIME { get; set; } + public int DAMAGE_PANIC_TIME { get; set; } + public double DANGER_UP_POINT { get; set; } + public double MAX_AIMING_UPGRADE_BY_TIME { get; set; } + public int DAMAGE_TO_DISCARD_AIM_0_100 { get; set; } + public double MIN_TIME_DISCARD_AIM_SEC { get; set; } + public double MAX_TIME_DISCARD_AIM_SEC { get; set; } + public double XZ_COEF { get; set; } + public int SHOOT_TO_CHANGE_PRIORITY { get; set; } + public double BOTTOM_COEF { get; set; } + public double FIRST_CONTACT_ADD_SEC { get; set; } + public int FIRST_CONTACT_ADD_CHANCE_100 { get; set; } + public double BASE_HIT_AFFECTION_DELAY_SEC { get; set; } + public int BASE_HIT_AFFECTION_MIN_ANG { get; set; } + public int BASE_HIT_AFFECTION_MAX_ANG { get; set; } + public int BASE_SHIEF { get; set; } + public int SCATTERING_HAVE_DAMAGE_COEF { get; set; } + public double SCATTERING_DIST_MODIF { get; set; } + public double SCATTERING_DIST_MODIF_CLOSE { get; set; } + public int AIMING_TYPE { get; set; } + public int DIST_TO_SHOOT_TO_CENTER { get; set; } + public int DIST_TO_SHOOT_NO_OFFSET { get; set; } + public int SHPERE_FRIENDY_FIRE_SIZE { get; set; } + public double COEF_IF_MOVE { get; set; } + public double TIME_COEF_IF_MOVE { get; set; } + public double BOT_MOVE_IF_DELTA { get; set; } + public int NEXT_SHOT_MISS_CHANCE_100 { get; set; } + public int NEXT_SHOT_MISS_Y_OFFSET { get; set; } + public int ANYTIME_LIGHT_WHEN_AIM_100 { get; set; } + public int ANY_PART_SHOOT_TIME { get; set; } + public double WEAPON_ROOT_OFFSET { get; set; } + public int MIN_DAMAGE_TO_GET_HIT_AFFETS { get; set; } + public double MAX_AIM_TIME { get; set; } + public int OFFSET_RECAL_ANYWAY_TIME { get; set; } + public double Y_TOP_OFFSET_COEF { get; set; } + public double Y_BOTTOM_OFFSET_COEF { get; set; } + public double BASE_SHIEF_STATIONARY_GRENADE { get; set; } + public double XZ_COEF_STATIONARY_GRENADE { get; set; } + public int DEAD_BODY_LOOK_PERIOD { get; set; } + public bool CAN_HARD_AIM { get; set; } + } + + public class Look + { + public Look(int oLD_TIME_POINT, double wAIT_NEW_SENSOR, double wAIT_NEW__LOOK_SENSOR, double lOOK_AROUND_DELTA, + double mAX_VISION_GRASS_METERS, int mAX_VISION_GRASS_METERS_FLARE, double mAX_VISION_GRASS_METERS_OPT, + double mAX_VISION_GRASS_METERS_FLARE_OPT, int lightOnVisionDistance, int fAR_DISTANCE, int farDeltaTimeSec, + int mIDDLE_DIST, int middleDeltaTimeSec, double closeDeltaTimeSec, double pOSIBLE_VISION_SPACE, double gOAL_TO_FULL_DISSAPEAR, + double gOAL_TO_FULL_DISSAPEAR_SHOOT, double bODY_DELTA_TIME_SEARCH_SEC, double cOME_TO_BODY_DIST, double mARKSMAN_VISIBLE_DIST_COEF, + int vISIBLE_DISNACE_WITH_LIGHT, int eNEMY_LIGHT_ADD, int eNEMY_LIGHT_START_DIST, bool cAN_LOOK_TO_WALL, int dIST_NOT_TO_IGNORE_WALL, + int dIST_CHECK_WALL, int lOOK_LAST_POSENEMY_IF_NO_DANGER_SEC, int mIN_LOOK_AROUD_TIME, bool oPTIMIZE_TO_ONLY_BODY) + { + OLD_TIME_POINT = oLD_TIME_POINT; + WAIT_NEW_SENSOR = wAIT_NEW_SENSOR; + WAIT_NEW__LOOK_SENSOR = wAIT_NEW__LOOK_SENSOR; + LOOK_AROUND_DELTA = lOOK_AROUND_DELTA; + MAX_VISION_GRASS_METERS = mAX_VISION_GRASS_METERS; + MAX_VISION_GRASS_METERS_FLARE = mAX_VISION_GRASS_METERS_FLARE; + MAX_VISION_GRASS_METERS_OPT = mAX_VISION_GRASS_METERS_OPT; + MAX_VISION_GRASS_METERS_FLARE_OPT = mAX_VISION_GRASS_METERS_FLARE_OPT; + LightOnVisionDistance = lightOnVisionDistance; + FAR_DISTANCE = fAR_DISTANCE; + FarDeltaTimeSec = farDeltaTimeSec; + MIDDLE_DIST = mIDDLE_DIST; + MiddleDeltaTimeSec = middleDeltaTimeSec; + CloseDeltaTimeSec = closeDeltaTimeSec; + POSIBLE_VISION_SPACE = pOSIBLE_VISION_SPACE; + GOAL_TO_FULL_DISSAPEAR = gOAL_TO_FULL_DISSAPEAR; + GOAL_TO_FULL_DISSAPEAR_SHOOT = gOAL_TO_FULL_DISSAPEAR_SHOOT; + BODY_DELTA_TIME_SEARCH_SEC = bODY_DELTA_TIME_SEARCH_SEC; + COME_TO_BODY_DIST = cOME_TO_BODY_DIST; + MARKSMAN_VISIBLE_DIST_COEF = mARKSMAN_VISIBLE_DIST_COEF; + VISIBLE_DISNACE_WITH_LIGHT = vISIBLE_DISNACE_WITH_LIGHT; + ENEMY_LIGHT_ADD = eNEMY_LIGHT_ADD; + ENEMY_LIGHT_START_DIST = eNEMY_LIGHT_START_DIST; + CAN_LOOK_TO_WALL = cAN_LOOK_TO_WALL; + DIST_NOT_TO_IGNORE_WALL = dIST_NOT_TO_IGNORE_WALL; + DIST_CHECK_WALL = dIST_CHECK_WALL; + LOOK_LAST_POSENEMY_IF_NO_DANGER_SEC = lOOK_LAST_POSENEMY_IF_NO_DANGER_SEC; + MIN_LOOK_AROUD_TIME = mIN_LOOK_AROUD_TIME; + OPTIMIZE_TO_ONLY_BODY = oPTIMIZE_TO_ONLY_BODY; + } + + public int OLD_TIME_POINT { get; set; } + public double WAIT_NEW_SENSOR { get; set; } + public double WAIT_NEW__LOOK_SENSOR { get; set; } + public double LOOK_AROUND_DELTA { get; set; } + public double MAX_VISION_GRASS_METERS { get; set; } + public int MAX_VISION_GRASS_METERS_FLARE { get; set; } + public double MAX_VISION_GRASS_METERS_OPT { get; set; } + public double MAX_VISION_GRASS_METERS_FLARE_OPT { get; set; } + public int LightOnVisionDistance { get; set; } + public int FAR_DISTANCE { get; set; } + public int FarDeltaTimeSec { get; set; } + public int MIDDLE_DIST { get; set; } + public int MiddleDeltaTimeSec { get; set; } + public double CloseDeltaTimeSec { get; set; } + public double POSIBLE_VISION_SPACE { get; set; } + public double GOAL_TO_FULL_DISSAPEAR { get; set; } + public double GOAL_TO_FULL_DISSAPEAR_SHOOT { get; set; } + public double BODY_DELTA_TIME_SEARCH_SEC { get; set; } + public double COME_TO_BODY_DIST { get; set; } + public double MARKSMAN_VISIBLE_DIST_COEF { get; set; } + public int VISIBLE_DISNACE_WITH_LIGHT { get; set; } + public int ENEMY_LIGHT_ADD { get; set; } + public int ENEMY_LIGHT_START_DIST { get; set; } + public bool CAN_LOOK_TO_WALL { get; set; } + public int DIST_NOT_TO_IGNORE_WALL { get; set; } + public int DIST_CHECK_WALL { get; set; } + public int LOOK_LAST_POSENEMY_IF_NO_DANGER_SEC { get; set; } + public int MIN_LOOK_AROUD_TIME { get; set; } + public bool OPTIMIZE_TO_ONLY_BODY { get; set; } + } + + public class Shoot + { + public Shoot(int rECOIL_TIME_NORMALIZE, double rECOIL_PER_METER, double mAX_RECOIL_PER_METER, double hORIZONT_RECOIL_COEF, + double wAIT_NEXT_SINGLE_SHOT, double wAIT_NEXT_SINGLE_SHOT_LONG_MAX, double wAIT_NEXT_SINGLE_SHOT_LONG_MIN, int mARKSMAN_DIST_SEK_COEF, + double fINGER_HOLD_SINGLE_SHOT, double bASE_AUTOMATIC_TIME, double aUTOMATIC_FIRE_SCATTERING_COEF, int cHANCE_TO_CHANGE_TO_AUTOMATIC_FIRE_100, + int fAR_DIST_ENEMY, int sHOOT_FROM_COVER, int fAR_DIST_ENEMY_SQR, double mAX_DIST_COEF, double rECOIL_DELTA_PRESS, int rUN_DIST_NO_AMMO, + int rUN_DIST_NO_AMMO_SQRT, int cAN_SHOOTS_TIME_TO_AMBUSH, double nOT_TO_SEE_ENEMY_TO_WANT_RELOAD_PERCENT, + int nOT_TO_SEE_ENEMY_TO_WANT_RELOAD_SEC, double rELOAD_PECNET_NO_ENEMY, int cHANCE_TO_CHANGE_WEAPON, + int cHANCE_TO_CHANGE_WEAPON_WITH_HELMET, int lOW_DIST_TO_CHANGE_WEAPON, int fAR_DIST_TO_CHANGE_WEAPON, int sUPPRESS_BY_SHOOT_TIME, + int sUPPRESS_TRIGGERS_DOWN, int wAIT_NEXT_STATIONARY_GRENADE, double fINGER_HOLD_STATIONARY_GRENADE) + { + RECOIL_TIME_NORMALIZE = rECOIL_TIME_NORMALIZE; + RECOIL_PER_METER = rECOIL_PER_METER; + MAX_RECOIL_PER_METER = mAX_RECOIL_PER_METER; + HORIZONT_RECOIL_COEF = hORIZONT_RECOIL_COEF; + WAIT_NEXT_SINGLE_SHOT = wAIT_NEXT_SINGLE_SHOT; + WAIT_NEXT_SINGLE_SHOT_LONG_MAX = wAIT_NEXT_SINGLE_SHOT_LONG_MAX; + WAIT_NEXT_SINGLE_SHOT_LONG_MIN = wAIT_NEXT_SINGLE_SHOT_LONG_MIN; + MARKSMAN_DIST_SEK_COEF = mARKSMAN_DIST_SEK_COEF; + FINGER_HOLD_SINGLE_SHOT = fINGER_HOLD_SINGLE_SHOT; + BASE_AUTOMATIC_TIME = bASE_AUTOMATIC_TIME; + AUTOMATIC_FIRE_SCATTERING_COEF = aUTOMATIC_FIRE_SCATTERING_COEF; + CHANCE_TO_CHANGE_TO_AUTOMATIC_FIRE_100 = cHANCE_TO_CHANGE_TO_AUTOMATIC_FIRE_100; + FAR_DIST_ENEMY = fAR_DIST_ENEMY; + SHOOT_FROM_COVER = sHOOT_FROM_COVER; + FAR_DIST_ENEMY_SQR = fAR_DIST_ENEMY_SQR; + MAX_DIST_COEF = mAX_DIST_COEF; + RECOIL_DELTA_PRESS = rECOIL_DELTA_PRESS; + RUN_DIST_NO_AMMO = rUN_DIST_NO_AMMO; + RUN_DIST_NO_AMMO_SQRT = rUN_DIST_NO_AMMO_SQRT; + CAN_SHOOTS_TIME_TO_AMBUSH = cAN_SHOOTS_TIME_TO_AMBUSH; + NOT_TO_SEE_ENEMY_TO_WANT_RELOAD_PERCENT = nOT_TO_SEE_ENEMY_TO_WANT_RELOAD_PERCENT; + NOT_TO_SEE_ENEMY_TO_WANT_RELOAD_SEC = nOT_TO_SEE_ENEMY_TO_WANT_RELOAD_SEC; + RELOAD_PECNET_NO_ENEMY = rELOAD_PECNET_NO_ENEMY; + CHANCE_TO_CHANGE_WEAPON = cHANCE_TO_CHANGE_WEAPON; + CHANCE_TO_CHANGE_WEAPON_WITH_HELMET = cHANCE_TO_CHANGE_WEAPON_WITH_HELMET; + LOW_DIST_TO_CHANGE_WEAPON = lOW_DIST_TO_CHANGE_WEAPON; + FAR_DIST_TO_CHANGE_WEAPON = fAR_DIST_TO_CHANGE_WEAPON; + SUPPRESS_BY_SHOOT_TIME = sUPPRESS_BY_SHOOT_TIME; + SUPPRESS_TRIGGERS_DOWN = sUPPRESS_TRIGGERS_DOWN; + WAIT_NEXT_STATIONARY_GRENADE = wAIT_NEXT_STATIONARY_GRENADE; + FINGER_HOLD_STATIONARY_GRENADE = fINGER_HOLD_STATIONARY_GRENADE; + } + + public int RECOIL_TIME_NORMALIZE { get; set; } + public double RECOIL_PER_METER { get; set; } + public double MAX_RECOIL_PER_METER { get; set; } + public double HORIZONT_RECOIL_COEF { get; set; } + public double WAIT_NEXT_SINGLE_SHOT { get; set; } + public double WAIT_NEXT_SINGLE_SHOT_LONG_MAX { get; set; } + public double WAIT_NEXT_SINGLE_SHOT_LONG_MIN { get; set; } + public int MARKSMAN_DIST_SEK_COEF { get; set; } + public double FINGER_HOLD_SINGLE_SHOT { get; set; } + public double BASE_AUTOMATIC_TIME { get; set; } + public double AUTOMATIC_FIRE_SCATTERING_COEF { get; set; } + public int CHANCE_TO_CHANGE_TO_AUTOMATIC_FIRE_100 { get; set; } + public int FAR_DIST_ENEMY { get; set; } + public int SHOOT_FROM_COVER { get; set; } + public int FAR_DIST_ENEMY_SQR { get; set; } + public double MAX_DIST_COEF { get; set; } + public double RECOIL_DELTA_PRESS { get; set; } + public int RUN_DIST_NO_AMMO { get; set; } + public int RUN_DIST_NO_AMMO_SQRT { get; set; } + public int CAN_SHOOTS_TIME_TO_AMBUSH { get; set; } + public double NOT_TO_SEE_ENEMY_TO_WANT_RELOAD_PERCENT { get; set; } + public int NOT_TO_SEE_ENEMY_TO_WANT_RELOAD_SEC { get; set; } + public double RELOAD_PECNET_NO_ENEMY { get; set; } + public int CHANCE_TO_CHANGE_WEAPON { get; set; } + public int CHANCE_TO_CHANGE_WEAPON_WITH_HELMET { get; set; } + public int LOW_DIST_TO_CHANGE_WEAPON { get; set; } + public int FAR_DIST_TO_CHANGE_WEAPON { get; set; } + public int SUPPRESS_BY_SHOOT_TIME { get; set; } + public int SUPPRESS_TRIGGERS_DOWN { get; set; } + public int WAIT_NEXT_STATIONARY_GRENADE { get; set; } + public double FINGER_HOLD_STATIONARY_GRENADE { get; set; } + } + + public class Move + { + public Move(int bASE_ROTATE_SPEED, double rEACH_DIST, double rEACH_DIST_RUN, double sTART_SLOW_DIST, double bASESTART_SLOW_DIST, int sLOW_COEF, int dIST_TO_CAN_CHANGE_WAY, int dIST_TO_START_RAYCAST, int bASE_START_SERACH, int uPDATE_TIME_RECAL_WAY, int fAR_DIST, int fAR_DIST_SQR, int dIST_TO_CAN_CHANGE_WAY_SQR, int dIST_TO_START_RAYCAST_SQR, int bASE_SQRT_START_SERACH, double y_APPROXIMATION, int dELTA_LAST_SEEN_ENEMY, int rEACH_DIST_COVER, int rUN_TO_COVER_MIN, int cHANCE_TO_RUN_IF_NO_AMMO_0_100, bool rUN_IF_CANT_SHOOT, int rUN_IF_GAOL_FAR_THEN, int sEC_TO_CHANGE_TO_RUN) + { + BASE_ROTATE_SPEED = bASE_ROTATE_SPEED; + REACH_DIST = rEACH_DIST; + REACH_DIST_RUN = rEACH_DIST_RUN; + START_SLOW_DIST = sTART_SLOW_DIST; + BASESTART_SLOW_DIST = bASESTART_SLOW_DIST; + SLOW_COEF = sLOW_COEF; + DIST_TO_CAN_CHANGE_WAY = dIST_TO_CAN_CHANGE_WAY; + DIST_TO_START_RAYCAST = dIST_TO_START_RAYCAST; + BASE_START_SERACH = bASE_START_SERACH; + UPDATE_TIME_RECAL_WAY = uPDATE_TIME_RECAL_WAY; + FAR_DIST = fAR_DIST; + FAR_DIST_SQR = fAR_DIST_SQR; + DIST_TO_CAN_CHANGE_WAY_SQR = dIST_TO_CAN_CHANGE_WAY_SQR; + DIST_TO_START_RAYCAST_SQR = dIST_TO_START_RAYCAST_SQR; + BASE_SQRT_START_SERACH = bASE_SQRT_START_SERACH; + Y_APPROXIMATION = y_APPROXIMATION; + DELTA_LAST_SEEN_ENEMY = dELTA_LAST_SEEN_ENEMY; + REACH_DIST_COVER = rEACH_DIST_COVER; + RUN_TO_COVER_MIN = rUN_TO_COVER_MIN; + CHANCE_TO_RUN_IF_NO_AMMO_0_100 = cHANCE_TO_RUN_IF_NO_AMMO_0_100; + RUN_IF_CANT_SHOOT = rUN_IF_CANT_SHOOT; + RUN_IF_GAOL_FAR_THEN = rUN_IF_GAOL_FAR_THEN; + SEC_TO_CHANGE_TO_RUN = sEC_TO_CHANGE_TO_RUN; + } + + public int BASE_ROTATE_SPEED { get; set; } + public double REACH_DIST { get; set; } + public double REACH_DIST_RUN { get; set; } + public double START_SLOW_DIST { get; set; } + public double BASESTART_SLOW_DIST { get; set; } + public int SLOW_COEF { get; set; } + public int DIST_TO_CAN_CHANGE_WAY { get; set; } + public int DIST_TO_START_RAYCAST { get; set; } + public int BASE_START_SERACH { get; set; } + public int UPDATE_TIME_RECAL_WAY { get; set; } + public int FAR_DIST { get; set; } + public int FAR_DIST_SQR { get; set; } + public int DIST_TO_CAN_CHANGE_WAY_SQR { get; set; } + public int DIST_TO_START_RAYCAST_SQR { get; set; } + public int BASE_SQRT_START_SERACH { get; set; } + public double Y_APPROXIMATION { get; set; } + public int DELTA_LAST_SEEN_ENEMY { get; set; } + public int REACH_DIST_COVER { get; set; } + public int RUN_TO_COVER_MIN { get; set; } + public int CHANCE_TO_RUN_IF_NO_AMMO_0_100 { get; set; } + public bool RUN_IF_CANT_SHOOT { get; set; } + public int RUN_IF_GAOL_FAR_THEN { get; set; } + public int SEC_TO_CHANGE_TO_RUN { get; set; } + } + + public class Grenade + { + public Grenade(int dELTA_NEXT_ATTEMPT_FROM_COVER, int dELTA_NEXT_ATTEMPT, int mIN_DIST_NOT_TO_THROW, int nEAR_DELTA_THROW_TIME_SEC, int mIN_THROW_GRENADE_DIST, int mIN_THROW_GRENADE_DIST_SQRT, int mIN_DIST_NOT_TO_THROW_SQR, int rUN_AWAY, int rUN_AWAY_SQR, int aDD_GRENADE_AS_DANGER, int aDD_GRENADE_AS_DANGER_SQR, int cHANCE_TO_NOTIFY_ENEMY_GR_100, double grenadePerMeter, int rEQUEST_DIST_MUST_THROW_SQRT, int rEQUEST_DIST_MUST_THROW, int bEWARE_TYPE, int sHOOT_TO_SMOKE_CHANCE_100, int cHANCE_RUN_FLASHED_100, int mAX_FLASHED_DIST_TO_SHOOT, int mAX_FLASHED_DIST_TO_SHOOT_SQRT, double fLASH_GRENADE_TIME_COEF, int sIZE_SPOTTED_COEF, int bE_ATTENTION_COEF, int tIME_SHOOT_TO_FLASH, int cLOSE_TO_SMOKE_TO_SHOOT, int cLOSE_TO_SMOKE_TO_SHOOT_SQRT, int cLOSE_TO_SMOKE_TIME_DELTA, int sMOKE_CHECK_DELTA, double dELTA_GRENADE_START_TIME, int aMBUSH_IF_SMOKE_IN_ZONE_100, int aMBUSH_IF_SMOKE_RETURN_TO_ATTACK_SEC, bool nO_RUN_FROM_AI_GRENADES, double mAX_THROW_POWER, double grenadePrecision, bool sTOP_WHEN_THROW_GRENADE, double wAIT_TIME_TURN_AWAY, int sMOKE_SUPPRESS_DELTA, int dAMAGE_GRENADE_SUPPRESS_DELTA, int sTUN_SUPPRESS_DELTA, bool cHEAT_START_GRENADE_PLACE, bool cAN_THROW_STRAIGHT_CONTACT, int sTRAIGHT_CONTACT_DELTA_SEC, int aNG_TYPE) + { + DELTA_NEXT_ATTEMPT_FROM_COVER = dELTA_NEXT_ATTEMPT_FROM_COVER; + DELTA_NEXT_ATTEMPT = dELTA_NEXT_ATTEMPT; + MIN_DIST_NOT_TO_THROW = mIN_DIST_NOT_TO_THROW; + NEAR_DELTA_THROW_TIME_SEC = nEAR_DELTA_THROW_TIME_SEC; + MIN_THROW_GRENADE_DIST = mIN_THROW_GRENADE_DIST; + MIN_THROW_GRENADE_DIST_SQRT = mIN_THROW_GRENADE_DIST_SQRT; + MIN_DIST_NOT_TO_THROW_SQR = mIN_DIST_NOT_TO_THROW_SQR; + RUN_AWAY = rUN_AWAY; + RUN_AWAY_SQR = rUN_AWAY_SQR; + ADD_GRENADE_AS_DANGER = aDD_GRENADE_AS_DANGER; + ADD_GRENADE_AS_DANGER_SQR = aDD_GRENADE_AS_DANGER_SQR; + CHANCE_TO_NOTIFY_ENEMY_GR_100 = cHANCE_TO_NOTIFY_ENEMY_GR_100; + GrenadePerMeter = grenadePerMeter; + REQUEST_DIST_MUST_THROW_SQRT = rEQUEST_DIST_MUST_THROW_SQRT; + REQUEST_DIST_MUST_THROW = rEQUEST_DIST_MUST_THROW; + BEWARE_TYPE = bEWARE_TYPE; + SHOOT_TO_SMOKE_CHANCE_100 = sHOOT_TO_SMOKE_CHANCE_100; + CHANCE_RUN_FLASHED_100 = cHANCE_RUN_FLASHED_100; + MAX_FLASHED_DIST_TO_SHOOT = mAX_FLASHED_DIST_TO_SHOOT; + MAX_FLASHED_DIST_TO_SHOOT_SQRT = mAX_FLASHED_DIST_TO_SHOOT_SQRT; + FLASH_GRENADE_TIME_COEF = fLASH_GRENADE_TIME_COEF; + SIZE_SPOTTED_COEF = sIZE_SPOTTED_COEF; + BE_ATTENTION_COEF = bE_ATTENTION_COEF; + TIME_SHOOT_TO_FLASH = tIME_SHOOT_TO_FLASH; + CLOSE_TO_SMOKE_TO_SHOOT = cLOSE_TO_SMOKE_TO_SHOOT; + CLOSE_TO_SMOKE_TO_SHOOT_SQRT = cLOSE_TO_SMOKE_TO_SHOOT_SQRT; + CLOSE_TO_SMOKE_TIME_DELTA = cLOSE_TO_SMOKE_TIME_DELTA; + SMOKE_CHECK_DELTA = sMOKE_CHECK_DELTA; + DELTA_GRENADE_START_TIME = dELTA_GRENADE_START_TIME; + AMBUSH_IF_SMOKE_IN_ZONE_100 = aMBUSH_IF_SMOKE_IN_ZONE_100; + AMBUSH_IF_SMOKE_RETURN_TO_ATTACK_SEC = aMBUSH_IF_SMOKE_RETURN_TO_ATTACK_SEC; + NO_RUN_FROM_AI_GRENADES = nO_RUN_FROM_AI_GRENADES; + MAX_THROW_POWER = mAX_THROW_POWER; + GrenadePrecision = grenadePrecision; + STOP_WHEN_THROW_GRENADE = sTOP_WHEN_THROW_GRENADE; + WAIT_TIME_TURN_AWAY = wAIT_TIME_TURN_AWAY; + SMOKE_SUPPRESS_DELTA = sMOKE_SUPPRESS_DELTA; + DAMAGE_GRENADE_SUPPRESS_DELTA = dAMAGE_GRENADE_SUPPRESS_DELTA; + STUN_SUPPRESS_DELTA = sTUN_SUPPRESS_DELTA; + CHEAT_START_GRENADE_PLACE = cHEAT_START_GRENADE_PLACE; + CAN_THROW_STRAIGHT_CONTACT = cAN_THROW_STRAIGHT_CONTACT; + STRAIGHT_CONTACT_DELTA_SEC = sTRAIGHT_CONTACT_DELTA_SEC; + ANG_TYPE = aNG_TYPE; + } + + public int DELTA_NEXT_ATTEMPT_FROM_COVER { get; set; } + public int DELTA_NEXT_ATTEMPT { get; set; } + public int MIN_DIST_NOT_TO_THROW { get; set; } + public int NEAR_DELTA_THROW_TIME_SEC { get; set; } + public int MIN_THROW_GRENADE_DIST { get; set; } + public int MIN_THROW_GRENADE_DIST_SQRT { get; set; } + public int MIN_DIST_NOT_TO_THROW_SQR { get; set; } + public int RUN_AWAY { get; set; } + public int RUN_AWAY_SQR { get; set; } + public int ADD_GRENADE_AS_DANGER { get; set; } + public int ADD_GRENADE_AS_DANGER_SQR { get; set; } + public int CHANCE_TO_NOTIFY_ENEMY_GR_100 { get; set; } + public double GrenadePerMeter { get; set; } + public int REQUEST_DIST_MUST_THROW_SQRT { get; set; } + public int REQUEST_DIST_MUST_THROW { get; set; } + public int BEWARE_TYPE { get; set; } + public int SHOOT_TO_SMOKE_CHANCE_100 { get; set; } + public int CHANCE_RUN_FLASHED_100 { get; set; } + public int MAX_FLASHED_DIST_TO_SHOOT { get; set; } + public int MAX_FLASHED_DIST_TO_SHOOT_SQRT { get; set; } + public double FLASH_GRENADE_TIME_COEF { get; set; } + public int SIZE_SPOTTED_COEF { get; set; } + public int BE_ATTENTION_COEF { get; set; } + public int TIME_SHOOT_TO_FLASH { get; set; } + public int CLOSE_TO_SMOKE_TO_SHOOT { get; set; } + public int CLOSE_TO_SMOKE_TO_SHOOT_SQRT { get; set; } + public int CLOSE_TO_SMOKE_TIME_DELTA { get; set; } + public int SMOKE_CHECK_DELTA { get; set; } + public double DELTA_GRENADE_START_TIME { get; set; } + public int AMBUSH_IF_SMOKE_IN_ZONE_100 { get; set; } + public int AMBUSH_IF_SMOKE_RETURN_TO_ATTACK_SEC { get; set; } + public bool NO_RUN_FROM_AI_GRENADES { get; set; } + public double MAX_THROW_POWER { get; set; } + public double GrenadePrecision { get; set; } + public bool STOP_WHEN_THROW_GRENADE { get; set; } + public double WAIT_TIME_TURN_AWAY { get; set; } + public int SMOKE_SUPPRESS_DELTA { get; set; } + public int DAMAGE_GRENADE_SUPPRESS_DELTA { get; set; } + public int STUN_SUPPRESS_DELTA { get; set; } + public bool CHEAT_START_GRENADE_PLACE { get; set; } + public bool CAN_THROW_STRAIGHT_CONTACT { get; set; } + public int STRAIGHT_CONTACT_DELTA_SEC { get; set; } + public int ANG_TYPE { get; set; } + public double MIN_THROW_DIST_PERCENT_0_1 { get; set; } + } + + public class Change + { + public Change(double sMOKE_VISION_DIST, double sMOKE_GAIN_SIGHT, double sMOKE_SCATTERING, double sMOKE_PRECICING, int sMOKE_HEARING, double sMOKE_ACCURATY, double sMOKE_LAY_CHANCE, double fLASH_VISION_DIST, double fLASH_GAIN_SIGHT, double fLASH_SCATTERING, double fLASH_PRECICING, int fLASH_HEARING, double fLASH_ACCURATY, int fLASH_LAY_CHANCE, double sTUN_HEARING) + { + SMOKE_VISION_DIST = sMOKE_VISION_DIST; + SMOKE_GAIN_SIGHT = sMOKE_GAIN_SIGHT; + SMOKE_SCATTERING = sMOKE_SCATTERING; + SMOKE_PRECICING = sMOKE_PRECICING; + SMOKE_HEARING = sMOKE_HEARING; + SMOKE_ACCURATY = sMOKE_ACCURATY; + SMOKE_LAY_CHANCE = sMOKE_LAY_CHANCE; + FLASH_VISION_DIST = fLASH_VISION_DIST; + FLASH_GAIN_SIGHT = fLASH_GAIN_SIGHT; + FLASH_SCATTERING = fLASH_SCATTERING; + FLASH_PRECICING = fLASH_PRECICING; + FLASH_HEARING = fLASH_HEARING; + FLASH_ACCURATY = fLASH_ACCURATY; + FLASH_LAY_CHANCE = fLASH_LAY_CHANCE; + STUN_HEARING = sTUN_HEARING; + } + + public double SMOKE_VISION_DIST { get; set; } + public double SMOKE_GAIN_SIGHT { get; set; } + public double SMOKE_SCATTERING { get; set; } + public double SMOKE_PRECICING { get; set; } + public int SMOKE_HEARING { get; set; } + public double SMOKE_ACCURATY { get; set; } + public double SMOKE_LAY_CHANCE { get; set; } + public double FLASH_VISION_DIST { get; set; } + public double FLASH_GAIN_SIGHT { get; set; } + public double FLASH_SCATTERING { get; set; } + public double FLASH_PRECICING { get; set; } + public int FLASH_HEARING { get; set; } + public double FLASH_ACCURATY { get; set; } + public int FLASH_LAY_CHANCE { get; set; } + public double STUN_HEARING { get; set; } + } + + public class Cover + { + public Cover(int rETURN_TO_ATTACK_AFTER_AMBUSH_MIN, int rETURN_TO_ATTACK_AFTER_AMBUSH_MAX, int sOUND_TO_GET_SPOTTED, int tIME_TO_MOVE_TO_COVER, int mAX_DIST_OF_COVER, int cHANGE_RUN_TO_COVER_SEC, double cHANGE_RUN_TO_COVER_SEC_GREANDE, int mIN_DIST_TO_ENEMY, int dIST_CANT_CHANGE_WAY, int dIST_CHECK_SFETY, int tIME_CHECK_SAFE, double hIDE_TO_COVER_TIME, int mAX_DIST_OF_COVER_SQR, int dIST_CANT_CHANGE_WAY_SQR, int sPOTTED_COVERS_RADIUS, double lOOK_LAST_ENEMY_POS_MOVING, int lOOK_TO_HIT_POINT_IF_LAST_ENEMY, int lOOK_LAST_ENEMY_POS_LOOKAROUND, int oFFSET_LOOK_ALONG_WALL_ANG, int sPOTTED_GRENADE_RADIUS, int mAX_SPOTTED_TIME_SEC, int wAIT_INT_COVER_FINDING_ENEMY, int cLOSE_DIST_POINT_SQRT, int dELTA_SEEN_FROM_COVE_LAST_POS, bool mOVE_TO_COVER_WHEN_TARGET, bool rUN_COVER_IF_CAN_AND_NO_ENEMIES, int sPOTTED_GRENADE_TIME, bool dEPENDS_Y_DIST_TO_BOT, int rUN_IF_FAR, int rUN_IF_FAR_SQRT, int sTAY_IF_FAR, int sTAY_IF_FAR_SQRT, bool cHECK_COVER_ENEMY_LOOK, int sHOOT_NEAR_TO_LEAVE, double sHOOT_NEAR_SEC_PERIOD, int hITS_TO_LEAVE_COVER, int hITS_TO_LEAVE_COVER_UNKNOWN, int dOG_FIGHT_AFTER_LEAVE, bool nOT_LOOK_AT_WALL_IS_DANGER, int mIN_DEFENCE_LEVEL, double gOOD_DIST_TO_POINT_COEF, int eNEMY_DIST_TO_GO_OUT, int sTATIONARY_WEAPON_NO_ENEMY_GETUP, int sTATIONARY_WEAPON_MAX_DIST_TO_USE) + { + RETURN_TO_ATTACK_AFTER_AMBUSH_MIN = rETURN_TO_ATTACK_AFTER_AMBUSH_MIN; + RETURN_TO_ATTACK_AFTER_AMBUSH_MAX = rETURN_TO_ATTACK_AFTER_AMBUSH_MAX; + SOUND_TO_GET_SPOTTED = sOUND_TO_GET_SPOTTED; + TIME_TO_MOVE_TO_COVER = tIME_TO_MOVE_TO_COVER; + MAX_DIST_OF_COVER = mAX_DIST_OF_COVER; + CHANGE_RUN_TO_COVER_SEC = cHANGE_RUN_TO_COVER_SEC; + CHANGE_RUN_TO_COVER_SEC_GREANDE = cHANGE_RUN_TO_COVER_SEC_GREANDE; + MIN_DIST_TO_ENEMY = mIN_DIST_TO_ENEMY; + DIST_CANT_CHANGE_WAY = dIST_CANT_CHANGE_WAY; + DIST_CHECK_SFETY = dIST_CHECK_SFETY; + TIME_CHECK_SAFE = tIME_CHECK_SAFE; + HIDE_TO_COVER_TIME = hIDE_TO_COVER_TIME; + MAX_DIST_OF_COVER_SQR = mAX_DIST_OF_COVER_SQR; + DIST_CANT_CHANGE_WAY_SQR = dIST_CANT_CHANGE_WAY_SQR; + SPOTTED_COVERS_RADIUS = sPOTTED_COVERS_RADIUS; + LOOK_LAST_ENEMY_POS_MOVING = lOOK_LAST_ENEMY_POS_MOVING; + LOOK_TO_HIT_POINT_IF_LAST_ENEMY = lOOK_TO_HIT_POINT_IF_LAST_ENEMY; + LOOK_LAST_ENEMY_POS_LOOKAROUND = lOOK_LAST_ENEMY_POS_LOOKAROUND; + OFFSET_LOOK_ALONG_WALL_ANG = oFFSET_LOOK_ALONG_WALL_ANG; + SPOTTED_GRENADE_RADIUS = sPOTTED_GRENADE_RADIUS; + MAX_SPOTTED_TIME_SEC = mAX_SPOTTED_TIME_SEC; + WAIT_INT_COVER_FINDING_ENEMY = wAIT_INT_COVER_FINDING_ENEMY; + CLOSE_DIST_POINT_SQRT = cLOSE_DIST_POINT_SQRT; + DELTA_SEEN_FROM_COVE_LAST_POS = dELTA_SEEN_FROM_COVE_LAST_POS; + MOVE_TO_COVER_WHEN_TARGET = mOVE_TO_COVER_WHEN_TARGET; + RUN_COVER_IF_CAN_AND_NO_ENEMIES = rUN_COVER_IF_CAN_AND_NO_ENEMIES; + SPOTTED_GRENADE_TIME = sPOTTED_GRENADE_TIME; + DEPENDS_Y_DIST_TO_BOT = dEPENDS_Y_DIST_TO_BOT; + RUN_IF_FAR = rUN_IF_FAR; + RUN_IF_FAR_SQRT = rUN_IF_FAR_SQRT; + STAY_IF_FAR = sTAY_IF_FAR; + STAY_IF_FAR_SQRT = sTAY_IF_FAR_SQRT; + CHECK_COVER_ENEMY_LOOK = cHECK_COVER_ENEMY_LOOK; + SHOOT_NEAR_TO_LEAVE = sHOOT_NEAR_TO_LEAVE; + SHOOT_NEAR_SEC_PERIOD = sHOOT_NEAR_SEC_PERIOD; + HITS_TO_LEAVE_COVER = hITS_TO_LEAVE_COVER; + HITS_TO_LEAVE_COVER_UNKNOWN = hITS_TO_LEAVE_COVER_UNKNOWN; + DOG_FIGHT_AFTER_LEAVE = dOG_FIGHT_AFTER_LEAVE; + NOT_LOOK_AT_WALL_IS_DANGER = nOT_LOOK_AT_WALL_IS_DANGER; + MIN_DEFENCE_LEVEL = mIN_DEFENCE_LEVEL; + GOOD_DIST_TO_POINT_COEF = gOOD_DIST_TO_POINT_COEF; + ENEMY_DIST_TO_GO_OUT = eNEMY_DIST_TO_GO_OUT; + STATIONARY_WEAPON_NO_ENEMY_GETUP = sTATIONARY_WEAPON_NO_ENEMY_GETUP; + STATIONARY_WEAPON_MAX_DIST_TO_USE = sTATIONARY_WEAPON_MAX_DIST_TO_USE; + } + + public int RETURN_TO_ATTACK_AFTER_AMBUSH_MIN { get; set; } + public int RETURN_TO_ATTACK_AFTER_AMBUSH_MAX { get; set; } + public int SOUND_TO_GET_SPOTTED { get; set; } + public int TIME_TO_MOVE_TO_COVER { get; set; } + public int MAX_DIST_OF_COVER { get; set; } + public int CHANGE_RUN_TO_COVER_SEC { get; set; } + public double CHANGE_RUN_TO_COVER_SEC_GREANDE { get; set; } + public int MIN_DIST_TO_ENEMY { get; set; } + public int DIST_CANT_CHANGE_WAY { get; set; } + public int DIST_CHECK_SFETY { get; set; } + public int TIME_CHECK_SAFE { get; set; } + public double HIDE_TO_COVER_TIME { get; set; } + public int MAX_DIST_OF_COVER_SQR { get; set; } + public int DIST_CANT_CHANGE_WAY_SQR { get; set; } + public int SPOTTED_COVERS_RADIUS { get; set; } + public double LOOK_LAST_ENEMY_POS_MOVING { get; set; } + public int LOOK_TO_HIT_POINT_IF_LAST_ENEMY { get; set; } + public int LOOK_LAST_ENEMY_POS_LOOKAROUND { get; set; } + public int OFFSET_LOOK_ALONG_WALL_ANG { get; set; } + public int SPOTTED_GRENADE_RADIUS { get; set; } + public int MAX_SPOTTED_TIME_SEC { get; set; } + public int WAIT_INT_COVER_FINDING_ENEMY { get; set; } + public int CLOSE_DIST_POINT_SQRT { get; set; } + public int DELTA_SEEN_FROM_COVE_LAST_POS { get; set; } + public bool MOVE_TO_COVER_WHEN_TARGET { get; set; } + public bool RUN_COVER_IF_CAN_AND_NO_ENEMIES { get; set; } + public int SPOTTED_GRENADE_TIME { get; set; } + public bool DEPENDS_Y_DIST_TO_BOT { get; set; } + public int RUN_IF_FAR { get; set; } + public int RUN_IF_FAR_SQRT { get; set; } + public int STAY_IF_FAR { get; set; } + public int STAY_IF_FAR_SQRT { get; set; } + public bool CHECK_COVER_ENEMY_LOOK { get; set; } + public int SHOOT_NEAR_TO_LEAVE { get; set; } + public double SHOOT_NEAR_SEC_PERIOD { get; set; } + public int HITS_TO_LEAVE_COVER { get; set; } + public int HITS_TO_LEAVE_COVER_UNKNOWN { get; set; } + public int DOG_FIGHT_AFTER_LEAVE { get; set; } + public bool NOT_LOOK_AT_WALL_IS_DANGER { get; set; } + public int MIN_DEFENCE_LEVEL { get; set; } + public double GOOD_DIST_TO_POINT_COEF { get; set; } + public int ENEMY_DIST_TO_GO_OUT { get; set; } + public int STATIONARY_WEAPON_NO_ENEMY_GETUP { get; set; } + public int STATIONARY_WEAPON_MAX_DIST_TO_USE { get; set; } + } + + public class Patrol + { + public Patrol(int dEAD_BODY_LOOK_PERIOD, int lOOK_TIME_BASE, bool cAN_CHOOSE_RESERV, bool tRY_CHOOSE_RESERV_WAY_ON_START, bool cAN_LOOK_TO_DEADBODIES, bool cAN_FRIENDLY_TILT, bool cAN_HARD_AIM, int rESERVE_TIME_STAY, int fRIEND_SEARCH_SEC, double tALK_DELAY, int mIN_TALK_DELAY, double tALK_DELAY_BIG, double cHANGE_WAY_TIME, int mIN_DIST_TO_CLOSE_TALK, double vISION_DIST_COEF_PEACE, int mIN_DIST_TO_CLOSE_TALK_SQR, int cHANCE_TO_CUT_WAY_0_100, double cUT_WAY_MIN_0_1, double cUT_WAY_MAX_0_1, int cHANCE_TO_CHANGE_WAY_0_100, int cHANCE_TO_SHOOT_DEADBODY, int sUSPETION_PLACE_LIFETIME, int rESERVE_OUT_TIME, int cLOSE_TO_SELECT_RESERV_WAY, int mAX_YDIST_TO_START_WARN_REQUEST_TO_REQUESTER) + { + DEAD_BODY_LOOK_PERIOD = dEAD_BODY_LOOK_PERIOD; + LOOK_TIME_BASE = lOOK_TIME_BASE; + CAN_CHOOSE_RESERV = cAN_CHOOSE_RESERV; + TRY_CHOOSE_RESERV_WAY_ON_START = tRY_CHOOSE_RESERV_WAY_ON_START; + CAN_LOOK_TO_DEADBODIES = cAN_LOOK_TO_DEADBODIES; + CAN_FRIENDLY_TILT = cAN_FRIENDLY_TILT; + CAN_HARD_AIM = cAN_HARD_AIM; + RESERVE_TIME_STAY = rESERVE_TIME_STAY; + FRIEND_SEARCH_SEC = fRIEND_SEARCH_SEC; + TALK_DELAY = tALK_DELAY; + MIN_TALK_DELAY = mIN_TALK_DELAY; + TALK_DELAY_BIG = tALK_DELAY_BIG; + CHANGE_WAY_TIME = cHANGE_WAY_TIME; + MIN_DIST_TO_CLOSE_TALK = mIN_DIST_TO_CLOSE_TALK; + VISION_DIST_COEF_PEACE = vISION_DIST_COEF_PEACE; + MIN_DIST_TO_CLOSE_TALK_SQR = mIN_DIST_TO_CLOSE_TALK_SQR; + CHANCE_TO_CUT_WAY_0_100 = cHANCE_TO_CUT_WAY_0_100; + CUT_WAY_MIN_0_1 = cUT_WAY_MIN_0_1; + CUT_WAY_MAX_0_1 = cUT_WAY_MAX_0_1; + CHANCE_TO_CHANGE_WAY_0_100 = cHANCE_TO_CHANGE_WAY_0_100; + CHANCE_TO_SHOOT_DEADBODY = cHANCE_TO_SHOOT_DEADBODY; + SUSPETION_PLACE_LIFETIME = sUSPETION_PLACE_LIFETIME; + RESERVE_OUT_TIME = rESERVE_OUT_TIME; + CLOSE_TO_SELECT_RESERV_WAY = cLOSE_TO_SELECT_RESERV_WAY; + MAX_YDIST_TO_START_WARN_REQUEST_TO_REQUESTER = mAX_YDIST_TO_START_WARN_REQUEST_TO_REQUESTER; + } + + public int DEAD_BODY_LOOK_PERIOD { get; set; } + public int LOOK_TIME_BASE { get; set; } + public bool CAN_CHOOSE_RESERV { get; set; } + public bool TRY_CHOOSE_RESERV_WAY_ON_START { get; set; } + public bool CAN_LOOK_TO_DEADBODIES { get; set; } + public bool CAN_FRIENDLY_TILT { get; set; } + public bool CAN_HARD_AIM { get; set; } + public int RESERVE_TIME_STAY { get; set; } + public int FRIEND_SEARCH_SEC { get; set; } + public double TALK_DELAY { get; set; } + public int MIN_TALK_DELAY { get; set; } + public double TALK_DELAY_BIG { get; set; } + public double CHANGE_WAY_TIME { get; set; } + public int MIN_DIST_TO_CLOSE_TALK { get; set; } + public double VISION_DIST_COEF_PEACE { get; set; } + public int MIN_DIST_TO_CLOSE_TALK_SQR { get; set; } + public int CHANCE_TO_CUT_WAY_0_100 { get; set; } + public double CUT_WAY_MIN_0_1 { get; set; } + public double CUT_WAY_MAX_0_1 { get; set; } + public int CHANCE_TO_CHANGE_WAY_0_100 { get; set; } + public int CHANCE_TO_SHOOT_DEADBODY { get; set; } + public int SUSPETION_PLACE_LIFETIME { get; set; } + public int RESERVE_OUT_TIME { get; set; } + public int CLOSE_TO_SELECT_RESERV_WAY { get; set; } + public int MAX_YDIST_TO_START_WARN_REQUEST_TO_REQUESTER { get; set; } + } + + public class Hearing + { + public Hearing(int bOT_CLOSE_PANIC_DIST, double cHANCE_TO_HEAR_SIMPLE_SOUND_0_1, double dISPERSION_COEF, int cLOSE_DIST, int fAR_DIST, int sOUND_DIR_DEEFREE, int dIST_PLACE_TO_FIND_POINT, int dEAD_BODY_SOUND_RAD, bool lOOK_ONLY_DANGER, int rESET_TIMER_DIST, double hEAR_DELAY_WHEN_PEACE, double hEAR_DELAY_WHEN_HAVE_SMT, int lOOK_ONLY_DANGER_DELTA) + { + BOT_CLOSE_PANIC_DIST = bOT_CLOSE_PANIC_DIST; + CHANCE_TO_HEAR_SIMPLE_SOUND_0_1 = cHANCE_TO_HEAR_SIMPLE_SOUND_0_1; + DISPERSION_COEF = dISPERSION_COEF; + CLOSE_DIST = cLOSE_DIST; + FAR_DIST = fAR_DIST; + SOUND_DIR_DEEFREE = sOUND_DIR_DEEFREE; + DIST_PLACE_TO_FIND_POINT = dIST_PLACE_TO_FIND_POINT; + DEAD_BODY_SOUND_RAD = dEAD_BODY_SOUND_RAD; + LOOK_ONLY_DANGER = lOOK_ONLY_DANGER; + RESET_TIMER_DIST = rESET_TIMER_DIST; + HEAR_DELAY_WHEN_PEACE = hEAR_DELAY_WHEN_PEACE; + HEAR_DELAY_WHEN_HAVE_SMT = hEAR_DELAY_WHEN_HAVE_SMT; + LOOK_ONLY_DANGER_DELTA = lOOK_ONLY_DANGER_DELTA; + } + + public int BOT_CLOSE_PANIC_DIST { get; set; } + public double CHANCE_TO_HEAR_SIMPLE_SOUND_0_1 { get; set; } + public double DISPERSION_COEF { get; set; } + public int CLOSE_DIST { get; set; } + public int FAR_DIST { get; set; } + public int SOUND_DIR_DEEFREE { get; set; } + public int DIST_PLACE_TO_FIND_POINT { get; set; } + public int DEAD_BODY_SOUND_RAD { get; set; } + public bool LOOK_ONLY_DANGER { get; set; } + public int RESET_TIMER_DIST { get; set; } + public double HEAR_DELAY_WHEN_PEACE { get; set; } + public double HEAR_DELAY_WHEN_HAVE_SMT { get; set; } + public int LOOK_ONLY_DANGER_DELTA { get; set; } + } + + public class Mind + { + public Mind(int hOW_WORK_OVER_DEAD_BODY, int mIN_SHOOTS_TIME, int mAX_SHOOTS_TIME, int tIME_LEAVE_MAP, int tIME_TO_RUN_TO_COVER_CAUSE_SHOOT_SEC, int dAMAGE_REDUCTION_TIME_SEC, int mIN_DAMAGE_SCARE, int cHANCE_TO_RUN_CAUSE_DAMAGE_0_100, int tIME_TO_FORGOR_ABOUT_ENEMY_SEC, int tIME_TO_FIND_ENEMY, int mAX_AGGRO_BOT_DIST, int hIT_POINT_DETECTION, int dANGER_POINT_CHOOSE_COEF, double sIMPLE_POINT_CHOOSE_COEF, double lASTSEEN_POINT_CHOOSE_COEF, double cOVER_DIST_COEF, int dIST_TO_FOUND_SQRT, int mAX_AGGRO_BOT_DIST_SQR, int dIST_TO_STOP_RUN_ENEMY, int eNEMY_LOOK_AT_ME_ANG, int mIN_START_AGGRESION_COEF, int mAX_START_AGGRESION_COEF, int bULLET_FEEL_DIST, int bULLET_FEEL_CLOSE_SDIST, int aTTACK_IMMEDIATLY_CHANCE_0_100, int cHANCE_FUCK_YOU_ON_CONTACT_100, double fRIEND_DEAD_AGR_LOW, double fRIEND_AGR_KILL, int lAST_ENEMY_LOOK_TO, bool cAN_RECIVE_PLAYER_REQUESTS, bool cAN_TAKE_ITEMS, bool cAN_USE_MEDS, int sUSPETION_POINT_CHANCE_ADD100, bool aMBUSH_WHEN_UNDER_FIRE, int aMBUSH_WHEN_UNDER_FIRE_TIME_RESIST, double aTTACK_ENEMY_IF_PROTECT_DELTA_LAST_TIME_SEEN, double hOLD_IF_PROTECT_DELTA_LAST_TIME_SEEN, int fIND_COVER_TO_GET_POSITION_WITH_SHOOT, bool pROTECT_TIME_REAL, int cHANCE_SHOOT_WHEN_WARN_PLAYER_100, bool cAN_PANIC_IS_PROTECT, bool nO_RUN_AWAY_FOR_SAFE, double pART_PERCENT_TO_HEAL, int pROTECT_DELTA_HEAL_SEC, bool cAN_STAND_BY, bool cAN_THROW_REQUESTS, int gROUP_ANY_PHRASE_DELAY, int gROUP_EXACTLY_PHRASE_DELAY, int dIST_TO_ENEMY_YO_CAN_HEAL, int cHANCE_TO_STAY_WHEN_WARN_PLAYER_100, int dOG_FIGHT_OUT, int dOG_FIGHT_IN, int sHOOT_INSTEAD_DOG_FIGHT, int pISTOL_SHOTGUN_AMBUSH_DIST, int sTANDART_AMBUSH_DIST, int aI_POWER_COEF, int cOVER_SECONDS_AFTER_LOSE_VISION, bool cOVER_SELF_ALWAYS_IF_DAMAGED, int sEC_TO_MORE_DIST_TO_RUN, int hEAL_DELAY_SEC, int hIT_DELAY_WHEN_HAVE_SMT, int hIT_DELAY_WHEN_PEACE, bool tALK_WITH_QUERY, bool wILL_PERSUE_AXEMAN) + { + HOW_WORK_OVER_DEAD_BODY = hOW_WORK_OVER_DEAD_BODY; + MIN_SHOOTS_TIME = mIN_SHOOTS_TIME; + MAX_SHOOTS_TIME = mAX_SHOOTS_TIME; + TIME_LEAVE_MAP = tIME_LEAVE_MAP; + TIME_TO_RUN_TO_COVER_CAUSE_SHOOT_SEC = tIME_TO_RUN_TO_COVER_CAUSE_SHOOT_SEC; + DAMAGE_REDUCTION_TIME_SEC = dAMAGE_REDUCTION_TIME_SEC; + MIN_DAMAGE_SCARE = mIN_DAMAGE_SCARE; + CHANCE_TO_RUN_CAUSE_DAMAGE_0_100 = cHANCE_TO_RUN_CAUSE_DAMAGE_0_100; + TIME_TO_FORGOR_ABOUT_ENEMY_SEC = tIME_TO_FORGOR_ABOUT_ENEMY_SEC; + TIME_TO_FIND_ENEMY = tIME_TO_FIND_ENEMY; + MAX_AGGRO_BOT_DIST = mAX_AGGRO_BOT_DIST; + HIT_POINT_DETECTION = hIT_POINT_DETECTION; + DANGER_POINT_CHOOSE_COEF = dANGER_POINT_CHOOSE_COEF; + SIMPLE_POINT_CHOOSE_COEF = sIMPLE_POINT_CHOOSE_COEF; + LASTSEEN_POINT_CHOOSE_COEF = lASTSEEN_POINT_CHOOSE_COEF; + COVER_DIST_COEF = cOVER_DIST_COEF; + DIST_TO_FOUND_SQRT = dIST_TO_FOUND_SQRT; + MAX_AGGRO_BOT_DIST_SQR = mAX_AGGRO_BOT_DIST_SQR; + DIST_TO_STOP_RUN_ENEMY = dIST_TO_STOP_RUN_ENEMY; + ENEMY_LOOK_AT_ME_ANG = eNEMY_LOOK_AT_ME_ANG; + MIN_START_AGGRESION_COEF = mIN_START_AGGRESION_COEF; + MAX_START_AGGRESION_COEF = mAX_START_AGGRESION_COEF; + BULLET_FEEL_DIST = bULLET_FEEL_DIST; + BULLET_FEEL_CLOSE_SDIST = bULLET_FEEL_CLOSE_SDIST; + ATTACK_IMMEDIATLY_CHANCE_0_100 = aTTACK_IMMEDIATLY_CHANCE_0_100; + CHANCE_FUCK_YOU_ON_CONTACT_100 = cHANCE_FUCK_YOU_ON_CONTACT_100; + FRIEND_DEAD_AGR_LOW = fRIEND_DEAD_AGR_LOW; + FRIEND_AGR_KILL = fRIEND_AGR_KILL; + LAST_ENEMY_LOOK_TO = lAST_ENEMY_LOOK_TO; + CAN_RECIVE_PLAYER_REQUESTS = cAN_RECIVE_PLAYER_REQUESTS; + CAN_TAKE_ITEMS = cAN_TAKE_ITEMS; + CAN_USE_MEDS = cAN_USE_MEDS; + SUSPETION_POINT_CHANCE_ADD100 = sUSPETION_POINT_CHANCE_ADD100; + AMBUSH_WHEN_UNDER_FIRE = aMBUSH_WHEN_UNDER_FIRE; + AMBUSH_WHEN_UNDER_FIRE_TIME_RESIST = aMBUSH_WHEN_UNDER_FIRE_TIME_RESIST; + ATTACK_ENEMY_IF_PROTECT_DELTA_LAST_TIME_SEEN = aTTACK_ENEMY_IF_PROTECT_DELTA_LAST_TIME_SEEN; + HOLD_IF_PROTECT_DELTA_LAST_TIME_SEEN = hOLD_IF_PROTECT_DELTA_LAST_TIME_SEEN; + FIND_COVER_TO_GET_POSITION_WITH_SHOOT = fIND_COVER_TO_GET_POSITION_WITH_SHOOT; + PROTECT_TIME_REAL = pROTECT_TIME_REAL; + CHANCE_SHOOT_WHEN_WARN_PLAYER_100 = cHANCE_SHOOT_WHEN_WARN_PLAYER_100; + CAN_PANIC_IS_PROTECT = cAN_PANIC_IS_PROTECT; + NO_RUN_AWAY_FOR_SAFE = nO_RUN_AWAY_FOR_SAFE; + PART_PERCENT_TO_HEAL = pART_PERCENT_TO_HEAL; + PROTECT_DELTA_HEAL_SEC = pROTECT_DELTA_HEAL_SEC; + CAN_STAND_BY = cAN_STAND_BY; + CAN_THROW_REQUESTS = cAN_THROW_REQUESTS; + GROUP_ANY_PHRASE_DELAY = gROUP_ANY_PHRASE_DELAY; + GROUP_EXACTLY_PHRASE_DELAY = gROUP_EXACTLY_PHRASE_DELAY; + DIST_TO_ENEMY_YO_CAN_HEAL = dIST_TO_ENEMY_YO_CAN_HEAL; + CHANCE_TO_STAY_WHEN_WARN_PLAYER_100 = cHANCE_TO_STAY_WHEN_WARN_PLAYER_100; + DOG_FIGHT_OUT = dOG_FIGHT_OUT; + DOG_FIGHT_IN = dOG_FIGHT_IN; + SHOOT_INSTEAD_DOG_FIGHT = sHOOT_INSTEAD_DOG_FIGHT; + PISTOL_SHOTGUN_AMBUSH_DIST = pISTOL_SHOTGUN_AMBUSH_DIST; + STANDART_AMBUSH_DIST = sTANDART_AMBUSH_DIST; + AI_POWER_COEF = aI_POWER_COEF; + COVER_SECONDS_AFTER_LOSE_VISION = cOVER_SECONDS_AFTER_LOSE_VISION; + COVER_SELF_ALWAYS_IF_DAMAGED = cOVER_SELF_ALWAYS_IF_DAMAGED; + SEC_TO_MORE_DIST_TO_RUN = sEC_TO_MORE_DIST_TO_RUN; + HEAL_DELAY_SEC = hEAL_DELAY_SEC; + HIT_DELAY_WHEN_HAVE_SMT = hIT_DELAY_WHEN_HAVE_SMT; + HIT_DELAY_WHEN_PEACE = hIT_DELAY_WHEN_PEACE; + TALK_WITH_QUERY = tALK_WITH_QUERY; + WILL_PERSUE_AXEMAN = wILL_PERSUE_AXEMAN; + } + + public int HOW_WORK_OVER_DEAD_BODY { get; set; } + public int MIN_SHOOTS_TIME { get; set; } + public int MAX_SHOOTS_TIME { get; set; } + public int TIME_LEAVE_MAP { get; set; } + public int TIME_TO_RUN_TO_COVER_CAUSE_SHOOT_SEC { get; set; } + public int DAMAGE_REDUCTION_TIME_SEC { get; set; } + public int MIN_DAMAGE_SCARE { get; set; } + public int CHANCE_TO_RUN_CAUSE_DAMAGE_0_100 { get; set; } + public int TIME_TO_FORGOR_ABOUT_ENEMY_SEC { get; set; } + public int TIME_TO_FIND_ENEMY { get; set; } + public int MAX_AGGRO_BOT_DIST { get; set; } + public int HIT_POINT_DETECTION { get; set; } + public int DANGER_POINT_CHOOSE_COEF { get; set; } + public double SIMPLE_POINT_CHOOSE_COEF { get; set; } + public double LASTSEEN_POINT_CHOOSE_COEF { get; set; } + public double COVER_DIST_COEF { get; set; } + public int DIST_TO_FOUND_SQRT { get; set; } + public int MAX_AGGRO_BOT_DIST_SQR { get; set; } + public int DIST_TO_STOP_RUN_ENEMY { get; set; } + public int ENEMY_LOOK_AT_ME_ANG { get; set; } + public int MIN_START_AGGRESION_COEF { get; set; } + public int MAX_START_AGGRESION_COEF { get; set; } + public int BULLET_FEEL_DIST { get; set; } + public int BULLET_FEEL_CLOSE_SDIST { get; set; } + public int ATTACK_IMMEDIATLY_CHANCE_0_100 { get; set; } + public int CHANCE_FUCK_YOU_ON_CONTACT_100 { get; set; } + public double FRIEND_DEAD_AGR_LOW { get; set; } + public double FRIEND_AGR_KILL { get; set; } + public int LAST_ENEMY_LOOK_TO { get; set; } + public bool CAN_RECIVE_PLAYER_REQUESTS { get; set; } + public bool CAN_TAKE_ITEMS { get; set; } + public bool CAN_USE_MEDS { get; set; } + public int SUSPETION_POINT_CHANCE_ADD100 { get; set; } + public bool AMBUSH_WHEN_UNDER_FIRE { get; set; } + public int AMBUSH_WHEN_UNDER_FIRE_TIME_RESIST { get; set; } + public double ATTACK_ENEMY_IF_PROTECT_DELTA_LAST_TIME_SEEN { get; set; } + public double HOLD_IF_PROTECT_DELTA_LAST_TIME_SEEN { get; set; } + public int FIND_COVER_TO_GET_POSITION_WITH_SHOOT { get; set; } + public bool PROTECT_TIME_REAL { get; set; } + public int CHANCE_SHOOT_WHEN_WARN_PLAYER_100 { get; set; } + public bool CAN_PANIC_IS_PROTECT { get; set; } + public bool NO_RUN_AWAY_FOR_SAFE { get; set; } + public double PART_PERCENT_TO_HEAL { get; set; } + public int PROTECT_DELTA_HEAL_SEC { get; set; } + public bool CAN_STAND_BY { get; set; } + public bool CAN_THROW_REQUESTS { get; set; } + public int GROUP_ANY_PHRASE_DELAY { get; set; } + public int GROUP_EXACTLY_PHRASE_DELAY { get; set; } + public int DIST_TO_ENEMY_YO_CAN_HEAL { get; set; } + public int CHANCE_TO_STAY_WHEN_WARN_PLAYER_100 { get; set; } + public int DOG_FIGHT_OUT { get; set; } + public int DOG_FIGHT_IN { get; set; } + public int SHOOT_INSTEAD_DOG_FIGHT { get; set; } + public int PISTOL_SHOTGUN_AMBUSH_DIST { get; set; } + public int STANDART_AMBUSH_DIST { get; set; } + public int AI_POWER_COEF { get; set; } + public int COVER_SECONDS_AFTER_LOSE_VISION { get; set; } + public bool COVER_SELF_ALWAYS_IF_DAMAGED { get; set; } + public int SEC_TO_MORE_DIST_TO_RUN { get; set; } + public int HEAL_DELAY_SEC { get; set; } + public int HIT_DELAY_WHEN_HAVE_SMT { get; set; } + public int HIT_DELAY_WHEN_PEACE { get; set; } + public bool TALK_WITH_QUERY { get; set; } + public bool WILL_PERSUE_AXEMAN { get; set; } + } + + public class Boss + { + public Boss(int bOSS_DIST_TO_WARNING, int bOSS_DIST_TO_WARNING_SQRT, int bOSS_DIST_TO_WARNING_OUT, int bOSS_DIST_TO_WARNING_OUT_SQRT, + int bOSS_DIST_TO_SHOOT, int bOSS_DIST_TO_SHOOT_SQRT, int cHANCE_TO_SEND_GRENADE_100, int mAX_DIST_COVER_BOSS, + int mAX_DIST_COVER_BOSS_SQRT, int mAX_DIST_DECIDER_TO_SEND, int mAX_DIST_DECIDER_TO_SEND_SQRT, int tIME_AFTER_LOSE, + int tIME_AFTER_LOSE_DELTA, int pERSONS_SEND, int dELTA_SEARCH_TIME, bool cOVER_TO_SEND, int wAIT_NO_ATTACK_SAVAGE, + int cHANCE_USE_RESERVE_PATROL_100, int kILLA_Y_DELTA_TO_BE_ENEMY_BOSS, int kILLA_DITANCE_TO_BE_ENEMY_BOSS, int kILLA_START_SEARCH_SEC, + int kILLA_CONTUTION_TIME, int kILLA_CLOSE_ATTACK_DIST, int kILLA_MIDDLE_ATTACK_DIST, int kILLA_LARGE_ATTACK_DIST, int kILLA_SEARCH_METERS, + int kILLA_DEF_DIST_SQRT, int kILLA_SEARCH_SEC_STOP_AFTER_COMING, int kILLA_DIST_TO_GO_TO_SUPPRESS, int kILLA_AFTER_GRENADE_SUPPRESS_DELAY, + int kILLA_CLOSEATTACK_TIMES, int kILLA_CLOSEATTACK_DELAY, int kILLA_HOLD_DELAY, int kILLA_BULLET_TO_RELOAD, bool sHALL_WARN, + int kILLA_ENEMIES_TO_ATTACK, int kILLA_ONE_IS_CLOSE, int kILLA_TRIGGER_DOWN_DELAY, int kILLA_WAIT_IN_COVER_COEF, int kOJANIY_DIST_WHEN_READY, + int kOJANIY_DIST_TO_BE_ENEMY, int kOJANIY_MIN_DIST_TO_LOOT, int kOJANIY_MIN_DIST_TO_LOOT_SQRT, int kOJANIY_DIST_ENEMY_TOO_CLOSE, double kOJANIY_MANY_ENEMIES_COEF) + { + BOSS_DIST_TO_WARNING = bOSS_DIST_TO_WARNING; + BOSS_DIST_TO_WARNING_SQRT = bOSS_DIST_TO_WARNING_SQRT; + BOSS_DIST_TO_WARNING_OUT = bOSS_DIST_TO_WARNING_OUT; + BOSS_DIST_TO_WARNING_OUT_SQRT = bOSS_DIST_TO_WARNING_OUT_SQRT; + BOSS_DIST_TO_SHOOT = bOSS_DIST_TO_SHOOT; + BOSS_DIST_TO_SHOOT_SQRT = bOSS_DIST_TO_SHOOT_SQRT; + CHANCE_TO_SEND_GRENADE_100 = cHANCE_TO_SEND_GRENADE_100; + MAX_DIST_COVER_BOSS = mAX_DIST_COVER_BOSS; + MAX_DIST_COVER_BOSS_SQRT = mAX_DIST_COVER_BOSS_SQRT; + MAX_DIST_DECIDER_TO_SEND = mAX_DIST_DECIDER_TO_SEND; + MAX_DIST_DECIDER_TO_SEND_SQRT = mAX_DIST_DECIDER_TO_SEND_SQRT; + TIME_AFTER_LOSE = tIME_AFTER_LOSE; + TIME_AFTER_LOSE_DELTA = tIME_AFTER_LOSE_DELTA; + PERSONS_SEND = pERSONS_SEND; + DELTA_SEARCH_TIME = dELTA_SEARCH_TIME; + COVER_TO_SEND = cOVER_TO_SEND; + WAIT_NO_ATTACK_SAVAGE = wAIT_NO_ATTACK_SAVAGE; + CHANCE_USE_RESERVE_PATROL_100 = cHANCE_USE_RESERVE_PATROL_100; + KILLA_Y_DELTA_TO_BE_ENEMY_BOSS = kILLA_Y_DELTA_TO_BE_ENEMY_BOSS; + KILLA_DITANCE_TO_BE_ENEMY_BOSS = kILLA_DITANCE_TO_BE_ENEMY_BOSS; + KILLA_START_SEARCH_SEC = kILLA_START_SEARCH_SEC; + KILLA_CONTUTION_TIME = kILLA_CONTUTION_TIME; + KILLA_CLOSE_ATTACK_DIST = kILLA_CLOSE_ATTACK_DIST; + KILLA_MIDDLE_ATTACK_DIST = kILLA_MIDDLE_ATTACK_DIST; + KILLA_LARGE_ATTACK_DIST = kILLA_LARGE_ATTACK_DIST; + KILLA_SEARCH_METERS = kILLA_SEARCH_METERS; + KILLA_DEF_DIST_SQRT = kILLA_DEF_DIST_SQRT; + KILLA_SEARCH_SEC_STOP_AFTER_COMING = kILLA_SEARCH_SEC_STOP_AFTER_COMING; + KILLA_DIST_TO_GO_TO_SUPPRESS = kILLA_DIST_TO_GO_TO_SUPPRESS; + KILLA_AFTER_GRENADE_SUPPRESS_DELAY = kILLA_AFTER_GRENADE_SUPPRESS_DELAY; + KILLA_CLOSEATTACK_TIMES = kILLA_CLOSEATTACK_TIMES; + KILLA_CLOSEATTACK_DELAY = kILLA_CLOSEATTACK_DELAY; + KILLA_HOLD_DELAY = kILLA_HOLD_DELAY; + KILLA_BULLET_TO_RELOAD = kILLA_BULLET_TO_RELOAD; + SHALL_WARN = sHALL_WARN; + KILLA_ENEMIES_TO_ATTACK = kILLA_ENEMIES_TO_ATTACK; + KILLA_ONE_IS_CLOSE = kILLA_ONE_IS_CLOSE; + KILLA_TRIGGER_DOWN_DELAY = kILLA_TRIGGER_DOWN_DELAY; + KILLA_WAIT_IN_COVER_COEF = kILLA_WAIT_IN_COVER_COEF; + KOJANIY_DIST_WHEN_READY = kOJANIY_DIST_WHEN_READY; + KOJANIY_DIST_TO_BE_ENEMY = kOJANIY_DIST_TO_BE_ENEMY; + KOJANIY_MIN_DIST_TO_LOOT = kOJANIY_MIN_DIST_TO_LOOT; + KOJANIY_MIN_DIST_TO_LOOT_SQRT = kOJANIY_MIN_DIST_TO_LOOT_SQRT; + KOJANIY_DIST_ENEMY_TOO_CLOSE = kOJANIY_DIST_ENEMY_TOO_CLOSE; + KOJANIY_MANY_ENEMIES_COEF = kOJANIY_MANY_ENEMIES_COEF; + } + + public int BOSS_DIST_TO_WARNING { get; set; } + public int BOSS_DIST_TO_WARNING_SQRT { get; set; } + public int BOSS_DIST_TO_WARNING_OUT { get; set; } + public int BOSS_DIST_TO_WARNING_OUT_SQRT { get; set; } + public int BOSS_DIST_TO_SHOOT { get; set; } + public int BOSS_DIST_TO_SHOOT_SQRT { get; set; } + public int CHANCE_TO_SEND_GRENADE_100 { get; set; } + public int MAX_DIST_COVER_BOSS { get; set; } + public int MAX_DIST_COVER_BOSS_SQRT { get; set; } + public int MAX_DIST_DECIDER_TO_SEND { get; set; } + public int MAX_DIST_DECIDER_TO_SEND_SQRT { get; set; } + public int TIME_AFTER_LOSE { get; set; } + public int TIME_AFTER_LOSE_DELTA { get; set; } + public int PERSONS_SEND { get; set; } + public int DELTA_SEARCH_TIME { get; set; } + public bool COVER_TO_SEND { get; set; } + public int WAIT_NO_ATTACK_SAVAGE { get; set; } + public int CHANCE_USE_RESERVE_PATROL_100 { get; set; } + public int KILLA_Y_DELTA_TO_BE_ENEMY_BOSS { get; set; } + public int KILLA_DITANCE_TO_BE_ENEMY_BOSS { get; set; } + public int KILLA_START_SEARCH_SEC { get; set; } + public int KILLA_CONTUTION_TIME { get; set; } + public int KILLA_CLOSE_ATTACK_DIST { get; set; } + public int KILLA_MIDDLE_ATTACK_DIST { get; set; } + public int KILLA_LARGE_ATTACK_DIST { get; set; } + public int KILLA_SEARCH_METERS { get; set; } + public int KILLA_DEF_DIST_SQRT { get; set; } + public int KILLA_SEARCH_SEC_STOP_AFTER_COMING { get; set; } + public int KILLA_DIST_TO_GO_TO_SUPPRESS { get; set; } + public int KILLA_AFTER_GRENADE_SUPPRESS_DELAY { get; set; } + public int KILLA_CLOSEATTACK_TIMES { get; set; } + public int KILLA_CLOSEATTACK_DELAY { get; set; } + public int KILLA_HOLD_DELAY { get; set; } + public int KILLA_BULLET_TO_RELOAD { get; set; } + public bool SHALL_WARN { get; set; } + public int KILLA_ENEMIES_TO_ATTACK { get; set; } + public int KILLA_ONE_IS_CLOSE { get; set; } + public int KILLA_TRIGGER_DOWN_DELAY { get; set; } + public int KILLA_WAIT_IN_COVER_COEF { get; set; } + public int KOJANIY_DIST_WHEN_READY { get; set; } + public int KOJANIY_DIST_TO_BE_ENEMY { get; set; } + public int KOJANIY_MIN_DIST_TO_LOOT { get; set; } + public int KOJANIY_MIN_DIST_TO_LOOT_SQRT { get; set; } + public int KOJANIY_DIST_ENEMY_TOO_CLOSE { get; set; } + public double KOJANIY_MANY_ENEMIES_COEF { get; set; } + } + + public class Core + { + public Core(int visibleAngle, int visibleDistance, double gainSightCoef, double scatteringPerMeter, double scatteringClosePerMeter, int damageCoeff, double hearingSense, bool canRun, bool canGrenade, string aimingType, int pistolFireDistancePref, int shotgunFireDistancePref, int rifleFireDistancePref, double accuratySpeed, double waitInCoverBetweenShotsSec) + { + VisibleAngle = visibleAngle; + VisibleDistance = visibleDistance; + GainSightCoef = gainSightCoef; + ScatteringPerMeter = scatteringPerMeter; + ScatteringClosePerMeter = scatteringClosePerMeter; + DamageCoeff = damageCoeff; + HearingSense = hearingSense; + CanRun = canRun; + CanGrenade = canGrenade; + AimingType = aimingType; + PistolFireDistancePref = pistolFireDistancePref; + ShotgunFireDistancePref = shotgunFireDistancePref; + RifleFireDistancePref = rifleFireDistancePref; + AccuratySpeed = accuratySpeed; + WaitInCoverBetweenShotsSec = waitInCoverBetweenShotsSec; + } + + public int VisibleAngle { get; set; } + public int VisibleDistance { get; set; } + public double GainSightCoef { get; set; } + public double ScatteringPerMeter { get; set; } + public double ScatteringClosePerMeter { get; set; } + public int DamageCoeff { get; set; } + public double HearingSense { get; set; } + public bool CanRun { get; set; } + public bool CanGrenade { get; set; } + public string AimingType { get; set; } + public int PistolFireDistancePref { get; set; } + public int ShotgunFireDistancePref { get; set; } + public int RifleFireDistancePref { get; set; } + public double AccuratySpeed { get; set; } + public double WaitInCoverBetweenShotsSec { get; set; } + } + + public class Scattering + { + public Scattering(double minScatter, double workingScatter, double maxScatter, double speedUp, double speedUpAim, double speedDown, double toSlowBotSpeed, double toLowBotSpeed, double toUpBotSpeed, double movingSlowCoef, int toLowBotAngularSpeed, int toStopBotAngularSpeed, double fromShot, double tracerCoef, double handDamageScatteringMinMax, double handDamageAccuracySpeed, double bloodFall, double caution, double toCaution, double recoilControlCoefShootDone, double recoilControlCoefShootDoneAuto, double aMPLITUDE_FACTOR, double aMPLITUDE_SPEED, int dIST_FROM_OLD_POINT_TO_NOT_AIM, int dIST_FROM_OLD_POINT_TO_NOT_AIM_SQRT, double dIST_NOT_TO_SHOOT, double poseChnageCoef, double layFactor, double recoilYCoef, double recoilYCoefSppedDown, int recoilYMax) + { + MinScatter = minScatter; + WorkingScatter = workingScatter; + MaxScatter = maxScatter; + SpeedUp = speedUp; + SpeedUpAim = speedUpAim; + SpeedDown = speedDown; + ToSlowBotSpeed = toSlowBotSpeed; + ToLowBotSpeed = toLowBotSpeed; + ToUpBotSpeed = toUpBotSpeed; + MovingSlowCoef = movingSlowCoef; + ToLowBotAngularSpeed = toLowBotAngularSpeed; + ToStopBotAngularSpeed = toStopBotAngularSpeed; + FromShot = fromShot; + TracerCoef = tracerCoef; + HandDamageScatteringMinMax = handDamageScatteringMinMax; + HandDamageAccuracySpeed = handDamageAccuracySpeed; + BloodFall = bloodFall; + Caution = caution; + ToCaution = toCaution; + RecoilControlCoefShootDone = recoilControlCoefShootDone; + RecoilControlCoefShootDoneAuto = recoilControlCoefShootDoneAuto; + AMPLITUDE_FACTOR = aMPLITUDE_FACTOR; + AMPLITUDE_SPEED = aMPLITUDE_SPEED; + DIST_FROM_OLD_POINT_TO_NOT_AIM = dIST_FROM_OLD_POINT_TO_NOT_AIM; + DIST_FROM_OLD_POINT_TO_NOT_AIM_SQRT = dIST_FROM_OLD_POINT_TO_NOT_AIM_SQRT; + DIST_NOT_TO_SHOOT = dIST_NOT_TO_SHOOT; + PoseChnageCoef = poseChnageCoef; + LayFactor = layFactor; + RecoilYCoef = recoilYCoef; + RecoilYCoefSppedDown = recoilYCoefSppedDown; + RecoilYMax = recoilYMax; + } + + public double MinScatter { get; set; } + public double WorkingScatter { get; set; } + public double MaxScatter { get; set; } + public double SpeedUp { get; set; } + public double SpeedUpAim { get; set; } + public double SpeedDown { get; set; } + public double ToSlowBotSpeed { get; set; } + public double ToLowBotSpeed { get; set; } + public double ToUpBotSpeed { get; set; } + public double MovingSlowCoef { get; set; } + public int ToLowBotAngularSpeed { get; set; } + public int ToStopBotAngularSpeed { get; set; } + public double FromShot { get; set; } + public double TracerCoef { get; set; } + public double HandDamageScatteringMinMax { get; set; } + public double HandDamageAccuracySpeed { get; set; } + public double BloodFall { get; set; } + public double Caution { get; set; } + public double ToCaution { get; set; } + public double RecoilControlCoefShootDone { get; set; } + public double RecoilControlCoefShootDoneAuto { get; set; } + public double AMPLITUDE_FACTOR { get; set; } + public double AMPLITUDE_SPEED { get; set; } + public int DIST_FROM_OLD_POINT_TO_NOT_AIM { get; set; } + public int DIST_FROM_OLD_POINT_TO_NOT_AIM_SQRT { get; set; } + public double DIST_NOT_TO_SHOOT { get; set; } + public double PoseChnageCoef { get; set; } + public double LayFactor { get; set; } + public double RecoilYCoef { get; set; } + public double RecoilYCoefSppedDown { get; set; } + public int RecoilYMax { get; set; } + } + +} diff --git a/Generator/Models/Output/Equipment.cs b/Generator/Models/Output/Equipment.cs new file mode 100644 index 0000000..7c74fcf --- /dev/null +++ b/Generator/Models/Output/Equipment.cs @@ -0,0 +1,70 @@ +using System.Collections.Generic; + +namespace Generator.Models.Output +{ + public class Equipment + { + public Equipment() + { + Headwear = new List(); + Earpiece = new List(); + FaceCover = new List(); + ArmorVest = new List(); + Eyewear = new List(); + ArmBand = new List(); + TacticalVest = new List(); + Backpack = new List(); + FirstPrimaryWeapon = new List(); + SecondPrimaryWeapon = new List(); + Holster = new List(); + Scabbard = new List(); + Pockets = new List(); + SecuredContainer = new List(); + } + + public List Headwear { get; set; } + public List Earpiece { get; set; } + public List FaceCover { get; set; } + public List ArmorVest { get; set; } + public List Eyewear { get; set; } + public List ArmBand { get; set; } + public List TacticalVest { get; set; } + public List Backpack { get; set; } + public List FirstPrimaryWeapon { get; set; } + public List SecondPrimaryWeapon { get; set; } + public List Holster { get; set; } + public List Scabbard { get; set; } + public List Pockets { get; set; } + public List SecuredContainer { get; set; } + } + + public class Inventory + { + public Inventory() + { + equipment = new Equipment(); + items = new Items(); + mods = new Dictionary>>(); + } + + public Equipment equipment { get; set; } + public Dictionary>> mods { get; set; } + public Items items { get; set; } + } + + public class Items + { + public Items() + { + TacticalVest = new List(); + Pockets = new List(); + Backpack = new List(); + SecuredContainer = new List(); + } + + public List TacticalVest { get; set; } + public List Pockets { get; set; } + public List Backpack { get; set; } + public List SecuredContainer { get; set; } + } +} diff --git a/Generator/Models/Output/Output.cs b/Generator/Models/Output/Output.cs new file mode 100644 index 0000000..69f035e --- /dev/null +++ b/Generator/Models/Output/Output.cs @@ -0,0 +1,309 @@ +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace Generator.Models.Output +{ + public class Bot + { + public Bot(BotType botType) + { + this.botType = botType; + appearance = new Appearance(); + experience = new Experience(); + health = new Health(); + skills = new Skills(); + firstName = new List(); + lastName = new List(); + difficulty = new Difficulty.Difficulty(); + chances = new Chances(); + generation = new GenerationChances(); + inventory = new Inventory(); + } + + [JsonIgnore] + public BotType botType { get;set;} + public Appearance appearance { get; set; } + public Experience experience { get; set; } + public Health health { get; set; } + public Skills skills { get; set; } + public List firstName { get; set; } + public List lastName { get; set; } + public Difficulty.Difficulty difficulty { get; set;} + public Chances chances { get; set; } + public GenerationChances generation { get; set; } + public Inventory inventory { get; set; } + } + public class Appearance + { + public Appearance() + { + body = new List(); + feet = new List(); + hands = new List(); + head = new List(); + voice = new List(); + } + + public List body { get; set; } + public List feet { get; set; } + public List hands { get; set; } + public List head { get; set; } + public List voice { get; set; } + } + + public class Experience + { + public Experience() + { + level = new MinMax(0, 1); + reward = new MinMax(-1, -1); + standingForKill = -0.02; + aggressorBonus = 0.01; + } + + public MinMax level { get; set; } + public MinMax reward { get; set; } + public double standingForKill { get; set; } + public double aggressorBonus { get; set; } + } + + public class BodyParts + { + public BodyParts() + { + Head = new MinMax(35, 35); + Chest = new MinMax(85, 85); + Stomach = new MinMax(70, 70); + LeftArm = new MinMax(60, 60); + RightArm = new MinMax(60, 60); + LeftLeg = new MinMax(65, 65); + RightLeg = new MinMax(65, 65); + } + + public MinMax Head { get; set; } + public MinMax Chest { get; set; } + public MinMax Stomach { get; set; } + public MinMax LeftArm { get; set; } + public MinMax RightArm { get; set; } + public MinMax LeftLeg { get; set; } + public MinMax RightLeg { get; set; } + } + + public class Health + { + public Health() + { + Hydration = new MinMax(100, 100); + Energy = new MinMax(100, 100); + Temperature = new MinMax(36, 40); + BodyParts = new BodyParts(); + } + + public MinMax Hydration { get; set; } + public MinMax Energy { get; set; } + public MinMax Temperature { get; set; } + public BodyParts BodyParts { get; set; } + } + + public class Skills + { + public Skills() + { + Common = new Common(); + } + + public Common Common { get; set; } + } + public class Common + { + } + + public class Chances + { + public Chances() + { + equipment = new EquipmentChances(); + } + + public EquipmentChances equipment { get; set; } + public Mods mods { get; set; } + } + + public class EquipmentChances + { + public EquipmentChances() + { + } + + public EquipmentChances(int head, int ear, int faceCover, + int vest, int eyewear, int armband, int tacVest, + int backpack, int firstPrimary, int secondPrimary, + int holster, int scabbard, int pockets, int securedContainer) + { + Headwear = head; + Earpiece = ear; + FaceCover = faceCover; + ArmorVest = vest; + ArmBand = armband; + Eyewear = eyewear; + TacticalVest = tacVest; + Backpack = backpack; + FirstPrimaryWeapon = firstPrimary; + SecondPrimaryWeapon = secondPrimary; + Holster = holster; + Scabbard = scabbard; + Pockets = pockets; + SecuredContainer = securedContainer; + } + + public int Headwear { get; set; } + public int Earpiece { get; set; } + public int FaceCover { get; set; } + public int ArmorVest { get; set; } + public int Eyewear { get; set; } + public int ArmBand { get; set; } + public int TacticalVest { get; set; } + public int Backpack { get; set; } + public int FirstPrimaryWeapon { get; set; } + public int SecondPrimaryWeapon { get; set; } + public int Holster { get; set; } + public int Scabbard { get; set; } + public int Pockets { get; set; } + public int SecuredContainer { get; set; } + } + + public class Mods + { + public Mods(int muzzle, int barrel, int handguard, int stock, + int magazine, int mount, int flashlight, int tactical_001, + int tactical_002, int tactical_003, int mount_000, int pistol_grip, + int tactical, int scope, int reciever, int sight_rear, + int charge, int mount_001, int equipment, int gas_block, + int launcher, int sight_front, int stock_000, int foregrip, + int tactical_000, int nvg, int pistol_grip_akms, int stock_akms, + int equipment_000, int equipment_001, int equipment_002, int bipod) + { + mod_muzzle = muzzle; + mod_barrel = barrel; + mod_handguard = handguard; + mod_stock = stock; + mod_magazine = magazine; + mod_mount = mount; + mod_flashlight = flashlight; + mod_tactical_001 = tactical_001; + mod_tactical_002 = tactical_002; + mod_tactical_003 = tactical_003; + mod_mount_000 = mount_000; + mod_pistol_grip = pistol_grip; + mod_tactical = tactical; + mod_scope = scope; + mod_reciever = reciever; + mod_sight_rear = sight_rear; + mod_charge = charge; + mod_mount_001 = mount_001; + mod_equipment = equipment; + mod_gas_block = gas_block; + mod_launcher = launcher; + mod_sight_front = sight_front; + mod_stock_000 = stock_000; + mod_foregrip = foregrip; + mod_tactical_000 = tactical_000; + mod_nvg = nvg; + mod_pistol_grip_akms = pistol_grip_akms; + mod_stock_akms = stock_akms; + mod_equipment_000 = equipment_000; + mod_equipment_001 = equipment_001; + mod_equipment_002 = equipment_002; + mod_bipod = bipod; + } + + public int mod_muzzle { get; set; } + public int mod_barrel { get; set; } + public int mod_handguard { get; set; } + public int mod_stock { get; set; } + public int mod_magazine { get; set; } + public int mod_mount { get; set; } + public int mod_flashlight { get; set; } + public int mod_tactical_001 { get; set; } + public int mod_tactical_002 { get; set; } + public int mod_tactical_003 { get; set; } + public int mod_mount_000 { get; set; } + public int mod_pistol_grip { get; set; } + public int mod_tactical { get; set; } + public int mod_scope { get; set; } + public int mod_reciever { get; set; } + public int mod_sight_rear { get; set; } + public int mod_charge { get; set; } + public int mod_mount_001 { get; set; } + public int mod_equipment { get; set; } + public int mod_gas_block { get; set; } + public int mod_launcher { get; set; } + public int mod_sight_front { get; set; } + public int mod_stock_000 { get; set; } + public int mod_foregrip { get; set; } + public int mod_tactical_000 { get; set; } + public int mod_nvg { get; set; } + public int mod_pistol_grip_akms { get; set; } + public int mod_stock_akms { get; set; } + public int mod_equipment_000 { get; set; } + public int mod_equipment_001 { get; set; } + public int mod_equipment_002 { get; set; } + public int mod_bipod { get; set; } + } + + public class GenerationChances + { + public GenerationChances(int specialMin, int SpecialMax, + int healingMin, int healingMax, + int looseLootMin, int looseLootMax, + int magazinesMin, int MagazineMax, + int grenandesMin, int grenadesMax) + { + items = new ItemChances + { + specialItems = new MinMax(specialMin, SpecialMax), + healing = new MinMax(healingMin, healingMax), + looseLoot = new MinMax(looseLootMin, looseLootMax), + magazines = new MinMax(magazinesMin, MagazineMax), + grenades = new MinMax(grenandesMin, grenadesMax) + }; + } + + public GenerationChances() + { + items = new ItemChances(); + } + + public ItemChances items { get; set; } + } + + public class ItemChances + { + public ItemChances() + { + specialItems = new MinMax(0, 1); + healing = new MinMax(1, 2); + looseLoot = new MinMax(0, 3); + magazines = new MinMax(2, 4); + grenades = new MinMax(0, 5); + } + + public MinMax specialItems { get; set; } + public MinMax healing { get; set; } + public MinMax looseLoot { get; set; } + public MinMax magazines { get; set; } + public MinMax grenades { get; set; } + } + + public class MinMax + { + public MinMax(int min, int max) + { + this.min = min; + this.max = max; + } + + public int min { get; set; } + public int max { get; set; } + } +} diff --git a/Generator/Program.cs b/Generator/Program.cs new file mode 100644 index 0000000..8ca1c8f --- /dev/null +++ b/Generator/Program.cs @@ -0,0 +1,34 @@ +using System.IO; + +namespace Generator +{ + class Program + { + static void Main(string[] args) + { + string[] botTypes = {"assault", "marksman", "pmcbot", "bossbully", "bosskilla" }; + + // Read raw bot dumps from live and turn into c# objects + var workingPath = Directory.GetCurrentDirectory(); + var dumpPath = $"{workingPath}//dumps"; + var botParser = new BotParser(workingPath, dumpPath, botTypes); + var parsedBots = botParser.Parse(); + + // Generate the base bot class and add basic details (health/body part hp etc) + var baseBotGenerator = new BaseBotGenerator(parsedBots); + var baseBots = baseBotGenerator.AddBaseDetails(); + + // Add weapons/armor to bot + var botGearGenerator = new BotGearGenerator(baseBots, parsedBots); + var botsWithGear = botGearGenerator.AddGear(); + + // Add loot to bot + var botLootGenerator = new BotLootGenerator(botsWithGear, parsedBots); + var botsWithGearAndLoot = botLootGenerator.AddLoot(); + + // Output bot to json file + var jsonWriter = new JsonWriter(workingPath, "output"); + jsonWriter.WriteJson(botsWithGearAndLoot); + } + } +} diff --git a/Generator/StringToolsExtensions.cs b/Generator/StringToolsExtensions.cs new file mode 100644 index 0000000..f7b8d45 --- /dev/null +++ b/Generator/StringToolsExtensions.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; + +namespace Generator +{ + public static class StringToolsExtensions + { + public static void AddUnique(this IList self, string item) + { + if (!self.Contains(item)) + self.Add(item); + } + } +}