weapon_energy and sub-entity lasers on NPCs

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: winston, another_commander

Post Reply
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

weapon_energy and sub-entity lasers on NPCs

Post by Smivs »

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.
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";
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.

Code: Select all

forward_weapon_type = "WEAPON_MILITARY_LASER";
 "weapon_energy" = "49";
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?
Commander Smivs, the friendliest Gourd this side of Riedquat.
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Re: weapon_energy and sub-entity lasers on NPCs

Post by Eric Walch »

Smivs wrote:
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?
It only changes the weapon energy of the forward weapon of the main entity. When you need more firepower for subentities, you can add additional subentities with lasers :P .

Updated the wiki now.
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Re: weapon_energy and sub-entity lasers on NPCs

Post by Smivs »

Thanks for the clarification Eric. Much appreciated.
Commander Smivs, the friendliest Gourd this side of Riedquat.
Post Reply