AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [L4D] Infected Loot Drops (1.3) (https://forums.alliedmods.net/showthread.php?t=107681)

Thraka 10-29-2009 01:40

[L4D] Infected Loot Drops (1.3)
 
1 Attachment(s)
Item drop system for special infected player deaths. When a special infected player is killed, the drop system activates. A die (configurable) is rolled, and if it matches the values assigned for item(s) (configurable) those items are dropped. The players are notified with the text: "You hear something drop to the ground...". Additionally, instead of items, events can be triggered.

How is my plugin different than the one available in the request forum? Mine handles the choosing of an item very specifically. No percentage configurations. You get strong configuration options over the other one. And this one is supported while the other is not.

L4D2 Version: http://forums.alliedmods.net/showthread.php?t=119771

Version History
1.3
  • Support Co-op and Survivor
  • Moly wasn't being detected for a spawn
  • Settings didn't print out for pipe when using the command
1.2
  • Added all weapons as spawnable, and configurable
  • Added spawn of a tank, witch, common infected, and a horde as a dice roll result
1.15
  • Added some commands to help with determining if the plugin is operating the way you would like.
  • Adjusted when cvars are loaded hopefully pickup changes between map changes.
1.13
  • Fixed a log problem.
1.12
  • Initial Release.

Notes
You may want to reduce the spawns of other items to make this viable. The following cvars are used for that. These are my server's values, with the default for reference. These are the amount of items have per 100 yards square. I'm still tweaking these, as I am with the base config of this plugin. This makes them few and far between, if they even see them.

director_scavenge_item_override 1 ( def. "0" A map can specify item density, this removes that and lets the cvars take over.)
director_garage_weapon_density 0.02 ( def. "1.28" )
director_molotov_density 0.3 ( def. "6.48" )
director_pain_pill_density 0.2 ( def. "6.48" )
director_pipe_bomb_density 0.3 ( def. "6.48" )
director_pistol_density 0.2 ( def. "4" )
director_weapon_density 0.2 ( def. "4" )


The items that can be dropped are:
Health Kit
Pills
Molitov
Pipebomb
Weapon Tier 1 and 2, and a pistol.

Non weapons that can be triggered is
Spawn:
Witch
Tank
Common Infected all around the player
Horde Event

There are four dice which you can define the sides of. A single special infected class can only be assigned a single die side value. However, it can be assigned more than one die of that side (max 3). When more than one die is rolled, the values are added up, and the total is evaluated against that inftected's settings to see if an item is generated. If a die rolls 0, it is effectively thrown away. It rolled of the table, too bad for you!

More than one item (no maximum, I wouldn't go crazy though) can be assigned to be rolled for. The above process just repeats itself for each item.

When a class is configured, set the min\max of the item to 0 to remove it from the possability of being rolled. For example, you may not want a hunter to drop a health kit, so you would give it the value of 0:
l4d_loot_hunter_kit_min 0
l4d_loot_hunter_kit_max 0

You're basically setting a range on the die that when it comes up, if it is in that range, that item is spawned. If you overlap ranges, only the first item in the list (in the code) would be spawned. the second would not. If the total amount of all dice rolled is over the range values, nothing is given. If the total amount of all dice rolled is in a range value that is not defined, nothing is given.

Todo
  • Add configurable message which says the name of the specific item dropped.
  • Add ability to specify that only the killer should be notified of the item.
  • Support co-op and survivor.
  • Add specific weapon support. Specify which weapon is in what range of roll.
  • Drop tier 1 and pistol. (If someone knows the names of those weapons, the name identifier, I would love to know them, then I can add them)
  • Add listeners for each convar change.
  • Enable\Disable value 0 for die.

CMDs
sm_loot_load - Reloads the CVARS into the internal variables used during the plugin.

sm_loot_print_settings [infected class name] - Prints out the known configuration for the tank, hunter, boomer, or smoker. Type in the name of the class as the parameter. Additionally you can use "dice" as the parameter and it will print out the dice settings.

sm_loot_sim_infected [infected class name] - Logs to the console the dice roll of an infected killed. This is a simulator and doesn't actually happen. But it displays what would of happened. This lets you test out your drops to see how often things drop for the tank, hunter, boomer, or smoker. Type in the name of the class as the parameter.

CVARs
l4d_loot_ver - Version of this plugin.

l4d_loot_enabled : 1 : Is the plugin enabled.

l4d_loot_dice1_sides : 10 : How many sides die 1 has.
l4d_loot_dice2_sides : 20 : How many sides die 2 has.
l4d_loot_dice3_sides : 30 : How many sides die 3 has.
l4d_loot_dice4_sides : 100 : How many sides die 4 has.


This set of cvars is repeatable for each class, substitute the name appropriately, boomer, smoker, hunter, tank:

l4d_loot_hunter_dienumber : Which die (1, 2, 4, or 4) is used when rolling for the hunter
l4d_loot_hunter_diecount : How many dice can roll. Each die is added to a total. (If a die rolls 0 it is not thrown)
l4d_loot_hunter_kit_min : Min die number for a hunter to drop a kit.
l4d_loot_hunter_kit_max : Max die number for a hunter to drop a kit.
l4d_loot_hunter_pills_min : Min die number for a hunter to drop pills.
l4d_loot_hunter_pills_max : Max die number for a hunter to drop pills.
l4d_loot_hunter_molly_min : Min die number for a hunter to drop a molitov.
l4d_loot_hunter_molly_max : Max die number for a hunter to drop a molitov.
l4d_loot_hunter_pipe_min : Min die number for a hunter to drop a pipe bomb.
l4d_loot_hunter_pipe_max : Max die number for a hunter to drop a pipe bomb.
l4d_loot_hunter_item_count : How many items are rolled for when the hunter dies.
l4d_loot_hunter_panic_min : Min die number for a hunter to cause a zombie panic event.
l4d_loot_hunter_panic_max : Max die number for a hunter to cause a zombie panic event.
l4d_loot_hunter_tankspawn_min : Min die number for a hunter to cause a tank to spawn nearby.
l4d_loot_hunter_tankspawn_max : Max die number for a hunter to cause a tank to spawn nearby.
l4d_loot_hunter_witchspawn_min : Min die number for a hunter to cause a witch to spawn nearby.
l4d_loot_hunter_witchspawn_max : Max die number for a hunter to cause a witch to spawn nearby.
l4d_loot_hunter_common_min : Min die number for a hunter to cause common infected to spawn nearby.
l4d_loot_hunter_common_max : Max die number for a hunter to cause common infected to spawn nearby.
l4d_loot_hunter_pistol_min : Min die number for a hunter to drop a pistol.
l4d_loot_hunter_pistol_max : Max die number for a hunter to drop a pistol.
l4d_loot_hunter_smg_min : Min die number for a hunter to drop a small machine gun.
l4d_loot_hunter_smg_max : Max die number for a hunter to drop a small machine gun.
l4d_loot_hunter_shotgun_min : Min die number for a hunter to drop a shotgun.
l4d_loot_hunter_shotgun_max : Max die number for a hunter to drop a shotgun.
l4d_loot_hunter_rifle_min : Min die number for a hunter to drop an auto rifle.
l4d_loot_hunter_rifle_max : Max die number for a hunter to drop an auto rifle.
l4d_loot_hunter_autoshot_min : Min die number for a hunter to drop an auto shotgun.
l4d_loot_hunter_autoshot_max : Max die number for a hunter to drop an auto shotgun.
l4d_loot_hunter_sniper_min : Min die number for a hunter to drop a sniper rifle.
l4d_loot_hunter_sniper_max : Max die number for a hunter to drop a sniper rifle.





Special Thanks:
KrankFL - Started the whole idea!
Damizean - Creating the first plugin that did this.
The item drop thread contributors for ideas: http://forums.alliedmods.net/showthread.php?t=92346

Mitchy 10-29-2009 12:04

Re: [L4D] Infected Loot Drops (1.13)
 
Awesome 5 star but can someone tell me hwo you make your own plugins love ya plugin by the way

Grass 10-30-2009 11:59

Re: [L4D] Infected Loot Drops (1.13)
 
sounds cool i will give it a try and write back tomorrow.

Thraka 11-06-2009 20:52

Re: [L4D] Infected Loot Drops (1.15)
 
I added some console commands to help you figure out if it's working like you want it to.

Thraka 11-11-2009 01:49

Re: [L4D] Infected Loot Drops (1.2)
 
I've added version 1.2. This one adds configurable dice settings for every weapon, and also allows you to trigger a horde, or spawn a witch, tank, or common infected with a specific dice roll.

The default settings are also a bit more restrained. The older versions were very loose and too many items were spawning. Enjoy! Let me know if there are any problems!

hell911 11-13-2009 05:52

Re: [L4D] Infected Loot Drops (1.2)
 
hey thraka, what do i need to edit in ur script so that when any special infected dies, a random item will drop 100% in every special infected?

Thraka 11-13-2009 12:46

Re: [L4D] Infected Loot Drops (1.2)
 
You just need to edit the config. See if the an infected class is set to a dice of say 30 sides. you just need to edit the range of the items for that class so that it covers 1-30

like kit 1-5
pills 6-12
pipe 12-21
molly 22-30

something like that.

Now this only works in versus so far. I think some time today if I find the time, I'll add non versus to it.

hell911 11-14-2009 21:38

Re: [L4D] Infected Loot Drops (1.2)
 
so ur saying that this whole plugin only works with versus, no campaign/coop?

Thraka 11-14-2009 22:19

Re: [L4D] Infected Loot Drops (1.2)
 
correct

Thraka 11-15-2009 21:35

Re: [L4D] Infected Loot Drops (1.3)
 
Ok it works for campaign and coop now :)


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

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