Talk:Secret Dirt Piles
I've got a few comments about this page: Firstly, the final parameter DB_ShovelRewardItemAppear is not the box trigger in which the object appears. Rather, when the mound is dug up, the buried item is set on-stage (see also further) and then dragged (in an arch) to that trigger (typically, although not necessarily, a point trigger). It's why, when you dig up some mounds, the contents do a little hop out - there's a point trigger slightly outside of the pit.
Secondly, there are a few more databases available:
- DB_ShovelRewardItemScatter((STRING)_Reward,(ITEMGUID)_Item), which automatically scatters the buried items from their starting position. This is useful if you have several objects buried under one pile and want them all to jump out without manually having to place a trigger for each, which DB_ShovelRewardItemAppear would require.
- DB_ShovelRewardEvent((STRING)_Reward,(STRING)_Event), which throws a Story event (CharacterEvent in behaviourscript) to the character who dug up the mound.
- DB_ShovelRewardItemSpawn(_Reward,(ITEMGUID)_Item), which functions like RewardItemAppear, except it doesn't move the buried item. This is useful if you're unearthing something fixed or heavy, like e.g. a stone plate that's affixed to the floor and has no business jumping around.
- DB_ShovelRewardItemAdd(_Reward,(ITEMGUID)_Item), which adds the dug-up item directly to the inventory.
Putting items into the mound's inventory is both unnecessary and possibly problematic. It is unnecessary if the reward is in
DB_ShovelRewardItemAppear
DB_ShovelRewardItemScatter
or
DB_ShovelRewardItemSpawn
because those already set these objects off-stage, which is the usual way of keeping things hidden until they're needed. The last one of these makes the buried object appear by setting it back on-stage, but that doesn't drop the object from the mound's inventory, so it won't work.
Finally, it's probably worth mentioning that you can overload ProcShovelRewards((CHARACTERGUID)_Player,(STRING)_Reward) for custom events that aren't covered by the above available databases.