Left 4 Dead 2

Left 4 Dead 2

[VScript] Custom Survivor Takeover
 This topic has been pinned, so it's probably important
ChapCanai  [developer] 10 Jul @ 4:59pm
settings.cfg stuff
For the ems settings cfg:
(Left 4 Dead 2\left4dead2\ems\custom_survivor_takeover\settings.cfg)
  • I used parallel arrays for most of the settings.
  • Eg. the first item (index 0) in 'models' and 'names' arrays will line up with each other, same for the second item (index 1), third item (index 2), and so on so forth.
  • So it's important for those arrays to must have the same number of items
  • You could go more than 4 if you have more custom characters you want to add (need to rename their mdl and edit their qc first tho)

toggles = [true, true, true, true]
  • Which index of the custom characters to enable (true) or disable (false).

takeovers = ["ChapCanai", "models/survivors/survivor_coach.mdl", "clone", "random"]
  • Who to choose to takeover (case sensitive).
  • You can put player names (eg. Thelegend27) but bots_only need to be false.
  • 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.
  • 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.
  • If you put "random", it will just choose anyone who is not yet taken over.

  • 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"
  • 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"

models = ["models/survivors/survivor_yusuke.mdl", "models/survivors/survivor_sara.mdl", "models/survivors/survivor_haruka.mdl", "models/survivors/survivor_blake.mdl"]
  • The custom models that will takeover the vanilla models.
  • This is for the file path to your custom survivor models (mdl).
  • This is also a list of models to precache. If the host has them but the guests don't, then the guests would probably crash.

names = ["Yusuke", "Sara", "Haruka", "Blake"]
  • The display names of your custom characters

char_nums = [-1, -2, -3, -4]
  • Whose vgui, viewmodel arms, and vanilla survivor bot name to use.
  • 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.
  • I think any other number would allow the bot to have custom display names, but their internal name will be "Survivor". It will also make their vgui blank and first person viewmodel arms invisible.
  • I think 10 and above will crash the game, -139 and below will also crash the game.

context_names = ["Yusuke", "Sara", "Haruka", "Blake"]
  • 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.
  • For the context: "who"

takeover_chance= [100.0, 100.0, 100.0, 100.0]
  • What is the percent chance for the custom characters to takeover

bots_only = true
  • Whether can takeover players (false) or not (true).

auto_start_takeover = true
  • Change to custom models on every start of the map or not.

manual_takeover_commands = ["!takeover", "/takeover"]
  • Chat commands for the host.
  • Mainly for if auto_start_takeover is false.
  • Or auto start failed for some reason, happens in some custom campaigns
  • Takeover can only happen if there are no custom survivors present
Last edited by ChapCanai; 53 minutes ago
< >
Showing 1-15 of 20 comments
ChapCanai  [developer] 12 Jul @ 7:12pm 
Example settings:

{
toggles = [true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true]
takeovers = ["random", "random", "random", "random", "random", "random", "random", "random", "random", "random", "random", "random", "random", "random", "random", "random", "random"]
models = ["models/survivors/survivor_yusuke.mdl", "models/survivors/survivor_sara.mdl", "models/survivors/survivor_haruka.mdl", "models/survivors/survivor_blake.mdl", "models/survivors/survivor_jeff.mdl", "models/survivors/survivor_whitaker.mdl", "models/survivors/survivor_unfallen.mdl", "models/survivors/survivor_smitty.mdl", "models/survivors/survivor_pilotnc5.mdl", "models/survivors/survivor_operator.mdl", "models/survivors/survivor_keith.mdl", "models/survivors/survivor_amanda.mdl", "models/survivors/survivor_hunter.mdl", "models/survivors/survivor_john.mdl", "models/survivors/survivor_virgil.mdl", "models/survivors/survivor_femsoldier.mdl", "models/survivors/survivor_gibbs.mdl"]
names = ["Yusuke", "Sara", "Haruka", "Blake", "Jeff", "Whitaker", "Survivor", "Smitty", "Pilot", "Mike", "Keith", "Amanda", "Hunter", "John", "Virgil", "Annie", "Gibbs"]
char_nums = [-1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15, -16, -17]
context_names = ["Yusuke", "Sara", "Haruka", "Blake", "Jeff", "Whitaker", "Survivor", "Smitty", "Pilot", "Mike", "Keith", "Amanda", "Hunter", "John", "Virgil", "Annie", "Gibbs"]
takeover_chance = [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100]
bots_only = true
auto_start_takeover = true
manual_takeover_commands = ["!takeover", "/takeover"]
debug = false
}

