weapon_energy and sub-entity lasers on NPCs
Posted: Tue Nov 08, 2011 10:08 am
I was talking to Zieman recently about sub-ent guns on NPCs in relation to setting weapon_energy. The Wiki has this to say on weapon_energy.
Could somebody clarify this?
Is the weapon_energy key only valid if the NPC has a forward weapon in shipdata and this has weapon_energy specified, or will this still be valid if the NPC proper has no forward weapon, but instead has sub-entity weapons which have weapon_energy set in their shipdata?
I understood this as meaning that if an NPC has one or more sub-entity guns, and the weapon_energy was set to say 49 in the sub-ent's shipdata, then these sub-ent guns would be more powerful. The NPC itself has no forward weapon specified in shipdata. It's only weapons are those specified by this code in the sub-ent's shipdata.weapon_energy
This setting works differently depending on the type of entity it's used for:
Missiles. Changes the damage inflicted by the missile. Any value accepted.
NPC ships. Changes the forward weapon damage to a value different to the default one. Values higher than 50 will be clamped to 50. Does not change the value for aft weapons.
N.B. It does not have any effect on player ships.
turrets. Unused for turrets. Set the turret weapon_energy in its subEntity directory.
Default values are: WEAPON_PLASMA_CANNON = 6.0; WEAPON_PULSE_LASER = 15.0; WEAPON_BEAM_LASER = 15.0; WEAPON_MINING_LASER = 50.0; WEAPON_THARGOID_LASER = 12.5; WEAPON_MILITARY_LASER = 23.0
Example:
"weapon_energy" = "17";
Code: Select all
forward_weapon_type = "WEAPON_MILITARY_LASER";
"weapon_energy" = "49";
Is the weapon_energy key only valid if the NPC has a forward weapon in shipdata and this has weapon_energy specified, or will this still be valid if the NPC proper has no forward weapon, but instead has sub-entity weapons which have weapon_energy set in their shipdata?