Class LootTables
Built-in loot tables. Currently just for testing during early implementation. These approximate the loot tables on page 156 of Daggerfall Chronicles but are different in several ways (e.g. Chronicles uses "WP" for both "Warm Plant" and "Weapon"). May diverge substantially over time during testing and future implementation.
Namespace: DaggerfallWorkshop.Game.Items
Assembly: Assembly-CSharp.dll
Syntax
public static class LootTables
Fields
| Improve this Doc View SourceDefaultLootTables
Default loot table chance matrices. Note: Temporary implementation. Will eventually be moved to an external file and loaded as keyed dict. Note: Many loot tables are defined with a lower chance for magic items in FALL.EXE's tables than is shown in Daggerfall Chronicles. These are shown below in the order "Key", "Chronicles chance", "FALL.EXE chance". E, 5, 3 F, 2, 1 G, 3, 1 H, 2, 1 I, 10, 2 J, 20, 3 K, 5, 3 L, 2, 1 N, 2, 1 O, 3, 2 P, 3, 2 Q, 10, 3 R, 5, 2 S, 20, 3 T, 3, 1 U, 3, 2
Declaration
public static LootChanceMatrix[] DefaultLootTables
Field Value
| Type | Description |
|---|---|
| LootChanceMatrix[] |
OnLootSpawned
Declaration
public static EventHandler<TabledLootSpawnedEventArgs> OnLootSpawned
Field Value
| Type | Description |
|---|---|
| EventHandler<TabledLootSpawnedEventArgs> |
Methods
| Improve this Doc View SourceGenerateLoot(DaggerfallLoot, Int32)
Declaration
public static bool GenerateLoot(DaggerfallLoot loot, int locationIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| DaggerfallLoot | loot | |
| Int32 | locationIndex |
Returns
| Type | Description |
|---|---|
| Boolean |
GenerateRandomLoot(LootChanceMatrix, PlayerEntity)
Generates an array of items based on loot chance matrix.
Declaration
public static DaggerfallUnityItem[] GenerateRandomLoot(LootChanceMatrix matrix, PlayerEntity playerEntity)
Parameters
| Type | Name | Description |
|---|---|---|
| LootChanceMatrix | matrix | Loot chance matrix. |
| PlayerEntity | playerEntity | Player entity. |
Returns
| Type | Description |
|---|---|
| DaggerfallUnityItem[] | DaggerfallUnityItem array. |
GetMatrix(String)
Gets loot matrix by key. Note: Temporary implementation. Will eventually be moved to an external file and loaded as keyed dict.
Declaration
public static LootChanceMatrix GetMatrix(string key)
Parameters
| Type | Name | Description |
|---|---|---|
| String | key | Key of matrix to get. |
Returns
| Type | Description |
|---|---|
| LootChanceMatrix | LootChanceMatrix. |