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 »

Just uploaded version 1.2.

Because I didn't read the JS documentation properly :oops: :roll: I missed out some brackets on my Timer start/stop functions in the last release. Fortunately this didn't break functionality at all and in the context of this script wouldn't cause a problem. Strangely this error doesn't produce a JS syntax error in the log, and I only realised my error whilst writing the Broken HUD/Scanner OXP script.
[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:
Because I didn't read the JS documentation properly :oops: :roll: I missed out some brackets on my Timer start/stop functions in the last release. Fortunately this didn't break functionality at all and in the context of this script wouldn't cause a problem. Strangely this error doesn't produce a JS syntax error in the log, and I only realised my error whilst writing the Broken HUD/Scanner OXP script.
Words cannot express how much I hate the syntax of JS. I might have mentioned it previously. :D

I just had an idea:-

As is, you target a ship, the ident computer tells you what model of ship it is, and its legal status. That's all well and good. But recall when Capt. Murphy first revealed this OXP, I complained that pirates aren't likely to carry an "I'm a fugitive" transponder, so how can you tell their legal status? I stand by that criticism, but now realize that it could explain itself: you know a ship is a fugitive because it carries no transponder.

So here's the idea: you target a ship and instead of the ident computer displaying e.g. "Cobra 3 (clean)", "Cobra 3 (offender)" or "Cobra 3 (fugitive)" it displays "Cobra 3 (clean)", "Cobra 3 (offender)" or "No transponder (fugitive)". This way, you'd know a ship was a fugitive (i.e. pirate), but not what model of ship it was. No standing off at the edge of scanner range pinging pirates with the ident computer when they're only two or three pixels on screen and cherry-picking the easy targets, you'd have to move close enough to see them if you wanted to know what they were.

if this.ship.legalStatus some syntax fugitive then this.ship.displayName some syntax "No transponder"
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 »

Wildeblood wrote:
if this.ship.legalStatus some syntax fugitive then this.ship.displayName some syntax "No transponder"
Feel free to use the following if you want to do this. Should work from a world-script. Could be built in to your renaming ships OXP. Explicitly excludes Thargoids from having to have a transponder.

Edit - actually you might want to limit the renaming to ships with role pirate - otherwise you might be renaming named ships from a mission OXP......

Code: Select all

this.shipTargetAcquired = function(target)
{
   if (target.isPirate && target.bounty > 50)
   {
      target.displayName = "No Transponder!";
   }
}

Last edited by Capt. Murphy on Sun Jun 26, 2011 9:02 am, 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
Zireael
---- E L I T E ----
---- E L I T E ----
Posts: 1396
Joined: Tue Nov 09, 2010 1:44 pm

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

Post by Zireael »

So here's the idea: you target a ship and instead of the ident computer displaying e.g. "Cobra 3 (clean)", "Cobra 3 (offender)" or "Cobra 3 (fugitive)" it displays "Cobra 3 (clean)", "Cobra 3 (offender)" or "No transponder (fugitive)". This way, you'd know a ship was a fugitive (i.e. pirate), but not what model of ship it was. No standing off at the edge of scanner range pinging pirates with the ident computer when they're only two or three pixels on screen and cherry-picking the easy targets, you'd have to move close enough to see them if you wanted to know what they were.

if this.ship.legalStatus some syntax fugitive then this.ship.displayName some syntax "No transponder"
Brilliant idea!
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5525
Joined: Thu Jun 12, 2008 6:55 pm

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

Post by Thargoid »

The only problem I see with this approach is that it may tangle up things like the bounty scanner (and other ones which play with display name).

It will need careful compatability testing I think.
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 »

It would probably be better to include the functionality in an updated bounty scanner....but is Frame around to ask?
[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 »

Thargoid wrote:
The only problem I see with this approach is that it may tangle up things like the bounty scanner (and other ones which play with display name).

It will need careful compatability testing I think.
That's why I was thinking of a script that changed it (the displayName) when it (the ship) was first first created. Leaving it until the the player actually targets the ship is too late.

Regarding the Bounty Scanner in particular, from a game play point of view, if it did hide the bounty on fugitives, well you know it's at least $50. I think it would only be wrong if it fouled up the bounty display on non-fugitive "offenders".
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5525
Joined: Thu Jun 12, 2008 6:55 pm

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

Post by Thargoid »

I was thinking more that we could end up with less displayName, and more displayEssay.

When those names get too long, they don't look very good.
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 »

It could be done like that.

Under a this.shipLaunchedFromStation = this.shipExitedWitchspace = function() handler.

But the trick is to exclude entities that have been given a custom name by another OXP....

Maybe only include entities whose displayName == name

Something like this......

Code: Select all

this.shipLaunchedFromStation = this.shipExitedWitchspace = function()
{
function findfugitives(entity)
	{
		return (entity.displayName == entity.name && entity.bounty > 50);
	}
	var targets = system.filteredEntities(this, findfugitives);
	if (targets.length > 0)
	{
	let counter = 0;
	for (counter = 0; counter < targets.length;counter++)
	{
          targets[counter].displayName = "No Transponder";
	}
	}
}
[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 »

Thargoid wrote:
I was thinking more that we could end up with less displayName, and more displayEssay.

When those names get too long, they don't look very good.
Well then, changing "Vortex - Keeper of Darkness: Bounty: 75cr" to "No transponder" is surely an improvement? :wink:
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5525
Joined: Thu Jun 12, 2008 6:55 pm

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

Post by Thargoid »

Capt. Murphy wrote:
Maybe only include entities whose displayName == name
Then anyone who has bounty scanner installed will never see any effect from your OXP.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5525
Joined: Thu Jun 12, 2008 6:55 pm

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

Post by Thargoid »

Wildeblood wrote:
Well then, changing "Vortex - Keeper of Darkness: Bounty: 75cr" to "No transponder" is surely an improvement? :wink:
Are you trying to annoy me, or just succeeding?
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 »

Thargoid wrote:
Capt. Murphy wrote:
Maybe only include entities whose displayName == name
Then anyone who has bounty scanner installed will never see any effect from your OXP.
Wouldn't Bounty Scanner just append the Bounty to the "No Transponder" name? Looking quickly at the code it appears to grab displayName, temporarily change it whilst targeted to displayName + the bounty and then changes it back to the originial displayName?

Academic anyway, I don't intend to code it into anything I'm planning on releasing - upto Wildeblood if he wants to have a shot at it.
[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
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: [UPDATED RELEASE] - Police IFF Scanner Upgrade 1.2 (25/6

Post by Commander McLane »

I have an in-Ooniverse question about this idea: Why would a fugitive lose its transponder in the first place? And how would he automagically regain it when becoming offender again? I don't see this happening, so the idea makes only a limited amount of sense to me.

Just my 0.2 cr.
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 »

Commander McLane wrote:
I have an in-Ooniverse question about this idea: Why would a fugitive lose its transponder in the first place? And how would he automagically regain it when becoming offender again? I don't see this happening, so the idea makes only a limited amount of sense to me.

Just my 0.2 cr.
Well that's the point, isn't it: it's an idea. Someone has an idea, they say "Here's an idea, what do you think?" Grown-ups can discuss ideas, decide whether they're good ideas, whether they're worth following up or not. It seems to me that around the "Friendliest board this side of Riedquat" only certain people are allowed to have ideas.
Post Reply