Left 4 Dead 2

Left 4 Dead 2

[VScript] Custom Survivor Takeover
145 Comments
ChapCanai  [author] 5 hours ago 
@JamesStar
Thank you for reporting. I really messed up again
JamesStar 7 hours ago 
Does anyone here knows how to fix some custom survivor models accidentally taking over SI models? If not it's fine cause I kinda find it funny! Gibbs just T posing rushing at me, makes me laugh
uronga 9 hours ago 
Damn, so there really isn't no decent way around hardcoded bs then
Shadowysn 12 hours ago 
@uronga
Would love to be proven wrong, but far as I can tell arms and icons are hard-coded client-side shit with no bridging way for VScript or Sourcemod to have new non-replacement assets added to them.

The workaround replacements found had unsolvable problems from trying to replicate a purely client-side feature with server-side scripting. I remember a talk about Cold Front with JAiZ that an icon for Mike was implemented using a workaround, but it can only be positioned statically for the default HUD and then be too offset on other custom HUDs, thus it was cut.

As for arms, attaching an arms prop will have the fake arms clipping through the world as well as not respecting viewmodel FOV, and attempting to attach an arms viewmodel entity to the viewmodel just straight up doesn't work.
uronga 12 hours ago 
watch how some crackhead is gonna come out of nowhere with a script that does just that
ChapCanai  [author] 13 hours ago 
@SPSick
Maybe not tutorial as not even I can get it to work properly

@Shadowysn
Thank you for explaining, so it really is impossible then, sheee
Shadowysn 14 hours ago 
The arms are handled client-side and only have individual support for the 8 main survivors in the game as well as one generic arms model for all unknown survivors.
"Unknown" "models/v_models/weapons/v_claw_smoker_l4d1.mdl"

Unless someone can code a client-side plugin, nobody's going to get any more control over the arm models. And you'd have to replace basically every weapon script in the game to change or add the "Unknown" arms to all of them, which means conflicts with all other weapon script modifying mods.
SPSick 14 hours ago 
I only got up to the revive successful criteria (you know when they say "thanks", "thanks... I owe ya." that sort of lines), when i tried to add any other responses or criteria it broke, dont know why. Oh yea, it would be cool if you also made a tutorial on adding custom talkers for other people to use as well. Although I possibly might modify one of your talkers to use for Mike's talker if that's fine.
ChapCanai  [author] 14 hours ago 
@SPSick
Thanks, I think I dont really have permission for Mike, I could upload to gdrive but no space
Whats your progress so far?
SPSick 14 hours ago 
Good job on the talker! I assume youre gonna do Mike too? If so then I'll stop mine as I'm barely making progress.
JamesStar 17 hours ago 
@ChapCanai Did you put that on the top level of the weapon txt scripts? Because i don't think it will work, it needs to be inside the specific weapon definition you're editing.

Basically putting your CharacterViewmodelAddon section outside the weapon scope means it's ignored.
ChapCanai  [author] 19 hours ago 
Does anyone know why this won't work if I do this in the weapon txt scripts?

