Map Weapon Ban list?

  • Site Migration: See bugs? Report them here. Want something changed or have an idea? Suggest it here.

G.bo

L4: Comfortable Member
Sep 24, 2017
173
For a long time, I assumed there was nothing I could alter Medieval Mode's weapon ban list in order to add weapons like Jarate and the Gas Passer. However, in a previous April Fools map, somebody made a map dedicated to soldier zatochi battles and it banned use of weapons that were not the zatochi or conch. My question is this: Is there a way to build a blacklist into a map, or was that simply just a custom config that features a blacklist?
 

Da Spud Lord

Occasionally I make maps
aa
Mar 23, 2017
1,341
Every weapon in TF2 is just an entity. As such, you can strip players of certain weapons by sending the proper entity classes the kill input, even dynamically spawned entities that aren't placed by a mapper. To create your weapon blacklist, just create a logic_relay, and fill it with outputs to kill whatever weapon classes you want. Your outputs should look like this:
My Output|Target Entity|Target Input|Parameter|Delay|Only Once
OnTrigger|<Weapon class>|Kill|<none>|0|No
Just copy and paste this output for each weapon class you wish to get rid of. Note that similar weapons, such as most flamethrowers, all share an entity class. So you don't need to create a new output for each independent flamethrower, but you can't, for example, strip players of just the Phlogistinator but no other flamethrower, as the Phlogistinator shares a weapon class with most of the other flamethrowers.

Now name your logic_relay something that you can remember. Unfortunately, we can't just fire this relay at the start of a round and let that be it, as players regain all their weapons upon respawning. So you'll need to trigger this relay every time players respawn. I would recommend placing a trigger_multiple over the entire playable space, and using this input:
My Output|Target Entity|Target Input|Parameter|Delay|Only Once
OnStartTouch*|<Weapon-stripping logic_relay>|Trigger|<none>|0|No
*Do not use OnStartTouchAll! This will cause the output to only fire after all players leave the trigger, as in, when all players die.

Note, however, that this will not override the Medieval Mode blacklist, rather it will just add another blacklist on top of it. Aside from not enabling Medieval Mode, I don't know how to overcome the Medieval Mode blacklist.
 
Last edited:

G.bo

L4: Comfortable Member
Sep 24, 2017
173
Just copy and paste this output for each weapon class you wish to get rid of. Note that similar weapons, such as most flamethrowers, all share an entity class. So you don't need to create a new output for each independent flamethrower, but you can't, for example, strip players of just the Phlogistinator but no other flamethrower, as the Phlogistinator shares a weapon class with most of the other flamethrowers.

I looked at the weapon classes, and so far it looks like I'd be able to pretty much rework the medieval mode to include a few more weapons and still keep previous ones. Since both the Jarate and Gas Passer (the two main items I thought should be included) both have separate weapon classes than other weapons in their categories, they theoretically should be able to be included! While setting up this logic may take some time, I'm glad to know this is possible. Thanks for your help!

(EDIT: Though I mainly just wanted to add the Jarate and Gas Passer, I'm thinking about including Short Circuit, just so that Engineer actually has purpose in this mode outside of teleporting with the Eureka Effect. We'll see...we'll see...)
 
Last edited: