Page 2 of 4

Re: [RELEASE] Destination ETA

Posted: Thu Nov 15, 2012 3:17 am
by Diziet Sma
Wildeblood wrote:
Then you will have also found the shipdata-overrides file. :D
Yup.. but whom.displayName does the same thing without a whole lot of mucking about having to add every possible entity, or needing to update it every time an OXP adds something new to the Ooniverse. :mrgreen: :wink:

Re: [RELEASE] Destination ETA

Posted: Thu Nov 15, 2012 3:29 am
by Wildeblood
Diziet Sma wrote:
Wildeblood wrote:
Then you will have also found the shipdata-overrides file. :D
Yup.. but whom.displayName does the same thing without a whole lot of mucking about having to add every possible entity, or needing to update it every time an OXP adds something new to the Ooniverse. :mrgreen: :wink:
You don't have to add anything, the point is you can easily change it, independently of the model's name or displayName property. Note also that displayName is incorrectly documented - you can't trust it to actually exist. Compare all the faffing about I do in the Combat Assistant script, which manipulates displayName, and you'll see why I prefer to display the beacon code. It is, after all, what beacon codes are for: you can rely on beaconCode actually existing, if it doesn't the object isn't a beacon. Simples.

Re: [RELEASE] Destination ETA

Posted: Thu Nov 15, 2012 9:13 am
by Commander McLane
Wildeblood wrote:
Note also that displayName is incorrectly documented - you can't trust it to actually exist.
If that's true, you should file a bug report. displayName is supposed to exactly work as documented, and a lot of OXPs depend on it working just as advertised. None of my OXPs ever had a problem with it, thus I'd be interested to know where you found it not working.

Re: [WIPs] Destination ETA & Distant Suns

Posted: Thu Nov 15, 2012 11:22 am
by Disembodied
Wildeblood wrote:
pagroove wrote:
Is the naming random for the stars or do you maintain a naming list?
If the star's name is set, it reads that. If not, it adds to the planet's name: e.g. "Lave" becomes "Lave Stella". (Does anyone have a preference between Aster, Astra or Stella?)
Of the three, I'd pick "Astra" (actually, I'd pick "Astrum", as singular), but to be honest I think if the star and the planet have the same name, it's not necessary to differentiate them further since you're already adding information on the star type. Just have e.g. Lave (M-type star) for the star and Lave (class G planet) for the planet. I don't think we have actual non-Trekky planet classes, but you could make them up based on radius and maybe bits from the planet descriptions, e.g. forests, oceans, volcanoes, boring/tedious (desert?), with the radius thrown in if you need another physical characteristic.

Re: [WIPs] Destination ETA & Distant Suns

Posted: Thu Nov 15, 2012 11:45 am
by Wildeblood
Disembodied wrote:
Wildeblood wrote:
pagroove wrote:
Is the naming random for the stars or do you maintain a naming list?
If the star's name is set, it reads that. If not, it adds to the planet's name: e.g. "Lave" becomes "Lave Stella". (Does anyone have a preference between Aster, Astra or Stella?)
Of the three, I'd pick "Astra" (actually, I'd pick "Astrum", as singular), but to be honest I think if the star and the planet have the same name, it's not necessary to differentiate them further since you're already adding information on the star type.
Too late, I went with Stella; I wasn't willing to forgo seeing "Zalella Stella".

Re: [RELEASE] Destination ETA

Posted: Thu Nov 15, 2012 12:09 pm
by Svengali
The ETA is a nice idea, Wildblood, but I'm not so sure if the approach is good as it conflicts with quite a few OXPs.

Edit:
E.g. the short interval of consoleMessages with a lot of empty lines renders every notification useless (Oolite and OXPs) and changing beaconcodes of other OXPs may break AIs.

Re: [RELEASE] Destination ETA

