Skip to content

Conversation

@Thinbug0
Copy link
Contributor

@Thinbug0 Thinbug0 commented May 30, 2025

About the PR

Added a system that changes a player ghost sprite according to the damage they took before dying

Full list:

  • Radiation, Heat and Shock have an animated sprite each
  • Blunt, Slash, Pierce have 3 randomly choosen sprites each
  • Cold, Genetic, Poison, Asphyxiation and Cellular have a sprite each
  • Explosion (special case if Pierce, Blunt and Heat are all the same) has 3 randomly choosen sprites

*Bloodloss, Caustic are missing sprites, could not think of a good way to show that so far u.u

Why / Balance

Intended to make the ghosts way more expressive and less repetitive, a fun cosmetic change

Technical details

Oki, biggest pr ive done so far u.u

(Not perfect, ideally it would be done trough markings, but i dont think you can remove pixels with that. So it would be impossible to have a marking that removes a chunk of the ghost)

  • Tweaks GhostComponent
    Added a Damage thingi required to do the sprite changes

  • Tweaks DamageableSystem
    New GetHighestDamageType, it goes trough all the damages of a given dictionary and saves the highest type as a string. If multiple damages are the "highest", they will be saved too

  • Tweaks Observer.yml
    Gave it a GhostSpriteState, Appearance and GenericVisualizer components to handle changing
    the sprite state
    It currently has a very icki list of all the sprites it can possible choose, which i dont know how to smooth out

  • New StoreDamageTakenOnMindComponent/System
    Added to the mob base (that has health and is capable of taking damage) and body part base. It saves the body damage dictionary and damage specifier inside of the entity MindComponent

  • New GhostSpriteStateComponent/System
    Contains a public method that searches an entity mind for damage values, and it applies a sprite to it according to the damage found

Media

(blackish background bcus yeah ghosts are super duper transparent)
showy

Requirements

Breaking changes

Changelog

🆑

  • add: Ghosts appearances will now change depending on their cause of death

@github-actions github-actions bot added Changes: Sprites Changes: Might require knowledge of spriting or visual design. S: Untriaged Status: Indicates an item has not been triaged and doesn't have appropriate labels. size/S Denotes a PR that changes 10-99 lines. labels May 30, 2025
@github-actions
Copy link
Contributor

github-actions bot commented May 30, 2025

RSI Diff Bot; head commit c0676ed merging into 9880648
This PR makes changes to 1 or more RSIs. Here is a summary of all changes:

Resources/Textures/Mobs/Ghosts/ghost_human.rsi

State Old New Status
ghost_Asphyxiation Added
ghost_Blunt1 Added
ghost_Blunt2 Added
ghost_Blunt3 Added
ghost_Cellular Added
ghost_Cold Added
ghost_Explosion1 Added
ghost_Explosion2 Added
ghost_Explosion3 Added
ghost_Heat Added
ghost_Piercing1 Added
ghost_Piercing2 Added
ghost_Piercing3 Added
ghost_Poison Added
ghost_Radiation Added
ghost_Shock Added
ghost_Slash1 Added
ghost_Slash2 Added
ghost_Slash3 Added

Edit: diff updated after c0676ed

@beck-thompson
Copy link
Member

I think this is a very fun idea

@Thinbug0
Copy link
Contributor Author

wacky as heck that either windows or aseprite decided to automatically rename some sprites, ill fixie it later along with some other thingi

@LevitatingTree
Copy link
Contributor

really neat concept, does this work with adminghosts? or does this generally not apply?

@murolem
Copy link
Contributor

murolem commented May 30, 2025

Please tell me ashing would do something, moths need SOMETHING good this season V_V

@TeenSarlacc
Copy link
Contributor

Please tell me ashing would do something, moths need SOMETHING good this season V_V

floating pile of ash :trollface:

@Thinbug0
Copy link
Contributor Author

really neat concept, does this work with adminghosts? or does this generally not apply?

if you mean making them available as admin ghosts then i can prolly do that? otherwise i dunno what you mean

Please tell me ashing would do something, moths need SOMETHING good this season V_V

after getting this thingi to workie well i may look to add additional states in case someone is ashed or blown up

@IProduceWidgets
Copy link
Contributor

I dig it.

