Class LootDistributionHandler
A handler that manages the distribution of spawned resources throughout the world. Used for fish, items, outcrops, fragments, eggs, etc...
public static class LootDistributionHandler
- Inheritance
-
LootDistributionHandler
- Inherited Members
Methods
AddLootDistributionData(PrefabInfo, IEnumerable<BiomeData>, WorldEntityInfo)
Adds in a custom entry into the Loot Distribution of the game.
public static void AddLootDistributionData(PrefabInfo prefabInfo, IEnumerable<LootDistributionData.BiomeData> biomeDistribution, WorldEntityInfo info)
Parameters
prefabInfoPrefabInfo- The custom prefab which you want to spawn naturally in the game.
biomeDistributionIEnumerable<LootDistributionData.BiomeData>- The LootDistributionData.BiomeData dictating how the prefab should spawn in the world.
infoWorldEntityInfo- The WorldEntityInfo of the prefab. For more information on how to set this up, see WorldEntityDatabaseHandler.
AddLootDistributionData(string, params BiomeData[])
Adds in a custom entry into Loot Distribution of the game.
public static void AddLootDistributionData(string classId, params LootDistributionData.BiomeData[] biomeDistribution)
Parameters
classIdstring- The classId of the prefab.
biomeDistributionBiomeData[]- The LootDistributionData.BiomeData dictating how the prefab should spawn in the world.
AddLootDistributionData(string, SrcData)
Adds in a custom entry into the Loot Distribution of the game.
public static void AddLootDistributionData(string classId, LootDistributionData.SrcData data)
Parameters
classIdstring- The classId of the prefab.
dataLootDistributionData.SrcData- The LootDistributionData.SrcData that contains data related to the spawning of a prefab, also contains the path to the prefab.
AddLootDistributionData(string, SrcData, WorldEntityInfo)
Adds in a custom entry into the Loot Distribution of the game.
You must also add the UWE.WorldEntityInfo into the UWE.WorldEntityDatabase using WorldEntityDatabaseHandler.
public static void AddLootDistributionData(string classId, LootDistributionData.SrcData data, WorldEntityInfo info)
Parameters
classIdstring- The classId of the prefab.
dataLootDistributionData.SrcData- The LootDistributionData.SrcData that contains data related to the spawning of a prefab, also contains the path to the prefab.
infoWorldEntityInfo- The WorldEntityInfo of the prefab. For more information on how to set this up, see WorldEntityDatabaseHandler.
AddLootDistributionData(string, string, IEnumerable<BiomeData>)
Adds in a custom entry into the Loot Distribution of the game.
You must also add the UWE.WorldEntityInfo into the UWE.WorldEntityDatabase using WorldEntityDatabaseHandler.
public static void AddLootDistributionData(string classId, string prefabPath, IEnumerable<LootDistributionData.BiomeData> biomeDistribution)
Parameters
classIdstring- The classId of the prefab.
prefabPathstring- The prefab path of the prefab.
biomeDistributionIEnumerable<LootDistributionData.BiomeData>- The LootDistributionData.BiomeData dictating how the prefab should spawn in the world.
AddLootDistributionData(string, string, IEnumerable<BiomeData>, WorldEntityInfo)
Adds in a custom entry into the Loot Distribution of the game.
public static void AddLootDistributionData(string classId, string prefabPath, IEnumerable<LootDistributionData.BiomeData> biomeDistribution, WorldEntityInfo info)
Parameters
classIdstring- The classId of the prefab.
prefabPathstring- The prefab path of the prefab.
biomeDistributionIEnumerable<LootDistributionData.BiomeData>- The LootDistributionData.BiomeData dictating how the prefab should spawn in the world.
infoWorldEntityInfo- The WorldEntityInfo of the prefab. For more information on how to set this up, see WorldEntityDatabaseHandler.
AddLootDistributionData(string, WorldEntityInfo, params BiomeData[])
Adds in a custom entry into Loot Distribution of the game.
public static void AddLootDistributionData(string classId, WorldEntityInfo info, params LootDistributionData.BiomeData[] biomeDistribution)
Parameters
classIdstring- The classId of the prefab.
infoWorldEntityInfo- The WorldEntityInfo of the prefab. For more information on how to set this up, see WorldEntityDatabaseHandler.
biomeDistributionBiomeData[]- The LootDistributionData.BiomeData dictating how the prefab should spawn in the world.
EditLootDistributionData(string, BiomeType, float, int)
Edits Loot Distribution data for existing prefabs.
public static void EditLootDistributionData(string classId, BiomeType biome, float probability, int count)
Parameters
classIdstring- The ClassID of the prefab. If unsure, use CraftData.GetClassIdForTechType.
biomeBiomeType- The BiomeTypeto change the data for.
probabilityfloat- The desired probability.
countint- The number to spawn at a time when spawning happens.
EditLootDistributionData(string, IEnumerable<BiomeData>)
Edits Loot Distribution data for existing prefabs, for e.g. original game prefabs.
public static void EditLootDistributionData(string classId, IEnumerable<LootDistributionData.BiomeData> biomeDistribution)
Parameters
classIdstring- The ClassID of the prefab. If unsure, use CraftData.GetClassIdForTechType.
biomeDistributionIEnumerable<LootDistributionData.BiomeData>- The list of LootDistributionData.BiomeData that contains information about how/when it should spawn in biomes.