YALootBoxes/configfiles.readme
smthspec f64425a840 Phase 3: leveled logging + green cleanups
Logging:
- Replace EnableDebugLogging (bool) with DebugLogLevel (string) in
  YALB_MainConfig; default "INFO". Stored as a string for admin-friendliness,
  parsed once at load into YALB_ConfigLoader.LogLevel (int) for cheap compares.
- Add YALB_LogLevel enum NONE(0)<ERROR(1)<WARN(2)<INFO(3)<DEBUG(4)<VERBOSE(5),
  YALB_ParseLogLevel (case-insensitive, falls back to INFO), and leveled
  helpers Log_Error/Warn/Info/Debug/Verbose. ERROR also routes via ErrorEx().
- Reclassify every existing log call by content (missing critical config ->
  ERROR, recoverable -> WARN, milestones -> INFO, per-tick summary -> DEBUG,
  per-player/per-roll detail -> VERBOSE). Add a VERBOSE proximity-send log.
- Update main_config.json example and the default constructor to "INFO".
- Add README.md documenting levels, the config field, and the VERBOSE warning.

Green cleanups (from Phase 2):
- Remove dead OnActionInfoUpdate override (behaviour is inherited).
- Remove unused m_LocationInUse map (the live pool is m_FreeLocationNames).
- Null-guard player identity in the fail-effect log.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-19 21:57:31 +03:00

132 lines
No EOL
5.2 KiB
Text

// ============================================================
// These are REFERENCE/DEFAULT files. The mod auto-generates
// these on first run at: $profile:YALootBoxes\*.json
// Edit them there - do NOT edit inside the .pbo.
// ============================================================
// ------------------------------------------------------------
// FILE: main_config.json
// ------------------------------------------------------------
{
"MaxActiveLootboxes": 30,
"GlobalCheckIntervalSeconds": 60,
"DefaultDespawnMinutes": 15,
"OpenChannelDurationSeconds": 5,
"ProximityMessageRangeMeters": 3.0,
"DebugLogLevel": "INFO"
}
// ------------------------------------------------------------
// FILE: box_types.json
// ------------------------------------------------------------
{
"BoxTypes": [
{
"className": "YALootBoxes_Crate_Military",
"type": "military",
"requiredItems": [
{ "classname": "BoltCutters", "displayName": "Bolt Cutters" },
{ "classname": "Crowbar", "displayName": "Crowbar" }
],
"openChance": 0.65,
"itemDamageOnOpen": 8.0,
"despawnMinutes": 15,
"failEffects": [
{ "type": "EXPLOSIVE", "chance": 0.15, "damage": 45.0, "radius": 2.5 },
{ "type": "HEALTH", "chance": 0.25, "damage": 15.0 },
{ "type": "BLEEDING", "chance": 0.30, "bleedSources": 2 },
{ "type": "SICKNESS", "chance": 0.15, "agent": "Salmonella" },
{ "type": "BROKEN_BONE", "chance": 0.15 }
]
},
{
"className": "YALootBoxes_Crate_Medical",
"type": "medical",
"requiredItems": [
{ "classname": "Hacksaw", "displayName": "Hacksaw" }
],
"openChance": 0.80,
"itemDamageOnOpen": 4.0,
"despawnMinutes": 15,
"failEffects": [
{ "type": "SICKNESS", "chance": 0.50, "agent": "Influenza" },
{ "type": "HEALTH", "chance": 0.30, "damage": 8.0 },
{ "type": "BLEEDING", "chance": 0.20, "bleedSources": 1 }
]
},
{
"className": "YALootBoxes_Crate_Industrial",
"type": "industrial",
"requiredItems": [
{ "classname": "Crowbar", "displayName": "Crowbar" },
{ "classname": "WeldingMask", "displayName": "Angle Grinder" }
],
"openChance": 0.50,
"itemDamageOnOpen": 12.0,
"despawnMinutes": 20,
"failEffects": [
{ "type": "EXPLOSIVE", "chance": 0.20, "damage": 60.0, "radius": 3.0 },
{ "type": "BROKEN_BONE", "chance": 0.25 },
{ "type": "BLEEDING", "chance": 0.30, "bleedSources": 2 },
{ "type": "HEALTH", "chance": 0.25, "damage": 20.0 }
]
}
]
}
// ------------------------------------------------------------
// FILE: loot_lists.json
// ------------------------------------------------------------
{
"LootLists": [
{
"type": "military",
"entries": [
{ "classname": "AKM", "chance": 0.10, "minCount": 1, "maxCount": 1 },
{ "classname": "Mag_AKM_30Rnd", "chance": 0.40, "minCount": 1, "maxCount": 3 },
{ "classname": "PlateCarrierVest","chance": 0.20, "minCount": 1, "maxCount": 1 },
{ "classname": "TacticalHelmet", "chance": 0.15, "minCount": 1, "maxCount": 1 },
{ "classname": "Ammo_762x39", "chance": 0.50, "minCount": 1, "maxCount": 2 }
]
},
{
"type": "medical",
"entries": [
{ "classname": "Morphine", "chance": 0.30, "minCount": 1, "maxCount": 1 },
{ "classname": "SalineBagIV", "chance": 0.25, "minCount": 1, "maxCount": 2 },
{ "classname": "VitaminBottle", "chance": 0.50, "minCount": 1, "maxCount": 3 },
{ "classname": "Bandage", "chance": 0.60, "minCount": 2, "maxCount": 5 },
{ "classname": "TetracyclineAntibiotics", "chance": 0.20, "minCount": 1, "maxCount": 2 }
]
},
{
"type": "industrial",
"entries": [
{ "classname": "WeldingMask", "chance": 0.15, "minCount": 1, "maxCount": 1 },
{ "classname": "Battery_Car", "chance": 0.30, "minCount": 1, "maxCount": 1 },
{ "classname": "SparkPlug", "chance": 0.40, "minCount": 1, "maxCount": 2 },
{ "classname": "MetalPipe", "chance": 0.50, "minCount": 1, "maxCount": 4 },
{ "classname": "DuctTape", "chance": 0.45, "minCount": 1, "maxCount": 2 }
]
}
]
}
// ------------------------------------------------------------
// FILE: spawn_locations.json
// ------------------------------------------------------------
{
"SpawnLocations": [
{ "name": "NWAF_Hangar1", "position": [4985.3, 320.5, 2456.8], "boxType": "military" },
{ "name": "NWAF_Hangar2", "position": [5102.7, 318.9, 2401.2], "boxType": "military" },
{ "name": "Tisy_Bunker_A", "position": [1606.4, 280.1, 14383.9],"boxType": "military" },
{ "name": "Berezino_Hospital", "position": [7245.1, 12.4, 13889.6], "boxType": "medical" },
{ "name": "Zelenogorsk_Clinic", "position": [2543.9, 8.2, 5234.7], "boxType": "medical" },
{ "name": "Tractor_Plant_1", "position": [9821.2, 145.6, 8421.3], "boxType": "industrial" },
{ "name": "Tractor_Plant_2", "position": [9890.5, 142.1, 8390.7], "boxType": "industrial" }
]
}