O. Index

NOTE! Be sure to read the beginning of Chapter I. It's the reason you looked into this document at the first place :)

Chapter I - Basic setup of a NLq server

1.1 Compiling NLq (step #1 for installing)
1.2 Setting up admin codes (step #2 for installing)
1.3 Locking a server into a gametype (DM, CTF, TURF, 4WAY, ARENA)
1.4 Setting up a mixed gametype server
1.5 Adding (more) custom levels

Chapter II - Advanced settings for a NLq server

2.1 Automated entry of admincodes
2.2 Allowing warmup (prewar firing)
2.3 Blast/weapon behaviour toggling (NQ, QW, cQW)
2.4 Reducing CPU load

Chapter III - Reference

3.1 What is TURF?
3.2 Developing TURF levels
3.3 What is 4WAY CTF?
3.4 Developing 4WAY CTF levels
3.5 Localinfo ctf_mode reference

Chapter IV - FAQ and Troubleshooting

4.1 Q: I've set up a general NLq server, but changing to a CTF level will fail ......
4.2 Q: It doesn't work ......

I. Basic setup of a NLq server

This document will aid you in setting up a NLq clanwar server quick and easy.
Allthough NLq is programmed to be self sufficient, you might want to tweak a couple of localinfo and serverinfo keys to suit your wishes.

Don't forget the default server setup stuff, like setting a SERVERINFO email adress for the server administrator, or the URL to download custom maps, etc.

In various places in this document you'll see lines prefixed with "example:". These lines will tell you what you should enter on the server console or even better, in the server.cfg file.

If you don't know what the above means, mail me at sneak@captured.com for help. This document is intended for server administrators with experience in setting up a QuakeWorld server.

1.1 - Compiling this stuff (necessary, step #1 for installing)

You've downloaded a ZIP file with a rather long name.

Make a new directory in your /quake game directory named "nlq".

Now unzip all the data from the ZIP file into that /nlq directory.

Now check the files that appear in the /src directory: one of them is another ZIP file, named ProQCC. This is the compiler with which you can compile NLquake. Compiling is necessary to run the mod on a server. Unzip the ProQCC file into the /src directory as well.

There should also be a /progs and a /sound subdirectory in /nlq. These are essential files for Team Arena (they are also in the Final Arena client pack, but most people don't have that pack), also there is one sound specific for TURF. Also the model files are required for 4WAYCTF or TURF.

You won't want to compile NLquake just yet, as you have to add administrator codes, or at least remove the one currently in it.

1.2 - Setting up administrator codes (necessary, step #2 for installing)

You could do this in three ways; the simplistic way, the normal way or the advanced way.

The simplistic way will allow only one admincode.
The normal way will allow multiple admincodes. These codes are visible to RCON_PASSWORD admins only, not players nor admins.
The advanced way will allow multiple admincodes as well, but they are hidden to everyone except the real server administrator, who should have the code of NLq.

  • The simplistic way;

    Run the COMPILE.BAT batch file in the /src directory.

    Now you'll set up the password using a LOCALINFO key -- open the SERVER.CFG file in the /nlq directory;

    NOTE! Admincodes must be 6 digits.

    example: localinfo temp_admincode 000123

    That is all you need to do for a quick startup.
  • The normal way;

    Open the SERVER.CFG file in the /nlq directory.

    Enter as much admincodes using the following framework;

    NOTE! Admincodes must be 6 digits.

    We'll add player "DOPE-Fishy" to our adminlist, and he has admincode 123456.
    example: localinfo 123456 DOPE-Fishy

    Note that DOPE-Fishy is used for reference only, a player does not have to have that exact name to become an admin.

    And that's all.
  • The advanced way;

    First of all, you need to customize the administration codes. These codes are located in the S_PASSWD.QC file.

    This file contains all the individual admin codes; the default one is 123456, and so it'll be wise to either change or remove it, or even add some more. You can have an unlimited amount of individual admin codes. The code accesses will be logged, so you can easily strip bad admins of their code without any fuss for the other admins.

    NOTE! Admincodes must be 6 digits.

    Open up the S_PASSWD.QC file (it should be in the /src directory), and read the comments carefully. Make the necessary changes or preferred additions.

    Next, run the COMPILE.BAT batchfile in the /src directory, and you'll see a list of files wash over your screen.

    Then, unless the compiler stated there was an error, check if there is a file named QWPROGS.DAT in the /nlq directory. If not, check the parent directories of /nlq. :)
1.3 - Locking a server in DM, CTF, TURF, 4WAYCTF or ARENA.

This would be the second most important thing to do, at least, if you want a CTF- or TURF-only server.

  • For a DM-only server, the method is easy. Don't install any ThreeWAVE pack, and forget about the .MDL and .WAV files supplied with NLq.

    Basically, you're allready done!
  • For a CTF-only server you need the ThreeWAVE 4.2x packs installed on your server, but you might want to leave the standard id software maps unchanged (NLq alters the id maps automatically).

    First you have to tell the server it'll only support CTF. This is done through a SERVERINFO variable, so players can see what the server is capable of.

    example: serverinfo modes "CTF"

    Next you'll have to force the server into CTF by setting a LOCALINFO variable. That variable is a bitfield. You'll have to set the value of it to 7. View the bitmask settings at the bottom of this document for an explanation.

    example: localinfo ctf_mode 7

    Now the last thing to do is check for the TEAMPLAY variable, and set it to 4. This is the most default CTF setting; teammates health and armor will not be reduced by friendly fire.

    And you're done!
  • For a TURF-only server you need in addition to the ThreeWAVE 4.2x packs also the accompanied FLAGPOST.MDL and SPECIAL.WAV installed on your server.
    The .MDL files have to be in the /PROGS subdirectory of the dir you placed the qwprogs.dat in.
    The .WAV files have to be in a /SOUND subdirectory of the dir you placed the qwprogs.dat in.

    Next you'll have to set a couple of things to tell the server it should upload those files to a client if the client doesn't have them;

    example: allow_download 1
    example: allow_download_models 1
    example: allow_download_sounds 1

    First you have to tell the server it'll only support TURF. This is done through a SERVERINFO variable, so players can see what the server is capable of.

    example: serverinfo modes "TURF"

    Next you'll have to force the server into TURF by setting a LOCALINFO variable. That variable is a bitfield. You'll have to set the value of it to 10. View the bitmask settings at the bottom of this document for an explanation.

    example: localinfo ctf_mode 10

    Now the last thing to do is check for the TEAMPLAY variable, and set it to 2. This is the the default for TURF; you can hurt your teammates.

    And you're done!
  • For a 4WAY CTF-only server you need in addition to the ThreeWAVE 4.2x packs also the accompanied 4-FLAG.MDL installed on your server.
    The .MDL files have to be in the /PROGS subdirectory of the dir you placed the qwprogs.dat in.

    Next you'll have to set a couple of things to tell the server it should upload those files to a client if the client doesn't have them;

    example: allow_download 1
    example: allow_download_models 1
    example: allow_download_sounds 1

    First you have to tell the server it'll only support 4WAY CTF. This is done through a SERVERINFO variable, so players can see what the server is capable of.

    example: serverinfo modes "4WAY"

    Next you'll have to force the server into 4WAY CTF by setting a LOCALINFO variable. That variable is a
    bitfield. You'll have to set the value of it to 70. View the bitmask settings at the bottom of this document for an explanation.

    example: localinfo ctf_mode 70

    Now the last thing to do is check for the TEAMPLAY variable, and set it to 4. This is the most default CTF setting; teammates health and armor will not be reduced by friendly fire.

    And you're done!
  • For an (Team-)ARENA-only server you need to install all the .wav files on your server.
    The .WAV files have to be in the /SOUNDS subdirectory of the dir you placed the qwprogs.dat in.

    Next you'll have to set a couple of things to tell the server it should upload those files to a client if the client doesn't have them;

    example: allow_download 1
    example: allow_download_sounds 1

    First you have to tell the server it'll only support ARENA. This is done through a SERVERINFO variable, so players can see what the server is capable of.

    example: serverinfo modes "ARENA"

    Next you'll have to force the server into ARENA by setting a LOCALINFO variable. That variable is a
    bitfield. You'll have to set the value of it to 128. View the bitmask settings at the bottom of this document for an explanation.

    example: localinfo ctf_mode 128

    Now the last thing to do is check for the TEAMPLAY variable, and set it to 4. This is the most default for 2-2's or 3-3's in ARENA setting; teammates health and armor will not be reduced by friendly fire.

    Also, for a true ARENA style combat, you should check for the DEATHMATCH variable, and set it to 5. This will grant every player at spawntime 200 red armor, 100 health, a full weapon complement and a nice array of ammo. Do note that none of the standard FFA dmm5 effects like pentagram after spawning, or grenade usage penalties are in order. It is just like arena!

    And you're done!
1.4 - Setting up a mixed (DM/CTF/TURF/4WAY/ARENA) server

This is done automatically by NLq. At the server bootup NLq checks to see if you have the FULL ThreeWAVE CTF map set (you need CTFx maps and the CTF2Mx maps).

IMPORTANT! The NLq UniWAR mod boots in Team DeathMatch mode. If you want to boot the UniWAR mod in a CTF map you WILL have to change the server.cfg and set the appropriate localinfo keys as if you were setting the server up locked in CTF.

If NLq can find ctf2m1 it concludes you have the maps on the server and it'll boot in standard DM mode.

To allow TURF and 4WAY CTF on your server next to standard DM and CTF, be sure to install the accompanied FLAGPOST.MDL, 4-FLAG.MDL and SPECIAL.WAV as specified in paragraf 1.3 of this doc.

To allow ARENA, you'll have to put the restof the .WAV files into their subdirectories as specified in paragraf 1.3 of this doc.

You will have to manually set a SERVERINFO variable in order to allow admins to change to TURF, 4WAY CTF or ARENA.

example: serverinfo modes "DM & CTF & TURF & 4WAY & ARENA"

Please note that caps are required, the abbreviations have to be in the specified order, and there has to be one space between each abbreviation and an ampersand.

The server will automatically reset back to the default map in DM mode whenever the server is in a custom
DM level, or in the CTF or TURF mode to allow other less fortunate players to use the server without fuss.
You can override this by setting a LOCALINFO variable;

example: localinfo idlereset 0

1.5 - Adding custom levels

Probably something you'll want to do. There are a couple of things that will be interesting;

  • There are 2 submenu's in the warp menu full with custom levels (ukcl, ukool, and assorted), by default, all you have to do is to install those levels on the server IF you want to.
  • If your server doesn't have these maps, warping to them will be futile, but not fatal.

NLq has room for 9 extra custom maps, and you can do this using several LOCALINFO variables.
Adding more then 9 customized maps, or stripping the menu of the builtin custom maps will require you to
edit the WARPMENU.QC file. How to edit it is up to you to figure out :)

To add a custom level the easy way you have to set (preferabbly two) LOCALINFO variables.

example: localinfo custom1 trbs4
example: localinfo custom1_full "SinMin Training Base "

The trailing spaces at the tail of the custom1_full key is for cosmetic purposes only.
In fact you could omit the entire custom1_full variable, but adding it will aid the recognition of a map in the warp menu.

II. Advanced settings for a NLq server

2.1 - Automated admincode entry for players

Admins could have multiple admincodes each for different servers. NLq has support for easy and quick access to the admin functionality.

Each admin should have an alias in their config.cfg which contains the impulses for the admincode, seperated by a couple of wait statements. Every NLq server knows what it's alias is named after and triggers it whenever a player enters the command "admin". The result is that the player 'automatically' enters the admincode within a second.

To allow autotriggering you have to set a LOCALINFO variable;

example: localinfo admin_alias roelserver_admin

Ofcourse, you could name it after anything, not just "roelserver_admin". Just try to make it unique.

Don't forget that entering a '0' in the admincode is actually IMPULSE 10.
The digits '1' to '9' are IMPULSE 1 to IMPULSE 9.

2.2 - Allowing warmup (prewar firing of weapons)

NLq normally has a cease-fire prewar mode. Noone can fire during prewar to speed up preparations. However, if you wish you could allow admins to toggle firing on for a brief while.

example: localinfo allow_warmup 1

2.3 - Blast/weapon styles (NetQuake, QuakeWorld and Corrected QuakeWorld)

A slightly undocumented function in NLq is the ability to toggle damaging styles between NetQuake, QuakeWorld and Corrected QuakeWorld.

There is a quite serious bug in the default QuakeWorld code that'll make rockets have a much more powerfull blast radius (velocity wise). If you wish to fix this it can be done through again a SERVERINFO variable to let players know the damage style has been tampered with.
Also, in NetQuake mode the nailgun weapons will fire projectiles at twice their original speed when combined with a haste rune. The NetQuake hook acts slightly differently then the QW one, most notably the accelleration of the NQ hook is slower (no more catapulting yourself upwards with a tap of the hook), whilst it's top speed is around 33% faster.

The default style is QuakeWorld. This will be in effect when style is either empty or set to "QW".

example (NetQuake damage): serverinfo style NQ
example (Corrected QuakeWorld damage): serverinfo style cQW

2.4 - Reducing CPU load

Yes, if you feel like NLq is taking up too much CPU you could flip a couple of LOCALINFO switches and hope it works. Allthough it probably isn't as effective as removing a couple of players or a lot of spectators, it does take it down a little bit (around 5% with 10 people online, only 2% with 5 people online, etc).

But of course there is a trade-in for that slight gain of CPU power; Some statistics (lag report and frametimes) will not be generated, and for another option the players will experience a not so responsive statusbar.

example (disabling lag/fps reports): localinfo calc_lagreport 0
example (disabling smooth playerid on statusbar): localinfo smooth_playerid 0

III. Reference

3.1 - What is TURF?

TURF is actually a DM/CTF combination.

Two clans battle on control of the level rather then over two flags or strategic positions within a level. TURF is played with DMM3, no powerups and TP2, with the grappling hook.

The basic idea behind TURF is to 'smear out' the players of a team all over the level, seeking a balance between offense/expansion (tagging enemy flags) and defense (defending your turf (your team's flags) against enemy takeover attempts).
Due to the weaponry, health and armor available in the level there is a certain priority to keeping those areas safe, yet the flags should be enough encouragement in finding a balance between wandering around, keeping an eye on your turf (flags) and guarding the 'resources' (armor, weaponry, etc) your team needs to defend the turf.

In version 8.5w of NLq the only TURF levels included are DEATH32C, E4M7 and DM1 through DM6.

In TURF there are flags, poised throughout the level. In death32c there are 16 flags, the deathmatch arenas have 6 to 10 flags and E4M7 has 18.

Each TURF flag is neutral at the start of the match (just the flagpost, no flag on it). Touching a neutral or flagpost with an enemy flag will make your team's flag appear on the flagpost.

Holding a flag for 60 seconds (cumulative with any time before a takeover) will grant every player on your
team 5 frags.

However, when the enemy takes a flag of your team, the time your team has 'owned' the flag will decrease
until it hits 0.

explanation: RED tags a neutral flag at the beginning of the war, and holds it for 20 seconds.
Then BLUE tags the flag, and holds it for 15 seconds.
RED retakes the flag and has only 5 seconds left of the 20 they held it earlier.

Defending your TURF is rewarded when either you or your victim is near one of your team's flags.

3.2 - Developing TURF levels

In case you'd want to actually design custom TURF levels, you can.

There are TWO ways you can do this. You can either build a totally custom level using editors like WorldCraft or Qoole (preferred), or you can alter id maps.

Altering id maps can be done using .ent files and qbsp'ing a .bsp file. That is considered highly gross, unless you are planning on running a dedicated turf-only server.

Try using the internal development impulses. Read on for more info on this.

For NLq source code development;

This'll take some programming experience. Definately not for you if you've never seen C or another programming language before.

Set developer to 666 ONLY when you're busy developing or else your visitors can seriously screw up or crash your server.

Switching weapons will trigger the developer mode and you can use "devcommands" to get a listing of the tools. It's mostly self evident. Just note that you'll have to ask a source listing from the server. Use "list" or "listturf". List will show all things added or removed.

If you've booted your QWCL with the "-condebug" command you'll notice a growing qconsole.log file in the /ctf directory. That'll contain everything that has happened to you on the server, including the source code listing.

You should cut and paste that code in the appropriate part of the ent_turf.qc file. The REMOVAL part of the listing should be in the TURF_Change routine, the rest in TURF_Spawn. Take a note at the source code, how it is divided into levels. Keep that structure intact for any new levels you might want to add.

example: developer 666

For .bsp development;

Just build the level as you would, placing "item_flag_turf" flags whereever you want. These are the neutral flags.

In case you'd like to have a CTF-like startup with each team hugged close together at an initial starting point, you can place "item_flag_turf_team1" to "item_flag_turf_team4" flags at the base to provide some initial turf.

The CTF spawn points are allowed as well, so placing a few "info_player_team1" to "info_player_team4" will spawn players there at the match start.

Also, the possibility of combining both CTF and TURF gamestyles is possible, giving an even more dramatic turn to teamplay.

Currently the source code of NLq is accompanied with a custom turf flag set, enough for 4 team turf. Featuring red and blue, and the new colors, yellow and green.

3.3 - What is 4WAY CTF?

Basically, it's just Capture The Flag, but with 3 to 4 teams.
The 3rd team is yellow, and has a panther as icon. The 4th team is green and has a hawk as icon.

Currently the only levels supporting this in NLq is death32c, e4m8 and e4m1. Death32c has three bases, red (DM2), blue (DM6) and yellow (DM4). e4m8 has four bases; red at the plaza, blue at the end of the level, yellow at the basement, green at the level start. e4m1 has three bases, red at quadelevator, blue at levelstart, yellow at level end

Weaponry and armor is placed inside the base perimiter (at most two yellow armors, four 25h packs, sng gun and ammo, ssg gun and ammo, and if you're lucky, a gl nearby).

3.4 - Developing 4WAY CTF levels

This would just be the same as developing for standard CTF levels. Just add "info_player_team3"'s and "info_player_team4"'s where needed.

Same applies to the "item_flag_team3" and "item_flag_team4".

Same NLq source code developement rules as with TURF apply here.

3.5 - Reference for CTF_MODE localinfo variable

Here you can check the bitmask values the CTF_MODE variable can assume. To combine effects, just add the value of the bitmasks all up.

bitflag 1 and bitflag 64 cannot be combined (safely, but feel free to try ;).

ctf_mode Function
1 Capture The Flag (ThreeWAVE 4.21)
2 Grappling hook (physics dependant on blast/weapon style)
4 Runes (ThreeWAVE 4.21)
8 TURF War
16 Rune tossing
32 If on, discharge is DISABLED.
64 4 WAY Capture The Flag (based on ThreeWAVE 4.21)
128 Team Arena (based on QW-Clan Arena)
256 Backpack and weapon tossing (effective in every game, DM to CTF)

IV. FAQ and Troubleshooting

4.1 Q: I've set up a general NLq server, but changing to a CTF level will fail ......

If you've followed the instructions for installation only, or followed instruction on setting up a mixed server the server boots in DM mode.

Now, if you'd do "rcon map ctf2m1" on the client console, or just "map ctf2m1" on the server console NLq will try to load that level, and treat it as a DM level!

The result is NLq won't set "sv_gamedir ctf", and the clients that connect to the server will start downloading the map (if you've unpaked the CTF .paks, if not, they'll get kicked off the server with a "purchase the pack" message).

Also visible on the server console would be a lot of error messages as "no spawn function for...". That is because NLq thinks you've fed it a DM level, and ignores code about CTF.

Just flag the appropriate ctf_mode flags to tell NLq it has to treat the next map als a CTF level.

Note that this is done automatically if you wouldn't have been such a wiseass and did a gametype switch and levelwarp change using admincodes and the mod itself :)

4.2 - Q: It doesn't work ......

Ok, I love specific questions.

  • Did you do a "rcon map" or "map" command on resp. the client or the server console to a CTF level? -If so, read paragraph 4.1

  • Did you do compile the mod following instructions in paragraph 1.1 and 1.2?

  • Did you see a QWPROGS.DAT in the /nlq directory which size is about 900000 bytes? - If not, read 1.2 again and notice you might want to check /nlq 's parent directories for that QWPROGS.DAT and place it back in /nlq

  • Are you desperately fighting NLq in setting it up ? -If so, drop me an email and I'll try to help you; sneak@captured.com