Added FWotItemSpawnInfo struct containing min, max, and probability.
Added FWotItemSpawnInfo to UWotItem class
Updated default items to be editable anywhere so that they can be edited not just on class instances but on objects in the game world
Updated inventory component to use the spawn info when spawning the default items - checking against the probability for whether to spawn or not and spawning a quantity between spawn info min/max (or spawning exactly the item count if min/max are 0).
Updated classes with inventory to have proper defaults with spawn rates
Motivation and Context
Right now the developer has no way to customize instances of enemies with different assortments of items (or different quantities) from the same set of items - NPCs (animals, friendlies, enemies) have very static inventories and all default items are present in every instance. This PR adds the ability to specify the spawn probability for the item into the inventory as well as the ability to specify a range for the quantity to spawn, if spawning.
How has this been tested?
Playing in the Gameplay Test Map and the Diorama Test map (all the way through)
Screenshots (if appropriate):
Types of changes
[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] New Art / Asset
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] Documentation Update
[ ] Art / Asset Update
[x] Software change
Checklist:
[ ] My change requires a change to the documentation.
[ ] I have added / updated the documentation related to this change via either README or WIKI
Software
[ ] I have added tests to cover my changes.
[ ] I have updated the .github/workflows/build.yml file to add my new test to the automated cloud build github action.
[x] All new and existing tests passed.
[x] My code follows the code style of this project.
Description
Motivation and Context
Right now the developer has no way to customize instances of enemies with different assortments of items (or different quantities) from the same set of items - NPCs (animals, friendlies, enemies) have very static inventories and all default items are present in every instance. This PR adds the ability to specify the spawn probability for the item into the inventory as well as the ability to specify a range for the quantity to spawn, if spawning.
How has this been tested?
Playing in the Gameplay Test Map and the Diorama Test map (all the way through)
Screenshots (if appropriate):
Types of changes
Checklist:
Software
.github/workflows/build.yml
file to add my new test to the automated cloud build github action.