(NEW RELEASE)MilitaryTargettingSystemv1.oxp for 1.76+

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

Moderators: another_commander, winston

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: (NEW RELEASE)MilitaryTargettingSystemv1.oxp for 1.76+

Post by Rese249er »

I've noticed an odd interaction between this OXP and the BETA Cargo Spotter OXP. When Cargo Spotter is active, the salvage targeting simply doesn't work. No idea why; maybe you can hash it out?

It annoys me because the CargoSpotter doesn't light up bright enough for me to see the cargo, unless I'm extremely close range.
Got all turned around, lost my nav connection... Where am I now?
User avatar
CommonSenseOTB
---- E L I T E ----
---- E L I T E ----
Posts: 1397
Joined: Wed May 04, 2011 10:42 am
Location: Saskatchewan, Canada

Re: (NEW RELEASE)MilitaryTargettingSystemv1.oxp for 1.76+

Post by CommonSenseOTB »

Rese249er wrote:
I've noticed an odd interaction between this OXP and the BETA Cargo Spotter OXP. When Cargo Spotter is active, the salvage targeting simply doesn't work. No idea why; maybe you can hash it out?

It annoys me because the CargoSpotter doesn't light up bright enough for me to see the cargo, unless I'm extremely close range.
Not sure about that one. The next version will have something (similar? :) ) for all target types built into it...probably...I'll have a look at the code for cargo spotter again and see if I can spot anything.
Take an idea from one person and twist or modify it in a different way as a return suggestion so another person can see a part of it that can apply to the oxp they are working on.


CommonSense 'Outside-the-Box' Design Studios Ltd.
WIKI+OXPs
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6311
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: (NEW RELEASE)MilitaryTargettingSystemv1.oxp for 1.76+

Post by Diziet Sma »

Running 1.77 the following appears in my logs now and then:

Code: Select all

9:51:00.897 [script.javaScript.exception.notFunction]: ***** JavaScript exception (<unidentified script>): TypeError: entity.hasRole is not a function
09:51:00.897 [script.javaScript.exception.notFunction]:       AddOns/MilitaryTargettingSystemv1.oxp/Scripts/militarytargettingsystem.js, line 80.
09:51:27.358 [script.javaScript.exception.notFunction]: ***** JavaScript exception (<unidentified script>): TypeError: entity.hasRole is not a function
09:51:27.358 [script.javaScript.exception.notFunction]:       AddOns/MilitaryTargettingSystemv1.oxp/Scripts/militarytargettingsystem.js, line 104.
09:51:33.594 [script.javaScript.exception.notFunction]: ***** JavaScript exception (<unidentified script>): TypeError: entity.hasRole is not a function
09:51:33.594 [script.javaScript.exception.notFunction]:       AddOns/MilitaryTargettingSystemv1.oxp/Scripts/militarytargettingsystem.js, line 80.
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
User avatar
JazHaz
---- E L I T E ----
---- E L I T E ----
Posts: 2991
Joined: Tue Sep 22, 2009 11:07 am
Location: Enfield, Middlesex
Contact:

Re: (NEW RELEASE)MilitaryTargettingSystemv1.oxp for 1.76+

Post by JazHaz »

When I get destroyed in combat, I keep getting this message appearing on my debug console:

Code: Select all

Warning: removeFrameCallback(): invalid tracking ID.
    Active script: militarytargettingsystem 1.0
    militarytargettingsystem.js, line 177:
       removeFrameCallback(this.mtesnt2);//----------
It also appears in my log:

Code: Select all

14:04:53.164 [script.javaScript.warning.ooliteDefined]: ----- JavaScript warning (militarytargettingsystem 1.0): removeFrameCallback(): invalid tracking ID.
14:04:53.164 [script.javaScript.stackTrace]:  0 (militarytargettingsystem.js:177) <anonymous function>
14:04:53.164 [script.javaScript.stackTrace]:     this: [Script "militarytargettingsystem" version 1.0]
When this happened just now, I didn't have the MTS installed in my bounty hunter's cobra (yet). I do have it in my trader commander.

Edit: this is the JS script where the error is occurring:

Code: Select all

this.shipDied = function()
   {
   removeFrameCallback(this.mtesnt);//----------
   removeFrameCallback(this.mtesnt2);//----------
   }
The second removeFrameCallback is line 177. Looks fine to me though. CommonSense has not been on the BBS since February though. :( Can anyone suggest a fix?
JazHaz

Gimi wrote:
drew wrote:
£4,500 though! :shock: <Faints>
Cheers,
Drew.
Maybe you could start a Kickstarter Campaign to found your £4500 pledge. 8)
Thanks to Gimi, I got an eBook in my inbox tonight (31st May 2014 - Release of Elite Reclamation)!
User avatar
Commander McLane
---- E L I T E ----
---- 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: (NEW RELEASE)MilitaryTargettingSystemv1.oxp for 1.76+

Post by Commander McLane »

JazHaz wrote:
Edit: this is the JS script where the error is occurring:

Code: Select all

