Raised This Month: $ Target: $400
 0% 

[L4D2] Infected Loot Drops (2.3d)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Thraka
AlliedModders Donor
Join Date: Aug 2005
Plugin ID:
1493
Plugin Version:
2.3d
Plugin Category:
General Purpose
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
    13 
    Plugin Description:
    When something dies, dice can be automatically rolled to determine if items should drop, infected should spawn, or other things should happen!
    Old 02-25-2010 , 04:19   [L4D2] Infected Loot Drops (2.3d)
    Reply With Quote #1

    Only supports L4D2
    Requires Sourcemod 1.3+

    Required:
    SourceMod Extension Config 1.0.2: http://forums.alliedmods.net/showthread.php?t=69167 Download the config.ext.zip file from the end of the first post. Inside the zip file, go into the addons\sourcemod\extensions folder and extract the config.ext.dll or config.ext.so file and upload it to your servers Addons/SourceMod/Extensions folder.

    Optional:
    AtomicStrykers Uncommon Infected Horde: http://forums.alliedmods.net/showthread.php?t=109623 - This enables the uncommon mobs in your config files. Without it, they will not spawn.

    Note:
    If you want to use a L4D1 version of this plugin, use version 1.3 in this thread: http://forums.alliedmods.net/showthread.php?t=107681

    Additionally, your config cvar defaults to the file:
    cfg\sourcemod\ l4d2_infected_loot_drops_loot_settings.conf
    so MAKE THIS FILE!

    This plugin hooks the death event of a player or infected. This includes common zombies and the witch! When that infected dies, the type of thing it was (tank, common, smoker etc) is checked against the config file. The config file has two categories of actions, one for dice to roll and react, and another for things that happen 100% of the time.

    The dice can be configured to be any number of dice of any number of sides. The whole roll is added up and it's compared against set of "things" defined for that class. If the dice roll is in the range set by a thing, that thing is executed.

    Things can be infected spawns, items spawns, weapon spawns, upgrade spawns, or melee spawns. The example config file has all the information you need on configuring the plugin. You will need to take time to config and balance this out. Giving too many items make it too frustrating for the infected, while too little items make it frustrating on the survivors.

    All game modes are supported.

    Todo
    • Add german game weapons, if the Weapon Unlock plugin adds commands to run, I can hook into that.
    • Optionally notify players when something drops.
    Version History
    2.3d
    • Fixed critical bug which prevented human infected from triggering the loot for the class they played as. Thanks Eraa!!
    2.3c
    • Checked for uncommon plugin at OnMapStart.
    • InfectedFactory was storing "thing count" wrong for normal z_spawn commands.
    • InfectedFactory was spawning thing with the _ still in the name for normal z_spawn commands.
    • InfectedFactory was storing "thing counts" for the individual spawns caused by "infected-team".
    • Added new "boss-team" type to InfectedFactory.
    2.3b
    • Config file handle is erased properly. This helps reloading configs if you use the loot_reloadconfig command.
    • Announce system had a bug which didn't load the convar into the global variable.
    • Announce system looked for announce = 0 to announce. This is fixed and changed to look for 1.
    2.3a
    • "Things no roll" wouldn't process more than one if multiple matched. Introduced in 2.3. Fixed!
    • Made announce method slightly more efficient by checking if announce was shutoff when we get into the method.
    2.3
    • Changed the way the plugin fails for non l4d2 servers
    • Added announcement system.
    • Added new l4d2_loot_announce_mode cvar.
    • Cleared handle to config file when closing the file.
    • Updated the example config with announcement example (global section)
    2.2
    • Added two categories (like the global category) for infected types.
      normal_infected - Any of the normal infected classes: smoker, hunter, charger, boomer, spitter, jockey
      boss_infected - Any of the boss classes: tank, witch
    • Updated the example config
    2.1
    • Factory limit system is active! You can define global limits for any thing. For example, no matter how you spawn defibs through this plugin, you can specify only 2 maximum can ever spawn.
    • Added some commands to help check your settings regarding current spawn counts for things, and max amounts.
    • Updated the example config. Everything in the example is now WORKING.
    • Infected factory (that uses z_spawn commands) can NOT contain spaces. It must have a _ separating: charger_auto
    2.0a
    • Reload the config on the OnMapStart forward.
    • Updated the response to loot_sim to provide examples.
    2.0
    • Initial L4D2 Support. Dropped L4D1.
    • Things different from 1.3
    • Support witch and common infected
    • Support global (anytime anything dies) definition
    • Support all standard weapons and items, melee items, and upgrade items.
    • Configure any number of dice of any amount of sides.
    1.3
    Commands
    All commands require ADMFLAG_KICK permissions
    loot_reloadconfig - Reloads the current conf file specified by the l4d2_loot_config_filename cvar.
    loot_sim - Simulates an infected killed, so you can see what would happen.
    loot_get_thingcount - Gets how many times a specific thing has spawned.
    loot_add_thingcount - Adds 1 to a specific thing count of how many times it's spawned.
    loot_get_thingmax - Gets the max spawn setting of a thing.
    loot_thing_ismaxed - Informs you of if a thing has already reached the max spawn limit.


    CVARS
    l4d2_loot_config_filename - The name of the config file located in the cfg/sourcemod folder.
    l4d2_loot_enabled - Is the infected loot plugin enabled or not.
    l4d2_loot_logging - Enable logging.
    l4d2_loot_announce_mode - Announces text to client teams when something spawns (if defined) 0 = Off; 1 = Hint text; 2 = Team chat.

    Example
    Starting off, I have a global config that rolls a 500 sided die. If 1-10 lands, a defibrillator will spawn. I set the plugin max for the defib to two. Regardless of if the global section spawns it, or any other thing, only TWO can ever show up for the level. If it spawns, it displays a message only to the survivor team:

    Code:
    max_spawns:
    {
    	item:
    	{
    		weapon_defibrillator_spawn = 1;
    	};
    };
    
    global:
    {
    	repeat = 1;
    	dice = [1500];
    	
    	tell_survivors = "You hear something that can save lives drop to the ground.";
    
    	things = (
    	{	name	=	"weapon_defibrillator_spawn";
    		type	=	"item";
    		min	=	1;
    		max	=	10;
    	}
    	);
    };
    Attached Files
    File Type: txt l4d2_infected_loot_drops_loot_settings-example1.conf.txt (9.0 KB, 5486 views)
    File Type: sp Get Plugin or Get Source (l4d2_infected_loot_drops.sp - 3901 views - 30.6 KB)
    File Type: smx l4d2_infected_loot_drops.smx (15.5 KB, 5912 views)

    Last edited by Thraka; 01-17-2012 at 20:34. Reason: Updated the example config
    Thraka is offline
    Thraka
    AlliedModders Donor
    Join Date: Aug 2005
    Old 02-26-2010 , 20:54   Re: [L4D2] Infected Loot Drops (2.0)
    Reply With Quote #2

    Updated just slightly. Enjoy.
    Thraka is offline
    Thraka
    AlliedModders Donor
    Join Date: Aug 2005
    Old 02-26-2010 , 23:09   Re: [L4D2] Infected Loot Drops (2.1)
    Reply With Quote #3

    Sorry for the chained updates. I just added the global factory limits system. Now you can configure the plugin to only spawn X amount of anything. Once the limit has been reached, the factory will refuse to spawn the thing.
    Thraka is offline
    Bongholio
    Senior Member
    Join Date: Sep 2009
    Old 02-27-2010 , 16:20   Re: [L4D2] Infected Loot Drops (2.1)
    Reply With Quote #4

    Best loot ever!
    Damn if I understand the gigantic .cfg it made tho
    Bongholio is offline
    Thraka
    AlliedModders Donor
    Join Date: Aug 2005
    Old 02-27-2010 , 16:52   Re: [L4D2] Infected Loot Drops (2.1)
    Reply With Quote #5

    Could you post it? I would love to check it out
    Thraka is offline
    RavenDan29
    Veteran Member
    Join Date: Sep 2009
    Old 02-28-2010 , 10:16   Re: [L4D2] Infected Loot Drops (2.1)
    Reply With Quote #6

    Didnt understand the example, can i just use that rather than make my own?
    RavenDan29 is offline
    RavenDan29
    Veteran Member
    Join Date: Sep 2009
    Old 02-28-2010 , 10:32   Re: [L4D2] Infected Loot Drops (2.1)
    Reply With Quote #7

    example doesnt work, what do i do know? what am i missing?
    RavenDan29 is offline
    Thraka
    AlliedModders Donor
    Join Date: Aug 2005
    Old 02-28-2010 , 13:29   Re: [L4D2] Infected Loot Drops (2.1)
    Reply With Quote #8

    What do you mean by it doesn't work? I put it on my server and it loads correctly. You need to rename the file and put it in a specific location.

    You could use it as it is, but it's just a bunch of settings that have nothing to do with each other, which is why you should make your own.

    Do you have an idea about what you want? I can make one for you.
    Thraka is offline
    RavenDan29
    Veteran Member
    Join Date: Sep 2009
    Old 02-28-2010 , 13:36   Re: [L4D2] Infected Loot Drops (2.1)
    Reply With Quote #9

    Yeah sure 3Pills and a molitov on infected death, 85% certainty. defib and bile bomb 5% certainty. Autoshotgun and first aid kit 10% certainty. Think that should be enough.
    RavenDan29 is offline
    Thraka
    AlliedModders Donor
    Join Date: Aug 2005
    Old 02-28-2010 , 16:48   Re: [L4D2] Infected Loot Drops (2.2)
    Reply With Quote #10

    Ok here you go. Update to version 2.2 for this to work. I added a new special type that groups all the normal enemy classes together

    Code:
    // Executed anytime any of the normal classes die: smoker, hunter, charger, boomer, spitter, jockey
    normal_infected:
    {
    	repeat = 1;
    	dice = [100];
    	
    	things = (
    	{	name	=	"weapon_pain_pills_spawn";
    		type	=	"item";
    		min		=	1;
    		max		=	85;
    	},
    	{	name	=	"weapon_pain_pills_spawn";
    		type	=	"item";
    		min		=	1;
    		max		=	85;
    	},
    	{	name	=	"weapon_pain_pills_spawn";
    		type	=	"item";
    		min		=	1;
    		max		=	85;
    	},
    	{	name	=	"weapon_molotov_spawn";
    		type	=	"item";
    		min		=	1;
    		max		=	85;
    	},
    	{	name	=	"weapon_defibrillator_spawn";
    		type	=	"item";
    		min		=	86;
    		max		=	90;
    	},
    	{	name	=	"weapon_vomitjar_spawn";
    		type	=	"item";
    		min		=	86;
    		max		=	90;
    	},
    	{	name	=	"weapon_first_aid_kit_spawn";
    		type	=	"item";
    		min		=	91;
    		max		=	100;
    	},
    	{	name	=	"weapon_autoshotgun";
    		type	=	"weapon";
    		min		=	91;
    		max		=	100;
    	}
    	);
    };
    Thraka 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 02:51.


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