Config Files

Grav Wars is designed to be very extendable when it comes to ships levels and systems. All of theses files are found by default in /usr/share/gwar/etc. Messing arround with these files lets you add your own custom stuff to the game.

config files described:

Systems in gwar

weapons

GW_MISTLE 1 - basic no frills projectile

GW_GUIDE 2 - guided missiles (requires a lock).

GW_BEAM 3 - uses variable amount of ship power to inflict damage through a beam. heats up when firing. its maxpow rating is near heat overload.

GW_MIRV 4 - your buddy and mine is back from scorched earth. single weapon that splits up into a set number of projectiles in the direction that the weapon is moving. the new projectiles can be pretty much any type.

GW_S_BURST 5 - Star bursts are like mirvs but the fragments fly out in a 360 degree circle.

GW_SHOCK 6 - explodes and makes a shock wave that damages anything in it's radius.

GW_SHOT 7 - shot gun spraying of a type of projectile.

GW_ARCBLAST 31 - like shotgun but uses a mirv paturn of breaking.

GW_BEAM_A 14 - same as arcblast but uses beam weapons.

GW_MISTLE_P 16 - particle weapons fire off using amounts of energy. heats up some.

GW_TRACTOR 25 - tows stuff

GW_STAR_DESTROYER 18 - planet busting weapons.

GW_LARAPA 13 - weapon that drops off other bombs while moving close to a planet (thank you liro).

GW_BEAM_CL 12 - Chain Laser are fire full Auto beam weapon bursts.

weapons not yet implemented:

GW_MELEE 29 - swords, axes, etc.

GW_POWER_DRAIN 26 - sucks power from opposing ship through beam. heats up fast.

GW_PDS 21 - weapon that automaticly fires at incoming missiles with small shockwave weapons.

GW_BIO 8 - biological weapons.

systems:

GW_GEN 27 - creates energy for ship.
uses: edrain = ecreated per minute.

GW_SHIELD 17 - diverts base energy into protective barrier. (like you needed that part explained :P ) in this game 1000 energy = 100% block 100 energy = 10% block the rest hits the ship. All the power of the blocked hit reduces the charge of the shield by the amount of the blocked hit.
NOTE: lowering shields 65% of energy goes back batteriesrys so the shields can be used as a sort inefficientant reserve battery.
uses: edrain, maxpow, dam_dis = %loss of edrain charging shield

GW_COOLING 32 - Uses energy to drop tempature of all other components. allowing you to set their power to a level that would normally cause them to burn up (Shields engines cloaks generators) or achieve a better rate of fire on some weapons. You can set components up to 150% of their normal max. You have to be careful doing this because most components heat up a lot faster when set over 100% eg. generator heats up twice as fast at 110 and 3x as fast at 120%.
uses: edrain, maxpow - max heat transfer per minute , dam_dis - %tempature loss per minute.

GW_MAIN_COMP 19 - Runs AIs and basic opps for a ship. A Processer Speed of 20 is a calculator brain; 100 is typical and 500 is extremly smart. Don't define anything bigger than 500.
uses: edrain, Rearm = processer speed, [fragidx = AIPROG], payload = computer modifiers

GW_ADD_ON_COMP 20 - Adds more programs and processer power to a ship. Unlike the main computer they can be powered down to save power or over burned to get more speed.
uses: edrain, Rearm = processer speed, [fragidx = EXTENTIONPROG], payload = computer modifiers

GW_SENSORS 33 - Sends interpreted wave data to your computer for navigational and identification purposes. They work on several bands to give you important info on your enemy. Other than scanner modifiers range is the only important thing your scanner can do. You can see anything (not clocked) in this and range scan them for info if you have any special bands inside this range. [ There is also an area outside this ring called your "ghost reagion" that you can sometimes detect foreign objects in depending on wether they have active scanning on and their diameter. you might see their size but sometimes only you can detect that their are waves coming at you. if ( ( ship_radius * ( 1 + ( 7 * ship_scanner_pow) ) ) * ( (your_scan_rng ) / (rng_to_ship - your_scan_rng) ) > K ) then you an see him needs work!! ]
uses: edrain, dam = range, payload = scanner modifiers

