AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [L4D2]Character_manager (1.4.1 - 22/09/2019 ) (https://forums.alliedmods.net/showthread.php?t=309601)

Lux 07-31-2018 18:52

[L4D2]Character_manager (1.4.1 - 22/09/2019 )
 
4 Attachment(s)
A plugin that sets bots to least used survivor character in selected set when spawned(by default).

Git Commits

BigThanks to Spirit12 for survivor set dhook function and signiture!
https://forums.alliedmods.net/showpo...6&postcount=33



Code:

Optional Passing fix plugin:
Plugin:CSM Passing Fix for me this did not work 100% so i put together a stripper config.
or
Optional Passing fix stripper:
Requirement: Stripper
Stripper config Location in "addons/stripper/maps"(7z attachment).
Stripper worked 100% for me.
Don't know how to install stripper read this


Known Conflicts:
ABM https://forums.alliedmods.net/showthread.php?p=2477820
don't use with abm's cvar enabled (abm_identityfix 1 or abm_automodel 1)

Identity fix https://forums.alliedmods.net/showthread.php?t=280539
Don't use identity fix with this plugin while using Character_managers identity fix.

Survivor Chat Select 1.6.1 (Forked)
https://forums.alliedmods.net/showth...63#post2399163
don't use with cvar l4d_scs_botschange 1 will cause this plugin to be useless

if you don't use any of these plugins or any of these types of plugin at all no need to worry about conflicts.

cfg name:
l4d2_character_manager.cfg
CVARS:
PHP Code:

l4d2_character_manager_version

// Should enable identity fix for players(NOT BOTS) 0 = (disable) 1 = (enabled)
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d2_identity_fix "1"

// survivor set you wish to use, 0 = (use map default), 1 = (l4d1), 2 = (l4d2), 3 = (use both)
// -
// Default: "3"
// Minimum: "0.000000"
// Maximum: "3.000000"
l4d2_survivor_set "3"

// Should manage people aswell as bots? 0 = (disable) 1 = (enabled) (Will overwrite identityfix when taking over a bot)
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d2_manage_people "0" 

Windows requirements:
[L4D2] Real Zoey Unlock
Installation:
DO NOT click 'Get Plugin' or it will fail to compile because this plugin requires DHooks!

1.Download the .smx file and put into your servers \addons\sourcemod\plugins folder.
2.Download the .txt gamedata file and put into your servers \addons\sourcemod\gamedata\ folder.
3.You must restart the server.

Sev 07-31-2018 19:31

Re: [L4D2]Character_manager
 
Good work.

Only problem is as I've always seen with these types of plugins is they don't keep track of clones. So if someone picks a different character, the bot clone won't be changed to the character who isn't the clone.

The only time clones should exist is if the human players choose and have more than one of the same character, x2 Zoey or whoever. The plugin should always try to make sure the bots constantly switch to none cloned characters.

Without a character select, this is course a non issue. However with a character select, it is.

Lux 07-31-2018 19:48

Re: [L4D2]Character_manager
 
That is already in the plugin thread.
Quote:

A simple plugin that sets bots to least used survivor character when spawned from(0-7).
Edit:
if there were 16 survivors there would be 2 of each!

I'm not going to workaround plugins that cause the problems.

Psyk0tik 07-31-2018 23:23

Re: [L4D2]Character_manager
 
+1 for being one of the first plugins to work with the Real Zoey Unlock plugin.

mikaelangelis 08-01-2018 03:35

Re: [L4D2]Character_manager
 
Damn thanks Lux this is what I need. Even I used forceset but bots keep auto choosing clone when a player join. I only host 8-person co-op local server, hope this will fix it

Anyway can I use this plugin without (forceset or vpk or stripper), or do I still choose zoey_unlock.smx along with 1 of 3 ( forceset or vpk or stripper)?

Lux 08-01-2018 08:53

Re: [L4D2]Character_manager
 
Quote:

Originally Posted by mikaelangelis (Post 2607434)
Damn thanks Lux this is what I need. Even I used forceset but bots keep auto choosing clone when a player join. I only host 8-person co-op local server, hope this will fix it

Anyway can I use this plugin without (forceset or vpk or stripper), or do I still choose zoey_unlock.smx along with 1 of 3 ( forceset or vpk or stripper)?

This is all covered in the post -_-
Optional
Windows requirements:


however you don't need clone bug fixes if you use 1 of each character
besides ammo packs i think.
e.g. witch targets everyone, chargers hit everyone ect.

I run 8 player coop with one of each and i don't use any of these bug fixes

Lux 08-08-2018 11:16

Re: [L4D2]Character_manager (1.1 - 08/08/2018 )
 
Updated to 1.1
Added Identity fix in plugin.
Added more checks incase of other plugins -_-
Added AdaWong Support for Identity fix (not auto modeling)

jking 08-13-2018 17:13

Re: [L4D2]Character_manager (1.1 - 08/08/2018 )
 
I've just installed and still working with it so bear with me, if I understand correctly we shouldn't be using forceset as well as of course Survivor Identity Fix since that's now included in the plugin?

Right now I'm working on "Docks" and I still have 2 Louis's, 2 Bills, 2 Zoeys etc., I do also have your Model Changer installed and working with that too...

Psyk0tik 08-13-2018 17:39

Re: [L4D2]Character_manager (1.1 - 08/08/2018 )
 
The forceset plugin is optional and it basically sets survivor_set to 2 on all the official L4D1 campaigns. If you don't have any mods or plugins that does the same thing, then I would recommend using this plugin with forceset.

jking 08-13-2018 17:40

Re: [L4D2]Character_manager (1.1 - 08/08/2018 )
 
Quote:

Originally Posted by Crasher_3637 (Post 2610018)
The forceset plugin is optional and it basically sets survivor_set to 2 on all the official L4D1 campaigns. If you don't have any mods or plugins that does the same thing, then I would recommend using this plugin with forceset.

Ok, thing is though and yes I've only started to work with these particular plugins are all these duplicates I can't seem to fix, yet anyway. Below is what I have loaded up currently:

Code:

sm plugins list
[SM] Listing 33 plugins:
  01 "Admin File Reader" (1.9.0.6249) by AlliedModders LLC
  02 "Admin Help" (1.9.0.6249) by AlliedModders LLC
  03 "Admin Menu" (1.9.0.6249) by AlliedModders LLC
  04 "Anti-Flood" (1.9.0.6249) by AlliedModders LLC
  05 "Basic Ban Commands" (1.9.0.6249) by AlliedModders LLC
  06 "Basic Chat" (1.9.0.6249) by AlliedModders LLC
  07 "Basic Comm Control" (1.9.0.6249) by AlliedModders LLC
  08 "Basic Commands" (1.9.0.6249) by AlliedModders LLC
  09 "Basic Info Triggers" (1.9.0.6249) by AlliedModders LLC
  10 "Basic Votes" (1.9.0.6249) by AlliedModders LLC
  11 "Client Preferences" (1.9.0.6249) by AlliedModders LLC
  12 "Survivor set enforcer" (1.0)
  13 "Fun Commands" (1.9.0.6249) by AlliedModders LLC
  14 "Fun Votes" (1.9.0.6249) by AlliedModders LLC
  15 "Left 4 Dead 2 Model Changer" (2.0) by Lux
  16 "[L4D2]Character_manager" (1.1.1) by Lux
  17 "[L4D2] Incapped Crawling with Animation" (1.42) by SilverShot, mod by Lux
  18 "[L4D2] Scavenge Score Fix - Gascan Pouring" (1.2) by SilverShot
  19 "[L4D2] Save Weapon" (4.3) by MAKS, Electr0, Merudo
  20 "[L4D2] Upgrade Packs FIXES" (1.6) by V10
  21 "[L4D2] Zoey Unlock" (1.1.1) by SilverShot
  22 "[L4D/L4D2] Thirdpersonshoulder Shotgun Sound Fix" (1.1) by MasterMind420, Lux
  23 "Super Versus Reloaded" (1.8.15.5) by DDRKhat, Marcus101RR, and Merudo
  24 "Survivor Bot Select" (1.0) by Merudo
  25 "LMC_Black_and_White_Notifier" (2.0.1) by Lux
  26 "LMC_RandomWitch" (1.0) by Lux
  27 "Player Commands" (1.9.0.6249) by AlliedModders LLC
  28 "RandomWitch" (1.0) by Ludastar (Armonic)
  29 "Reserved Slots" (1.9.0.6249) by AlliedModders LLC
  30 "Scene Processor" (1.33) by Buster "Mr. Zero" Nielsen
  31 "Sound Commands" (1.9.0.6249) by AlliedModders LLC
  32 "Survivor Chat Select" (1.6.1) by DeatChaos25, Mi123456 & Merudo
  33 "ThirdPersonShoulder_Detect" (1.4) by MasterMind420 & Lux


meta list
Listing 8 plugins:
  [01] L4DToolZ (1.0.0.9h-unknown) by Ivailosp
  [02] SourceMod (1.9.0.6249) by AlliedModders LLC
  [03] DefibFix Extension (1.0.1) by V10, Accelerator
  [04] [L4D2] 8+ Players BugFixes (1.0.2) by V10, Accelerator, $atanic $pirit
  [05] [L4D2] Melee Spawn Control (1.0.0.4) by V10
  [06] SDK Tools (1.9.0.6249) by AlliedModders LLC
  [07] Left 4 Downtown 2 (0.6.3) by Downtown1, ProdigySim, Visor, Accelerator; minor contrib.: XBetaAlpha, AtomicStryker, xerox8521
  [08] SDK Hooks (1.9.0.6249) by AlliedModders LLC


Update: It's working now, no more duplicates. I'm using the "l4d2_survivorset 2.vpk" but didn't have it in the client /addons folder just in the server /addons folder. I'm using forceset.

Lux 08-13-2018 22:25

Re: [L4D2]Character_manager (1.1.1 - 14/08/2018 )
 
Updated to 1.1.1
Added extra check for adawong naming seems to fail somehow :O

jking 08-13-2018 23:01

Re: [L4D2]Character_manager (1.1.1 - 14/08/2018 )
 
So, my current updated list is below but I've found that using forceset along with current Downtown2 as is described in the first option, does not work for me, it causes duplicates, probably due to forceset being outdated. However, using the .apk file in the 2nd option DOES work.

Code:

sm plugins list
[SM] Listing 33 plugins:
  01 "Admin File Reader" (1.9.0.6249) by AlliedModders LLC
  02 "Admin Help" (1.9.0.6249) by AlliedModders LLC
  03 "Admin Menu" (1.9.0.6249) by AlliedModders LLC
  04 "Anti-Flood" (1.9.0.6249) by AlliedModders LLC
  05 "Basic Ban Commands" (1.9.0.6249) by AlliedModders LLC
  06 "Basic Chat" (1.9.0.6249) by AlliedModders LLC
  07 "Basic Comm Control" (1.9.0.6249) by AlliedModders LLC
  08 "Basic Commands" (1.9.0.6249) by AlliedModders LLC
  09 "Basic Info Triggers" (1.9.0.6249) by AlliedModders LLC
  10 "Basic Votes" (1.9.0.6249) by AlliedModders LLC
  11 "Client Preferences" (1.9.0.6249) by AlliedModders LLC
  12 "Survivor set enforcer" (1.0)
  13 "Fun Commands" (1.9.0.6249) by AlliedModders LLC
  14 "Fun Votes" (1.9.0.6249) by AlliedModders LLC
  15 "Left 4 Dead 2 Model Changer" (2.0) by Lux
  16 "[L4D2]Character_manager" (1.1.1) by Lux
  17 "[L4D2] Incapped Crawling with Animation" (1.42) by SilverShot, mod by Lux
  18 "[L4D2] Scavenge Score Fix - Gascan Pouring" (1.2) by SilverShot
  19 "[L4D2] Save Weapon" (4.3) by MAKS, Electr0, Merudo
  20 "[L4D2] Upgrade Packs FIXES" (1.6) by V10
  21 "[L4D2] Zoey Unlock" (1.1.1) by SilverShot
  22 "[L4D/L4D2] Thirdpersonshoulder Shotgun Sound Fix" (1.1) by MasterMind420, Lux
  23 "Super Versus Reloaded" (1.8.15.5) by DDRKhat, Marcus101RR, and Merudo
  24 "Survivor Bot Select" (1.0) by Merudo
  25 "LMC_Black_and_White_Notifier" (2.0.1) by Lux
  26 "LMC_RandomWitch" (1.0) by Lux
  27 "Player Commands" (1.9.0.6249) by AlliedModders LLC
  28 "RandomWitch" (1.0) by Ludastar (Armonic)
  29 "Reserved Slots" (1.9.0.6249) by AlliedModders LLC
  30 "Scene Processor" (1.33) by Buster "Mr. Zero" Nielsen
  31 "Sound Commands" (1.9.0.6249) by AlliedModders LLC
  32 "Survivor Chat Select" (1.6.1) by DeatChaos25, Mi123456 & Merudo
  33 "ThirdPersonShoulder_Detect" (1.4) by MasterMind420 & Lux


meta list
Listing 8 plugins:
  [01] L4DToolZ (1.0.0.9h-unknown) by Ivailosp
  [02] SourceMod (1.9.0.6249) by AlliedModders LLC
  [03] DefibFix Extension (1.0.1) by V10, Accelerator
  [04] [L4D2] 8+ Players BugFixes (1.0.2) by V10, Accelerator, $atanic $pirit
  [05] [L4D2] Melee Spawn Control (1.0.0.4) by V10
  [06] SDK Tools (1.9.0.6249) by AlliedModders LLC
  [07] Left 4 Downtown 2 (0.6.3) by Downtown1, ProdigySim, Visor, Accelerator; minor contrib.: XBetaAlpha, AtomicStryker, xerox8521
  [08] SDK Hooks (1.9.0.6249) by AlliedModders LLC


Lux 08-14-2018 00:10

Re: [L4D2]Character_manager (1.1.1 - 14/08/2018 )
 
The downtown in the post is currently maintained by spirit12, most other forks are not.
Downtown may fail in the future however vpk should never fail unless you have addons that change the same file causing conflicts.

jking 08-14-2018 00:20

Re: [L4D2]Character_manager (1.1.1 - 14/08/2018 )
 
Quote:

Originally Posted by Lux (Post 2610076)
The downtown in the post is currently maintained by spirit12, most other forks are not.
Downtown may fail in the future however vpk should never fail unless you have addons that change the same file causing conflicts.

I should've clarified I am using Spirit's Downtown, just that forceset does not work with it, so I use the .apk.

Lux 08-14-2018 00:23

Re: [L4D2]Character_manager (1.1.1 - 14/08/2018 )
 
Quote:

Originally Posted by jking (Post 2610079)
I should've clarified I am using Spirit's Downtown, just that forceset does not work with it, so I use the .apk.

You should report that to spirit 12 so it can be fixed.

Besure to send any error logs and console logs with errors regarding that.

jking 08-14-2018 00:28

Re: [L4D2]Character_manager (1.1.1 - 14/08/2018 )
 
Quote:

Originally Posted by Lux (Post 2610081)
You should report that to spirit 12 so it can be fixed.

Besure to send any error logs and console logs with errors regarding that.

Thing is, there weren't any oddly enuf. I think it's forceset that needs a redo. In any event I'll let him know.

jking 08-21-2018 22:45

Re: [L4D2]Character_manager (1.1.1 - 14/08/2018 )
 
Not sure what happened, but the latest L4D2 client update seems top have messed things up again, I'm back to getting duplicates, not sure what to make of it.

Lux 08-22-2018 06:46

Re: [L4D2]Character_manager (1.1.1 - 14/08/2018 )
 
Still works fine for me no idea how a clientupdate can do that?
Have you let gamedata of sourcemod update? dunno if there was any changes needed

https://media3.giphy.com/media/13Qumr2SLqrl5e/giphy.gif

jking 08-22-2018 10:52

Re: [L4D2]Character_manager (1.1.1 - 14/08/2018 )
 
Quote:

Originally Posted by Lux (Post 2611560)
Still works fine for me no idea how a clientupdate can do that?
Have you let gamedata of sourcemod update? dunno if there was any changes needed

https://media3.giphy.com/media/13Qumr2SLqrl5e/giphy.gif

yeah I don't know what to make of it, I reinstalled everything and seems to work ok on most camps, some custom maps are a different animal it seems...

Lux 08-22-2018 11:10

Re: [L4D2]Character_manager (1.1.1 - 14/08/2018 )
 
Quote:

Originally Posted by jking (Post 2611592)
yeah I don't know what to make of it, I reinstalled everything and seems to work ok on most camps, some custom maps are a different animal it seems...

Quote:

Originally Posted by Lux (Post 2607394)
Plugin: forceset
or
Optional Setting survivor_set 2 with vpk
I'v included vpk(7z attachment) for all valve maps that sets the "survivor_set" to "2"
This method would require you to set them all your self in mission.txt file per addon.
"addons/optional"
Restart server once installed.

Ill add abit more info regarding other addons

jking 08-22-2018 12:28

Re: [L4D2]Character_manager (1.1.1 - 14/08/2018 )
 
Quote:

Originally Posted by Lux (Post 2611593)
Ill add abit more info regarding other addons

copy that, but just so I'm clear the Survivor Set 2 .apk is server side only correct?

I'm having a particular tough time getting Yama for one to work without duplicates...

Yama is a no go for me, tried 6 ways to Sunday to get this to work, through.

Lux 08-22-2018 13:40

Re: [L4D2]Character_manager (1.1.1 - 14/08/2018 )
 
Quote:

Originally Posted by jking (Post 2611609)
copy that, but just so I'm clear the Survivor Set 2 .apk is server side only correct?

I'm having a particular tough time getting Yama for one to work without duplicates...

Yea it ONLY works for valve maps(attached .vpk NOT .apk) you will have to update your own vpk's with survivor_set 2
or
Use downtown whichever downtown works seems downtown has problems as usual? (or it could be you?)


Quote:

Originally Posted by Lux (Post 2607394)
A simple plugin that sets bots to least used survivor character when spawned from(0-7).

Code:

Few notes:
This plugin assumes you are using "survivor_set" "2" and will not workaround if not 2.
however you don't have to it just wont work correctly.

or
Optional Setting survivor_set 2 with vpk
I'v included vpk(7z attachment) for all valve maps that sets the "survivor_set" to "2"
"addons/optional"

Note for custom maps requires you to edit the mission.txt in each custom map vpk files to change "survivor_set" "2" (this is not required if you use forceset plugin)
Restart server once installed.


I will update main thread again to more clear

jking 08-22-2018 14:35

Re: [L4D2]Character_manager (1.1.1 - 14/08/2018 )
 
Quote:

Originally Posted by Lux (Post 2611620)
Yea it ONLY works for valve maps(attached .vpk NOT .apk) you will have to update your own vpk's with survivor_set 2
or
Use downtown whichever downtown works seems downtown has problems as usual? (or it could be you?)




I will update main thread again to more clear

jeez did I actually say .apk? where's my head today :oops: I was working with android files (.apks) the other day.
I'm in the middle of packing for a move, I need a nap. The thread is fine, maybe some clarification but overall is fine. Thing is, many custom maps work fine for me, e.g. Silent Hill is fine, great map btw and there are others, deadbeforedawn2_dc, Urban Fight, Warcelona (I think, I'll check again) many more, just don't get why Yama doesn't.

