Left 4 Dead 2

Left 4 Dead 2

[VScript] Custom Survivor Takeover (CST)
 This topic has been pinned, so it's probably important
ChapCanai  [developer] 8 Aug @ 7:05pm
profiles cfg stuff
Where are the profile cfgs?:
Left 4 Dead 2\left4dead2\ems\custom_survivor_takeover\profiles\{name}.cfg
  • After loading any map at least once, there should be some default presets.
  • To make your own profile, copy paste any of em to rename and edit to whatever you want

enabled = true
  • Allow them to appear (true) or not (false).

takeovers = ["@random"]
  • Who to choose to takeover.

  • "@host" is for finding the listen server host to takeover, in singleplayer, that's yourself.

  • You can put player names (eg. Thelegend27) but bots_only need to be false. (case sensitive)
  • If you put a name like "Bill", it will find for the first existing survivor named "Bill" and takeover him.

  • If you put a model path like "models/survivors/survivor_namvet.mdl", it will find for the existing survivor with Bill's model.

    Nick's model is "models/survivors/survivor_gambler.mdl"
    Rochelle's model is "models/survivors/survivor_producer.mdl"
    Coach's model is "models/survivors/survivor_coach.mdl"
    Ellis' model is "models/survivors/survivor_mechanic.mdl"
    Bill's model is "models/survivors/survivor_namvet.mdl"
    Zoey's model is "models/survivors/survivor_teenangst.mdl"
    Louis' model is "models/survivors/survivor_manager.mdl"
    Francis' model is "models/survivors/survivor_biker.mdl"

  • "@guest" is for picking a random human that's not the listen server host (or not yourself) to takeover, bots not counted.

  • If you put "@clone", it will find for the models that have duplicates and pick one of them.
  • This is mainly used for 9+ survivors using VSSM, because that is when clones start to spawn.
  • You can exclude bots/humans with "@clone_bot" or "@clone_human"

  • "@bill" is for picking a random survivor with Bill's models to takeover.
  • Same for "@zoey", "@louis", "@francis", "@nick", "@rochelle", "@coach", "@ellis"
  • You can exclude bots/humans with "@bill_bot" or "@bill_human"

  • If you put "@survset_opposite", it will find for l4d1 survivor models in l4d2 survivor set
  • And also for l4d2 survivor models in l4d1 survivor set
  • You can exclude bots/humans with "@survset_opposite_bot" or "@survset_opposite_human"

  • If you put "@survset_current", it will find for l4d1 survivor models in l4d1 survivor set
  • And also for l4d2 survivor models in l4d2 survivor set
  • You can exclude bots/humans with "@survset_current_bot" or "@survset_current_human"

  • If you put "@l4d1", it will find for a random bill, zoey, louis, or francis
  • You can exclude bots/humans with "@l4d1_bot" or "@l4d1_human"

  • If you put "@l4d2", it will find for a random nick, rochelle, coach, or ellis
  • You can exclude bots/humans with "@l4d2_bot" or "@l4d2_human"

  • If you put "@random", it will just choose anyone who is not yet taken over.
  • You can exclude bots/humans with "@random_bot" or "@random_human"

  • If you put "@all", it will just choose all survivors who are not yet taken over.
  • You can exclude bots/humans with "@all_bots" or "@all_humans"

  • Takeover priority order:
    1. "@host"
    2. Model
    3. Name
    4. "@guest"
    5. "@clone_human"
    6. "@clone_bot"
    7. "@clone"
    8. "@bill_human"
    9. "@bill_bot"
    10. "@bill"
    11. "@zoey_human"
    12. "@zoey_bot"
    13. "@zoey"
    14. "@louis_human"
    15. "@louis_bot"
    16. "@louis"
    17. "@francis_human"
    18. "@francis_bot"
    19. "@francis"
    20. "@nick_human"
    21. "@nick_bot"
    22. "@nick"
    23. "@rochelle_human"
    24. "@rochelle_bot"
    25. "@rochelle"
    26. "@coach_human"
    27. "@coach_bot"
    28. "@coach"
    29. "@ellis_human"
    30. "@ellis_bot"
    31. "@ellis"
    32. "@survset_opposite_human"
    33. "@survset_opposite_bot"
    34. "@survset_opposite"
    35. "@survset_current_human"
    36. "@survset_current_bot"
    37. "@survset_current"
    38. "@l4d1_human"
    39. "@l4d1_bot"
    40. "@l4d1"
    41. "@l4d2_human"
    42. "@l4d2_bot"
    43. "@l4d2"
    44. "@random_human"
    45. "@random_bot"
    46. "@random"
    47. "@all_humans"
    48. "@all_bots"
    49. "@all"

random_models = ["models/survivors/survivor_css_urban.mdl", "models/survivors/survivor_css_gign.mdl", "models/survivors/survivor_css_gsg9.mdl"]
  • The file path to the survivor model (mdl) that will takeover.
  • You can put multiple models for RNG

random_names = ["Alpha", "Bravo", "Charlie"]
  • The display name for the characters
  • You can put multiple names for RNG

random_voice_names = ["Cliffe"]
  • This is for talkers, whose voice to use
  • NamVet is bill, TeenGirl is zoey, Manager is louis, Biker is francis, Gambler is nick, Producer is Rochelle, Coach is coach, Mechanic is ellis.
  • aka context name
  • For the context: "who"
  • You can put multiple for RNG

