Merge branch 'master' of https://dev.sp-tarkov.com/SPT-AKI/Server into 3.8.0
This commit is contained in:
commit
24894643de
@ -436,7 +436,8 @@
|
||||
"faceShieldIsActiveChancePercent": 100,
|
||||
"lightIsActiveDayChancePercent": 25,
|
||||
"lightIsActiveNightChancePercent": 75,
|
||||
"laserIsActiveChancePercent": 75
|
||||
"laserIsActiveChancePercent": 75,
|
||||
"forceStock": true
|
||||
},
|
||||
"bossgluhar": {
|
||||
"nvgIsActiveChanceDayPercent": 10,
|
||||
@ -444,13 +445,15 @@
|
||||
"faceShieldIsActiveChancePercent": 100,
|
||||
"lightIsActiveDayChancePercent": 45,
|
||||
"lightIsActiveNightChancePercent": 95,
|
||||
"laserIsActiveChancePercent": 95
|
||||
"laserIsActiveChancePercent": 95,
|
||||
"forceStock": true
|
||||
},
|
||||
"bosskilla": {
|
||||
"faceShieldIsActiveChancePercent": 100,
|
||||
"lightIsActiveDayChancePercent": 35,
|
||||
"lightIsActiveNightChancePercent": 85,
|
||||
"laserIsActiveChancePercent": 85
|
||||
"laserIsActiveChancePercent": 85,
|
||||
"forceStock": true
|
||||
},
|
||||
"bosskojaniy": {
|
||||
"faceShieldIsActiveChancePercent": 100,
|
||||
@ -472,7 +475,8 @@
|
||||
"faceShieldIsActiveChancePercent": 100,
|
||||
"lightIsActiveDayChancePercent": 25,
|
||||
"lightIsActiveNightChancePercent": 75,
|
||||
"laserIsActiveChancePercent": 75
|
||||
"laserIsActiveChancePercent": 75,
|
||||
"forceStock": true
|
||||
},
|
||||
"bossknight": {
|
||||
"nvgIsActiveChanceDayPercent": 10,
|
||||
@ -480,21 +484,24 @@
|
||||
"faceShieldIsActiveChancePercent": 100,
|
||||
"lightIsActiveDayChancePercent": 25,
|
||||
"lightIsActiveNightChancePercent": 75,
|
||||
"laserIsActiveChancePercent": 75
|
||||
"laserIsActiveChancePercent": 75,
|
||||
"forceStock": true
|
||||
},
|
||||
"bosszryachiy": {
|
||||
"nvgIsActiveChanceDayPercent": 10,
|
||||
"nvgIsActiveChanceNightPercent": 90,
|
||||
"lightIsActiveDayChancePercent": 25,
|
||||
"lightIsActiveNightChancePercent": 85,
|
||||
"laserIsActiveChancePercent": 85
|
||||
"laserIsActiveChancePercent": 85,
|
||||
"forceStock": true
|
||||
},
|
||||
"bossboar": {
|
||||
"nvgIsActiveChanceDayPercent": 10,
|
||||
"nvgIsActiveChanceNightPercent": 90,
|
||||
"lightIsActiveDayChancePercent": 25,
|
||||
"lightIsActiveNightChancePercent": 85,
|
||||
"laserIsActiveChancePercent": 85
|
||||
"laserIsActiveChancePercent": 85,
|
||||
"forceStock": true
|
||||
},
|
||||
"bosstest": {},
|
||||
"followerbully": {
|
||||
@ -551,6 +558,7 @@
|
||||
"lightIsActiveDayChancePercent": 25,
|
||||
"lightIsActiveNightChancePercent": 75,
|
||||
"laserIsActiveChancePercent": 75,
|
||||
"forceStock": true,
|
||||
"weaponModLimits": {
|
||||
"scopeLimit": 1,
|
||||
"lightLaserLimit": 1
|
||||
@ -562,7 +570,8 @@
|
||||
"faceShieldIsActiveChancePercent": 100,
|
||||
"lightIsActiveDayChancePercent": 25,
|
||||
"lightIsActiveNightChancePercent": 75,
|
||||
"laserIsActiveChancePercent": 75
|
||||
"laserIsActiveChancePercent": 75,
|
||||
"forceStock": true
|
||||
},
|
||||
"followerzryachiy": {
|
||||
"nvgIsActiveChanceDayPercent": 10,
|
||||
@ -590,6 +599,7 @@
|
||||
"lightIsActiveDayChancePercent": 25,
|
||||
"lightIsActiveNightChancePercent": 75,
|
||||
"laserIsActiveChancePercent": 75,
|
||||
"forceStock": true,
|
||||
"weaponModLimits": {
|
||||
"scopeLimit": 2,
|
||||
"lightLaserLimit": 1
|
||||
@ -620,6 +630,7 @@
|
||||
"lightIsActiveDayChancePercent": 35,
|
||||
"lightIsActiveNightChancePercent": 95,
|
||||
"laserIsActiveChancePercent": 95,
|
||||
"forceStock": true,
|
||||
"weaponModLimits": {
|
||||
"scopeLimit": 1,
|
||||
"lightLaserLimit": 1
|
||||
@ -784,7 +795,7 @@
|
||||
"Backpack": 35,
|
||||
"FaceCover": 5
|
||||
},
|
||||
"randomisedWeaponModSlots": [],
|
||||
"randomisedWeaponModSlots": [],
|
||||
"mods": {
|
||||
"mod_barrel": 20,
|
||||
"mod_bipod": 10,
|
||||
@ -860,8 +871,7 @@
|
||||
"mod_reciever": ["5d4405aaa4b9361e6a4e6bd3"],
|
||||
"mod_stock": ["5cde739cd7f00c0010373bd3"],
|
||||
"mod_rear_sight": ["5a0ed824fcdbcb0176308b0d"],
|
||||
"mod_front_sight": ["5a0f096dfcdbcb0176308b15"],
|
||||
"mod_magazine": ["6241c2c2117ad530666a5108"]
|
||||
"mod_front_sight": ["5a0f096dfcdbcb0176308b15"]
|
||||
},
|
||||
"cartridge": {
|
||||
"Caliber23x75": ["5e85a9f4add9fe03027d9bf1"],
|
||||
|
@ -275,7 +275,7 @@
|
||||
"pmcresponse-victim_positive_12": "Good kill, I'll get you next time",
|
||||
"pmcresponse-victim_positive_13": "You had good angles on me",
|
||||
"pmcresponse-victim_positive_14": "I'll get you next time",
|
||||
"pmcresponse-victim_positive_15": "You really binted my bingos",
|
||||
"pmcresponse-victim_positive_15": "You really binted my bogos :alien:",
|
||||
"pmcresponse-victim_positive_16": "You're a stone-cold killer. I didn't stand a chance",
|
||||
"pmcresponse-victim_positive_17": "Alright fair that was a good shot",
|
||||
"pmcresponse-victim_positive_18": "Enjoy my loot",
|
||||
|
@ -273,11 +273,13 @@ export class BotEquipmentModGenerator
|
||||
modSpawnChances.mod_handguard = 100;
|
||||
}
|
||||
|
||||
// If stock mod can take a sub stock mod, force spawn chance to be 100% to ensure stock gets added
|
||||
if (modSlot === "mod_stock" && modToAddTemplate._props.Slots.find(x => x._name.includes("mod_stock")))
|
||||
// If stock mod can take a sub stock mod, force spawn chance to be 100% to ensure sub-stock gets added
|
||||
// Or if mod_stock is configured to be forced on
|
||||
if (modSlot === "mod_stock" && (modToAddTemplate._props.Slots.find(x => x._name.includes("mod_stock") || botEquipConfig.forceStock)))
|
||||
{
|
||||
// Stock mod can take additional stocks, could be a locking device, force 100% chance
|
||||
modSpawnChances.mod_stock = 100;
|
||||
const stockSlots = ["mod_stock", "mod_stock_000", "mod_stock_akms"];
|
||||
this.adjustSlotSpawnChances(modSpawnChances, stockSlots, 100);
|
||||
}
|
||||
|
||||
const modId = this.hashUtil.generate();
|
||||
|
@ -333,7 +333,7 @@ export class BotLootGenerator
|
||||
{
|
||||
this.itemHelper.addCartridgesToAmmoBox(itemsToAdd, itemToAddTemplate);
|
||||
}
|
||||
// make money a stack
|
||||
// Make money a stack
|
||||
else if (this.itemHelper.isOfBaseclass(itemToAddTemplate._id, BaseClasses.MONEY))
|
||||
{
|
||||
this.randomiseMoneyStackSize(isPmc, itemToAddTemplate, itemsToAdd[0]);
|
||||
@ -374,14 +374,13 @@ export class BotLootGenerator
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Add generated weapons to inventory as loot
|
||||
* @param botInventory inventory to add preset to
|
||||
* @param equipmentSlot slot to place the preset in (backpack)
|
||||
* @param templateInventory bots template, assault.json
|
||||
* @param modChances chances for mods to spawn on weapon
|
||||
* @param botRole bots role, .e.g. pmcBot
|
||||
* @param botRole bots role .e.g. pmcBot
|
||||
* @param isPmc are we generating for a pmc
|
||||
*/
|
||||
protected addLooseWeaponsToInventorySlot(sessionId: string, botInventory: PmcInventory, equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, botRole: string, isPmc: boolean, botLevel: number): void
|
||||
@ -498,42 +497,45 @@ export class BotLootGenerator
|
||||
|
||||
/**
|
||||
* Randomise the stack size of a money object, uses different values for pmc or scavs
|
||||
* @param isPmc is this a PMC
|
||||
* @param itemTemplate item details
|
||||
* @param moneyItem Money stack to randomise
|
||||
* @param isPmc Is money on a PMC bot
|
||||
* @param itemTemplate item details from db
|
||||
* @param moneyItem Money item to randomise
|
||||
*/
|
||||
protected randomiseMoneyStackSize(isPmc: boolean, itemTemplate: ITemplateItem, moneyItem: Item): void
|
||||
{
|
||||
// Only add if no upd or stack objects exist - preserves existing stack count
|
||||
if (!moneyItem.upd?.StackObjectsCount)
|
||||
{
|
||||
// PMCs have a different stack max size
|
||||
const minStackSize = itemTemplate._props.StackMinRandom;
|
||||
const maxStackSize = (isPmc)
|
||||
? this.pmcConfig.dynamicLoot.moneyStackLimits[itemTemplate._id]
|
||||
: itemTemplate._props.StackMaxRandom;
|
||||
// PMCs have a different stack max size
|
||||
const minStackSize = itemTemplate._props.StackMinRandom;
|
||||
const maxStackSize = (isPmc)
|
||||
? this.pmcConfig.dynamicLoot.moneyStackLimits[itemTemplate._id]
|
||||
: itemTemplate._props.StackMaxRandom;
|
||||
const randomSize = this.randomUtil.getInt(minStackSize, maxStackSize);
|
||||
|
||||
moneyItem.upd = { "StackObjectsCount": this.randomUtil.getInt(minStackSize, maxStackSize) };
|
||||
if (!moneyItem.upd)
|
||||
{
|
||||
moneyItem.upd = {};
|
||||
}
|
||||
|
||||
moneyItem.upd.StackObjectsCount = randomSize;
|
||||
}
|
||||
|
||||
/**
|
||||
* Randomise the size of an ammo stack
|
||||
* @param isPmc is this a PMC
|
||||
* @param itemTemplate item details
|
||||
* @param ammoItem Ammo stack to randomise
|
||||
* @param isPmc Is ammo on a PMC bot
|
||||
* @param itemTemplate item details from db
|
||||
* @param ammoItem Ammo item to randomise
|
||||
*/
|
||||
protected randomiseAmmoStackSize(isPmc: boolean, itemTemplate: ITemplateItem, ammoItem: Item): void
|
||||
{
|
||||
// only add if no upd or stack objects exist - preserves existing stack count
|
||||
if (!ammoItem.upd?.StackObjectsCount)
|
||||
{
|
||||
const randomSize = itemTemplate._props.StackMaxSize === 1
|
||||
? 1
|
||||
: this.randomUtil.getInt(itemTemplate._props.StackMinRandom, itemTemplate._props.StackMaxRandom);
|
||||
const randomSize = itemTemplate._props.StackMaxSize === 1
|
||||
? 1
|
||||
: this.randomUtil.getInt(itemTemplate._props.StackMinRandom, itemTemplate._props.StackMaxRandom);
|
||||
|
||||
ammoItem.upd = { StackObjectsCount: randomSize };
|
||||
if (!ammoItem.upd)
|
||||
{
|
||||
ammoItem.upd = {};
|
||||
}
|
||||
|
||||
ammoItem.upd.StackObjectsCount = randomSize ;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -115,7 +115,7 @@ class ItemHelper
|
||||
return handbookPrice;
|
||||
}
|
||||
|
||||
const dynamicPrice = this.getDynamicItemPrice[tpl];
|
||||
const dynamicPrice = this.getDynamicItemPrice(tpl);
|
||||
if (dynamicPrice)
|
||||
{
|
||||
return dynamicPrice;
|
||||
|
@ -112,6 +112,8 @@ export interface EquipmentFilters
|
||||
weightingAdjustmentsByBotLevel: WeightingAdjustmentDetails[]
|
||||
/** Same as weightingAdjustments but based on player level instead of bot level */
|
||||
weightingAdjustmentsByPlayerLevel?: WeightingAdjustmentDetails[]
|
||||
/** Should the stock mod be forced to spawn on bot */
|
||||
forceStock: boolean
|
||||
}
|
||||
|
||||
export interface ModLimits
|
||||
|
Loading…
Reference in New Issue
Block a user