Simon B wrote:... It is also not possible to have any laser weapon type other than thargoid_laser?
Well, Oolite knows five laser types: WEAPON_PULSE_LASER, WEAPON_BEAM_LASER, WEAPON_MILITARY_LASER, WEAPON_MINING_LASER, and WEAPON_THARGOID_LASER. You can chose any of them, but the former four will fire only straightforward. Only the last follows its target (= is turreted). According to the information from Eric and Thargoid it fires from the centre of the entity it is defined for.
By the way: It doesn't have a 360° firing range. Have a look in the thargoid entry of Oolite's shipdata.plist. You will see that actually front laser
and rear laser are defined as thargoid lasers. So technically the thargoid laser is an ordinary laser which only fires in one direction, except that it has a wide angle.
What you
cannot do--if this is actually your question--is define other (new) laser types different from the five pre-existing ones. You also
cannot change any characteristics of the said five types, except their colour, and--within limits--their
weapon_energy (limits: works only for front laser, only up to a value of 50 (so you can't soup up a mining laser, it has already a default of 50), and only for NPCs).
By the way: So far also my efforts to place a Thargoid laser on a subentity haven't brought satisfactory results. I tried to give the Thargoid Carrier three turreted lasers instead of one, but either the subentity lasers didn't fire at all, or in random directions independent of the main laser.
How does that work? Surely the main laser is a subentity? I'm going to have to go look...
No, it's a property of any entity. Usually the main entity. And there are
four main lasers (player; all directions) or
two (NPC; forward and aft). And it seems as far as working thargoid lasers on subentities are concerned I am not the authority to trust:
Eric Walch wrote:The thargon threat cruiser and battleship have thargoid lasers on their subentities. And those subents are define as frangible, so you can shoot them off. I always liked that on those cruisers. Because you can shoot off the lasers they become less strong after some time of battle. (aim at the top part)
Thargoid wrote:In Aquatics I've given the Leviathan platforms quite a number of them, and they certainly don't all shoot from the same point. You get quite a light show in fact, only slightly hindered by the fact that they all have the same target. It would look much nicer if they could have independent targets, as I said earlier.
Seems I should study those and revisit the Thargoid Carrier...
BUT: nobody knows if the firing frequency of lasers can be customized?
No, it can't. T'is hardcoded like all laser specs.
Lets think outside the box here....
Speculating: I can slow down a military laser by designating a pulse laser but setting weapon_energy=50; ??
Well, first of all, the
weapon_energy of a military laser is 23, not 50. (As always the rule should be: Please consult the >
WIKI< first.) Second, the laser types do not only differ in frequency and energy, but also--and most important--in
firing range. If you are able to browse the code, you'll find the values in ShipEntity.m. And they will tell you that the pulse laser has a range of 12500 meters, while the military laser fires up to 30000 meters. Therefore even a souped up pulse laser will never become a military laser. If your NPC with a energy-50 pulse laser attacks me, I smile and blast him to pieces from the distance.
OTOH the souped up pulse laser also won't overheat like a military laser, so in close combat it could have its advantages. But only in close combat, see above.
If I mix laser types, I mix firing frequencies??
You can't "mix". The five laser types are distinct. If you put (in different sub-entities; works only for NPCs) more than one forward pointing laser on a ship, each of them fires independently of the others. So if you put one pulse laser next to one military laser, you will have one pulse laser and one military laser, and each of them will fire according to its characteristics.
I was also speculating that it may be possible to set a ship so that it will not fire unless another ship has already fires - in a script? Then, if I set that ship as a subentity... will that ships script still control it enough for the fire-control rules to be kept?
Sounds at least very complicated to me. Usually ships fire when attacked, or when attacking; and that is decided in their AI. The case of an entity attacking (= firing) when another entity is attacking would be that of an
escort. Subentities, however, become a part of their main entity (mother).
Technically, I can have lasers cycle-fire by specifying a seperate model for the whole ship for each laser. As each one fires, the ship gets replaced with one that has a different fire position. (I'd rather not do that...)
I doubt it. I guess in the end it wouldn't work. And by the way, as in 1.72.2 (and since 1.69 or so), also in 1.73 the
weapon_position_foos won't work. As a result all lasers fire from dead center, regardless which position you have given it in shipdata.
Lastly - can I specify in a requires.plist that another oxp be installed or not present?
No, not in requires.plist.
You can, however, check in your script for the presence of other scripts (code snippets around here a couple of times). So if the OXP you want to check for contains a script, you can do it. If it doesn't, you can't. At least to my knowledge; don't know whether there were changes in Oolite which would permit what you want since February, but I doubt it.
*****
On a side note: in my understanding all of this belongs into the
Expansion Pack section of the board, not in Discussion.
Simon, would you mind opening a thread over there for your next questions? I promise, I'll read them just as if they were posted here.