Item spawning and gametypes
Item spawning and gametypes
I have a really dumb question, but I cant remember if you can do this.
I know I can set items to notffa, but then they don't spawn in FFA and Tourney. Can I set items to spawn in FFA or Tourney games? If so what are the keys I need to set?
I am getting old and befuddled.
I know I can set items to notffa, but then they don't spawn in FFA and Tourney. Can I set items to spawn in FFA or Tourney games? If so what are the keys I need to set?
I am getting old and befuddled.
Re: Item spawning and gametypes
No, you are not
... I recently had the same problem... it seems you simply cannot differentiate item spawning between tourney and FFA. At least that is what I "learned" when I asked the last time.
Very strange...

Very strange...
Re: Item spawning and gametypes
Hmm, so I would have to add two bsp and aas files to my pk3...that's a bit annoying, ho hum. Thanks AEon
Re: Item spawning and gametypes
I still hope I am wrong... e.g. in SolarAE I'd want the Quad to only show in FFA. But from the in-editor documentation of GTKradiant 1.2.13, there did *not* seem to be a "notourney" or so parameter.
Two bsp files indeed are *very* annoying to manage as a mapper and also for distribution. Tabun has been very brave in this respect
.
Two bsp files indeed are *very* annoying to manage as a mapper and also for distribution. Tabun has been very brave in this respect

Re: Item spawning and gametypes
OK, noted thanks. Slightly off my own topic...I need some advice on item loading for a tourney map. For FFA my small to medium sized level has Quad, Holdable Teleport, RA, RL, LG, PG, SSG, RG and GL. There is ammo for all weapons except the RG. I have 6 Armour Shards, 3x25 health bubbles and 7 small health bubbles. I think I've spread items around sensibly. For Tourney game type, what would you suggest? Drop the Quad for sure, but what should I put in it's place? Maybe a 50 health bubble? What about weapon balance and numbers of health? Is it considered OK to leave in the holdable teleport?
Re: Item spawning and gametypes
..I dunno if you care about Cpma, but you can make different weapon layouts using .map files. Let's say the .map file in your map .pk3 is named "dk_m2.map", all you have to do is:
\callvote map !dk_m2
The "!" makes it read the .map file instead of the .bsp file. You can make them using the ICE or Diablo mod's also..just using the item set-ups without all of the other stuff that is in a .bsp". Quicker than making a bunch of bsp's, and easier for testing..
..unless you don't like Cpma? =/
\callvote map !dk_m2
The "!" makes it read the .map file instead of the .bsp file. You can make them using the ICE or Diablo mod's also..just using the item set-ups without all of the other stuff that is in a .bsp". Quicker than making a bunch of bsp's, and easier for testing..
..unless you don't like Cpma? =/
Re: Item spawning and gametypes
I think I found a solution for non-tourney items... found in Sock's POM map:
Just noted, or you can simply set the item explicitly for tourney mode via:
- Key: gametype
Value: ffa team
Just noted, or you can simply set the item explicitly for tourney mode via:
- Key: gametype
Value: tournament
Re: Item spawning and gametypes
I tried that earlier and couldn't get it to work. My Quad still spawned in FFA. Will try later again, knowing me I typed something wrong!!! Getting late here, so I wont try tonight. Thanks. 

