Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
BountyBoard
A sign that posts bounties: kill some creatures or bring some items. The whole group works on them together and shares the coin reward.
By FlyingHose
| Last updated | an hour ago |
| Total downloads | 3 |
| Total rating | 0 |
| Categories | Tweaks Enemies Server-side |
| Dependency string | FlyingHose-BountyBoard-1.0.0 |
| Dependants | 1 other package depends on this package |
This mod requires the following mods to function
denikson-BepInExPack_Valheim
BepInEx pack for Valheim. Preconfigured with the correct entry point for mods and preferred defaults for the community.
Preferred version: 5.4.2360README
Bounty Board
Part of FlyingHose's Modpack. Needs only BepInEx.
A bounty board is a sign you build yourself. It posts tasks like "Kill Greydwarves 3/5 (40 coins)" and "Bring Copper 12/20 (60 coins)". Everyone on the server works on the same bounties, and the coins are shared.
Make a board
Build any sign and write [bounty] as its text. That is the whole setup. The sign now shows the server's current bounties, with progress and reward, and looking at it shows the same list with a short reminder of how to hand items in.
Only what the sign displays changes. The text stored on the sign stays [bounty], and that is what you see when you edit the sign. If you remove the mod, it is an ordinary sign that says [bounty]. The tag ignores capital letters and spaces around it. Any other text makes a normal sign.
Every board in the world shows the same bounties. Build as many as you like.
Two kinds of bounty
Kill. "Kill 5 Greydwarves." Every kill a player gets credit for counts, wherever it happens, whether or not anyone is near a board. The game already works out which players get credit for a kill (a player who hit the creature), and the board uses the same answer. A creature that dies with no player's hit on it, to fire or another creature, does not count. Kills of tamed animals and kills made with cheats are not counted.
Bring. "Bring 20 Copper." You hand items in at a board.
Each board shows Board.ActiveBounties bounties at a time, 3 by default, 1 to 5. When one is finished, a new one takes its place. The board never posts two bounties for the same creature or item at once.
Hand items in
Look at a board and press the hotbar key of the item you want to hand in, the same way you use an item on a chest or a crafting station. The board takes as many as the bounty still needs, up to the whole stack, and you see a message saying how many.
- Handed-in items are gone. They are used up, not stored anywhere, and you cannot get them back.
- The board takes items only for a bounty that asks for them. For anything else you get a short message and nothing is taken.
- Equipped items are not taken.
- If two players hand in at the same time, the server sets the amount aside for the first and tells the second to hand in only what is still needed.
How it stays safe: your game asks the server first. The server sets aside the amount it will accept. Only then does your game remove exactly that many items and tell the server it did. If anything goes wrong before that, nothing is taken. If the connection drops after your items are removed and before the server hears about it, your items are gone and the bounty does not move. That is the one thing that can go wrong, and it can only lose one hand-in.
Rewards
When a bounty is finished, its coins are split equally and rounded down. The leftover coins are not paid to anyone. Each player gets the game's Coins in their inventory. If the inventory is full, the coins drop at their feet. Everyone sees a message naming the bounty and the split.
Reward.Share decides who is paid:
Everyone(the default): every player connected at that moment, whether or not they helped.Contributors: only the connected players who helped with that bounty, by killing or by handing in items. If the mod could not tell who helped, everyone connected is paid. A player who helped and then left is not paid, and their share is not given to anyone else.
A bounty pays at most Reward.MaxCoinsPerBounty coins in all (500 by default). Coins are made by the board, so keep that number in line with how much you want in your world.
A player who is not connected when a bounty finishes gets nothing for it. A player who is dead or still loading when the coins arrive gets them a moment later: their game holds up to 16 payouts and tries again each second, and if more arrive the oldest is dropped. A payout the server could not deliver is not sent again.
New bounties each day
With Board.RotateDaily on (the default), every bounty that is not finished is replaced with a new one when the in-game day changes. Progress on a replaced bounty is lost. A bounty that someone is in the middle of handing items to is kept until that hand-in is settled. Turn the setting off and bounties stay until they are finished.
Edit the pools
The server picks bounties from two lists in the config. Each is one line of entries separated by commas. An entry is name:count:coins.
nameis the game's internal prefab name, such asGreydwarforCopper. These are not the names shown in the game.countis a number like5, or a range like3-8that the server rolls between.coinsis what the bounty pays at its largest count. A smaller count pays in proportion, soGreydwarf:4-10:50pays 50 coins for 10 kills and 25 coins for 5.
Board.KillPool holds creatures:
Boar:3-6:40,Neck:3-8:30,Greyling:4-10:25,Greydwarf:4-10:50,Greydwarf_Shaman:2-4:50,Skeleton:3-6:60,Draugr:3-6:80,Leech:3-6:60,Blob:3-6:60,Troll:1:120,Wolf:2-4:100
Board.DeliverPool holds items:
Wood:30-60:30,Stone:30-60:30,Flint:15-30:30,Resin:20-40:40,LeatherScraps:10-20:40,DeerHide:5-10:50,Coal:20-40:40,CopperOre:10-20:40,Copper:10-20:60,Tin:10-20:60,Bronze:5-10:80,Iron:5-10:120,Honey:5-10:60
An entry the server cannot read, or a name that is not a creature or item in this game, is skipped and a warning goes in the BepInEx log. The rest still work. A change to a pool applies to bounties posted from then on, and bounties already on the board stay as they are. Give a pool enough different entries for the number of bounties you show.
Where the server keeps the state
The server keeps one file per world and saves it a moment after each change:
BepInEx/config/YesuBuildKit.BountyBoard/<world name>.bounties
It holds the bounties, their progress, and who helped. On a game you host, your game is the server and the file is on your machine. It is plain text, so you can read it or back it up. If the file is damaged, the server moves it aside as <world name>.bounties.bad-<date> and starts that world with a fresh board. It never writes over a damaged file.
Hand-ins that are in progress and payouts that are in flight are not saved.
Everyone needs the mod
Install on the server and on every client. The server refuses a client that does not have the mod or has a different version. A player without the mod would see a sign that says [bounty] and could not take part.
The server's config wins. Values marked "Synced" in the config file are taken from the server while you are connected. They can also be set for one world only, and changed from inside the game with Althing.
A player with the mod on a server without it, or with another version, sees ordinary signs and sends nothing.
Limits
- Each player can send about 30 kill reports and 30 hand-in requests a minute. More than that is ignored.
- A kill is counted once, whichever machines report it.
- The server checks every message for shape, rate, and sender. An unknown bounty, a stale request, or a message from a player the server does not know is ignored.
- It cannot see inside a player's game: it trusts a game that says it killed a creature or removed the items it handed in. Bounty Board is made for a group that plays together; a changed client could fake progress.
Config
File: BepInEx/config/com.yesucs.yesubuildkit.bountyboard.cfg
| Key | Default | Synced | What it does |
|---|---|---|---|
General.Enabled |
true |
no | Master switch. Off means no patches and no network messages. A server with the mod on refuses clients that have it off. |
General.DebugLogging |
false |
no | Detailed log lines. |
Board.Enabled |
true |
yes | Boards on or off for everyone. |
Board.ActiveBounties |
3 |
yes | How many bounties are active at once, 1 to 5. |
Board.RotateDaily |
true |
yes | Replace unfinished bounties when the in-game day changes. |
Board.KillPool |
the list under Edit the pools | yes | The creatures kill bounties are picked from. |
Board.DeliverPool |
the list under Edit the pools | yes | The items bring bounties are picked from. |
Reward.Share |
Everyone |
yes | Everyone or Contributors. |
Reward.MaxCoinsPerBounty |
500 |
yes | The most one bounty pays in all, 1 to 10000. |
Known limits
- The sign face updates every two seconds, as the game redraws signs; looking at the board shows the change at once.
- Text on a sign is small. A long creature name in your language may not fit on a sign face; the hover text always shows the whole list.
- The words "Kill" and "Bring" and the plural of creature names are in English.
- If the server restarts while a bounty is part done, the progress comes back from the file, but a hand-in that was in flight is lost.