YALootBoxes/configfiles.readme
smthspec a84b6b1a2b Phase 2: structural/completeness fixes (correctness pass)
- config.cpp: fix script/config binding. Crates now inherit a shared
  YALootBoxes_Base config class (name-matches the script class) instead of
  relying on the non-binding simulationModule line. Base class changed from
  non-existent ContainerObject to vanilla Container_Base.
- Lootbox.c: same base class change; replace never-called GetActions
  override with the engine-correct SetActions()/AddAction().
- ActionOpen.c: BROKEN_BONE now uses player.SetBrokenLegs(eBrokenLegs.
  BROKEN_LEGS) instead of bogus GetHealthDamageManager().SetFracture();
  DecreaseHealth health-type arg empty-string changed to "Health" (3 sites).
- Config.c: restructure loot lists from a string-keyed map to a flat array
  of YALB_LootList{type,entries} for reliable JSON deserialization;
  GetLootListForType updated to linear scan; position made a ref array;
  document failEffects.chance as a weight, not a probability.
- loot_lists.json (configfiles.readme): match new array schema.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-19 21:49:37 +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,
"EnableDebugLogging": true
}
// ------------------------------------------------------------
// 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" }
]
}