"CharacterViewmodelAddon"
{
"Coach" "models/weapons/arms/v_arms_coach_new.mdl"
"Mechanic" "models/weapons/arms/v_arms_mechanic_new.mdl"
"Producer" "models/weapons/arms/v_arms_producer_new.mdl"
"Gambler" "models/weapons/arms/v_arms_gambler_new.mdl"

"Manager" "models/weapons/arms/v_arms_louis.mdl"
"Biker" "models/weapons/arms/v_arms_francis.mdl"
"TeenGirl" "models/weapons/arms/v_arms_zoey.mdl"
"NamVet" "models/weapons/arms/v_arms_bill.mdl"

"Blake" "models/weapons/arms/v_arms_blake_new.mdl"
"Haruka" "models/weapons/arms/v_arms_haruka_new.mdl"
"Sara" "models/weapons/arms/v_arms_sara_new.mdl"
"Yusuke" "models/weapons/arms/v_arms_yusuke_new.mdl"
}
ChapCanai  [author] 20 Jul @ 8:14pm 
@J5678Games
yeah, this mod wont affect the vanilla survivor model files
J5678Games 20 Jul @ 12:56pm 
Does this work with survivor reskins?
TacticalMadnessYT 19 Jul @ 12:37pm 
https://youtu.be/UpI9-UtVJwQ?si=t3K99tgwnUkVURVS made this as a show of the story telling part of this addon. as you can imagine a lot can be done, even this is a weak representation of its full potential. Thanks again.
ChapCanai  [author] 19 Jul @ 5:11am 
Im not sure if this yusuke voice is working properly, needs more testing
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=3529415909
ChapCanai  [author] 18 Jul @ 11:46pm 
@Godzilla
I updated the mod, and added another setting. Maybe can try try_restore_on_update = true?
ChapCanai  [author] 18 Jul @ 11:06pm 
@Godzilla
After using your settings on dead center, seems fine. Maybe its the campaign, l4d1 or l4d2
Godzilla 18 Jul @ 11:00pm 
And the Custom survivor settings.
{
toggles = [true, true, true, true, true, true, true, true, true, true, true]
takeovers = ["clone", "clone", "clone", "clone" "clone", "clone", "clone", "clone", "clone", "clone", "clone"]
models = ["models/survivors/survivor_yusuke.mdl", "models/survivors/survivor_sara.mdl", "models/survivors/survivor_haruka.mdl", "models/survivors/survivor_blake.mdl"]
names = ["Yusuke", "Sara", "Haruka", "Blake"]
char_nums = [-1, -2, -3, -4]
context_names = ["Yusuke", "Sara", "Haruka", "Blake"]
takeover_chance = [100, 100, 100, 100]
bots_only = true
auto_start_takeover = true
manual_takeover_commands = ["!takeover", "/takeover"]
debug = false
}
Godzilla 18 Jul @ 10:59pm 
here's my Vscript Survivor manager settings.
{
autoCheckpointFirstAid = true
fixUpgradePacks = true
autoControlExtraBots = true
fixFriendlyFireLines = true
survCharOrderL4D1 =
[
"Bill",
"Zoey",
"Louis",
"Francis",
"Nick",
"Rochelle",
"Ellis",
"Coach",
]
survStartWeapons =
[
"pistol",
"first_aid_kit",
]
allowSurvSwapCmdForUsers = false
removeExcessSurvivors = true
survCount = 12
restoreExtraSurvsItemsOnTransition = true
fixDefibrillator = true
fixChargerHits = true
survCharOrderL4D2 =
[
"Nick",
"Rochelle",
"Coach",
"Ellis",
"Bill",
"Zoey",
"Francis",
"Louis",
]
}
ChapCanai  [author] 18 Jul @ 10:54pm 
@Godzilla
Hmm I tried on Dead Center, fine for me. Maybe I can try your settings?
Godzilla 18 Jul @ 10:03pm 
all of the maps I think. I use 12 survivor VSSM.
ChapCanai  [author] 18 Jul @ 9:59pm 
@Godzilla
Which map was it? I will try it out
Bumblelou 18 Jul @ 8:55pm 
I'll never not find it funny that Haruka's equivalent survivours in the files are Coach and Francis
Godzilla 18 Jul @ 8:24pm 
I think I'm having trouble. Every time I playthrough the first chapter and transition to another chapter, the duplicate Vanilla survivors replaces the custom survivors.
Shadowysn 17 Jul @ 9:23am 
You can use raw soundfile paths in the .vcds and that's how I did it for my Ellis Gaming voiceline script, though I agree that scenes are both a hassle and can conflict with each other so finding scene-less ways is the best option for now.
SPSick 17 Jul @ 5:03am 
Yea same here, I've just been using the actual wav files instead.
ChapCanai  [author] 17 Jul @ 4:58am 
I think I will hold off on using vcds and just precache and play wavs directly. I should focus on trying to fix the rules and criterias first
SPSick 17 Jul @ 4:40am 
Oh yea I added the processrules override and that worked fine, but that custom criteria still didnt work for some reason. And I've still been struggling with the vcds, I've edited the sound manifest and also made a file called game_sounds_operator.txt to make the values for his lines but faceposer wouldnt detect the new sounds i have added
ChapCanai  [author] 17 Jul @ 4:33am 
@SPSick
Thats nice man, did you see any error like worldtalkmike not found in query or something? because I think in cf_talker.nut theres an override for rr_ProcessRules that could maybe fix that? I may be completely wrong, i dont have enough knowledge

