QScript v1.0
Thanks for downloading QScript! Included is everything you need to create a server-side (no client download necessary!) mod for Quake 3 Arena, version 1.27+. You don't have to know how to program in C or how to use a compiler; all you need is a text editor, and a program that can make PK3 files, like WinZip or WinRAR, and you can make your own mod!
Table
of Contents |
||
|
Included in QScript is D!ablo's Map Editor. Here's a screenshot of what it looks like:
To use it, just pull down the console (with the "~" key) and type "/editor" (without the quotes). Using the map editor allows you to move items, weapons, and spawn points around, as well as add new items and spawn points to the map. For more information, read editor_readme.html.
The game definition files, found in the "scripts" directory, define how your QScript game works. Included in the installation is "baseq3.game"; this game definition file sets all the variables necessary for a game of vanilla Q3A. This file is heavily commented, so it should be fairly self explanitory. Here, you can set what weapons players spawn with, as well as how much health and armor. You can turn on an offhand grappling hook, or turn Personal Teleporters into Droppable Turrets.
All of the definitions are contained in "classes". Each class has its own members, and there are 13 classes: a "game" class, a "player" class, a "weapon_turret" class, a "location_damage" class, and one class for each weapon in the game.
A basic "player" class looks like this:
//
Player Class
//
// Various player spawning options.
//
// health <spawning health, default 125>
// armor <spawning armor, default 0>
// speed <player speed, default 320>
// gravity <player gravity, default 800>
// weapons <number, default 6>
// For each weapon that you want the player to spawn with, look
// at the table below and get its number; add these numbers
// together to get the "weapons" value for the class.
//
// 2 = Gauntlet
// 4 = Machinegun
// 8 = Shotgun
// 16 = Grenade Launcher
// 32 = Rocket Launcher
// 64 = Lightning Gun
// 128 = Railgun
// 256 = Plasma Gun
// 512 = BFG
{
class player
health 125
armor 0
speed 320
gravity 800
weapons 6
}
Likewise, a basic "game" class looks like this:
//
Game Class
//
// Contains various options.
// This class is NECESSARY, and must be included
// in _every_ mod.
//
// countdown_armor <0,1>
// Turns Max Armor (100) on and off.
// countdown_health <0,1>
// Turns Max Health (100) on and off.
// script_name <text, no spaces>
// A description of the script.
// Users can use the "/info" command to display the script name.
// weapon_drop_time <number, default 200>
// Sets how long it takes to drop a weapon down.
// weapon_raise_time <number, default 250>
// Sets how long it takes to raise a weapon up.
// turret <0,1>
// Turns turrets on and off.
// If turned on, the Personal Teleporter item will
// now drop a turret when used.
// self_damage <1,0>
// Turns self damage on and off.
// drop_weapons <1,0>
// Turns weapon dropping on and off.
// Requires clients to bind a key to "drop".
// jetpack <1,0>
// Turns the jetpack on and off. This option
// requires the client to bind a key
// to +button6 to use the jetpack.
// jetpack_speed <number>
// How fast the jetpack accelerates.
// jetpack_burn <1,0>
// Turns armor burning for the jetpack on
// and off. If turned on, using the jetpack
// burns 1 armor a second.
// offhand_grapple <1,0>
// Turns the offhand grapple on and off. This option
// requires the client to bind a key
// to +button5 to use the grapple.
// grapple_speed <number>
// How fast the grapple moves.
// vulnerable_missiles <1,0>
// Turns vulnerable missiles on and off.
// lightning_discharge <1,0>
// Turns underwater lightning discharge on and off.
// respawn_armor <number>
// How many seconds it takes for armor to respawn.
// respawn_health <number>
// How many seconds it takes for health to respawn.
// respawn_ammo <number>
// How many seconds it takes for ammo to respawn.
// respawn_holdable <number>
// How many seconds it takes for holdable items to respawn.
// respawn_megahealth <number>
// How many seconds it takes for megahealth to respawn.
// respawn_powerup <number>
// How many seconds it takes for powerups to respawn.
// location_damage <0,1>
// Turns location damage on and off.
{
class game
countdown_armor 1
countdown_health 1
script_name baseQ3
weapon_drop_time 200
weapon_raise_time 250
turret 0
self_damage 1
drop_weapons 0
jetpack 0
jetpack_speed 255
jetpack_burn 0
offhand_grapple 0
grapple_speed 800
vulnerable_missiles 0
lightning_discharge 0
respawn_armor 25
respawn_health 35
respawn_ammo 40
respawn_holdable 60
respawn_megahealth 35
respawn_powerup 120
location_damage 0
}
The "weapon_turret" class defines what a turret looks like, how fast and what it fires, how much damage it can take, and how long it takes to build it. During a turret's "build_time", the player building the turret will be unable to move. Note that, unless the "turret" option in the "game" class in turned on, this class is unneccesary.
//
Turret Class
//
// Sets what turrets fire and how fast.
//
// fire <rocket,plasma,bfg, or grenade>
// What missile the turret fires.
// model <rocket,plasma,bfg, or grenade>
// What model the turret uses.
// rate_of_fire <number>
// How often the turret fires.
// health <number>
// How much damage the turret can withstand.
// build_time <number>
// How long it takes to build a turret, in ms.
{
class weapon_turret
fire plasma
model plasma
rate_of_fire 100
health 200
build_time 5000
}
The "location_damage" class sets up damage multipliers depending on location. This class is only necessary if locational damage is turned on in the "game" class.
//
Locational Damage Class
//
// Sets the damage multiplier for locational damage.
// Damage done to these locations are multiplied
// by the appropriate class value.
{
class location_damage
head 1.8
face_front 5.0
face_back 1.8
throat 1.4
shoulders 1.1
chest 1.3
arms 0.8
stomach 1.2
groin 1.3
legs 0.7
feet 0.5
}
All of the weapon classes are basically the same. Classes for missile weapons, however, have a lot more options, and so will contain more members. Here's the member definitions from baseq3.game:
//
Weapon Classes
//
// Attributes:
//
// rate_of_fire <number>
// How fast the weapon fires.
// damage <number>
// ammo <number>
// How much ammo is given to the player if s/he spawns with the weapon.
// fire <machinegun,shotgun,railgun,plasma,bfg,rocket,grenade>
// What the weapon fires.
// splash_damage <number, missiles only>
// splash_radius <number, in qunits, missiles only>
// missile <rocket,grenade,plasma, or bfg, missiles only>
// Changes the way the missile looks.
// physics <linear or gravity, missiles only>
// Linear missiles go in a straight line, while
// gravity missiles are affected by gravity.
// speed <number, missiles only>
// How fast the missile moves.
// multifire <1,0, missiles only>
// Turns multifire on and off.
// homing <1,0, rockets,plasma,bfg only>
// Turns homing on and off.
// extra_vertical <1,0, grenades only>
// Turns extra vertical boost on and off.
// vortex <1,0, grenades only>
// Turns vortex grenades on and off.
// Can NOT be on at the same time as push.
// vortex_rate <number, grenades only>
// How fast vortex grenades suck in
// their victims.
// push <1,0, grenades only>
// Turns push grenades on and off.
// Can NOT be on at the same time as push.
// push_rate <number, grenades only>
// How fast push grenades push out
// their victims.
// parent_immune <1,0, grenades only>
// Turns on and off whether or not
// push and vortex grenades effect
// their parent.
// vortex_area <number, grenades only>
// How big an area vortex and push
// greades affect.
// vortex_life <number in milliseconds, grenades only>
// How long a vortex/push grenade
// stays around.
There are 9 weapon classes, in no particular order: weapon_rocket, weapon_grenade, weapon_plasma, weapon_bfg, weapon_gauntlet, weapon_machinegun, weapon_shotgun, weapon_lightning, and weapon_railgun.
Making a new game definition file is easy. First, extract "baseq3.game" from pak0.pk3 (in your QScript installation). Rename this file to anything you want, as long as it still has the ".game" extension. Edit this file to your heart's content! The game definition file is the heart and soul of a QScript mod, and no other editing is necessary.
If you want to change the base Quake 3 maps to fit your new mod, use D!ablo's Map Editor to move around and create new items, weapons and spawn points (refer to editor_readme.html for more information). If a ".map" file the same name as the map exists, it will be loaded and used with the given map (for example, if the player enters q3dm1, and there is a ".map" file named q3dm1.map, the information in the ".map" file will be used instead of the standard item placements).
Once you're
done editing your game definition file, save it and proceed to the next step!
This is easy. Remember that mods made with QScript are server-side, so clients don't need to download your mod in order to play on a server. You will, however, need to create the proper PK3 if you want to run this on a pure server. You'll need a program that can create zip files for this, like WinRAR. Since this is what I use to make my PK3s, this is the program I'll use in my directions.
The resulting PK3 file is all you need to play your mod! Note: the editor will not work with connecting clients.