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

Mass Contests Remake #480

Merged
merged 15 commits into from
Jul 13, 2024

Conversation

VMSolidus
Copy link
Member

Description

Part of Issue #467

This is a complete re imagining of the Nyanotrasen Mass Contest System(Long since removed from the game). This system adds a highly flexible function that outputs a ratio of a given entity's mass, that is optionally relative to another entity. I've primarily written this system to be used in conjunction with PR #458 , as it adds several new implementations of variable player mass to the game.

How this differs from the original Mass Contest system is that it is configured via hotloaded CVars, and is inherently clamped so that character mass only modifies functions by a finite amount rather than providing infinite scaling. This essentially means that while an Oni is 25% better at shoving a Felinid to the floor thanks to their different masses, a 2000kg Lamia is also only 25% better at shoving a Felinid to the floor, rather than 50000% better. The inverse is also true, a small player character can only be 25% better or worse at a given implementation. These implementations are not handled directly by the ContestSystem, and are instead handled directly by other systems that call upon it.

This percentage limit can be modified by a new CVar at any time. Additionally, the entire MassContest system can be optionally toggled off completely at any time via CVar, without needing to modify any code that calls upon it.

At this time, I have included three different implementations to serve as suitable examples for how MassContest can be used.

  1. Weapon recoil is now modified by an entity's mass relative to the human average baseline. Smaller characters experience more recoil, larger characters experience less recoil
  2. Disarm/Shove is now modified by Mass Contests. Entities that are sized differently from their target have their shove/disarm chance modified based on the ratio of performer and target mass.
  3. Certain types of handcuffs(such as Cablecuffs and zipties) are now faster to slip out of if you are smaller than the average.

Changelog

🆑

  • add: Mass Contests have returned in a new reworked form.
  • add: Weapon Recoil is now resisted by character mass. More massive characters take less recoil, less massive characters take more recoil.
  • add: Disarm and Shove actions are now modified by relative character mass. It is easier to shove people around if you're bigger than them.
  • add: Cablecuffs and Zipties are now easier to escape out of if you're smaller.

@github-actions github-actions bot added Changes: C# Changes any cs files Changes: YML Changes any yml files labels Jun 20, 2024
@VMSolidus VMSolidus added Priority: 2-High Needs to be resolved as soon as possible Size: 3-Medium For medium issues/PRs Holy Shit labels Jun 20, 2024
@DangerRevolution
Copy link
Contributor

Does this PR rely on 458?

@VMSolidus
Copy link
Member Author

Does this PR rely on 458?

This does not requires 458, but it is related to 458. Adding mass contests is primarily a method of helping to provide new game-play variety for characters whose mass is modified by height sliders.

But, it doesn't require it in the sense that if we merge this but not height sliders, it will still function completely as is as its own standalone system. You would get to experience it as differences by Felinids, Harpies, Oni, and Diona.

@github-actions github-actions bot added the Status: Needs Review Someone please review this label Jun 20, 2024
@DangerRevolution DangerRevolution added the Type: Feature Creation of or significant changes to a feature label Jun 20, 2024
@VMSolidus
Copy link
Member Author

I have fixed the sole bug reported by Deep Station 14's playtest, that of handcuffs not working correctly. They are now working as intended, and there is now a small switch allowing handcuffs and zipties to have opposite interactions with massContest. Handcuffs are now correctly set to be easier to escape if you are smaller. While Zipties are instead easier to escape if you are larger.

@VMSolidus
Copy link
Member Author

@DEATHB4DEFEAT @Pspritechologist @Peptide90 @OldDanceJacket
This is feature complete, ready for review.

Content.Shared/Contests/ContestsSystem.CVars.cs Outdated Show resolved Hide resolved
Content.Shared/Contests/ContestsSystem.cs Outdated Show resolved Hide resolved
Content.Shared/Contests/ContestsSystem.cs Outdated Show resolved Hide resolved
Content.Shared/Contests/ContestsSystem.cs Show resolved Hide resolved
Content.Shared/Contests/ContestsSystem.cs Outdated Show resolved Hide resolved
Content.Shared/Contests/ContestsSystem.cs Outdated Show resolved Hide resolved
Content.Shared/Contests/ContestsSystem.cs Outdated Show resolved Hide resolved
Content.Shared/Contests/ContestsSystem.cs Outdated Show resolved Hide resolved
Content.Shared/Contests/ContestsSystem.cs Outdated Show resolved Hide resolved
Content.Shared/Contests/ContestsSystem.cs Outdated Show resolved Hide resolved
VMSolidus and others added 3 commits July 12, 2024 16:32
Co-authored-by: DEATHB4DEFEAT <77995199+DEATHB4DEFEAT@users.noreply.github.com>
Signed-off-by: VMSolidus <evilexecutive@gmail.com>
Co-authored-by: DEATHB4DEFEAT <77995199+DEATHB4DEFEAT@users.noreply.github.com>
Signed-off-by: VMSolidus <evilexecutive@gmail.com>
Copy link
Contributor

@DangerRevolution DangerRevolution left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uncuffMassMultiplies is a tiny bit unclear from the name alone so add two comments as needed

Resources/Prototypes/Entities/Objects/Misc/handcuffs.yml Outdated Show resolved Hide resolved
Resources/Prototypes/Entities/Objects/Misc/handcuffs.yml Outdated Show resolved Hide resolved
Co-authored-by: Danger Revolution! <142105406+DangerRevolution@users.noreply.github.com>
Signed-off-by: VMSolidus <evilexecutive@gmail.com>
Content.Shared/Contests/ContestsSystem.CVars.cs Outdated Show resolved Hide resolved
Content.Shared/Contests/ContestsSystem.cs Outdated Show resolved Hide resolved
VMSolidus and others added 4 commits July 12, 2024 19:41
Co-authored-by: DEATHB4DEFEAT <77995199+DEATHB4DEFEAT@users.noreply.github.com>
Signed-off-by: VMSolidus <evilexecutive@gmail.com>
@DangerRevolution DangerRevolution merged commit 806dc01 into Simple-Station:master Jul 13, 2024
11 checks passed
SimpleStation14 added a commit that referenced this pull request Jul 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changes: C# Changes any cs files Changes: YML Changes any yml files Priority: 2-High Needs to be resolved as soon as possible Size: 3-Medium For medium issues/PRs Status: Needs Review Someone please review this Type: Feature Creation of or significant changes to a feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants