ASC tracks sunspots

For test results, bug reports, announcements of new builds etc.

Moderators: winston, another_commander, Getafix

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"

ASC tracks sunspots

Post by Diziet Sma »

I'm putting this here because I suspect the root-cause goes deeper than the ASC itself.

On a recent trunk test-flight (r5520) I noticed a "Compass: Undefined" message on the console. It appeared to be the sun, but the sun had its own ASC entry, as usual. On getting close to the sun, it was clear that it was considerably offset from centre, so obviously not the sun itself. No object was visible, and the distance suggested it was around the other side/beyond the sun itself. Some manoeuvring brought the thing into view.. it turned out to be a sunspot!

Very cool.. but I don't think the ASC should track them.. :lol:
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
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: ASC tracks sunspots

Post by cim »

Diziet Sma wrote:
Very cool.. but I don't think the ASC should track them.. :lol:
Well, the Sunspot OXP as it stands is just a quick demonstration of possibilities (including compass tracking of visual effects). If you'd rather not have that bit, just remove the following line from the effectdata.plist file

Code: Select all

	"beacon" = "Sunspot";
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: ASC tracks sunspots

Post by Diziet Sma »

Oops.. I thought sunspots were a trunk feature.. :oops: :oops:
My bad. :lol:
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
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16081
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: ASC tracks sunspots

Post by Cody »

Diziet Sma wrote:
Oops.. I thought sunspots were a trunk feature..
Que?
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
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: ASC tracks sunspots

Post by Diziet Sma »

El Viejo wrote:
Diziet Sma wrote:
Oops.. I thought sunspots were a trunk feature..
Que?
Never mind.. brain-fart on my part.. forgot I'd installed the demo-oxp :oops:
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
Wildeblood
---- E L I T E ----
---- E L I T E ----
Posts: 2407
Joined: Sat Jun 11, 2011 6:07 am
Location: Western Australia

Re: ASC tracks sunspots

Post by Wildeblood »

Diziet Sma wrote:
On a recent trunk test-flight (r5520) I noticed a "Compass: Undefined" message on the console.
Which, if your beacon announcements were displaying the beaconCode, rather than the displayName, would not have happened. As I wrote before, a beacon must have a beaconCode, it may or may not have a displayName. Now where's that other thread where Commander McLane was trying to tell me displayname was never undefined?
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Re: ASC tracks sunspots

Post by Thargoid »

It's a slightly distinct case as here the beacon is on a visual effect rather than a ship entity, and those don't have displayName (or name) as a defined key (they have dataKey instead).

But Wildeblood's point is valid in that it is a case where displayName is undefined. My Planetary Compass does distinctly set both of them, but it's an unofficial (and a little naughty) usage of the keys as effectively user defined ones.
User avatar
Wildeblood
---- E L I T E ----
---- E L I T E ----
Posts: 2407
Joined: Sat Jun 11, 2011 6:07 am
Location: Western Australia

Re: ASC tracks sunspots

Post by Wildeblood »

Thargoid wrote:
It's a slightly distinct case as here the beacon is on a visual effect rather than a ship entity, and those don't have displayName (or name) as a defined key (they have dataKey instead).
No, it isn't, since it's perfectly acceptable to set name = "" on a ship if you don't want any name to appear if it's targeted. But you can't set beacon_code = "" and still force it to have a beacon.
Thargoid wrote:
My Planetary Compass...
Although you can set beacon_code = " Planet" (first character blank), and then no letter icon will appear on the bottom-left of the compass, improving the illusion that you are in fact targeting a planet, rather than a beacon, with the compass. That's the reason for these lines in Destination ETA:-

Code: Select all

		case "COMPASS_MODE_BEACONS":
			{
			if (whom.beaconCode.charAt(0) == " ") this.$destination = whom.beaconCode.slice(1);
			else this.$destination = ("Beacon: " + whom.beaconCode);
			break;
			}
For people who don't read javascript, if the beacon code begins with a blank, the prefix "Beacon: " is not added when it is displayed.
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: ASC tracks sunspots

Post by Commander McLane »

Wildeblood wrote:
Now where's that other thread where Commander McLane was trying to tell me displayname was never undefined?
What I was saying was that this seems like a bug to me. At least it's contrary to the documentation:
Wiki wrote:
displayName

displayName : String (read/write, read-only for player)

The name of the ship as seen by the player. By default it is the same as name.
I interpret the highlighted sentence to mean that it can never be undefined (at least not as long as name is defined). So, if it is, either the documentation is wrong, or you have discovered a bug.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Re: ASC tracks sunspots

Post by Thargoid »

But won't affect this particular case, as it relates to a visual effect where neither name or displayName are defined (unless done in script as an "unofficial" key). Which is what I meant earlier.
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: ASC tracks sunspots

Post by Tricky »

Actually if Wildeblood is seeing displayName as undefined then there is a bug. I am with McLane on this one. displayName should be the same as name if displayName is not defined in shipdata.plist
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: ASC tracks sunspots

Post by cim »

Tricky wrote:
Actually if Wildeblood is seeing displayName as undefined then there is a bug. I am with McLane on this one. displayName should be the same as name if displayName is not defined in shipdata.plist
And it is for all cases where the entity in question is defined via shipdata.plist. Sunspots, however, are not, and have neither a name nor a displayName.
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: ASC tracks sunspots

Post by Commander McLane »

cim wrote:
Tricky wrote:
Actually if Wildeblood is seeing displayName as undefined then there is a bug. I am with McLane on this one. displayName should be the same as name if displayName is not defined in shipdata.plist
And it is for all cases where the entity in question is defined via shipdata.plist. Sunspots, however, are not, and have neither a name nor a displayName.
Thanks for clarifying this. :D
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: ASC tracks sunspots

Post by JazHaz »

cim wrote:
Diziet Sma wrote:
Very cool.. but I don't think the ASC should track them.. :lol:
Well, the Sunspot OXP as it stands is just a quick demonstration of possibilities (including compass tracking of visual effects). If you'd rather not have that bit, just remove the following line from the effectdata.plist file

Code: Select all

	"beacon" = "Sunspot";
Right I have removed this line from the effectdata.plist, however I am still getting Beacon: undefined on my ASC.

I looked at the scripts and in vedemo-sunspot.js there is the following code:

Code: Select all

this.effectSpawned = function() {
		log(this.visualEffect.dataKey,"Added at "+this.visualEffect.position);
		this.visualEffect.beaconCode = "Sunspot";
		this._timer = new Timer(this,this._mutate,5,5);
}
Should the bit that refers to the beaconCode also be removed?
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
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: ASC tracks sunspots

Post by Diziet Sma »

JazHaz wrote:
Right I have removed this line from the effectdata.plist, however I am still getting Beacon: undefined on my ASC.
Confirmed.. I'd forgotten to mention this.. thanks for bringing it up.
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