[Beta] Release of Telescope 2.0

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

Moderators: another_commander, winston

User avatar
gilhad
Dangerous
Dangerous
Posts: 76
Joined: Tue Oct 29, 2019 12:03 pm

Re: [Beta] Release of Telescope 2.0

Post by gilhad »

I have problem with messages:

I just downoladed oolite on new computer, fixed way to OXPs and install lot of them, including Telescope v2 (2.1.4) and Telescope v2 Extender+Gravity Scaner (2.1).
I started new game, bought Telescope (after Towbar and Fuel Scoops) and went to hunt more Asteroids for money and splinters.
I get lot of messages every time I find some Asteroids, chop it to bolders and chop it to Splinters, on the main screen, which also spells it all and it took forever and make other problems. It is the same form as in MFD (10.24 km Asteroid 100 <<^ and such).
I cannot find, how to disable those messages (for everything new in scan range, also ships and such), to have screen again free, I tried F4 Telescope Options, but had no luck to disable it.
I also looked into code, but had no luck there too. Did I miss some setting, or is there some fix/hack to disable it?

-------------------------------------------------------

Ok, culpit is here:

Code: Select all

function showTargetName( map, combatMFDonly ) {
...
//show in Combat MFD instead of console
//store for Combat MFD
...
7668: } else if( !combatMFDonly) {
7669:    consoleMessage( msg, ConsoleMsgDurn );   //fallback to console
and my hack is to disable the test entirely

Code: Select all

7668: } else if( !combatMFDonly && false) {
Lady of Fate, we adore you . . .
cag
Deadly
Deadly
Posts: 209
Joined: Fri Mar 17, 2017 1:49 am

Re: [Beta] Release of Telescope 2.0

Post by cag »

Sorry for the late reply; notification tagged as spam. FYI, email notifications only occur on new posts; when you edited your previous post, no notification was sent. In future, Post Reply (even if it's to yourself!)

Glad to see you were able to disable it an continue playing.

I not clear on what the problem is:
gilhad wrote: Tue Sep 10, 2024 6:38 am
I get lot of messages every time I find some Asteroids, chop it to bolders and chop it to Splinters, on the main screen, which also spells it all and it took forever and make other problems.
You get a message notifying the discovery of newly created bolders & splinters, but not in the format you discribed. Those "<<^ and such", which you disabled, should only occupy a single line (left of center using default HUD) apart from the console log (right of center); it's your current target.

It may be the HUD you're using or some conflict with another OXP, as you "install lot of them". Most of us use a lot; I'm at around 140. As your hack shows, this only appears when Combat MFD is not used (which is another way around it and why it's not been fixed).

I'm going to need more info as I cannot reproduce this:

- log file, just up to the point you launch if there are no relevant error messages
or an off-site link to the entire file (ie. do not paste the entire log here)

- screen shot: hit '*' key on keypad or Shift 8
image: \Oolite\oolite.app\oolite-saves\snapshots
"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
gilhad
Dangerous
Dangerous
Posts: 76
Joined: Tue Oct 29, 2019 12:03 pm

Re: [Beta] Release of Telescope 2.0

Post by gilhad »

Hello cag and sorry I also took time to reply, as I was not at home.

I found, that I later installed CombatMFD, which also solved the problem. For the test I simply moved from ManagedAddOns to other directory and started oolite with Shift held.
I had RSS mission for Black Box, so lot asteroids somewhere, so I leaved station, I set Spoken Messages: On (p, F2, options) and found the asteroid group. There was also lot of ships, but I was on hyperdrive, so I somehow got there. I made few screenshots (005-008) and there it was really visible (on right side up). The game was really lagging as it tried to spoke all the yellow lines and there too much of them, so yellow lines and radar did not match well. Then I terminated the game.
I hope, that this is, what you wanted, see the file attached (2.26 MB approx) (it is hosted on my server, http only, as archive with Latest.log and the screenshots in directory).
I hope it works for this one file. (I will remove it later, like in a month or three, as it is "bad place" for this file at the site, but as fast temporary it should work.)

http://mix.gilhad.cz/tmp/Telescope-001.tar.gz
Lady of Fate, we adore you . . .
cag
Deadly
Deadly
Posts: 209
Joined: Fri Mar 17, 2017 1:49 am

Re: [Beta] Release of Telescope 2.0

Post by cag »

I copied the file so you can delete it any time. I've set up an install w/ all your oxps and we'll see if I can reproduce the problem (baby steps)
"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
gilhad
Dangerous
Dangerous
Posts: 76
Joined: Tue Oct 29, 2019 12:03 pm

Re: [Beta] Release of Telescope 2.0

Post by gilhad »

Hello, I am here again with unclear problem - "Hyperspace mass-locked"

this message started to appear a lot when I am in fast ship and far away from everything and I try to fly really fast - If I have a target locked (like planet 1.000 km far), after getting higher speed (not sure, but more than 20.000 for sure) it states "Hyperspace mass-locked" and falls out of speed. On telescope there is nothing near (like nearest object is 1.000 km away) and no pirate is to be seen.

But what I suspect is, that there is the target visible at radar (as very far object) and also some "shadow target" at like 30 km (the edge of radar) and when I speed up, it get to skip little forward/backward and with higher speed it jumps a little more and then it show "Hyperspace mass-locked" and put me out of hyperspeed (like if some object will show, but there is no object near, just the jumping dot on radar).

Also the problem does not appear, when I select back view and unselect the target (and do not obtain any, as nothing is after me), then I am able to use hyperspeed until I return to normal lane and approach some ship or so (so it mass-lock me, it is ok).

I tried to sell all my telescopes, so no longer it is possible to target lock planets etc and the problem disappered. I was able to hyperspeed until I get near some mass.

That is all I found yet.
Lady of Fate, we adore you . . .
cag
Deadly
Deadly
Posts: 209
Joined: Fri Mar 17, 2017 1:49 am

Re: [Beta] Release of Telescope 2.0

Post by cag »

gilhad wrote: Mon Feb 16, 2026 9:55 am
But what I suspect is, that there is the target visible at radar (as very far object) and also some "shadow target" at like 30 km (the edge of radar)
Yes, Oolite restricts detection to scannerRange. What telescope does for more distant objects is to create a tiny ship just inside scannerRange and keeps it positioned between the player and the distant target. That 2nd distance at the crosshairs is the distance to the marker; there is no way to hide it.

Very high speeds have always been a problem, from ramming the target marker or the marker impacting a moon. These were handled by adding collisionExceptions but there is no masslock exception to bail us out.

But I just discovered today a ship property 'massLockable' (from the oxp Masslock Reimagined). I cannot reproduce your problem on my setup. Care to try a hack?

In telescope.js, ~line 6925, insert the line indicated:

Code: Select all

            if( marker ) removeMarker();                            // remove any existing marker/shadow
            curr_S.marker_type = mark_type;
            if( mark_type === 'marker' ) {                          // addShips(role, count, position, radius);
                marker = addShips( 'telescopemarker', 1, marker_posn, 1 )[ 0 ];
/*** insert the following 1 line ***/
                marker.massLockable = false;                        // need to prevent masslocking the marker
                marker.addCollisionException( ps );                 // avoid limiting Torus speed (Milo & dybal)
                if( !radius ) {                                     // not an orb
                    marker.addCollisionException( ent );            // avoid impacting target
                }
            } else {                                                //replace the markership with visuall effect shadow lollipop
                marker = addVisualEffect( 'telescope-shadow', marker_posn );
            }
"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
gilhad
Dangerous
Dangerous
Posts: 76
Joined: Tue Oct 29, 2019 12:03 pm

Re: [Beta] Release of Telescope 2.0

Post by gilhad »

I applied your hack, but the problem persist :(

I flied far away (6.000 km?), then rotated back, targeted sun and entered hyperspeed (not hyperspace, it was typo), and again it kicked me out with "Hyperspeed mass-locked."

I tried it more times, sometimes the marker jumper just 19.something km near.

I reduced the oxps to

oolite.oxp.Norby.CombatMFD.oxz
oolite.oxp.Norby.HUDSelector.oxz
oolite.oxp.Norby.TorusToSun.oxz
oolite.oxp.Norby.VariableMasslock.oxz
oolite.oxp.Norby.cag.Telescope.oxz (with the hack)
oolite.oxp.Norby.cag.Telescope_Extender.oxz
oolite.oxp.Svengali.Library.oxz
oolite.oxp.cag.station_options.oxz
oolite.oxp.phkb.FastTargetSelector.oxz
oolite.oxp.redspear.power_to_engines.oxz
oolite.oxp.spara.navigation_mfd.oxz

bought (and equiped) Cobra Mk I, with

Scanner Targeting Enhancement
Witchdrive Fuel Injectors
Docking Computers
Advanced Space Compass
Navigation MFD
Combar MFD
Telescope
Torus to Sun
Telescope Extender
Forward Military Laser


I flied far away (~2.000 km) from planet, then rotated back, targeted sun and entered hyperspeed, and again it kicked me out with "Hyperspeed mass-locked."
Lady of Fate, we adore you . . .
cag
Deadly
Deadly
Posts: 209
Joined: Fri Mar 17, 2017 1:49 am

Re: [Beta] Release of Telescope 2.0

Post by cag »

My hack didn't work because the masslockable property is unique to player's ship, not any ship <sigh>.

I rebooted w/ clean install and the oxp's you listed (couldn't buy all the equipment though). And I can now reproduce the bug!

But I don't know why it happens now, as it did not before my reboot. This may take a while ...

In the meantime, just steer 10 degrees or so off target.
"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.
cag
Deadly
Deadly
Posts: 209
Joined: Fri Mar 17, 2017 1:49 am

Re: [Beta] Release of Telescope 2.0

Post by cag »

I found the culprit - variablemasslock.

It implements ship specific masslock radii by playing around with entity's scanClass. The telescope marker starts out unable to induce masslock but once variablemasslock has done it's thing, well, you know.

For a quick fix, insert the following single line into variablemasslock.js,
function $VM_Timed @ ~line 184:

Code: Select all

	if( player.alertCondition > 2 ) return; //no check in red alert
	var s = p.checkScanner(false);//much faster than filteredEntities
//	var s = system.filteredEntities(w, w._isShip, p, p.scannerRange); //slow

	var vm = true; //variable masslock active
	if( s ) for( var i = 0; vm && i < s.length; i++ ) {
		var t = s[i];
// ** insert this 1 line @ ~line 184 
		if( t.hasOwnProperty('$TelescopeTarget') ) continue; 
		if( t && t.isValid ) {
			var dist = t.position.distanceTo( p.position );
In the mean time, I'll see if I can get these two to play nice. If not, we may have to exclude variablemasslock from telescope - this may have been the cause of your other issue (or not :? )
"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: 5620
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 »

cag wrote: Thu Feb 19, 2026 5:56 pm
For a quick fix, insert the following single line into variablemasslock.js,
If that's the fix, I can push an update to Variable Masslock.
cag
Deadly
Deadly
Posts: 209
Joined: Fri Mar 17, 2017 1:49 am

Re: [Beta] Release of Telescope 2.0

Post by cag »

You may as well wait
1) to see if gilhad has checked it out and
2) I'm 80% finished re-writing it!

I've only sped it up 20% and it was fast to begin with but the memory leaks :shock:
0.15 MB / frame * 60 fps = 9 MB / sec
That's ridiculous worst case but would cause garbage collect every 29 sec!
I've got it down to 0.01MB / frame and am chasing the rest. Anyone spare some coffee?
"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.
cag
Deadly
Deadly
Posts: 209
Joined: Fri Mar 17, 2017 1:49 am

Re: [Beta] Release of Telescope 2.0

Post by cag »

I've done all I can for now. Barring any bugs, it'll do. You can find the new variablemasslock.js here:

https://www.dropbox.com/scl/fi/wxeof3e5 ... tngrv&dl=0

Thanks phkb for handling the update. It's been so long, I'd screw it up somehow!

Now to tackle the telescope end to see if they can be made compatible... tomorrow (maybe)
"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
gilhad
Dangerous
Dangerous
Posts: 76
Joined: Tue Oct 29, 2019 12:03 pm

Re: [Beta] Release of Telescope 2.0

Post by gilhad »

Thank you all,

I tried this fix and it really works like miracle :)

Code: Select all

		if( t.hasOwnProperty('$TelescopeTarget') ) continue; 
Lady of Fate, we adore you . . .
cag
Deadly
Deadly
Posts: 209
Joined: Fri Mar 17, 2017 1:49 am

Re: [Beta] Release of Telescope 2.0

Post by cag »

phkb wrote: Thu Feb 19, 2026 8:17 pm
cag wrote: Thu Feb 19, 2026 5:56 pm
For a quick fix, insert the following single line into variablemasslock.js,
If that's the fix, I can push an update to Variable Masslock.
gilhad seems to like it, so yes, push the update.

I'd thought I could reconcile the 2 oxp's by changing variablemasslock to use player.ship.masslockAble and leave the other ships' scanClass alone. I got it working but Oolite CTD's. I've narrowed it down to just loading my rewrite & Basic-debug.oxp. I'm downloading the build from 6 hours ago to double check. Is there a procedure/wiki page for submitting this?
"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.
cag
Deadly
Deadly
Posts: 209
Joined: Fri Mar 17, 2017 1:49 am

Re: [Beta] Release of Telescope 2.0

Post by cag »

cag wrote: Sun Feb 22, 2026 1:58 am
... Is there a procedure/wiki page for submitting this?
Nevermind, found it.
Bug report guidelines
"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.
Post Reply