GW_CLOAK 15 - invisableity at distance >= maxpow
uses: edrain, maxpow

GW_ENGINE 22 - does basic maneuvering.

Systems not yet implemented:

GW_ARMOR 9 - body armor for humanoids.

GW_BIO_ARM 10 - MOPP Gear for humanoids.

GW_FLY 11 - jetpacks for mecha/humanoids.

GW_DRIVE 23 - ultra high speed travel. needs to warm up.

GW_TELEPORT 24 - gets out of bad situation quick. badly overheats on use and needs repair.

GW_SOL_GEN 28 - solar fins that generate extra energy. very fragile when extended.

GW_OMNITRUST 30 - extended mecha flight engines and jump jets.

GW_GMS 34 - ground mobility system. It controls legs or treads on a mecha. It controls the jump power (pps), run speed (pps), and max landing shock absorbsion (pps).

scanner / computer modifiers

The scanning and computer systems are your view of the world they are vital for finding, evaluating and ultimately killing your enemy. They work can work on multiple bands each giving up different information.

CV_X 0x0002 (computer) - The X band is the most basic function of displaying small objects (ships / projectles) that would not otherwise be visable without this your ship is near blind except at very close range.

CV_K_BAND 0x0040 (scanner) - K particles to get a basic structual view of a ship. They detect the size and mass of an object. K waves can be used to measure the resonance of an object for calculating its hp, but that only works if the object's shields are weak or when used in conjunction with S wave detection).

CV_E_BAND 0x0010 (scanner) - The E band measures the build up energy in an object.

CV_S_BAND 0x0020 (scanner) - The S band measures S waves emitted by shield generators. Knowing the shield strength, your computer can acurately calculate the hp of a ship using k particles.

CV_T_BAND 0x0080 (scanner) - Thermal scanning lets you see the tempature of objects. It can also be used with good accuracy to judge the size of the crew on ships with warm blooded personel (terran,centarian, morvul,pirate,preditar).

CV_K2_BAND 0x0100 (scanner) - The K2 particle is a Ziv-Luxxen wrapped K particle that passes through matter and energy with very predictable results. This makes it perfect for scanning. Good structual anaylisis is possible with K2 particles, even through strong shields. [Mounts and cargo are identifyable]

CV_PASSIVE 0x0200 (scanner) - setting power at below 50% enables passive mode scanning. This greatly decreases your enemys ability to see you 8x less visible in his "ghost reagon" but it means you work with loose all info on your enemy but his location (and you loose that if he does the same).

CV_TUNNEL 0x0001 (scanner) - Wave tunnel rebending is the technology that creates a small diameter snaking space time tunnel. This tunnel allows particles and waves but not much else to pass through. These tunnels allow scanners to "see" arround objects that would normally block their sight (stars / planets).

CV_TRIANG 0x0004 (computer) - computer enhancement that projects a directional triangle on ships too small to see.

CV_RACE_ID 0x0008 (computer) - computer enhancement that color codes and id's ships, mechas, etc. draws a colored ring at close range and colored x or triangle if your ship has the correct other enhancements.

CV_MINI_RADAR 0x1000 (computer) - a mini radar screen.

CV_MOTION 0x2000 (computer) - motion anaylisys tracks projectiles and ships.

CV_X_MOTION 0x4000 (computer) - enhanced motion anaylisys looks for moving voids. This is the only way to see a cloked ship.

CV_SNOW 0x8000 (used internally) - computer glitch.

weapon modifiers

PA_NORMAL 0x0000 nothing special
PA_ARMOR_PIERCING 0x0001 better chance of damaging internal systems
PA_EXPLOSIVE 0x0002 more damage to external systems
PA_EMP 0x0004 knocks out computers
PA_BEAM 0x0008 does thermal damage to systems also
PA_MAGNETIC 0x0100 has extra attraction to other ships
PA_LOCKING 0x0200 will hit the first ship that gets into its lock zone
PA_CONTACT_TRIGGER0x0400 for all multiheaded weapons and shock waves they go off completely if they hit an enemy
PA_AREA_TRIGGER 0x0800 will expolde when passing a ship of a different race that it could damage. shockwave and starcluster weapons only.

