Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add loaded dice #32845

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open

Conversation

Palladinium
Copy link

@Palladinium Palladinium commented Oct 16, 2024

About the PR

This adds a bag full of loaded dice, purchasable under the "Pointless" category of the Syndicate uplink for 1 TC. I considered making them available at an emagged library vending machine instead, but I'm not sure if that's better or worse than the uplink purchase (suggestions welcome).

Loaded dice, and the bag they come in, look exactly like their regular counterparts. When held in the hand (and only when held in the hand), an extra verb is available, which shows a UI to set a predefined value to roll (this is similar to how chameleon clothing can be changed only while being worn). After setting, the die will always roll the set value.

Alt-clicking the die while in hand (or using Alt-Z), as well as the "unset" button in the UI, can be used to unset the die, which makes it behave as normal (rolling random sides). Dice start unset when spawned.

Why / Balance

It's a fun, minor roleplaying gimmick with very few balance repercussions. I had a couple of rounds where dice rolls mattered quite a bit, so I figured antags can get some fun with it. Players can cheat at IC tabletop games, win a wager against the HoS for their shotgun, or maybe convince a DM lawset AI to let them use their own dice. That is, until someone catches them.

Technical details

I added a new LoadedDiceComponent which stores the set roll value (if any). When the server-side DiceSystem tries to roll a value, it now raises a new DiceRollEvent, which the LoadedDiceSystem listens for to override the roll. This event should also make future work aiming to influence dice rolls more modular (for example, lucky/unlucky gear which make you roll higher/lower).

The SharedLoadedDiceSystem handles a new UI to change the value the die is set to. The UI code is largely based on the chameleon clothes code, but vastly simpler because of the smaller scope of this feature.

Media

loaded-dice.webm

Requirements

Breaking changes

No breaking changes (I think)

Changelog

🆑

  • add: Added loaded dice, purchasable by syndicate agents under "pointless".

@github-actions github-actions bot added the Changes: UI Can be reviewed or fixed by people who are knowledgeable with UI design label Oct 16, 2024
@beck-thompson
Copy link
Contributor

beck-thompson commented Oct 16, 2024

Love the idea! My only suggestion would be to make it so like you can only change the weighting if you are holding the bag they spawned in or something so it can't easily be metagamed. The only issue with that is it would not be clear how it works when you find it in maints or something...

Content.Server/Dice/DiceSystem.cs Outdated Show resolved Hide resolved
Resources/Prototypes/Entities/Objects/Fun/dice.yml Outdated Show resolved Hide resolved
Content.Server/Dice/LoadedDiceSystem.cs Outdated Show resolved Hide resolved
@Everturning
Copy link

can you add some sort of inhand interaction to set the dice to unset so that you can cheat better?
"guys im not cheating look"

@Palladinium
Copy link
Author

can you add some sort of inhand interaction to set the dice to unset so that you can cheat better? "guys im not cheating look"

You can do that from the same menu where you set it to a value, using the wide "Unset" button at the top. Or do you mean I should add a different verb that doesn't require opening a UI?

@Palladinium
Copy link
Author

Love the idea! My only suggestion would be to make it so like you can only change the weighting if you are holding the bag they spawned in or something so it can't easily be metagamed. The only issue with that is it would not be clear how it works when you find it in maints or something...

I agree that it's not great that anyone can just nab the die from the ground and check it without much counterplay, at least with chameleon clothes they need to strip you. I'm not a fan of "binding" the dice to the bag (both thematically and mechanically), though I don't really have a better solution either. I think as it is should be probably fine until (if) we figure out a better system for covert/stealth items.

@Everturning
Copy link

can you add some sort of inhand interaction to set the dice to unset so that you can cheat better? "guys im not cheating look"

You can do that from the same menu where you set it to a value, using the wide "Unset" button at the top. Or do you mean I should add a different verb that doesn't require opening a UI?

Not a separate verb, but something you can do in-world that sets it back to normal so when people doubt your extreme luck you can just alt-click it and boom, you're not as lucky!

@Palladinium Palladinium marked this pull request as draft October 17, 2024 01:34
@Palladinium Palladinium marked this pull request as ready for review October 17, 2024 06:39
@github-actions github-actions bot added the Status: Needs Review This PR requires new reviews before it can be merged. label Oct 17, 2024
@KingOnBudget
Copy link

OH MY GOD THIS IS GREAT! IMAGINE SOMEBODY USING THIS WITH STORYTELLER AI!

@WhiteGorila
Copy link

"if I roll a 20 I'm going to fucking kill myself"

Explodes

@Palladinium
Copy link
Author

Palladinium commented Oct 24, 2024

After re-reading the Metashield rule on Stealth items I think I'm going to remove these from the maints loot pool. If someone were to find them in maints, they'd need to break the stealth item rule and metagame their purpose in order to actually get any use from them, at which point they may as well be regular dice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changes: UI Can be reviewed or fixed by people who are knowledgeable with UI design Status: Needs Review This PR requires new reviews before it can be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants