[Updated Release] Turret Toggler 1.1
Moderators: winston, another_commander
[Updated Release] Turret Toggler 1.1
Since the introduction of the semi AI plasma turret technology, the mounting of such plasma turrets has become increasingly popular. No longer are they exclusive domain of carriers, frigates and similar large craft. The technology has been miniaturized in so much that even fighter class craft have been fitted with these plasma turrets. But something seemed missing, something so simple that it was surprising it was overlooked. It was the uncontrollable and unsafe nature of the these plasma turrets being always on all the time. This has lead to numerous friendly fire incidents resulting in destruction of property, loss of life and otherwise innocent commanders being tagged fugitives because of a design flaw in the implementation of this plasma turret technology.
But no more!
Solonar of Esceso, having spotted this seeming oversight early on, devoted his time and resources from his personal assets to develop a technology to improve the safety and controlability of the semi AI plasma turret technology. The first prototype of this device was installed and tested on a modified Fer de Lance 3G+, the Wayward, and seeing the possibilities of the application of so simple an innovation, he improved on the device until it was ready for final release. Thus was the founding of what has come to be known as SolarTech Industries. SolarTech, operating out of a refitted dodec station in Esceso space, now holds the GalCop patent for the Plasma Turret Regulator Device Apparatus, otherwise known as the Turret Toggler, is the sole producer of the Turret Toggler and at the time of this printing is dedicated only to producing the Turret Toggler.
I acknowledge Thargoid as this script is a modified version of his Vortex turret toggle script.
Turret Toggler 1.1
But no more!
Solonar of Esceso, having spotted this seeming oversight early on, devoted his time and resources from his personal assets to develop a technology to improve the safety and controlability of the semi AI plasma turret technology. The first prototype of this device was installed and tested on a modified Fer de Lance 3G+, the Wayward, and seeing the possibilities of the application of so simple an innovation, he improved on the device until it was ready for final release. Thus was the founding of what has come to be known as SolarTech Industries. SolarTech, operating out of a refitted dodec station in Esceso space, now holds the GalCop patent for the Plasma Turret Regulator Device Apparatus, otherwise known as the Turret Toggler, is the sole producer of the Turret Toggler and at the time of this printing is dedicated only to producing the Turret Toggler.
I acknowledge Thargoid as this script is a modified version of his Vortex turret toggle script.
Turret Toggler 1.1
Last edited by Solonar on Thu Jan 31, 2013 11:42 pm, edited 5 times in total.
Re: [Test Release] Universal Turret Switcher
Updated to version 0.02. Added docking event handler scripts to correct maintenance offers for missing sub-entities.
Universal Turret Switcher 0.02
Universal Turret Switcher 0.02
- Rese249er
- ---- E L I T E ----
- Posts: 647
- Joined: Thu Jun 07, 2012 2:19 pm
- Location: Well, I WAS in G3...
Re: [Test Release] Universal Turret Switcher
A note to be made: using this switcher also resets the turret's rate of fire and (I'm guessing) firepower to some default value.
Got all turned around, lost my nav connection... Where am I now?
Re: [Release] Universal Turret Switcher 1.0
Updated to 1.0 - Final release, corrected some typos, works as advertised.
The switcher works as advertised and should be practically usable on most ships using turrets. I do not know how to view changes to turret strength of fire or rate of fire and so I cannot verify if the switcher alters these settings. It seems to be ok with the ships I tested: Fer-de-Lance 3G+(t), Dark Rainbow and Takina CX1. These tests were done using 1.76.1 alpha release.
Universal Turret Switcher 1.0
The switcher works as advertised and should be practically usable on most ships using turrets. I do not know how to view changes to turret strength of fire or rate of fire and so I cannot verify if the switcher alters these settings. It seems to be ok with the ships I tested: Fer-de-Lance 3G+(t), Dark Rainbow and Takina CX1. These tests were done using 1.76.1 alpha release.
Universal Turret Switcher 1.0
-
- ---- E L I T E ----
- Posts: 1248
- Joined: Sat Sep 12, 2009 11:58 pm
- Location: Essex (mainly industrial and occasionally anarchic)
Re: [Release] Universal Turret Switcher 1.0
This is a good idea! Downloading!
EDIT: might I suggest 'turret toggler' for the OXP's name? That name has these advantages: (1) alliteration; (2) it carries slightly less than does 'turret switcher' the false connotation that one can use the OXP to switch between turrets. (You yourself have the following text, already, in the ReadMe: 'Once installed this becomes a primable piece of equipment that toggles on and off the ship's turrets. )
EDIT: might I suggest 'turret toggler' for the OXP's name? That name has these advantages: (1) alliteration; (2) it carries slightly less than does 'turret switcher' the false connotation that one can use the OXP to switch between turrets. (You yourself have the following text, already, in the ReadMe: 'Once installed this becomes a primable piece of equipment that toggles on and off the ship's turrets. )
Re: [Release] Turret Toggler 1.0
My thanks for the compliment and also for the name suggestion. I rather like the sound of that.
Turret Toggler 1.0 - Cosmetic name change only. All other functioning remains unchanged. Link to the renamed Turret Toggler found in the original post.
Turret Toggler 1.0 - Cosmetic name change only. All other functioning remains unchanged. Link to the renamed Turret Toggler found in the original post.
Re: [Release] Turret Toggler 1.0
Updated to version 1.1: Made the equipment removable through the ship outfitter. Raised tech level and price to fit into the grand scheme of the Ooniverse.
Link found in the original post.
Link found in the original post.
Re: [Updated Release] Turret Toggler 1.1
Hey, this is cool! But why is this not on the [wiki]OXP List[/wiki]
Mind if I add it?
EDIT:
I just tested it and had a look at your source code, and I've got a few suggestions ( ):
In order to prevent that all subentities get automagically repaired when toggling the guns on/off, you could check if a subentity is a turret or not and only activate / deactivate the subentity if that is the case. This could be done for example by checking if it's string-representation contains the string "turret", and perhaps there is even a better way that I don't know of. I made a quick check by adding the following line to your
which lead to the following output in my logfile (my test-ship is a Falcon-S)
You could even check if the turret is already destroyed and skip it if so. I really like the possibility to toggle the turrets on/off, but in my opinion it would be cooler without these side effects
Apart from that, very nice work, and excellent idea!
Mind if I add it?
EDIT:
I just tested it and had a look at your source code, and I've got a few suggestions ( ):
In order to prevent that all subentities get automagically repaired when toggling the guns on/off, you could check if a subentity is a turret or not and only activate / deactivate the subentity if that is the case. This could be done for example by checking if it's string-representation contains the string "turret", and perhaps there is even a better way that I don't know of. I made a quick check by adding the following line to your
this.turretToggle = function()
:
Code: Select all
for(subCounter = player.ship.subEntities.length - 1;subCounter>=0;subCounter--)
{ log("Turret Toggler", "found subentity: " + player.ship.subEntities[subCounter]);
player.ship.subEntities[subCounter].remove(); }
}
Code: Select all
01:13:13.851 [Turret Toggler]: found subentity: [Ship "bweed-falcon-gun" position: (0, 0, 0) (subentity)]
01:13:29.537 [Turret Toggler]: found subentity: [Ship "bweed-falcon-turret" position: (0, -6, -9.5) (turret)]
01:13:29.537 [Turret Toggler]: found subentity: [Ship "bweed-falcon-turret" position: (0, 6.5, -9.5) (turret)]
01:13:29.537 [Turret Toggler]: found subentity: [Ship "bweed-falcon-scoop" position: (0, 0, 0) (subentity)]
01:13:29.538 [Turret Toggler]: found subentity: [Ship "bweed-falcon-vents" position: (0, 0, 0) (subentity)]
01:13:29.538 [Turret Toggler]: found subentity: [Ship "bweed-falcon-dish" position: (0, 0, 0) (subentity)]
01:13:29.538 [Turret Toggler]: found subentity: [Ship "bweed-falcon-gun" position: (0, 0, 0) (subentity)]
01:13:29.538 [Turret Toggler]: found subentity: [Ship "bweed-falcon-airlock-r" position: (0, 0, 0) (subentity)]
01:13:29.539 [Turret Toggler]: found subentity: [Ship "bweed-falcon-airlock-l" position: (0, 0, 0) (subentity)]
Apart from that, very nice work, and excellent idea!
忍 knowing that enough is enough, you'll always have enough.
Running Oolite 1.77 on Ubuntu Linux 12.04 LTS
Running Oolite 1.77 on Ubuntu Linux 12.04 LTS
Re: [Updated Release] Turret Toggler 1.1
Thank you! And thank you for your suggestions. I will try them out later when I have some more time to spare. I also thank you for your offer to add this to the OXP list, but I have already done that earlier today.
Re: [Updated Release] Turret Toggler 1.1
Whoops I should really get into the habit to refresh a page when I think that something is missing....Solonar wrote:I also thank you for your offer to add this to the OXP list, but I have already done that earlier today.
I even (at least once) made an edit to an older version because I did not refresh it first. *bashes his head*
Sorry!! And thanks again for that oxp!
忍 knowing that enough is enough, you'll always have enough.
Running Oolite 1.77 on Ubuntu Linux 12.04 LTS
Running Oolite 1.77 on Ubuntu Linux 12.04 LTS
-
- ---- E L I T E ----
- Posts: 1248
- Joined: Sat Sep 12, 2009 11:58 pm
- Location: Essex (mainly industrial and occasionally anarchic)
Re: [Test Release] Universal Turret Switcher
Dear Solonar
I am curious about the following. Does the necessity for that addition owe to the bug - seemingly still present in 1.77 - that allows what are supposed to be non-frangible entities to get shot off, i.e. the problem that has meant that my Fer-de-Lance 3Gs have to have a script that repeatedly restores their turrets (when they have them)?Solonar wrote:Updated to version 0.02. Added docking event handler scripts to correct maintenance offers for missing sub-entities.
Re: [Test Release] Universal Turret Switcher
UK_Eliter wrote:Dear Solonar
I am curious about the following. Does the necessity for that addition owe to the bug - seemingly still present in 1.77 - that allows what are supposed to be non-frangible entities to get shot off, i.e. the problem that has meant that my Fer-de-Lance 3Gs have to have a script that repeatedly restores their turrets (when they have them)?Solonar wrote:Updated to version 0.02. Added docking event handler scripts to correct maintenance offers for missing sub-entities.
It is my understanding that any ships making use of frangible entities, including the plasma turrets, are frangible true by default. When using your Fer de Lance 3G+(t) for my prototype, and then later with a Dark Rainbow and a Takinia CX-1, I had to insert a frangible false line into their ship data plist. When I was using the Fer de Lance 3G+(t), I made it frangible false and removed your turret hack script entirely with no problems and the script no longer served a purpose.
The dock handler event was added later because when docking during a state of the Turret Toggler being off, i.e. the turret sub-entities being removed, I was prompted for the Maintenance Overhaul with the ship outfitter. It skewed if the ship was in genuine need of maintenance. If one docks with the turrets off, removed, the script restores them while docked to prevent the Maintenance Overhaul offer for missing sub-entities, and then removes them again on station depature as part of the script.
-
- ---- E L I T E ----
- Posts: 1248
- Joined: Sat Sep 12, 2009 11:58 pm
- Location: Essex (mainly industrial and occasionally anarchic)
Re: [Test Release] Universal Turret Switcher
Thanks for the reply. But I think I haveSolonar wrote:When using your Fer de Lance 3G+(t) for my prototype, and then later with a Dark Rainbow and a Takinia CX-1, I had to insert a frangible false line into their ship data plist. When I was using the Fer de Lance 3G+(t), I made it frangible false and removed your turret hack script entirely with no problems and the script no longer served a purpose.
Code: Select all
frangible = no;
PS: Takinia? I haven't heard of that - and searches don't seem to reveal it.
Re: [Updated Release] Turret Toggler 1.1
Sorry, that was a typo. Takinia should read Takina and comes from the Koneko Industries v2 Beta 1 OXP.
I don't know anything about documented frangible bugs. The Fer de Lance 3G has the frangible no in it and the turrets never broke on me. I even removed your turret hack script because it was unnecessary. I did have to make the Takina frangible false though as it did not exist in the shipdata plist as distributed.
I don't know anything about documented frangible bugs. The Fer de Lance 3G has the frangible no in it and the turrets never broke on me. I even removed your turret hack script because it was unnecessary. I did have to make the Takina frangible false though as it did not exist in the shipdata plist as distributed.
- Diziet Sma
- ---- E L I T E ----
- Posts: 6312
- Joined: Mon Apr 06, 2009 12:20 pm
- Location: Aboard the Pitviper S.E. "Blackwidow"
Re: [Test Release] Universal Turret Switcher
For my Falcon-S, I set:UK_Eliter wrote:Thanks for the reply. But I think I haveSolonar wrote:When using your Fer de Lance 3G+(t) for my prototype, and then later with a Dark Rainbow and a Takinia CX-1, I had to insert a frangible false line into their ship data plist. When I was using the Fer de Lance 3G+(t), I made it frangible false and removed your turret hack script entirely with no problems and the script no longer served a purpose.
in the relevant parts of my shipdata already; and yet, even in Oolite 1.77, the turrets can get shot off - as was/is, I recall, a documented bug.Code: Select all
frangible = no;
Code: Select all
<key>frangible</key>
<false/>
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied