Page 5 of 6
Re: [UPDATED RELEASE] - Police IFF Scanner Upgrade 1.2 (25/6
Posted: Sun Jul 10, 2011 6:16 pm
by Capt. Murphy
Nope.
Anyway got to go make dinner - Wildeblood can you advise if there was anything unusual going on in your game around that time?
Re: [UPDATED RELEASE] - Police IFF Scanner Upgrade 1.2 (25/6
Posted: Sun Jul 10, 2011 6:17 pm
by DaddyHoggy
Isn't a bugger when your reply is at the top of the next page and not the bottom of the previous...
Re: [UPDATED RELEASE] - Police IFF Scanner Upgrade 1.2 (25/6
Posted: Sun Jul 10, 2011 6:20 pm
by Wildeblood
Yep.
And my reply is back there, too.
Re: [UPDATED RELEASE] - Police IFF Scanner Upgrade 1.2 (25/6
Posted: Sun Jul 10, 2011 6:24 pm
by Capt. Murphy
Woah, back to front conversation.
Mmm - interstellar space may have something to do with it if it affects system.filteredEntities
.
What's Erewhon Station???
Re: [UPDATED RELEASE] - Police IFF Scanner Upgrade 1.2 (25/6
Posted: Sun Jul 10, 2011 6:26 pm
by Wildeblood
In the thread titled [WIP] Tionisla Reporter.
https://bb.oolite.space/viewtopic.php?f=4&t=10310
Oops! Spoiler alert! Naughty me, I've given the plot away.
Re: [UPDATED RELEASE] - Police IFF Scanner Upgrade 1.2 (25/6
Posted: Sun Jul 10, 2011 6:55 pm
by CommonSenseOTB
Capt. Murphy wrote:Woah, back to front conversation.
Mmm - interstellar space may have something to do with it if it affects system.filteredEntities
.
What's Erewhon Station???
Capt. Murphy, that is exactly the problem. Using
system.filteredEntities
to get information won't work in interstellar space. Looks like you'll need to patch or workaround it. Would have come up sooner or later when someone was in interstellar space and noticed. This has nothing to do with [WIP] Tionisla Reporter, just coincidence.
And yeah it's you fault for going into interstellar space Wildeblood. That'll learn ya!
Re: [UPDATED RELEASE] - Police IFF Scanner Upgrade 1.2 (25/6
Posted: Sun Jul 10, 2011 7:01 pm
by Wildeblood
CommonSenseOTB wrote:This has nothing to do with [WIP] Tionisla Reporter, just coincidence.
And yeah it's you fault for going into interstellar space Wildeblood. That'll learn ya!
I'll have your apology on good-quality paper, suitable for framing, thanks. I was on a top-secret mission for the Tionisla Chronicle. I don't just jump into interstellar space for fun, you know.
Re: [UPDATED RELEASE] - Police IFF Scanner Upgrade 1.2 (25/6
Posted: Sun Jul 10, 2011 7:11 pm
by Cody
Wildeblood wrote:I don't just jump into interstellar space for fun, you know.
I do... regularly.
Re: [UPDATED RELEASE] - Police IFF Scanner Upgrade 1.2 (25/6
Posted: Mon Jul 11, 2011 6:09 am
by Capt. Murphy
I'm flummoxed.
It's not a general problem with interstellar space. I added some extra logging to the script and misjumped, ran away from the thargs, hung out with some Generation ships for a while, and then used debug console to spawn a station and hung around with it for 10 minutes. The logging showed the script working as expected. If there is nothing found it simply returns an empty array.
There are also a couple of OXP's that are specifically set in interstellar space that use
system.filteredEntities
(McLanes Wormhole Restoration for example).
I've also been to Erehwon - again no problems and I can't recreate the errors shown in Wildebloods log.
Wildeblood - could you post the beginnings of your latest log to see what else you've got installed. Also can you delete Police Scanner Upgrade entirely, redownload it and see if you can recreate the error.
I'm sure there is nothing wrong with the script.
The relevant bit of code is below. Looking at Wildebloods log the script seems to be hanging on
Code: Select all
function psu_findshipswithbounty(entity)
{
return (entity.scanClass == "CLASS_NEUTRAL" && entity.bounty != 0);
}
as targets is not being declared as an empty array according to the error log.
Can any of the scripter's out there tell me if I'm doing something stupid?
Code: Select all
// caller by timer every 0.25 seconds when player is on yellow or red alert to identify ships within scanner range with a bounty and apply custom scanner colours depending on whether they are currently hostile to player or not.
this.psu_updatescanner = function()
{
if (worldScripts["targetAutolock"] && missionVariables.targetAutolock == "TRUE")
{this.psu_targetAutolockupdatescanner();} // calls alternative function when Target Autolock is installed and active.
else
{
function psu_findshipswithbounty(entity)
{
return (entity.scanClass == "CLASS_NEUTRAL" && entity.bounty != 0);
}
var targets = system.filteredEntities(this, psu_findshipswithbounty, player.ship, player.ship.scannerRange);
log(this.name,targets);
if (targets.length > 0)
{
let counter = 0;
for (counter = 0; counter < targets.length;counter++)
{
if (targets[counter].hasHostileTarget && targets[counter].target == player.ship && player.alertHostiles)
{
this.psu_hostilecustomscannercolours (targets[counter]);
}
else
{
this.psu_assigncustomscannercolours (targets[counter]);
}
}
}
}
}
edit to add - I'm testing on trunk 1.75.3.4568 still.
Re: [UPDATED RELEASE] - Police IFF Scanner Upgrade 1.2 (25/6
Posted: Mon Jul 11, 2011 7:38 am
by Wildeblood
Capt. Murphy wrote:Wildeblood - could you post the beginnings of your latest log to see what else you've got installed.
Not a chance. You just want to see if I've got your breakable equipment scripts.
The relevant bit of code is below. Looking at Wildebloods log the script seems to be hanging on
Code: Select all
function psu_findshipswithbounty(entity)
{
return (entity.scanClass == "CLASS_NEUTRAL" && entity.bounty != 0);
}
as targets is not being declared as an empty array according to the error log.
Can any of the scripter's out there tell me if I'm doing something stupid?
Apart from using a greengrocer's apostrophe, no.
Sorry for causing a fuss. Looking at it with my daytime brain, not my 3 a.m. brain, I know what has happened here. There is nothing wrong with your script. I could name the culprit (it wasn't me), but I'll PM you later instead, Capt. Murphy.
Re: [UPDATED RELEASE] - Police IFF Scanner Upgrade 1.2 (25/6
Posted: Thu Jul 14, 2011 6:24 am
by Capt. Murphy
Just in case any one is wondering I've tried (extensively) to recreate Wildeblood's error and failed to do so.
But I had fun trying. How's this for a furball...in interstellar space with the help of some debug console spawned ships....no errors from Police Scanner, but my frame rate was 2
...
I got bored after 5 minutes or so and set a cat amongst the pigeons.
Ooh pretty lights....
And about 2 minutes later the last pop...
Re: [UPDATED RELEASE] - Police IFF Scanner Upgrade 1.2 (25/6
Posted: Thu Jul 14, 2011 9:06 am
by Ironfist
Capt Murphy,
While testing the Wyverns yesterday I had Police IFF Scanner installed and did Tionsla Reporter with no problems what ever.
Re: [UPDATED RELEASE] - Police IFF Scanner Upgrade 1.3 (24/9
Posted: Sat Sep 24, 2011 9:39 am
by Capt. Murphy
Belated thanks for that testing Ironfist!
Version 1.3 has been uploaded. I noticed that I hadn't coded properly to consistently reset scanner colours if the Police Scanner was damaged - is now fixed. First post updated.
Re: [UPDATED RELEASE]-Police IFF Scanner 1.3.1 (18/12/11)
Posted: Sun Dec 18, 2011 10:56 am
by Capt. Murphy
Version 1.3.1 is available for download. See first post for readme and download link.
Version 1.3.1 18/12/11 – Minor update. Code is now compliant with JavaScript strict mode. Fugitives now have orange/magenta lollipop colours to differentiate them slightly from hired guns.
Re: [UPDATED RELEASE]-Police IFF Scanner 1.3.1 (18/12/11)
Posted: Fri Sep 21, 2012 10:34 am
by Tichy
I thought about a suggestion. Is it possible insert a delay? As if you were querying the criminals database of the main station.
The delay may vary randomly or according to the distance from the station. I think this could make this OXP a little less facilitative, forcing you to decide whether the risk of being attacked while waiting for their identification, or escape. The delay should be calibrated in order to maintain the usefulness of the scanner, while making it a little less immediate.