when looking through the Shipdata for 1.75, there's a lot of craft that have all weapon mounts listed, but only the forward weapon type is named : i take it this means that that weapon type is duped for all mounts? Are weapon types for the other facings not allowed, or could you have, say, forward Beams and a rear Pulses etc?
cheers
Quick NPC weapon mount question
Moderators: winston, another_commander
- Killer Wolf
- ---- E L I T E ----
- Posts: 2279
- Joined: Tue Jan 02, 2007 12:38 pm
- Commander McLane
- ---- E L I T E ----
- Posts: 9520
- Joined: Thu Dec 14, 2006 9:08 am
- Location: a Hacker Outpost in a moderately remote area
- Contact:
Re: Quick NPC weapon mount question
I assume you're asking about NPCs.Killer Wolf wrote:when looking through the Shipdata for 1.75, there's a lot of craft that have all weapon mounts listed, but only the forward weapon type is named : i take it this means that that weapon type is duped for all mounts? Are weapon types for the other facings not allowed, or could you have, say, forward Beams and a rear Pulses etc?
They have only the equipment explicitly given to them in shipdata. Thus: if it says
Code: Select all
"forward_weapon_type" = "WEAPON_PULSE_LASER";
Code: Select all
"aft_weapon_type" = "WEAPON_MILITARY_LASER";
Oops: I should've looked first and written later. The bigger ships (Anaconda and Boas) actually do have rear weapons, and had them forever (at least since 1.65). However, I think route1traderAI didn't actually make use of them for most of the time. Perhaps it currently does?
Forward and aft weapon doesn't need to be the same, just like for the player. They're completely independent of each other.
And of course you know that NPCs can't have side weapons, so if an OXP writer happens to add a line like
Code: Select all
"port_weapon_type" = "WEAPON_BEAM_LASER";
Re: Quick NPC weapon mount question
I've seen freighter-type ships (Anacondas/Boas/Boa2s/Pythons) making good use of their rear laser in Oolite v1.75.
In my mod, I gave rear lasers to Asps, Fer de Lances, and some Cobra 3's...as well as others. (But certainly not to everything -- Sidewinders, Mambas, Worms, Transports, etc...have never had support for anything other than a front laser, if that!)
I guess it is even possible to give a station missiles it can fire even if it has no lasers. That would certainly discourage ships from shooting at it. The upper limit for an NPC ship as far as I know is 32 missiles without using special tricks.
Lastly, there are plasma turrets -- such as found on the Behemoth OXP or various station OXPs (Black Monks, Random Hits Space Bar, etc).
In my mod, I gave rear lasers to Asps, Fer de Lances, and some Cobra 3's...as well as others. (But certainly not to everything -- Sidewinders, Mambas, Worms, Transports, etc...have never had support for anything other than a front laser, if that!)
I guess it is even possible to give a station missiles it can fire even if it has no lasers. That would certainly discourage ships from shooting at it. The upper limit for an NPC ship as far as I know is 32 missiles without using special tricks.
Lastly, there are plasma turrets -- such as found on the Behemoth OXP or various station OXPs (Black Monks, Random Hits Space Bar, etc).
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
Re: Quick NPC weapon mount question
Indeed, this has changed since 1.75. There was a bug in the code that when re-issued a 'performAttack' command, the ship switched from using rear weapon to retreating mode. And because most AI code did call a 'performAttack' after hitting the ship, this often mend that most ships very soon forgot that they had a rear laser. Since 1.75 this is fixed.Commander McLane wrote:[Oops: I should've looked first and written later. The bigger ships (Anaconda and Boas) actually do have rear weapons, and had them forever (at least since 1.65). However, I think route1traderAI didn't actually make use of them for most of the time. Perhaps it currently does?
UPS-Courier & DeepSpacePirates & others at the box and some older versions
- Killer Wolf
- ---- E L I T E ----
- Posts: 2279
- Joined: Tue Jan 02, 2007 12:38 pm
Re: Quick NPC weapon mount question
"And of course you know that NPCs can't have side weapons, so if an OXP writer happens to add a line like
Code:
"port_weapon_type" = "WEAPON_BEAM_LASER";
he's only writing rubbish without any effect or meaning at all."
heh, well some of the core ships have port/starboard position notes, so i guess that's no use either.
my point was, if i put an aft weapon position, would it acutally do something if i didn't put an aft weapon TYPE?
Code:
"port_weapon_type" = "WEAPON_BEAM_LASER";
he's only writing rubbish without any effect or meaning at all."
heh, well some of the core ships have port/starboard position notes, so i guess that's no use either.
my point was, if i put an aft weapon position, would it acutally do something if i didn't put an aft weapon TYPE?
- Commander McLane
- ---- E L I T E ----
- Posts: 9520
- Joined: Thu Dec 14, 2006 9:08 am
- Location: a Hacker Outpost in a moderately remote area
- Contact:
Re: Quick NPC weapon mount question
No. The position only says where a laser beam—if any—originates from. If not specified, it defaults to (0, 0, 0). Therefore, in a sense all ships haveKiller Wolf wrote:"And of course you know that NPCs can't have side weapons, so if an OXP writer happens to add a line like
Code:
"port_weapon_type" = "WEAPON_BEAM_LASER";
he's only writing rubbish without any effect or meaning at all."
heh, well some of the core ships have port/starboard position notes, so i guess that's no use either.
my point was, if i put an aft weapon position, would it acutally do something if i didn't put an aft weapon TYPE?
weapon_position_foo
keys for all directions.Specifying where something has to be attached, and actually attaching the something are two completely different things.
- Killer Wolf
- ---- E L I T E ----
- Posts: 2279
- Joined: Tue Jan 02, 2007 12:38 pm
Re: Quick NPC weapon mount question
cheers bud. i thought it odd they'd have the posn but not the weapon.