TrainWreck Looting Help

Lootable Container

How does the TrainWreck Looting system recognize something as "lootable"?

  • A handful of Inventory Components must be present on the prefab in order for it to be considered an "inventory".

  • Our TW_LootableInventoryComponent must be added.

How to make something lootable

External or Base Game

  1. Navigate to the prefab you want to make lootable

  2. Right click --> Override

RplComponent

If this component does not exist, add it.

If this component does exist, but is disabled - enable it.

ActionsManagerComponent

actions-manager.png

How to setup ActionsManagerComponent

  1. Add at least one context. This sets the positional/conditional context in how an action is presented to the player.

  2. The UI Info for the action context is not important, doesn't need to be set.

  3. The position, for most cases can be a **PointInfo**. Click on the offset value in the property editor. This should allow you to move the transform around in the editor. Note how the x/y/z values will change as you move the transform around.

  4. Update the radius to something reasonable, we found 0.8 to be a sweet spot for most items.

    For further assistance, you can right-click on the ActionsManagerComponent to enable debug drawing.

    gizmo-drawing.png
    showcase-gizmo.png
  5. Set "Context Name" to something reasonable. We have been using "default" for simplicity.

  6. Now add an additional context. Set it to `SCR_OpenStorageAction`.

  7. Add a context in the "Parent Context List". Select the one you created, or want to use. Again, we have been using "default", which is what we created in the above steps.

  8. Set UI Info. You can leave it blank. This gets populated programmatically based on state.

SCR_InventoryStorageManagerComponent

This is an easy step. Just make sure it's present, enabled. If it's not present add it! Done!

SCR_UniversalInventoryStorageComponent

universal-storage-manager-component.png
  1. Set "Attributes" to `SCR_ItemAttributeCollection`

  2. Set "Item Display Name" to something reasonable. This is what appears to the player when they're in the inventory screen.

  3. Now, we're not entirely sure if this impacts things but the following size types are what we've been using

    "Size" --> Slot 3x3

    "Slot Type" --> Slot_Any

  4. Use Capacity Coefficient --> Disable

  5. Max Cumulative Volume --> 10000

  6. Max Weight --> 10000

TW_LootableInventoryComponent

This should be straight forward. What kind of loot do you want to spawn in here? Check the boxes to allow certain types to spawn.

Last modified: 13 November 2024