[Beta] Release of Telescope 2.0

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

Moderators: winston, another_commander

User avatar
Cholmondely
Archivist
Archivist
Posts: 5186
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: [Beta] Release of Telescope 2.0

Post by Cholmondely »

cag wrote: Fri Dec 31, 2021 3:28 am
...
The Military Jammer corrupts the scanner but the ship still emits light (i.e. is not cloaked) so the Telescope can still see it. While 1.15 completely ignored it, I'm still listing it in the MFD, we just cannot acquire a lock. So there's little change to game balance. Is this better/preferable or should we revert to what 1.15 did?
No strong feelings about this one
cag wrote: Fri Dec 31, 2021 3:28 am
At the moment these 3 seem to link to blank pages which don't allow downloading. Now fixed
cag wrote: Fri Dec 31, 2021 3:28 am
I've just got a few minor tweaks left on my list before I call this version done. Do you think it's ready for the expansion manager?
You might like to give it a few days for Arquebus and myself to test it a little more, but yes, definitely....
Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
User avatar
Cholmondely
Archivist
Archivist
Posts: 5186
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: [Beta] Release of Telescope 2.0

Post by Cholmondely »

cag wrote: Fri Dec 31, 2021 3:28 am
I've just got a few minor tweaks left on my list before I call this version done. Do you think it's ready for the expansion manager?
Actually, the one thing which I would dearly love to see added would be options for the distance units. Just as LittleBear has done for his Galactic Almanac. Personally I find the unreal kilometres a massive immersion breaker - renaming them works much better for me.

Code: Select all

// Set the Unit Converter variables and unit names as mission variables.
if (missionVariables.random_station_names_units == "Torans") {
missionVariables.random_station_names_mfd_unit = "Torans";
missionVariables.random_station_names_mfd_unitBase = 15800;
missionVariables.random_station_names_mfd_rounding = 3; 
}
if (missionVariables.random_station_names_units == "Kilometres") {
missionVariables.random_station_names_mfd_unit = "Kilometres";
missionVariables.random_station_names_mfd_unitBase = 1000;
missionVariables.random_station_names_mfd_rounding = 3; 
}
if (missionVariables.random_station_names_units == "Orthodox Units") {
missionVariables.random_station_names_mfd_unit = "Orthodox Units";
missionVariables.random_station_names_mfd_unitBase = 905520;
missionVariables.random_station_names_mfd_rounding = 3; 
}
if (missionVariables.random_station_names_units == "Miles") {
missionVariables.random_station_names_mfd_unit = "Miles";
missionVariables.random_station_names_mfd_unitBase = 1609.34;
missionVariables.random_station_names_mfd_rounding = 3; 
}
if (missionVariables.random_station_names_units == "Cavezzi") {
missionVariables.random_station_names_mfd_unit = "Cavezzi";
missionVariables.random_station_names_mfd_unitBase = 2.08641;
missionVariables.random_station_names_mfd_rounding = 0; 
}

Code: Select all