Posted: Sat Nov 17, 2012 11:26 am
by Wildeblood
Svengali wrote:
...the short interval of consoleMessages with a lot of empty lines renders every notification useless (Oolite and OXPs)....
But previously...
Wildeblood wrote:
Diziet Sma wrote:
Why only at green alert? Excepting combat, of course, most of the game is played on yellow alert.
Because there are too many other things popping up messages on screen at yellow alert, and no way of predicting or detecting them. There are a limited range of messages that appear at green alert and they can fairly reliably be detected to pause the ETA update while their messages display.
Spara's original version has been in the wild for several weeks now, and there haven't been howls of outrage, so I'd say it's less of a problem than Svengali imagines. I added some more interrupts Spara neglected, but I'm sure there are some more still missing. When people notice them and complain, they'll get fixed.

Meanwhile, I moved $starSuffix = " Stella" to the top of the script where it's easy for people to find. That's the only difference between version 1.0.2 and 1.0.3.

One thing I am in two minds about: should the ETA display be paused if you change screens to something other than a flight view - the market screen, etc.? On the one hand, it's writing a message over the screen you're trying to look at (that's bad), on the other hand, it's reminding you when you have to stop messing about and look out the window (that's good)...

Re: [RELEASE] Destination ETA

Posted: Sat Nov 17, 2012 12:19 pm
by spara
Wildeblood wrote:
Svengali wrote:
...the short interval of consoleMessages with a lot of empty lines renders every notification useless (Oolite and OXPs)....
But previously...
Wildeblood wrote:
Diziet Sma wrote:
Why only at green alert? Excepting combat, of course, most of the game is played on yellow alert.
Because there are too many other things popping up messages on screen at yellow alert, and no way of predicting or detecting them. There are a limited range of messages that appear at green alert and they can fairly reliably be detected to pause the ETA update while their messages display.
Spara's original version has been in the wild for several weeks now, and there haven't been howls of outrage, so I'd say it's less of a problem than Svengali imagines. I added some more interrupts Spara neglected, but I'm sure there are some more still missing. When people notice them and complain, they'll get fixed.
Obviously the solution used in this oxp and mine is a compromise. To gain something like this you'll have to sacrifice something. I personally find this feature so good that I'm willing to sacrifice. I just don't know what I am missing and how important it is. So far I don't think I have missed a single important message, but how can I know that if I have not seen 'em? So does somebody know what I might be missing?

I suppose that at the moment the only uncompromising solution could be found from the numeric hud way.

With the current release of Oolite, I think this is the best generic solution you can get. Only thing I'm missing is the distance to target, but that can be easily tweaked to the oxp.

Re: [RELEASE] Destination ETA

Posted: Sat Nov 17, 2012 2:03 pm
by Wildeblood
spara wrote:
Obviously the solution used in this oxp and mine is a compromise. To gain something like this you'll have to sacrifice something. I personally find this feature so good that I'm willing to sacrifice. I just don't know what I am missing and how important it is. So far I don't think I have missed a single important message, but how can I know that if I have not seen 'em? So does somebody know what I might be missing?
These are the events that interrupt ETA display at the moment:-

Code: Select all

this.shipTargetAcquired = this.shipTargetLost = this.shipScoopedOther = this.shipKilledOther = this.viewDirectionChanged
Target acquired and view direction are the two I added to what you have in Aad-HUD.

Re: [RELEASE] Destination ETA

Posted: Sun Nov 18, 2012 4:17 am
by Wildeblood
commsMessageReceived is listed as a ship script event. Is it NPC only, or does it apply to the player ship too?
The commsMessageReceived handler is sent when receiving a message from other ships. Handler is added in Oolite 1.75
commsMessageReceived = function(message: string, sender: ship)
{
// Your code here
}

Re: [RELEASE] Destination ETA

Posted: Sun Nov 18, 2012 10:09 am
by cim
Player as well. Unless a ship script event is listed as NPC only, it applies to the player's ship too.

Re: [RELEASE] Destination ETA

Posted: Fri Nov 30, 2012 8:49 pm
by Cmd. Cheyd
Just an FYI, Wildeblood-
You did not include any license information within the OXP, nor is any stated on the individual files. Technically, this means there is no license and makes it illegal for any user to actually download and use to the OXP. May I suggest you decide on a license (most are under some version of the Creative Commons), add the appropriate information to the OXP and re-release? I'd like to utilize the OXP (and even steal some code :P ) but am unable to do either currently due to this issue.

Re: [RELEASE] Destination ETA

Posted: Sat Dec 01, 2012 8:07 am
by Ranthe
This is a nice OXP, it certainly adds to the ambience.

One niggle though - when using the "spoken voices" game option, "ETA" gets pronounced as "Eh-Ta", not "Ee-Tee-Aye".

Re: [RELEASE] Destination ETA

Posted: Sat Dec 01, 2012 11:42 am
by Wildeblood
Ranthe wrote:
This is a nice OXP, it certainly adds to the ambience.

One niggle though - when using the "spoken voices" game option, "ETA" gets pronounced as "Eh-Ta", not "Ee-Tee-Aye".
Yes, I know. I did consider changing the string from "ETA" to "E.T.A.", but current usage here is not to include full stops in abbreviations, and "E.T.A." looks quaint to me. I can only guess where everyone else is and what looks right to you. Last week I trawled through all Oolite's strings (in descriptions.plist), and the only example I could find used "ETA", so I decided to leave it as is for consistency.

Anyway, if you want to change it, it's about line 110 or so in the script, inside the this.$updateETA function. Look for this note, and as it says, if you experiment with altering this script, do not remove the check for system.isInterstellarSpace:-

Code: Select all

/* ===============================================
			CALCULATING & DISPLAYING THE E.T.A.

   In interstellar space compassTarget is undefined, will cause CTD in Oolite 1.76.1.
===================================================== */

this.$updateETA = function()
	{
	if (system.isInterstellarSpace || player.alertCondition != 1) return false;
Then a bit further down the function ends like this, where you should change the second line:-

Code: Select all

			player.consoleMessage("\n\n\n\n\n\n\n\n\n\n" + this.$destination);
			player.consoleMessage("ETA " + hours + ":" + mins + ":" + secs);   // <<------------		
			}
		}
	if (oolite.gameSettings.speechOn !== this.$speechOn) this.$restartTimer();
	}

