Left 4 Dead 2

Left 4 Dead 2

Not enough ratings
Weapon Manipulator
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
924.311 KB
20 Sep, 2024 @ 2:00pm
27 Jul @ 10:00am
20 Change Notes ( view )

Subscribe to download
Weapon Manipulator

Description
This add-on will allow players to convert weapons to other items, remove weapons from the map, and modify spawnflags for each weapon.

To make the add-on work, the game will look in the `./ems/weaponmanipulator/` directory to see if any weapon needs to be converted, removed, or modified. If changes are found, they will be applied at the start of each round. This enables players to convert weapons to different items or even prevent certain items from spawning altogether.

Additional Information
Settings can be modified in-game by typing the following in chat:
!weaponmanipulator_[name_of_text_file] [name_of_option] [desired_value] [optional_directory]

If you want to know the names for each weapon, see this thread.

If you want to know the spawn flags for each weapon, see this thread.

Thumbnail was created by me and Seamas.
19 Comments
Thumos  [author] 24 Jul @ 9:13pm 
@Guy I enabled only this add-on and deleted the `weaponmanipulator` folder from the `./ems/` directory to see if the "weaponstoremovebyclassname.txt" and "weaponstoremovebymodel.txt" files would be created when I load a campaign for the first time, but it seems those files don't get created automatically from my testing. This is most likely because I forgot to add a statement that checks if those two files don't exist yet before saving them to the "./ems/weaponmanipulator/" directory.

In the meantime, you'll have to manually create the "weaponstoremovebyclassname.txt" and "weaponstoremovebymodel.txt" files if you want to remove selected items based on their classnames and/or model names.
guy 24 Jul @ 8:56pm 
In your previous comments, you mentioned the "weaponstoremovebyclassname.txt" and "weaponstoremovebymodel.txt" files, which would be necessary for the EnableItemRemoveRNG option to have any effect - unfortunately, these files just do not exist for me; they're just not present at all in 'ems/weaponmanipulator'. What's going on?
Thumos  [author] 24 Jul @ 8:47pm 
The "weaponspawnflagstoadd.txt" file can add spawn flags to each item if the specified spawn flags aren't already set, and the "weaponspawnflagstoremove.txt" file can remove spawn flags from each item if the specified spawn flags are already set.

You can view the available spawn flags for each item in this thread .
guy 23 Jul @ 12:06pm 
What do "weaponspawnflagstoadd" and "weaponspawnflagstoremove" do, respectively?
Thumos  [author] 2 Jul @ 8:00am 
@⋁ɪʀᴜѕ™ Unfortunately, this add-on will only work in single player and on local/third-party servers.
⋁ɪʀᴜѕ™ 2 Jul @ 7:55am 
Dont work on dedicated server?
Thumos  [author] 16 Dec, 2024 @ 11:39am 
@Absolute Sucker I've recently updated this add-on to prevent explosive and incendiary ammo from being converted to laser sights when they're deployed on the ground. Let me know if this causes any other issues.

As for the fire axes and katanas, I'll see if I can replicate the issue on Hard Rain before I figure out how to prevent them from floating in midair.
Absolute Sucker 16 Dec, 2024 @ 7:25am 
@Menos

I found a rather bothersome issue, incendiary ammo packs and explosive ammo packs deploy laser sights instead of their respective special ammo, this only occurs when this add-on is enabled.

In addition to knives, fire axes and katanas can spawn frozen mid-air, encountered the latter two on Hard Rain.

Is their any fixes for both of these?
Absolute Sucker 16 Dec, 2024 @ 1:51am 
@Menos

It worked, huge thanks!
Thumos  [author] 15 Dec, 2024 @ 8:40pm 
@Absolute Sucker The `EnableItemRemoveRNG` option simply allows each item to have the probability of being removed. In your case, setting the specified item or weapon to a value of 50 will give it a 50% chance of being removed.

Assuming you've only modified the options listed in the `weaponremoveprobability.txt` file, you'll also need to determine what exact weapons and items will be remove for the `EnableItemRemoveRNG` option to have any effect. To do this, you'll have to either add the weapon's classname to the `weaponstoremovebyclassname.txt` file or add the weapon's model name to the `weaponstoremovebymodel.txt` file in the `./ems/weaponmanipulator/` directory.

If you'd like to know the classnames and model names for each weapon, I made a thread that contains the provided information.