Provides a mod friendly way to manipulate loot tables.
A interface in X2LootTable allows mods to add/remove whole tables or items to loot tables without ini juggling.
Drop chances are recalculated accordingly.
For pre start state manipulation of loot tables use the static methods in OnPostTemplatesCreated like this
class'X2LootTableManager'.static.AddEntryStatic(LootTableName, LootTableEntry);
At runtime you can use the singleton instance like
Provides a mod friendly way to manipulate loot tables. A interface in X2LootTable allows mods to add/remove whole tables or items to loot tables without ini juggling. Drop chances are recalculated accordingly. For pre start state manipulation of loot tables use the static methods in
OnPostTemplatesCreated
like thisclass'X2LootTableManager'.static.AddEntryStatic(LootTableName, LootTableEntry);
At runtime you can use the singleton instance like
LootManager = class'X2LootTableManager'.static.GetLootTableManager();
LootManager.AddEntry(LootTableName, LootTableEntry);
LootManager.InitLootTables();
this will also reinitialise the loot tables.
For bulk add to loot tables you can move the chance recalculation to the end:
LootManager.AddEntry(TableName, EntryToAdd, false);
LootManager.AddEntry(TableName, EntryToAdd, false);
LootManager.AddEntry(TableName, EntryToAdd, false);
LootManager.RecalculateLootTableChance(TableName);
This way your chance ratio is preserved.