[Updated Release] Turret Toggler 1.1

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

Moderators: another_commander, winston

User avatar
Solonar
Deadly
Deadly
Posts: 174
Joined: Sun Dec 04, 2011 4:04 am
Location: Galaxy 2 - Space Truckin

[Updated Release] Turret Toggler 1.1

Post by Solonar »

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
Last edited by Solonar on Thu Jan 31, 2013 11:42 pm, edited 5 times in total.
Image

SolarTech proudly presents the Plasma Turret Regulator Device Apparatus, aka the Turret Toggler

User avatar
Solonar
Deadly
Deadly
Posts: 174
Joined: Sun Dec 04, 2011 4:04 am
Location: Galaxy 2 - Space Truckin

Re: [Test Release] Universal Turret Switcher

Post by Solonar »

Updated to version 0.02. Added docking event handler scripts to correct maintenance offers for missing sub-entities.


Universal Turret Switcher 0.02
Image

SolarTech proudly presents the Plasma Turret Regulator Device Apparatus, aka the Turret Toggler

User avatar
Rese249er
---- E L I T E ----
---- 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

Post by Rese249er »

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?

User avatar
Solonar
Deadly
Deadly
Posts: 174
Joined: Sun Dec 04, 2011 4:04 am
Location: Galaxy 2 - Space Truckin

Re: [Release] Universal Turret Switcher 1.0

Post by Solonar »

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
Image

SolarTech proudly presents the Plasma Turret Regulator Device Apparatus, aka the Turret Toggler

UK_Eliter
---- E L I T E ----
---- E L I T E ----
Posts: 1106
Joined: Sat Sep 12, 2009 11:58 pm
Location: Essex (mainly industrial and occasionally anarchic)

Re: [Release] Universal Turret Switcher 1.0

Post by UK_Eliter »

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. )

User avatar
Solonar
Deadly
Deadly
Posts: 174
Joined: Sun Dec 04, 2011 4:04 am
Location: Galaxy 2 - Space Truckin

Re: [Release] Turret Toggler 1.0

Post by Solonar »

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.
Image

SolarTech proudly presents the Plasma Turret Regulator Device Apparatus, aka the Turret Toggler

User avatar
Solonar
Deadly
Deadly
Posts: 174
Joined: Sun Dec 04, 2011 4:04 am
Location: Galaxy 2 - Space Truckin

Re: [Release] Turret Toggler 1.0

Post by Solonar »

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.
Image

SolarTech proudly presents the Plasma Turret Regulator Device Apparatus, aka the Turret Toggler

User avatar
GGShinobi
---- E L I T E ----
---- E L I T E ----
Posts: 291
Joined: Tue Dec 25, 2012 7:20 pm

Re: [Updated Release] Turret Toggler 1.1

Post by GGShinobi »

Hey, this is cool! 8) 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 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(); }
    }
which lead to the following output in my logfile (my test-ship is a Falcon-S)

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)]
:!: 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! 8)
忍 knowing that enough is enough, you'll always have enough.

Running Oolite 1.77 on Ubuntu Linux 12.04 LTS

User avatar
Solonar
Deadly
Deadly
Posts: 174
Joined: Sun Dec 04, 2011 4:04 am
Location: Galaxy 2 - Space Truckin

Re: [Updated Release] Turret Toggler 1.1

Post by Solonar »

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.
Image

SolarTech proudly presents the Plasma Turret Regulator Device Apparatus, aka the Turret Toggler

User avatar
GGShinobi
---- E L I T E ----
---- E L I T E ----
Posts: 291
Joined: Tue Dec 25, 2012 7:20 pm

Re: [Updated Release] Turret Toggler 1.1

Post by GGShinobi »

Solonar wrote:I also thank you for your offer to add this to the OXP list, but I have already done that earlier today.
Whoops :oops: I should really get into the habit to refresh a page when I think that something is missing....
I even (at least once) made an edit to an older version because I did not refresh it first. :x *bashes his head*
Sorry!! And thanks again for that oxp! :P
忍 knowing that enough is enough, you'll always have enough.

Running Oolite 1.77 on Ubuntu Linux 12.04 LTS

UK_Eliter
---- E L I T E ----
---- E L I T E ----
Posts: 1106
Joined: Sat Sep 12, 2009 11:58 pm
Location: Essex (mainly industrial and occasionally anarchic)

Re: [Test Release] Universal Turret Switcher

Post by UK_Eliter »

Dear Solonar
Solonar wrote:Updated to version 0.02. Added docking event handler scripts to correct maintenance offers for missing sub-entities.
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)?

User avatar
Solonar
Deadly
Deadly
Posts: 174
Joined: Sun Dec 04, 2011 4:04 am
Location: Galaxy 2 - Space Truckin

Re: [Test Release] Universal Turret Switcher

Post by Solonar »

UK_Eliter wrote:Dear Solonar
Solonar wrote:Updated to version 0.02. Added docking event handler scripts to correct maintenance offers for missing sub-entities.
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)?

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.
Image

SolarTech proudly presents the Plasma Turret Regulator Device Apparatus, aka the Turret Toggler

UK_Eliter
---- E L I T E ----
---- E L I T E ----
Posts: 1106
Joined: Sat Sep 12, 2009 11:58 pm
Location: Essex (mainly industrial and occasionally anarchic)

Re: [Test Release] Universal Turret Switcher

Post by UK_Eliter »

Solonar 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.
Thanks for the reply. But I think I have

Code: Select all

frangible = no;
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.

PS: Takinia? I haven't heard of that - and searches don't seem to reveal it.

User avatar
Solonar
Deadly
Deadly
Posts: 174
Joined: Sun Dec 04, 2011 4:04 am
Location: Galaxy 2 - Space Truckin

Re: [Updated Release] Turret Toggler 1.1

Post by Solonar »

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.
Image

SolarTech proudly presents the Plasma Turret Regulator Device Apparatus, aka the Turret Toggler

User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6310
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: [Test Release] Universal Turret Switcher

Post by Diziet Sma »

UK_Eliter wrote:
Solonar 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.
Thanks for the reply. But I think I have

Code: Select all

frangible = no;
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.
For my Falcon-S, I set:

Code: Select all

<key>frangible</key>
<false/>
And have had no problems in 1.76 or 1.77.
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

Post Reply