6646e9b6b6827

6646e9b6b6bf1
1 Guest is here.
 

Topic: Photosensitivity mod test Read 420 times  

6646e9b6b70fbZylonBane

6646e9b6b715c
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

6646e9b6b74ecNameless Voice

6646e9b6b7546
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.

6646e9b6b7617ZylonBane

6646e9b6b7680
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.

6646e9b6b77aeNameless Voice

6646e9b6b77f9
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.)

6646e9b6b7913ZylonBane

6646e9b6b7961
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 »

6646e9b6b7a1aNameless Voice

6646e9b6b7a65
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.
ATX have a function for the rain, it still rains inside buildings etc. tho.
Contact SMF 2.0.19 | SMF © 2016, Simple Machines | Terms and Policies
FEEP
6646e9b6b7b4a