Compare commits

..

No commits in common. "master" and "feat-memory-improvements" have entirely different histories.

43 changed files with 867 additions and 60240 deletions

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net9.0</TargetFramework> <TargetFramework>net8.0</TargetFramework>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View File

@ -69,7 +69,7 @@ namespace Common.Models.Output
public Dictionary<string, int> TacticalVest { get; set; } public Dictionary<string, int> TacticalVest { get; set; }
public Dictionary<string, int> Pockets { get; set; } public Dictionary<string, int> Pockets { get; set; }
public Dictionary<string, int> Backpack { get; set; } public Dictionary<string, int> Backpack { get; set; }
public Dictionary<string, int> SecuredContainer { get; set; } public new Dictionary<string, int> SecuredContainer { get; set; }
public Dictionary<string, int> SpecialLoot { get; set; } public new Dictionary<string, int> SpecialLoot { get; set; }
} }
} }

View File

@ -70,16 +70,16 @@ public class Experience
public Experience() public Experience()
{ {
level = new MinMax(0, 1); level = new MinMax(0, 1);
reward = new Dictionary<string, MinMax>(); reward = new MinMax(-1, -1);
standingForKill = new Dictionary<string, object>(); standingForKill = -0.02;
aggressorBonus = new Dictionary<string, object>(); ; aggressorBonus = 0.01;
useSimpleAnimator = false; useSimpleAnimator = false;
} }
public MinMax level { get; set; } public MinMax level { get; set; }
public Dictionary<string, MinMax> reward { get; set; } public MinMax reward { get; set; }
public Dictionary<string, object> standingForKill { get; set; } public object standingForKill { get; set; }
public new Dictionary<string, object> aggressorBonus { get; set; } public object aggressorBonus { get; set; }
public bool useSimpleAnimator { get; set; } public bool useSimpleAnimator { get; set; }
} }

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net9.0</TargetFramework> <TargetFramework>net8.0</TargetFramework>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View File

@ -338,6 +338,7 @@
"MAX_AGGRO_BOT_DIST": 100.0, "MAX_AGGRO_BOT_DIST": 100.0,
"HIT_POINT_DETECTION": 4.0, "HIT_POINT_DETECTION": 4.0,
"DANGER_POINT_CHOOSE_COEF": 1.0, "DANGER_POINT_CHOOSE_COEF": 1.0,
"FOLLOWER_AND_BOSS_WARN_EQUAL_PRIORITY": true,
"SIMPLE_POINT_CHOOSE_COEF": 0.4, "SIMPLE_POINT_CHOOSE_COEF": 0.4,
"LASTSEEN_POINT_CHOOSE_COEF": 0.2, "LASTSEEN_POINT_CHOOSE_COEF": 0.2,
"COVER_DIST_COEF": 1.5, "COVER_DIST_COEF": 1.5,

View File

@ -360,7 +360,6 @@
"FRIEND_DEAD_AGR_LOW": -0.2, "FRIEND_DEAD_AGR_LOW": -0.2,
"FRIEND_AGR_KILL": 0.2, "FRIEND_AGR_KILL": 0.2,
"LAST_ENEMY_LOOK_TO": 40.0, "LAST_ENEMY_LOOK_TO": 40.0,
"REACT_ADD_DRUNK_ENEMY": true,
"SURGE_KIT_ONLY_SAFE_CONTAINER": false, "SURGE_KIT_ONLY_SAFE_CONTAINER": false,
"CHECK_MARK_OF_UNKNOWS": false, "CHECK_MARK_OF_UNKNOWS": false,
"CAN_RECEIVE_PLAYER_REQUESTS_SAVAGE": false, "CAN_RECEIVE_PLAYER_REQUESTS_SAVAGE": false,

View File

