Quake3World.com
https://www.quake3world.com/forum/

Item spawning and gametypes
https://www.quake3world.com/forum/viewtopic.php?f=10&t=42086
Page 1 of 1

Author:  dONKEY [ 11-24-2009 11:06 PM ]
Post subject:  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.

Author:  AEon [ 11-25-2009 12:21 AM ]
Post subject:  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...

Author:  dONKEY [ 11-25-2009 01:28 AM ]
Post subject:  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

Author:  AEon [ 11-25-2009 01:36 AM ]
Post subject:  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 :).

Author:  dONKEY [ 11-25-2009 02:22 AM ]
Post subject:  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?

Author:  v1l3 [ 11-25-2009 02:46 AM ]
Post subject:  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? =/

Author:  AEon [ 11-25-2009 05:37 AM ]
Post subject:  Re: Item spawning and gametypes

I think I found a solution for non-tourney items... found in Sock's POM map:

    Key: gametype
    Value: ffa team

This was used on a item_regen. So by explicitly setting the gametypes you *want* the item to show, you exclude everything else. Ha!

Just noted, or you can simply set the item explicitly for tourney mode via:

    Key: gametype
    Value: tournament

Author:  dONKEY [ 11-25-2009 06:00 AM ]
Post subject:  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. :)

Author:  Anthem [ 11-25-2009 06:08 AM ]
Post subject:  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.

Author:  sock [ 11-25-2009 06:42 AM ]
Post subject:  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.

Code:
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;
         }
      }
   }

Author:  Pat Howard [ 11-25-2009 08:09 AM ]
Post subject:  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. :rolleyes:

Author:  obsidian [ 11-25-2009 05:45 PM ]
Post subject:  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.

Author:  ^misantropia^ [ 11-25-2009 11:29 PM ]
Post subject:  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.

Author:  AEon [ 11-26-2009 02:57 AM ]
Post subject:  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:
Code:
notbot : used to make an item invisible for bot attraction.
with
Code:
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.

This updates the items like weapons, ammo, etc. Though it probably misses those func_ entries (i.e. doors etc.).

Author:  sock [ 11-26-2009 03:47 AM ]
Post subject:  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.

Author:  monaster [ 12-20-2009 05:54 AM ]
Post subject:  Re: Item spawning and gametypes

^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.


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.

Page 1 of 1 All times are UTC - 8 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/