Re: Item spawning and gametypes
If this is for your NoGhost map you are able to replace certain items with a script. If you were to set g_gametype to execute: 'set_replace_item_quad item_health_mega' it would replace quad with mega.
[url=http://www.xfire.com/profile/vlnoheaven/][img]http://i105.photobucket.com/albums/m231/Lowerboy444/xfire.png[/img][/url]
[url=http://teameventhorizon.com/]Team Event -O- Horizon[/url]
[url=http://mapping.maverickservers.com/]NoGhost Map Making Competition 2 (June 2010)[/url]
[url=http://teameventhorizon.com/]Team Event -O- Horizon[/url]
[url=http://mapping.maverickservers.com/]NoGhost Map Making Competition 2 (June 2010)[/url]
Re: Item spawning and gametypes
Sorry I thought most people knew about this key/value. It only really works with the latest patch release 1.32. Just specify the gametype's you want and violia it works. Just add more to the key field if you want items to appear in different game types.
key: gametype
value: ffa team tournament
The Q3 source code is also awesome for finding this stuff. Here is the spawn routine, a list of gametype's you can specify and the 'gametype' key being read and processed later on in the routine.
key: gametype
value: ffa team tournament
The Q3 source code is also awesome for finding this stuff. Here is the spawn routine, a list of gametype's you can specify and the 'gametype' key being read and processed later on in the routine.
Code: Select all
void G_SpawnGEntityFromSpawnVars( void ) {
int i;
gentity_t *ent;
char *s, *value, *gametypeName;
static char *gametypeNames[] = {"ffa", "tournament", "single", "team", "ctf", "oneflag", "obelisk", "harvester", "teamtournament"};
...
if( G_SpawnString( "gametype", NULL, &value ) ) {
if( g_gametype.integer >= GT_FFA && g_gametype.integer < GT_MAX_GAME_TYPE ) {
gametypeName = gametypeNames[g_gametype.integer];
s = strstr( value, gametypeName );
if( !s ) {
G_FreeEntity( ent );
return;
}
}
}
Well he was evil, but he did build alot of roads. - Gogglor
My [url=http://www.simonoc.com/]Website[/url] & [url=http://twitter.com/SimsOCallaghan]Twitter[/url]
My [url=http://www.simonoc.com/]Website[/url] & [url=http://twitter.com/SimsOCallaghan]Twitter[/url]
-
- Posts: 494
- Joined: Tue Mar 31, 2009 11:14 am
Re: Item spawning and gametypes
Oh man, I wish I would've known about this for Q. Oh well, at least I can have my own local version the way I want it. 

Re: Item spawning and gametypes
Just to be clear, this works for all weapons, armour, health and powerups? I suppose this won't work for stuff like func_ entities.
[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: Item spawning and gametypes
It's applicable for all entities that remain after compilation (open up the BSP in an editor and you'll find the entities lump somewhere in it, it's just one long string of text). Stuff like doors, moving platforms, etc. should all work. I suppose some creative use of func_statics could even get you different map layouts for different game types.
Re: Item spawning and gametypes
In the other thread Sock suggested updating the scripts\entities.def in the case of misc_model, I updated that .def file some more (possibly I am just using a too old version from GTKradiant v1.2.13), but here goes anyway...
I replaced all lines containing:with
This updates the items like weapons, ammo, etc. Though it probably misses those func_ entries (i.e. doors etc.).
I replaced all lines containing:
Code: Select all
notbot : used to make an item invisible for bot attraction.
Code: Select all
notbot : used to make an item invisible for bot attraction.
gametype : defines the gametype(s) that will spawn this item, valid values: "ffa", "tournament", "single", "team", "ctf", "oneflag", "obelisk", "harvester", and "teamtournament"; e.g. ffa team.
Re: Item spawning and gametypes
@Aeon, you should create a new thread (sticky hopefully) for all the entity.def additions. I can think of a couple more that are missing from the original def file. The latest stuff is suppose to be in the GTK SVN tree but I don't know many mappers who check that stuff. (Mostly coders tbh) It certainly would be good to have a central location for mappers to grab the latest and discuss the changes.
Well he was evil, but he did build alot of roads. - Gogglor
My [url=http://www.simonoc.com/]Website[/url] & [url=http://twitter.com/SimsOCallaghan]Twitter[/url]
My [url=http://www.simonoc.com/]Website[/url] & [url=http://twitter.com/SimsOCallaghan]Twitter[/url]
Re: Item spawning and gametypes
Confirmed, I tried that on my second map or so to seal of the flag room so people wouldn't stumple upon that damn flag if they are battling in ffa team or tourney, really seems out of place in these modes.^misantropia^ wrote:[...] Stuff like doors, moving platforms, etc. should all work. I suppose some creative use of func_statics could even get you different map layouts for different game types.
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.