Chaos Dice / Dice of Fate PR
Description
Adds a new admeme item to the game.
The dice of fate is a dice that when rolled causes a random effect, ranging from gibbing the activator if they have bad luck, causing a station event or turning them into an antag if they have good luck.
The dice of fate system recycles a lot of stuff from xeno arch systems so i had to tweak it so the artifact effects with negative target depth values aren't selected.
Added an new station event exclusive for the dice that causes everyone to speak with the cogchamp accent for a few seconds, that can be cured prematurely by drinking holy water.
This is supposed to be an admin item that they can spawn in the round to spice some things up.
Media
https://github.com/user-attachments/assets/6b46159a-59e4-46a9-a2a9-87eb675dc4a2
https://github.com/user-attachments/assets/1b72557f-7585-4a91-82e9-d1b1335e4a0f
Changelog
:cl:
- add: Added the dice of fate and lots of effects.
- add: Added the tower of babel station event that causes everyone to speak in tongues for a certain amount of time.
- tweak: the xeno arch system can only fetch artifacts effects with non-negative target depth.
Walkthrough
This pull request introduces various new systems, components, and effects that extend gameplay and event handling. Notable additions include event-driven dice rolling with a new dice roll event, FateDice-specific functionality, and Babel Tower rules that alter entity speech. Several artifact components and the associated systems have been implemented to handle transformations (into traitors, zombies, revolutionaries, etc.) and to apply game rules. There are also adjustments in artifact effect selection logic and updates to localization and YAML prototype resources.
Changes
| File(s) | Change Summary |
|---|---|
| Content.Server/Dice/…/DiceSystem.cs; Content.Server/Dice/FateDice/FateDiceComponent.cs; Content.Server/Dice/FateDice/FateDiceSystem.cs; Content.Shared/Dice/DiceRollEvent.cs | Added event-driven dice roll handling; introduced FateDice component/system and a new DiceRollEvent class capturing rolled numbers. |
| Content.Server/StationEvents/…/BabelTowerRuleComponent.cs; Content.Server/StationEvents/…/BabelTowerRule.cs | Implemented Babel Tower event with a new component and rule to modify entity speech (adding/removing the cogchamp accent). |
| Content.Server/Xenoarchaeology/XenoArtifacts/Effects/Components/… (GameRuleArtifactComponent.cs, GibArtifactComponent.cs, TurnIntoRevLeaderArtifactComponent.cs, TurnIntoThiefArtifactComponent.cs, TurnIntoTraitorArtifactComponent.cs, TurnIntoZombieArtifactComponent.cs); Content.Server/Xenoarchaeology/XenoArtifacts/Effects/Systems/… (GameRuleArtifactSystem.cs, GibArtifactSystem.cs, TurnIntoRevLeaderArtifactSystem, TurnIntoThiefArtifactSystem, TurnIntoTraitorArtifactSystem, TurnIntoZombieArtifactSystem.cs) | Introduced multiple artifact effect components and corresponding systems for triggering game rules, applying gibbing damage, and transforming players into roles such as revolutionary leader, thief, traitor, or zombie. |
| Content.Server/EntityEffects/Effects/RemoveCogchampAccent.cs | Added a new effect that removes the RatvarianLanguageComponent, eliminating the "cogchamp" accent from entities. |
| Content.Server/Xenoarchaeology/XenoArtifacts/ArtifactSystem.Nodes.cs | Modified the GetRandomEffect method to filter out negative target depths when determining valid artifact effects. |
| Resources/Locale/en-US/…/effects.ftl; Resources/Prototypes/Entities/Objects/Fun/dice.yml; Resources/Prototypes/GameRules/events.yml; Resources/Prototypes/Reagents/medicine.yml; Resources/Prototypes/XenoArch/Effects/normal_effects.yml | Updated localization entries and YAML prototypes with a new reagent effect, a d20FateDice entity, a BabelTower game rule, an added reagent effect for removing cogchamp accents, and several new artifact effects. |
Suggested labels
Changes: UI, Changes: Sprite
Suggested reviewers
- Remuchi
- DEATHB4DEFEAT
- sleepyyapril
- VMSolidus
Poem
Amid the stars our dice now roll,
Fate and Babel guide each role.
Artifacts awaken with mystic flare,
Transforming beings with rules so rare.
Our code stands firm, a beacon in the night,
Biesel Republic sails forth, defending what's right!
🚀✨
✨ Finishing Touches
- [ ] 📝 Generate Docstrings
🪧 Tips
Chat
There are 3 ways to chat with CodeRabbit:
- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
I pushed a fix in commit <commit_id>, please review it.Generate unit testing code for this file.Open a follow-up GitHub issue for this discussion.
- Files and specific lines of code (under the "Files changed" tab): Tag
@coderabbitaiin a new review comment at the desired location with your query. Examples:@coderabbitai generate unit testing code for this file.@coderabbitai modularize this function.
- PR comments: Tag
@coderabbitaiin a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.@coderabbitai read src/utils.ts and generate unit testing code.@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.@coderabbitai help me debug CodeRabbit configuration file.
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.
CodeRabbit Commands (Invoked using PR comments)
@coderabbitai pauseto pause the reviews on a PR.@coderabbitai resumeto resume the paused reviews.@coderabbitai reviewto trigger an incremental review. This is useful when automatic reviews are disabled for the repository.@coderabbitai full reviewto do a full review from scratch and review all the files again.@coderabbitai summaryto regenerate the summary of the PR.@coderabbitai generate docstringsto generate docstrings for this PR.@coderabbitai resolveresolve all the CodeRabbit review comments.@coderabbitai configurationto show the current CodeRabbit configuration for the repository.@coderabbitai helpto get help.
Other keywords and placeholders
- Add
@coderabbitai ignoreanywhere in the PR description to prevent this PR from being reviewed. - Add
@coderabbitai summaryto generate the high-level summary at a specific location in the PR description. - Add
@coderabbitaianywhere in the PR title to generate the title automatically.
CodeRabbit Configuration File (.coderabbit.yaml)
- You can programmatically configure CodeRabbit by adding a
.coderabbit.yamlfile to the root of your repository. - Please see the configuration documentation for more information.
- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation:
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
Documentation and Community
- Visit our Documentation for detailed information on how to use CodeRabbit.
- Join our Discord Community to get help, request features, and share feedback.
- Follow us on X/Twitter for updates and announcements.
@Erisfiregamer1 DO IT
This pull request has conflicts, please resolve those before we can evaluate the pull request.
@AlgumCorrupto can you fix the conflicts? Probably good to merge after
This pull request has conflicts, please resolve those before we can evaluate the pull request.
I'd like if this was finished before I add Wizards. Please?