// Set up and Display the First Part of the Galactic Almanac - Star, Planets and Moons - HERE!
this.showAlmanac1 = function() {
this.setheaders();
missionVariables.random_station_names_planetpages  = 1;
missionVariables.random_station_names_planet_singlepage  = "True";
var totalCount = 0; 
var planetCount = 0;
var loopCount = 0;
var text = "";
var currentpage = "";
if (missionVariables.random_station_names_units == "Torans") var unitBase = 15800;
if (missionVariables.random_station_names_units == "Torans") var unit = "TS";
if (missionVariables.random_station_names_units == "Kilometres") var unitBase = 1000;
if (missionVariables.random_station_names_units == "Kilometres") var unit = "KM";
if (missionVariables.random_station_names_units == "Orthodox Units") var unitBase = 905520;
if (missionVariables.random_station_names_units == "Orthodox Units") var unit = "OU";
if (missionVariables.random_station_names_units == "Miles") var unitBase = 1609.34;
if (missionVariables.random_station_names_units == "Miles") var unit = "MI";
if (missionVariables.random_station_names_units == "Cavezzi") var unitBase = 2.08641;
if (missionVariables.random_station_names_units == "Cavezzi") var unit = "CZ";
if (missionVariables.random_station_names_units == "Torans") {missionVariables.random_station_names_mfd_rounding = 3;}
if (missionVariables.random_station_names_units == "Kilometres") {missionVariables.random_station_names_mfd_rounding = 3;}
if (missionVariables.random_station_names_units == "Orthodox Units") {missionVariables.random_station_names_mfd_rounding = 3;}
if (missionVariables.random_station_names_units == "Miles") {missionVariables.random_station_names_mfd_rounding = 3; }
if (missionVariables.random_station_names_units == "Cavezzi") {missionVariables.random_station_names_mfd_rounding = 0; }

Code: Select all

//Show List of Star, Main Planet and OXP Moons, Planets & Gas Giants.
if (missionVariables.random_station_names_screen == "BGS Background Style") var bgImage = "random_stations_background_bgs.png";
if (missionVariables.random_station_names_screen == "Better Screens Style") var bgImage = "random_stations_background_better.png";
if (missionVariables.random_station_names_screen == "Xenon Style") var bgImage = "random_stations_background_xenon.png";
if (missionVariables.random_station_names_screen == "Classic Elite Style") var bgImage = "random_stations_background_green.png";
if (missionVariables.random_station_names_units == "Torans") var unittext = "Torans. One Unit is the distance travelled in one second under Torus Dilation.";
if (missionVariables.random_station_names_units == "Kilometres") var unittext = "Kilometres. One Unit is the distance travelled by light in three microseconds.";
if (missionVariables.random_station_names_units == "Orthodox Units") var unittext = "Orthodox Units. One Unit is the distance between the planet Lave and its Star.";
if (missionVariables.random_station_names_units == "Miles") var unittext = "Miles. One Unit is equal to the combined height of nine hundred Ancient Earthians.";
if (missionVariables.random_station_names_units == "Cavezzi") var unittext = "Cavezzi. One Unit is one twenty millionth the circumference of Ancient Earth.";
var describe = "a single World.";
if (oxpCount !== 0) var worlds = sizenumbers[oxpCount];
if (oxpCount !== 0) var describe = ""+worlds+" Worlds. Planets, Gas Giants and Moons are numbered in ascending order of distance from the local Star.";
if (oxpCount  > 100) var describe = ""+displayCount+" Worlds. Planets, Gas Giants and Moons are numbered in ascending order of distance from the local Star.";
missionVariables.random_station_names_describe = describe; // Save it as a tempoary variable so its easy to call in different functions.
if (missionVariables.random_station_names_planetpages === 1 && missionVariables.random_station_names_planet_singlepage  === "True") {
All the above lifted from randomstationnames.js in the Scripts folder - again, I'm not a programmer, so I've probably missed stuff, and gotten the beginning and end of his snippets wrong.
Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
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: [Beta] Release of Telescope 2.0

Post by Cody »

Orthodox Units. One Unit is the distance between the planet Lave and its Star.
I think LB will be changing Orthodox Unit to Ostronomical Unit.
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
Cholmondely
Archivist
Archivist
Posts: 5186
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: [Beta] Release of Telescope 2.0

Post by Cholmondely »

Cody wrote: Sat Jan 01, 2022 6:18 pm
Orthodox Units. One Unit is the distance between the planet Lave and its Star.
I think LB will be changing Orthodox Unit to Ostronomical Unit.
Much prefer "Orthodox Units"!

But it's choice! Variety! And who cares? Maybe they are Orthodox Units in the Old Worlds region, Ostronomical Units in the Devil's Triangle & GalCenter G1 and Oostronomical Units in the Iron Stars and the Xexedi Cluster...

In delightful Digebiti, of course, we are all wedded to the Cavezzo! And flying around seeing everything measured in Cavezzi has put a big smile on my face for the past few months :D
Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
arquebus
---- E L I T E ----
---- E L I T E ----
Posts: 518
Joined: Sun Oct 31, 2021 6:07 am
Contact:

Re: [Beta] Release of Telescope 2.0

Post by arquebus »

I'm noticing that none of the main stations are getting mass lock rings. Everything else is getting them, just not main stations.
Here is my YouTube channel, where I play poorly: Arquebus X
cag
Deadly
Deadly
Posts: 200
Joined: Fri Mar 17, 2017 1:49 am

Re: [Beta] Release of Telescope 2.0

Post by cag »

@arquebus, could you be more specific? Does it happen all the time or beyond a certain distance? All non-special station detections are capped (arbitrarily) @ 10 * scannerRange. (This was a 'temporary' fix for the .isVisible bug; these distances could be tweaked)

Do you have an episode & time code from one of your YouTube videos? If not, you got somewhere I can DL a saved game & Latest.log?
"Better to be thought a fool, boy, than to open your trap and remove all doubt." - Grandma [over time, just "Shut your trap... fool"]
"The only stupid questions are the ones you fail to ask." - Dad
How do I...? Nevermind.
arquebus
---- E L I T E ----
---- E L I T E ----
Posts: 518
Joined: Sun Oct 31, 2021 6:07 am
Contact:

Re: [Beta] Release of Telescope 2.0

Post by arquebus »

It's all the time, at any distance. They're very noticeably the only thing that doesn't have a ring. I'll see if I can find a spot in one of my videos where it's evident.
Here is my YouTube channel, where I play poorly: Arquebus X
cag
Deadly
Deadly
Posts: 200
Joined: Fri Mar 17, 2017 1:49 am

Re: Release of Telescope 2.0

Post by cag »

Telescope v2.1, Telescope Extender v2.1 as well as Station Options 1.1.1 (& the basic support for Telescope 1.15) are now available via the Expansion Manager.

Telescope 1.15 and its Extender will remain in the manager, in case Murphy decides to make an appearance. Besides, I'm using a different oxp identifier, so the 'update currtently installed' in the Expansion Manager won't work anyway. While there is no immediate need, anyone got an idea how to transition players over? (or do we just let them figure it out)
"Better to be thought a fool, boy, than to open your trap and remove all doubt." - Grandma [over time, just "Shut your trap... fool"]
"The only stupid questions are the ones you fail to ask." - Dad
How do I...? Nevermind.
User avatar
montana05
---- E L I T E ----
---- E L I T E ----
Posts: 1166
Joined: Mon May 30, 2016 3:54 am
Location: lurking in The Devils Triangle (G1)

Re: Release of Telescope 2.0

Post by montana05 »

cag wrote: Tue Feb 22, 2022 5:55 am
Telescope v2.1, Telescope Extender v2.1 as well as Station Options 1.1.1 (& the basic support for Telescope 1.15) are now available via the Expansion Manager.

Telescope 1.15 and its Extender will remain in the manager, in case Murphy decides to make an appearance. Besides, I'm using a different oxp identifier, so the 'update currtently installed' in the Expansion Manager won't work anyway. While there is no immediate need, anyone got an idea how to transition players over? (or do we just let them figure it out)
phkb could transfer the access rights to you.
Scars remind us where we've been. They don't have to dictate where we're going.
cag
Deadly
Deadly
Posts: 200
Joined: Fri Mar 17, 2017 1:49 am

Re: [Beta] Release of Telescope 2.0

Post by cag »

new version has 1 bug fix:

- crossing into scannerRange while aiming at a large station, target lost as marker impacted the station :oops:

(the station's collisionRadius was larger than the marker's distance from the edge of scannerRange)

and an updated collect_shipdata utility (so 3D model appear for all ships):

- script is much simpler and easy to use

It's now fully automated. All you need to do is run it and it:
  • finds all the oxp's that Oolite will load,
  • use their shipdata to generate a custom effectsdata and
  • updates your Telescope oxp/oxz.
While the script in included in the oxp, it, along with a Windows executable, are available for download from the [EliteWiki] Telescope wiki and via these links:

Python script: https://www.dropbox.com/s/bhkp2ftlkf49s ... a.py?dl=0

Windows executable: https://www.dropbox.com/s/i2diyvg240hr5 ... .exe?dl=0


Telescope ver. 2.1.1
https://www.dropbox.com/s/swfwx5klha3d ... .oxz?dl=0
(same link as first post)
"Better to be thought a fool, boy, than to open your trap and remove all doubt." - Grandma [over time, just "Shut your trap... fool"]
"The only stupid questions are the ones you fail to ask." - Dad
How do I...? Nevermind.
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4777
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: [Beta] Release of Telescope 2.0

Post by phkb »

A couple of points:
I'm getting this error with HUD selector installed:

Code: Select all

12:15:27.587 [script.javaScript.exception.notFunction]: ***** JavaScript exception (hudselector 1.17): TypeError: this.$setInterface is not a function
12:15:27.587 [script.javaScript.exception.notFunction]:       ../AddOns/Testing.oxp/Norby.cag.Telescope.oxz/Scripts/telescope.js, line 1306.
Also, in the telescope script file, line 3898, you're checking the primary role of the station. However, you're only checking for "rockhermit". RH's can spawn with these primaryRoles set: "rockhermit", "rockhermit-chaotic" and "rockhermit-pirate". Not sure if that was an intentional omission, though.

And a question: How does one add a custom primary role to this check? Or is that not currently available for OXP stations? The 9 different stations you check might be faster than an array index search, but it's far less tweakable!
cag
Deadly
Deadly
Posts: 200
Joined: Fri Mar 17, 2017 1:49 am

Re: [Beta] Release of Telescope 2.0

Post by cag »

phkb wrote: Fri May 27, 2022 2:21 am
I'm getting this error with HUD selector installed:
Update to hudselector 1.18. I've updated the manifest on http://www.oolite.org/oxps/ and that seems to 'fix' the problem.

I tried to "Upload a new version of this file" in the wiki but ran into

Code: Select all

  ".oxz" is not a permitted file type. Permitted file types are png, gif, jpg, jpeg, webp, Array.
Is this new? Does it matter if the manifest.plist in the oxp is different?
phkb wrote: Fri May 27, 2022 2:21 am
Also, in the telescope script file, line 3898, you're checking the primary role of the station. However, you're only checking for "rockhermit". RH's can spawn with these primaryRoles set: "rockhermit", "rockhermit-chaotic" and "rockhermit-pirate". Not sure if that was an intentional omission, though.
This is code carried forward from Norby's version. I didn't even know there were more than one rockhermit role :) I'll include them on next update.
phkb wrote: Fri May 27, 2022 2:21 am
And a question: How does one add a custom primary role to this check? Or is that not currently available for OXP stations? The 9 different stations you check might be faster than an array index search, but it's far less tweakable!
These 9 roles defined what Norby called "standard roles" and any station with a different non-standard role was treated differently. He added script_info support for shipdata.plist to alter detection (& negate the necessity for tweakability):

Code: Select all

Script_info support:
====================

OXP makers can alter the detection of any objects in shipdata.plist to avoid revealing 
mission secrets.

Stations with non-standard roles and ships with the word "stealth" within their dataKey 
or role are detected in normal scanner range only. Must specify "telescope" script_info 
key to detect it farther to stay compatible with the existing OXPs, for example 
Rescue Stations.oxp, Stealth.oxp and Vector.oxp.

Standard Station roles: "station", "coriolis", "dodo", "dodec", "dodecahedron", "ico", 
"icosa", "icosahedron" and "rockhermit".

Hiding ships need "stealth" role or set telescope = 0; in script_info.

 script_info = {
 	telescope = 0;
 };

* 0: detected within normal scanner only as without telescope.
* 1: detected in visible range only 
      (due to gravity scanner can see a ship with 1kg mass from 2km only).
* Positive integer: give new mass to the ship in kg which can increase the gravity detection.
* Negative integer: will be substracted from the ship.mass in kg to reduce gravity detection.

If this key is not placed at all then get the normal detection.
Objects with disabled detection (0) are not detected when arrive into visible range 
(need scanner range), but once detected then tracked over scanner range while in visible 
range until next scan (small help and save performance).
Is this support enough for what you intend? If not, let's expand it rather than relying on tweaked versions. Once Hermitage goes mainstream, we could add some oxz dependent code (there are 17 supported to date)

As for speed vs tweakability, this function was never envisioned being tweaked. It gets called a lot (every ship, every scan). I took whatever savings I could find.
"Better to be thought a fool, boy, than to open your trap and remove all doubt." - Grandma [over time, just "Shut your trap... fool"]
"The only stupid questions are the ones you fail to ask." - Dad
How do I...? Nevermind.
User avatar
Milo
---- E L I T E ----
---- E L I T E ----
Posts: 462
Joined: Mon Sep 17, 2018 5:01 pm

Re: [Beta] Release of Telescope 2.0

Post by Milo »

Code: Select all

	function _restart_after_shutdown() {							// called only once _init_player_vars() succeeds
																	// - see shipLaunchedFromStation & shipExitedWitchspace
		try {
			if( debug ) log( ws.name, '_restart_after_shutdown, starting up...');
			ws.$Telescope_not_in_use = have_shutdown = false;
			clearNameCaches();
			system_sun = system.sun;
			if( system_sun && system_sun.hasGoneNova ) // added truthy check to avoid error in empty space after misjump  [script.javaScript.exception.unexpectedType] ReportJSError: ***** JavaScript exception (telescope 2.0): TypeError: system_sun is null 
cag
Deadly
Deadly
Posts: 200
Joined: Fri Mar 17, 2017 1:49 am

Re: [Beta] Release of Telescope 2.0

Post by cag »

new version 2.1.2, minor bug fixes

fixed bug in 3D model where subEntities intersected ring:
eg. ddtmanta's wings, fighter swarm group, wildShips_tembo
- must use target's data, not effect's as it may not include subEntities
- use larger of boundingBox's diagonal & collisionRadius as latter incorrect w/ large subEntities

fixed sniper ring bug where it was sunlit
- added diffuse_color (only had emission_color)

fixed masslock ring alignment; (relax Cholmondely, only applies to those beyond 2 * scannerRange)

fixed bug in code preventing marker impact on planets
- was too broadly applied, couldn't target when too close to planet, even facing away

fixed bug in _restart_after_shutdown for interstellar space - thanks Milo

rockhermit detection now for all rocks with primaryRole that starts with 'rockhermit'
(to include "rockhermit-chaotic" and "rockhermit-pirate" et. al) - thanks phkb
dybal wrote: Thu Oct 27, 2022 12:00 am
... It sometimes crash on me, but I only know it because I play with the Latest.log being displayed, so I see the stack dump, since it recovers "gracefully".
If those telescope crashes recur, please post the details here.
"Better to be thought a fool, boy, than to open your trap and remove all doubt." - Grandma [over time, just "Shut your trap... fool"]
"The only stupid questions are the ones you fail to ask." - Dad
How do I...? Nevermind.
dybal
---- E L I T E ----
---- E L I T E ----
Posts: 499
Joined: Mon Feb 10, 2020 12:47 pm

Re: [Beta] Release of Telescope 2.0

Post by dybal »

cag wrote: Thu Nov 10, 2022 9:54 pm

dybal wrote: Thu Oct 27, 2022 12:00 am
... It sometimes crash on me, but I only know it because I play with the Latest.log being displayed, so I see the stack dump, since it recovers "gracefully".
If those telescope crashes recur, please post the details here.
One example:

Code: Select all

21:43:37.313 [telescope]: 
function auto_updates()          caught:        TypeError: map.ent is null
    file: rary/ApplicationSupport/Oolite/ManagedAddOns/oolite.oxp.Norby.cag.Telescope.oxz/Scripts/telescope.js...
        line: 7019,     _mostCentered( "grav" )
    file: rary/ApplicationSupport/Oolite/ManagedAddOns/oolite.oxp.Norby.cag.Telescope.oxz/Scripts/telescope.js...
        line: 8479,     _auto_updates( (void 0) )
    file: rary/ApplicationSupport/Oolite/ManagedAddOns/oolite.oxp.Norby.cag.Telescope.oxz/Scripts/telescope.js...
        line: 8415,     auto_updates()
Another one:

Code: Select all

22:52:06.634 [script.javaScript.exception.notFunction]: ***** JavaScript exception (escortdeck 1.12-wip): TypeError: ws.$TelescopeList.indexOf is not a function
This one comes from this code (in my WIP EscortDeck code):

Code: Select all

             var ws = w.$EscortDeckTWS; //Telescope worldScript
             if( ws ) {
                var mi = ws.$TelescopeList.indexOf( s );
                if( mi == -1 ) ws.$Telescope_Scan(); //forced rescan
                if( mi > -1 ) {
                   if(  ws.$TelescopeListi != mi + 1 ) {
                      ws.$TelescopeListi = mi + 1;
                      ws.$Telescope_Show2( false ); //lock target
                   }
                }
Post Reply