Localized various warning messages

This commit is contained in:
Dev 2024-05-21 14:28:52 +01:00
parent 139b139581
commit a48e130f1b
10 changed files with 70 additions and 35 deletions

View File

@ -7,6 +7,7 @@
"baseclass-missing_db_no_cache": "Database was empty, unable to generate an item base cache",
"bleeding_edge_build": "BLEEDINGEDGE",
"bot-bot-cache_has_zero_bots_of_requested_type": "WARNING - Bot cache does not have a pre-generated bot of type %s, will need to be generated, configure server to make more",
"bot-bot_preset_count_value_missing": "Unable to find a preset count to generate for bot: %s, defaulting to 30",
"bot-compatibility_check_missing_props": "Unable to validate item: {{id}} {{name}} in slot: {{slot}} can be equipped, it is missing a _props value",
"bot-generation_failed": "bot generation failed see server log for further details",
"bot-incompatible_ammo_for_weapon_falling_back_to_default": "Incompatible ammo {{chosenAmmo}} was found for {{weaponId}} - {{weaponName}}, falling back to default: {{defaultAmmo}}",
@ -63,8 +64,10 @@
"dialogue-unable_to_find_in_profile": "No dialog in profile: {{sessionId}} found with id: {{dialogueId}}",
"event-unhandled_event": "[UNHANDLED EVENT] %s",
"executing_startup_callbacks": "Server: executing startup callbacks...",
"fence-ammo_not_found_in_db": "Ammo: %s is not a valid item",
"fence-unable_to_find_assort_by_id": "Unable to find fence assort for id: %s",
"fence-unable_to_find_offer_by_id": "Unable to find offer with id: %s",
"fence-unable_to_get_ammo_penetration_value": "No penetration value found for Ammo: %s, Unable to check if its above penetration limit, assuming false",
"fixer-clothing_item_found": "Clothing item: %s found in profile that does not exist in SPT. You WILL experience errors, this can be due to using a clothing mod and removing the mod with your character still wearing it. DO NOT USE THIS PROFILE. Open Aki_Data\\Server\\configs\\core.json, edit 'removeModItemsFromProfile' to be true. This will allow the server to edit your profile and hopefully remove the missing clothing",
"fixer-mod_item_found": "Item: %s found in profile that does not exist in items db. You WILL experience errors, this can be due to using an items mod and removing the mod without deleting the modded items from your inventory. DO NOT USE THIS PROFILE. Open Aki_Data\\Server\\configs\\core.json, edit 'removeModItemsFromProfile' to be true. This will allow the server to edit your profile and hopefully remove the bad items",
"fixer-trader_found": "Trader: %s found in profile that does not exist in SPT. You WILL experience errors, this can be due to using an trader mod and removing the mod without deleting the messages from said trader. DO NOT USE THIS PROFILE. Open Aki_Data\\Server\\configs\\core.json, edit 'removeModItemsFromProfile' to be true. This will allow the server to edit your profile and hopefully remove the bad messages",
@ -94,6 +97,7 @@
"inraid-taskconditioncounter_keys_differ": "TaskConditionCounters: {{key}} value is different post raid, original: ${oldValue} new: ${newValue}",
"inraid-unable_to_deliver_item_no_trader_found": "Unable to deliver items as trader %s has no dialogue data",
"inraid-unable_to_find_key_in_taskconditioncounters": "Unable to find key: %s in TaskConditionCounters pre-raid data",
"inraid-unable_to_migrate_pmc_quest_not_found_in_profile": "Unable to migrate post-raid quest: %s data to profile, cannot find quest in profile",
"insurance-missing_insurance_price_multiplier": "No insurance multiplier found for trader: %s, check it exists in InsuranceConfig.js, falling back to default value of: 0.3",
"inventory-edit_trader_item": "Unable to edit a traders item",
"inventory-examine_item_does_not_exist": "examineItem() - No id with %s found",
@ -113,6 +117,9 @@
"inventory-unable_to_find_item_to_swap": "Unable to find item: {{item1Id}} to swap positions with: {{item2Id}}",
"inventory-unable_to_find_stash": "No stash found",
"inventory-unable_to_fit_item_into_inventory": "Unable to fit item into inventory: %s",
"inventory-unable_to_fold_item_not_found_in_inventory": "Unable to fold item with id: %s. It could not be found in players inventory",
"inventory-unable_to_inspect_item_not_in_db": "Unable to inspect item: %s as it cannot be found in the items DB",
"inventory-unable_to_sort_inventory_restart_game": "Unable to find inventory item: %s to auto-sort, YOU MUST RELOAD YOUR GAME IMMEDIATELY TO AVOID CORRUPTING YOUR PROFILE",
"inventory-unable_to_toggle_item_not_found": "Unable to toggle inventory item with id: %s, item not found",
"item-durability_value_invalid_use_default": "getRepairableItemQualityValue() weapon tpl: %s durability value is invalid, defaulting to 1",
"launcher-missing_property": "Profile: %s is missing a descriptionLocaleKey property",
@ -129,18 +136,25 @@
"location-critical_error_see_log": "A critical error occurred when generating loot, see server log for details",
"location-dynamic_items_spawned_success": "A total of %s dynamic items spawned",
"location-generated_success": "Generated location %s",
"location-loot_pool_is_empty_skipping": "The loot pool for postion id: %s had 0 items, skipping loot for this poistion",
"location-map_has_no_loose_loot_data": "Map: %s has no loose loot data, skipping",
"location-missing_dynamic_template": "Chosen dynamic spawnpoint %s has no template, skipping",
"location-missing_item_distribution_data": "Container with id: %s is missing item distribution data",
"location-missing_root_item": "createItem() failed, root item is null, tpl: {{tpl}}, parentId: {{parentId}}",
"location-preset_not_found": "preset not found for {{tpl}}, defaultPreset: {{defaultId}} name: {{defaultName}}, parentId: {{parentId}}",
"location-spawn_point_count_requested_vs_found": "{{requested}} spawnpoints were requested while {{found}} are available {{mapName}}",
"location-spawnpoint_missing_items": "Chosen dynamic spawnpoint %s has no items, skipping",
"location-unable_to_add_custom_loot_position": "Unable to add custom loot positions to map: %s, skipping",
"location-unable_to_adjust_loot_position_on_map": "Unable to apply custom loot position changes to: {{lootKey}} on map: {{mapId}} as it cannot be found, skipping",
"location-unable_to_find_airdrop_drop_config_of_type": "Unable to find airdrop config settings for type: %s, falling back to drop type: mixed ",
"location-unable_to_find_container_in_statics_json": "Container: %s not found in statics.json",
"location-unable_to_find_forced_static_data_for_map": "Unable to find forced static data for map: %s",
"location-unable_to_find_static_container_for_map": "Unable to find static container data for map: %s",
"location-unable_to_find_static_weapon_for_map": "Unable to find static weapon data for map: %s",
"location-unable_to_fix_broken_waves_missing_base": "%s lacks a base json, skipping map wave fixes",
"location-unable_to_generate_static_loot": "Unable to generate container loot for map: %s as it lacks any static container data",
"location-unable_to_reparent_item": "createItem() failed, unable to re-parent {{tpl}}, parentId: {{parentId}}",
"loot-default_preset_not_found_using_random": "Default preset for weapon: %s not found, choosing random of same weapon type instead",
"loot-item_missing_parentid": "Item: %s lacks a parentId value, unable to use item as loot",
"loot-non_item_picked_as_sealed_weapon_crate_reward": "Invalid weapon: %s, was picked as reward for sealed weapon crate, unable to create loot",
"mail-unable_to_give_gift_not_handled": "Unable to give player gift, reward: %s not handled by server",
@ -532,6 +546,7 @@
"quest-unable_to_find_compare_condition": "Unrecognised Comparison Method: %s",
"quest-unable_to_find_matching_hideout_production": "Unable to find matching hideout craft unlock for quest: {{questName}}, matches found: {{matchCount}}",
"quest-unable_to_find_quest_in_db": "Quest id: {{questId}} with type: {{questType}} not found in database",
"quest-unable_to_find_quest_in_db_no_quest_rewards": "Unable to find quest: %s in db, unable to give quest rewards to player",
"quest-unable_to_find_trader_in_profile": "Unable to find trader: %s in profile",
"ragfair-invalid_player_offer_request": "Unable to place offer, request is invalid",
"ragfair-missing_barter_scheme": "generateFleaOffersForTrader() Failed to find barterScheme for item id: {{itemId}} tpl: {{tpl}} on {{name}}",
@ -609,6 +624,8 @@
"server_start_success": "Happy playing",
"started_webserver_success": "Started webserver at %s",
"trader-missing_durability_threshold_value": "Unable to find durability threshold value for trader: {{traderId}}, falling back to default of: {{value}}",
"trader-missing_repair_property_using_default": "Trader {{traderId}} {{nickname}} is missing a repair object, adding in default values",
"trader-missing_repair_quality_property_using_default": "Trader: {{traderId}} {{nickname}} is missing a repair quality property, adding in default value",
"trader-missing_trader_details_using_default_refresh_time": "Trader: {{traderId}} not found, generating temp entry with default refresh time of: {{updateTime}}",
"trader-price_multipler_is_zero_use_default": "traderPriceMultipler was 0, this is invalid, setting to 0.01",
"trader-unable_to_delete_stale_purchases": "Unable to process trader purchases in profile: {{profileId}} as trader: {{traderId}} cannot be found, skipping",

