Join us at the Oolite Anniversary Party -- London, 7th July 2024, 1pm
More details in this thread.

[UPDATED RELEASE]-Police IFF Scanner 1.3.1 (18/12/11)

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

Moderators: another_commander, winston

User avatar
Capt. Murphy
Commodore
Commodore
Posts: 1127
Joined: Fri Feb 25, 2011 8:46 am
Location: UK South Coast.

Re: [UPDATED RELEASE] - Police IFF Scanner Upgrade 1.2 (25/6

Post 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?
Last edited by Capt. Murphy on Sun Jul 10, 2011 6:21 pm, edited 1 time in total.
[EliteWiki] Capt. Murphy's OXPs
External JavaScript resources - W3Schools & Mozilla Developer Network
Win 7 64bit, Intel Core i5 with HD3000 (driver rev. 8.15.10.2696 - March 2012), Oolite 1.76.1
User avatar
DaddyHoggy
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 8501
Joined: Tue Dec 05, 2006 9:43 pm
Location: Newbury, UK
Contact:

Re: [UPDATED RELEASE] - Police IFF Scanner Upgrade 1.2 (25/6

Post by DaddyHoggy »

Capt. Murphy wrote:
Nope.
Isn't a bugger when your reply is at the top of the next page and not the bottom of the previous... :wink:
Selezen wrote:
Apparently I was having a DaddyHoggy moment.
Oolite Life is now revealed here
User avatar
Wildeblood
---- E L I T E ----
---- E L I T E ----
Posts: 2290
Joined: Sat Jun 11, 2011 6:07 am
Location: Western Australia

Re: [UPDATED RELEASE] - Police IFF Scanner Upgrade 1.2 (25/6

Post by Wildeblood »

Yep.

And my reply is back there, too.
User avatar
Capt. Murphy
Commodore
Commodore
Posts: 1127
Joined: Fri Feb 25, 2011 8:46 am
Location: UK South Coast.

Re: [UPDATED RELEASE] - Police IFF Scanner Upgrade 1.2 (25/6

Post 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???
[EliteWiki] Capt. Murphy's OXPs
External JavaScript resources - W3Schools & Mozilla Developer Network
Win 7 64bit, Intel Core i5 with HD3000 (driver rev. 8.15.10.2696 - March 2012), Oolite 1.76.1
User avatar
Wildeblood
---- E L I T E ----
---- E L I T E ----
Posts: 2290
Joined: Sat Jun 11, 2011 6:07 am
Location: Western Australia

Re: [UPDATED RELEASE] - Police IFF Scanner Upgrade 1.2 (25/6

Post 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.
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: [UPDATED RELEASE] - Police IFF Scanner Upgrade 1.2 (25/6

Post 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. :wink:

And yeah it's you fault for going into interstellar space Wildeblood. That'll learn ya! :P
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
Wildeblood
---- E L I T E ----
---- E L I T E ----
Posts: 2290
Joined: Sat Jun 11, 2011 6:07 am
Location: Western Australia

Re: [UPDATED RELEASE] - Police IFF Scanner Upgrade 1.2 (25/6

Post by Wildeblood »

CommonSenseOTB wrote:
This has nothing to do with [WIP] Tionisla Reporter, just coincidence. :wink:

And yeah it's you fault for going into interstellar space Wildeblood. That'll learn ya! :P
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.
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16063
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: [UPDATED RELEASE] - Police IFF Scanner Upgrade 1.2 (25/6

Post by Cody »

Wildeblood wrote:
I don't just jump into interstellar space for fun, you know.
I do... regularly.
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
User avatar
Capt. Murphy
Commodore
Commodore
Posts: 1127
Joined: Fri Feb 25, 2011 8:46 am
Location: UK South Coast.

Re: [UPDATED RELEASE] - Police IFF Scanner Upgrade 1.2 (25/6

Post 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.
[EliteWiki] Capt. Murphy's OXPs
External JavaScript resources - W3Schools & Mozilla Developer Network
Win 7 64bit, Intel Core i5 with HD3000 (driver rev. 8.15.10.2696 - March 2012), Oolite 1.76.1
User avatar
Wildeblood
---- E L I T E ----
---- E L I T E ----
Posts: 2290
Joined: Sat Jun 11, 2011 6:07 am
Location: Western Australia

Re: [UPDATED RELEASE] - Police IFF Scanner Upgrade 1.2 (25/6

Post 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.
User avatar
Capt. Murphy
Commodore
Commodore
Posts: 1127
Joined: Fri Feb 25, 2011 8:46 am
Location: UK South Coast.

Re: [UPDATED RELEASE] - Police IFF Scanner Upgrade 1.2 (25/6

Post 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 :wink: ...

Image

Image

I got bored after 5 minutes or so and set a cat amongst the pigeons.

Image

Ooh pretty lights....

Image

And about 2 minutes later the last pop...

Image
[EliteWiki] Capt. Murphy's OXPs
External JavaScript resources - W3Schools & Mozilla Developer Network
Win 7 64bit, Intel Core i5 with HD3000 (driver rev. 8.15.10.2696 - March 2012), Oolite 1.76.1
User avatar
Ironfist
Commander
Commander
Posts: 218
Joined: Tue Jun 28, 2011 2:16 pm
Location: London

Re: [UPDATED RELEASE] - Police IFF Scanner Upgrade 1.2 (25/6

Post by Ironfist »

Capt Murphy,

While testing the Wyverns yesterday I had Police IFF Scanner installed and did Tionsla Reporter with no problems what ever.
64bit Mint 10 and Win 8 64bit on E8400 at 3.6GHz - ATI HD5750 graphics.
Concentration is the ability to think of absolutely nothing when it is absolutely necessary.
User avatar
Capt. Murphy
Commodore
Commodore
Posts: 1127
Joined: Fri Feb 25, 2011 8:46 am
Location: UK South Coast.

Re: [UPDATED RELEASE] - Police IFF Scanner Upgrade 1.3 (24/9

Post 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.
[EliteWiki] Capt. Murphy's OXPs
External JavaScript resources - W3Schools & Mozilla Developer Network
Win 7 64bit, Intel Core i5 with HD3000 (driver rev. 8.15.10.2696 - March 2012), Oolite 1.76.1
User avatar
Capt. Murphy
Commodore
Commodore
Posts: 1127
Joined: Fri Feb 25, 2011 8:46 am
Location: UK South Coast.

Re: [UPDATED RELEASE]-Police IFF Scanner 1.3.1 (18/12/11)

Post 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.
[EliteWiki] Capt. Murphy's OXPs
External JavaScript resources - W3Schools & Mozilla Developer Network
Win 7 64bit, Intel Core i5 with HD3000 (driver rev. 8.15.10.2696 - March 2012), Oolite 1.76.1
User avatar
Tichy
---- E L I T E ----
---- E L I T E ----
Posts: 345
Joined: Wed Jul 11, 2012 5:48 pm

Re: [UPDATED RELEASE]-Police IFF Scanner 1.3.1 (18/12/11)

Post 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.
Post Reply