664724e4acd0d

664724e4ad2e2
1 Guest is here.
 

Topic: Photosensitivity mod test Read 422 times  

664724e4ad7baZylonBane

664724e4ad81c
Figured I'd throw this in Engineering for a bit before inflicting it on the world.
Code: [Select]
System Shock 2 Decent Exposure Mod 0.9
22 November 2023
by ZylonBane

Requires SS2 NewDark patch v2.46 or higher.

"No more flashers!"

This is an accessiblity mod for players with sensitivity to flashing lights (photophobia,
photosensitive epilepsy).
- Sets animated lights with a brighten or dim interval of less than 1/3 second to
  permanently "on".
- Suppresses screen flash from player damage.
- Reduces screen flash from psi overload.
Modifying the screen flash effects was an absurd hack that frankly I'm surprised even works. Since all screen flashes are triggered by the massive player script, and rewriting that isn't an option, this just listens for the same damage events, then issues an overriding screen flash command with reduced duration or brightness.

Unfortunately the radiation screen flash couldn't be overridden in this way, since it runs off an internal timer instead of an external event.
« Last Edit: 08. January 2024, 21:01:07 by ZylonBane »
Acknowledged by: Marvin

664724e4adbd0Nameless Voice

664724e4adc24
Unfortunately the radiation screen flash couldn't be overridden in this way, since it runs off an internal timer instead of an external event.

Couldn't you listen for the same timer?  It's a Timer message with data RadDamage.

664724e4adcebZylonBane

664724e4add42
Eh, maybe. The player script fires off so many timers so frequently that I'm loathe to hook Squirrel into that.

Well for a fringe mod like this I might give it a shot.

664724e4ade69Nameless Voice

664724e4adeb3
Shouldn't matter much, you just listen for the Timer message, check the timer name, and return if it's not the one you're interested in.
That's how timer messages are handled.  There's even a script in NVScript that hooks into RadDamage to do this exact thing, allowing you to specify the fade colour for the radiation damage effect.  I think it was used in SecMod to change the glow from green to blue.

Code is here: https://github.com/NamelessVoice/NVScript/blob/master/NVScript/NVScript-SS2.cpp#L2764
(Annoyingly, the indentation seems to be a little messed up.)

664724e4adfe0ZylonBane

664724e4ae032
Yes I know how listening for timer messages works, but in my head spinning up an interpreted scripting engine dozens of times per second, constantly, seems like something that wouldn't be great for performance. That's why SCP has avoided adding any timers to the player.

Okay, added it. Seems to work.

Code: [Select]
System Shock 2 Decent Exposure Mod v0.91
23 November 2023
by ZylonBane

Requires SS2 NewDark patch v2.46 or higher.

"No more flashers!"

This is an accessiblity mod for players with sensitivity to flashing lights (photophobia,
photosensitive epilepsy).
- Sets animated lights with a brighten or dim interval of less than 1/3 second to
  permanently "on".
- Removes full-screen flashes from standard damage, radiation damage, and psi burnout.
- Removes muzzle flashes from pistol, assault rifle, and shotgun.
« Last Edit: 08. January 2024, 21:02:07 by ZylonBane »

664724e4ae0fdNameless Voice

664724e4ae14f
Hadn't thought of the potential impact of it being done in Squirrel instead of C++.   Could probably actually use script from NVScript that I linked earlier instead, if that's a worry.
1 Guest is here.
Als die letzte Fackel verglüht ist, ist auch das Freiheitsgefühl verflogen. Sie sind wieder junge Menschen in schmutzigen Schuhen in einem verqualmten Tunnel.
Contact SMF 2.0.19 | SMF © 2016, Simple Machines | Terms and Policies
FEEP
664724e4ae21c