Destination ETA

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

Moderators: winston, another_commander

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: [RELEASE] Destination ETA

Post 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:
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: 2446
Joined: Sat Jun 11, 2011 6:07 am
Location: Western Australia
Contact:

Re: [RELEASE] Destination ETA

Post 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.
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: [RELEASE] Destination ETA

Post 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.
User avatar
Disembodied
Jedi Spam Assassin
Jedi Spam Assassin
Posts: 6885
Joined: Thu Jul 12, 2007 10:54 pm
Location: Carter's Snort

Re: [WIPs] Destination ETA & Distant Suns

Post 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.
User avatar
Wildeblood
---- E L I T E ----
---- E L I T E ----
Posts: 2446
Joined: Sat Jun 11, 2011 6:07 am
Location: Western Australia
Contact:

Re: [WIPs] Destination ETA & Distant Suns

Post 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".
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Re: [RELEASE] Destination ETA

Post 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.
User avatar
Wildeblood
---- E L I T E ----
---- E L I T E ----
Posts: 2446
Joined: Sat Jun 11, 2011 6:07 am
Location: Western Australia
Contact:

Re: [RELEASE] Destination ETA

Post 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)...
User avatar
spara
---- E L I T E ----
---- E L I T E ----
Posts: 2691
Joined: Wed Aug 15, 2012 4:19 am
Location: Finland

Re: [RELEASE] Destination ETA

Post 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.
User avatar
Wildeblood
---- E L I T E ----
---- E L I T E ----
Posts: 2446
Joined: Sat Jun 11, 2011 6:07 am
Location: Western Australia
Contact:

Re: [RELEASE] Destination ETA

Post 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.
User avatar
Wildeblood
---- E L I T E ----
---- E L I T E ----
Posts: 2446
Joined: Sat Jun 11, 2011 6:07 am
Location: Western Australia
Contact:

Re: [RELEASE] Destination ETA

Post 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
}
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: [RELEASE] Destination ETA

Post by cim »

Player as well. Unless a ship script event is listed as NPC only, it applies to the player's ship too.
User avatar
Cmd. Cheyd
---- E L I T E ----
---- E L I T E ----
Posts: 934
Joined: Tue Dec 16, 2008 2:52 pm
Location: Deep Horizon Industries Manufacturing & Research Site somewhere in G8...

Re: [RELEASE] Destination ETA

Post 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.
User avatar
Ranthe
---- E L I T E ----
---- E L I T E ----
Posts: 330
Joined: Sat Oct 13, 2012 7:35 pm
Location: Paraparaumu, New Zealand (TL 8, Rich Agricultural, Multi-Government)

Re: [RELEASE] Destination ETA

Post 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".
Commander Ranthe: Flying the Anaconda-class transport Atomic Annie through Galaxy 2.
Combat Ranking: Dangerous
"Big ships take more booty on your interstellar flights..."
User avatar
Wildeblood
---- E L I T E ----
---- E L I T E ----
Posts: 2446
Joined: Sat Jun 11, 2011 6:07 am
Location: Western Australia
Contact:

Re: [RELEASE] Destination ETA

Post 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();
	}
User avatar
Ranthe
---- E L I T E ----
---- E L I T E ----
Posts: 330
Joined: Sat Oct 13, 2012 7:35 pm
Location: Paraparaumu, New Zealand (TL 8, Rich Agricultural, Multi-Government)

Re: [RELEASE] Destination ETA

Post 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" :-/
Commander Ranthe: Flying the Anaconda-class transport Atomic Annie through Galaxy 2.
Combat Ranking: Dangerous
"Big ships take more booty on your interstellar flights..."
Post Reply