forked from chomp/BotGenerator
Compare commits
14 Commits
feat-memor
...
master
Author | SHA1 | Date | |
---|---|---|---|
![]() |
792c40c699 | ||
![]() |
92c624b246 | ||
![]() |
2777b18bdd | ||
![]() |
0e49c2bfc3 | ||
![]() |
6ff0aa5120 | ||
![]() |
e7813b48dd | ||
![]() |
5eebd817b4 | ||
![]() |
b826e97b30 | ||
294881dcca | |||
![]() |
5083c7c5c3 | ||
![]() |
8c0db8e0c2 | ||
![]() |
1dbf46179d | ||
f927a64a13 | |||
32c0239c3a |
@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
<TargetFramework>net9.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@ -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 new Dictionary<string, int> SecuredContainer { get; set; }
|
public Dictionary<string, int> SecuredContainer { get; set; }
|
||||||
public new Dictionary<string, int> SpecialLoot { get; set; }
|
public Dictionary<string, int> SpecialLoot { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -70,16 +70,16 @@ public class Experience
|
|||||||
public Experience()
|
public Experience()
|
||||||
{
|
{
|
||||||
level = new MinMax(0, 1);
|
level = new MinMax(0, 1);
|
||||||
reward = new MinMax(-1, -1);
|
reward = new Dictionary<string, MinMax>();
|
||||||
standingForKill = -0.02;
|
standingForKill = new Dictionary<string, object>();
|
||||||
aggressorBonus = 0.01;
|
aggressorBonus = new Dictionary<string, object>(); ;
|
||||||
useSimpleAnimator = false;
|
useSimpleAnimator = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public MinMax level { get; set; }
|
public MinMax level { get; set; }
|
||||||
public MinMax reward { get; set; }
|
public Dictionary<string, MinMax> reward { get; set; }
|
||||||
public object standingForKill { get; set; }
|
public Dictionary<string, object> standingForKill { get; set; }
|
||||||
public object aggressorBonus { get; set; }
|
public new Dictionary<string, object> aggressorBonus { get; set; }
|
||||||
public bool useSimpleAnimator { 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">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
<TargetFramework>net9.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@ -338,7 +338,6 @@
|
|||||||
"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,
|
||||||
|
@ -360,6 +360,7 @@
|
|||||||
"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,
|
||||||
|
@ -329,6 +329,7 @@
|
|||||||
},
|
},
|
||||||
"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,
|
||||||
|
@ -329,6 +329,7 @@
|
|||||||
},
|
},
|
||||||
"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,
|
||||||
|
@ -321,6 +321,7 @@
|
|||||||
},
|
},
|
||||||
"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,
|
||||||
|
@ -46,7 +46,7 @@
|
|||||||
},
|
},
|
||||||
"grenades": {
|
"grenades": {
|
||||||
"weights": {
|
"weights": {
|
||||||
"0": 8,
|
"0": 13,
|
||||||
"1": 6,
|
"1": 6,
|
||||||
"2": 2,
|
"2": 2,
|
||||||
"3": 1,
|
"3": 1,
|
||||||
@ -1339,5 +1339,375 @@
|
|||||||
},
|
},
|
||||||
"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": []
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -341,7 +341,6 @@
|
|||||||
"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,
|
||||||
|
@ -331,6 +331,7 @@
|
|||||||
},
|
},
|
||||||
"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,
|
||||||
|
@ -330,6 +330,7 @@
|
|||||||
},
|
},
|
||||||
"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,
|
||||||
|
@ -330,6 +330,7 @@
|
|||||||
},
|
},
|
||||||
"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,
|
||||||
|
@ -340,6 +340,7 @@
|
|||||||
"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,
|
||||||
@ -414,7 +415,6 @@
|
|||||||
"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,
|
||||||
|
@ -333,7 +333,6 @@
|
|||||||
"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,
|
||||||
|
@ -344,7 +344,6 @@
|
|||||||
"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,
|
||||||
|
@ -496,7 +496,8 @@
|
|||||||
"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,
|
||||||
|
@ -426,7 +426,8 @@
|
|||||||
"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,
|
||||||
|
@ -496,7 +496,8 @@
|
|||||||
"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,
|
||||||
|
@ -343,7 +343,6 @@
|
|||||||
"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,
|
||||||
|
@ -436,7 +436,8 @@
|
|||||||
"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,
|
||||||
|
@ -504,7 +504,8 @@
|
|||||||
"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,
|
||||||
|
@ -170,7 +170,8 @@
|
|||||||
"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":
|
||||||
{
|
{
|
||||||
|
@ -451,7 +451,8 @@
|
|||||||
"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,
|
||||||
|
@ -419,7 +419,8 @@
|
|||||||
"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,
|
||||||
|
@ -384,7 +384,8 @@
|
|||||||
"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,
|
||||||
|
@ -334,7 +334,6 @@
|
|||||||
"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,
|
||||||
|
@ -382,7 +382,8 @@
|
|||||||
"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,
|
||||||
|
@ -332,6 +332,7 @@
|
|||||||
"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,
|
||||||
|
@ -331,6 +331,7 @@
|
|||||||
"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,
|
||||||
|
@ -330,6 +330,7 @@
|
|||||||
},
|
},
|
||||||
"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,
|
||||||
|
@ -322,6 +322,7 @@
|
|||||||
},
|
},
|
||||||
"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,
|
||||||
|
@ -318,6 +318,7 @@
|
|||||||
},
|
},
|
||||||
"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,
|
||||||
|
@ -333,7 +333,6 @@
|
|||||||
"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,
|
||||||
|
@ -331,7 +331,6 @@
|
|||||||
"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,
|
||||||
|
@ -4,7 +4,6 @@ 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
|
||||||
{
|
{
|
||||||
@ -15,6 +14,7 @@ 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,14 +42,39 @@ namespace Generator
|
|||||||
|
|
||||||
private static void AddStandingForKill(Bot botToUpdate, Datum rawBotData)
|
private static void AddStandingForKill(Bot botToUpdate, Datum rawBotData)
|
||||||
{
|
{
|
||||||
botToUpdate.experience.standingForKill = rawBotData.Info.Settings.StandingForKill;
|
botToUpdate.experience.standingForKill ??= new Dictionary<string, object>();
|
||||||
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.min = rawBotData.Info.Settings.Experience;
|
botToUpdate.experience.reward ??= new();
|
||||||
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)
|
||||||
|
@ -58,6 +58,12 @@ 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>
|
||||||
|
@ -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} bot dump files found");
|
LoggingHelpers.LogToConsole($"{botFiles.Length.ToString()} 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 % 100 == 0) Console.WriteLine($"Processing file {i}");
|
if (i % 500 == 0) Console.WriteLine($"Processing file {i.ToString()}");
|
||||||
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} dupes were ignored. Took {LoggingHelpers.LogTimeTaken(stopwatch.Elapsed.TotalSeconds)} seconds");
|
LoggingHelpers.LogToConsole($"{totalDupeCount.ToString()} dupes were ignored. Took {LoggingHelpers.LogTimeTaken(stopwatch.Elapsed.TotalSeconds)} seconds");
|
||||||
|
|
||||||
return baseBots.ToList();
|
return baseBots.ToList();
|
||||||
}
|
}
|
||||||
@ -84,15 +84,14 @@ public static class BotParser
|
|||||||
|
|
||||||
int dupeCount = 0;
|
int dupeCount = 0;
|
||||||
|
|
||||||
List<Datum> bots = [];
|
List<Datum> bots = new List<Datum>();
|
||||||
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")
|
||||||
@ -101,10 +100,22 @@ public static class BotParser
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
var baseBot = baseBots.SingleOrDefault(bot => bot.botType.ToString().Equals(botData.Info.Settings.Role, StringComparison.OrdinalIgnoreCase));
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -121,7 +132,7 @@ public static class BotParser
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
Console.WriteLine($"File parse fucked up: {filePath}");
|
Console.WriteLine($"File parse fucked up: {filePath}");
|
||||||
throw;
|
throw;
|
||||||
@ -137,7 +148,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} bot dump files found");
|
LoggingHelpers.LogToConsole($"{botFiles.Length.ToString()} 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
|
||||||
@ -153,9 +164,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} 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];
|
return parsedBotsDict.Values.ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static async Task<int> ProcessBotFile(
|
private static async Task<int> ProcessBotFile(
|
||||||
@ -168,17 +179,27 @@ public static class BotParser
|
|||||||
|
|
||||||
int dupeCount = 0;
|
int dupeCount = 0;
|
||||||
|
|
||||||
List<Datum> bots = [];
|
List<Datum> bots = new List<Datum>();
|
||||||
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 deSerialisedObject = JsonSerializer.Deserialize<Root>(reader.ReadToEnd(), serialiserOptions);
|
var roleLower = botData.Info.Settings.Role.ToLower();
|
||||||
bots.AddRange(deSerialisedObject.data.Where(botData => botTypes.Contains(botData.Info.Settings.Role.ToLower())));
|
if (botTypesLower.Contains(roleLower))
|
||||||
|
{
|
||||||
|
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;
|
||||||
@ -235,8 +256,9 @@ public static class BotParser
|
|||||||
|
|
||||||
if (jItemsToReplace != null && jItemsToReplace.Any())
|
if (jItemsToReplace != null && jItemsToReplace.Any())
|
||||||
{
|
{
|
||||||
LoggingHelpers.LogToConsole($"file {fileName} has {jItemsToReplace.Count()} json issues, cleaning up.", ConsoleColor.Yellow);
|
LoggingHelpers.LogToConsole($"file {fileName} has {jItemsToReplace.Count().ToString()} json issues, cleaning up.", ConsoleColor.Yellow);
|
||||||
foreach (var item in jItemsToReplace)
|
var jItemsToReplaceList = jItemsToReplace.ToList();
|
||||||
|
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));
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
<TargetFramework>net9.0</TargetFramework>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<ServerGarbageCollection>true</ServerGarbageCollection>
|
<ServerGarbageCollection>true</ServerGarbageCollection>
|
||||||
<ConcurrentGarbageCollection>true</ConcurrentGarbageCollection>
|
<ConcurrentGarbageCollection>true</ConcurrentGarbageCollection>
|
||||||
|
@ -296,7 +296,13 @@ 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)
|
||||||
@ -341,6 +347,11 @@ 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);
|
||||||
|
|
||||||
@ -355,5 +366,13 @@ 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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,11 +2,11 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
<TargetFramework>net9.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user