AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [L4D2] Survivor Bot Holdout (1.9) [29-Apr-2022] (https://forums.alliedmods.net/showthread.php?t=188966)

Silvers 07-02-2012 08:05

[L4D2] Survivor Bot Holdout (1.9) [29-Apr-2022]
 
14 Attachment(s)



About:
  • Create Bill, Francis, Louis, Zoey, Nick, Rochelle, Coach and Ellis to holdout their surrounding area.
  • Bots are frozen and throw items just as they do on "c6m3_port".
  • The config which stores the bots spawn location data is saved to \sourcemod\data\l4d2_holdout.cfg.
  • A file called l4d2_holdout.nut is saved to your servers \left4dead2\left4dead2\scripts\vscripts\ folder and is required to function. - Old version.


Known Bugs:
  • No control over which items are thrown.
  • Cannot use this plugin on "c6m1_riverbank" or "c6m3_port" maps.


Thanks:
  • Don't Fear The Reaper
  • disawar1
  • Herbie
  • Zbeer
  • DrDarkTempler


Admin Commands: (requires "z" flag)

PHP Code:

sm_holdout        // Saves to the config for auto spawning or Deletes if already saved. Usage: sm_holdout <1=Francis, 2=Louis, 3=Zoey, 4=Bill, 5=Nick, 6=Rochelle, 7=Coach, 8=Ellis> [weapon name, eg: rifle_ak47 or 0 for random weapon].
sm_holdout_temp   // Spawn a temporary survivor (not saved). Usage: sm_holdout_temp <1=Francis, 2=Louis, 3=Zoey, 4=Bill, 5=Nick, 6=Rochelle, 7=Coach, 8=Ellis> [weapon name, eg: rifle_ak47 or 0 for random weapon].
sm_holdout_give   // Makes one of the survivors give an item. 


CVars:

Saved to l4d2_holdout.cfg in your servers \cfg\sourcemod\ folder.

PHP Code:

// 0=Plugin off, 1=Plugin on.
l4d2_holdout_allow "1"

// 0=Allow bots to move and take items. 1=Prevent bots from moving (old method).
l4d2_holdout_freeze "1"

// 0=No. 1=Give the survivors laser sights.
l4d2_holdout_lasers "1"

// 0=No. The chance out of 100 for Louis to get a minigun.
l4d2_holdout_minigun "75"

// Turn on the plugin in these game modes, separate by commas (no spaces). (Empty = all).
l4d2_holdout_modes ""

// Turn off the plugin in these game modes, separate by commas (no spaces). (Empty = none).
l4d2_holdout_modes_off ""

// Turn on the plugin in these game modes. 0=All, 1=Coop, 2=Survival, 4=Versus, 8=Scavenge. Add numbers together.
l4d2_holdout_modes_tog "0"

// 0=Off, 1=Spawn an ammo pile next to a survivor when spawning them.
l4d2_holdout_pile "1"

// 0=Off, -1=Infinite. How many items can survivors throw in total.
l4d2_holdout_throw "-1"

// 0=Off. Maximum time before allowing the survivors to give an item.
l4d2_holdout_time_max "90"

// 0=Off. Minimum time before allowing the survivors to give an item.
l4d2_holdout_time_min "45"

// Survivor Bot Holdout plugin version.
l4d2_holdout_version 



Changes:
Code:

1.9 (29-Apr-2022)
    - Changed commands "sm_holdout" and "sm_holdout_temp" to accept the parameter "0" to spawn bots with random weapons.
    - Thanks to "kot4404" for the idea and some code.

1.8 (21-Sep-2021)
    - Now spawns L4D2 Survivors as holdout Survivors!
    - L4D2 Survivors may use some new voice lines when throwing items.
    - Changed from using hard coded offsets for weapon ammo. Thanks to "Root" for the method.
    - Replaced input "Kill" with "RemoveEntity". Now requires SourceMod 1.10 or newer.

1.7 (09-Oct-2020)
    - Added plugin enabled check when using commands to prevent usage if turned off.
    - Automatically detects and blocks the plugin running on maps which spawn their own L4D1 holdout survivors.
    - Changed character number for Louis. Has no affect. Thanks to "Crasher_3637" for reporting.
    - Fixed round restart resetting the blocked map bool.

1.6 (10-May-2020)
    - Extra checks to prevent "IsAllowedGameMode" throwing errors.
    - Various changes to tidy up code.
    - Various optimizations and fixes.

1.5 (01-Apr-2020)
    - Fixed "IsAllowedGameMode" from throwing errors when the "_tog" cvar was changed before MapStart.

1.4.2 (03-Jul-2019)
    - Minor changes to code, has no affect and not required.

1.4.1 (28-Jun-2019)
    - Removed VScript file, directly executes the VScript code instead.

1.4 (03-Jun-2019)
    - Fixed conflicts with playable survivors, holdout survivors should now spawn correctly.
    - Changed cvar "l4d2_holdout_freeze" removed option 2 - memory patching method.
    - Removed cvar "l4d2_holdout_prevent". No longer required thanks to the latest fixes.
    - Removed gamedata dependency.

1.3 (05-May-2018)
    - Converted plugin source to the latest syntax utilizing methodmaps. Requires SourceMod 1.8 or newer.

1.2.2 (29-Apr-2017)
    - Fixed server crash on certain maps.

1.2.1 (04-Dec-2016)
    - Renamed some variables because of SourceMod updating reserved keywords.

1.2 (11-Jul-2013)
    - Added Bill to spawn list!
    - Updated gamedata txt file.

1.1 (07-Oct-2012)
    - Added cvar "l4d2_holdout_pile" to create ammo piles next to survivors with primary weapons.
    - Added cvar "l4d2_holdout_freeze" to optionally freeze bots in their place.
    - Changed the freeze method to memory patching, which prevents dust under the bots feet.
    - Requires the added gamedata "l4d2_holdout.txt" for memory patching.

1.0 (02-Jul-2012)
    - Initial release.


Installation:
  1. Click "Get Plugin" and put the .smx file into your servers \addons\sourcemod\plugins\ folder.

Updating from 1.3:
  • New cvars have been added: use the Cvar Configs Updater, or delete the old cvars config or manually add them.

SilentBr 07-02-2012 09:51

Re: [L4D2] Survivor Bot Holdout (1.0) [02-Jul-2012]
 
Great plugin Silvers. I ll test later.

As always you rock doing plugins!

Thank you very much for helping L4D2 servers!

alexip121093 07-02-2012 11:53

Re: [L4D2] Survivor Bot Holdout (1.0) [02-Jul-2012]
 
another plugin to improve the gameplay of l4d2
GJ

Sev 07-02-2012 13:02

Re: [L4D2] Survivor Bot Holdout (1.0) [02-Jul-2012]
 
Great work on this plugin Silver.

Just when I thought we had expended all options on creativity with this game.

Shame about Bill. I assume its the windows issue or just him not having that code that came with the Passing set of survivors?

Regarding ammo. Just wondering.

Do the L4D1 survivors have infinite ammo in their primaries or do they run out? I'd hope for infinite only because it would be lame for them to run out in a stationary spot.

Though I suppose for realism, you could probably make them run out of ammo and grab ammo nearby if near it.

Silvers 07-02-2012 13:24

Re: [L4D2] Survivor Bot Holdout (1.0) [02-Jul-2012]
 
Quote:

Originally Posted by Sev (Post 1741306)
Shame about Bill. I assume its the windows issue or just him not having that code that came with the Passing set of survivors?

Something like that yeah.


Quote:

Originally Posted by Sev (Post 1741306)
Regarding ammo. Just wondering.

Do the L4D1 survivors have infinite ammo in their primaries or do they run out? I'd hope for infinite only because it would be lame for them to run out in a stationary spot.

I've not tested that enough to know. Ammo is set to 9999 but when I picked up the weapon after slaying them it had the default maximum ammo (this is before I made it remove the weapon/kick the bot). I did not check after they had been shooting if the ammo was less (which would confirm if they had more than default ammo previous to being slayed).


Quote:

Originally Posted by Sev (Post 1741306)
Though I suppose for realism, you could probably make them run out of ammo and grab ammo nearby if near it.

They are frozen in place, to prevent them teleporting and running around stupidly, so no they won't scavenge for other weapons, if anything they have pistols.

Sev 07-02-2012 18:20

Re: [L4D2] Survivor Bot Holdout (1.0) [02-Jul-2012]
 
Quote:

Originally Posted by Silvers (Post 1741316)
I've not tested that enough to know. Ammo is set to 9999 but when I picked up the weapon after slaying them it had the default maximum ammo (this is before I made it remove the weapon/kick the bot). I did not check after they had been shooting if the ammo was less (which would confirm if they had more than default ammo previous to being slayed).

Something to ponder.

I gave them the specialty weapons (M60/Nade Launcher) and they use them. However they do drop the m60 so it must run out of ammo. The Nade launcher doesn't seem to run out of ammo that I've noticed.

SyluxLockjaw100 07-03-2012 01:01

Re: [L4D2] Survivor Bot Holdout (1.0) [02-Jul-2012]
 
Nice!!! Great job again as usual Silvers!

adrianman 07-03-2012 07:05

Re: [L4D2] Survivor Bot Holdout (1.0) [02-Jul-2012]
 
people like you never cease to amaze me,good job once again :)

l4d2master 07-03-2012 15:32

Re: [L4D2] Survivor Bot Holdout (1.0) [02-Jul-2012]
 
Can you make a command like sm_holdoutdel to remove the holdout from the save file like the jukebox spawner https://forums.alliedmods.net/showthread.php?p=1405042
or the mic spawner
https://forums.alliedmods.net/showthread.php?p=1622558

Silvers 07-03-2012 15:58

Re: [L4D2] Survivor Bot Holdout (1.0) [02-Jul-2012]
 
Quote:

Originally Posted by l4d2master (Post 1742471)
Can you make a command like sm_holdoutdel to remove the holdout from the save file like the jukebox spawner https://forums.alliedmods.net/showthread.php?p=1405042
or the mic spawner
https://forums.alliedmods.net/showthread.php?p=1622558

Quote:

sm_holdout // Saves to the config for auto spawning or Deletes if already saved. Usage: sm_holdout <1=Francis, 2=Louis, 3=Zoey> [weapon name, eg: rifle_ak47].
Why does no one read?


All times are GMT -4. The time now is 01:21.

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