Barotrauma icon indicating copy to clipboard operation
Barotrauma copied to clipboard

Add "convulse" affliction type

Open TheNinjaScout opened this issue 1 year ago • 7 comments

Adds a new affliction type which can be used to make characters convulse.

If an affliction's type is "convulse", it will cause all of the afflicted character's limbs to shake around, similiarly to what happens to characters when they start dying from the husk infection.

https://github.com/user-attachments/assets/20264a5c-7495-4f63-b704-bb7d78da2514

TheNinjaScout avatar Sep 06 '24 00:09 TheNinjaScout

Now make 10 characters "convulse" at once and look at showperf

SomeRandomNoobKekeke avatar Sep 06 '24 00:09 SomeRandomNoobKekeke

Now make 10 characters "convulse" at once and look at showperf

Video on top shows 10+ characters convulsing around, second one is without the convulse affliction:

https://github.com/user-attachments/assets/4c5d32c1-5351-48a5-a322-e8bc6595efa9

https://github.com/user-attachments/assets/579ac681-0dfb-4f6a-a550-6f4a167b5e13

TheNinjaScout avatar Sep 06 '24 00:09 TheNinjaScout

Hmm weird I thought this is exact copy of husk transformation, and husk transformation is very laggy I thought it's laggy because of those convulsions, but perhaps there's some other reason

https://github.com/user-attachments/assets/6c4140f0-91b6-44f8-a0e0-c9e936f1c933

SomeRandomNoobKekeke avatar Sep 06 '24 01:09 SomeRandomNoobKekeke

Hmm weird I thought this is exact copy of husk transformation, and husk transformation is very laggy I thought it's laggy because of those convulsions, but perhaps there's some other reason

10.husk.transformations.mp4

Here's 10+ characters convulsing due to husk infection, no FPS drop either. I manually spawned them in through console commands and gave them the affliction- maybe using events to do that causes the lag?

https://github.com/user-attachments/assets/009c757b-056f-4978-b2ee-1232bb056a72

TheNinjaScout avatar Sep 06 '24 01:09 TheNinjaScout

maybe using events to do that causes the lag?

I don't think so

What is 1.5.9.2 unstable? :BaroDev:, is it unstable and they just forgot to change this label? or some custom version? Mb it's just fixed there

Or maybe you have non potato pc

If you want to be sure you can take this mod, open "a test chamber" sub in sub editor and type triggerevent "husk lag" in console

EDIT: I went to unstable and indeed husk transformation laggs much less there, so i guess it's just will be fixed also my unstable is 1.6.4.0 Screenshot_2

SomeRandomNoobKekeke avatar Sep 06 '24 01:09 SomeRandomNoobKekeke

What is 1.5.9.2 unstable? :BaroDev:, is it unstable and they just forgot to change this label? or some custom version? Mb it's just fixed there

If you want to be sure you can take this mod, open "a test chamber" sub in sub editor and type triggerevent "husk lag" in console

My "unstable version" is just me building the current repository as "unstable" instead of "release", it should in theory behave exactly the same as the current public steam version of the game, except for the modifications made in this PR. I'll experiment with your mod when I can and see what I can find out- there might be some sort of performance issue that only happens on the release builds an not on unstable.

TheNinjaScout avatar Sep 06 '24 02:09 TheNinjaScout

This seems to be caused by luatrauma directly BaroDev (wide)

SomeRandomNoobKekeke avatar Sep 06 '24 02:09 SomeRandomNoobKekeke

Thank you for the contribution! I feel there's one issue with the implementation: CalculateVitality does not seem like an appropriate place to apply the effect. I moved it to Affliction.Update and moved this to a PR in out private repo.

Regalis11 avatar Jan 10 '25 13:01 Regalis11