@ -329,7 +329,6 @@
}, },
"Mind": { "Mind": {
"HOW_WORK_OVER_DEAD_BODY": 2, "HOW_WORK_OVER_DEAD_BODY": 2,
"REACT_ADD_DRUNK_ENEMY": true,
"MIN_SHOOTS_TIME": 2, "MIN_SHOOTS_TIME": 2,
"MAX_SHOOTS_TIME": 4, "MAX_SHOOTS_TIME": 4,
"TIME_LEAVE_MAP": 23, "TIME_LEAVE_MAP": 23,

View File

@ -329,7 +329,6 @@
}, },
"Mind": { "Mind": {
"HOW_WORK_OVER_DEAD_BODY": 2, "HOW_WORK_OVER_DEAD_BODY": 2,
"REACT_ADD_DRUNK_ENEMY": true,
"MIN_SHOOTS_TIME": 2, "MIN_SHOOTS_TIME": 2,
"MAX_SHOOTS_TIME": 4, "MAX_SHOOTS_TIME": 4,
"TIME_LEAVE_MAP": 23, "TIME_LEAVE_MAP": 23,

View File

@ -321,7 +321,6 @@
}, },
"Mind": { "Mind": {
"HOW_WORK_OVER_DEAD_BODY": 2, "HOW_WORK_OVER_DEAD_BODY": 2,
"REACT_ADD_DRUNK_ENEMY": true,
"MIN_SHOOTS_TIME": 2, "MIN_SHOOTS_TIME": 2,
"MAX_SHOOTS_TIME": 4, "MAX_SHOOTS_TIME": 4,
"TIME_TO_RUN_TO_COVER_CAUSE_SHOOT_SEC": 15.0, "TIME_TO_RUN_TO_COVER_CAUSE_SHOOT_SEC": 15.0,

View File

@ -46,7 +46,7 @@
}, },
"grenades": { "grenades": {
"weights": { "weights": {
"0": 13, "0": 8,
"1": 6, "1": 6,
"2": 2, "2": 2,
"3": 1, "3": 1,
@ -1339,375 +1339,5 @@
}, },
"whitelist": [] "whitelist": []
} }
},
"infectedpmc": {
"backpackLoot": {
"weights": {
"0": 1
},
"whitelist": []
},
"currency": {
"weights": {
"0": 1
},
"whitelist": []
},
"drinks": {
"weights": {
"0": 1
},
"whitelist": []
},
"drugs": {
"weights": {
"0": 1
},
"whitelist": []
},
"food": {
"weights": {
"0": 1
},
"whitelist": []
},
"grenades": {
"weights": {
"0": 1
},
"whitelist": []
},
"healing": {
"weights": {
"0": 1
},
"whitelist": []
},
"magazines": {
"weights": {
"0": 1
},
"whitelist": []
},
"pocketLoot": {
"weights": {
"0": 1
},
"whitelist": []
},
"specialItems": {
"weights": {
"0": 1
},
"whitelist": []
},
"stims": {
"weights": {
"0": 1
},
"whitelist": []
},
"vestLoot": {
"weights": {
"0": 1
},
"whitelist": []
}
},
"infectedassault": {
"backpackLoot": {
"weights": {
"0": 1
},
"whitelist": []
},
"currency": {
"weights": {
"0": 1
},
"whitelist": []
},
"drinks": {
"weights": {
"0": 1
},
"whitelist": []
},
"drugs": {
"weights": {
"0": 1
},
"whitelist": []
},
"food": {
"weights": {
"0": 1
},
"whitelist": []
},
"grenades": {
"weights": {
"0": 1
},
"whitelist": []
},
"healing": {
"weights": {
"0": 1
},
"whitelist": []
},
"magazines": {
"weights": {
"0": 1
},
"whitelist": []
},
"pocketLoot": {
"weights": {
"0": 1
},
"whitelist": []
},
"specialItems": {
"weights": {
"0": 1
},
"whitelist": []
},
"stims": {
"weights": {
"0": 1
},
"whitelist": []
},
"vestLoot": {
"weights": {
"0": 1
},
"whitelist": []
}
},
"infectedcivil": {
"backpackLoot": {
"weights": {
"0": 1
},
"whitelist": []
},
"currency": {
"weights": {
"0": 1
},
"whitelist": []
},
"drinks": {
"weights": {
"0": 1
},
"whitelist": []
},
"drugs": {
"weights": {
"0": 1
},
"whitelist": []
},
"food": {
"weights": {
"0": 1
},
"whitelist": []
},
"grenades": {
"weights": {
"0": 1
},
"whitelist": []
},
"healing": {
"weights": {
"0": 1
},
"whitelist": []
},
"magazines": {
"weights": {
"0": 1
},
"whitelist": []
},
"pocketLoot": {
"weights": {
"0": 1
},
"whitelist": []
},
"specialItems": {
"weights": {
"0": 1
},
"whitelist": []
},
"stims": {
"weights": {
"0": 1
},
"whitelist": []
},
"vestLoot": {
"weights": {
"0": 1
},
"whitelist": []
}
},
"infectedlaborant": {
"backpackLoot": {
"weights": {
"0": 1
},
"whitelist": []
},
"currency": {
"weights": {
"0": 1
},
"whitelist": []
},
"drinks": {
"weights": {
"0": 1
},
"whitelist": []
},
"drugs": {
"weights": {
"0": 1
},
"whitelist": []
},
"food": {
"weights": {
"0": 1
},
"whitelist": []
},
"grenades": {
"weights": {
"0": 1
},
"whitelist": []
},
"healing": {
"weights": {
"0": 1
},
"whitelist": []
},
"magazines": {
"weights": {
"0": 1
},
"whitelist": []
},
"pocketLoot": {
"weights": {
"0": 1
},
"whitelist": []
},
"specialItems": {
"weights": {
"0": 1
},
"whitelist": []
},
"stims": {
"weights": {
"0": 1
},
"whitelist": []
},
"vestLoot": {
"weights": {
"0": 1
},
"whitelist": []
}
},
"infectedtagilla": {
"backpackLoot": {
"weights": {
"0": 1
},
"whitelist": []
},
"currency": {
"weights": {
"0": 1
},
"whitelist": []
},
"drinks": {
"weights": {
"0": 1
},
"whitelist": []
},
"drugs": {
"weights": {
"0": 1
},
"whitelist": []
},
"food": {
"weights": {
"0": 1
},
"whitelist": []
},
"grenades": {
"weights": {
"0": 1
},
"whitelist": []
},
"healing": {
"weights": {
"0": 1
},
"whitelist": []
},
"magazines": {
"weights": {
"0": 1
},
"whitelist": []
},
"pocketLoot": {
"weights": {
"0": 1
},
"whitelist": []
},
"specialItems": {
"weights": {
"0": 1
},
"whitelist": []
},
"stims": {
"weights": {
"0": 1
},
"whitelist": []
},
"vestLoot": {
"weights": {
"0": 1
},
"whitelist": []
}
} }
} }

View File

@ -341,6 +341,7 @@
"DANGER_POINT_CHOOSE_COEF": 1.0, "DANGER_POINT_CHOOSE_COEF": 1.0,
"SIMPLE_POINT_CHOOSE_COEF": 0.4, "SIMPLE_POINT_CHOOSE_COEF": 0.4,
"LASTSEEN_POINT_CHOOSE_COEF": 0.2, "LASTSEEN_POINT_CHOOSE_COEF": 0.2,
"FOLLOWER_AND_BOSS_WARN_EQUAL_PRIORITY": true,
"COVER_DIST_COEF": 1.5, "COVER_DIST_COEF": 1.5,
"DIST_TO_FOUND_SQRT": 400.0, "DIST_TO_FOUND_SQRT": 400.0,
"MAX_AGGRO_BOT_DIST_SQR": 10000.0, "MAX_AGGRO_BOT_DIST_SQR": 10000.0,

