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

The Throwing Update #1307

Merged
merged 49 commits into from
Dec 8, 2024
Merged

Conversation

angelofallars
Copy link
Contributor

@angelofallars angelofallars commented Dec 3, 2024

Description

Turns a plethora of items into throwing weapons that deal damage when thrown. Throwing weapons cost stamina to throw.

Technical/Balance Details

To make a melee weapon also a throwing weapon, just add - type: DamageOtherOnHit, and it will automatically inherit the damage from a light melee attack and the melee sound effect as the thrown hit sound effect. You can set a custom damage value with the damage field (necessary when the item is not a MeleeWeapon) and stamina cost with staminaCost.

To make the throwing weapon embed and deal damage over time when embedded, add - type: EmbeddableProjectile and - type: EmbedPassiveDamage. By default, the embed damage per second is 5% of the throwing damage, but it can be modified on EmbedPassiveDamage with throwingDamageMultiplier.

The default stamina cost for throwing is 3.5 stamina. The baseline cost for almost all DoT embeddables is 5 stamina, because of the extra damage the DoT brings.

When a thrown item hits a target with body parts, it will randomly select a body part and only deal throwing damage to that body part. It will also embed to the same body part and only deal passive embed damage to it.

TODO

The unchecked checkmarks are best addressed in another PR but they will stay here for now.

Show Todo
  • Deal with prediction issue on embeddable projectile removal
    • This happens even before this PR so not really a big issue, maybe in a separate PR
  • Add embeddable damage numbers to embeddables
  • Fix throwing angle for surgery tools after the surgical tools sprite update
  • Try to make the throw knockback function as if it hit a wall
  • Esword/desword/e-dagger toggle embed damage
  • Don't start passive embed damage if EmbedPassiveDamageComponent has no damage
  • Make DamageOtherOnHit.Damage not nullable
  • Throwing damage only to a specific body part

Traits

  • Enraged Throw (Oni)

    • Oni/trait damage bonus applied to throwing weapon too
    • Can throw carried bodies, which will do a MassContest between the thrown body and the hit body to determine blunt damage, and stun duration for each party
    • 15% resistance to thrown/embed damage
      • This helps when their enemy uses the items they throw against them.
  • Sharpthrower (Human)

    • 10% more Brute thrown damage
    • 50% chance of throw hitting targetted body part
    • 40% throwing stamina cost reduction
    • 15% resistance to thrown/embed damage

Embeds

  • Adjust embed damage per second to be like /tg/ (in /tg/ spear has around ~1.2 embed DPS, adjust for ~45% embed chance since we're not implementing embed chance and its 0.54)
  • Merge EmbeddableProjectileComponent and EmbeddablePassiveDamageComponent
  • Split SharedProjectileSystem into EmbeddableProjectileSystem
  • Embed to a specific body part and deal damage only to that part, for now can randomly select body parts on embed
  • Normal passive damage becomes x0.2 when lying down
  • Increased damage when moving, more bonus damage for running (Jostle DPS on /tg/ is 0.2 running and 0.1 when walking/crawling)
  • All embeddables have a fall out time (30 or 45 secs)
  • - [x] On damage examine, can see that an object is embeddable "It can embed on a target if thrown."
  • Negative moodlet for attached harmful embeddables
  • On health examine target with embeds, can see embedded objects "He has a spear embedded in his left arm."
  • On examine item that is embedded, can see to which body part the item is embedded "The spear is embedded on Urist McHands's left arm."
  • An embeddable removed outside of surgery deals a lot of damage (x2 thrown damage)
    • Lying down prevents natural falling out and thus the damage with non-surgical removal
  • Surgical procedure on a body part to remove all embeds on it, using hemostat for removal
  • Allow anyone to remove embedded cultist weapons even if they're not a cultist

Media

Throwing Toolbox Tools

video-2024-11-21_1712.mp4

Examine

image

Examine After Embedding
image

Changelog

🆑 Skubman

  • add: The Throwing Update is here. You can throw most melee weapons at the cost of stamina to deal damage from afar.
  • add: Dozens of throwable weapons, mainly sharp weapons will now embed on throw and deal damage every second until they're manually removed or naturally fall off after some time.
  • add: Examining the damage values of an item now shows its throwing damage, throwing stamina cost, whether or not it embeds on a throw, and if the embed deals damage over time.
  • add: Examining an embedded item now shows what body part it's embedded in.
  • tweak: The traits High Adrenaline, Adrenal Dysfunction, Masochism and Low Pain Tolerance now affect throwing attacks just like melee attacks.
  • tweak: The default time to remove embedded items has been increased from 3 to 5 seconds, and both the remover and the target with the embedded item need to stand still during the removal.
  • tweak: The time to pry up a floor tile with a crowbar and other tools has been decreased from 1 second to 0.5 seconds. The throwing damage of floor tiles has been increased. Go figure.
  • fix: Attempting to throw a Blood Cultist item without being a cultist will stun you and drop the item you're holding properly.

@github-actions github-actions bot added Changes: C# Changes any cs files Changes: Localization Changes any ftl files Changes: YML Changes any yml files labels Dec 3, 2024
@BlueHNT
Copy link
Contributor

BlueHNT commented Dec 3, 2024

blunt weapons bounce off of people?

@angelofallars
Copy link
Contributor Author

blunt weapons bounce off of people?

Yes they do

video-2024-11-21_1712.mp4

@VMSolidus
Copy link
Member

image
This test fail is valid actually, it will cause map files to fucking destroy themselves.

@VMSolidus
Copy link
Member

image

This entire method is not allowed on ComponentStartup, because modifying the datafields of a component during component startup will cause corruption of map.yml files(It will save the component modifications to the map if you do this on a live server). You can instead do this through MapInitEvent, which is the semifinal initialization step, and occurs after the maps are saved.

@angelofallars
Copy link
Contributor Author

image

This entire method is not allowed on ComponentStartup, because modifying the datafields of a component during component startup will cause corruption of map.yml files(It will save the component modifications to the map if you do this on a live server). You can instead do this through MapInitEvent, which is the semifinal initialization step, and occurs after the maps are saved.

Gotcha will try that out

@angelofallars angelofallars changed the title Throwing Weapons The Throwing Update Dec 6, 2024
@github-actions github-actions bot added the Status: Needs Review Someone please review this label Dec 6, 2024
increase lunchbox damage from 2 to 5.5
glass shards deal 2x throwing damage but removal time decreased to 2.5
forks now deal embed passive damage (this isnt a lot cause they fall off after 10 secs)
hatchet gets 1.5x throwing damage and throwing angle is removed
lighters now have a different attack sound when turned on (same as welding tool)
zippos now have the throwing stuff (they didnt before cause they didnt inherit from Lighter)
fire axe thrown damage is now 1.5x but stamina cost increased to 18
tiles no longer embed, that never made sense
normal tile damage 4 -> 5.5
steel tile damage 7 -> 9.5
steel tile stamina cost 5 -> 6

floortile prying speed increased to encourage le interesting and creative crowbar tiles then throw them gameplay
@VMSolidus VMSolidus merged commit c40af73 into Simple-Station:master Dec 8, 2024
10 of 11 checks passed
WarMechanic pushed a commit to WarMechanic/Einstein-Engines that referenced this pull request Dec 8, 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: Localization Changes any ftl files Changes: YML Changes any yml files Status: Needs Review Someone please review this
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants