Left 4 Dead 2

Left 4 Dead 2

Lux's Survivor Legs script
 This topic has been pinned, so it's probably important
Shadowysn  [developer] Oct 5, 2022 @ 10:09am
Technical Stuff (settings.cfg, etc)
A settings.cfg file will be generated into Left 4 Dead 2/left4dead2/ems/survivor_legs
Settings available are:
Setting
Default
Description
LegsOffsetX
0.0
The legs' position on your body will be offset by the amount you set. Big enough values may cause the legs to disappear or flicker.
LegsOffsetY
0.0
LegsOffsetZ
-20.0
LegsRotationPitch
-89.0
If you're familiar with how objects are rotated in this game, you may be confused by the default value of this and LegsOffsetZ.
The rotation of the survivor's eyes influences the rotation of the legs around the feet of the player.
LegsRotationYaw
0.0
The legs' rotation on your body will be offset by the amount you set.
LegsRotationRoll
0.0
LegsFadeDist
24.0
For now, this setting is hardcoded to 8.
If demand is high enough, this setting will be readded.
ShowItemsOnLegs
true
Show your pistols, health items and throwables on your legs. This spawns duplicate unusuable items on your legs to simulate this.
RenderLegsOnLowDetail
false
Allow legs to render on low detail, simulate behavior from L4D1.

The addon has functionality on all gamemodes and maps, but for PvP gamemodes like Versus it is automatically disabled by Valve.
To make it work in Versus on your local server, right-click on Left 4 Dead 2 in your steam library, select Properties, click on the Installed Files tab, then click on the Browse... button.
Go to left4dead2/cfg/ and open addonconfig.cfg with a text editor or Notepad.
Finally, edit this line:
"versus" "1"
to
"versus" "0"
Last edited by Shadowysn; Jul 21, 2023 @ 11:45pm
< >
Showing 1-13 of 13 comments
What did the fade distance do? Do you have an example of what it looked like?
BlackNBoom Jul 9, 2023 @ 7:16pm 
That's alot to do.
jeuse Dec 9, 2023 @ 3:19pm 
is there a way to not make them rotate? like in l4d1? or does the player model passes through your camera?
Shadowysn  [developer] Dec 9, 2023 @ 8:52pm 
Originally posted by ElTamales:
What did the fade distance do? Do you have an example of what it looked like?
It was a setting that controlled the hacky way of hiding the legs model from everyone else except the legs user. It was basically how close you are to the legs model you needed to be for it to show.
I felt it was unnecessary to be modifiable by players though, so I removed it.
Originally posted by jeuse:
is there a way to not make them rotate? like in l4d1? or does the player model passes through your camera?
Nope, the rotating is a side-effect of the only way to have the legs model smoothly follow the player. I tried to fix it, but they all made the legs no longer follow smoothly and broke the illusion badly.
Firedyne Mar 9, 2024 @ 8:32pm 
I can't figure out how to configure the settings in the config. All that it says in the config is ൻऊ敌獧晏獦瑥⁚‽㈭⸰〰਍䰉来佳晦敳塴㴠〠〮രऊ敌獧晏獦瑥⁙‽⸰〰਍匉慨潤䱷来䵳摯汥㴠映污敳਍䰉来剳瑯瑡潩奮睡㴠〠〮രऊ敒摮牥敌獧湏潌䑷瑥楡‽牴敵਍匉潨䥷整獭湏敌獧㴠琠畲൥ऊ敌獧潒慴楴湯楐捴⁨‽㠭⸹〰਍䰉来剳瑯瑡潩剮汯‽⸰〰਍} and Idk what any of it means bc I can't even translate most of it
Shadowysn  [developer] Mar 9, 2024 @ 8:35pm 
Originally posted by Firedyne:
I can't figure out how to configure the settings in the config. All that it says in the config is ൻऊ敌獧晏獦瑥⁚‽㈭⸰〰਍䰉来佳晦敳塴㴠〠〮രऊ敌獧晏獦瑥⁙‽⸰〰਍匉慨潤䱷来䵳摯汥㴠映污敳਍䰉来剳瑯瑡潩奮睡㴠〠〮രऊ敒摮牥敌獧湏潌䑷瑥楡‽牴敵਍匉潨䥷整獭湏敌獧㴠琠畲൥ऊ敌獧潒慴楴湯楐捴⁨‽㠭⸹〰਍䰉来剳瑯瑡潩剮汯‽⸰〰਍} and Idk what any of it means bc I can't even translate most of it
What kind of text editor are you using. Normal Notepad should work.
This is what the settings should look like:
{
LegsOffsetZ = -20.00
LegsOffsetX = 0.00
LegsOffsetY = 0.00
LegsRotationYaw = 0.00
RenderLegsOnLowDetail = false
ShowItemsOnLegs = true
LegsRotationPitch = -89.00
LegsRotationRoll = 0.00
}
Last edited by Shadowysn; Mar 9, 2024 @ 8:36pm
Firedyne Mar 10, 2024 @ 4:29pm 
I was using normal notepad, I'm as confused as you are lol. Idk why it's showing up like that, I doubt it's bc I'm on Windows 11 but who knows. Anyhow, thanks xD
Firedyne Mar 10, 2024 @ 4:39pm 
Okay so apparently it's normal notepad that was the issue bc I opened it with notepad++ and it's showing what you responded with
Shydun24 Mar 29, 2024 @ 12:19pm 
is it possible to edit this so the third person arms are visible and the first person arms are invisible?
Firedyne Mar 30, 2024 @ 6:43pm 
No that's not possible with this mod, but there is a command where you can by attach the 3rd person shoulder camera to the head bone of a model's skeleton and get what you're wanting. "cl_camera_follow_bone_index"

