API
Accessibility
Player settings for color vision, flashes, shake and blood, and the menu that keeps them.
PassForgeAccessibility
Settings for a game's options menu that help players: a safe mode that tones down flashes and shakes for players sensitive to them, sliders for both, colors adjusted for color blindness, a text size for Pass Forge's on-screen numbers, and a blood setting for players who would rather not see blood. They apply to every camera that shows Pass Forge's screen effects and need no Volume. They start at their defaults each time the game starts, unless they were kept with Save, which brings them back by itself.
public static class PassForgeAccessibility
Namespace PassForge.Effects, assembly PassForge.Runtime.
PassForgeAccessibility.safeMode
One switch for players sensitive to flashing and motion. Lightning and flashbangs from Screen Flash, Impact Frames, Flash Lights and highlight flashes dim to a quarter, lightning lights up once instead of flickering, and Screen Shake moves a quarter as far. An aimed flashbang spreads its white from its point over a moment instead of at once. Damage numbers lose most of their white flash, pop and shake, and keep rising, fully readable. Off-screen Indicators and Compass Bar markers hold steady: no pulse, nudge or bob, and pings show one steady ring. Deband's noise stays still. Lens Blood fades in, stays smaller and drips slower. Route arrows and dashes hold still. Beacons hold steady: no pulse, ripple, rising motes or bands.
public static bool safeMode { get; set; }
PassForgeAccessibility.flashStrength
How strong flashes are, from 0 for none to 1 as designed, for an options slider. Safe mode lowers them further.
public static float flashStrength { get; set; }
PassForgeAccessibility.shakeStrength
How far Screen Shake moves the picture, from 0 for not at all to 1 as designed. Safe mode lowers it further.
public static float shakeStrength { get; set; }
PassForgeAccessibility.colorBlindness
The color blindness the picture is adjusted for, so colors the player cannot tell apart move to ones they can. None leaves colors as they are. A Color Vision effect turned up in a Volume shows instead. Compass Bars on a Screen Space - Overlay canvas, which draws after the picture, adjust their markers to match.
public static ColorBlindness colorBlindness { get; set; }
PassForgeAccessibility.colorAdjustment
How strongly colors are adjusted for color blindness, from 0 to 1.
public static float colorAdjustment { get; set; }
PassForgeAccessibility.textScale
How big Pass Forge's on-screen numbers are, from 1 as designed to 2 for twice the height, for players who need larger text: damage numbers, the distances beside Off-screen Indicators, the numbers on Compass Bars, and the ring labels on Fog of War Radars, which shrink to fit between close rings.
public static float textScale { get; set; }
PassForgeAccessibility.blood
How Lens Blood shows: as designed; not red, where red splats take the Lens Blood component's Toned Down Color and green alien blood, oil and paint stay; or off, which also clears the blood on the lens at once.
public static BloodSetting blood { get; set; }
PassForgeAccessibility.hasSaved
True when settings kept with Save are on this machine.
public static bool hasSaved { get; }
PassForgeAccessibility.Save()
Keeps the settings with PlayerPrefs, so they come back by themselves the next time the game starts. The Accessibility Menu component saves every change; a game with a save system of its own can skip this.
public static void Save()
PassForgeAccessibility.Load()
Puts back the settings kept with Save. Returns false when none were kept.
public static bool Load()
PassForgeAccessibility.ClearSaved()
Forgets the settings kept with Save and puts every setting back to how a game first starts: safe mode off, full flashes and shakes, normal colors, normal text and blood shown.
public static void ClearSaved()
PassForgeAccessibilityMenu
Connects an options menu's controls to PassForgeAccessibility: a safe mode toggle, sliders for flashes, screen shake, color adjustment and text size, a color blindness dropdown and a blood dropdown. Changes apply at once and are saved, and the saved choices come back by themselves the next time the game starts. Every control is optional, so it fits a menu of your own; GameObject > Pass Forge > Accessibility Menu makes a ready one.
public sealed class PassForgeAccessibilityMenu : MonoBehaviour
Namespace PassForge.Effects, assembly PassForge.Runtime. Add Component: Pass Forge > Accessibility Menu.
PassForgeAccessibilityMenu.SetSafeMode(bool)
Switches safe mode and saves it.
public void SetSafeMode(bool on)
PassForgeAccessibilityMenu.SetFlashStrength(float)
Sets how strong flashes are, from 0 to 1, and saves it shortly after.
public void SetFlashStrength(float strength)
PassForgeAccessibilityMenu.SetShakeStrength(float)
Sets how far the screen shakes, from 0 to 1, and saves it shortly after.
public void SetShakeStrength(float strength)
PassForgeAccessibilityMenu.SetColorBlindness(int)
Sets the color blindness colors are adjusted for, in the order of the dropdown, and saves it.
public void SetColorBlindness(int index)
PassForgeAccessibilityMenu.SetBlood(int)
Sets how blood shows, in the order of the dropdown: Shown, Not Red or Off, and saves it.
public void SetBlood(int index)
PassForgeAccessibilityMenu.SetColorAdjustment(float)
Sets how strongly colors are adjusted, from 0 to 1, and saves it shortly after.
public void SetColorAdjustment(float amount)
PassForgeAccessibilityMenu.SetTextScale(float)
Sets how big on-screen numbers are, from 1 to 2, and saves it shortly after.
public void SetTextScale(float scale)
ColorBlindness
A kind of color blindness the Color Vision effect adjusts or shows the picture for.
public enum ColorBlindness
Namespace PassForge.Effects, assembly PassForge.Runtime.
| Value | Meaning |
|---|---|
None | Colors as they are. |
Protanopia | Reds look dark and close to greens: about one man in a hundred. |
Deuteranopia | Greens look close to reds, the most common kind: about five men in a hundred. |
Tritanopia | Blues look close to greens and yellows to pinks. Rare. |
Achromatopsia | No colors at all, only light and dark. Very rare, and only shown, since no adjustment helps it. |
BloodSetting
How Pass Forge shows blood, for players who would rather not see it.
public enum BloodSetting
Namespace PassForge.Effects, assembly PassForge.Runtime.
| Value | Meaning |
|---|---|
Shown | Blood as the game designs it. |
NotRed | Red splats show in the Lens Blood component's Toned Down Color; other colors stay. |
Off | No blood on the lens at all. |