Only the Arcade survivors are included in this mod. To get the others, you have to add on these:
https://steamhost.cn/steamcommunity_com/workshop/filedetails/discussion/3521730239/586147117689619160/
Last edited by ChapCanai; 17 Jul @ 9:37pm
Oh yeah since this can only run 18 max lets say i need to remove one like Smitty which of the Char_nums numbers do I remove [-1, -2, -3, -4, -5, -6, -7, -8, -9, 8, -10]
ChapCanai  [developer] 12 Jul @ 9:08pm 
I think smitty is the 8th item in the arrays, so toggle the 8th one to false:

toggles = [true, true, true, true, true, true, true, false, true, true, true]
Originally posted by ChapCanai:
I think smitty is the 8th item in the arrays, so toggle the 8th one to false:

toggles = [true, true, true, true, true, true, true, false, true, true, true]
is this (-8) or this (8) cause there is two of them
ChapCanai  [developer] 12 Jul @ 9:12pm 
Should be -8 because 8 is Mike
Originally posted by ChapCanai:
Should be -8 because 8 is Mike
got it will try that.
I am very happy to say it works. so far and it is awesome. Thank you for doing all this. Cant wait to see what else you do.
ChapCanai  [developer] 12 Jul @ 9:35pm 
Thank you for testing and feedback :steamthumbsup:
Originally posted by ChapCanai:
Thank you for testing and feedback :steamthumbsup:
No problem if there any issues I will let you know.
hmm look some maps and campagins crash as i get sometimes

ED_Alloc:no free edicts
ChapCanai  [developer] 12 Jul @ 11:10pm 
Engine limitations
Originally posted by ChapCanai:
Engine limitations
Not a problem removed some mods as workshop mods have a limit and vlalve has yetto update the gameto handle more I wish they do that.

Oh and the extra the survivors are great. funny it seems no speical infected show up and i wonder if that is because of the extra ones. the hordes are still big.
Originally posted by eidonabramm:
Originally posted by ChapCanai:
Engine limitations
Not a problem removed some mods as workshop mods have a limit and vlalve has yetto update the gameto handle more I wish they do that.

Oh and the extra the survivors are great. funny it seems no speical infected show up and i wonder if that is because of the extra ones. the hordes are still big.
I recently put this on the description of VSSM:
(Warning: Special Infected and survivor players/bots share 18 slots. Add too many survivors and you can block special infected from spawning. This is hard-coded and unchangeable, requires a plugin[github.com] to increase the slots to 32 max.)
Originally posted by Shadowysn:
Originally posted by eidonabramm:
Not a problem removed some mods as workshop mods have a limit and vlalve has yetto update the gameto handle more I wish they do that.

Oh and the extra the survivors are great. funny it seems no speical infected show up and i wonder if that is because of the extra ones. the hordes are still big.
I recently put this on the description of VSSM:
(Warning: Special Infected and survivor players/bots share 18 slots. Add too many survivors and you can block special infected from spawning. This is hard-coded and unchangeable, requires a plugin[github.com] to increase the slots to 32 max.)
You have update instructions to install or a youtube version of how to do it? I tried to figure it out but I am a little stumb on what to install and where to put it.


once I figure it out do i just add to char_nums = [-1, -2, -3, -4, -5, -6, -7, -8, -9, 8, -10] -11 and so on? as of course there the 8 with the -8 version of that eight
Shadowysn 14 Jul @ 10:11pm 
Originally posted by eidonabramm:
-snip-
L4DToolz requires installing Metamod Source[www.sourcemm.net] alongside it.
Here's a discussion I made for VSSM recently. (link)
Last edited by Shadowysn; 14 Jul @ 10:55pm
< >
Showing 1-15 of 20 comments
Per page: 1530 50