Left 4 Dead 2

Left 4 Dead 2

Witches get angered by flashlights
244 kommentarer
Hakimi the [PROTOTYPE] 12. okt. kl. 23:07 
Basically, lore accurate Witch
SHiFT_DeL3TE 9. okt. kl. 23:15 
i hope a talker goes along with this mod, when the lights are on, the other survivor says "turn the light off!'
Xenorvya 20. aug. kl. 5:56 
Looking forward to V2 where looking at a Witch with your light (using vectors/dot product/the area near your crosshair) will actually cause her to get angry at that survivor and not others nearby.
Doesn't seem easy, unless you plan on making it an instant startle with 0.0 damage?

Currently, it just increases some cvar values, which makes it so she notices the closest survivor due to how she works. increasing her personal space range or threat_normal/hostile values will only affect her range for all survivors, not the one with the light specifically.

She can also detect you (but not see you) through walls (as heard by the gasping sound) when you turn on your light near her.
Geebanger0  [ophavsmand] 14. aug. kl. 17:29 
@PEACEandLOVE all the variables this mod uses only affect sitting Witches. I will need to come up with a completely new way of aggroing wandering witches
Geebanger0  [ophavsmand] 14. aug. kl. 17:29 
@ash yes I will make a V2, I just keep forgetting to
PEACEandLOVE 14. aug. kl. 17:18 
I understand and agree canonically and immersion-wise. I do think it would make the wandering witches a bit more formidable. As is, sitting witches are either (a) walk aroundable OR (b) not. In rare cases (c) there is a non-obvious way of circumventing them.

I'm still brainstorming ways to make the witch more formidable as a gameplay element. I have the insta-kill and relentless witch mods... and I've taken all the glow effects out and most of the warning sounds. With all that AND this mod, a well positioned sitting witch is a MENACE. Especially on low visibility areas where you want your light. But the standing witch is a bit too easily cheesed in open areas. Need some way to buff the standing witch that's out in the open.
ash 14. aug. kl. 17:12 
you think you'll ever add that fix alpha made so witches don't aggro by light no matter where it's pointing at? because as it stands you could turn on a flashlight past a witch or while not even looking her way and she aggros anyway
Geebanger0  [ophavsmand] 14. aug. kl. 17:08 
Because only sitting Witches are meant to be affected by lights. Wandering Witches appear in daytime levels where it's already bright
PEACEandLOVE 14. aug. kl. 16:33 
How to make it so that this also affects standing/walking witches? Currently it only affects sitting witches.
Geebanger0  [ophavsmand] 4. juli kl. 16:58 
no idea
GI1TcH!mg G@M3R (R.A.Sudios) 4. juli kl. 15:14 
Is it possible for you to fix the issue or no?

Thanks!
GI1TcH!mg G@M3R (R.A.Sudios) 4. juli kl. 15:12 
@Geebanger0
Hey there, I've experienced a crash when using this mod with the immersive first person with Louis
https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=3425937883
any idea why this crashes L4D2 when I have these two addons enabled together

I looked into the crash report and searched up .vpk in the crash report, the first listed .vpk file that I have found was your mod
steamapps\common\left 4 dead 2\left4dead2\addons\workshop\3294544528.vpk
and the second one is \steamapps\common\left 4 dead 2\left4dead2\addons\workshop\3425937883.vpk
@Geebanger0
Thanks so much for letting me know, as I thought your mod was wrong or something because it only worked for me with sitting witches rather than walking ones :)
Geebanger0  [ophavsmand] 11. maj kl. 3:26 
yes

(the cvars this edits to make them mad only apply to sitting witches)
@Geebanger0
I tried your mod and it doesn't work on the walking witches.
Could it be because their eyes are covered and they can't see the flashlight?
ravenz 10. maj kl. 20:23 
i tested it and it does only have a minor effect
Geebanger0  [ophavsmand] 10. maj kl. 20:22 
i think it only has a minor effect on standing witches
ravenz 10. maj kl. 17:59 
does this effect both witch states or just only sitting witches?
Geebanger0  [ophavsmand] 17. apr. kl. 3:12 
im cooked atm, I'll add you so we can sort it out though
Alpha 16. apr. kl. 13:24 
bro, I found there is a better way to startle witch.
In your mod, survivors will startle witches when turning on flashlight whichever they are forward to her or not. I think it's not logically.
So I add a function to check it.

