Compare commits
No commits in common. "master" and "feat-memory-improvements" have entirely different histories.
master
...
feat-memor
@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@ -69,7 +69,7 @@ namespace Common.Models.Output
|
||||
public Dictionary<string, int> TacticalVest { get; set; }
|
||||
public Dictionary<string, int> Pockets { get; set; }
|
||||
public Dictionary<string, int> Backpack { get; set; }
|
||||
public Dictionary<string, int> SecuredContainer { get; set; }
|
||||
public Dictionary<string, int> SpecialLoot { get; set; }
|
||||
public new Dictionary<string, int> SecuredContainer { get; set; }
|
||||
public new Dictionary<string, int> SpecialLoot { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -70,16 +70,16 @@ public class Experience
|
||||
public Experience()
|
||||
{
|
||||
level = new MinMax(0, 1);
|
||||
reward = new Dictionary<string, MinMax>();
|
||||
standingForKill = new Dictionary<string, object>();
|
||||
aggressorBonus = new Dictionary<string, object>(); ;
|
||||
reward = new MinMax(-1, -1);
|
||||
standingForKill = -0.02;
|
||||
aggressorBonus = 0.01;
|
||||
useSimpleAnimator = false;
|
||||
}
|
||||
|
||||
public MinMax level { get; set; }
|
||||
public Dictionary<string, MinMax> reward { get; set; }
|
||||
public Dictionary<string, object> standingForKill { get; set; }
|
||||
public new Dictionary<string, object> aggressorBonus { get; set; }
|
||||
public MinMax reward { get; set; }
|
||||
public object standingForKill { get; set; }
|
||||
public object aggressorBonus { get; set; }
|
||||
public bool useSimpleAnimator { get; set; }
|
||||
}
|
||||
|
||||
|
60533
Common/Assets/items.json
60533
Common/Assets/items.json
File diff suppressed because it is too large
Load Diff
@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@ -338,6 +338,7 @@
|
||||
"MAX_AGGRO_BOT_DIST": 100.0,
|
||||
"HIT_POINT_DETECTION": 4.0,
|
||||
"DANGER_POINT_CHOOSE_COEF": 1.0,
|
||||
"FOLLOWER_AND_BOSS_WARN_EQUAL_PRIORITY": true,
|
||||
"SIMPLE_POINT_CHOOSE_COEF": 0.4,
|
||||
"LASTSEEN_POINT_CHOOSE_COEF": 0.2,
|
||||
"COVER_DIST_COEF": 1.5,
|
||||
|
@ -360,7 +360,6 @@
|
||||
"FRIEND_DEAD_AGR_LOW": -0.2,
|
||||
"FRIEND_AGR_KILL": 0.2,
|
||||
"LAST_ENEMY_LOOK_TO": 40.0,
|
||||
"REACT_ADD_DRUNK_ENEMY": true,
|
||||
"SURGE_KIT_ONLY_SAFE_CONTAINER": false,
|
||||
"CHECK_MARK_OF_UNKNOWS": false,
|
||||
"CAN_RECEIVE_PLAYER_REQUESTS_SAVAGE": false,
|
||||
|
@ -329,7 +329,6 @@
|
||||
},
|
||||
"Mind": {
|
||||
"HOW_WORK_OVER_DEAD_BODY": 2,
|
||||
"REACT_ADD_DRUNK_ENEMY": true,
|
||||
"MIN_SHOOTS_TIME": 2,
|
||||
"MAX_SHOOTS_TIME": 4,
|
||||
"TIME_LEAVE_MAP": 23,
|
||||
|
@ -329,7 +329,6 @@
|
||||
},
|
||||
"Mind": {
|
||||
"HOW_WORK_OVER_DEAD_BODY": 2,
|
||||
"REACT_ADD_DRUNK_ENEMY": true,
|
||||
"MIN_SHOOTS_TIME": 2,
|
||||
"MAX_SHOOTS_TIME": 4,
|
||||
"TIME_LEAVE_MAP": 23,
|
||||
|
@ -321,7 +321,6 @@
|
||||
},
|
||||
"Mind": {
|
||||
"HOW_WORK_OVER_DEAD_BODY": 2,
|
||||
"REACT_ADD_DRUNK_ENEMY": true,
|
||||
"MIN_SHOOTS_TIME": 2,
|
||||
"MAX_SHOOTS_TIME": 4,
|
||||
"TIME_TO_RUN_TO_COVER_CAUSE_SHOOT_SEC": 15.0,
|
||||
|
@ -46,7 +46,7 @@
|
||||
},
|
||||
"grenades": {
|
||||
"weights": {
|
||||
"0": 13,
|
||||
"0": 8,
|
||||
"1": 6,
|
||||
"2": 2,
|
||||
"3": 1,
|
||||
@ -1339,375 +1339,5 @@
|
||||
},
|
||||
"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": []
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -341,6 +341,7 @@
|
||||
"DANGER_POINT_CHOOSE_COEF": 1.0,
|
||||
"SIMPLE_POINT_CHOOSE_COEF": 0.4,
|
||||
"LASTSEEN_POINT_CHOOSE_COEF": 0.2,
|
||||
"FOLLOWER_AND_BOSS_WARN_EQUAL_PRIORITY": true,
|
||||
"COVER_DIST_COEF": 1.5,
|
||||
"DIST_TO_FOUND_SQRT": 400.0,
|
||||
"MAX_AGGRO_BOT_DIST_SQR": 10000.0,
|
||||
|
@ -331,7 +331,6 @@
|
||||
},
|
||||
"Mind": {
|
||||
"HOW_WORK_OVER_DEAD_BODY": 2,
|
||||
"REACT_ADD_DRUNK_ENEMY": true,
|
||||
"MIN_SHOOTS_TIME": 2,
|
||||
"MAX_SHOOTS_TIME": 4,
|
||||
"TIME_LEAVE_MAP": 23,
|
||||
|
@ -330,7 +330,6 @@
|
||||
},
|
||||
"Mind": {
|
||||
"HOW_WORK_OVER_DEAD_BODY": 2,
|
||||
"REACT_ADD_DRUNK_ENEMY": true,
|
||||
"MIN_SHOOTS_TIME": 2,
|
||||
"MAX_SHOOTS_TIME": 4,
|
||||
"TIME_LEAVE_MAP": 23,
|
||||
|
@ -330,7 +330,6 @@
|
||||
},
|
||||
"Mind": {
|
||||
"HOW_WORK_OVER_DEAD_BODY": 2,
|
||||
"REACT_ADD_DRUNK_ENEMY": true,
|
||||
"MIN_SHOOTS_TIME": 2,
|
||||
"MAX_SHOOTS_TIME": 4,
|
||||
"TIME_LEAVE_MAP": 23,
|
||||
|
@ -340,7 +340,6 @@
|
||||
"DIST_TO_STOP_RUN_ENEMY": 15.0,
|
||||
"ENEMY_LOOK_AT_ME_ANG": 15.0,
|
||||
"FOLLOWER_AND_BOSS_WARN_EQUAL_PRIORITY": true,
|
||||
"REACT_ADD_DRUNK_ENEMY": true,
|
||||
"MIN_START_AGGRESION_COEF": 1.0,
|
||||
"MAX_START_AGGRESION_COEF": 3.0,
|
||||
"BULLET_FEEL_DIST": 360.0,
|
||||
@ -415,6 +414,7 @@
|
||||
"PERSONS_SEND": 2,
|
||||
"DELTA_SEARCH_TIME": 18.0,
|
||||
"COVER_TO_SEND": true,
|
||||
"NOT_ADD_TO_ENEMY_ON_KILLS": true,
|
||||
"WAIT_NO_ATTACK_SAVAGE": 10.0,
|
||||
"CHANCE_USE_RESERVE_PATROL_100": 30.0,
|
||||
"KILLA_Y_DELTA_TO_BE_ENEMY_BOSS": 5.0,
|
||||
|
@ -333,6 +333,7 @@
|
||||
"DANGER_POINT_CHOOSE_COEF": 1.0,
|
||||
"SIMPLE_POINT_CHOOSE_COEF": 0.4,
|
||||
"LASTSEEN_POINT_CHOOSE_COEF": 0.2,
|
||||
"FOLLOWER_AND_BOSS_WARN_EQUAL_PRIORITY": true,
|
||||
"COVER_DIST_COEF": 1.5,
|
||||
"DIST_TO_FOUND_SQRT": 400.0,
|
||||
"MAX_AGGRO_BOT_DIST_SQR": 10000.0,
|
||||
|
@ -344,6 +344,7 @@
|
||||
"COVER_DIST_COEF": 1.5,
|
||||
"DIST_TO_FOUND_SQRT": 400.0,
|
||||
"MAX_AGGRO_BOT_DIST_SQR": 10000.0,
|
||||
"FOLLOWER_AND_BOSS_WARN_EQUAL_PRIORITY": true,
|
||||
"CHECK_MARK_OF_UNKNOWS": true,
|
||||
"DIST_TO_STOP_RUN_ENEMY": 15.0,
|
||||
"ENEMY_LOOK_AT_ME_ANG": 15.0,
|
||||
|
@ -496,8 +496,7 @@
|
||||
"GLUHAR_FOLLOWERS_SCOUT": 2,
|
||||
"GLUHAR_FOLLOWERS_SNIPE": 0,
|
||||
"GLUHAR_BOSS_DIST_TO_ENEMY_WANT_KILL": 25.0,
|
||||
"EFFECT_PAINKILLER": true,
|
||||
"ALLOW_REQUEST_SELF": false
|
||||
"EFFECT_PAINKILLER": true
|
||||
},
|
||||
"Core": {
|
||||
"VisibleAngle": 160.0,
|
||||
|
@ -426,8 +426,7 @@
|
||||
"KILLA_ENEMIES_TO_ATTACK": 3,
|
||||
"KILLA_ONE_IS_CLOSE": 30.0,
|
||||
"KILLA_TRIGGER_DOWN_DELAY": 1.0,
|
||||
"KILLA_WAIT_IN_COVER_COEF": 1.0,
|
||||
"ALLOW_REQUEST_SELF": false
|
||||
"KILLA_WAIT_IN_COVER_COEF": 1.0
|
||||
},
|
||||
"Core": {
|
||||
"VisibleAngle": 160.0,
|
||||
|
@ -496,8 +496,7 @@
|
||||
"GLUHAR_FOLLOWERS_SCOUT": 2,
|
||||
"GLUHAR_FOLLOWERS_SNIPE": 0,
|
||||
"GLUHAR_BOSS_DIST_TO_ENEMY_WANT_KILL": 25.0,
|
||||
"EFFECT_PAINKILLER": true,
|
||||
"ALLOW_REQUEST_SELF": false
|
||||
"EFFECT_PAINKILLER": true
|
||||
},
|
||||
"Core": {
|
||||
"VisibleAngle": 160.0,
|
||||
|
@ -343,6 +343,7 @@
|
||||
"TIME_TO_FORGOR_ABOUT_ENEMY_SEC": 104.0,
|
||||
"TIME_TO_FIND_ENEMY": 22.0,
|
||||
"MAX_AGGRO_BOT_DIST": 200.0,
|
||||
"FOLLOWER_AND_BOSS_WARN_EQUAL_PRIORITY": true,
|
||||
"HIT_POINT_DETECTION": 4.0,
|
||||
"DANGER_POINT_CHOOSE_COEF": 1.0,
|
||||
"SIMPLE_POINT_CHOOSE_COEF": 0.4,
|
||||
|
@ -436,8 +436,7 @@
|
||||
"KOJANIY_MANY_ENEMIES_COEF": 1.5,
|
||||
"KOJANIY_FIGHT_CENTER_POS_ME": false,
|
||||
"SET_CHEAT_VISIBLE_WHEN_ADD_TO_ENEMY": true,
|
||||
"EFFECT_PAINKILLER": true,
|
||||
"ALLOW_REQUEST_SELF": false
|
||||
"EFFECT_PAINKILLER": true
|
||||
},
|
||||
"Core": {
|
||||
"VisibleAngle": 160.0,
|
||||
|
@ -504,8 +504,7 @@
|
||||
"GLUHAR_FOLLOWERS_SCOUT": 2,
|
||||
"GLUHAR_FOLLOWERS_SNIPE": 0,
|
||||
"GLUHAR_BOSS_DIST_TO_ENEMY_WANT_KILL": 25.0,
|
||||
"EFFECT_PAINKILLER": true,
|
||||
"ALLOW_REQUEST_SELF": false
|
||||
"EFFECT_PAINKILLER": true
|
||||
},
|
||||
"Core": {
|
||||
"VisibleAngle": 160.0,
|
||||
|
@ -170,8 +170,7 @@
|
||||
"DIST_TO_STOP_SPRINT_MELEE": 2.5,
|
||||
"TRY_HIT_PERIOD_MELEE": 0.1,
|
||||
"MELEE_RESET_HIT_TIME": 0,
|
||||
"MELEE_STOP_MOVE_DISTANCE": 0.85,
|
||||
"SHOOT_PROBABILITY_GRENADE_LAUNCHER": 100
|
||||
"MELEE_STOP_MOVE_DISTANCE": 0.85
|
||||
},
|
||||
"Move":
|
||||
{
|
||||
|
@ -451,8 +451,7 @@
|
||||
"KILLA_TRIGGER_DOWN_DELAY": 1.0,
|
||||
"KILLA_WAIT_IN_COVER_COEF": 1.0,
|
||||
"EFFECT_REGENERATION_PER_MIN": 60,
|
||||
"EFFECT_PAINKILLER": true,
|
||||
"ALLOW_REQUEST_SELF": false
|
||||
"EFFECT_PAINKILLER": true
|
||||
},
|
||||
"Core": {
|
||||
"VisibleAngle": 160.0,
|
||||
|
@ -419,8 +419,7 @@
|
||||
"KILLA_ENEMIES_TO_ATTACK": 3,
|
||||
"KILLA_ONE_IS_CLOSE": 30.0,
|
||||
"KILLA_TRIGGER_DOWN_DELAY": 1.0,
|
||||
"KILLA_WAIT_IN_COVER_COEF": 1.0,
|
||||
"ALLOW_REQUEST_SELF": false
|
||||
"KILLA_WAIT_IN_COVER_COEF": 1.0
|
||||
},
|
||||
"Core": {
|
||||
"VisibleAngle": 140.0,
|
||||
|
@ -384,8 +384,7 @@
|
||||
"HIT_DELAY_WHEN_HAVE_SMT": -1.0,
|
||||
"HIT_DELAY_WHEN_PEACE": -1.0,
|
||||
"TALK_WITH_QUERY": true,
|
||||
"ENEMY_BOT_TYPES": ["pmcBEAR","pmcUSEC"],
|
||||
"FRIENDLY_BOT_TYPES": ["bossZryachiy","followerZryachiy"],
|
||||
"ENEMY_BOT_TYPES": ["pmcBEAR","pmcUSEC"]
|
||||
},
|
||||
"Boss": {
|
||||
"BOSS_DIST_TO_WARNING": 8.0,
|
||||
|
@ -334,6 +334,7 @@
|
||||
"MIN_START_AGGRESION_COEF": 1.0,
|
||||
"MAX_START_AGGRESION_COEF": 3.0,
|
||||
"BULLET_FEEL_DIST": 360.0,
|
||||
"FOLLOWER_AND_BOSS_WARN_EQUAL_PRIORITY": true,
|
||||
"BULLET_FEEL_CLOSE_SDIST": 1.0,
|
||||
"ATTACK_IMMEDIATLY_CHANCE_0_100": 40.0,
|
||||
"CHANCE_FUCK_YOU_ON_CONTACT_100": 0.01,
|
||||
|
@ -382,8 +382,7 @@
|
||||
"HIT_DELAY_WHEN_HAVE_SMT": -1.0,
|
||||
"HIT_DELAY_WHEN_PEACE": -1.0,
|
||||
"TALK_WITH_QUERY": true,
|
||||
"ENEMY_BOT_TYPES": ["pmcBEAR","pmcUSEC"],
|
||||
"FRIENDLY_BOT_TYPES": ["bossZryachiy","followerZryachiy"],
|
||||
"ENEMY_BOT_TYPES": ["pmcBEAR","pmcUSEC"]
|
||||
},
|
||||
"Boss": {
|
||||
"BOSS_ZRYACHIY_MIN_DIST_TO_TELEPORT": 500.0,
|
||||
|
@ -332,7 +332,6 @@
|
||||
"Mind": {
|
||||
"HOW_WORK_OVER_DEAD_BODY": 2,
|
||||
"MIN_SHOOTS_TIME": 2,
|
||||
"REACT_ADD_DRUNK_ENEMY": true,
|
||||
"MAX_SHOOTS_TIME": 4,
|
||||
"TIME_LEAVE_MAP": 23,
|
||||
"TIME_TO_RUN_TO_COVER_CAUSE_SHOOT_SEC": 15.0,
|
||||
|
@ -331,7 +331,6 @@
|
||||
"Mind": {
|
||||
"HOW_WORK_OVER_DEAD_BODY": 2,
|
||||
"MIN_SHOOTS_TIME": 2,
|
||||
"REACT_ADD_DRUNK_ENEMY": true,
|
||||
"MAX_SHOOTS_TIME": 4,
|
||||
"TIME_LEAVE_MAP": 23,
|
||||
"TIME_TO_RUN_TO_COVER_CAUSE_SHOOT_SEC": 15.0,
|
||||
|
@ -330,7 +330,6 @@
|
||||
},
|
||||
"Mind": {
|
||||
"HOW_WORK_OVER_DEAD_BODY": 2,
|
||||
"REACT_ADD_DRUNK_ENEMY": true,
|
||||
"MIN_SHOOTS_TIME": 2,
|
||||
"MAX_SHOOTS_TIME": 4,
|
||||
"TIME_LEAVE_MAP": 23,
|
||||
|
@ -322,7 +322,6 @@
|
||||
},
|
||||
"Mind": {
|
||||
"HOW_WORK_OVER_DEAD_BODY": 2,
|
||||
"REACT_ADD_DRUNK_ENEMY": true,
|
||||
"MIN_SHOOTS_TIME": 2,
|
||||
"MAX_SHOOTS_TIME": 4,
|
||||
"TIME_TO_RUN_TO_COVER_CAUSE_SHOOT_SEC": 15.0,
|
||||
|
@ -318,7 +318,6 @@
|
||||
},
|
||||
"Mind": {
|
||||
"MIN_SHOOTS_TIME": 2,
|
||||
"REACT_ADD_DRUNK_ENEMY": true,
|
||||
"MAX_SHOOTS_TIME": 4,
|
||||
"TIME_TO_RUN_TO_COVER_CAUSE_SHOOT_SEC": 15.0,
|
||||
"DAMAGE_REDUCTION_TIME_SEC": 30.0,
|
||||
|
@ -333,6 +333,7 @@
|
||||
"MAX_AGGRO_BOT_DIST_SQR": 10000.0,
|
||||
"DIST_TO_STOP_RUN_ENEMY": 15.0,
|
||||
"ENEMY_LOOK_AT_ME_ANG": 15.0,
|
||||
"FOLLOWER_AND_BOSS_WARN_EQUAL_PRIORITY": true,
|
||||
"MIN_START_AGGRESION_COEF": 1.0,
|
||||
"MAX_START_AGGRESION_COEF": 3.0,
|
||||
"BULLET_FEEL_DIST": 360.0,
|
||||
|
@ -331,6 +331,7 @@
|
||||
"MAX_AGGRO_BOT_DIST_SQR": 10000.0,
|
||||
"DIST_TO_STOP_RUN_ENEMY": 15.0,
|
||||
"ENEMY_LOOK_AT_ME_ANG": 15.0,
|
||||
"FOLLOWER_AND_BOSS_WARN_EQUAL_PRIORITY": true,
|
||||
"MIN_START_AGGRESION_COEF": 1.0,
|
||||
"MAX_START_AGGRESION_COEF": 3.0,
|
||||
"BULLET_FEEL_DIST": 360.0,
|
||||
|
@ -4,6 +4,7 @@ using Common.Models.Input;
|
||||
using Common.Models.Output;
|
||||
using Generator.Helpers;
|
||||
using Generator.Helpers.Gear;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace Generator
|
||||
{
|
||||
@ -14,7 +15,6 @@ namespace Generator
|
||||
UpdateBodyPartHealth(botData, rawBotData);
|
||||
AddExperience(botData, rawBotData);
|
||||
AddStandingForKill(botData, rawBotData);
|
||||
AddAggressorBonus(botData, rawBotData);
|
||||
AddSkills(botData, rawBotData);
|
||||
botData.experience.useSimpleAnimator = rawBotData.Info.Settings.UseSimpleAnimator;
|
||||
|
||||
@ -42,39 +42,14 @@ namespace Generator
|
||||
|
||||
private static void AddStandingForKill(Bot botToUpdate, Datum rawBotData)
|
||||
{
|
||||
botToUpdate.experience.standingForKill ??= new Dictionary<string, object>();
|
||||
|
||||
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);
|
||||
}
|
||||
botToUpdate.experience.standingForKill = rawBotData.Info.Settings.StandingForKill;
|
||||
botToUpdate.experience.aggressorBonus = rawBotData.Info.Settings.AggressorBonus;
|
||||
}
|
||||
|
||||
private static void AddExperience(Bot botToUpdate, Datum rawBotData)
|
||||
{
|
||||
botToUpdate.experience.reward ??= new();
|
||||
|
||||
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);
|
||||
|
||||
botToUpdate.experience.reward.min = rawBotData.Info.Settings.Experience;
|
||||
botToUpdate.experience.reward.max = rawBotData.Info.Settings.Experience;
|
||||
}
|
||||
|
||||
private static void AddVoice(Bot bot, Datum rawBot)
|
||||
|
@ -58,12 +58,6 @@ namespace Generator
|
||||
}
|
||||
|
||||
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>
|
||||
|
@ -33,7 +33,7 @@ public static class BotParser
|
||||
DiskHelpers.CreateDirIfDoesntExist(dumpPath);
|
||||
|
||||
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
|
||||
int totalDupeCount = 0;
|
||||
@ -42,7 +42,7 @@ public static class BotParser
|
||||
foreach (var filePath in botFiles)
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
@ -69,7 +69,7 @@ public static class BotParser
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
@ -84,14 +84,15 @@ public static class BotParser
|
||||
|
||||
int dupeCount = 0;
|
||||
|
||||
List<Datum> bots = new List<Datum>();
|
||||
List<Datum> bots = [];
|
||||
try
|
||||
{
|
||||
// Parse the bots inside the json file
|
||||
using (var reader = new StreamReader(filePath))
|
||||
{
|
||||
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
|
||||
if (botData._id == "6483938c53cc9087c70eae86")
|
||||
@ -100,22 +101,10 @@ public static class BotParser
|
||||
continue;
|
||||
}
|
||||
|
||||
var role = botData.Info.Settings.Role;
|
||||
var botType = Enum.Parse<BotType>(role, true);
|
||||
|
||||
Bot baseBot = null;
|
||||
foreach (var bot in baseBots)
|
||||
{
|
||||
if (bot.botType == botType)
|
||||
{
|
||||
baseBot = bot;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
var baseBot = baseBots.SingleOrDefault(bot => bot.botType.ToString().Equals(botData.Info.Settings.Role, StringComparison.OrdinalIgnoreCase));
|
||||
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;
|
||||
}
|
||||
|
||||
@ -132,7 +121,7 @@ public static class BotParser
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine($"File parse fucked up: {filePath}");
|
||||
throw;
|
||||
@ -148,12 +137,12 @@ public static class BotParser
|
||||
DiskHelpers.CreateDirIfDoesntExist(dumpPath);
|
||||
|
||||
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
|
||||
// Store bots keyed against their ID so we never get duplicates
|
||||
var parsedBotsDict = new ConcurrentDictionary<string, Datum>();
|
||||
|
||||
|
||||
int totalDupeCount = 0;
|
||||
var tasks = new List<Task>();
|
||||
foreach (var filePath in botFiles)
|
||||
@ -163,10 +152,10 @@ public static class BotParser
|
||||
|
||||
await Task.WhenAll(tasks.ToArray());
|
||||
stopwatch.Stop();
|
||||
|
||||
LoggingHelpers.LogToConsole($"Cleaned and Parsed: {parsedBotsDict.Count} bots. {totalDupeCount} dupes were ignored. Took {LoggingHelpers.LogTimeTaken(stopwatch.Elapsed.TotalSeconds)} seconds");
|
||||
|
||||
LoggingHelpers.LogToConsole($"Cleaned and Parsed: {parsedBotsDict.Count.ToString()} bots. {totalDupeCount.ToString()} dupes were ignored. Took {LoggingHelpers.LogTimeTaken(stopwatch.Elapsed.TotalSeconds)} seconds");
|
||||
|
||||
return parsedBotsDict.Values.ToList();
|
||||
return [.. parsedBotsDict.Values];
|
||||
}
|
||||
|
||||
private static async Task<int> ProcessBotFile(
|
||||
@ -179,27 +168,17 @@ public static class BotParser
|
||||
|
||||
int dupeCount = 0;
|
||||
|
||||
List<Datum> bots = new List<Datum>();
|
||||
List<Datum> bots = [];
|
||||
try
|
||||
{
|
||||
// Parse the bots inside the json file
|
||||
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())
|
||||
using (var reader = new StreamReader(filePath))
|
||||
{
|
||||
var roleLower = botData.Info.Settings.Role.ToLower();
|
||||
if (botTypesLower.Contains(roleLower))
|
||||
{
|
||||
filteredBots.Add(botData);
|
||||
}
|
||||
var deSerialisedObject = JsonSerializer.Deserialize<Root>(reader.ReadToEnd(), serialiserOptions);
|
||||
bots.AddRange(deSerialisedObject.data.Where(botData => botTypes.Contains(botData.Info.Settings.Role.ToLower())));
|
||||
}
|
||||
|
||||
bots.AddRange(filteredBots);
|
||||
}
|
||||
catch (Exception)
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine($"File parse fucked up: {filePath}");
|
||||
throw;
|
||||
@ -256,9 +235,8 @@ public static class BotParser
|
||||
|
||||
if (jItemsToReplace != null && jItemsToReplace.Any())
|
||||
{
|
||||
LoggingHelpers.LogToConsole($"file {fileName} has {jItemsToReplace.Count().ToString()} json issues, cleaning up.", ConsoleColor.Yellow);
|
||||
var jItemsToReplaceList = jItemsToReplace.ToList();
|
||||
foreach (var item in jItemsToReplaceList)
|
||||
LoggingHelpers.LogToConsole($"file {fileName} has {jItemsToReplace.Count()} json issues, cleaning up.", ConsoleColor.Yellow);
|
||||
foreach (var item in jItemsToReplace)
|
||||
{
|
||||
var obj = new { x = 1, y = 0, r = 0 };
|
||||
item.Replace(JToken.FromObject(obj));
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<ServerGarbageCollection>true</ServerGarbageCollection>
|
||||
<ConcurrentGarbageCollection>true</ConcurrentGarbageCollection>
|
||||
|
@ -296,13 +296,7 @@ namespace Generator.Helpers.Gear
|
||||
foreach (var cartridge in botToUpdate.inventory.Ammo.Keys)
|
||||
{
|
||||
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 commonAmmoDivisor = CommonDivisor(weights);
|
||||
|
||||
foreach (var cartridgeWeightKvP in cartridgeWithWeights)
|
||||
@ -347,11 +341,6 @@ namespace Generator.Helpers.Gear
|
||||
return;
|
||||
}
|
||||
|
||||
foreach (var itemWeightKvp in equipmentDict)
|
||||
{
|
||||
equipmentDict[itemWeightKvp.Key] = ReduceValueAccuracy(itemWeightKvp.Value, 4);
|
||||
}
|
||||
|
||||
var weights = equipmentDict.Values.Select(x => x).ToList();
|
||||
var commonAmmoDivisor = CommonDivisor(weights);
|
||||
|
||||
@ -366,13 +355,5 @@ namespace Generator.Helpers.Gear
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2,11 +2,11 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
Loading…
x
Reference in New Issue
Block a user