Custom Weapons  Introduction (continued)    [BACK]  [MAIN]  [NEXT]
 
First of all keep in mind that without C++ MOD writing we have to Replace existing weapons.  The biggest drawback of this is that we have to keep the names of the original weapon and powerup so a player can use it.  If you ever played Schplurg's Earthshaker 2001 or my level, Vortex 2, you may have notice that when you pick up an EarthShaker it still says "blackshark".   Even though you see a Hornet on your hud, above it it still says "Cyclone"  Other than that we can still have a lot of fun.

Here's a quick overview of the basic files needed to make a custom weapon:
1) an .oof for your powerup
2) an .oof, ogf, or oaf for your fire image (the shot)
3) a 64x64 ogf for your hud image (seen when hud is cockpit)
4) a 32x32 ogf for your Icon (the hud image without a cockpit)
5) a .gam containing:
    a) a generic .gam page for the powerup
    b) a weapon .gam page for the weapon itself.
    c) the ship pages (optional) to set the firing detail and payload if applicable.

Of course if your weapon is for a robot you won't need a powerup or the hud images.

To understand what the files do what let's walk through the life cycle of a weapon.  This will apply more to Primary and Secondary weapons.  Countermeasures are a slightly different creature.
 
1) Player picks up the powerup.  This makes the weapon available for use by the player ship.  Depending on the nature of the weapon, it can also set the ammo count.  Ammo count come from the powerup's .gam.

2) The player selects the weapon.  If the hud is displaying a cockpit, the 64x64 ogf  "HUD image" is displayed.  If cockpit is off the 32x32 ogf " Icon" is displayed.  Both images are specified in the weapon's .gam.

3) The player shoots the weapon.   A 'fire image' (the shot) representing the weapon is generated.  The image is either an .oof, an ogf, or an oaf.   Remember it can be just a picture.  The object doesn't cause the damage, the weapon does.  Ammo or energy is deducted from the player.

4) The weapon impacts a player.  Three things take place.
    a) an explosion- The effect of the weapon hitting.
    b) player or object damaged-  shields are deducted from the hit object..
    c) impact- the hit player's physical reaction from the hit (example- mass driver knocks you across the room)

5) The player runs out of ammo (or energy) making the weapon inoperative until the player acquires more ammo or energy if it's a Primary.  If it's a Secondary it is no long available and the powerup re-spawns.

6) The player is killed, the powerup spews from the ship.  Always for primaries, only if ammo remains for secondaries.
 

We have now officially scratched the surface.  Pretty boring so far but now you have an idea what you need to think about.  Now we'll take a look inside the .gams.  First we'll look at the powerup.

[BACK]  [ MAIN] [NEXT]