muckers-ShrineOfChance icon

ShrineOfChance

Adds Shrine of Chance slot machines on grass. Each paid spin draws fresh odds, a boss alerts the whole lobby, and three nukes drop a pickup that kills every enemy and pays every player.

By muckers

CHANGELOG

Changelog

0.5.1

  • Fixed: a client's reels could show one result while the host paid out another, such as three nukes on the client's screen while the host spawned a boss. Each player rolled the reels from their own odds, and the host acted on its own roll, so any difference in odds split them. UFO Abduction made that likely: a player who has it rolls with a 10% UFO share, which moves every other result's band. The host now sends its roll with the shrine's interact packet, and every client shows and commits that roll. A client that lacks a registered outcome the host rolled shows ? ? ?. A client whose own roll differs logs a warning that names both rolls.
  • The odds line and HUD still show each player's own odds, so matching configs still matter. A 0.5.0 host or client still rolls on its own.

0.5.0

  • Other mods can add outcomes to the shrine's roll through ShrineOutcomeRegistry.Register. Each outcome sets its id, label, reel face, colour, chat line, share of each roll and a callback that runs on the host when it wins. It takes exactly its share, and the six built-in tiers, Nuke included, keep their relative weights in what is left. Registered outcomes roll after Nuke, and each gets an odds column after NUKE while it can roll.
  • The odds popup gives every column the 0.4.1 width, and shrinks the cells to fit when that would run past the screen.
  • With no other mod installed, every roll, odds line and config code is the same as in 0.4.2. UFO Abduction is the first mod to use the API.

0.4.2

  • The nuke goes off with a deep KABOOM. It is the game's own rock impact sound, pitched down, and every modded player hears it. No new assets.
  • Nuked enemies still drop no loot. The 0.4.1 playtest counted three extra items near the player after a nuke. They came from trees and rocks that the spared Big Chunk's thrown rocks broke, not from the nuked enemies.

0.4.1

  • The nuke hovers 1.2 m above the ground in front of the shrine. In 0.4.0 it sat 1.2 m above the shrine's base, so on a slope it could sink into the hill where no one could reach it.
  • Walking into the nuke sets it off within 2 m across and 3 m up or down. In 0.4.0 a 2 m sphere missed a player walking straight over a nuke on a slope.
  • The odds HUD keeps each cell as wide as in 0.3.5 and grows with the sixth column, so Legendary no longer wraps to Legendar / y.

0.4.0

  • A sixth result, Nuke, modelled on the Call of Duty Zombies power-up. Three green N faces drop a glowing nuke pickup next to the shrine. Any player who walks into it sets it off. The screen flashes white, KABOOM! fills the banner, and the camera shakes. Every enemy alive at that moment dies, nearest first, over about two seconds. Bosses and neutral animals are spared, and enemies that spawn afterwards are not affected. Nuked enemies drop no loot and give no kill credit. Then every player, alive or dead, gets 400 coins.
  • A nuke counts as one of the shrine's two successes.
  • New [Nuke] config section: Enabled (default on), Chance (5% of every paid roll; the other five tiers share the rest), Gold, KillDelay, KillSpread, Lifetime (30 s, blinking for the last 5). Enabled, Chance, Gold and Lifetime are part of the config code, so the code changes from 0.3.5.
  • The odds line, chat line and HUD show a NUKE column only while a nuke can roll. With [Nuke] Enabled = false they look exactly as before, and every roll lands where 0.3.5 put it.
  • ForceOutcome = Nuke forces the nuke for testing.

0.3.5

Shrines are placed again when the world's seed changes inside one scene, which Wave Run 0.4.0 does at every map switch. A vanilla world is unchanged. The log line names the seed: Placed 6 Shrines of Chance (seed 123456).

0.3.4

The world-start config code goes to the log only. Chat shows it only while the debug ForceOutcome is set, so a normal game no longer opens with a hex code. Compare codes in BepInEx/LogOutput.log.

0.3.3

A winning shrine drops its powerup in the second game of a session. Muck wakes a new ItemManager on every Menu load, and from the second game of a session ItemManager.Instance is an object Unity has destroyed but vanilla keeps using. Unity's == null calls it null. The payout logged rolled ... but the pool has nothing to drop instead. It is now compared by reference.

0.3.2

  • The player who paid gets the result chat line on every spin. In 0.3.0 and 0.3.1 it only appeared on their first spin of each shrine.
  • The odds HUD shows the roll that actually ran. If another player's spin landed first, it used to show the odds of the roll you were offered.
  • The two Harmony hooks load separately. If a game update breaks the boss banner hook, shrines still appear and the log says the banner is off. If the placement hook breaks, the log says no shrines will appear.
  • Pressing a spinning shrine says "The reels are still spinning."

0.3.1

  • The boss banner accepts the host's system line for any player name, including spaces and punctuation. A player chat line still cannot open it.
  • The cabinet odds line is 2.25 times taller, and its bottom stays above the reels.

0.3.0

  • Each paid roll draws a fresh set of odds. Every tier is at least 1% and at most 50%, and the five sum to 100. MinChance and MaxChance change those limits. RandomizeOdds (default on) ignores the old Chance* values. Turn it off to use them again.
  • The roll's odds appear on the cabinet, in the purchaser's chat line, and on a short HUD for the player who paid.
  • Paying pulls the lever. The reels start when the lever hits the bottom.
  • A boss roll sends a chat line to every player, including vanilla clients. Modded clients show a lobby banner for that system line. A player chat line cannot open the banner.
  • The cabinet odds sit above the reels. After the spin they are labeled last roll. The lever is visible at rest and pulls toward the player.

0.2.1

  • Reel symbols are large enough to read. In 0.2.0 they were about 3 cm tall on a 0.7 m face.
  • A single symbol is about 0.36 m tall. BAR is smaller so three letters stay inside the face.
  • Glyphs are white on the gray, blue, and red faces, and black on the white and orange faces.

0.2.0

  • The shrine is now a slot machine. Paying spins three reels above it, and every modded player sees the same spin. The reward lands when the last reel stops.
  • New odds: 5% Orange (was 1%) and a new 1% chance to summon a boss next to the shrine. Nothing, White, and Blue keep their old proportions inside the remaining 94% (42.73 / 34.18 / 17.09).
  • Odds are now percentages under new keys ChanceNothing, ChanceWhite, ChanceBlue, ChanceOrange, ChanceBoss. The old Weight* keys are ignored, so existing configs pick up the new defaults. Values that do not sum to 100 are scaled to 100 and logged.
  • New Debug.ForceOutcome (default Off) forces every roll, for testing. It changes the config code.
  • A boss roll uses a shrine use but does not count toward the two successful drops.

0.1.0

  • First release: Shrines of Chance on grass. Pay coins for a chance at a White, Blue, or Orange powerup. The shrine is spent after two successful drops.