target_location


(Rain) #1

Dearest mappers,

The newest etpro beta release (3.1.8​) supports location names—both user-definable and via target_location entities. The target_location entities behave almost exactly the same way as they did in RtCW, although players can optionally disable the PVS check for the location search.

Since I’m sure I’m not the only one who dearly misses location names from RtCW, I’d like to ask mappers to start adding target_location entities to their maps. etpro will automatically load them, and they’ll have no effect at all in etmain (aside from a warning in the server console saying they’ve been deprecated.) Although players/clans can create their own location names, it’s much easier for the creative mind behind a map to add them, since he or she is generally very intimite with the layout and purpose of all the areas in a map he/she is making.

I’ve made a copy of the stock et_entities.def with target_location added, or you can add it manually:

/*QUAKED target_location (0 0.5 0) (-8 -8 -8) (8 8 8)
-------- KEYS --------
"message" name of this location
-------- SPAWNFLAGS --------
(none)
-------- NOTES --------
Set "message" to the name of this location.

The closest target_location to the player will be used for the location,
with an optional PVS check.
*/

When you’re doing test compiles, or making an external location file for an older map, you may find the location debugging tools etpro provides useful improvement over rtcw: scroll down to the bottom of the beta changes and look at b_debuglocations for details.

Thank you, good luck, and I hope to see new maps with location names soon! :banana:


(Ifurita) #2

you have a def file entry for them?


(Rain) #3

Doh! I had it all ready but forgot to add it to the post.

Edited, thanks! :drink:


(Ifurita) #4

I have 3 maps in the pipeline. Will see what I can do


(]UBC[ McNite) #5

I never mapped for RtCW… what are target location entities, and especially what are they good for? Can you plz name a resource that gives the pure ET-mapper some kind of tutorial or suchlike?


(CooperHawkes) #6

Thanx a lot, Rain! I have been waiting soooo long for this nice feature :slight_smile:
…looking forward to see a nice custom location pack for the stock et maps coming out somewhere :sunglasses:

http://www.planetquake.com/qworkshop3/tutorials/target_location/index.html
and for the folks speaking german:
http://www.mapping-tutorials.de/index.php?section=wolfenstein24


(Get_It) #7

Target_locations are the entities that identify your position in a ctf game.

It’s only used for that ?


(CooperHawkes) #8

sorry, it’s a quake3 tutorial… therefore the reference to “ctf”… actually the tutorial is wrong… target_locations also work for team deathmatch, etc.


(Ifurita) #9

Adding location references to Vengenace as I type. It would be really cool to have an interface similar to the speaker editor for location naming


(nUllSkillZ) #10

I know that it’s possible to spawn new entities with an additional script in etpro.
Would it also be possible to spawn this entity per script?
For example I have the stock maps in mind.

Edit:

Not tested but I’ve had a look at the following page:
http://bani.anime.net/banimod/forums/viewtopic.php?t=3328


create
{
	classname "target_location"

	// scriptname ""
	// targetname ""
	// mins ""
	// maxs ""

	// use "/viewpos" to get the origin
	origin "0 0 0"

	message "TARGET LOCATION"

	// count 0-7 for colors
	// 	# 0 : white (default)
	// 	# 1 : red
	// 	# 2 : green
	// 	# 3 : yellow
	// 	# 4 : blue
	// 	# 5 : cyan
	// 	# 6 : magenta
	// 	# 7 : white
	count "1"
}

The targetname-, scriptname-, mins- and maxs-keys shouldn’t be necessary.

[edit1]
I’ve had a look in the etpro-mapscripts.
There the create-scriptblocks are part of the game_manager-spawn-scriptblock.
And they are on top.


game_manager
{
     spawn
     {
          create
          {
               // ...
          }
          // ...
     }
     // ...
}
// ...

[/edit1]

[edit2]
I’ve tried to test the above.
And the locations are already in the stock maps.
I should read the posts better:

These external location files are located in the “etpro-3_1_8.pk3”-file in the “maps”-directory and named “MAPNAME_loc.dat”.
Format (example):


1837 -2654 820 "Assault Ramp"

So this seems to be origin + location.

[edit2]


(Rain) #11

What parts of the speaker editor do you particularly like?

I’m not promising anything, since that’s a fair deal of extra complexity, but I might be able to arrange something.


(Ifurita) #12

Well, I like being able to run the map, active the speaker editor, and drop speakers. It sounds very much like the visual representation you already have (debug_whatever) but with the ability to drop location names while in-game


(Rain) #13

FWIW, you can drop location names at your current position with loc_add and move the nearest location name to your current position with loc_move. It’s not as nice as the speaker editor, but it’s a start.
The downside to this is that the in-game stuff only saves to a very plain data file (i.e. not full entity definitions) when you do /loc_save; although, you could easily use that file (which is just ‘x y z “Location Name”’) to position target_location entities within a map.


(Ifurita) #14

ah. I guess I can just bind a key to those two commands


(Rain) #15

No popup window (a là speaker editor) asking for a location name, though (you need to pass it as a parameter.) I’ve already been asked for that…


(WeblionX) #16

Yes, yes you have.


(SCDS_reyalP) #17

It would be pretty easy to make a script or radiant plugin that took the output of loc_save and turned it into a prefab or loaded it into the map as entities.


(CooperHawkes) #18

here we go… :slight_smile:
just upload your location dat file and get back a map file which you easily can import into your existing map:

http://www.vis.uni-stuttgart.de/~rose/stuff/maps/loc2map.html

i was assuming that a location named “@” has the same name as the location the line above… is this assumption correct, Rain?

in the meantime i found out that my remark concerning the need for some nice location dat files for the stock maps was quite stupid… they are already included in etpro-3_1_8.pk3 (as nullskillz already pointed out ;-))…

i was testing my conversion script with etpro/maps/goldrush_loc.dat, imported the locations into goldrush.map and it seems to work fine :slight_smile:

HTH

CooperHawkes


(Rain) #19

Aye, exactly right.

If you begin an actual location name with @, it’ll have an extra @ in front of it, e.g. a location named “@ The Docks” would appear in the .dat file as something like

42 6 9 "@@ The Docks"

COM_ParseExt (the basic text-parsing function that most of the gamecode uses) doesn’t tell you whether something was enclosed in quotes or not, so “@” and @ look the same as far as the parser is concerned, hence the need for the extra @.


(CooperHawkes) #20

ok… thanks for making that clear… i changed the script… now it should handle the “@@” case correctly.