Left 4 Dead 2

Left 4 Dead 2

557 ratings
[VScript] Custom Survivor Takeover
3
3
   
Award
Favorite
Favorited
Unfavorite
Survivors: Survivors
Game Content: Scripts, Models, Textures
File Size
Posted
Updated
274.287 MB
10 Jul @ 1:28am
21 Jul @ 3:47pm
12 Change Notes ( view )

Subscribe to download
[VScript] Custom Survivor Takeover

Description
(This mod is not for spawning survivors)

This script tries to help with converting survivor skin replacers into their own survivor.
By changing the name and model of existing in-game survivors to custom ones at the start of the map, or manually.

I included the 4 Arcade survivors' custom models to use with this script to test. (with small edits to their qc files)
(Blake, Yusuke, Sara, and Haruka. Ports by Tiny King Trashmouth, AvengedDeathAlert, and FallFox)
Probably need to restart the game to see them though.

In the default settings, they are currently trying to takeover any clone survivors at the start.
So if you don't spawn clone survivors, you won't have any of the Arcade survivors.
But you can change that in the settings. You can set them to takeover random or specific survivors.
More info here:
https://steamhost.cn/steamcommunity_com/workshop/filedetails/discussion/3521730239/592902428426243132/

If you want to spawn survivors manually in the middle of the round and not at the start, then you have to do !takeover after that. (It only works if there are no custom survivors around, and there are valid targets to takeover)

==========================================================================

VScript Survivor Manager (VSSM) by Shadowysn is optional but recommended for spawning survivors.
Also for fixing many bugs (for example: fixUpgradePacks, restoreExtraSurvsItemsOnTransition, fixDefibrillator, etc...)
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=3006216183

Since the default settings have the Arcade survivors set to takeover clone survivors, you can try survCount = 12 in the VSSM settings, to see if the Arcade survivor skins takeover the 4 extra clones, and exist along with the 8 vanilla survivors.
Here is more info for the VSSM settings:
https://steamhost.cn/steamcommunity_com/workshop/filedetails/discussion/3006216183/7222135514705252606/

==========================================================================

Issues that keep me up at night:
  • Not sure if this script is ready, needs more testing
  • Custom survivors have no vgui and invisible first person viewmodel arms. Also no voice and emotions.
  • So if you want to play as a custom character, third person is recommended.
  • When you play as a custom character, portrait will be wrong.
  • Sometimes the HUD didn't update and they will have wrong portraits
  • Sometimes their weapon is not at the right attachment point.
  • Maybe the model will revert when a player joins, leaves, or goes idle. Couldn't test that by myself.
  • Multiplayer not recommended because players without the assets will just see ERROR.mdl.
  • Also because guests with a different model list than the host will crash, because not precached. but that's just a theory
  • Takeover would need to wait until cutscene is done before changing models
  • VSSM can't !survswap to the custom suvivors
  • I think when a survivor is talking halfway, and then changed to a custom skin, they will still continue with that voice until done. But I dont think they will have any voice again after that.
  • wrong fall scream voice like in the xbox version
  • Rarely crashing when trying to save persistent data (when saferoom transition) or restore persistent data (when restarting map)? idk too random
  • char num 8 can't be defibbed? i dont get it
  • survivor ragdolls not supported, idk how
  • Sourcemod survivor spawners maybe wont work because of identity fix, or they spawn later than the auto takeover. idk yet

==========================================================================

You can also add more characters by editing other survivor replacer mods (like Shrek or Garfield for example)
Not a good tutorial:
https://steamhost.cn/steamcommunity_com/workshop/filedetails/discussion/3521730239/592902428426252787/

==========================================================================

Credits:
  • VSCode - IDE
  • marcinbar - VSCode Squirrel Ext
  • Cold Front Mike code reference
  • Taito - Arcade Survivors
  • Theuaredead', 1cc - Arcade Survivor Assets
  • Tiny King Trashmouth - Yusuke Port
  • AvengedDeathAlert - Blake Port
  • FallFox - Sara and Haruka Port

Popular Discussions View All (3)
47
1
20 hours ago
bad tutorial for adding more custom models
ChapCanai
20
1
17 Jul @ 9:12pm
PINNED: settings.cfg stuff
ChapCanai
6
20 Jul @ 8:29am
Share Custom Survivor Conversions
ChapCanai
145 Comments
ChapCanai  [author] 21 minutes ago 
@JamesStar
Thank you for reporting. I really messed up again
JamesStar 2 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 4 hours ago 
Damn, so there really isn't no decent way around hardcoded bs then
Shadowysn 6 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 7 hours ago 
watch how some crackhead is gonna come out of nowhere with a script that does just that
ChapCanai  [author] 8 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 8 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 8 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] 9 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 9 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.