FlyingHose-BossVote icon

BossVote

Before a boss is summoned, everyone nearby has to ready up at the altar. One player can no longer call a boss down on the whole group.

Last updated an hour ago
Total downloads 2
Total rating 0 
Categories Tweaks Server-side
Dependency string FlyingHose-BossVote-1.0.0
Dependants 1 other package depends on this package

This mod requires the following mods to function

denikson-BepInExPack_Valheim-5.4.2360 icon
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.2360

README

Boss Vote

Part of FlyingHose's Modpack. Needs only BepInEx.

In the base game anyone can put an offering on a boss altar and call the boss down on the whole group. This mod stops that. Before the boss comes, the players nearby have to ready up at the altar.

The ready check

Make the offering as usual. If more than one player is in the vote, nothing is used yet. Instead everyone in the vote sees a panel at the top of the screen: who wants to summon which boss, who is ready, who is still waiting, and how many seconds are left. The panel follows the game's UI scale, and lists up to eight voters by name, then how many more.

You start out ready. Everyone else presses a key:

  • Press F7 to ready up.
  • Press F8 to decline.

When everyone is ready, the summon goes ahead by itself. The player who made the offering does not have to offer again.

Who votes

Vote.Scope decides.

  • Nearby (the default): every living player within Vote.Radius meters of the altar. The default radius is 100 meters. A dead player, or a player too far away, does not vote and does not block the summon.
  • Everyone: every player connected to the server, wherever they are.

The group is fixed when the vote starts. If someone in it disconnects during the vote, they are dropped and the vote carries on without them. If the player who started the vote disconnects, the vote is cancelled.

What cancels it

  • Anyone declines, including the player who started it. Everyone in the vote is told who declined.
  • The timer runs out. Vote.TimeoutSeconds sets it, 60 seconds by default. Everyone in the vote is told who did not answer.
  • The player who started it leaves.

Only one vote runs at an altar at a time, and a player can be in only one vote at a time. If you try while another vote is running, you are told so and nothing is used.

If the server does not answer within 10 seconds, you see No answer from the server and nothing is used. After the group approves, the altar stays reserved for up to 30 seconds while your game runs the summon.

Your offering

The offering is only used when the summon really happens. While the vote runs, your items stay in your inventory, and trophies placed on stands stay on the stands. If the vote is declined or times out, nothing is used.

When everyone is ready, the game checks again at that moment. If you no longer have the offering, if you died, or if you walked more than 15 meters from the altar while the vote ran, the summon is abandoned, nothing is used, and everyone is told.

This works for altars where you hold an offering and for altars where you place trophies on stands and then use the bowl.

Playing alone

Solo play is unchanged. With nobody else in the vote there is no panel and nothing to wait for. A world with one player on it is solo. On a dedicated server, or when nobody else is within the radius, your game still asks the server first, which takes a moment, and you see a short message that the summon goes ahead.

The server decides

The server works out who is in the vote, collects the answers, runs the timer, and announces the result. Your game only runs the summon after the server says the group approved it, and only once.

The server also checks the request itself: it must name an altar the server knows, the player must be within 40 meters of it as the server sees them, and a player can ask at most once a second.

Every player needs this mod, in the same version as the server. A server with the mod refuses players who do not have it. In a game one player hosts, the host is the server. A player with the mod on a server without it gets the base game's summons, with no vote.

Config

File: BepInEx/config/com.yesucs.yesubuildkit.bossvote.cfg

Entries marked synced are decided by the server. A client uses the server's value while connected.

Key Default Synced What it does
General.Enabled true no Master switch. Off means no patches and no network calls. Needs a restart.
General.DebugLogging false no Detailed log lines.
Vote.Enabled true yes Off means every summon is the base game's.
Vote.Scope Nearby yes Nearby or Everyone.
Vote.Radius 100 yes Meters from the altar for Nearby. From 20 to 500.
Vote.TimeoutSeconds 60 yes Seconds to answer. From 10 to 300.
Keys.ReadyKey F7 no Ready up.
Keys.DeclineKey F8 no Decline.

The synced settings can be set for one world only, and changed from inside the game with Althing.

Do not combine with

Other mods that change how boss altars summon (OfferingBowl). They change the same game code, so run one or the other.