DiceModders-Revive icon

Revive

Lobby rule: when a human player loses the castle, the others vote on one spin of the wheel of revival: back as before, back without culture, a fresh start, or out. Revivals per player and the chances are lobby settings.

Last updated 3 hours ago
Total downloads 1
Total rating 0 
Categories Mods Misc AI Generated
Dependency string DiceModders-Revive-1.0.1
Dependants 0 other packages depend on this package

This mod requires the following mods to function

BepInEx-BepInExPack_IL2CPP-6.0.788 icon
BepInEx-BepInExPack_IL2CPP

BepInEx pack for IL2CPP x64 Unity games. Preconfigured and ready to use.

Preferred version: 6.0.788
DiceModders-UiKit-1.1.0 icon
DiceModders-UiKit

Shared UI toolkit for Dice Kingdoms mods: windows and widgets in the game's own look, and additions to the game's screens (top bar, Settings tabs and blocks, scoreboard, Rules).

Preferred version: 1.1.0
DiceModders-ModCore-1.3.1 icon
DiceModders-ModCore

Shared game and multiplayer logic for Dice Kingdoms mods: lobby rules the host sets for everybody, per-player choices shared in the match, mod checks, new civilizations, unit and building values, hotkeys, texts in the game's languages.

Preferred version: 1.3.1
DiceModders-ModBridge-1.1.1 icon
DiceModders-ModBridge

Connects ModCore and UiKit: every mod's lobby rules in Settings > Lobby, every mod's keys in Settings > Input, and new civilizations in the Rules screen, in the game's own style.

Preferred version: 1.1.1

README

DiceKingdoms Revive

A lobby rule for Dice Kingdoms (off by default): when a human player loses the castle, the other living human players vote whether that player gets one spin of the wheel of revival. If most of them say yes, the wheel decides: back as before, back without culture, a fresh start, or out.

The vote

  • When a human player's castle falls, a window opens on every screen with the wheel and its chances.
  • The living human players who are connected vote Yes or No (the player who lost the castle does not vote). More than half yes: the wheel turns. Half or more no, or the time running out (60 s): the player stays out.
  • There is no vote when nobody else is left to vote, or when the castle's fall decides the match anyway.
  • Computer players are not revived.
  • A player can be revived as often as Revivals per player allows (default once): losing the castle again after coming back starts a new vote until they are used up.
  • Every step is also a line in the game's log.

The wheel

The wheel has 20 faces, 5 % each. The host picks the face and the same wheel turns on every screen. The island comes back when the next turn starts.

Face Default What happens
Back fully 15 % the island (buildings, ruins, terrain), resources and technologies exactly as before the castle fell, culture included
Without culture 15 % the same, but the stored culture is gone
Fresh start 20 % the island as at the start of the match with the starting buildings; food, wood, stone and military full, 10 hammers, 15 culture, no gold; technologies are lost
Stays out 50 % (the rest) nothing

Lobby rules

In the lobby's rules list Revive is a tick; its numbers are in its settings window (Settings > Lobby > Revive: settings), shown while the tick is on. The host edits them; everybody else sees the host's values.

Setting Default
Revivals per player 1 (1 to 5)
Back fully / without culture / fresh start 15 / 15 / 20 % (steps of 5 %, together at most 100 %)
Voting time 60 s (20 to 120)

Every player in the match needs this mod (ModCore compares the mods in the lobby).

Install

Needs BepInEx 6 (IL2CPP), ModCore 1.2.0 or newer, UiKit and ModBridge 1.1.0 or newer. Put DiceModders.Revive.dll into BepInEx\plugins, with the game closed.

Build

.\scripts\build.ps1 -GameDir "<your Dice-Kingdoms folder>"   # first time
.\scripts\build.ps1                                           # afterwards
.\scripts\build.ps1 -Dev                                      # developer build, see below

The script builds the mod and copies it into the game's BepInEx\plugins folder (close the game first).

The developer build is for testing alone against computer players: you vote alone (also about your own castle), computer players can be revived, Ctrl+Shift+K takes your castle and Ctrl+Shift+J a computer player's castle.

How it works

  • The host runs the votes. The vote and the wheel's face are the host's values in the Steam lobby; every player's ballot is their own value there (ModCore's player values).
  • The old island comes from the game itself: on the host, the game keeps every island's buildings, ruins, hills, resources and technologies after every phase (it uses them for players who rejoin). Revive takes the last one that still had a castle, or for a fresh start the first one.
  • Those snapshots point at the current terrain, so Revive copies the terrain (ground and nature tiles, a few KB) of each island that can still be revived when a phase starts, and once after the starting buildings.
  • The island is put back with the game's own sync, so every computer sees it. If the game refuses the island, it stays as it was and the player stays out.
  • No game function is patched.

Texts

texts.json holds the texts in English, German, French, Russian, Ukrainian and Chinese. A DiceModders.Revive.texts.json next to the DLL wins line by line.

License

MIT