Enter the following first into the dev console: "cam_idealdist 0" "cam_ideallag 0" "cam_idealpitch 0" "cam_idealyaw 0" "c_thirdpersonshoulderaimdist 1000" 'c_thirdpersonshoulderoffset 0"
----------------------------------------------------------------------------------------------------------------------------------
Here's the command value to attach the camera to the head bone of the default survivor's:

For when you're Rochelle: cl_camera_follow_bone_index 16
For when you're Coach: cl_camera_follow_bone_index 17
For when you're Nick: cl_camera_follow_bone_index 14
For when you're Ellis: cl_camera_follow_bone_index 14
For when you're Zoey: cl_camera_follow_bone_index 14
For when you're Louis: cl_camera_follow_bone_index 14
For when you're Francis: cl_camera_follow_bone_index 14
For when you're Bill: cl_camera_follow_bone_index 14
----------------------------------------------------------------------------------------------------------------------------------
With custom models you'll have to find the head bone yourself by entering different values. For example, the head bone on the Arcane Jinx model for Louis is bone_index 55 and the Meow Skulls model for Zoey is bone_index 16.

I made a guide back in 2022 for this with a bit more detail if you want to read it
https://steamcommunity.com/sharedfiles/filedetails/?id=2894548492
Shadowysn  [developer] Mar 30, 2024 @ 8:39pm 
Originally posted by Shydun24:
-snip-
Originally posted by Firedyne:
-snip-
The system that the legs mod work on also doesn't allow thirdperson arms to work properly, because the legs entity itself rotates with the player's view and reuses the entire survivor body. You will very noticeably see your cloned body clip through you to reveal your clone's face, or the arms to visibly sink away behind your view if you are facing forward.
SesbianLex Oct 16, 2024 @ 4:13am 
There's an option to allow you to you see your own shadow in first person but it also makes you see third person arms (so you have two pair or arms), is it fixable?
it's ShadowLegsModel
Shadowysn  [developer] Oct 16, 2024 @ 4:16am 
Originally posted by ебырь чайки:
There's an option to allow you to you see your own shadow in first person but it also makes you see third person arms (so you have two pair or arms), is it fixable?
it's ShadowLegsModel
That's an abandoned setting there is no way to display the shadow properly without revealing your legs model has it's back broken. The duplicate of your arms was an attempted experiment but it didn't work.
I'm going to remove that setting from the code.
Last edited by Shadowysn; Oct 16, 2024 @ 4:16am
< >
Showing 1-13 of 13 comments
Per page: 1530 50