Structure of the systab file

the systab is a line based file one line per entry and whitespace delimited. it contains all info concerning the systems used by ships/mechas/personnel the game. Note: stuff appearing between square brackets may change soon or be inaccurate right now. the fields that are left off will be filled in later fields:
  1. char name - the name of the system.
  2. int race_matrix - This will be used for economics later on right now it isn't important. It is an [8 digit] number. Each digit stands for a race: RT_TERRAN, RT_CENTARIAN, RT_VILL, RT_MORVUL, RT_KOLAK, RT_KRULL,[ RT_PREDITAR, RT_PIRATE]. 2:build and use 1:use only 0:can't use
  3. int size - Mount size 0:personnel 1:mecha hand 2:mecha mount 3-6: ship mounts
  4. int subtype - system type see above for numbers and descriptions.
  5. int mload - Maximum loaded rounds for non-energy type weapons. 0 = energy weapon.
  6. int Rearm - Rounds Per Minute
  7. int edrain - Power used to fire off for 1 use systems [or 1 min of op].
    this is the only field with any meaning for a GW_GEN 27 . this value affects the rate of charge for a sheild as well as the edrain.
  8. int dam - damage inflicted. [Damage w/o Dam_Dis] Different/ meaningless for for
  9. int maxpow - max force behind projectile. Max Power input for beam weapons. [max vel for engines/drives] max distance for tractor beams and power drain. Max Power for shields.
  10. int minpow - set = maxpow for fixed power weapons. 0 for var power weapons.
  11. float Dam_Dis - %Damage lost per distance (beam: 100 p's / shockwave: 10p's [ball energy: 1 sec flight] ) or acc/dist for tractor beams.
    Shields: % energy loss (of edrain) while charging
  12. float Spread - Arc of spread in degrees for: GW_MIRV 4, GW_SHOT 7, GW_ARCBLAST 31, GW_BEAM_A 14.
    For GW_S_BURST 5 it doesen't apply.
    For GW_SHOCK 6 it equals radius.
    [For GW_LARAPA 13 it equals seconds between drops.]
    others it is a random inaccuracy arc.
  13. int numfrag - number of frags. nonfragmenting weapons: 0/1 = normal. >= 2 chaining burst.
  14. int fragidx - name of the fragment (must be already defined).
  15. int payload - extra modifiers (armor piercing, explosive, etc)
  16. int flighttime - uses thers ranges:
  17. int mhp - Max hit points 0:calculated
  18. [int maxvel - 0: use maxpow]
safe_tempature and t_gain (tgain per [round] @ 100% use/ 1 shot) are calculated right now and will likely stay that way for a while.


Structure of shiptab file

This file contains the discription of every ship, mecha, ground and orbital defence available in the game. The shiptab uses the same formatting rules as the systab but for readability sake it is recomended that you use backslashes at the end of lines to split the records into multiple lines.

A simple entry looks like this:
Mercienary 1 HumanSml 28 350 300 "Mech_Commando Torp_G1" 2000 3 8 \
        "t3i:Cmp_Terran\
         t3i:Gen_III\
         t3i:Eng_TurboJet\
         t3i:Drv_Gdrive\
         t4:Torp_T3_AP\
         t4:Sld_III"

