664716aa3862a

664716aa38b20
1 Guest is here.
 

Topic: Photosensitivity mod test Read 421 times  

664716aa38fe4ZylonBane

664716aa39044
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

664716aa3936fNameless Voice

664716aa393c3
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.

664716aa39492ZylonBane

664716aa394e8
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.

664716aa39642Nameless Voice

664716aa3968d
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.)

664716aa397abZylonBane

664716aa397f5
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 »

664716aa398aaNameless Voice

664716aa398f3
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.
Careful (A Life Is A Fragile Thing)
Contact SMF 2.0.19 | SMF © 2016, Simple Machines | Terms and Policies
FEEP
664716aa399c5