OffWorld Transport
written by Phlem<WOS>
Information regarding the LOX Off World Transport system.
What Is It?
What is the offworld Transport system? In short, it is a way to
embellish your existing or new Quake2 maps so that players can jump into
a teleporter and pop out on a whole different server.
You can add the special entities for this into a new map. But
the most practical way to do this is to simply add the entities to an
entity file for the map you want to use. In this way you can
update your existing maps, even stock Q2 maps like q2dm1.
This feature is available starting with version 1.12.10 of LOX.
How Do I Use This Feature?
To make use of the feature, you will need to create entities for your
map files. See Deacon's excellent concise guide here:
ent.htm
To add a specific offworld teleport pad to your map, you will need a
few details:
- The X, Y, Z coordinates of the location you wish to place the
pad
- The descriptive name of the server you want to jump to
(e.g. "Loxophilia - Q2 LOX - Main WOS Clan server")
- The address of the server, including port number. Note
that this can be numeric or a qualified domain name
(e.g. 2.3.4.6:27910 or phlem.ath.cx:27910)
Once you have this information, you can build an entity to be added
to your entity file for the map you are updating.
For the above example, I would end up creating an entity that looks
like this:
{
"message" "Offworld transport to\nLOXophilia\n(72.5.249.99:27910)"
"wait" "3"
"sounds" "2"
"target" "q2@72.5.249.99:27910"
"origin" "20 -2583 -471"
"classname" "misc_offworld_teleporter"
}
In the above example, the user would see three lines of text when
they approach within about 6 "virtual" feet of the offworld teleporter
pad:
Offworld transport to
Loxophilia
(72.5.249.99:27910)
The "\n" characters in the message variable are interpreted as
NEWLINE characters.
It's that simple! Just add this above segment to your entfile
and you are ready to go!
Detailed Example
STEP 1 - Create Basic ENT file
Let's try this using our trusty and reliable q2dm1 map as an example.
First, we need to create the ENT file for q2dm1. Per Deacon's
instructions in the ent.htm page, we can
use the ENTDUMP.EXE program on Windows (or the equivalent 'entdump'
program on Linux), to create our file. This example assumes the
ENDUMP.EXE program is installed on your system in some directory that is
in your search path, such as
C:\WINDOWS\SYSTEM32.
From the Windows command line, we might follow a sequence like this
(note that the typed commands are in bold type):
C:\> cd \quake2
C:\QUAKE2> mkdir entfiles
C:\QUAKE2> cd entfiles
C:\QUAKE2> entdump c:\quake2\baseq2\maps\q2dm1.bsp > q2dm1.ent
You should now have a q2dm1.ent entity file that is several lines
long. My copy was 955 lines long. The file should look
something like this at the top:
{
"sounds" "7"
"classname" "worldspawn"
"message" "The Edge"
"nextmap" "q2dm2"
}
{
"origin" "984 192 784"
"angles" "25 72 0"
"classname" "info_player_intermission"
}
{
"noise" "world/drip_amb.wav"
"spawnflags" "1"
"classname" "target_speaker"
"origin" "244 -236 332"
}
{
"noise" "world/drip_amb.wav"
"spawnflags" "1"
"classname" "target_speaker"
"origin" "244 36 332"
}
{
"noise" "world/drip_amb.wav"
"spawnflags" "1"
"classname" "target_speaker"
"origin" "940 628 420"
}
HELPFUL HINT Number 1 - If you are trying to create entity files
for maps that are stored inside of a PAK file, you may need to
extract the map binary files, the BSP files, from the PAK in
order to get ENTDUMP to work on them. You can use a
program like PAKRAT to do this. PAKRAT can be found on
Deacon's Tomb and other locations as well.
STEP 2 - Collecting our Ent Data
In the simple example, we showed this entry for a teleport entity:
{
"message" "Offworld transport to\nLOXophilia\n(72.5.249.99:27910)"
"wait" "3"
"sounds" "2"
"target" "q2@72.5.249.99:27910"
"origin" "20 -2583 -471"
"classname" "misc_offworld_teleporter"
}
What we need to do to make this entry work for our q2dm1 is to simply
get the coordinates correct and then tack this little section of text
onto the bottom of our newly created q2dm1.ent file.
To do this, per the instructions in Deacon's ent.htm page, we can use
viewpos. Get your favorite server to run the map you are working
on, then connect your regular Q2 game program to the server and move
your character to the location where you want to place your offworld
teleport pad. Remember, too, that you can place as many pads as
you want, so collect data from lots of locations if you want to.
At this point, type "viewpos" (for View Position) in the console.
It will return a string similar to this:
(1268 654 494): 13
The first three digits are the ones we care about. The first
digit is the X coordinate, the second is the Y, and the 3rd is the Z.
For my example, I went into the middle of the round open area in q2dm1
to get my coordinates. To use these coordinates for teleporting,
we need to make just one change. We need to subtract 28 from the Z
coordinate. This means that our new coordinates for our teleport
pad are as follows: 1268 654 466
Why subtract 28? Simply to put the pad on the ground. If
you use the same coordinates as directly reported by VIEWPOS, the pad
will be floating in the air.
HELPFUL HINT Number 2 - Remember your basic algebra ...
subtracting a number from a negative number makes the result
MORE NEGATIVE. In other words, if your Z value from VIEWPOS is
-500, the newly adjusted Z value will be
-528, NOT -472.
STEP 3 - Making our new ENT Data Entry
To make this work, simply replace the values in our teleport entry
example, putting the new values in the "origin" data line. That
will make our entry for q2dm1 look like this:
{
"message" "Offworld transport to\nLOXophilia\n(72.5.249.99:27910)"
"wait" "3"
"sounds" "2"
"target" "q2@72.5.249.99:27910"
"origin" "1268 654 466"
"classname" "misc_offworld_teleporter"
}
Now all you need to do is add this text to the bottom of the ent file
created by ENTDUMP in step one. This, of course, will work on your
local machine. To make this work on a server, you will need to get
the new q2dm1.ent file placed in the appropriate "entfiles" directory on
your server.
HELPFUL HINT Number 3 - If you create your entity files on a
Windows machine, but need to have them work on a Linux Q2
server, they will need to be converted to UNIX/Linux file format
before they can be readily used by that server. If you use
FTP to transfer the files to the server, and use ASCII transfer
mode, the files will convert automatically. If not, you
can use various programs such as "dos2unix" to convert them.
There are various conversion tools available on your Linux
system for this as well.
Advanced Usage
What special things can you do to make best use of this feature?
The first thing, of course, is to simply use it. In other words,
try to create entity files containing at least one offworld teleport
entity for each of the maps in your map rotation.
Another thing that you can do to highlight the fact that you are
offworld-enabling your server and its map rotation is to update the
description of your map to include the phrase "offworld enbabled", so
users will see this at connect time. To do this, simply update the
string in the first entity of your map file. For example, here is
the first entity in the q2dm1.ent file:
{
"sounds" "7"
"classname" "worldspawn"
"message" "The Edge"
"nextmap" "q2dm2"
}
To let folks know you have adjusted your config to allow for offworld
teleport, simply change it to this:
{
"sounds" "7"
"classname" "worldspawn"
"message" "The Edge (offworld-enabled by AdminDude)"
"nextmap" "q2dm2"
}
Another way to make your entity updates "shine" is to combine the
addition of offworld teleporters with the addition of other entities,
especially weapons, health, etc.
One other thing that you can do to foster better "networking" between
game server admins is to provide offworld teleporter links to servers of
other Q2 mods, other clans, or other service providers. Drop an
email or a message board notice to the admins of these other servers
that your game servers are "offworld teleported linked" to theirs and
that you and your friends will be "popping in from time to time".
Chances are they will welcome the extra visitors and perhaps even be
interested in returning a visit to your hood.
Credit Where Due
Special thanks to QwazyWabbit for the current implementation of the
offworld teleport feature. Phlem (author of this guide) wrote a
prototype version of it, but QwazyWabbit took it up to a usable level,
adding the notice that appears in the user screen and making the pads
rotate so they could readily be distinguished from regular teleport
pads. In other words, QW made this feature usable.
|