I'm using all of Spirit_12's current updated Downtown2 (No-slots), L4DToolZ, Defib Fix and L4D2 8+ Players Bugfixes

I've found that I need to have the l4d2_survivorset 2.vpk in the client /addons folder also to have unique characters in maps such as Docks etc. and this is with NOT using Identity Fix, Passing Fix nor forceset, just the aforementioned .apk and the 8playerstalkerfix.vpk (not in client /addons folder)

How do we edit the .vpk's for the Mission.txt to save? I have GCFScape and I've associated the .vpks to open with it but I'm not sure as to how to edit and save within it...(nvm, grabbing authoring tools etc.)

Spirit_12 08-22-2018 17:31

Re: [L4D2]Character_manager (1.1.1 - 14/08/2018 )
 
You want to implement the hook directly into the plugin with Dhooks? I can easily create a little snippet for you, if you want to remove the reliance on L4Downtown2.

jking 08-22-2018 17:46

Re: [L4D2]Character_manager (1.1.1 - 14/08/2018 )
 
Quote:

Originally Posted by Spirit_12 (Post 2611655)
You want to implement the hook directly into the plugin with Dhooks? I can easily create a little snippet for you, if you want to remove the reliance on L4Downtown2.

would that be easier than what I did below? I'll PM you later this eve if that works...

