Left 4 Dead 2

Left 4 Dead 2

Not enough ratings
Reinforced Door (Vscript)
   
Award
Favorite
Favorited
Unfavorite
Game Content: Scripts, Miscellaneous
Game Modes: Single Player, Co-op
Items: Other
File Size
Posted
Updated
7.845 KB
May 18 @ 3:00am
May 19 @ 1:43am
3 Change Notes ( view )

Subscribe to download
Reinforced Door (Vscript)

In 1 collection by kurochama
Useful "Side-Dish" Mods (Especially for Bots)
41 items
Description
This is just a simple mod that modifies the status of a door that a survivor opens/ closes. When holding TAB & then pressing E on a door, the door can become either breakable/ unbreakable. When it becomes unbreakable, it changes color to red, but when it's breakable, it changes back to the original color. There's a notification when the door status is successfully changed.

Well, as it's a very simple mod, there's no cfg file, for now.


Available Chat Command:
Chat Command
Effects
change door color (red) (green) (blue)
Changes door color via chat. Format examples:
change door color 255 0 0
change door color 0 255 0
change door color 150 100 0


Injected Cvar
Injected cvar is a cvar injected with scripts to change door color based on crosshair color. This one remains active on next chapters if set via console.
Injected cvar
Description
cl_buy_favorite_quiet 1
- Changes door color based on your crosshair color
- White crosshair color is excluded
cl_buy_favorite_quiet 2
- Same, with a new feature to lock the unbreakable door
- The locked door will close automatically


So, with this mod, you can change the door to unbreakable one & go to kitchen to get your snacks & drink without worrying about zombies breaking the door before you're back in front of your pc :D .


NOTES:
  • It might be possible to change door status of the doors for the event that is originally unbreakable to be breakable (not tested yet).
  • When "cl_buy_favorite_quiet" is set to 2, there's a chance to unlock the locked doors in custom campaigns even without using keys.
14 Comments
kurochama  [author] May 19 @ 7:27am 
@Bonnie , I tested 2 custom campaigns with locked doors so far, "Resident Evil 1" & "Kokiri Forest". The locked door in RE1 didn't get unlocked with this mod, but the doors in "Kokiri Forest" got unlocked. Probably door types also affect it, like, if the doors are default doors like wooden/ metal doors, there's a chance that they will be unlocked even without keys, but if the doors are custom doors or with different models, they won't be unlocked by this mod. So, probably you can also try to test custom campaigns that use default doors as the locked doors that require keys.
Bonnie May 19 @ 7:09am 
about custom campaign with puzzle, still doesnt break the campaign so is work fine, the door wont unlock with quiet 2
i tried it without key and seem still locked, i guess other campaign such as silent hill
Bonnie May 19 @ 6:54am 
ah thank you, is worked, perfect for me to have barricaded feeling XD
kurochama  [author] May 19 @ 1:57am 
@Bonnie , now the door can be locked. There's no cfg file yet, but I used an unused cvar injected with scripts, so you can use that cvar instead.
kurochama  [author] May 18 @ 8:31pm 
@Kouga , it can be buggy to make the door detect common infected nearby & then open itself after several seconds, because even the door will be opened when there's only one common in front of the door.
& about the locking sound, somehow the sound is harder to hear because the sound of opening/ closing the door is also triggered at the same time, so that's why I used a different sound instead.

@Bonnie , as I explained below, adding locking/ unlocking on the door may also have a chance to affect the locked doors in custom campaigns that require keys to open, like for example, pressing TAB + E on those doors might unlock the doors without having to obtain the keys, so I still need to check some custom campaigns. & as zombies normally can't open a door, setting the door to be unbreakable is probably more than enough to keep them from entering.
Kouga May 18 @ 2:07pm 
and btw @kurochama havent you already achieved a locking doors mechanic with this mod? the functionality is the same (blocking access to the other side) its just the name is different. thats also why i asked for lock sounds, it doesnt have to work how you think it should, as long as it appears to be on the outside. thats my philosophy, at least.
Bonnie May 18 @ 2:00pm 
hmm what about adding cfg that actual locking the door like barricade it?
Kouga May 18 @ 12:36pm 
ur awesome @kurochama 👍definitely gonna mess around with this....oh and forgive me for insisting but i really like the idea of commons barging open doors, haha. what if instead of manually adding a script for detecting common infected attacks, you just make something that detects if commons are nearby > wait a certain amount of time (just enough for the commons to land a couple of hits, but this isnt really whats being detected)> force open the door. that might achieve the same effect? im not sure how viable it is as a method though. do let me know you're thoughts.
kurochama  [author] May 18 @ 10:57am 
@Kouga , I added a chat command & sound when the door becomes unbreakable. I also added a cvar injected with scripts to change door color. You can check the mod description.
kurochama  [author] May 18 @ 7:02am 
@Kouga , actually it's more complicated to detect common infected's attack on the door than player's & special infected's attack. Player & special infected have "weapon_fire" event function to detect the use of attack button, but common infected don't have it. So, it needs to be added manually via scripts & that would take time. It's better to stick to simplicity for now.
As for locking/ unlocking a door, I still don't plan of adding it because this may trigger an expoit (beneficial bug) or stuck bug in custom campaigns that have locked doors with missions to find keys, because there's a chance that the locking/ unlocking feature may also unlock the locked doors in custom campaigns.