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

Port Height Sliders #458

Merged
merged 28 commits into from
Jun 27, 2024
Merged

Conversation

VMSolidus
Copy link
Member

@VMSolidus VMSolidus commented Jun 13, 2024

Description

Ports Simple-Station/Parkstation-Friendly-Chainsaw#45

This feature adds a height and width slider system to character creation, allowing players to change how tall(or chunky) they want their character to be. This change doesn't necessarily exist in a vacuum, and is made to have more complicated interactions with other systems such as combat, Space Wind, and anything in the future that we deem necessary to care about the Mass of an entity.

That's right, this height slider system actually directly modifies the Fixture of player characters, causing small characters to have less mass, while larger characters have more mass. There is an inherent balancing factor to this, thanks to the Space Wind Rework PR, since the smaller your character is, the harder of a time they have when physics systems get thrown at them. Additionally, smaller characters have their maximum view distance slightly reduced, to help further balance them against having a smaller hit-box.

Media

height and width

🆑

  • add: Height and Width sliders have been added to character creation.

@VMSolidus VMSolidus changed the title Port of height sliders Port of Height Sliders Jun 13, 2024
@github-actions github-actions bot added Changes: C# Changes any cs files Changes: Localization Changes any ftl files Changes: UI Changes any XAML files Changes: YML Changes any yml files labels Jun 13, 2024
@DEATHB4DEFEAT DEATHB4DEFEAT self-assigned this Jun 14, 2024
@DEATHB4DEFEAT DEATHB4DEFEAT added Priority: 2-High Needs to be resolved as soon as possible Size: 3-Medium For medium issues/PRs Type: Feature Creation of or significant changes to a feature labels Jun 14, 2024
@VMSolidus
Copy link
Member Author

image

I've setup a simple solution to the doors problem. Now, regardless of what the height sliders set the sprite scale of an entity to be, it will never adjust the fixture to a radius equal to or greater than 0.5f. This acts as a sanity check making it so that player characters will never be so large that they cannot fit through an airlock door, regardless of how much their sprite is adjusted.

@github-actions github-actions bot added the Status: Merge Conflict FIX YOUR PR AAAGH label Jun 19, 2024
@github-actions github-actions bot removed the Status: Merge Conflict FIX YOUR PR AAAGH label Jun 19, 2024
@VMSolidus
Copy link
Member Author

width.slider.mp4

I've made it so that the height and width sliders in character selection now display an abstraction of your character's height and (shoulder-to-shoulder) width. These specific numbers have no ingame effect(that comes from the Fixtures Component, all characters are secretly a sphere with a radius of 0.35 meters). However since the relevant numbers are stored in a character's components, I can actually use this later for in-game systems that will let people look up a characters statistics! I'm excited to re-use this for Fugitives whenever I get around to rebasing & reworking them.

Additionally, two new CVars have been added thanks to feedback from Deep Station 14. These are HeightAdjustModifiesHitbox and HeightAdjustModifiesZoom. These both toggle on or off the two main "Balancing" features for height sliders. Which, while I strongly do not recommend turning them off, some servers may not care much about gameplay, and primarily want "Cosmetic-Only" height sliders.

@VMSolidus
Copy link
Member Author

HeightWidthAndWeight.mp4

After even more feedback, Weight is now listed alongside the height and width sliders, which also accurately reflects the real Mass a character will have ingame. Players now get to visually see that their Diona are ungodly heavy, while Harpies are ridiculously light.

@VMSolidus
Copy link
Member Author

UIUpdating.mp4

My last update of the night fixes the UI scaling issue.

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.

Just minor changes but it's worth discussing if uh, CM/KG are the best way to go here? Maybe there's an IC way; maybe there's some way to make it toggleable for NA/EU servers? (aside from searching for all instances and replacing it), maybe something in the options?

Content.Client/Humanoid/HumanoidAppearanceSystem.cs Outdated Show resolved Hide resolved
Content.Client/Humanoid/HumanoidAppearanceSystem.cs Outdated Show resolved Hide resolved
Content.Shared/Humanoid/HumanoidAppearanceComponent.cs Outdated Show resolved Hide resolved
Content.Shared/Humanoid/HumanoidAppearanceComponent.cs Outdated Show resolved Hide resolved
@DangerRevolution
Copy link
Contributor

Just minor changes but it's worth discussing if uh, CM/KG are the best way to go here? Maybe there's an IC way; maybe there's some way to make it toggleable for NA/EU servers? (aside from searching for all instances and replacing it), maybe something in the options?

To follow up on this, I (American Joe) shouldn't have to google a feet to CM converter to make a character or something is all.

Co-authored-by: Danger Revolution! <[email protected]>
Signed-off-by: VMSolidus <[email protected]>
@DEATHB4DEFEAT
Copy link
Member

Just minor changes but it's worth discussing if uh, CM/KG are the best way to go here? Maybe there's an IC way; maybe there's some way to make it toggleable for NA/EU servers? (aside from searching for all instances and replacing it), maybe something in the options?

To follow up on this, I (American Joe) shouldn't have to google a feet to CM converter to make a character or something is all.

Skill issue, we're American too.

@VMSolidus
Copy link
Member Author

Just minor changes but it's worth discussing if uh, CM/KG are the best way to go here? Maybe there's an IC way; maybe there's some way to make it toggleable for NA/EU servers? (aside from searching for all instances and replacing it), maybe something in the options?

To follow up on this, I (American Joe) shouldn't have to google a feet to CM converter to make a character or something is all.

All measurements in the game are given in Metric, since it takes place in space(scifi setting), and in the distant far future the Imperial system is an equally distant memory. It wouldn't really make sense to give your character's statistics in non-metric if everywhere else its exclusively metric. It's pretty easy to get used to anyhow.
"150 is a dwarf"
"175 is perfectly average"
"200 is gigantism"

@DangerRevolution
Copy link
Contributor

"175 is perfectly average"

This is definitely the distant sci-fi future then 😭😭😭😭😭

@github-actions github-actions bot added the Status: Merge Conflict FIX YOUR PR AAAGH label Jun 20, 2024
Copy link
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

Content.Server.Database/Model.cs Outdated Show resolved Hide resolved
Content.Shared/Preferences/HumanoidCharacterProfile.cs Outdated Show resolved Hide resolved
Resources/Prototypes/Species/dwarf.yml Outdated Show resolved Hide resolved
Resources/Prototypes/Species/dwarf.yml Outdated Show resolved Hide resolved
Resources/Prototypes/Species/reptilian.yml Outdated Show resolved Hide resolved
Resources/Prototypes/Species/reptilian.yml Outdated Show resolved Hide resolved
Co-authored-by: DEATHB4DEFEAT <[email protected]>
Signed-off-by: VMSolidus <[email protected]>
Copy link
Member

@DEATHB4DEFEAT DEATHB4DEFEAT left a comment

Choose a reason for hiding this comment

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

Couple extra nitpicks, but looks good.

Co-authored-by: DEATHB4DEFEAT <[email protected]>
Signed-off-by: VMSolidus <[email protected]>
@Peptide90 Peptide90 merged commit efeb93b into Simple-Station:master Jun 27, 2024
11 checks passed
SimpleStation14 added a commit that referenced this pull request Jun 27, 2024
DangerRevolution added a commit that referenced this pull request Jul 13, 2024
# 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

:cl:
- 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.

---------

Signed-off-by: VMSolidus <[email protected]>
Co-authored-by: DEATHB4DEFEAT <[email protected]>
Co-authored-by: Danger Revolution! <[email protected]>
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: Localization Changes any ftl files Changes: UI Changes any XAML 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.

4 participants