ScavengerHunts
We've been working on the basics for this for a while, but rushed it out so that it's ready for Easter. Expect more features soon!
Scavenger Hunts is a Fabric 1.20.1 Sidemod that does exactly what it sounds like. You can configure blocks as "Scavenger Blocks" that players must search for. In the current version, you can configure "pools" of blocks (i.e. common, rare, super-rare) with different pools of rewards (similar to our Trivia mod, but this supports commands and items).
When a player right clicks a Scavenger Block, a title (configurable) appears and the level up sound plays. They are then given a random reward from the Scavenger Blocks pool (defined when you setup the blocks).
How do rewards work? When you first run Scavenger Hunts, a file called "rewards.json" will be created under config/ScavengerHunt
It will have a similar JSON structure to this by default
However, you don't need to have three groups of rewards. You could just have "general", and put all rewards under there. Or you could have a thousand.
The key thing to note here is the rewards themselves. In the medium category, instead of having "item_name", it has "command". As such, the mod will execute the value of this, replacing {player} with the players name. This could be used for giving Pokemon, or any other mod related thing, such as Flan claim blocks.
The reward pool titles will show up in the command when you setup the blocks, which you're about to find out about.
How do you setup the blocks? Any block can be used as a scavenger block. Once you've placed a block, do the command:
Where pool is the reward pool/group we discussed earlier, and name is a unique identifier for this specific block. The name is never displayed to the players, so don't worry about it being pretty.
Once you've ran that command, it'll ask you to right click the block to set it up. You'll get a confirmation message once you have.
What if you mess up the right click? No worries, you can remove a Scavenger Block like this:
The names will be suggested to you. Things are automatically saved, so no need to touch anything.
I've setup the blocks, how do I enable the hunt? By default, the hunt is off - meaning players right clicking the blocks will do nothing. To toggle this, do the command:
The state of the hunt (active/not active) will persist across server restarts.
Where is the player info stored? If a player is reporting a bug, or you just want to test things are saving before posting an announcement, check the file under config/ScavengerHunt/foundBlocks.json
You'll see data like this, where the key is the player's UUID, and the list is the block names they've already found.
Last updated