Half-Life: Alyx

Half-Life: Alyx

53 ratings
Alyx Wears Glasses
   
Award
Favorite
Favorited
Unfavorite
Game Content: Custom Mechanics
Difficulty: No Combat
Tags: Alyx Addon
File Size
Posted
Updated
630.866 KB
31 Dec, 2021 @ 11:18pm
12 Sep, 2024 @ 3:12am
4 Change Notes ( view )

Subscribe to download
Alyx Wears Glasses

Description
Body Holsters

Experience the unseen inconvenience of Gordon's combat as Alyx deals with her macular degeneration by donning a hastily constructed pair of glasses.

This addon require AlyxLib to work.

How To Use

This addon should work in any map including workshop maps.

You will start with glasses on your face when the map is loaded. They can be taken off by hand or knocked off by movement and interaction with the world. They can be put back on by dropping them on your face just like the face mask.

The amount of vision blur is dependent on your difficulty setting by default. You can change the amount at any time using the console commands below.

If the dropped glasses cannot be found after certain amount of time they will emit a beeping sound and glow to aid your search.

Console Commands

If you don't know how to use the console, follow this guide: https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=2040205272



  • glasses_drop
    Forces the glasses to drop off the player head.

  • glasses_wear
    Forces the glasses to be worn on the player head.

  • glasses_blur_amount
    Default = (Depends on difficulty)
    Must be a value of 0, 1, 2, or 3. Sets the amount of blur shown when the glasses are not worn, with 0 being the smallest amount and 3 being the biggest amount.
    This convar is persistent with your save file.

  • glasses_wear_distance
    Default = 4
    Distance from the head at which glasses will always be worn when released.
    This convar is persistent with your save file.

  • glasses_accurate_wear_distance
    Default = 10
    Distance from the head at which glasses will be worn if accurately aligned with face.
    This convar is persistent with your save file.

  • glasses_drop_from_look_down_chance
    Default = 0.05 (5%)
    [0-1] (1=100%) chance that the glasses will drop when looking down.
    This convar is persistent with your save file.

  • glasses_drop_from_barnacle_grab_chance
    Default = 0.6 (60%)
    [0-1] (1=100%) chance that the glasses will drop when the player is grabbed by a barnacle tongue.
    This convar is persistent with your save file.

  • glasses_drop_from_head_twitch_chance
    Default = 0.0 (0%)
    [0-1] (1=100%) chance that the glasses will drop when the player moves their head quickly.
    This convar is persistent with your save file.

  • glasses_drop_from_jump_forward_chance
    Default = 0.02 (2%)
    [0-1] (1=100%) chance that the glasses will drop when the player moves/jumps forward quickly.
    This convar is persistent with your save file.

  • glasses_drop_from_jump_down_chance
    Default = 0.5 (50%)
    [0-1] chance that the glasses will drop when the player jumps down or up a great distance.
    This convar is persistent with your save file.

  • glasses_drop_from_damage_chance
    Default = 0.25 (25%)
    [0-1] chance that the glasses will drop when the player takes damage.
    This convar is persistent with your save file.

  • glasses_hint_delay
    Default = (Depends on difficulty)
    Number of seconds to wait before displaying a hint of the glasses location when they're dropped on the ground.
    This convar is persistent with your save file.

  • glasses_use_hint_sound
    Default = 1
    Glasses will play a sound very glasses_hint_delay seconds when dropped on the ground to help you locate them while vision is blurry.
    This convar is persistent with your save file.

  • glasses_use_hint_sound
    Default = 1
    Glasses will emit a particle after glasses_hint_delay seconds when dropped to help you locate them while vision is blurry.
    This convar is persistent with your save file.



Console commands can be set in the launch options for Half-Life: Alyx, just put a hyphen before each name and the value after, e.g. -glasses_use_hint_sound 0
They can also be added to your Half-Life Alyx\game\hlvr\cfg\skill.cfg file, one per line without the hyphen, e.g. glasses_use_hint_sound 0

Source Code

GitHub: https://github.com/FrostSource/body_holsters

Known Issues

Ammo displays on visible holstered weapons will show incorrect amount of ammo. Unfortunately I have not found a way to get the current ammo inside a weapon.

Trying to grab a weapon near the face while wearing a mask or respirator will cause the player to accidentally remove the worn item instead of the weapon. Unfortunately I have not found a way to get around this.

Due to the way Half-Life: Alyx works, the multitool will fail to function correctly if equipped by some means other than the weapon selection menu. The multitool is not allowed to be holstered by default for this reason.

Maps without a backpack will function incorrectly.

Holstering can be buggy when the head is mismatched from the real life body (looking sideways while facing forwards). There is no easy way to track where the body is relative to the head.

If a map allows the player to have the same custom weapon in more than one weapon slot, holstering both might cause issues.

body_holsters_require_trigger_to_unholster will cause rapidfire weapons to shoot if the trigger is held too long after unholstering.

Getting Help

Please feel free to reach out either by commenting below or messaging me on the Discord server!

[discord.gg]
50 Comments
UBEY 1 Sep @ 3:50am 
perfect.
Psina 1 Mar @ 3:15am 
this is how wireless pcvr looks for me because of my bad internet connection
Child_Labor_Safe_Job 8 Dec, 2024 @ 7:39pm 
oh my god, finally a mod that replicates astigmatism
𝓔𝓥𝓘𝓛 Scari 23 Nov, 2024 @ 2:32pm 
mr. friendly half life alpha
Eden Mair 13 Nov, 2024 @ 6:26am 
When I play with VR it's like wearing glasses one prescription lower than your supposed to. So everything is just a little bit blurry for me anyways 😆
venomsgamer101 4 Apr, 2024 @ 4:49am 
Finally, some representation!
CAT ꑭ 3 Apr, 2024 @ 2:21am 
AHAHAHAHAH I LITERALLY PLAY LIKE THAT
shape 31 Mar, 2024 @ 4:50pm 
who would want this XD
FrostEpex  [author] 14 Mar, 2024 @ 7:31pm 
I've tried to figure out what causes it but I've only experienced it once, then never again after a reload in any version I try so I can't debug. I developed on 5700xt and tested on a 4080
The one time it didn't work it couldn't read the postprocess file, no idea what causes this.

I can try different things but I'd be doing it blind because it already works for me, I'd need someone to test it.
Somedudeiguess 7 Mar, 2024 @ 3:09pm 
my renderer is Direct3D 11 and my graphics card is a NVIDIA GeForce RTX 4070