@github-actions github-actions bot added size/M Denotes a PR that changes 100-999 lines. and removed size/S Denotes a PR that changes 10-99 lines. labels May 31, 2025
@Crazydave91920
Copy link
Contributor

Please tell me ashing would do something, moths need SOMETHING good this season V_V

To ash, the victim must first burn to death. So it will most likely be the fire ghost.

@Thinbug0
Copy link
Contributor Author

i forgor about caustic!!!!! blehhhhhhhhh, ill handle that after all those other stuffies if i can thinkie of how it should look bcus rn i got no idea

@FungiFellow
Copy link
Contributor

i forgor about caustic!!!!! blehhhhhhhhh, ill handle that after all those other stuffies if i can thinkie of how it should look bcus rn i got no idea

You see that guy get melted by the Ark of the Covenant? Maybe a melted/sludge ghost

@Thinbug0
Copy link
Contributor Author

i forgor about caustic!!!!! blehhhhhhhhh, ill handle that after all those other stuffies if i can thinkie of how it should look bcus rn i got no idea

You see that guy get melted by the Ark of the Covenant? Maybe a melted/sludge ghost

looked that up and melting may workie, thanks for the recommendation ^^

@Thinbug0
Copy link
Contributor Author

Thinbug0 commented Sep 3, 2025

expect this to take a bunch longer bcusies silksong is gonna eat a lot of my time x3
will get back to it bcus i do wanna finish this

@Thinbug0
Copy link
Contributor Author

oki thats enough of a break back to figuring out this thingi bcus uh yeah im confus but ill likely pester people so progress can be made mhm

Copy link
Member

@beck-thompson beck-thompson left a comment

Choose a reason for hiding this comment

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

looks pretty good! If you have questions let me know here or discord

var ghost = SpawnAtPosition(GameTicker.ObserverPrototypeName, spawnPosition.Value);
var ghostComponent = Comp<GhostComponent>(ghost);

if (TryComp<GhostSpriteStateComponent>(ghost, out var state))
Copy link
Member

Choose a reason for hiding this comment

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

This is a little sussy, could you try listening for the OnMapInit in the GhostSpriteState system? That might be a better way to do this

Copy link
Contributor Author

@Thinbug0 Thinbug0 Sep 29, 2025

Choose a reason for hiding this comment

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

If i were to listen to the MapInitEvent the GhostSpriteStateSystem would trigger before the GhostSystem transfers the players mind to their ghost, which causes issues by making it way harder and convoluted to get the mind ( i think )

ill get back to tis after going through the other comments

((i think MapInitEvent is what you meant, sorry if thats wrong, its the thingi that came up when looking for it))

Copy link
Member

Choose a reason for hiding this comment

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

cooked I'll look into it

visuals:
enum.GhostVisuals.Damage:
ghostVariant:
ghost_blunt1: { state: ghost_blunt1 } # this is an icki way of doing this u.u -Thinbug
Copy link
Member

Choose a reason for hiding this comment

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

I agree with your comment 🤔

I swear there is a better way to do this, spend a little bit of time but if you can't figure it out let me know and I'll try do investigate. Maybe this is the only way to do it but I doubt it 🤔

@PJBot PJBot added S: Awaiting Changes Status: Changes are required before another review can happen and removed S: Needs Review Status: Requires additional reviews before being fully accepted. Not to be replaced by S: Approved. labels Sep 23, 2025
@Thinbug0
Copy link
Contributor Author

almosts done with tis just the last feww steps have been tricky as heck so yeah slow

Copy link
Member

@beck-thompson beck-thompson left a comment

Choose a reason for hiding this comment

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

Some more things!

@Thinbug0
Copy link
Contributor Author

i did change all the b's and s's and p's into B's and S's and P's!!!! git just didnt feel like recognizing it smh u.u

will fixie but bleh its silly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A: Character/Species Area: Player characters and species features and content. Changes: Sprites Changes: Might require knowledge of spriting or visual design. D2: Medium Difficulty: A good amount of codebase knowledge required. P2: Raised Priority: Item has a raised priority, indicating it might get increased maintainer attention. S: Awaiting Changes Status: Changes are required before another review can happen size/M Denotes a PR that changes 100-999 lines. T: New Feature Type: New feature or content, or extending existing content

Projects

None yet

Development

Successfully merging this pull request may close these issues.