function IsForward(player, witch) {
local playerPos = player.EyePosition()
// witch is sitting, so z is half
local witchPos = Vector(witch.GetOrigin().x, witch.GetOrigin().y, (witch.GetOrigin().z + witch.GetCenter().z) / 2)

local eyesForward = player.EyeAngles().Forward()
local posForwsrd = witchPos - playerPos

local cosine = posForwsrd.Dot(eyesForward) / (posForwsrd.Length() * eyesForward.Length())
return cosine > 0.95
}

Add it into the condition "survivor.IsSurvivor() && !survivor.IsDead() && IsFlashlightOn(survivor)" by &&, then only survivors looking at witches with flashlight on, she will be startled.
Due to firearm holding animations, there are slight variations in the exact trigger angles.
I've tested it, works.
Alpha 16. apr. kl. 10:42 
Nice mod bro~ I like it !
But is there any situation that makes with attack wrong target ? e.g my teammate flash witch but I am the nearest one by her, leading to she attack me?
Sieg Rem 26. mar. kl. 22:42 
Nice:steamthumbsup::steamthumbsup::steamthumbsup:
PEACEandLOVE 18. feb. kl. 22:24 
You're a saint my man!
PEACEandLOVE 18. feb. kl. 22:11 
https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=3122135034

Slight caveat on this mod - my initial impression was a little imprecise - it completely removes ALL survivor outlines including in/out of Rescue Closets.
PEACEandLOVE 18. feb. kl. 22:00 
I actually just found a mod that removes the outlines! So as long as your mod was compatible with it (I'll share a link) then we could avoid dealing with that part.

And yes actually what you're laying out sounds even better - I like the idea of the survivor corpses in there with her.

DM me for more details and a fair commission amount for your time and skills.
PEACEandLOVE 18. feb. kl. 20:17 
This mod cannot be played without. True Vanilla improvement.

I've been looking to commission a similar mod (in that it makes witch's more of a threat in-line with how the cinematic intro presents them). Basically, Rescue Closets would have a certain odds % of Witches (resting AND automatically startled) spawning instead of survivors. Say 80% Survivors, 10% resting witch, 10% door-startled witch. To maintain uncertainty and suspense, Rescue Closet's survivor silouette would be removed and 'help' audio would be replaced by doorknob rattling, banging against the door, etc.

Just like this mod leaves user input for the flashlight-trigger range, the odds % of survivor/restingwitich/startled witch spawning could be customized.

