66379cb6b24ae

66379cb6b2d37
1 Guest is here.
 

Topic: Photosensitivity mod test Read 406 times  

66379cb6b33dfZylonBane

66379cb6b345e
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

66379cb6b39afNameless Voice

66379cb6b3a18
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.

66379cb6b3b44ZylonBane

66379cb6b3b9d
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.

66379cb6b3d18Nameless Voice

66379cb6b3d70
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.)

66379cb6b3eb9ZylonBane

66379cb6b3f0f
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 »

66379cb6b4010Nameless Voice

66379cb6b406a
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.
James Bond is an operative, not a spy.
Contact SMF 2.0.19 | SMF © 2016, Simple Machines | Terms and Policies
FEEP
66379cb6b41a8