[TUTORIAL] the TF_GAMERULES entity

A Boojum Snark

Toraipoddodezain Mazahabado
aa
Nov 2, 2007
4,775
7,670
The ent_fire command lets you send inputs to any named entity, or entity class that exists in the map. It has the command auto-complete function Steam has so nicely provided, where after you've typed in the name/class of an entity, all valid inputs are listed to scroll through.
 

MacBeth [O.C.Reg]

L1: Registered
Jan 13, 2008
8
2
Very useful info - one thing though:

Does the TF_GAMERULES entity relate to the victory/defeat message at the end of a round? I have created a customised control point based map (a central point that is unlocked - or relocked - per team, on a timer modified by how many of the surrounding points each team holds... the details of which are a topic for another tutorial perhaps...)

The problem I have is that when one team successfully captures the central point and thus wins the round, the message displayed in the 'Victory' HUD says e.g. 'RED successfully defended until time ran out' instead of '...captured all the control points'. This happens even if one team does capture *all* the points - which is not actually necessary for victory as only the central point needs to be captured, and can be unlocked with only one of the surrounding points.

I have set both teams to Attack (with custom messages as described above)

Is there a way to customise the victory message in a similar way?
 

YM

LVL100 YM
aa
Dec 5, 2007
7,135
6,056
I don't seem to be able to get this to work at all.
tfgamerulesft4.jpg

Thats what I've got in my logic_auto, what am I doing wrong?
 

MacBeth [O.C.Reg]

L1: Registered
Jan 13, 2008
8
2
You might need to refresh your TF2 content before it will work - I was having the problem where taunt anims, spy cloaking and sniping were malfunctioning when I tested maps, and the answer to that was to delete my Team Fortress 2 folder within the steamapps directory (having backed up my custom content - maps, textures, config etc.) and then run the game which does a fresh install from the .gcf.

This fixed the glitches, and appeared to have the side effect of bringing up the GoalString messages too. Give it a go, can't hurt (as long as you back up your custom content!)
 

YM

LVL100 YM
aa
Dec 5, 2007
7,135
6,056
ok, so where is the achievements and player stats stored? don't want to loose those.
 

Intraman

L4: Comfortable Member
Nov 4, 2007
191
0
you won't. I've had to do it a number of times and things like stats and such are not effected.
 

Axl

L1: Registered
Dec 14, 2007
19
1
Quick question

Does anyone know if there's a server command for SetStalemateOnTimelimit or am I gonna have to ent ed every cp and ctf map I want to end with timelimit?

I know of mp_stalmate_enabled but that only applies to round times.

Anyone know?
 

Nineaxis

Quack Doctor
aa
May 19, 2008
1,767
2,820
ok, so where is the achievements and player stats stored? don't want to loose those.
Every time you die your stats are sent to Valve's master servers which record it and make your 640927 healing points needed for an ubersaw permanent.
 

Penguin

Clinically Diagnosed with Small Mapper's Syndrome
aa
May 21, 2009
2,039
1,484
tfgr.png


This used to work. As of my last compile, it does not.

Any particular reason, or does the game jst hat eme?
 

[O]

L3: Member
Mar 21, 2009
121
27
five questions:

1- so tf_gamerles requires a logic_auto to provide it input for onmapspawn?

2- is logic_auto also automatically created and hidden in the map like tf_gamerules?

3- can a map run without a logic_auto? i dont believe i ever placed one

4- how can i check if i have already placed these two entities before? i dont want to double up on them and cause conflicts.

5- is there any other entity that controls spawn time?
 

Ravidge

Grand Vizier
aa
May 14, 2008
1,544
2,818
Answer to all your questions: tf_gamerules has been added as an actual entity now.
This thread is from 2007. It's thread number 149, meaning it's old as old can be. The information here is not relevant anymore.

For better info
https://developer.valvesoftware.com/wiki/Tf_gamerules
 

English Mobster

L6: Sharp Member
Jul 10, 2011
355
299
1. It doesn't require it to come from a logic_auto, to my knowledge, but that's typically the best place for it.
2. No, it is not. You have to place it.
3. Yes, but things will be screwy. What a logic_auto does is load up everything you want your map to do before it spawns any players whatsoever. For example, changing respawn times (by default it's set to 10 for both teams), saying who is on offense versus who is on defense, getting something to begin moving the moment the map starts, etc.
4. In Hammer, up top (by File, Edit, etc.), there's a dropdown called "Map." Click on it and hit "Entity Report." This will tell you the names of every entity on your map, listed in alphabetical order by type (so all of your trigger_hurts would be grouped together with trigger_multiples below and trigger_gravities above). Use this to find your logic_auto and/or tf_gamerules, then you can either double-click on it or click and go View -> Center 3D Views on Selection.
5. Not to my knowledge.