Let me know if this idea interests you or sounds feasible! I've asked a couple other modders so far but so far I'm hearing it's either uninteresting or not technically possible due to the game's code.
★JΛKΣ★ 15. feb. kl. 11:13 
does it affect wandering witch?
Geebanger0  [ophavsmand] 9. feb. kl. 2:09 
it does
★JΛKΣ★ 9. feb. kl. 2:08 
Bots flashlight doesn't affect the witch right?
Geebanger0  [ophavsmand] 14. jan. kl. 10:33 
im sorry you had to do through that
BundyIsHome 14. jan. kl. 6:14 
Honestly made me clench my butthole when it happened
Brix 12. jan. kl. 8:51 
For some reason, this mods changes the AK-47, both tier one shotguns, M16 and magnun's skins
Hope L4D3 can achieve
Harriko 29. dec. 2024 kl. 12:34 
That would be awesome! It'd be selfish of me to ask you to make it for me, but if you find any tips of how to get started, that'd be great. You've done some really creative scripts, and I hope to see more :DD
Geebanger0  [ophavsmand] 29. dec. 2024 kl. 2:25 
i think thats possible. just based on the idea ive got a rough plan for how it could be made, though i havent done a lot of work with fog before so im not sure how it would behave with multiple players. If you'd like, I can give it a shot tomorrow and see what I come up with; either make the script for it or at least find out some info you could use to make it yourself
Harriko 29. dec. 2024 kl. 0:56 
OH heya, I wanted to try an effect where there would be heavy fog, but turning on your flashlight would push it away. Just curious if that's possible
Geebanger0  [ophavsmand] 28. dec. 2024 kl. 15:31 
what are you trying to do
Harriko 28. dec. 2024 kl. 15:28 
This is such a cool idea for a mod. Quick question about it tho, is there a way to have the effects active without the witch spawn? wanna do a personal edit, but not sure how to set it up
Geebanger0  [ophavsmand] 23. nov. 2024 kl. 1:13 
i think theyre sexist
Xenorvya 23. nov. 2024 kl. 1:03 
That'd be great; currently Valve's flashlight effect on the Witch is flawed; it uses "z_witch_hostile_at_me_anger"'s value to determine how fast she gets up from it, but this also affects how fast she gets up when shooting/attacking with melee, so it's not very reliable. Not to mention that if, for example Nick (with his light off) is infront the Witch but you are behind Nick and you look at the Witch with your light on, she won't care. She is only affected by the flashlight by the closest survivor. Valve certainly has weird ways to code the Witch's behaviors.
Geebanger0  [ophavsmand] 23. nov. 2024 kl. 1:00 
i will make that one day
Xenorvya 23. nov. 2024 kl. 0:26 
V Perhaps one day we'll get a mod that startles a Witch like in the trailer. As in if a survivor has their light on and looks in the general direction of the Witch (not behind walls, but works through windows/fences), then the Witch is dealt 1 damage and told it's the survivor with the light that looked at her that damaged her, so that she gets sent after that player. An immediate startle when looking at her with the light on, so that you truly have to turn off your lights until you know where she is. Once startled the flashlight shouldn't affect her. I think Wandering Witches should be optionally affected (via EMS toggle settings)
Illya 9. nov. 2024 kl. 15:29 
This would be hard to recreate alone. If you are interested we can perhaps play a game so I could show you what I mean and see for yourself. I sent you a friend request.
Illya 9. nov. 2024 kl. 15:26 
@Geebanger0 I believe that would be the problem by itself. Your script will always return true if a survivor with a flashlight on is within range, even if they are facing away from the witch. If you could somehow add a condition FlashlightOnCvars() if the survivor has their flashlight on and is facing a witch.
Geebanger0  [ophavsmand] 9. nov. 2024 kl. 15:04 
well thats a bit odd, it should only trigger if the person with their light on is within range
Illya 9. nov. 2024 kl. 14:18 
If you could somehow modify the requirements for "FlashlightOnCvars()" to be true in a different way that would only make the witch more aggressive to the person facing her with the flashlight turned on.
Illya 9. nov. 2024 kl. 14:16 
Scenario 1
First I asked my friend to move very far away from the witch and turn on the flashlights, me facing the witch behaved normally without flashlights on, even if my friend has flashlights on but very far away.

Scenario 2
I asked my friend to stay with me in the same area, No mercy rooftop to be specific. I spawned a witch and asked to move some distance from it and turn off flashlights. Mine is off too. As expected witch is not that aggressive. Here is the problematic part. I asked my friend, who is still in the same rooftop but still pretty far away from the witch to turn on the flashlights but facing away the witch. Me who is closer and facing the witch still have my flashlight off. Even with my flashlights off, the witch got startled really fast and attacked me, even if my flashlight is off and my friend who has his flashlight on is not even facing the witch at all and has a considerable distance from the witch.

Great mod btw! I loved it.
不能修復的痛 22. okt. 2024 kl. 3:22 
This is what it looks like in the trailer, but the game lacks this feature.
SleepyNotDead 18. okt. 2024 kl. 21:16 
makes sense.
Geebanger0  [ophavsmand] 18. okt. 2024 kl. 12:49 
Yeah it’s not supposed to work on the wandering witch, they use different aggression variables and I didn’t change them because they’ve already got the sun shining in their face.