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

[L4D] Simple Mob Controller (1.4)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
olj
Veteran Member
Join Date: Jun 2009
Plugin ID:
1008
Plugin Version:
1.4
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
    4 
    Plugin Description:
    Controls mob size and tank hp based on number of survivors in game
    Old 07-16-2009 , 15:07   [L4D] Simple Mob Controller (1.4)
    Reply With Quote #1

    This is my first plugin so dont be too hard on it. It controls "z_mob and z_mega_mob cvars based o the number of survivors in game. Its using player_team l4d event. Basically - it hooks when someone (bot or player) changes team and changes convar which controls how much common zombies should be added to above mentioned cvars. I added a feature to control tank hp in same way too.

    Config

    It will create cfg file named l4d_mob_control.cfg in your left4dead\cfg\sourcemod folder.

    CVARS

    // Set to 1 if you want plugin to process bots too.
    // -
    // Default: "1"
    l4d_mobcontrol_includebots "1"

    // Version of L4D Mob Control on this server
    // -
    // Default: "1.4"
    l4d_mobcontrol_version "1.4"

    // Sets how much zombies to add per survivor
    // -
    // Default: "8"
    l4d_mobcontrol_zombiestoadd "8"

    // Enables or disables plugin
    // -
    // Default: "1"
    l4d_mobcontrol_enabled "1"

    // Disables or enables tank bonus hp feature
    // -
    // Default: "1"
    l4d_mobcontrol_tank_bonushealth_enabled "1"

    // Sets how much HP to add per survivor
    // -
    // Default: "666"
    l4d_mobcontrol_tank_bonushealth "666"



    Notes on mechanic
    Uses default values (or whatever you stated in your configs) of mob cvars as a base. If you have 60 mega mob size, it will add or substract extrazombies to that value each time a new survivor connects, changes team, or disconnects.

    If you disable plugin via cvar, all changed cvars' values wont revert to back.

    When setting tank bonus health per survivor value, remember that in versus mode final value will be modifed by versus_tank_bonus_health cvar (default is 1.5, so if tank has 5000 base hp + 3996 hp for 6 survivors it will be 8996*1.5 = 13494 hp in versus mode). THIS MODIFIER WILL BE APPLIED WHEN TANK ACTUALLY SPAWNS,

    Credits
    Thanks to everyone on this alliedmods.net forum and for guides on sourcemod scripting.
    AtomicStryker For his sample of code he provided me with. It gave me a good start, followed by browsing of sourcemod documentation.

    Things to do

    :-)

    Feel free to comment

    Changelog
    16.07.2009 / 1.0 Initial release
    17.07.2009/ Removed debug messages from code, cleaned from unnecessary comented lines
    17.07.2009/ 1.1 Removed more debug, fixed not changing z_mob when checking not bots changin teams
    20.07.2009/ 1.2 Rewrote the code, tried to add different modes, but failed, because events and functions related to map change works really retarded, dont know why though.
    27.07.2009/ 1.3 Added enable/disable cvar, added tank bonus hp (based on number of survivors) feature, fixed minor mistake in plugin version part.
    27.07.2009/ Fixed mistake, which caused tank health to increase only.
    27.07.2009/ 1.4 version, FIXED ENABLED CVAR, works good now
    Attached Files
    File Type: sp Get Plugin or Get Source (MobControl 1.3.sp - 4612 views - 5.4 KB)

    Last edited by olj; 08-05-2009 at 09:16.
    olj is offline
    Necrothug
    Member
    Join Date: Aug 2008
    Old 07-16-2009 , 21:54   Re: [L4D] Simple Mob Controller
    Reply With Quote #2

    I gotta say, I love this plugin. My one beef is all the extra text it puts on the screen. Any way to hide that?
    Necrothug is offline
    olj
    Veteran Member
    Join Date: Jun 2009
    Old 07-17-2009 , 02:09   Re: [L4D] Simple Mob Controller
    Reply With Quote #3

    Thanx i will look into it, but i thought i removed all the extra texts from it. Mb i forgot something. OH DAMN. I FORGOT TO REMOVE SOME DEBUG MESSAGES I USED. Removed them now.

    Last edited by olj; 07-17-2009 at 02:14.
    olj is offline
    Necrothug
    Member
    Join Date: Aug 2008
    Old 07-17-2009 , 07:07   Re: [L4D] Simple Mob Controller
    Reply With Quote #4

    Thanks! will test tonight.
    Necrothug is offline
    olj
    Veteran Member
    Join Date: Jun 2009
    Old 07-17-2009 , 07:41   Re: [L4D] Simple Mob Controller
    Reply With Quote #5

    Ye, i think its nice for servers with more than 8 ppl to have something to control cvars based on survivors quantity. I planning to add cvar to control mob spawn_delay cvars also (more survivors - less delay).

    Last edited by olj; 07-17-2009 at 07:45.
    olj is offline
    olj
    Veteran Member
    Join Date: Jun 2009
    Old 07-17-2009 , 12:37   Re: [L4D] Simple Mob Controller
    Reply With Quote #6

    There was a mistake, i forgot to add changing z_mob cvars when not-bots changed team, it only changed mega_mob. Fixed now.
    olj is offline
    Necrothug
    Member
    Join Date: Aug 2008
    Old 07-20-2009 , 22:33   Re: [L4D] Simple Mob Controller
    Reply With Quote #7

    So after playing with this plugin for several days now I have some more feedback.

    1. I love it, the option for unruly, devastating hordes is awesome. It really adds a whole new dimension to the game.

    2. No matter what I set it to, the hordes are too big during the finale. I have set the "l4d_mobcontrol_zombiestoadd" cvar to 2 and the finale event horde is still too big for the first tank to ever show up.

    I am currently using 1.1, and just noticed the new version today. Is the changelog correct that there are no real changes? Or does this new version address this?

    Could the plugin be disabled on the finale events if nothing else?

    Last edited by Necrothug; 07-20-2009 at 22:36.
    Necrothug is offline
    olj
    Veteran Member
    Join Date: Jun 2009
    Old 07-21-2009 , 04:18   Re: [L4D] Simple Mob Controller
    Reply With Quote #8

    Thanx, first you dont need plugin to change mentioned mob cvars. It just control those based on number of survivors.
    2. Ye, i just rewrote the code so its more clean and effective. I still learning how to code. There arent really any functional changes. As for the horde during finale, check z_mob_spawn_finale_size
    Maybe it is set to too big value. Anyway check all your mob values in finale. You can use map specific configs so in the finale maps initial values of mob cvars and l4d_mobcontrol_zombiestoadd will be different. Anyway i can add variables to turn it off and on, and for finale.
    olj is offline
    Necrothug
    Member
    Join Date: Aug 2008
    Old 07-21-2009 , 08:23   Re: [L4D] Simple Mob Controller
    Reply With Quote #9

    Well, I've never made any changes to any mob related cvars before. Everything is set to the default sizes.
    Necrothug is offline
    olj
    Veteran Member
    Join Date: Jun 2009
    Old 07-21-2009 , 08:47   Re: [L4D] Simple Mob Controller
    Reply With Quote #10

    Just CHECK mob cvar values during finale and post it here if you want. Just for reference, i have 60 megamob default size for 10 vs 10 versus and 55 mob_max_size. With my plugin, extra zombies will be added per survivor.

    If im not mistaken, tank wont spawn untill all the horde will be killed (well, not killed exactly, it called "relax time"). The problem is if you have more than 1 boomer allowed, or even if there is only one (but he is doing his work great), at least few survivors will get vomited every time boomer spawns. That way survivors can have hard times waiting for tank appearance, considering they can be perma-vomited. But im not sure about this. Frankly speaking, i know shit about tank spawning game mechanics during finale.
    Attached Files
    File Type: sp Get Plugin or Get Source (maxplayersaddon.sp - 4759 views - 807 Bytes)
    File Type: sp Get Plugin or Get Source (blindluck.sp - 2826 views - 3.9 KB)

    Last edited by olj; 08-29-2009 at 10:30. Reason: Need to attach something. Not this plugin related.
    olj 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 03:11.


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