Re: [RELEASE] Destination ETA

Posted: Sun Dec 02, 2012 12:28 am
by Ranthe
Wildeblood wrote:
Ranthe wrote:
This is a nice OXP, it certainly adds to the ambience.

One niggle though - when using the "spoken voices" game option, "ETA" gets pronounced as "Eh-Ta", not "Ee-Tee-Aye".
Yes, I know. I did consider changing the string from "ETA" to "E.T.A.", but current usage here is not to include full stops in abbreviations, and "E.T.A." looks quaint to me. I can only guess where everyone else is and what looks right to you. Last week I trawled through all Oolite's strings (in descriptions.plist), and the only example I could find used "ETA", so I decided to leave it as is for consistency. [...]

Then a bit further down the function ends like this, where you should change the second line:-

Code: Select all

			player.consoleMessage("\n\n\n\n\n\n\n\n\n\n" + this.$destination);
			player.consoleMessage("ETA " + hours + ":" + mins + ":" + secs);   // <<------------		
			}
		}
	if (oolite.gameSettings.speechOn !== this.$speechOn) this.$restartTimer();
	}
After some playing about with it, I've got it to say "Ee-Tee-Aye" through making the following change:

Code: Select all

			player.consoleMessage("\n\n\n\n\n\n\n\n\n\n" + this.$destination);
			player.consoleMessage("E T A. " + hours + ":" + mins + ":" + secs);   // <<------------		
			}
		}
	if (oolite.gameSettings.speechOn !== this.$speechOn) this.$restartTimer();
	}
Using "E.T.A." didn't work - it came out as "Ee-dot-Tee-dot-Aye" :-/