Also did you manage to create custom vcds for mike? I tried but i cant really edit game_sounds_manifest to proceed
SPSick 17 Jul @ 3:41am 
So an update on Mike, I got him to say his thanks voicelines when he gets revived, but when I add custom criterias it seems they dont wanna work (eg worldtalkmike as one of the criterias)
Noodlepikmin 16 Jul @ 5:27pm 
No rush. Take your time.
ChapCanai  [author] 16 Jul @ 5:26pm 
@Shadowysn
Thanks a lot for the fix, I will test out ragdolls and defib later

@superloft7
9 years ago... wow

@Noodlepikmin
He is in the google drive but im trying to give him and the arcade survivors voices
Noodlepikmin 16 Jul @ 4:44pm 
Let's include Mike from Cold Front as well, shall we?
justdudda 16 Jul @ 4:17pm 
legal
Shadowysn 16 Jul @ 9:40am 
Defibs for custom survivors fixed hopefully
superloft7 16 Jul @ 8:55am 
I just remembered that somebody tried something similar to this, with voices and all. Although, when respawning she reverts back to Rochelle. Might be worth checking this if it can help.

[L4D2]AdaWong Survivor
https://forums.alliedmods.net/showthread.php?p=2429012
Bonjet 16 Jul @ 6:06am 
4 Japanese Arcade Survivors are so fitting to play on YAMA ADD ON CAMPAIGN NOW. XD
Shadowysn 16 Jul @ 4:44am 
I rolled out updates to fix all my ragdoll mods from failing to work on custom survivors, but it seems the models apart from Yusuke have broken ragdolls themselves anyway.
I also accidentally broke defib functionality for custom survivors somehow with VSSM, I'm going to try and fix that when I can get back home.
Stolas 16 Jul @ 2:28am 
Think I'll wait until someone does a mod where the custom survivors are the Resident Evil cast. ^^;
A_L_Exd 15 Jul @ 6:16pm 
ta bueno
CrawlingRai 15 Jul @ 6:09pm 
cool
ChapCanai  [author] 15 Jul @ 4:46pm 
@superloft7
Hmm I think that would have to be a separate mod, but good idea
superloft7 15 Jul @ 4:44pm 
I mean, when a survivor dies they will spawn as a completely different character.
ChapCanai  [author] 15 Jul @ 4:36pm 
@braverewe26
Thanks, i will take a look

@superloft7
I think identity fix would prevent any model changes, just guessing. And by dies and respawns, do you mean defib and rescue closet? This mod will try to restore the custom model after a survivor has been defibbed or rescued from closet
braverewe26 15 Jul @ 3:45pm 
might be worth a look for voicelines https://forums.alliedmods.net/showthread.php?p=2409051
superloft7 15 Jul @ 3:08pm 
Just leaving this here. No, Sourcemod plugins like SuperVersus that adds more survivors don't work. It won't crash or anything of the sort, just that takeover won't work.

Use VScript Survivor Manager if you want to add more than 8 survivors.

On another note, is it feasible to add a feature where the mod automatically takes over when a survivor dies and respawns?
ChapCanai  [author] 15 Jul @ 12:35pm 
@Pinhead dipshit
Which part?

@Sex Defender
Did you try restart the game?
Sex Defender 15 Jul @ 11:28am 
I've got no clue how to add in new survivor models, each time I do it shows the ERROR sign in place of the new survivor
Pinhead Dipshit 15 Jul @ 8:55am 
yea i'm very lost lol