Raised This Month: $32 Target: $400
 8% 

[L4D] VS Infected Bots (1.6) (old)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
djromero
Senior Member
Join Date: Dec 2008
Location: Maracaibo, Venezuela
Plugin ID:
743
Plugin Version:
1.6.1
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Spawns infected bots when there's less than 4 players on infected's team
    Unapprover:
    Reason for Unapproving:
    continued by http://forums.alliedmods.net/showthread.php?t=99746
    Old 01-30-2009 , 05:17   [L4D] VS Infected Bots (1.6) (old)
    Reply With Quote #1


    NOTE: This plugin will continue to be supported by mi123645 on this thread:

    http://forums.alliedmods.net/showthr...938#post893938




    Features:
    - Custom Infected HUD (based on Durzel's Infected HUD plugin) to keep track of the bots.
    - It uses L4D built-in cvars to configure itself (z_versus_boomer_limit, z_ghost_delay_max, etc).
    - Spawns special infected bots to fill up the infected's team (up to z_max_player_zombies).
    - When a real player connects and joins the infected team, any extra bot will be kicked.
    - 2 cvars to disallow spawning certain infected bots (boomers and smokers): l4d_infectedbots_allow_boomer and l4d_infectedbots_allow_boomer
    - 1 cvar to change the way you want infected spawn time handled:
    ===> 0 (default): Human zombies will use default spawn times (min time if less than 3 players in team) (min default is 20)
    ===> 1: Bots and human zombies will have the same spawn time. (max default is 30).
    - cvar to enable/disable infected bots hud: l4d_infectedbots_showhud (default is 1 - enabled).

    Know problems:
    - Since this plugin uses the "z_spawn" command to spawn the infected bots (by temporarily changing his sv_cheats flags), it won't work if you have Kigen's anti-cheat plugin installed on your server, since it will detect the spawn attempt as a cheat. I don't know if Kigen's plugin has a setting to allow this for server plugins, but it didn't allow me to use this command from my plugin.
    - Special infected bots know shit about team work .... so don't expect them to coordinate their attacks with yours

    How to install:
    - Download l4dvsinfectedbots.smx or compile (on your pc) l4dvsinfectedbots.sp with latest 1.2 snapshot (at least 2541).
    - Copy the l4dvsinfectedbots.smx file on the ../sourcemod/plugins folder and restart your server.

    Change log:
    Version 1.0:
    - Initial release.
    Version 1.1:
    - Implemented "give health" command on infected spawn, to fix the no-hud/no-pounce bug.
    Version 1.1.1:
    - Fixed survivor's quick HUD refresh when spawning infected bots.
    Version 1.1.2:
    - Implemented a different method to fix the survivor's quick HUD refresh when spawning infected bots. Previous one wasn't working well.
    Version 1.2:
    - Fixed several bugs while counting players.
    - Added chat message to inform infected players (only) that a new bot has been spawned.
    Version 1.3:
    - No infected bots are spawned if at least one player is in ghost mode. If a bot is scheduled to spawn but a player is in ghost mode, the bot will spawn no more than 5 seconds after the player leaves ghost mode (spawns).
    - Infected bots won't stay AFK if they spawn far away. They will always search for survivors even if they're far from them.
    - Allows survivor's team to be all bots, since we can have all bots on infected's team.
    Version 1.4:
    - Now Infected bots can spawn even when a real player is dead or in ghost mode without forcing the real player to spawn.
    - Since real players won't be forced to spawn, they won't spawn outside the map or in places they can't get out (where only bots can get out).
    - Minor changes to avoid some crashes.
    Version 1.5:
    - Added HUD panel for infected bots. Original idea from: Durzel's Infected HUD plugin. Some code was copied from it with his permission.
    - Added validations so that boomers and smokers do not spawn too often. A boomer can only spawn (as a bot) after XX seconds have elapsed since the last one died.
    - Added/fixed some routines/validations to prevent memory leaks.
    Version 1.5.1:
    - Fixed major bugs that caused server to hang (infite loops and threading problems).
    Version 1.5.2:
    - Normalized spawn times for human zombies (min = max).
    - Fixed spawn of extra bot when someone dead becomes a tank. If player was alive, his bot will still remain if he gets a tank.
    - Added 2 new cvars to disallow boomer and/or smoker bots:
    ==> l4d_infectedbots_allow_boomer = 1 (allow, default) / 0 (disallow)
    ==> l4d_infectedbots_allow_smoker = 1 (allow, default) / 0 (disallow)
    Version 1.5.3
    - Fixed issue when boomer/smoker bots would spawn just after human boomer/smoker was killed. (I had to hook the player_death event as pre, instead of post to be able to check for some info).
    - Added new cvar to control the way you want infected spawn times handled:
    * l4d_infectedbots_normalize_spawntime:
    ===> 0 (default): Human zombies will use default spawn times (min time if less than 3 players in team) (min default is 20)
    ===> 1: Bots and human zombies will have the same spawn time. (max default is 30).
    - Fixed issue when all players leave and server would keep playing with only survivor/infected bots.
    - Updated version CVAR, now it will show 1.5.3
    Version 1.5.4.
    - Fixed (now) issue when all players leave and server would keep playing with only survivor/infected bots.
    Version 1.5.5.
    - Fixed some issues with infected boomer/smoker bots spawning just after human boomer is killed.
    - Changed method of detecting VS maps to allow non-vs maps to use this plugin.
    Version 1.5.6
    - Rollback on method of detecting VS maps.
    Version 1.5.7
    - Rewrited the logic on map change and round end.
    - Removed multiple timers on "kickallbots" routine.
    - Added checks to "IsClientInKickQueue" before kicking bots.
    Version 1.6.
    - Finally fixed issue of server hanging on mapchange or when last player leaves. Thx to AcidTester for his help testing this.
    - Added cvar to disable infected bots HUD
    Version 1.6.1
    - Changed some routines to prevent crash on round end. (last version supported by me)


    Thanks to all who have helped me test this plugin. I couldn't have done it without all your feedback.

    NOTE: "Get Plugin" will now compile with SM 1.2
    Attached Files
    File Type: sp Get Plugin or Get Source (l4dvsinfectedbots.sp - 13185 views - 29.5 KB)
    __________________
    David Romero



    Last edited by djromero; 08-08-2009 at 22:57. Reason: Upgraded to version 1.6.1
    djromero is offline
    ogre_x
    Member
    Join Date: Dec 2008
    Location: Sweden
    Old 01-30-2009 , 05:27   Re: [L4D] VS Infected Bots
    Reply With Quote #2

    Interesting - I've wanted a plugin like this since the game came out. I will give it a go on my server tonight.
    __________________
    ogre_x is offline
    djromero
    Senior Member
    Join Date: Dec 2008
    Location: Maracaibo, Venezuela
    Old 01-30-2009 , 05:29   Re: [L4D] VS Infected Bots
    Reply With Quote #3

    Quote:
    Originally Posted by ogre_x View Post
    Interesting - I've wanted a plugin like this since the game came out. I will give it a go on my server tonight.
    Thank you.
    __________________
    David Romero


    djromero is offline
    Mienaikage
    Junior Member
    Join Date: Jan 2009
    Old 01-30-2009 , 06:34   Re: [L4D] VS Infected Bots
    Reply With Quote #4

    EDIT: My mistake

    Last edited by Mienaikage; 01-30-2009 at 07:13.
    Mienaikage is offline
    djromero
    Senior Member
    Join Date: Dec 2008
    Location: Maracaibo, Venezuela
    Old 01-30-2009 , 06:49   Re: [L4D] VS Infected Bots
    Reply With Quote #5

    Quote:
    Originally Posted by Mienaikage View Post
    L 01/30/2009 - 1113: [SM] MEMORY LEAK DETECTED IN PLUGIN (file "l4dvsinfectedbots.smx")
    L 01/30/2009 - 1113: [SM] Reloading plugin to free 16128 handles.
    L 01/30/2009 - 1113: [SM] Contact the author(s) of this plugin to correct this error.

    Not seeing any infected bots, survivor bots seem to randomly disappear then reappear, or die.
    I have tested it on 2 servers now, and i didn't get that message.

    Did you compile the .sp yourself or did you use the web compiler???

    Are you using any anti-cheat plugin?

    Did you get those messages right from the start or after playing for a while?
    __________________
    David Romero


    djromero is offline
    Mienaikage
    Junior Member
    Join Date: Jan 2009
    Old 01-30-2009 , 07:06   Re: [L4D] VS Infected Bots
    Reply With Quote #6

    Ah my bad, I looked at my server and it looks like it's conflicting with the admincheats plugin. (Didn't think of it as an anti-cheat lol)

    Disregard my last post.
    Mienaikage is offline
    Mienaikage
    Junior Member
    Join Date: Jan 2009
    Old 01-30-2009 , 07:33   Re: [L4D] VS Infected Bots
    Reply With Quote #7

    Just a small thing you might want to add, when you're switched to a bot you have no HUD, and if you're a hunter you can't pounce. It's a problem that needs to be addressed by Valve, but there is a workaround:

    http://www.left4dead411.com/forums/i...ic=9041&page=0

    Could you make it so that when you're switched to an infected bot the "give health" command executes so you get your HUD back?
    Mienaikage is offline
    djromero
    Senior Member
    Join Date: Dec 2008
    Location: Maracaibo, Venezuela
    Old 01-30-2009 , 10:59   Re: [L4D] VS Infected Bots
    Reply With Quote #8

    Quote:
    Originally Posted by Mienaikage View Post
    Just a small thing you might want to add, when you're switched to a bot you have no HUD, and if you're a hunter you can't pounce. It's a problem that needs to be addressed by Valve, but there is a workaround:

    http://www.left4dead411.com/forums/i...ic=9041&page=0

    Could you make it so that when you're switched to an infected bot the "give health" command executes so you get your HUD back?
    Thx for addressing it .... i'll try to do that ;)
    __________________
    David Romero


    djromero is offline
    djromero
    Senior Member
    Join Date: Dec 2008
    Location: Maracaibo, Venezuela
    Old 01-30-2009 , 12:17   Re: [L4D] VS Infected Bots
    Reply With Quote #9

    Quote:
    Originally Posted by Mienaikage View Post
    Just a small thing you might want to add, when you're switched to a bot you have no HUD, and if you're a hunter you can't pounce. It's a problem that needs to be addressed by Valve, but there is a workaround:

    http://www.left4dead411.com/forums/i...ic=9041&page=0

    Could you make it so that when you're switched to an infected bot the "give health" command executes so you get your HUD back?
    Ok, done on version 1.1.
    __________________
    David Romero


    djromero is offline
    Dark-Reaper
    Member
    Join Date: Jan 2009
    Old 01-30-2009 , 12:39   Re: [L4D] VS Infected Bots
    Reply With Quote #10

    Really, fucking awesome work, it's the end of the ragequit.

    I'll install it but could you explain more the spawn system for the AI infected ?

    Will they spawn near, far, behind, in front of the survivors ?

    Will your plugin change some cvars ?

    For the strategy I'v an idea :

    Let the AI bots spawn ONLY if there is already one real player alive.

    But really awesome work guy !
    Dark-Reaper is offline
    Reply


    Thread Tools
    Display Modes

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


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


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