Fallout New Vegas

File information

Last updated

Original upload

Created by

Lime

Uploaded by

LimeMods

Virus scan

Safe to use

About this mod

A small, simple, light-weight mod that adds coin flip & dice toss mechanics to the game via the Lucky Bottlecap and die. For use in role-playing playthroughs.

Permissions and credits
Changelogs
Donations
Bottlecap Flip & Dice Roll!

Update 1.20: I've added a Dice-Roll System to this mod for any situation where there's more than one outcome!

I spent a stupid amount of time making this work properly and how I wanted it to

Do you struggle making decisions like me? then look no further!

Join the NCR? Legion? House or Yes man? Good character? Bad Character? How will you deal with Benny? Quite frankly the possibilities are endless.

The player can simply activate The Lucky Bottlecap in their inventory and quickly get one of two outcomes - Nuka-Cola logo up, or down. Heads or Tails! Wipe out Goodsprings or Move on quietly!

Features

  • Immersive, groundbreaking coin flip and Dice roll mechanics
  • You can hotkey The Lucky Bottlecap and / or Dice for easy use in any situation
  • Cool message and a small experience bonus for flipping the lucky Bottlecap more than 100 times (wow!)
  • Endless roleplaying possibilities
  • Adjusted and new message icons
  • Captivating & enchanting coinflip sound that I reused from the base game

How does It work?

Since someone asked in the comments, I thought I'd break down how this mod actually works.

In terms of coding, It's actually quite simple. the object you use is actually a consumable item that calls a new effect which is a type of script. This is actually similar to how the NCR emergency radio does it.

Essentially when you consume the dice/cap by interacting with it the following script runs in the background:

1) Using the function GetRandomPercentage in the engine you can generate a number between 0 and 100.
2) Using a bit of simple maths we can use this function to generate a percentage between 1 and 6 for the dice and 1 and 10 for the cap.
3) Play an initial message using ShowMessage i.e "Flipping..."
4) Once this number it's as simple feat of comparing the generated number with a list of possible outcomes.
5) for example if random number is equal to anything less than 5 for the cap (<5) we play a message that says "tails"
6) Otherwise we play a message that says "heads" as the only other outcome is going to be greater than (>5)
7) The dice is just a simple expansion of the cap code with some adjusted if statements to account for 6 possible states.
8) I.e. is the random number = to 4? then pass that number into the dice roll message (easier this way since the dice icon is constant)
9) Finally we add the dice/cap back into the player's inventory without notification (since the item is technically consumed on use)

This would have all likely been far easier using NVSE and JIP. but I do think for a mod this simple in nature - it doesn't make sense to have both as a requirement. (Although most people should be installing them anyways)

Installation / Uninstallation

The Lucky Bottlecap and Dice can be located on the coffee table in Doc Mitchell's House.

Alternatively they can be added directly to your inventory using player.additem CoinFlipCap 1 and player.additem LuckyDice 1

Install or uninstall via mod manager or manually by adding / deleting the files to your data folder.

Credits

- Lime (Mod Creator)
- Bezz (Assistance in creating "dice" icon)
- This mod was partially inspired by Gopher's Coin Toss mod for Skyrim.

Lime Drawing by Peach