**Tutorial** - Creating new dynamic weapons
Here is an entry for a Justice Mk I
[Munition
nickname = li_gun01_mark01_ammo
hp_type = hp_gun
requires_ammo = false
hit_pts = 2
hull_damage = 16.299999
energy_damage = 0
weapon_type = W_Laser01
one_shot_sound = fire_laser1
munition_hit_effect = li_laser_01_impact
const_effect = li_laser_01_proj
lifetime = 0.800000
force_gun_ori = false
mass = 1
volume = 0.000100
[Gun
nickname = li_gun01_mark01
ids_name = 263357
ids_info = 264357
DA_archetype = equipment\models\weapons\li_heavy_ion_blaster.cmp
material_library = equipment\models\li_equip.mat
HP_child = HPConnect
hit_pts = 400
explosion_resistance = 1.000000
debris_type = debris_normal
parent_impulse = 20
child_impulse = 80
volume = 0.000000
mass = 10
hp_gun_type = hp_gun_special_1
damage_per_fire = 0
power_usage = 5.090000
refire_delay = 0.120000
muzzle_velocity = 750
use_animation = Sc_fire
toughness = 1.300000
flash_particle_name = li_laser_01_flash
flash_radius = 15
light_anim = l_gun01_flash
projectile_archetype = li_gun01_mark01_ammo
separation_explosion = sever_debris
auto_turret = false
turn_rate = 90
lootable = true
LODranges = 0, 20, 40, 80, 100
Lets break this down though, what does it all mean....Well first under the Munition tab you have nickname = li_gun01_mark01_ammo. This is simply the nickname for the ammo as it says. If you are making a custom gun you may want to make the nickname [your guns name_ammo (destroyer_ammo for example). The next line is hp_type = hp_gun, just leave this line alone as it wont have any bearing on your weapon. Next line, requires_ammo = false...Self explanatory, if it is set to false then it needs no ammo, if it is set to true then you need to buy ammo to use the gun. Moving along to hit_pts = 2, this just says how much damage your ammo can sustain after launch before being destroyed, but it doesnt exactly matter because I dont think anyone is a good enough shot to hit a "bullet" moving 600 m/s. The next two parts are fairly self explanatory...hull_damage = [the flat sum (for example if you wanted a gun to do 1000 damage to the hull you would put hull_damage = 1000). energy_damage refers to the amount of damage it does to shields. This is a bit trickier than hull damage, when energy damage is set to 0 it will automatically do half the hull damage, so if you had it as hull_damage = 1000, energy_damage = 0, the weapon would do 500 damage to shields. If you put hull_damage = 1000, energy_damage = 200, the weapon would do 700 damage to shields, in simpler terms it adds the value you entered onto half of the hull damage. The next for lines deal with weapon types and effects, I will cover those in detail after this part of the tutorial. Skipping down do the lifetime = # line, lifetime means the range of your weapon, but of course they had to be confusing with it, instead of entering a flat number you need to know the equation to get range. Well here it is, 1L = 700M, in non-algebraic terms, lifetime = 1 will give you a range of 700 m, lifetime = 2 will give you a range of 1400, if you have trouble getting the correct number for your range simply open your calculator on your computer and enter the range you want on your gun and divide it by 700, the solution will give you the value to plug in for lifetime. Next line is force_gun_ori = false, I'm pretty sure that this tells you if your weapon is able to rotate. force_gun_ori = false will allow your weapon to rotate in its arc, force_gun_ori = true will make your gun fixed (not able to rotate, like the main gun on the liberty cruiser). The following two lines, mass and volume do not have much bearing on the gun, but though I havent tried it, I'm fairly confident that if you increase them, they may be able to push ships.
Edited by - Chips on 10/31/2004 8:02:08 AM