[an error occurred while processing this directive]

Weapons Editing through DAT Files

You actually don't have to know the nitty-gritty details of C++ for this guide, but it helps to understand how to use Structs and Classes. A struct holds many variables, like a whole number and decimal [int and double.] These are two completely different types, but they are attributes of the same struct. Classes are like structs, except that classes have a function or command line. This means that there can be a display command in the class for a certain attribute. For instance, JKII displays the lightsaber when you press the "1" key. I will discuss editing structs and not classes. Why? As of this writing, this is only my second day of editing :P

Lets get started!

(1) A PK3 file is really just a ZIP file, so open the assets0.pk3 file using and Zip program (like WinZip.)

(2) Look for the file: weapons.dat and items.dat. These are the two files we want to work with.

(3) Open weapons.dat (with a text editor,) because thatís the fun part. :P

(4) Listen carefully: IGNORE THE COMMENTS. They hold important information, but are not needed!

Here is what each variable represents.

weapontype: a string
weaponclass: another string
- both of these should have the name of the weapon.

weaponicon: file path to the icon of the selected weapon (for lightsaber, its gfx/hud/w_icon_lightsaber)

firingsound: file path the sound of the weapon when it fires (for lightsaber, its sound/weapons/saber/saberhum1.wav)

missleFuncName: name of the function of the primary fire projectile.

altmissleFuncName: name of the function of the secondary fire projectile.

ammotype: integer, possible examples:
- 1 for no ammo
- 2 for energy (like the bryar)
- 3 for Power cells (bowcaster)
- 4 for Imperial Repeater ammo and Flectichte (particle ammo)
- 5 for Rockets (boom!)
- 6 for Emplaced guns, AT-STs, etc.
- 7 for Thermal Dets
- 8 for Trip mines (whoa!)
- 9 for Detenation pack

ammolowcount: integer, no idea what it means.

energypershot: integer, thats your ammounation cost (for the bryar, it's 1, but you can change that to 0 or 100)

firetime: integer, how long it takes to fire your weapon in rapid section (in milliseconds, like 1000= 1 second)

range: integer, how far a projectile can go (keep the same, its a limit number, and doesnt really effect range)

altenergypershot: integer, same as energypershot, but its for the secondary fire.

altfiretime: integer, same as firetime but for secondary fire.

altrange: integer, same as range, but for secondary fire.

misslemodel: file path to what your weapon to look like (its under for lightsaber, and nothing else)

-- WAR_DTemplar5, 4/6/02
[an error occurred while processing this directive]