Posted: Fri Aug 14, 2009 1:38 pm
Thargoid has already given some more clarification, but I can still try again. And I apologize that I, too, was't exact in my terms. I'll try to be now.Simon B wrote:This equivalence is contradicted in the following, also from you:Commander McLane wrote:And just to clarify one issue in general: Lasers and turrets are two distinct types of weapons in Oolite. Laser = beam of light; turret = small balls of plasma.So either a turret is a plasma gun or a turret is plasma-armed. Which?What I had in mind was a laser-armed ball turret.
won't work. Turrets are by definition plasma ball-armed.
There is no contradiction here. Oolite knows the following weapon types which are defined in the code and available via equipment.plist:
- EQ_WEAPON_PULSE_LASER: Laser, slowly firing, low range, low punch.
- EQ_WEAPON_BEAM_LASER: Laser, quickly firing, medium range, medium punch.
- EQ_WEAPON_MINING_LASER: Laser, very slowly firing, low range, huge punch.
- EQ_WEAPON_MILITARY_LASER: Laser, quickly firing, high range, big punch.
- EQ_WEAPON_THARGOID_LASER: Laser, medium slowly firing, medium range, medium punch, omnidirectional.
- EQ_WEAPON_TWIN_PLASMA_CANNON: Plasma balls, slowly firing, low range, low punch.
All these weapons are handled as equipment. You can fit them as an equipment on any entity (including sub-entities) using the shipdata.plist-keys forward_weapon_type and aft_weapon_type. It is completely your choice which of these weapons you will fit on which entity. And none of them is a turret.
And then there is something completely unrelated. It is called plasma turret (or in short simply turret). From the coding perspective it is not a weapon, because it isn't assigned to any entity as a weapon. It is not an equipment. You cannot make it a forward_weapon or aft_weapon. So it is not comparable to any of the aforementioned. It only borrows the plasma balls (appearance again, which can in this case deceive) from the EQ_WEAPON_TWIN_PLASMA_CANNON. Instead you may think of it as a package from a completely different factory, which works completely differently. Instead of assigning it as a weapon, it comes packaged in a subentity with special pre-defined behaviour. Any subentity of your liking gets converted into a turret by inserting the initialiseTurret-method into the setup_actions in its shipdata entry. Its model doesn't need to look like a turret. It doesn't need (or even be able) to turn (and it won't if you don't define its pitch and roll etc. accordingly). If you initialise it as a turret, it will be a turret.
Again: Although the turret's ammunition looks like that of EQ_WEAPON_TWIN_PLASMA_CANNON, and its firing range and punch are the same, it is not in any way related to the weapon (which still is an equipment piece). The turret is a completely independent thing, whose characteristics (except again colour and (I think) punch of the plasma balls) cannot be changed. Specifically the plasma balls cannot be exchanged with anything else, notably not with a laser beam.
Yes, completely unlike, because an EQ_WEAPON_THARGOID_LASER is simply one of the six pre-defined weapons. You assign it to an entity of your liking as forward_weapon_type and aft_weapon_type.So unlike a thargoid laser then?Something that Oolite would recognize as a turret (and for instance turn in the direction of its target) will never fire a beam of light, but only plasma balls.
No, because it is a piece of equipment like all other weapons, which is simply assigned using the forward_weapon_type and aft_weapon_type keys.But this bit:Is the clarification - initialise-turret is for plasma turrets. The "omnidirectional laser" commented in the source code does not use this.And only for this thingamajig which fires plasma balls you need the initialiseTurret-method. Never for anything that is supposed to fire beams of light.
I have a stretchable comfort-zone, don't worry. No, the problem is that you are using the term different from how Oolite uses it. For Oolite a turret is any entity that is initialised as a turret, and therefore will behave in a pre-defined way (firing plasma balls at the current target of its mother, covering roughly a 180° angle). Oolite doesn't care at all about the model, what it looks like, whether it turns, or whether it has a muzzle. In short: Contrary to what you and I would associate with a turret, it's not the looks which define a turret, but it's pre-defined special behaviour characteristics.Personally I am using the terms a tad loosely for your comfort?
To me, a turret is the model that turns, it has a muzzle that shoots stuff. Anything which looks like that is a turret.
No, it turns a subentity into a turret (= something that fires plasma balls at its mother's current target, provided this target is in firing range and at a sufficient angle). Nowhere in this process is it armed with a EQ_WEAPON_TWIN_PLASMA_CANNON.You have explained that initialise-turret is what makes a model orient its z-axis to a target, and arms it with a plasma cannon.
Yes. If you assign EQ_WEAPON_TWIN_PLASMA_CANNON as a weapon to an entity, that entity will have it as a weapon. And this isn't a turret.I understand that it is possible to specify forward_weapon_type="WEAPON_PLASMA_GUN"; to give a unidirectional plasma cannon... eg. not a turret.