survivor_slot = "anon"
  • Whose vgui, viewmodel arms, and vanilla survivor bot name to use

  • You can put a number (without quotes)
  • In survivor set 1: 0 is bill, 1 is zoey, 2 is louis, 3 is francis.
  • In survivor set 2: 0 is nick, 1 is rochelle, 2 is coach, 3 is ellis, 4 is bill, 5 is zoey, 6 is francis, 7 is louis.
  • You can also put negative one (-1), for letting the script pick a custom slot.

  • You can also put a string (with quotes) (case insensitive)
  • Bill is "bill" or "namvet"
  • Zoey is "zoey" or "teenangst" or "teengirl"
  • Louis is "louis" or "manager"
  • Francis is "francis" or "biker"
  • Nick is "nick" or "gambler"
  • Rochelle is "rochelle" or "producer"
  • Coach is "coach"
  • Ellis is "ellis" or "mechanic"
  • "anon" basically just means neither of them, for letting the script pick a custom slot.

  • Only custom slots can allow the bot to show their custom display names, but their internal name will be "Survivor". It will also make their vgui blank and first person viewmodel arms invisible.
  • Currently, custom slots are only 8, 9, 19, 20, 21, 22
  • If there are other positive numbers that won't crash the game, feel free to let me know
  • I think 10 to 18, and 23 and above will crash the game, -139 and below will also crash the game, but thats just a theory. I added a safeguard to hopefully prevent that

takeover_chance = 100.0
  • What is the percent chance for the custom character to takeover

takeover_models_blacklist = ["models/survivors/survivor_namvet.mdl"]
  • Which model should never be taken over

takeover_names_blacklist = ["ChapCanai", "Nick"]
  • Whose player name should never be taken over

map_names_blacklist = ["c1m1_hotel", "c8m1"]
  • Which map(s) they should never appear in

If you want to add new custom characters
Last edited by ChapCanai; 28 Aug @ 8:12pm
< >
Showing 1-10 of 10 comments
ChapCanai  [developer] 8 Aug @ 7:37pm 
Example profile:
{
enabled = true
takeovers = ["@random"]
random_models = ["models/survivors/survivor_replica_soldier_1.mdl", "models/survivors/survivor_replica_soldier_2.mdl", "models/survivors/survivor_replica_soldier_3.mdl", "models/survivors/survivor_replica_soldier_4.mdl", "models/survivors/survivor_replica_soldier_5.mdl", "models/survivors/survivor_replica_soldier_6.mdl", "models/survivors/survivor_replica_soldier_7.mdl", "models/survivors/survivor_replica_soldier_8.mdl", "models/survivors/survivor_replica_soldier_9.mdl", "models/survivors/survivor_replica_soldier_10.mdl"]
random_names = ["[Alpha]", "[Bravo]", "[Charlie]", "[Delta]", "[Echo]", "[Foxtrot]", "[Golf]", "[Hotel]", "[India]", "[Juliet]", "[Kilo]", "[Lima]", "[Mike]", "[November]", "[Oscar]", "[Papa]", "[Quebec]", "[Romeo]", "[Sierra]", "[Tango]", "[Uniform]", "[Victor]", "[Whiskey]", "[Xray]", "[Yankee]", "[Zulu]"]
random_voice_names = ["Replica"]
survivor_slot = "anon"
takeover_chance = 100
takeover_models_blacklist = ["models/survivors/survivor_not_for_this.mdl"]
takeover_names_blacklist = ["not_for_this_name"]
map_names_blacklist = ["not_for_this_map_name"]
}
Last edited by ChapCanai; 8 Aug @ 7:44pm
kouga 8 Aug @ 11:47pm 
you're seriously amazing, you know that?
ChapCanai  [developer] 9 Aug @ 12:58am 
Thanks
kouga 12 Aug @ 8:55pm 
so i actually havent tried out using the vanilla survivors slots for the custom survivors, but i want want to know if i understand it correctly: does assigning them to those slots use the viewmodels of the vanilla survivors or the custom ones?
ChapCanai  [developer] 12 Aug @ 9:09pm 
You mean like this?
survivor_slot = "bill"
This will make them use bill's viewmodel arms and portrait, and if its a bot, the name will be Bill
kouga 12 Aug @ 9:26pm 
gotchaaa. and setting it to say
survivor_slot = "20"
will cause viewmodel arms to disappear right?

can i ask whats going on under the hood that makes it a challenge to implement the custom arms? is it a valve thing specifically?
ChapCanai  [developer] 12 Aug @ 9:31pm 
Best I could do is this:
https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=3546580446

They only let us use "Unknown" slot for custom survivors, so they all have to share the same arms

Also if putting a number, no need quotes:
survivor_slot = 3
Last edited by ChapCanai; 12 Aug @ 9:39pm
kouga 12 Aug @ 9:39pm 
ahhhh i think i get how it works, thanks for illuminating! you did a good job!

also, understood no quotes it is lol
[random_voice_names = ["Cliffe"]
This is for talkers, whose voice to use
NamVet is bill, TeenGirl is zoey, Manager is louis, Biker is francis, Gambler is nick, Producer is Rochelle, Coach is coach, Mechanic is ellis.
aka context name
For the context: "who"
You can put multiple for RNG]

Just curious, if you dont want them to have a voice line at all what would I put in there?
ChapCanai  [developer] 16 Aug @ 8:41pm 
I guess whatever context name that doesnt exist, like "Thingamabob" or "None"
Last edited by ChapCanai; 22 Aug @ 4:26am
< >
Showing 1-10 of 10 comments
Per page: 1530 50