So, I used Authoring tools, extracted root l4d_yama.vpk files to outside temp folder, edited the Yama.txt missions file to ["survivor_set" "2"]then saved, repacked using vpk.exe and now have all 8 survivors...

http://i306.photobucket.com/albums/n...5-37-04-94.png

I don't have Character Manager loaded yet. I'm not sure what would be easier, edit all of the custom maps that need it or add the appropriate entries to your existing Survivor set 2 .vpk assuming that's possible.

Lux 08-22-2018 18:39

Re: [L4D2]Character_manager (1.1.1 - 14/08/2018 )
 
Quote:

Originally Posted by Spirit_12 (Post 2611655)
You want to implement the hook directly into the plugin with Dhooks? I can easily create a little snippet for you, if you want to remove the reliance on L4Downtown2.

:shock:

Spirit_12 08-22-2018 19:14

Re: [L4D2]Character_manager (1.1.1 - 14/08/2018 )
 
Quote:

Originally Posted by jking (Post 2611660)
would that be easier than what I did below? I'll PM you later this eve if that works...

My message was for Lux.

Quote:

Originally Posted by Lux (Post 2611672)
:shock:

I have that effect on people.

Lux 08-22-2018 19:53

Re: [L4D2]Character_manager (1.1.1 - 14/08/2018 )
 
