Quake3World.com Forums
     Level Editing & Modeling
        Item spawning and gametypes


Post new topicReply to topic
Login | Profile | | FAQ | Search | IRC




Print view Previous topic | Next topic 
Topic Starter Topic: Item spawning and gametypes

The Afflicted
The Afflicted
Joined: 14 Oct 2001
Posts: 581
PostPosted: 11-24-2009 11:06 PM           Profile Send private message  E-mail  Edit post Reply with quote


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.




Top
                 

Boink!
Boink!
Joined: 19 Apr 2003
Posts: 4493
PostPosted: 11-25-2009 12:21 AM           Profile Send private message  E-mail  Edit post Reply with quote


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




Top
                 

The Afflicted
The Afflicted
Joined: 14 Oct 2001
Posts: 581
PostPosted: 11-25-2009 01:28 AM           Profile Send private message  E-mail  Edit post Reply with quote


Hmm, so I would have to add two bsp and aas files to my pk3...that's a bit annoying, ho hum. Thanks AEon




Top
                 

Boink!
Boink!
Joined: 19 Apr 2003
Posts: 4493
PostPosted: 11-25-2009 01:36 AM           Profile Send private message  E-mail  Edit post Reply with quote


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 :).




Top
                 

The Afflicted
The Afflicted
Joined: 14 Oct 2001
Posts: 581
PostPosted: 11-25-2009 02:22 AM           Profile Send private message  E-mail  Edit post Reply with quote


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?




Top
                 

\kill
\kill
Joined: 02 Apr 2003
Posts: 947
PostPosted: 11-25-2009 02:46 AM           Profile Send private message  E-mail  Edit post Reply with quote


..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? =/




Top
                 

Boink!
Boink!
Joined: 19 Apr 2003
Posts: 4493
PostPosted: 11-25-2009 05:37 AM           Profile Send private message  E-mail  Edit post Reply with quote


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




Top
                 

The Afflicted
The Afflicted
Joined: 14 Oct 2001
Posts: 581
PostPosted: 11-25-2009 06:00 AM           Profile Send private message  E-mail  Edit post Reply with quote


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. :)




Top
                 

Insane Quaker
Insane Quaker
Joined: 20 Oct 2009
Posts: 399
PostPosted: 11-25-2009 06:08 AM           Profile Send private message  E-mail  Edit post Reply with quote


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.



_________________
Image

Team Event -O- Horizon

NoGhost Map Making Competition 2 (June 2010)


Top
                 

The Illuminated
The Illuminated
Joined: 08 Sep 2000
Posts: 1085
PostPosted: 11-25-2009 06:42 AM           Profile Send private message  E-mail  Edit post Reply with quote


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



_________________
Well he was evil, but he did build alot of roads. - Gogglor
My Website & Twitter


Top
                 

Insane Quaker
Insane Quaker
Joined: 31 Mar 2009
Posts: 494
PostPosted: 11-25-2009 08:09 AM           Profile Send private message  E-mail  Edit post Reply with quote


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:




Top
                 

I'm the dude!
I'm the dude!
Joined: 04 Feb 2002
Posts: 12498
PostPosted: 11-25-2009 05:45 PM           Profile Send private message  E-mail  Edit post Reply with quote


Just to be clear, this works for all weapons, armour, health and powerups? I suppose this won't work for stuff like func_ entities.



_________________
GtkRadiant | Q3Map2 | Shader Manual


Top
                 

Mentor
Mentor
Joined: 12 Mar 2005
Posts: 3958
PostPosted: 11-25-2009 11:29 PM           Profile Send private message  E-mail  Edit post Reply with quote


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.




Top
                 

Boink!
Boink!
Joined: 19 Apr 2003
Posts: 4493
PostPosted: 11-26-2009 02:57 AM           Profile Send private message  E-mail  Edit post Reply with quote


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




Top
                 

The Illuminated
The Illuminated
Joined: 08 Sep 2000
Posts: 1085
PostPosted: 11-26-2009 03:47 AM           Profile Send private message  E-mail  Edit post Reply with quote


@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 Website & Twitter


Top
                 

The Afflicted
The Afflicted
Joined: 28 Apr 2008
Posts: 530
PostPosted: 12-20-2009 05:54 AM           Profile Send private message  E-mail  Edit post Reply with quote


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



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


Top
                 
Quake3World.com | Forum Index | Level Editing & Modeling


Post new topic Reply to topic


cron
Quake3World.com
© ZeniMax. Zenimax, QUAKE III ARENA, Id Software and associated trademarks are trademarks of the ZeniMax group of companies. All rights reserved.
This is an unofficial fan website without any affiliation with or endorsement by ZeniMax.
All views and opinions expressed are those of the author.