Truce Room

Jpn

L1: Registered
Nov 5, 2019
4
0
On my new map that is trade server esc, I am trying to make a room where there is a player truce (players can't attack each other) I would like to know how I'd go about doing this.
 

Alternating Current

L1: Registered
Oct 29, 2019
34
10
I'm no scientist or expert, but a good way to do this would be to use an Addcond to Uber any players in a trigger area. Maybe use the sort of MvM spawn protection for the "truce room".

Not a true truce, but close enough.
 

HueZee_

L1: Registered
Apr 28, 2018
28
15
i spent four months developing something like this out of spite for a joke. its an extremely buggy process to do map side and has many many holes. the ideal way is to obtain a server plugin.

godmode filters can help but can become unbalanced and abused. noattack cond is buggy and can sometimes allow a player to attack for no good reason. blocking taunt stuns becomes a new issue, uber farmers etc.
and then theres bullet block wich takes the fun out of your game item taunts.
any other work around is tedious time consuming and will impact game experience too harshly to justify the means.

but its possible. i was able to debug a method using specifically tailored features from all of the above, which works, but not without the assistance of a custom plugin to fill the gaps.

im afraid i cannot release the plugins or the map yet but one day soon it will be available to observe.
Edit: the process is long and convoluted also. impossible to walk someone through also doing the equivalent of days of debug.
 

Suna

What's a greybox?
aa
Nov 10, 2017
416
627
There's actually a very simple way of doing this, though it's using an advanced entity.
The entity is question is 'trigger_add_or_remove_tf_player_condition', i'm unsure if this is supported in the default fgd, but basically you'll want to change the attribute to '??? damage vs players', the duration to '-1', and the value to 0. This will make it so players will deal no damage to other players while inside the trigger volume.
excythz0uo.png


And here's the view with smartedit off, in the event it's not in the fgd.
cnfmd941ii.png


If players are still dealing damage while in the trigger volume, try changing the 'value' to 100 and see if that fixes it.
 

HueZee_

L1: Registered
Apr 28, 2018
28
15
There's actually a very simple way of doing this, though it's using an advanced entity.
The entity is question is 'trigger_add_or_remove_tf_player_condition', i'm unsure if this is supported in the default fgd, but basically you'll want to change the attribute to '??? damage vs players', the duration to '-1', and the value to 0. This will make it so players will deal no damage to other players while inside the trigger volume.

And here's the view with smartedit off, in the event it's not in the fgd.

If players are still dealing damage while in the trigger volume, try changing the 'value' to 100 and see if that fixes it.

Its not in the Default FGD, and there are no dev wiki resources that are immediately discoverable to input to FGD, would you mind sharing with us the script to input this to FGD?
default only seems to allow us to make 'trigger_add_tf_player_condition' or 'trigger_remove_tf_player_condition'

this would possibly be a lot handier than the old godmode filters. id like to do some bug testing with it to see what its limitations are.
 

BigfootBeto

Party Time 2.0!
aa
Jun 8, 2016
498
848
It's _attributes, not _condition. There's the wiki page with the FGD code specified at the bottom. The attributes are the same ones available from items_game.txt and for mvm robot popfile attributes. Just turn off smart edit, and use the name of the attribute from the txt file since the given descriptions don't make much sense.

The items_game.txt also specifies how the percentage value is handled.

https://developer.valvesoftware.com/wiki/Trigger_add_or_remove_tf_player_attributes
 

HueZee_

L1: Registered
Apr 28, 2018
28
15
Cool i have already got that entity custom added to my FGD.
from a long time ago to work with noattack, the problem that faces with is if you place the entity over a func_respawnroom and teh player changes class it bugs out and won't apply because the player has left and entered the entity too quickly.
is there a workaround im not aware of for that?
 

Atasco

L2: Junior Member
Aug 7, 2017
60
2
Do you think a "no player damage" trigger volume would be good in spawn rooms to lessen the impact of spawncamping? Because that kinda gives me ideas
 

HueZee_

L1: Registered
Apr 28, 2018
28
15
Do you think a "no player damage" trigger volume would be good in spawn rooms to lessen the impact of spawncamping? Because that kinda gives me ideas
sort of, if what you're thinking is a single spawn-room that's friendly you're yet to encounter many issues like uber & diamondback farming, taunt stunning and other forms of grief-ing. and you wouldn't be the first to attempt it.

but otherwise for general anti-spawncamp you're gonna need multiple player gates and ways to transition players into the fight, or ways to more clearly mark that players are in a no damage zone.

https://steamcommunity.com/sharedfiles/filedetails/?id=1405233666