Quote:

Originally Posted by Spirit_12 (Post 2611679)
My message was for Lux.



I have that effect on people.


Sure that would be nice, i thought about using dhooks for it, but i don't use downtown just vpk :P
That would be easier for people to install!

For me 8 survivors i only use survivor_set 2 because it stops the clone bugs ect

->GetNamedSurvivor()// silvers said. something like that for the !zoey !coach
targeting that the witch charger ect use to trigger stuff :P

Spirit_12 08-22-2018 20:09

Re: [L4D2]Character_manager (1.1.1 - 14/08/2018 )
 
Quote:

Originally Posted by Lux (Post 2611684)
Sure that would be nice, i thought about using dhooks for it, but i don't use downtown just vpk :P

vpk method would not work for me. I run way too many custom maps to edit each and every one of them. That's the reason I don't like to hardcode stuff, as I want people to play more custom maps.

I'll post the code tonight.

jking 08-22-2018 20:20

Re: [L4D2]Character_manager (1.1.1 - 14/08/2018 )
 
Quote:

Originally Posted by Spirit_12 (Post 2611679)
My message was for Lux.

you never specified but I should've figured...

Quote:

Originally Posted by Spirit_12 (Post 2611687)
vpk method would not work for me. I run way too many custom maps to edit each and every one of them...
I'll

actually unless you have a s**t ton of maps doesn't take long at all...

looking forward to what you both come up with.

Psyk0tik 08-22-2018 21:00

Re: [L4D2]Character_manager (1.1.1 - 14/08/2018 )
 
I had 200 custom campaigns at one point and it took me hours just to make sure survivor_set is set to 2 for all of them.

jking 08-22-2018 21:04

Re: [L4D2]Character_manager (1.1.1 - 14/08/2018 )
 
Quote:

Originally Posted by Crasher_3637 (Post 2611693)
I had 200 custom campaigns at one point and it took me hours just to make sure survivor_set is set to 2 for all of them.

wow, how on earth were you able to even find that many worth playing? I spent hours perhaps looking thru that many and came up with maybe a dozen worth a lick, maybe a few more possibly.

Spirit_12 08-22-2018 21:25

Re: [L4D2]Character_manager (1.1.1 - 14/08/2018 )
 
2 Attachment(s)
I've got 100+ on mine as well. Changing this on every map can be a big hassle.

Anyway, here is what I promised before. I ported the L4Downtown2 forward to plugin by using DHooks Detour.

PHP Code:

/**
 * @brief Called whenever CTerrorGameRules::GetSurvivorSet(void) is invoked
 *
 * @param retVal  what to override the return value with
 * 
 * @return         Pl_Handled to override return value, Pl_Continue otherwise.
 */