this.shipDied = function()
   {
   removeFrameCallback(this.mtesnt);//----------
   removeFrameCallback(this.mtesnt2);//----------
   }
The second removeFrameCallback is line 177. Looks fine to me though.
How fine it is depends entirely on the value of this.mtesnt2 at the time of executing the command. Obviously the variable doesn't contain the value it's supposed to. This can have a variety of reasons. For instance, the variable may not have been created properly previously. For instance, there could be a typo in the place where it's created. Or the variable is deleted before line 177 is reached.
User avatar
Tricky
---- E L I T E ----
---- E L I T E ----
Posts: 821
Joined: Sun May 13, 2012 11:12 pm
Location: Bradford, UK. (Anarchic)

Re: (NEW RELEASE)MilitaryTargettingSystemv1.oxp for 1.76+

Post by Tricky »

JazHaz wrote:
When I get destroyed in combat, I keep getting this message appearing on my debug console:

Code: Select all

Warning: removeFrameCallback(): invalid tracking ID.
    Active script: militarytargettingsystem 1.0
    militarytargettingsystem.js, line 177:
       removeFrameCallback(this.mtesnt2);//----------
It also appears in my log:

Code: Select all

14:04:53.164 [script.javaScript.warning.ooliteDefined]: ----- JavaScript warning (militarytargettingsystem 1.0): removeFrameCallback(): invalid tracking ID.
14:04:53.164 [script.javaScript.stackTrace]:  0 (militarytargettingsystem.js:177) <anonymous function>
14:04:53.164 [script.javaScript.stackTrace]:     this: [Script "militarytargettingsystem" version 1.0]
When this happened just now, I didn't have the MTS installed in my bounty hunter's cobra (yet). I do have it in my trader commander.

Edit: this is the JS script where the error is occurring:

Code: Select all

this.shipDied = function()
   {
   removeFrameCallback(this.mtesnt);//----------
   removeFrameCallback(this.mtesnt2);//----------
   }
The second removeFrameCallback is line 177. Looks fine to me though. CommonSense has not been on the BBS since February though. :( Can anyone suggest a fix?
I changed the script to this...

Code: Select all

this.shipTargetLost = function (target) {
    if (target && target.isValid && this.mtelasttarget && this.mtelasttarget.isValid) {
        this.mtelasttarget.scannerDisplayColor1 = this.mtelasttargetscannerdisplay1;
        this.mtelasttarget.scannerDisplayColor2 = this.mtelasttargetscannerdisplay2;
    }
}

this.shipDied = function () {
    if (isValidFrameCallback(this.mtesnt)) {
        removeFrameCallback(this.mtesnt);
    } //----------
    if (isValidFrameCallback(this.mtesnt2)) {
        removeFrameCallback(this.mtesnt2);
    } //----------
}
User avatar
Digital86
Competent
Competent
Posts: 34
Joined: Thu May 08, 2014 8:47 am

Re: (NEW RELEASE)MilitaryTargettingSystemv1.oxp for 1.76+

Post by Digital86 »

The device found a Escape Pod.
But she invisible, on a radar too it isn't visible.
It is impossible to catch in cargo
It is impossible to shoot
My English is very poor.
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6311
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: (NEW RELEASE)MilitaryTargettingSystemv1.oxp for 1.76+

Post by Diziet Sma »

Digital86 wrote:
The device found a Escape Pod.
But she invisible, on a radar too it isn't visible.
It is impossible to catch in cargo
It is impossible to shoot
That's a known bug with the [EliteWiki] Escape Pod Locator. It's survived many attempts to track it down and kill it. You can read all about it here:
https://bb.oolite.space/viewtopic.ph ... 62#p190862

Edit:
I've made a test-patch for the Escape Pod Locator, based on a suggestion by cim. The download link is in the above thread.
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
User avatar
Cholmondely
Archivist
Archivist
Posts: 4997
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: (NEW RELEASE)MilitaryTargettingSystemv1.oxp for 1.76+

Post by Cholmondely »

Wiki page now up: Military Targeting System

I'm just not capable of including the ttypo in the wiki page title!
Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
User avatar
Cmdr Wyvern
---- E L I T E ----
---- E L I T E ----
Posts: 1649
Joined: Tue Apr 11, 2006 1:47 am
Location: Somewhere in the great starry void

Re: (NEW RELEASE)MilitaryTargettingSystemv1.oxp for 1.76+

Post by Cmdr Wyvern »

CSOTB sure had a knack for making Oolite do magic it wasn't ready for, back in the day. (Many of his HUDs still look epic)

This oxp would be sorely showing it's age by now. There's newer oxps,

Telescope,
Target Filtering,
Target System Plugins,

come to mind, that does what this does and then some.
Running Oolite buttery smooth & rock stable w/ tons of eyecandy oxps on:
ASUS Prime X370-A
Ryzen 5 1500X
16GB DDR4 3200MHZ
128GB NVMe M.2 SSD (Boot drive)
1TB Hybrid HDD (For software and games)
EVGA GTX-1070 SC
1080P Samsung large screen monitor
Post Reply