It has the following fields (but more are likly in the future):

  1. Name - The Name of this object
  2. Class - Object Class (SHIP:1 MECHA:2 STATION:3 GROUND:4 ORBITAL:5 HUMANOID:6)
  3. Pic - The Name of the sprite used
  4. Crew - number of people on board (affects how quickly a ship can be repaired and how well it handles boardings)
  5. Armor - Hit Points (if you don't understand play a couple of other games and come back)
  6. Cargo - [maximum total size of all cargo held (i havn't figured out how or if I will do this yet)]
  7. Cargo Contents - a space delimited listing of items from the shiptab and systab (between quotation marks if more than one item). The word "none" here means no cargo.
  8. Power - maximum power that the ship's internal batteries can hold
  9. Mass - in ktons 1 is very small 20 is enormous (for a ship). plays a roll in calculating damage in ship to ship collisions, [energy usage for engines] and effectiveness of tractor beams.
  10. Radius - in pixels at std zoom 3 is very small (fighter) 25 is enormous (capitol ship). 20 is a small space station 50 is a moon like space station.
  11. Mount Ports - space delimited listing of the mount ports on a given ship. more info follows.

More Info on Mount Ports:

The first mount on a ship (, mecha , et al) is the most important it is what decides the race of the ship and [what AI] a ship will use. It is supposed to be of type GW_MAIN_COMP 19. If there is no computer there the object is dead in space (but I don't think anything will crash). mounts are defined as follows
(RaceSize[Internal]:System|RaceSize[Iternal]|System)

Where Race is one of:
t RT_TERRAN
c RT_CENTARIAN
v RT_VILL
m RT_MORVUL
k RT_KOLAK
K (or a) RT_KRULL (they used to be called the ancients)
P RT_PREDITAR
p RT_PIRATE
G RT_PERSONEL (I'm really not using this now, but it's in the code)

Size is one of:
1 humanoid size equipment
2 normal mecha (fighter ship) size equipment
3 small ship capitol ship (large mecha) mounts
4 med ship
5 large ship
6 planetary defences

The Internal flag is "i" for an internal mount and not present for an external mount.

The System is an object in the systab. Note: the race/size is req'd for the first mount entry. After that the size is taken from the systab and the race is assumed to be the race of the previous mount, if it is not stated explicitly.


Structure of a gwsector file

a gwswctor file is is a line based file. It has one command/context grouping per line. There are no current plans for a level designer program. (the levels are decribed as opposed to plotted. This allows you to play the same level many times without it ever being exactly the same.)

most simple example

use shiptab systemtab optional line used to set alternate shiptab or systab
add gamearea * r=800 adds the game area to this level. a gamearea must be the first object added. it is a container for all other objects. Other gameareas can also be included inside. It is using the default name, "*", and and has a radius of 800.
in{must follow the gamarea. specifies that all objects added between this and the closing curly bracket are in side the last object added (the gamearea).
add planet Mars r=180 m=21000 adds planet named "Mars" this level. It has a radius of 800 and a mass of 21000.
on{Specifies that all objects added between this and the closing curly bracket are put on the last object added (Mars).
add Mech_BallAPC Lucas t=1 Loads object Mech_BallAPC from the shiptab and puts it on Mars. Note: all files are case sensitiveSpecifies. It is on team 1.
} closes the on
by 100 200 {Specifys that all objects added between this and the closing curly bracket are put by the last object added (Mars) and are at least 100 away, but not more than 200.
add Defender * t=1 Loads object Defender from the shiptab and puts it by Mars.
} closes the by
} closes the in
that is the basic format of the file. other than stuff in the shiptap the following can be added: planet, wormhole, blackhole.

planets should always have their radius, picture and mass set. An even number of wormholes must be added. the first wormhole is at the other end of the second wormhole. The third and forth are connected, and so on.

use shiptab systemtab

add gamearea * r=800
in{
        add planet Europa  r=100 m=40000 p=1
        on{
                add Mech_Commando Marcus a=55 t=1
                add Mech_Commando Ryan a=58   t=1
                by 50-100 {
                        add Mech_BallAPC Lucas t=1
                }
        }
        add planet Bulnox  m=10000 r=211  p=11
        add planet Tingo   m=20000-800000 r=400 p=9
        add planet Mars_II p=4 r=100
        add Defender * t=1
        by 200 300 {
                add Defender * t=1
        }
        away 500 800 {
                add Space_Station * t=2
		by 50 160 {
			add War_Dog * t=2
		}
        }
}


Structure of campain file

These are coming in a later version. But are going to be as follows:

Label Level [Lose] [Win]
or
Label TEXT Text [Music] [Backdrop]