forward Action L4D_OnGetSurvivorSet(intretVal); 

It is totally up to you, if you want to have the forward separate or merge the code into one file.

This is how you can use the forward, if you want to keep it separate.

PHP Code:

#include <sourcemod>

Handle g_SurvSetCVar;

forward Action L4D_OnGetSurvivorSet(int &retVal)

public 
OnPluginStart()
{
    
g_SurvSetCVar CreateConVar("l4d_force_survivorset""1"
        
"Forces specified survivor set (0 - do not force, 1 - force l4d1 set, 2 - force l4d2 set (allows to use l4d2 survivors voices in l4d1 campaigns))");
}

public 
Action L4D_OnGetSurvivorSet(int &retVal)
{
    new 
val GetConVarInt(g_SurvSetCVar);
    if(
val == || val == 2)
    {
        
retVal val;
        return 
Plugin_Handled;
    }
    return 
Plugin_Continue;
}


Above code credited to ProdigySim.

Lux 08-22-2018 21:45

Re: [L4D2]Character_manager (1.1.1 - 14/08/2018 )
 
Quote:

Originally Posted by Spirit_12 (Post 2611696)
I've got 100+ on mine as well. Changing this on every map can be a big hassle.

Anyway, here is what I promised before. I ported the L4Downtown2 forward to plugin by using DHooks Detour.