View File

@ -65,10 +65,11 @@ export class BotController
if (!value)
{
this.logger.warning(`No value found for bot type ${type}, defaulting to 30`);
this.logger.warning(this.localisationService.getText("bot-bot_preset_count_value_missing", type));
return 30;
}
return value;
}

View File

@ -318,9 +318,8 @@ export class GameController
const trader = this.databaseServer.getTables().traders[traderKey];
if (!trader?.base?.repair)
{
this.logger.warning(
`Trader ${trader.base._id} ${trader.base.nickname} is missing a repair object, adding in default values`,
);
this.logger.warning(this.localisationService.getText("trader-missing_repair_property_using_default",
{ traderId: trader.base._id, nickname: trader.base.nickname }));
trader.base.repair = this.cloner.clone(this.databaseServer.getTables().traders.ragfair.base.repair);
return;
@ -328,9 +327,8 @@ export class GameController
if (trader.base.repair?.quality === undefined)
{
this.logger.warning(
`Trader ${trader.base._id} ${trader.base.nickname} is missing a repair quality value, adding in default value`,
);
this.logger.warning(this.localisationService.getText("trader-missing_repair_quality_property_using_default",
{ traderId: trader.base._id, nickname: trader.base.nickname }));
trader.base.repair.quality = this.cloner.clone(
this.databaseServer.getTables().traders.ragfair.base.repair.quality,
);
@ -346,15 +344,19 @@ export class GameController
{
if (!mapId)
{
this.logger.warning(`Unable to add loot positions to map: ${mapId}, skipping`);
this.logger.warning(this.localisationService.getText("location-unable_to_add_custom_loot_position", mapId));
continue;
}
const mapLooseLoot: ILooseLoot = this.databaseServer.getTables().locations[mapId]?.looseLoot;
if (!mapLooseLoot)
{
this.logger.warning(`Map: ${mapId} has no loose loot data, skipping`);
this.logger.warning(this.localisationService.getText("location-map_has_no_loose_loot_data", mapId));
continue;
}
const positionsToAdd = looseLootPositionsToAdd[mapId];
for (const positionToAdd of positionsToAdd)
{
@ -362,6 +364,7 @@ export class GameController
const existingLootPosition = mapLooseLoot.spawnpoints.find(
(x) => x.template.Id === positionToAdd.template.Id,
);
if (existingLootPosition)
{
existingLootPosition.template.Items.push(...positionToAdd.template.Items);
@ -384,16 +387,19 @@ export class GameController
const mapLooseLootData: ILooseLoot = this.databaseServer.getTables().locations[mapId]?.looseLoot;
if (!mapLooseLootData)
{
this.logger.warning(`Unable to adjust loot positions on map: ${mapId}`);
this.logger.warning(this.localisationService.getText("location-map_has_no_loose_loot_data", mapId));
continue;
}
const mapLootAdjustmentsDict = adjustments[mapId];
for (const lootKey in mapLootAdjustmentsDict)
{
const lootPostionToAdjust = mapLooseLootData.spawnpoints.find((x) => x.template.Id === lootKey);
const lootPostionToAdjust = mapLooseLootData.spawnpoints
.find((spawnPoint) => spawnPoint.template.Id === lootKey);
if (!lootPostionToAdjust)
{
this.logger.warning(`Unable to adjust loot position: ${lootKey} on map: ${mapId}`);
this.logger.warning(this.localisationService.getText("location-unable_to_adjust_loot_position_on_map", { lootKey: lootKey, mapId: mapId }));
continue;
}

View File

@ -474,7 +474,7 @@ export class InraidController
const pmcQuest = pmcProfile.Quests.find((x) => x.qid === quest.qid);
if (!pmcQuest)
{
this.logger.warning(`No PMC quest found for ID: ${quest.qid}`);
this.logger.warning(this.localisationService.getText("inraid-unable_to_migrate_pmc_quest_not_found_in_profile", quest.qid));
continue;
}

View File

@ -473,7 +473,8 @@ export class InventoryController
if (!itemToFold)
{
// Item not found
this.logger.warning(`Unable to fold item: ${request.item}. Not found`);
this.logger.warning(this.localisationService.getText("inventory-unable_to_fold_item_not_found_in_inventory", request.item));
return { warnings: [], profileChanges: {} };
}
@ -666,22 +667,27 @@ export class InventoryController
return output;
}
/**
* Flag an item as seen in profiles encyclopedia + add inspect xp to profile
* @param itemTpls Inspected item tpls
* @param fullProfile Profile to add xp to
*/
protected flagItemsAsInspectedAndRewardXp(itemTpls: string[], fullProfile: IAkiProfile): void
{
for (const itemTpl of itemTpls)
{
// item found
const item = this.databaseServer.getTables().templates.items[itemTpl];
if (!item)
const item = this.itemHelper.getItem(itemTpl);
if (!item[0])
{
this.logger.warning(`Unable to find item with id ${itemTpl}, skipping inspection`);
this.logger.warning(this.localisationService.getText("inventory-unable_to_inspect_item_not_in_db", itemTpl));
return;
}
fullProfile.characters.pmc.Info.Experience += item._props.ExamineExperience;
fullProfile.characters.pmc.Info.Experience += item[1]._props.ExamineExperience;
fullProfile.characters.pmc.Encyclopedia[itemTpl] = false;
fullProfile.characters.scav.Info.Experience += item._props.ExamineExperience;
fullProfile.characters.scav.Info.Experience += item[1]._props.ExamineExperience;
fullProfile.characters.scav.Encyclopedia[itemTpl] = false;
}
@ -773,12 +779,10 @@ export class InventoryController
{
for (const change of request.changedItems)
{
const inventoryItem = pmcData.Inventory.items.find((x) => x._id === change._id);
const inventoryItem = pmcData.Inventory.items.find((item) => item._id === change._id);
if (!inventoryItem)
{
this.logger.error(
`Unable to find inventory item: ${change._id} to auto-sort, YOU MUST RELOAD YOUR GAME`,
);
this.logger.error(this.localisationService.getText("inventory-unable_to_sort_inventory_restart_game", change._id));
continue;
}

View File

@ -15,6 +15,7 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer";
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
import { FenceService } from "@spt-aki/services/FenceService";
import { ItemFilterService } from "@spt-aki/services/ItemFilterService";
import { LocalisationService } from "@spt-aki/services/LocalisationService";
import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService";
import { HashUtil } from "@spt-aki/utils/HashUtil";
@ -32,6 +33,7 @@ export class FenceBaseAssortGenerator
@inject("PresetHelper") protected presetHelper: PresetHelper,
@inject("ItemFilterService") protected itemFilterService: ItemFilterService,
@inject("SeasonalEventService") protected seasonalEventService: SeasonalEventService,
@inject("LocalisationService") protected localisationService: LocalisationService,
@inject("ConfigServer") protected configServer: ConfigServer,
@inject("FenceService") protected fenceService: FenceService,
)
@ -199,7 +201,8 @@ export class FenceBaseAssortGenerator
const ammoPenetrationPower = this.getAmmoPenetrationPower(rootItemDb);
if (ammoPenetrationPower === null)
{
this.logger.warning(`Ammo: ${rootItemDb._id} has no penetration value, skipping`);
this.logger.warning(this.localisationService.getText("fence-unable_to_get_ammo_penetration_value", rootItemDb._id));
return false;
}
@ -215,11 +218,15 @@ export class FenceBaseAssortGenerator
{
if (this.itemHelper.isOfBaseclass(rootItemDb._id, BaseClasses.AMMO_BOX))
{
const ammoTplInBox = rootItemDb._props.StackSlots[0]._props.filters[0].Filter[0];
const ammoItemDb = this.itemHelper.getItem(ammoTplInBox);
// Get the cartridge tpl found inside ammo box
const cartridgeTplInBox = rootItemDb._props.StackSlots[0]._props.filters[0].Filter[0];
// Look up cartridge tpl in db
const ammoItemDb = this.itemHelper.getItem(cartridgeTplInBox);
if (!ammoItemDb[0])
{
this.logger.warning(`Ammo: ${ammoTplInBox} not an item, skipping`);
this.logger.warning(this.localisationService.getText("fence-ammo_not_found_in_db", cartridgeTplInBox));
return null;
}

View File

@ -168,7 +168,7 @@ export class LocationGenerator
const staticContainerGroupData: IStaticContainer = db.locations[locationId].statics;
if (!staticContainerGroupData)
{
this.logger.warning(`Map: ${locationId} lacks a statics file, skipping container generation.`);
this.logger.warning(this.localisationService.getText("location-unable_to_generate_static_loot", locationId));
return result;
}
@ -559,7 +559,7 @@ export class LocationGenerator
const itemContainerDistribution = staticLootDist[containerTypeId]?.itemDistribution;
if (!itemContainerDistribution)
{
this.logger.warning(`Unable to acquire item distrubution for container: ${containerTypeId}`);
this.logger.warning(this.localisationService.getText("location-missing_item_distribution_data", containerTypeId));
return itemDistribution;
}
@ -726,7 +726,7 @@ export class LocationGenerator
if (itemArray.length === 0)
{
this.logger.warning(`Loot pool for position: ${spawnPoint.template.Id} is empty. Skipping`);
this.logger.warning(this.localisationService.getText("location-loot_pool_is_empty_skipping", spawnPoint.template.Id));
continue;
}

View File

@ -412,7 +412,7 @@ export class LootGenerator
// No default preset found for weapon, choose a random one
if (!chosenWeaponPreset)
{
this.logger.warning(`Default preset for weapon ${chosenWeaponTpl} not found, choosing random instead`);
this.logger.warning(this.localisationService.getText("loot-default_preset_not_found_using_random", chosenWeaponTpl));
chosenWeaponPreset = this.randomUtil.getArrayValue(this.presetHelper.getPresets(chosenWeaponTpl));
}

View File

@ -911,7 +911,7 @@ export class QuestHelper
let questDetails = this.getQuestFromDb(questId, pmcProfile);
if (!questDetails)
{
this.logger.warning(`Unable to find quest: ${questId} from db, unable to give quest rewards`);
this.logger.warning(this.localisationService.getText("quest-unable_to_find_quest_in_db_no_quest_rewards", questId));
return [];
}

View File

@ -418,7 +418,7 @@ export class SeasonalEventService
const botsToAddPerMap = this.seasonalEventConfig.eventBossSpawns[eventType.toLowerCase()];
if (!botsToAddPerMap)
{
this.logger.warning(`Unable to add ${eventType} bosses, eventBossSpawns is missing`);
this.logger.warning(`Unable to add: ${eventType} bosses, eventBossSpawns is missing`);
return;
}
const mapKeys = Object.keys(botsToAddPerMap) ?? [];
@ -428,7 +428,7 @@ export class SeasonalEventService
const bossesToAdd = botsToAddPerMap[mapKey];
if (!bossesToAdd)
{
this.logger.warning(`Unable to add ${eventType} bosses to ${mapKey}`);
this.logger.warning(`Unable to add: ${eventType} bosses to: ${mapKey}`);
continue;
}
for (const boss of bossesToAdd)