Hiding brushes in certain gametypes
Hiding brushes in certain gametypes
I read that notfree and notteam can be used for item entities to hide them from certain gametype, but can this be used on func_groups (or other brush-entities) as well? It doesn't appear to work. And I want more specific control. I want a brush to appear only when the gametype is set to CTF. Is this possible without mods?
Re: Hiding brushes in certain gametypes
I *think* you can do that with func_static iirc
-
- Posts: 384
- Joined: Fri Mar 05, 2010 5:29 pm
Re: Hiding brushes in certain gametypes
Code: Select all
gametype: used to set item to spawn in only selected gametype(s).
ffa: Free for All
tourney: Duel
single: Single Player
team: Team Deathmatch
ca: Clan Arena (QL)
ctf: Capture the Flag
oneflag: One Flag CTF (TA/QL)
overload: Overload (TA/QL)
harvester: Harvester (TA/QL)
ft: Freeze Tag (QL)
In QL you can also use:
Code: Select all
not_gametype: used to set item to spawn in any gametype NOT specified.
0: Free for All
1: Duel
2: Single Player
3: Team Deathmatch
4: Clan Arena
5: Capture the Flag
6: One Flag CTF
7: Overload
8: Harvester
9: Freeze Tag
Re: Hiding brushes in certain gametypes
It's detailing that I want to hide in non-CTF games, but it is rather obtrusive. So will the bots act according to whether the geometry is there or not or will they keep avoiding invisible geometry in non-CTF games?themuffinman wrote:Bots are pretty useless with func_statics so be aware that if the given brush entities create a significant structural change that it will affect bot performance.
-
- Posts: 384
- Joined: Fri Mar 05, 2010 5:29 pm
Re: Hiding brushes in certain gametypes
I think bots consider all brushes etc. (I'm no technical whiz) and if you have those func_static brushes then the bots will consider them there no matter if the brushes have spawned in the given gametype or not. That's what I think happens. You'll have to test it out.
Re: Hiding brushes in certain gametypes
According to documentation, bots will consider them to be solid for all game types. You can of course, compile a copy of your map and include an extra .arena file and wrap everything up in a single .pk3.
[size=85][url=http://gtkradiant.com]GtkRadiant[/url] | [url=http://q3map2.robotrenegade.com]Q3Map2[/url] | [url=http://q3map2.robotrenegade.com/docs/shader_manual/]Shader Manual[/url][/size]
Re: Hiding brushes in certain gametypes
Yeah I tested it after muffinman's post.

The blue brush is a func_static with "gametype" : "ctf".
I loaded the map in FFA, added a bot and it took the route as depicted by the green arrow towards the RL, even though the brush was invisible. Removing the brush made it go there directly.
I think that makes the "gametype" key/value pair not an option for me. I'll continue tinkering with this.
The other option is indeed to include a 2nd bsp but I'm hoping to avoid that

The blue brush is a func_static with "gametype" : "ctf".
I loaded the map in FFA, added a bot and it took the route as depicted by the green arrow towards the RL, even though the brush was invisible. Removing the brush made it go there directly.
I think that makes the "gametype" key/value pair not an option for me. I'll continue tinkering with this.
The other option is indeed to include a 2nd bsp but I'm hoping to avoid that

-
- Posts: 449
- Joined: Sat Nov 06, 2010 2:33 am
Re: Hiding brushes in certain gametypes
This is an interesting idea, but I can't think of what advantage it holds over using multiple bsp files and extra .arena files, how come you're trying to do it this way, Eraser? It's an interesting idea though.
Re: Hiding brushes in certain gametypes
Erm, something which, right now, I'd rather keep to myself 
It's not some revolutionary new gameplay mechanic. In fact, it's not gameplay related at all. You'll see when ermap4 is released
Oh, and don't bother spitting through the beta release of the map. There's nothing in there which I'm planning on putting in.
Right now I'm also still busy reconstructing the bridge area (with the YA) and those jump platforms.

It's not some revolutionary new gameplay mechanic. In fact, it's not gameplay related at all. You'll see when ermap4 is released

Oh, and don't bother spitting through the beta release of the map. There's nothing in there which I'm planning on putting in.
Right now I'm also still busy reconstructing the bridge area (with the YA) and those jump platforms.
-
- Posts: 449
- Joined: Sat Nov 06, 2010 2:33 am
Re: Hiding brushes in certain gametypes
I......well......ok then.
Is it at all related to that map of yours I went all A-Team on?

Is it at all related to that map of yours I went all A-Team on?
Re: Hiding brushes in certain gametypes
Nope, the ermap4 one I posted a beta of a few days ago.
-
- Posts: 4022
- Joined: Sat Mar 12, 2005 6:24 pm
Re: Hiding brushes in certain gametypes
Eraser, up for a quick experiment? I added a hacklet to bspc that makes it ignore a func_static if spawnflags == 1.
Link: https://github.com/bnoordhuis/bspc/tree/func_static
How to build:
Link: https://github.com/bnoordhuis/bspc/tree/func_static
How to build:
Code: Select all
git clone https://github.com/bnoordhuis/bspc.git
git checkout -b func_static origin/func_static
make
Re: Hiding brushes in certain gametypes
How would that work if the func_static is visible (and therefore is in the way of the bots)? Bots would "ignore it" and walk right into it, no?
[size=85][url=http://gtkradiant.com]GtkRadiant[/url] | [url=http://q3map2.robotrenegade.com]Q3Map2[/url] | [url=http://q3map2.robotrenegade.com/docs/shader_manual/]Shader Manual[/url][/size]
-
- Posts: 4022
- Joined: Sat Mar 12, 2005 6:24 pm
Re: Hiding brushes in certain gametypes
That's the experimental part. I think the bot code should be smart enough to adopt but it might turn out just like you said.
Re: Hiding brushes in certain gametypes
Ok... erm, this is not entirely working out as I was hoping.
I checked out the files from github, but opening the sln file in visual studio 2008 and building it gave me 52 errors about files not being found (all of them botlib/ or qcommon/ files). As they were not part of the project, I manually added them (I found them in the deps folder on disk) but now it complains that OS_STRING is not defined (or at least, I get a bunch of "Operating system not supported" errors)
I checked out the files from github, but opening the sln file in visual studio 2008 and building it gave me 52 errors about files not being found (all of them botlib/ or qcommon/ files). As they were not part of the project, I manually added them (I found them in the deps folder on disk) but now it complains that OS_STRING is not defined (or at least, I get a bunch of "Operating system not supported" errors)
-
- Posts: 4022
- Joined: Sat Mar 12, 2005 6:24 pm
Re: Hiding brushes in certain gametypes
Forgot there even was a sln file. Send your updated version as a patch or fork and commit it on GH and I'll pull it in.
deps/qcommon/q_platform.h constructs an OS_STRING based on platform/architecture sniffing but apparently it fails on your system. I've added a fallback (`git pull origin func_static`, then rebuild) but if you could somehow fix it, that'd be even better.
deps/qcommon/q_platform.h constructs an OS_STRING based on platform/architecture sniffing but apparently it fails on your system. I've added a fallback (`git pull origin func_static`, then rebuild) but if you could somehow fix it, that'd be even better.
Re: Hiding brushes in certain gametypes
Been fiddling around a bit. I really haven't made any committable changes. It just keeps whining that it can't find qcommon/q_shared.h (and other files), no matter where I put it or how I include it in the project. Not sure what I'm doing wrong.
I don't have a GCC compiler installed by the way, so makefiles aren't any use either right now.
I don't have a GCC compiler installed by the way, so makefiles aren't any use either right now.
-
- Posts: 4022
- Joined: Sat Mar 12, 2005 6:24 pm
Re: Hiding brushes in certain gametypes
I take it msvc lets you specify include paths? . and deps/ are the ones.
Re: Hiding brushes in certain gametypes
One further addition to that: it works, and it affects bot play. I've had that in a map a few years ago (2008/2009?) to have doors sealing off the flag rooms in every other gametype than ctf. They wouldn't simply open if shot at or having a player or bot approaching, they only worked normally in ctf mode. Unfortunately the bots didn't "realize" that there was a flag room after all anymore, including ctf, so I redid the map layout to work around that problem. If there's actually someone being able to properly solve this issue, it would be great.Eraser wrote:I read that notfree and notteam can be used for item entities to hide them from certain gametype, but can this be used on func_groups (or other brush-entities) as well? It doesn't appear to work. And I want more specific control. I want a brush to appear only when the gametype is set to CTF. Is this possible without mods?
If you are caught on a golf course during a storm and are afraid of lightning, hold up a 1-iron. Not even God can hit a 1-iron.
-Lee Trevino, golfer who actually has been struck by lightning.
-Lee Trevino, golfer who actually has been struck by lightning.
Re: Hiding brushes in certain gametypes
And what about to create trigger_multile in each info_playerSTART only active in some gametype, which will lock the doors in specific gametype? It can work with bots?
Re: Hiding brushes in certain gametypes
Sound interesting... anyone has the time to test that method anytime soon? 

If you are caught on a golf course during a storm and are afraid of lightning, hold up a 1-iron. Not even God can hit a 1-iron.
-Lee Trevino, golfer who actually has been struck by lightning.
-Lee Trevino, golfer who actually has been struck by lightning.
Re: Hiding brushes in certain gametypes
You do.
[size=85][url=http://gtkradiant.com]GtkRadiant[/url] | [url=http://q3map2.robotrenegade.com]Q3Map2[/url] | [url=http://q3map2.robotrenegade.com/docs/shader_manual/]Shader Manual[/url][/size]
Re: Hiding brushes in certain gametypes
Great, so we awaits tomorrow some 10-slide presentation with meaningful conclusion and several examples monaster :P (you must obey obsidian) 

Re: Hiding brushes in certain gametypes
I don't. That's why I asked if there's someone else to do that test, because I doesn't help anyone if I say "that's a good idea, lemme test it, I'll report back in 3 months".obsidian wrote:You do.
If you are caught on a golf course during a storm and are afraid of lightning, hold up a 1-iron. Not even God can hit a 1-iron.
-Lee Trevino, golfer who actually has been struck by lightning.
-Lee Trevino, golfer who actually has been struck by lightning.
-
- Posts: 4022
- Joined: Sat Mar 12, 2005 6:24 pm
Re: Hiding brushes in certain gametypes
No dice, bspc only considers a trigger_multiple when it points to a target_teleporter.
Hard problem, probably can't be fixed without patching the source. It's a binary situation as far as bspc is concerned, either the brush is there (in all game types) or it isn't.
Hard problem, probably can't be fixed without patching the source. It's a binary situation as far as bspc is concerned, either the brush is there (in all game types) or it isn't.