PHP Code:

/**
 * @brief Called whenever CTerrorGameRules::GetSurvivorSet(void) is invoked
 *
 * @param retVal  what to override the return value with
 * 
 * @return         Pl_Handled to override return value, Pl_Continue otherwise.
 */
forward Action L4D_OnGetSurvivorSet(intretVal); 

It is totally up to you, if you want to have the forward separate or merge the code into one file.

This is how you can use the forward, if you want to keep it separate.

PHP Code:

#include <sourcemod>

Handle g_SurvSetCVar;

forward Action L4D_OnGetSurvivorSet(int &retVal)

public 
OnPluginStart()
{
    
g_SurvSetCVar CreateConVar("l4d_force_survivorset""1"
        
"Forces specified survivor set (0 - do not force, 1 - force l4d1 set, 2 - force l4d2 set (allows to use l4d2 survivors voices in l4d1 campaigns))");
}

public 
Action L4D_OnGetSurvivorSet(int &retVal)
{
    new 
val GetConVarInt(g_SurvSetCVar);
    if(
val == || val == 2)
    {
        
retVal val;
        return 
Plugin_Handled;
    }
    return 
Plugin_Continue;
}


Above code credited to ProdigySim.

:shock::shock::shock::shock::shock::shock::sh ock::shock::shock::shock::shock::shock:
Nice! dunno if the forward is needed but ill just link the post in the thread!

Ill think about it, should i merge it? would that be ideal?

Spirit_12 08-22-2018 22:14

Re: [L4D2]Character_manager (1.1.1 - 14/08/2018 )
 
Quote:

