Is there an easy way to add entities to a map?
Started by Sly Fox
avatar
Sly Fox Rep. 43
#1   22 Jun 2014
There are maps that have 2 team flags, but lack the neutral flag for 1 flag CTF play. Let's say I find a good spot for one using viewpos. Is it possible to execute a file that will add the neutral flag to that spot? For example, adding an entity such as
{
"gametype" "oneflag"
"classname" "team_CTF_neutralflag"
"origin" "768 -636 48"
}
avatar
Tig Rep. 1672
#2   22 Jun 2014
The short answer is "yes and no" :]

The long answer is you need to create a ".ent" file and use a mod. CPMA and Orange Smoothie both have support for these files. I'm sure other mods do to.

There was once a mod that allowed you to spawn an entity at where the crosshair was pointing but I have no idea what is was called.

There is another thread here: lvlworld.com/thread/171/6 which has more info on this topic.

avatar
Sly Fox Rep. 43
#3   22 Jun 2014
Thanks for the info and the link. So CPMA or Orange Smoothie can read an .ent file to add ents to a map without modifying the .bsp file. The other way would be to modify the bsp file using q3map2 -onlyents , I'll give that a try. It would be nice if you could just directly add ents to the bsp file using notepad as the ent portion is in plain text. But since that messes up the data offsets you'd need to use a program that adjusts the offsets as well.

The less messy way would be to use the mods, but then say I want to use another mod? It would be nice if one could run multiple mods at the same time like you can with GTA Cleo mods. It would also be nice if the Quake3 engine could read .ent files without having to resort to using a mod.

avatar
Tig Rep. 1672
#4   22 Jun 2014
It is possible to run two mods at once from the command line:

+set fs_basegame mod1 +set fs_game mod2

This allows you to use the options / features from mod1 and anything in mod2 will "override" the same features from mod1.

So, you could create a basic mod that simply loads ".ent" files and nothing else and then you can load the main mod over the top (or the other way around).

The re-compile option with q3map2 -onlyents is a very good option. I would recommend giving the modified file a new name to prevent confusion :]

avatar
Sly Fox Rep. 43
#5   23 Jun 2014
I didn't know you could run two mods at the same time, that's cool! Can you run 3 or more, or is 2 the limit?

I don't know q3map2.exe very well. I'm using the version one that comes with gtkRadiant. I'm trying to get the white neutral flag into q3ctf1.bsp, so I can play 1flag ctf there just like I can in mpq3ctf1.

First I copy/rename q3ctf1.bsp to _q3ctf1.bsp. I open up _q3ctf1.bsp with a text editor, select/copy the entity text, paste it into _q3ctf1.txt, then add the neutral flag entity in at the end, then change .txt to .ent. I copy both _q3ctf1.bsp and _q3ctf1.ent to the same folder as q3map2.exe. In cmd.exe I tried q3map2 -onlyents _q3ctf1.ent. I get warnings but no errors and I can tell it wrote to _q3ctf1.bsp by noticing the timestamp. However when I open up _q3ctf1.bsp with a text editor the neutral flag entity isn't there. Do I need more command line parameters, such as -game missionpack?

avatar
themuffinator Rep. 1044
#6   23 Jun 2014
I've been slowly putting together a custom engine for a little while now - it has a host of features which includes entity overrides:
www.dropbox.com/s/...a_v0.1.0.02.zip

Just set the following:
sv_entList_load 1
sv_entList_dump 2

It will then output the entity string to an .ent file in your maps folder at map loading time. If you're in-game you can tab over to a text editor to modify it, go back to the game and simply do a map_restart to apply the changes, or of course reload the map.

Edit: you'll need SDL.dll to run it since it runs on ioq3, which means SDL dependencies... for now anyway.

Edited 2.15 minutes after the original posting.

avatar
Sly Fox Rep. 43
#7   24 Jun 2014
This custom engine, is it a modification of the ioq3 engine? Ioq3 uses SDL? That is awesome if you can change ents on the fly like that.

Using CPMA or Orange Smoothie mods: do you simply place the .ent file with the same name as the bsp into /maps/ and it will automatically over-ride, or is there a setting to make them look for it?

It seems that if you edit the entities you need to also edit reach-ability data from what I've read here icculus.org/gtkrad...pndx/appn_c.htm
"... you ONLY change the entities inside this BSP file then you only have to recalculate the reachabilities"
I wonder if this applies to pickup items such as guns/ammo/flags. It shouldn't, as bots can figure out how to reach dropped items.

avatar
leilei Rep. 413
#8   27 Jun 2014
Couple issues

  1. r_alternateBrightness shouldn't require r_enablePostprocess. Blending a plane shouldn't be considered in the same category as fragment shaders
  2. Using shaders from Quake Live is a bad idea regarding license conflicts.
  3. Dynamic lights on vertex lit stuff need clamping.
  4. No source code?
Edited 1.2 minutes after the original posting.
avatar
themuffinator Rep. 1044
#9   01 Jul 2014
  1. Will have to look into that...
  2. Since the shaders are internal, I'm not exactly distributing them per se. But yes, if id has a problem with it I'll simply rewrite them.
  3. I can't see anything wrong there, but Q3 dlights are terrible anyway. Definitely needs fixing.
  4. Of course there is... www.dropbox.com/s/...c_v0.1.0.02.zip

Only registered members can post a reply.
Already registered? Sign in.

q3aerowalk301
Clear