TrainWreck Looting Help

Overview

TrainWreck Looting system was designed by a group of friends.

We often find ourselves hopping between mod-lists, and enjoy the concept of looting.

This mod was designed from the ground-up in hopes of being a standalone system which can dynamically pull content into a loot table system.

How does it work?

There are a few required items for a "GameMode" to work, one of which is a "FactionManager". This manager contains all the factions available for the scenario. At the time of writing, these faction lists contain "Entity Catalogs" which is the holy grail in figuring things out.

  • Are you trying to figure out which group prefabs are available for a faction?

  • Are you trying to figure out which vehicles are available for a faction?

  • Are you trying to figure out the items, gear, weapons and what not for a faction?

All of which can be found via the EntityCatalogs within the Faction Manager.

Therefore, our loot system scrapes this information to generate a loot table.

We wanted this loot table to be editable and available without requiring us to push an update to the mod. So the mod saves the loot table to a json file located at

$profile:lootmap.json which translates to the Profile directory. On Windows it's something along the lines of

"MyDocuments/My Games/Arma Reforger/profile/lootmap.json".

If you're hosting a server, same concept applies. Just find the profile directory and it should be there after running the server at least once with our mod loaded.

How do I swap between mods?

The lootmap system scrape the faction manager of the loaded scenario and merge the content with whats in the existing lootmap file.

Upon loading from the file the system attempts to load the resourceName. If it fails, odds are it must be from an unloaded mod - thus it is skipped and not considered.

Additionally, the isEnabled flag is checked. If you have an active mod in which you don't want something to spawn just swap the value to false and it will not be loaded into the lootmap.

{ "resourceName": "{A81F501D3EF6F38E}Prefabs/Items/Medicine/FieldDressing_01/FieldDressing_US_01.et", "chanceToSpawn": 10, "randomSpawnCount": 2, "isEnabled": true, "tags": [] }

What do these things mean?

spawnWithBackpackChance

0.1

spawnWithTwoWeaponsChance

0.1

spawnWithHealChance

0.1

spawnWithVestChance

0.3

magazineMinAmmoPercent

15

magazineMaxAmmoPercent

100

shouldSpawnMagazine

true

isLootEnabledisLootEnabled

true

isRespawnLootEnabled

true

isRespawnLootEnabled

100

isRespawnLootEnabled

1

respawnLootTimerInSeconds

8000

respawnAfterLastInteractionInMinutes

1

respawnLootItemThreshold

4

respawnLootRadius

5

unsearchedTimeRatio

0.5

searchedTimeRatio

0

respawnLootProcessorBatchSize

10

Last modified: 13 November 2024