[VScript] Trash-Talking Witches
A mod inspired by ChimiChamo’s Trash-Talking AI Specials: https://steamcommunity.com/sharedfiles/filedetails/?id=3295935969&searchtext=trash+talking
When a witch spawns, they’re given a name with a random attached number from 1-100. They will then proceed to chat when any of the following events occur:
- They spawn
- They’re startled
- Somebody types in chat
- They’re burning (they’ll chat very violently when this happens)
- They die
- They get scratched by an infected player
- They incap a survivor
- They kill a survivor (with a chance to deliver a special insult to the survivor they killed, depending on who it was)
- The survivors are all wiped out
When you load a map with this script enabled for the first time, a settings folder will be created in l4d2’s ems folder by the name of "trashtalkingwitches". There’s a bunch of .cfg files with which you can customize the text chat lines of the witches. There’s also a file called "chances.cfg" which you can use to modify the chances of a witch speaking. (from 0% to 100% chance)
Most of the chance names are obvious, but here’s a little explanation to clear up 2 of them:
Kill_Survivor is the chance of chatting when a survivor dies in general. Kill_Survivor_Specific is the chance of chatting a special line based on which survivor was killed. Setting Kill_Survivor to 0 will make Kill_Survivor_Specific never happen. Setting Kill_Survivor_Specific to 0 will only make witches chat generic kill lines regardless of which survivor they killed.
Make sure you open the .cfg files with something other than the default notepad (such as Notepad++ or Visual Studio Code), else there’s a chance that you might see a chinese mess in the file instead.
ChimiChamo for the mod inspiration and allowing me to borrow a function from his code.