Left 4 Dead 2

Left 4 Dead 2

View Stats:
Swishy Jun 25, 2023 @ 5:59am
Custom Voice-line Scripts?
Say I wanted to make Nick say something different when seeing a tank, but not simply replace it in the files because what I want him to say is longer than the og voice-line, since if you do that the sound is buggy. Just mainly wanting to know how people made stuff such as the L4D1 survivors calling out L4D2 common infected & making the survivors scream when Charged.
Originally posted by AlwaysToast:
What controls when survivors speak is the talker scripts, also called the response system.

When you want to look at the existing talker files, you need GCFScape, and they are in most of the various pak.dir (you probably want to look at the most recent ones in the update file, as newer ones replace older ones).

In an addon you need a file for /scripts/talker

One problem with this system is you need to have a copy of one existing talker file, to #include new files. See this discussion.

You can add everything else in new files (to reduce the odds of conflicting with other addons that also use talker scripts).

You don’t need to replace existing dialog lines, you can add new ones. If you specifically want to replace existing options, you may need to replace existing files, or you might not (you might be able to replace it with a new version of the same criterion in a different file). I'm not sure, as all the talker scripts I've written are explicitly designed to not interact with existing talker scripts.

You can set up new criterion (the individual criteria which will cause the script to fire based on in game events).

You set up/modify the rule & response for each survivor for that criterion.

Otherwise, you just have to look at the existing talker scripts to figure out how to write your own. I'm going to warn you right now, this is a lot of work.
< >
Showing 1-2 of 2 comments
The author of this thread has indicated that this post answers the original topic.
AlwaysToast Jun 25, 2023 @ 8:25am 
What controls when survivors speak is the talker scripts, also called the response system.

When you want to look at the existing talker files, you need GCFScape, and they are in most of the various pak.dir (you probably want to look at the most recent ones in the update file, as newer ones replace older ones).

In an addon you need a file for /scripts/talker

One problem with this system is you need to have a copy of one existing talker file, to #include new files. See this discussion.

You can add everything else in new files (to reduce the odds of conflicting with other addons that also use talker scripts).

You don’t need to replace existing dialog lines, you can add new ones. If you specifically want to replace existing options, you may need to replace existing files, or you might not (you might be able to replace it with a new version of the same criterion in a different file). I'm not sure, as all the talker scripts I've written are explicitly designed to not interact with existing talker scripts.

You can set up new criterion (the individual criteria which will cause the script to fire based on in game events).

You set up/modify the rule & response for each survivor for that criterion.

Otherwise, you just have to look at the existing talker scripts to figure out how to write your own. I'm going to warn you right now, this is a lot of work.
Swishy Jun 25, 2023 @ 4:31pm 
Originally posted by AlwaysToast:
What controls when survivors speak is the talker scripts, also called the response system.

When you want to look at the existing talker files, you need GCFScape, and they are in most of the various pak.dir (you probably want to look at the most recent ones in the update file, as newer ones replace older ones).

In an addon you need a file for /scripts/talker

One problem with this system is you need to have a copy of one existing talker file, to #include new files. See this discussion.

You can add everything else in new files (to reduce the odds of conflicting with other addons that also use talker scripts).

You don’t need to replace existing dialog lines, you can add new ones. If you specifically want to replace existing options, you may need to replace existing files, or you might not (you might be able to replace it with a new version of the same criterion in a different file). I'm not sure, as all the talker scripts I've written are explicitly designed to not interact with existing talker scripts.

You can set up new criterion (the individual criteria which will cause the script to fire based on in game events).

You set up/modify the rule & response for each survivor for that criterion.

Otherwise, you just have to look at the existing talker scripts to figure out how to write your own. I'm going to warn you right now, this is a lot of work.
Ah, definitely seems like a ton of work. I may return to it one day but mainly just had a bunch of random ideas that I thought would be cool. I think i’ll stick to simpler mods for now though, may study this more in the distant future lol. Thanks a ton though man.
< >
Showing 1-2 of 2 comments
Per page: 1530 50

Date Posted: Jun 25, 2023 @ 5:59am
Posts: 2