View File

@ -331,7 +331,6 @@
}, },
"Mind": { "Mind": {
"HOW_WORK_OVER_DEAD_BODY": 2, "HOW_WORK_OVER_DEAD_BODY": 2,
"REACT_ADD_DRUNK_ENEMY": true,
"MIN_SHOOTS_TIME": 2, "MIN_SHOOTS_TIME": 2,
"MAX_SHOOTS_TIME": 4, "MAX_SHOOTS_TIME": 4,
"TIME_LEAVE_MAP": 23, "TIME_LEAVE_MAP": 23,

View File

@ -330,7 +330,6 @@
}, },
"Mind": { "Mind": {
"HOW_WORK_OVER_DEAD_BODY": 2, "HOW_WORK_OVER_DEAD_BODY": 2,
"REACT_ADD_DRUNK_ENEMY": true,
"MIN_SHOOTS_TIME": 2, "MIN_SHOOTS_TIME": 2,
"MAX_SHOOTS_TIME": 4, "MAX_SHOOTS_TIME": 4,
"TIME_LEAVE_MAP": 23, "TIME_LEAVE_MAP": 23,

View File

@ -330,7 +330,6 @@
}, },
"Mind": { "Mind": {
"HOW_WORK_OVER_DEAD_BODY": 2, "HOW_WORK_OVER_DEAD_BODY": 2,
"REACT_ADD_DRUNK_ENEMY": true,
"MIN_SHOOTS_TIME": 2, "MIN_SHOOTS_TIME": 2,
"MAX_SHOOTS_TIME": 4, "MAX_SHOOTS_TIME": 4,
"TIME_LEAVE_MAP": 23, "TIME_LEAVE_MAP": 23,

View File

@ -340,7 +340,6 @@
"DIST_TO_STOP_RUN_ENEMY": 15.0, "DIST_TO_STOP_RUN_ENEMY": 15.0,
"ENEMY_LOOK_AT_ME_ANG": 15.0, "ENEMY_LOOK_AT_ME_ANG": 15.0,
"FOLLOWER_AND_BOSS_WARN_EQUAL_PRIORITY": true, "FOLLOWER_AND_BOSS_WARN_EQUAL_PRIORITY": true,
"REACT_ADD_DRUNK_ENEMY": true,
"MIN_START_AGGRESION_COEF": 1.0, "MIN_START_AGGRESION_COEF": 1.0,
"MAX_START_AGGRESION_COEF": 3.0, "MAX_START_AGGRESION_COEF": 3.0,
"BULLET_FEEL_DIST": 360.0, "BULLET_FEEL_DIST": 360.0,
@ -415,6 +414,7 @@
"PERSONS_SEND": 2, "PERSONS_SEND": 2,
"DELTA_SEARCH_TIME": 18.0, "DELTA_SEARCH_TIME": 18.0,
"COVER_TO_SEND": true, "COVER_TO_SEND": true,
"NOT_ADD_TO_ENEMY_ON_KILLS": true,
"WAIT_NO_ATTACK_SAVAGE": 10.0, "WAIT_NO_ATTACK_SAVAGE": 10.0,
"CHANCE_USE_RESERVE_PATROL_100": 30.0, "CHANCE_USE_RESERVE_PATROL_100": 30.0,
"KILLA_Y_DELTA_TO_BE_ENEMY_BOSS": 5.0, "KILLA_Y_DELTA_TO_BE_ENEMY_BOSS": 5.0,

View File

@ -333,6 +333,7 @@
"DANGER_POINT_CHOOSE_COEF": 1.0, "DANGER_POINT_CHOOSE_COEF": 1.0,
"SIMPLE_POINT_CHOOSE_COEF": 0.4, "SIMPLE_POINT_CHOOSE_COEF": 0.4,
"LASTSEEN_POINT_CHOOSE_COEF": 0.2, "LASTSEEN_POINT_CHOOSE_COEF": 0.2,
"FOLLOWER_AND_BOSS_WARN_EQUAL_PRIORITY": true,
"COVER_DIST_COEF": 1.5, "COVER_DIST_COEF": 1.5,
"DIST_TO_FOUND_SQRT": 400.0, "DIST_TO_FOUND_SQRT": 400.0,
"MAX_AGGRO_BOT_DIST_SQR": 10000.0, "MAX_AGGRO_BOT_DIST_SQR": 10000.0,

View File

@ -344,6 +344,7 @@
"COVER_DIST_COEF": 1.5, "COVER_DIST_COEF": 1.5,
"DIST_TO_FOUND_SQRT": 400.0, "DIST_TO_FOUND_SQRT": 400.0,
"MAX_AGGRO_BOT_DIST_SQR": 10000.0, "MAX_AGGRO_BOT_DIST_SQR": 10000.0,
"FOLLOWER_AND_BOSS_WARN_EQUAL_PRIORITY": true,
"CHECK_MARK_OF_UNKNOWS": true, "CHECK_MARK_OF_UNKNOWS": true,
"DIST_TO_STOP_RUN_ENEMY": 15.0, "DIST_TO_STOP_RUN_ENEMY": 15.0,
"ENEMY_LOOK_AT_ME_ANG": 15.0, "ENEMY_LOOK_AT_ME_ANG": 15.0,

View File

@ -496,8 +496,7 @@
"GLUHAR_FOLLOWERS_SCOUT": 2, "GLUHAR_FOLLOWERS_SCOUT": 2,
"GLUHAR_FOLLOWERS_SNIPE": 0, "GLUHAR_FOLLOWERS_SNIPE": 0,
"GLUHAR_BOSS_DIST_TO_ENEMY_WANT_KILL": 25.0, "GLUHAR_BOSS_DIST_TO_ENEMY_WANT_KILL": 25.0,
"EFFECT_PAINKILLER": true, "EFFECT_PAINKILLER": true
"ALLOW_REQUEST_SELF": false
}, },
"Core": { "Core": {
"VisibleAngle": 160.0, "VisibleAngle": 160.0,

View File

@ -426,8 +426,7 @@
"KILLA_ENEMIES_TO_ATTACK": 3, "KILLA_ENEMIES_TO_ATTACK": 3,
"KILLA_ONE_IS_CLOSE": 30.0, "KILLA_ONE_IS_CLOSE": 30.0,
"KILLA_TRIGGER_DOWN_DELAY": 1.0, "KILLA_TRIGGER_DOWN_DELAY": 1.0,
"KILLA_WAIT_IN_COVER_COEF": 1.0, "KILLA_WAIT_IN_COVER_COEF": 1.0
"ALLOW_REQUEST_SELF": false
}, },
"Core": { "Core": {
"VisibleAngle": 160.0, "VisibleAngle": 160.0,

View File

@ -496,8 +496,7 @@
"GLUHAR_FOLLOWERS_SCOUT": 2, "GLUHAR_FOLLOWERS_SCOUT": 2,
"GLUHAR_FOLLOWERS_SNIPE": 0, "GLUHAR_FOLLOWERS_SNIPE": 0,
"GLUHAR_BOSS_DIST_TO_ENEMY_WANT_KILL": 25.0, "GLUHAR_BOSS_DIST_TO_ENEMY_WANT_KILL": 25.0,
"EFFECT_PAINKILLER": true, "EFFECT_PAINKILLER": true
"ALLOW_REQUEST_SELF": false
}, },
"Core": { "Core": {
"VisibleAngle": 160.0, "VisibleAngle": 160.0,

View File

@ -343,6 +343,7 @@
"TIME_TO_FORGOR_ABOUT_ENEMY_SEC": 104.0, "TIME_TO_FORGOR_ABOUT_ENEMY_SEC": 104.0,
"TIME_TO_FIND_ENEMY": 22.0, "TIME_TO_FIND_ENEMY": 22.0,
"MAX_AGGRO_BOT_DIST": 200.0, "MAX_AGGRO_BOT_DIST": 200.0,
"FOLLOWER_AND_BOSS_WARN_EQUAL_PRIORITY": true,
"HIT_POINT_DETECTION": 4.0, "HIT_POINT_DETECTION": 4.0,
"DANGER_POINT_CHOOSE_COEF": 1.0, "DANGER_POINT_CHOOSE_COEF": 1.0,
"SIMPLE_POINT_CHOOSE_COEF": 0.4, "SIMPLE_POINT_CHOOSE_COEF": 0.4,

View File

@ -436,8 +436,7 @@
"KOJANIY_MANY_ENEMIES_COEF": 1.5, "KOJANIY_MANY_ENEMIES_COEF": 1.5,
"KOJANIY_FIGHT_CENTER_POS_ME": false, "KOJANIY_FIGHT_CENTER_POS_ME": false,
"SET_CHEAT_VISIBLE_WHEN_ADD_TO_ENEMY": true, "SET_CHEAT_VISIBLE_WHEN_ADD_TO_ENEMY": true,
"EFFECT_PAINKILLER": true, "EFFECT_PAINKILLER": true
"ALLOW_REQUEST_SELF": false
}, },
"Core": { "Core": {
"VisibleAngle": 160.0, "VisibleAngle": 160.0,

View File

@ -504,8 +504,7 @@
"GLUHAR_FOLLOWERS_SCOUT": 2, "GLUHAR_FOLLOWERS_SCOUT": 2,
"GLUHAR_FOLLOWERS_SNIPE": 0, "GLUHAR_FOLLOWERS_SNIPE": 0,
"GLUHAR_BOSS_DIST_TO_ENEMY_WANT_KILL": 25.0, "GLUHAR_BOSS_DIST_TO_ENEMY_WANT_KILL": 25.0,
"EFFECT_PAINKILLER": true, "EFFECT_PAINKILLER": true
"ALLOW_REQUEST_SELF": false
}, },
"Core": { "Core": {
"VisibleAngle": 160.0, "VisibleAngle": 160.0,

View File

@ -170,8 +170,7 @@
"DIST_TO_STOP_SPRINT_MELEE": 2.5, "DIST_TO_STOP_SPRINT_MELEE": 2.5,
"TRY_HIT_PERIOD_MELEE": 0.1, "TRY_HIT_PERIOD_MELEE": 0.1,
"MELEE_RESET_HIT_TIME": 0, "MELEE_RESET_HIT_TIME": 0,
"MELEE_STOP_MOVE_DISTANCE": 0.85, "MELEE_STOP_MOVE_DISTANCE": 0.85
"SHOOT_PROBABILITY_GRENADE_LAUNCHER": 100
}, },
"Move": "Move":
{ {

View File

@ -451,8 +451,7 @@
"KILLA_TRIGGER_DOWN_DELAY": 1.0, "KILLA_TRIGGER_DOWN_DELAY": 1.0,
"KILLA_WAIT_IN_COVER_COEF": 1.0, "KILLA_WAIT_IN_COVER_COEF": 1.0,
"EFFECT_REGENERATION_PER_MIN": 60, "EFFECT_REGENERATION_PER_MIN": 60,
"EFFECT_PAINKILLER": true, "EFFECT_PAINKILLER": true
"ALLOW_REQUEST_SELF": false
}, },
"Core": { "Core": {
"VisibleAngle": 160.0, "VisibleAngle": 160.0,

View File

@ -419,8 +419,7 @@
"KILLA_ENEMIES_TO_ATTACK": 3, "KILLA_ENEMIES_TO_ATTACK": 3,
"KILLA_ONE_IS_CLOSE": 30.0, "KILLA_ONE_IS_CLOSE": 30.0,
"KILLA_TRIGGER_DOWN_DELAY": 1.0, "KILLA_TRIGGER_DOWN_DELAY": 1.0,
"KILLA_WAIT_IN_COVER_COEF": 1.0, "KILLA_WAIT_IN_COVER_COEF": 1.0
"ALLOW_REQUEST_SELF": false
}, },
"Core": { "Core": {
"VisibleAngle": 140.0, "VisibleAngle": 140.0,

View File

@ -384,8 +384,7 @@
"HIT_DELAY_WHEN_HAVE_SMT": -1.0, "HIT_DELAY_WHEN_HAVE_SMT": -1.0,
"HIT_DELAY_WHEN_PEACE": -1.0, "HIT_DELAY_WHEN_PEACE": -1.0,
"TALK_WITH_QUERY": true, "TALK_WITH_QUERY": true,
"ENEMY_BOT_TYPES": ["pmcBEAR","pmcUSEC"], "ENEMY_BOT_TYPES": ["pmcBEAR","pmcUSEC"]
"FRIENDLY_BOT_TYPES": ["bossZryachiy","followerZryachiy"],
}, },
"Boss": { "Boss": {
"BOSS_DIST_TO_WARNING": 8.0, "BOSS_DIST_TO_WARNING": 8.0,

View File

@ -334,6 +334,7 @@
"MIN_START_AGGRESION_COEF": 1.0, "MIN_START_AGGRESION_COEF": 1.0,
"MAX_START_AGGRESION_COEF": 3.0, "MAX_START_AGGRESION_COEF": 3.0,
"BULLET_FEEL_DIST": 360.0, "BULLET_FEEL_DIST": 360.0,
"FOLLOWER_AND_BOSS_WARN_EQUAL_PRIORITY": true,
"BULLET_FEEL_CLOSE_SDIST": 1.0, "BULLET_FEEL_CLOSE_SDIST": 1.0,
"ATTACK_IMMEDIATLY_CHANCE_0_100": 40.0, "ATTACK_IMMEDIATLY_CHANCE_0_100": 40.0,
"CHANCE_FUCK_YOU_ON_CONTACT_100": 0.01, "CHANCE_FUCK_YOU_ON_CONTACT_100": 0.01,

View File

@ -382,8 +382,7 @@
"HIT_DELAY_WHEN_HAVE_SMT": -1.0, "HIT_DELAY_WHEN_HAVE_SMT": -1.0,
"HIT_DELAY_WHEN_PEACE": -1.0, "HIT_DELAY_WHEN_PEACE": -1.0,
"TALK_WITH_QUERY": true, "TALK_WITH_QUERY": true,
"ENEMY_BOT_TYPES": ["pmcBEAR","pmcUSEC"], "ENEMY_BOT_TYPES": ["pmcBEAR","pmcUSEC"]
"FRIENDLY_BOT_TYPES": ["bossZryachiy","followerZryachiy"],
}, },
"Boss": { "Boss": {
"BOSS_ZRYACHIY_MIN_DIST_TO_TELEPORT": 500.0, "BOSS_ZRYACHIY_MIN_DIST_TO_TELEPORT": 500.0,

View File

@ -332,7 +332,6 @@
"Mind": { "Mind": {
"HOW_WORK_OVER_DEAD_BODY": 2, "HOW_WORK_OVER_DEAD_BODY": 2,
"MIN_SHOOTS_TIME": 2, "MIN_SHOOTS_TIME": 2,
"REACT_ADD_DRUNK_ENEMY": true,
"MAX_SHOOTS_TIME": 4, "MAX_SHOOTS_TIME": 4,
"TIME_LEAVE_MAP": 23, "TIME_LEAVE_MAP": 23,
"TIME_TO_RUN_TO_COVER_CAUSE_SHOOT_SEC": 15.0, "TIME_TO_RUN_TO_COVER_CAUSE_SHOOT_SEC": 15.0,

View File

@ -331,7 +331,6 @@
"Mind": { "Mind": {
"HOW_WORK_OVER_DEAD_BODY": 2, "HOW_WORK_OVER_DEAD_BODY": 2,
"MIN_SHOOTS_TIME": 2, "MIN_SHOOTS_TIME": 2,
"REACT_ADD_DRUNK_ENEMY": true,
"MAX_SHOOTS_TIME": 4, "MAX_SHOOTS_TIME": 4,
"TIME_LEAVE_MAP": 23, "TIME_LEAVE_MAP": 23,
"TIME_TO_RUN_TO_COVER_CAUSE_SHOOT_SEC": 15.0, "TIME_TO_RUN_TO_COVER_CAUSE_SHOOT_SEC": 15.0,

View File

@ -330,7 +330,6 @@
}, },
"Mind": { "Mind": {
"HOW_WORK_OVER_DEAD_BODY": 2, "HOW_WORK_OVER_DEAD_BODY": 2,
"REACT_ADD_DRUNK_ENEMY": true,
"MIN_SHOOTS_TIME": 2, "MIN_SHOOTS_TIME": 2,
"MAX_SHOOTS_TIME": 4, "MAX_SHOOTS_TIME": 4,
"TIME_LEAVE_MAP": 23, "TIME_LEAVE_MAP": 23,

View File

@ -322,7 +322,6 @@
}, },
"Mind": { "Mind": {
"HOW_WORK_OVER_DEAD_BODY": 2, "HOW_WORK_OVER_DEAD_BODY": 2,
"REACT_ADD_DRUNK_ENEMY": true,
"MIN_SHOOTS_TIME": 2, "MIN_SHOOTS_TIME": 2,
"MAX_SHOOTS_TIME": 4, "MAX_SHOOTS_TIME": 4,
"TIME_TO_RUN_TO_COVER_CAUSE_SHOOT_SEC": 15.0, "TIME_TO_RUN_TO_COVER_CAUSE_SHOOT_SEC": 15.0,

View File

@ -318,7 +318,6 @@
}, },
"Mind": { "Mind": {
"MIN_SHOOTS_TIME": 2, "MIN_SHOOTS_TIME": 2,
"REACT_ADD_DRUNK_ENEMY": true,
"MAX_SHOOTS_TIME": 4, "MAX_SHOOTS_TIME": 4,
"TIME_TO_RUN_TO_COVER_CAUSE_SHOOT_SEC": 15.0, "TIME_TO_RUN_TO_COVER_CAUSE_SHOOT_SEC": 15.0,
"DAMAGE_REDUCTION_TIME_SEC": 30.0, "DAMAGE_REDUCTION_TIME_SEC": 30.0,

View File

@ -333,6 +333,7 @@
"MAX_AGGRO_BOT_DIST_SQR": 10000.0, "MAX_AGGRO_BOT_DIST_SQR": 10000.0,
"DIST_TO_STOP_RUN_ENEMY": 15.0, "DIST_TO_STOP_RUN_ENEMY": 15.0,
"ENEMY_LOOK_AT_ME_ANG": 15.0, "ENEMY_LOOK_AT_ME_ANG": 15.0,
"FOLLOWER_AND_BOSS_WARN_EQUAL_PRIORITY": true,
"MIN_START_AGGRESION_COEF": 1.0, "MIN_START_AGGRESION_COEF": 1.0,
"MAX_START_AGGRESION_COEF": 3.0, "MAX_START_AGGRESION_COEF": 3.0,
"BULLET_FEEL_DIST": 360.0, "BULLET_FEEL_DIST": 360.0,

View File

@ -331,6 +331,7 @@
"MAX_AGGRO_BOT_DIST_SQR": 10000.0, "MAX_AGGRO_BOT_DIST_SQR": 10000.0,
"DIST_TO_STOP_RUN_ENEMY": 15.0, "DIST_TO_STOP_RUN_ENEMY": 15.0,
"ENEMY_LOOK_AT_ME_ANG": 15.0, "ENEMY_LOOK_AT_ME_ANG": 15.0,
"FOLLOWER_AND_BOSS_WARN_EQUAL_PRIORITY": true,
"MIN_START_AGGRESION_COEF": 1.0, "MIN_START_AGGRESION_COEF": 1.0,
"MAX_START_AGGRESION_COEF": 3.0, "MAX_START_AGGRESION_COEF": 3.0,
"BULLET_FEEL_DIST": 360.0, "BULLET_FEEL_DIST": 360.0,

View File

@ -4,6 +4,7 @@ using Common.Models.Input;
using Common.Models.Output; using Common.Models.Output;
using Generator.Helpers; using Generator.Helpers;
using Generator.Helpers.Gear; using Generator.Helpers.Gear;
using System.Diagnostics;
namespace Generator namespace Generator
{ {
@ -14,7 +15,6 @@ namespace Generator
UpdateBodyPartHealth(botData, rawBotData); UpdateBodyPartHealth(botData, rawBotData);
AddExperience(botData, rawBotData); AddExperience(botData, rawBotData);
AddStandingForKill(botData, rawBotData); AddStandingForKill(botData, rawBotData);
AddAggressorBonus(botData, rawBotData);
AddSkills(botData, rawBotData); AddSkills(botData, rawBotData);
botData.experience.useSimpleAnimator = rawBotData.Info.Settings.UseSimpleAnimator; botData.experience.useSimpleAnimator = rawBotData.Info.Settings.UseSimpleAnimator;
@ -42,39 +42,14 @@ namespace Generator
private static void AddStandingForKill(Bot botToUpdate, Datum rawBotData) private static void AddStandingForKill(Bot botToUpdate, Datum rawBotData)
{ {
botToUpdate.experience.standingForKill ??= new Dictionary<string, object>(); botToUpdate.experience.standingForKill = rawBotData.Info.Settings.StandingForKill;
botToUpdate.experience.aggressorBonus = rawBotData.Info.Settings.AggressorBonus;
if (!botToUpdate.experience.standingForKill.ContainsKey(rawBotData.Info.Settings.BotDifficulty))
{
botToUpdate.experience.standingForKill.Add(rawBotData.Info.Settings.BotDifficulty, rawBotData.Info.Settings.StandingForKill);
}
}
private static void AddAggressorBonus(Bot botToUpdate, Datum rawBotData)
{
botToUpdate.experience.aggressorBonus ??= new Dictionary<string, object>();
if (!botToUpdate.experience.aggressorBonus.ContainsKey(rawBotData.Info.Settings.BotDifficulty))
{
botToUpdate.experience.aggressorBonus.Add(rawBotData.Info.Settings.BotDifficulty, rawBotData.Info.Settings.AggressorBonus);
}
} }
private static void AddExperience(Bot botToUpdate, Datum rawBotData) private static void AddExperience(Bot botToUpdate, Datum rawBotData)
{ {
botToUpdate.experience.reward ??= new(); botToUpdate.experience.reward.min = rawBotData.Info.Settings.Experience;
botToUpdate.experience.reward.max = rawBotData.Info.Settings.Experience;
botToUpdate.experience.reward.TryGetValue(rawBotData.Info.Settings.BotDifficulty, out var minMaxValues);
if (minMaxValues is null)
{
botToUpdate.experience.reward.Add(rawBotData.Info.Settings.BotDifficulty, new(rawBotData.Info.Settings.Experience, rawBotData.Info.Settings.Experience));
return;
}
minMaxValues.min = Math.Min(minMaxValues.min, rawBotData.Info.Settings.Experience);
minMaxValues.max = Math.Max(minMaxValues.max, rawBotData.Info.Settings.Experience);
} }
private static void AddVoice(Bot bot, Datum rawBot) private static void AddVoice(Bot bot, Datum rawBot)

View File

@ -58,12 +58,6 @@ namespace Generator
} }
AddSpecialLoot(botToUpdate); AddSpecialLoot(botToUpdate);
// Cleanup of weights
GearHelpers.ReduceWeightValues(botToUpdate.inventory.items.Backpack);
GearHelpers.ReduceWeightValues(botToUpdate.inventory.items.Pockets);
GearHelpers.ReduceWeightValues(botToUpdate.inventory.items.TacticalVest);
GearHelpers.ReduceWeightValues(botToUpdate.inventory.items.SecuredContainer);
} }
/// <summary> /// <summary>

View File

@ -33,7 +33,7 @@ public static class BotParser
DiskHelpers.CreateDirIfDoesntExist(dumpPath); DiskHelpers.CreateDirIfDoesntExist(dumpPath);
var botFiles = Directory.GetFiles(dumpPath, "*.json", SearchOption.TopDirectoryOnly); var botFiles = Directory.GetFiles(dumpPath, "*.json", SearchOption.TopDirectoryOnly);
LoggingHelpers.LogToConsole($"{botFiles.Length.ToString()} bot dump files found"); LoggingHelpers.LogToConsole($"{botFiles.Length} bot dump files found");
// Store a list of parsed bots so we don't parse the same bot twice // Store a list of parsed bots so we don't parse the same bot twice
int totalDupeCount = 0; int totalDupeCount = 0;
@ -42,7 +42,7 @@ public static class BotParser
foreach (var filePath in botFiles) foreach (var filePath in botFiles)
{ {
i++; i++;
if (i % 500 == 0) Console.WriteLine($"Processing file {i.ToString()}"); if (i % 100 == 0) Console.WriteLine($"Processing file {i}");
ProcessBotFileSync(baseBots, filePath, parsedBotIds, totalDupeCount); ProcessBotFileSync(baseBots, filePath, parsedBotIds, totalDupeCount);
} }
@ -69,7 +69,7 @@ public static class BotParser
} }
stopwatch.Stop(); stopwatch.Stop();
LoggingHelpers.LogToConsole($"{totalDupeCount.ToString()} dupes were ignored. Took {LoggingHelpers.LogTimeTaken(stopwatch.Elapsed.TotalSeconds)} seconds"); LoggingHelpers.LogToConsole($"{totalDupeCount} dupes were ignored. Took {LoggingHelpers.LogTimeTaken(stopwatch.Elapsed.TotalSeconds)} seconds");
return baseBots.ToList(); return baseBots.ToList();
} }
@ -84,14 +84,15 @@ public static class BotParser
int dupeCount = 0; int dupeCount = 0;
List<Datum> bots = new List<Datum>(); List<Datum> bots = [];
try try
{ {
// Parse the bots inside the json file // Parse the bots inside the json file
using (var reader = new StreamReader(filePath)) using (var reader = new StreamReader(filePath))
{ {
var deSerialisedObject = JsonSerializer.Deserialize<Root>(reader.ReadToEnd(), serialiserOptions); var deSerialisedObject = JsonSerializer.Deserialize<Root>(reader.ReadToEnd(), serialiserOptions);
foreach (var botData in deSerialisedObject.data.ToList())
foreach (var botData in deSerialisedObject.data)
{ {
// Bot fucks up something, never allow it in // Bot fucks up something, never allow it in
if (botData._id == "6483938c53cc9087c70eae86") if (botData._id == "6483938c53cc9087c70eae86")
@ -100,22 +101,10 @@ public static class BotParser
continue; continue;
} }
var role = botData.Info.Settings.Role; var baseBot = baseBots.SingleOrDefault(bot => bot.botType.ToString().Equals(botData.Info.Settings.Role, StringComparison.OrdinalIgnoreCase));
var botType = Enum.Parse<BotType>(role, true);
Bot baseBot = null;
foreach (var bot in baseBots)
{
if (bot.botType == botType)
{
baseBot = bot;
break;
}
}
if (baseBot == null) if (baseBot == null)
{ {
Console.WriteLine($"Skipping {botData._id} due to unknown role {botData.Info.Settings.Role}"); //Console.WriteLine($"Skipping {botData._id} due to unknown role {botData.Info.Settings.Role}");
continue; continue;
} }
@ -132,7 +121,7 @@ public static class BotParser
} }
} }
} }
catch (Exception) catch (Exception ex)
{ {
Console.WriteLine($"File parse fucked up: {filePath}"); Console.WriteLine($"File parse fucked up: {filePath}");
throw; throw;
@ -148,7 +137,7 @@ public static class BotParser
DiskHelpers.CreateDirIfDoesntExist(dumpPath); DiskHelpers.CreateDirIfDoesntExist(dumpPath);
var botFiles = Directory.GetFiles(dumpPath, "*.json", SearchOption.TopDirectoryOnly); var botFiles = Directory.GetFiles(dumpPath, "*.json", SearchOption.TopDirectoryOnly);
LoggingHelpers.LogToConsole($"{botFiles.Length.ToString()} bot dump files found"); LoggingHelpers.LogToConsole($"{botFiles.Length} bot dump files found");
// key = bot type // key = bot type
// Store bots keyed against their ID so we never get duplicates // Store bots keyed against their ID so we never get duplicates
@ -164,9 +153,9 @@ public static class BotParser
await Task.WhenAll(tasks.ToArray()); await Task.WhenAll(tasks.ToArray());
stopwatch.Stop(); stopwatch.Stop();
LoggingHelpers.LogToConsole($"Cleaned and Parsed: {parsedBotsDict.Count.ToString()} bots. {totalDupeCount.ToString()} dupes were ignored. Took {LoggingHelpers.LogTimeTaken(stopwatch.Elapsed.TotalSeconds)} seconds"); LoggingHelpers.LogToConsole($"Cleaned and Parsed: {parsedBotsDict.Count} bots. {totalDupeCount} dupes were ignored. Took {LoggingHelpers.LogTimeTaken(stopwatch.Elapsed.TotalSeconds)} seconds");
return parsedBotsDict.Values.ToList(); return [.. parsedBotsDict.Values];
} }
private static async Task<int> ProcessBotFile( private static async Task<int> ProcessBotFile(
@ -179,27 +168,17 @@ public static class BotParser
int dupeCount = 0; int dupeCount = 0;
List<Datum> bots = new List<Datum>(); List<Datum> bots = [];
try try
{ {
// Parse the bots inside the json file // Parse the bots inside the json file
using var reader = new StreamReader(filePath); using (var reader = new StreamReader(filePath))
var deSerialisedObject = await JsonSerializer.DeserializeAsync<Root>(reader.BaseStream, serialiserOptions);
var botTypesLower = new HashSet<string>(botTypes, StringComparer.OrdinalIgnoreCase);
var filteredBots = new List<Datum>();
foreach (var botData in deSerialisedObject.data.ToList())
{ {
var roleLower = botData.Info.Settings.Role.ToLower(); var deSerialisedObject = JsonSerializer.Deserialize<Root>(reader.ReadToEnd(), serialiserOptions);
if (botTypesLower.Contains(roleLower)) bots.AddRange(deSerialisedObject.data.Where(botData => botTypes.Contains(botData.Info.Settings.Role.ToLower())));
{
filteredBots.Add(botData);
} }
} }
catch (Exception ex)
bots.AddRange(filteredBots);
}
catch (Exception)
{ {
Console.WriteLine($"File parse fucked up: {filePath}"); Console.WriteLine($"File parse fucked up: {filePath}");
throw; throw;
@ -256,9 +235,8 @@ public static class BotParser
if (jItemsToReplace != null && jItemsToReplace.Any()) if (jItemsToReplace != null && jItemsToReplace.Any())
{ {
LoggingHelpers.LogToConsole($"file {fileName} has {jItemsToReplace.Count().ToString()} json issues, cleaning up.", ConsoleColor.Yellow); LoggingHelpers.LogToConsole($"file {fileName} has {jItemsToReplace.Count()} json issues, cleaning up.", ConsoleColor.Yellow);
var jItemsToReplaceList = jItemsToReplace.ToList(); foreach (var item in jItemsToReplace)
foreach (var item in jItemsToReplaceList)
{ {
var obj = new { x = 1, y = 0, r = 0 }; var obj = new { x = 1, y = 0, r = 0 };
item.Replace(JToken.FromObject(obj)); item.Replace(JToken.FromObject(obj));

View File

@ -2,7 +2,7 @@
<PropertyGroup> <PropertyGroup>
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<TargetFramework>net9.0</TargetFramework> <TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<ServerGarbageCollection>true</ServerGarbageCollection> <ServerGarbageCollection>true</ServerGarbageCollection>
<ConcurrentGarbageCollection>true</ConcurrentGarbageCollection> <ConcurrentGarbageCollection>true</ConcurrentGarbageCollection>

View File

@ -296,13 +296,7 @@ namespace Generator.Helpers.Gear
foreach (var cartridge in botToUpdate.inventory.Ammo.Keys) foreach (var cartridge in botToUpdate.inventory.Ammo.Keys)
{ {
var cartridgeWithWeights = botToUpdate.inventory.Ammo[cartridge]; var cartridgeWithWeights = botToUpdate.inventory.Ammo[cartridge];
foreach (var cartridgeKvP in cartridgeWithWeights)
{
cartridgeWithWeights[cartridgeKvP.Key] = ReduceValueAccuracy(cartridgeKvP.Value);
}
var weights = cartridgeWithWeights.Values.Select(x => x).ToList(); var weights = cartridgeWithWeights.Values.Select(x => x).ToList();
var commonAmmoDivisor = CommonDivisor(weights); var commonAmmoDivisor = CommonDivisor(weights);
foreach (var cartridgeWeightKvP in cartridgeWithWeights) foreach (var cartridgeWeightKvP in cartridgeWithWeights)
@ -347,11 +341,6 @@ namespace Generator.Helpers.Gear
return; return;
} }
foreach (var itemWeightKvp in equipmentDict)
{
equipmentDict[itemWeightKvp.Key] = ReduceValueAccuracy(itemWeightKvp.Value, 4);
}
var weights = equipmentDict.Values.Select(x => x).ToList(); var weights = equipmentDict.Values.Select(x => x).ToList();
var commonAmmoDivisor = CommonDivisor(weights); var commonAmmoDivisor = CommonDivisor(weights);
@ -366,13 +355,5 @@ namespace Generator.Helpers.Gear
equipmentDict[itemTplWithWeight.Key] /= commonAmmoDivisor; equipmentDict[itemTplWithWeight.Key] /= commonAmmoDivisor;
} }
} }
private static int ReduceValueAccuracy(long x, int digits = 3)
{
int i = (int)Math.Log10(x);
i = Math.Max(0, i - (digits - 1));
i = (int)Math.Pow(10, i);
return (int)(x / i * i);
}
} }
} }

View File

@ -2,11 +2,11 @@
<PropertyGroup> <PropertyGroup>
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<TargetFramework>net9.0</TargetFramework> <TargetFramework>net6.0</TargetFramework>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" /> <PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>