Originally Posted by Lux (Post 2611698)
:shock::shock::shock::shock::shock::shock::sh ock::shock::shock::shock::shock::shock:
Nice! dunno if the forward is needed but ill just link the post in the thread!

Ill think about it, should i merge it? would that be ideal?

The only time when I'll create a forward is when a function is used frequently by multiple plugins. When I search the native its not really used by that many plugins, so merging might be a better idea.

On the flip side. Why do you need the survivor_set to be 2? You can easily code around that part as native will tell you what survivor set is default. I think you should improve the plugin to where you are not forced to using new survivors on all maps.

Lux 08-23-2018 14:40

Re: [L4D2]Character_manager (1.1.1 - 14/08/2018 )
 
Quote:

Originally Posted by Spirit_12 (Post 2611700)
The only time when I'll create a forward is when a function is used frequently by multiple plugins. When I search the native its not really used by that many plugins, so merging might be a better idea.

On the flip side. Why do you need the survivor_set to be 2? You can easily code around that part as native will tell you what survivor set is default. I think you should improve the plugin to where you are not forced to using new survivors on all maps.

There is not point using this if you don't force survivorset 2
the game its self puts people to the least used survivor between 0-3 survivors, i just enable it to do all 0-7, survivorset 1 does not really benefit from this plugin.

On another note i could make it start from l4d1 survivors or l4d2 survivors first dunno ill see about it later.

Lux 08-23-2018 21:52

Re: [L4D2]Character_manager (1.1.1 - 14/08/2018 )
 
Quote:

Originally Posted by Spirit_12 (Post 2611700)
On the flip side. Why do you need the survivor_set to be 2? You can easily code around that part as native will tell you what survivor set is default. I think you should improve the plugin to where you are not forced to using new survivors on all maps.

Spoiler


Update 1.3.1
Added:
PHP Code:

// survivor set you wish to use, 0 = (use map default), 1 = (l4d1), 2 = (l4d2), 3 = (use both)
// -
// Default: "3"
// Minimum: "0.000000"
// Maximum: "3.000000"
l4d2_survivor_set "3" 

Supports any survivorset
Requires Dhooks peace-maker's fork

removed survivor_set vpk

Enjoy.

jking 08-23-2018 22:23

Re: [L4D2]Character_manager (1.1.1 - 14/08/2018 )
 
Quote:

Originally Posted by Lux (Post 2611912)
Spoiler


Update 1.3.1
Added:
PHP Code:

// survivor set you wish to use, 0 = (use map default), 1 = (l4d1), 2 = (l4d2), 3 = (use both)
// -
// Default: "3"
// Minimum: "0.000000"
// Maximum: "3.000000"
l4d2_survivor_set "3" 

Supports any survivorset
Requires Dhooks peace-maker's fork

removed survivor_set vpk

Enjoy.

Nice, so to confirm we won't need the .vpk now?

I'm getting duplicates on Docks with this, why? For now, going back to the .vpk and previous CM.

Lux 08-23-2018 22:42

Re: [L4D2]Character_manager (1.1.1 - 14/08/2018 )
 
Quote:

Originally Posted by jking (Post 2611913)
Nice, so to confirm we won't need the .vpk now?

I'm getting duplicates on Docks with this, why? For now, going back to the .vpk and previous CM.

These problems only seem to happen to you -_-
I have noidea why.

jking 08-23-2018 22:44

Re: [L4D2]Character_manager (1.1.1 - 14/08/2018 )
 
Quote:

Originally Posted by Lux (Post 2611916)
These problems only seem to happen to you -_-
I have noidea why.

Yeah funny how that seems to happen eh? If it ain't broke ...I call it as I see it.

Just testing on Docks atm, without old CM enabled, and using the .vpk on server and client, I get all 8 unique characters. Interesting to see if this new version of CM at all conflicts with Merudo's Survivor Chat Select 1.6.1 cvar,

PHP Code:

// Change new bots to least prevalent survivor? 1:Enable, 0:Disable
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_scs_botschange "1" 



All times are GMT -4. The time now is 22:17.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.