Split pmc kill requirement for elimination into separate min/max counts from other bot types
This commit is contained in:
parent
c3777af231
commit
1cf63ad1ad
@ -131,7 +131,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"repeatableQuests": [{
|
"repeatableQuests": [{
|
||||||
"id": "615ffc701c97c768137e719b",
|
"id": "615ffc701c97c768137e719b",
|
||||||
"name": "Daily",
|
"name": "Daily",
|
||||||
"side": "Pmc",
|
"side": "Pmc",
|
||||||
"types": [
|
"types": [
|
||||||
@ -249,6 +249,8 @@
|
|||||||
"minKills": 2,
|
"minKills": 2,
|
||||||
"maxBossKills": 1,
|
"maxBossKills": 1,
|
||||||
"minBossKills": 1,
|
"minBossKills": 1,
|
||||||
|
"maxPmcKills": 2,
|
||||||
|
"minPmcKills": 1,
|
||||||
"weaponRequirementProb": 0,
|
"weaponRequirementProb": 0,
|
||||||
"weaponCategoryRequirementProb": 0.15,
|
"weaponCategoryRequirementProb": 0.15,
|
||||||
"weaponCategoryRequirements": [{
|
"weaponCategoryRequirements": [{
|
||||||
@ -334,7 +336,8 @@
|
|||||||
"key": "AnyPmc",
|
"key": "AnyPmc",
|
||||||
"relativeProbability": 2,
|
"relativeProbability": 2,
|
||||||
"data": {
|
"data": {
|
||||||
"isBoss": false
|
"isBoss": false,
|
||||||
|
"isPmc": true
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
"key": "bossBully",
|
"key": "bossBully",
|
||||||
@ -426,6 +429,8 @@
|
|||||||
"minKills": 5,
|
"minKills": 5,
|
||||||
"maxBossKills": 2,
|
"maxBossKills": 2,
|
||||||
"minBossKills": 1,
|
"minBossKills": 1,
|
||||||
|
"maxPmcKills": 5,
|
||||||
|
"minPmcKills": 2,
|
||||||
"weaponRequirementProb": 0,
|
"weaponRequirementProb": 0,
|
||||||
"weaponCategoryRequirementProb": 0.2,
|
"weaponCategoryRequirementProb": 0.2,
|
||||||
"weaponCategoryRequirements": [{
|
"weaponCategoryRequirements": [{
|
||||||
@ -497,8 +502,7 @@
|
|||||||
"data": ["5447b5e04bdc2d62278b4567"]
|
"data": ["5447b5e04bdc2d62278b4567"]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
}, {
|
||||||
{
|
|
||||||
"levelRange": {
|
"levelRange": {
|
||||||
"min": 41,
|
"min": 41,
|
||||||
"max": 100
|
"max": 100
|
||||||
@ -513,7 +517,8 @@
|
|||||||
"key": "AnyPmc",
|
"key": "AnyPmc",
|
||||||
"relativeProbability": 2,
|
"relativeProbability": 2,
|
||||||
"data": {
|
"data": {
|
||||||
"isBoss": false
|
"isBoss": false,
|
||||||
|
"isPmc": true
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
"key": "bossBully",
|
"key": "bossBully",
|
||||||
@ -605,6 +610,8 @@
|
|||||||
"minKills": 5,
|
"minKills": 5,
|
||||||
"maxBossKills": 4,
|
"maxBossKills": 4,
|
||||||
"minBossKills": 2,
|
"minBossKills": 2,
|
||||||
|
"maxPmcKills": 6,
|
||||||
|
"minPmcKills": 3,
|
||||||
"weaponRequirementProb": 0,
|
"weaponRequirementProb": 0,
|
||||||
"weaponCategoryRequirementProb": 0.3,
|
"weaponCategoryRequirementProb": 0.3,
|
||||||
"weaponCategoryRequirements": [{
|
"weaponCategoryRequirements": [{
|
||||||
@ -682,7 +689,7 @@
|
|||||||
"rewardBlacklist": ["627bce33f21bc425b06ab967"],
|
"rewardBlacklist": ["627bce33f21bc425b06ab967"],
|
||||||
"rewardAmmoStackMinSize": 20
|
"rewardAmmoStackMinSize": 20
|
||||||
}, {
|
}, {
|
||||||
"id": "618035d38012292db3081bf0",
|
"id": "618035d38012292db3081bf0",
|
||||||
"name": "Weekly",
|
"name": "Weekly",
|
||||||
"side": "Pmc",
|
"side": "Pmc",
|
||||||
"types": [
|
"types": [
|
||||||
@ -774,7 +781,8 @@
|
|||||||
"key": "AnyPmc",
|
"key": "AnyPmc",
|
||||||
"relativeProbability": 1,
|
"relativeProbability": 1,
|
||||||
"data": {
|
"data": {
|
||||||
"isBoss": false
|
"isBoss": false,
|
||||||
|
"isPmc": true
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
"key": "bossBully",
|
"key": "bossBully",
|
||||||
@ -863,9 +871,11 @@
|
|||||||
"maxDist": 75,
|
"maxDist": 75,
|
||||||
"minDist": 10,
|
"minDist": 10,
|
||||||
"maxKills": 20,
|
"maxKills": 20,
|
||||||
"minKills": 10,
|
"minKills": 8,
|
||||||
"maxBossKills": 7,
|
"maxBossKills": 7,
|
||||||
"minBossKills": 3,
|
"minBossKills": 3,
|
||||||
|
"maxPmcKills": 8,
|
||||||
|
"minPmcKills": 5,
|
||||||
"weaponRequirementProb": 0,
|
"weaponRequirementProb": 0,
|
||||||
"weaponCategoryRequirementProb": 0.2,
|
"weaponCategoryRequirementProb": 0.2,
|
||||||
"weaponCategoryRequirements": [{
|
"weaponCategoryRequirements": [{
|
||||||
@ -951,7 +961,8 @@
|
|||||||
"key": "AnyPmc",
|
"key": "AnyPmc",
|
||||||
"relativeProbability": 2,
|
"relativeProbability": 2,
|
||||||
"data": {
|
"data": {
|
||||||
"isBoss": false
|
"isBoss": false,
|
||||||
|
"isPmc": true
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
"key": "bossBully",
|
"key": "bossBully",
|
||||||
@ -1043,6 +1054,8 @@
|
|||||||
"minKills": 15,
|
"minKills": 15,
|
||||||
"maxBossKills": 30,
|
"maxBossKills": 30,
|
||||||
"minBossKills": 15,
|
"minBossKills": 15,
|
||||||
|
"maxPmcKills": 15,
|
||||||
|
"minPmcKills": 10,
|
||||||
"weaponRequirementProb": 0,
|
"weaponRequirementProb": 0,
|
||||||
"weaponCategoryRequirementProb": 0.25,
|
"weaponCategoryRequirementProb": 0.25,
|
||||||
"weaponCategoryRequirements": [{
|
"weaponCategoryRequirements": [{
|
||||||
@ -1128,7 +1141,8 @@
|
|||||||
"key": "AnyPmc",
|
"key": "AnyPmc",
|
||||||
"relativeProbability": 2,
|
"relativeProbability": 2,
|
||||||
"data": {
|
"data": {
|
||||||
"isBoss": false
|
"isBoss": false,
|
||||||
|
"isPmc": true
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
"key": "bossBully",
|
"key": "bossBully",
|
||||||
@ -1220,6 +1234,8 @@
|
|||||||
"minKills": 20,
|
"minKills": 20,
|
||||||
"maxBossKills": 20,
|
"maxBossKills": 20,
|
||||||
"minBossKills": 10,
|
"minBossKills": 10,
|
||||||
|
"maxPmcKills": 25,
|
||||||
|
"minPmcKills": 10,
|
||||||
"weaponRequirementProb": 0,
|
"weaponRequirementProb": 0,
|
||||||
"weaponCategoryRequirementProb": 0.3,
|
"weaponCategoryRequirementProb": 0.3,
|
||||||
"weaponCategoryRequirements": [{
|
"weaponCategoryRequirements": [{
|
||||||
@ -1297,17 +1313,17 @@
|
|||||||
"rewardBlacklist": ["627bce33f21bc425b06ab967"],
|
"rewardBlacklist": ["627bce33f21bc425b06ab967"],
|
||||||
"rewardAmmoStackMinSize": 15
|
"rewardAmmoStackMinSize": 15
|
||||||
}, {
|
}, {
|
||||||
"id": "62825ef60e88d037dc1eb426",
|
"id": "62825ef60e88d037dc1eb426",
|
||||||
"name": "Daily_Savage",
|
"name": "Daily_Savage",
|
||||||
"side": "Scav",
|
"side": "Scav",
|
||||||
"types": [
|
"types": [
|
||||||
"Exploration",
|
"Exploration",
|
||||||
"Elimination",
|
"Elimination",
|
||||||
"Completion",
|
"Completion",
|
||||||
"Pickup"
|
"Pickup"
|
||||||
],
|
],
|
||||||
"resetTime": 86400,
|
"resetTime": 86400,
|
||||||
"numQuests": 1,
|
"numQuests": 4,
|
||||||
"minPlayerLevel": 1,
|
"minPlayerLevel": 1,
|
||||||
"rewardScaling": {
|
"rewardScaling": {
|
||||||
"levels": [1, 20, 45, 100],
|
"levels": [1, 20, 45, 100],
|
||||||
@ -1347,22 +1363,52 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Pickup": {
|
"Pickup": {
|
||||||
"ItemTypeToFetchWithMaxCount": [
|
"ItemTypeToFetchWithMaxCount": [{
|
||||||
{"itemType": "5b47574386f77428ca22b335", "minPickupCount": 2, "maxPickupCount": 4},
|
"itemType": "5b47574386f77428ca22b335",
|
||||||
{"itemType": "5b47574386f77428ca22b336", "minPickupCount": 2, "maxPickupCount": 4},
|
"minPickupCount": 2,
|
||||||
{"itemType": "5b47574386f77428ca22b2ee", "minPickupCount": 2, "maxPickupCount": 3},
|
"maxPickupCount": 4
|
||||||
{"itemType": "5b47574386f77428ca22b2ef", "minPickupCount": 1, "maxPickupCount": 2},
|
}, {
|
||||||
{"itemType": "5b47574386f77428ca22b33a", "minPickupCount": 1, "maxPickupCount": 2},
|
"itemType": "5b47574386f77428ca22b336",
|
||||||
{"itemType": "5b5f701386f774093f2ecf0f", "minPickupCount": 1, "maxPickupCount": 2},
|
"minPickupCount": 2,
|
||||||
{"itemType": "5b5f754a86f774094242f19b", "minPickupCount": 1, "maxPickupCount": 3},
|
"maxPickupCount": 4
|
||||||
{"itemType": "5b5f75c686f774094242f19f", "minPickupCount": 1, "maxPickupCount": 2},
|
}, {
|
||||||
{"itemType": "5b5f792486f77447ed5636b3", "minPickupCount": 1, "maxPickupCount": 2},
|
"itemType": "5b47574386f77428ca22b2ee",
|
||||||
{"itemType": "5b5f73ab86f774094242f195", "minPickupCount": 1, "maxPickupCount": 2}
|
"minPickupCount": 2,
|
||||||
],
|
"maxPickupCount": 3
|
||||||
"ItemTypesToFetch": ["5b47574386f77428ca22b335", "5b47574386f77428ca22b336", "5b47574386f77428ca22b2ee"],
|
}, {
|
||||||
"maxItemFetchCount": 3
|
"itemType": "5b47574386f77428ca22b2ef",
|
||||||
},
|
"minPickupCount": 1,
|
||||||
|
"maxPickupCount": 2
|
||||||
|
}, {
|
||||||
|
"itemType": "5b47574386f77428ca22b33a",
|
||||||
|
"minPickupCount": 1,
|
||||||
|
"maxPickupCount": 2
|
||||||
|
}, {
|
||||||
|
"itemType": "5b5f701386f774093f2ecf0f",
|
||||||
|
"minPickupCount": 1,
|
||||||
|
"maxPickupCount": 2
|
||||||
|
}, {
|
||||||
|
"itemType": "5b5f754a86f774094242f19b",
|
||||||
|
"minPickupCount": 1,
|
||||||
|
"maxPickupCount": 3
|
||||||
|
}, {
|
||||||
|
"itemType": "5b5f75c686f774094242f19f",
|
||||||
|
"minPickupCount": 1,
|
||||||
|
"maxPickupCount": 2
|
||||||
|
}, {
|
||||||
|
"itemType": "5b5f792486f77447ed5636b3",
|
||||||
|
"minPickupCount": 1,
|
||||||
|
"maxPickupCount": 2
|
||||||
|
}, {
|
||||||
|
"itemType": "5b5f73ab86f774094242f195",
|
||||||
|
"minPickupCount": 1,
|
||||||
|
"maxPickupCount": 2
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"ItemTypesToFetch": ["5b47574386f77428ca22b335", "5b47574386f77428ca22b336", "5b47574386f77428ca22b2ee"],
|
||||||
|
"maxItemFetchCount": 3
|
||||||
|
},
|
||||||
"Completion": {
|
"Completion": {
|
||||||
"minRequestedAmount": 1,
|
"minRequestedAmount": 1,
|
||||||
"maxRequestedAmount": 5,
|
"maxRequestedAmount": 5,
|
||||||
@ -1381,7 +1427,8 @@
|
|||||||
"key": "AnyPmc",
|
"key": "AnyPmc",
|
||||||
"relativeProbability": 1,
|
"relativeProbability": 1,
|
||||||
"data": {
|
"data": {
|
||||||
"isBoss": false
|
"isBoss": false,
|
||||||
|
"isPmc": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@ -1493,7 +1540,8 @@
|
|||||||
"key": "AnyPmc",
|
"key": "AnyPmc",
|
||||||
"relativeProbability": 1,
|
"relativeProbability": 1,
|
||||||
"data": {
|
"data": {
|
||||||
"isBoss": false
|
"isBoss": false,
|
||||||
|
"isPmc": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@ -1521,7 +1569,7 @@
|
|||||||
"distProb": 0.25,
|
"distProb": 0.25,
|
||||||
"maxDist": 75,
|
"maxDist": 75,
|
||||||
"minDist": 10,
|
"minDist": 10,
|
||||||
"maxKills": 15,
|
"maxKills": 9,
|
||||||
"minKills": 3,
|
"minKills": 3,
|
||||||
"maxBossKills": 3,
|
"maxBossKills": 3,
|
||||||
"minBossKills": 1,
|
"minBossKills": 1,
|
||||||
|
@ -24,7 +24,7 @@ import { BaseClasses } from "@spt-aki/models/enums/BaseClasses";
|
|||||||
import { ConfigTypes } from "@spt-aki/models/enums/ConfigTypes";
|
import { ConfigTypes } from "@spt-aki/models/enums/ConfigTypes";
|
||||||
import { Money } from "@spt-aki/models/enums/Money";
|
import { Money } from "@spt-aki/models/enums/Money";
|
||||||
import { Traders } from "@spt-aki/models/enums/Traders";
|
import { Traders } from "@spt-aki/models/enums/Traders";
|
||||||
import { IQuestConfig, IRepeatableQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig";
|
import { IBossInfo, IEliminationConfig, IQuestConfig, IRepeatableQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig";
|
||||||
import { IQuestTypePool } from "@spt-aki/models/spt/repeatable/IQuestTypePool";
|
import { IQuestTypePool } from "@spt-aki/models/spt/repeatable/IQuestTypePool";
|
||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder";
|
import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder";
|
||||||
@ -38,7 +38,7 @@ import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
|||||||
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
||||||
import { MathUtil } from "@spt-aki/utils/MathUtil";
|
import { MathUtil } from "@spt-aki/utils/MathUtil";
|
||||||
import { ObjectId } from "@spt-aki/utils/ObjectId";
|
import { ObjectId } from "@spt-aki/utils/ObjectId";
|
||||||
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
import { ProbabilityObjectArray, RandomUtil } from "@spt-aki/utils/RandomUtil";
|
||||||
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
||||||
|
|
||||||
@injectable()
|
@injectable()
|
||||||
@ -285,10 +285,8 @@ export class RepeatableQuestGenerator
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Draw how many npm kills are required
|
// Draw how many npm kills are required
|
||||||
const kills = (targetsConfig.data(targetKey).isBoss)
|
const desiredKillCount = this.getEliminationKillCount(targetKey, targetsConfig, eliminationConfig);
|
||||||
? this.randomUtil.randInt(eliminationConfig.minBossKills, eliminationConfig.maxBossKills + 1)
|
const killDifficulty = desiredKillCount;
|
||||||
: this.randomUtil.randInt(eliminationConfig.minKills, eliminationConfig.maxKills + 1);
|
|
||||||
const killDifficulty = kills;
|
|
||||||
|
|
||||||
// not perfectly happy here; we give difficulty = 1 to the quest reward generation when we have the most diffucult mission
|
// not perfectly happy here; we give difficulty = 1 to the quest reward generation when we have the most diffucult mission
|
||||||
// e.g. killing reshala 5 times from a distance of 200m with a headshot.
|
// e.g. killing reshala 5 times from a distance of 200m with a headshot.
|
||||||
@ -322,7 +320,7 @@ export class RepeatableQuestGenerator
|
|||||||
availableForFinishCondition._props.counter.conditions.push(this.generateEliminationLocation(locationsConfig[locationKey], allowedWeapon, allowedWeaponsCategory));
|
availableForFinishCondition._props.counter.conditions.push(this.generateEliminationLocation(locationsConfig[locationKey], allowedWeapon, allowedWeaponsCategory));
|
||||||
}
|
}
|
||||||
availableForFinishCondition._props.counter.conditions.push(this.generateEliminationCondition(targetKey, bodyPartsToClient, distance, allowedWeapon, allowedWeaponsCategory));
|
availableForFinishCondition._props.counter.conditions.push(this.generateEliminationCondition(targetKey, bodyPartsToClient, distance, allowedWeapon, allowedWeaponsCategory));
|
||||||
availableForFinishCondition._props.value = kills;
|
availableForFinishCondition._props.value = desiredKillCount;
|
||||||
availableForFinishCondition._props.id = this.objectId.generate();
|
availableForFinishCondition._props.id = this.objectId.generate();
|
||||||
quest.location = this.getQuestLocationByMapId(locationKey);
|
quest.location = this.getQuestLocationByMapId(locationKey);
|
||||||
|
|
||||||
@ -331,6 +329,28 @@ export class RepeatableQuestGenerator
|
|||||||
return quest;
|
return quest;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get a number of kills neded to complete elimination quest
|
||||||
|
* @param targetKey Target type desired e.g. anyPmc/bossBully/Savage
|
||||||
|
* @param targetsConfig Config
|
||||||
|
* @param eliminationConfig Config
|
||||||
|
* @returns Number of AI to kill
|
||||||
|
*/
|
||||||
|
getEliminationKillCount(targetKey: string, targetsConfig: ProbabilityObjectArray<string, IBossInfo>, eliminationConfig: IEliminationConfig): number
|
||||||
|
{
|
||||||
|
if (targetsConfig.data(targetKey).isBoss)
|
||||||
|
{
|
||||||
|
return this.randomUtil.randInt(eliminationConfig.minBossKills, eliminationConfig.maxBossKills + 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (targetsConfig.data(targetKey).isPmc)
|
||||||
|
{
|
||||||
|
return this.randomUtil.randInt(eliminationConfig.minBossKills, eliminationConfig.maxBossKills + 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.randomUtil.randInt(eliminationConfig.minKills, eliminationConfig.maxKills + 1);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A repeatable quest, besides some more or less static components, exists of reward and condition (see assets/database/templates/repeatableQuests.json)
|
* A repeatable quest, besides some more or less static components, exists of reward and condition (see assets/database/templates/repeatableQuests.json)
|
||||||
* This is a helper method for GenerateEliminationQuest to create a location condition.
|
* This is a helper method for GenerateEliminationQuest to create a location condition.
|
||||||
|
@ -133,6 +133,8 @@ export interface IEliminationConfig
|
|||||||
minKills: number
|
minKills: number
|
||||||
minBossKills: number
|
minBossKills: number
|
||||||
maxBossKills: number
|
maxBossKills: number
|
||||||
|
minPmcKills: number
|
||||||
|
maxPmcKills: number
|
||||||
weaponCategoryRequirementProb: number
|
weaponCategoryRequirementProb: number
|
||||||
weaponCategoryRequirements: IWeaponRequirement[]
|
weaponCategoryRequirements: IWeaponRequirement[]
|
||||||
weaponRequirementProb: number
|
weaponRequirementProb: number
|
||||||
@ -147,6 +149,7 @@ export interface ITarget extends IProbabilityObject
|
|||||||
export interface IBossInfo
|
export interface IBossInfo
|
||||||
{
|
{
|
||||||
isBoss: boolean
|
isBoss: boolean
|
||||||
|
isPmc: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IBodyPart extends IProbabilityObject
|
export interface IBodyPart extends IProbabilityObject
|
||||||
|
Loading…
Reference in New Issue
Block a user