Elite Observatory - Search your journal for potentially interesting objects, or notify you of new ones on the fly while exploring!

Can this alert me if I jump into a system and there is a Listening Post, Unregistered Coms, or other Items not related to astronomy so much but more on Human and Alien signals ?

Ultimately, it depends if it ends up in the journal or not. Guardian sites, for example, do not so this wouldn't help there. Listening Posts and Unregistered Comms Beacons should appear in FSSSignalDiscovered event I think - so I don't think these are available directly in the Custom Criteria, but you (or someone) could write a plugin to notify you in those instances.
 
Yeah, I also tried "if scan.TerraformState then...", in both cases the error message was the same. It's the only criteria in my custom file at the moment.

MIght it be a file codepage issue? Or CR/LR character issue?
As I said before, your script looks fine from what I can see. It's possible that there's some kind of encoding issue happening, but since you appear to be using Notepad++ it should be a simple matter to save the file using UTF-8 and remove that as a potential tripping point. Also, be sure to re-enable custom criteria after an error. They automatically disable on error to avoid spamming a potentially very large number of messages.

To your specific error, the problem it's reporting is that result = if scan.TerraformState then is invalid syntax, but the only way you'd ever see a script constructed like the one on the right is by writing a multi-line criteria after a single-line criteria directive. In this case specifically, I'd expect you used ::Terraformable::, as that's what appears in the return line.

If you're going to write a multi-line script it must start with ::Criteria::. If you're going to put your description in the initial directive, as with ::Terraformable::, it must be only a single line boolean expression and not a complete Lua function.
 
Ultimately, it depends if it ends up in the journal or not. Guardian sites, for example, do not so this wouldn't help there. Listening Posts and Unregistered Comms Beacons should appear in FSSSignalDiscovered event I think - so I don't think these are available directly in the Custom Criteria, but you (or someone) could write a plugin to notify you in those instances.
If I found the Event names I am after, is there a basic script somewhere I can use but I just add the event name from the journal to it ?

I found these for example :-
{ "timestamp":"2021-09-09T13:16:01Z", "event":"FSSSignalDiscovered", "SystemAddress":1900262951243, "SignalName":"$ListeningPost:#index=1;", "SignalName_Localised":"Listening Post" }

{ "timestamp":"2019-08-18T07:42:09Z", "event":"FSSSignalDiscovered", "SystemAddress":5306465653474, "SignalName":"$NumberStation:#index=1;", "SignalName_Localised":"Unregistered Comms Beacon" }
 
Last edited:
If I found the Event names I am after, is there a basic script somewhere I can use but I just add the event name from the journal to it ?

I found these for example :-
{ "timestamp":"2021-09-09T13:16:01Z", "event":"FSSSignalDiscovered", "SystemAddress":1900262951243, "SignalName":"$ListeningPost:#index=1;", "SignalName_Localised":"Listening Post" }

{ "timestamp":"2019-08-18T07:42:09Z", "event":"FSSSignalDiscovered", "SystemAddress":5306465653474, "SignalName":"$NumberStation:#index=1;", "SignalName_Localised":"Unregistered Comms Beacon" }
These events don't currently trigger anything in Explorer, for custom criteria or otherwise. Though maybe they should?

As things stand, for Observatory to catch them at the moment would require writing and building a completely new plugin. It could be done in any language supported by .NET 5 (Visual Basic, C#, F#, maybe others?). How "simple" a task that is depends entirely on your degree of .NET development experience.
 
These events don't currently trigger anything in Explorer, for custom criteria or otherwise. Though maybe they should?

As things stand, for Observatory to catch them at the moment would require writing and building a completely new plugin. It could be done in any language supported by .NET 5 (Visual Basic, C#, F#, maybe others?). How "simple" a task that is depends entirely on your degree of .NET development experience.
I have zero experiance with .NET 5
 
I have zero experiance with .NET 5
Here you go

It'll notify for Unregistered Comms, Listening Posts and NSPs. In the event of multiples of the same signal in a single system, it'll only notify once. It's barely tested as I'm nowhere near any signals. In the event of any problems, please post them in this thread instead of cluttering this one. (I don't plan on changing it much unless it breaks horribly somehow, though).
 
Here you go

It'll notify for Unregistered Comms, Listening Posts and NSPs. In the event of multiples of the same signal in a single system, it'll only notify once. It's barely tested as I'm nowhere near any signals. In the event of any problems, please post them in this thread instead of cluttering this one. (I don't plan on changing it much unless it breaks horribly somehow, though).
Wow thank you very much.

What do I do with the file ?
 
Last edited:
I've noticed for bodies like "XXX XXXXX AB 5" (or whatever number) the voice announcement says what sounds like "Body of 2" weird
Yeah, this was an issue in the original observatory as well at first. The text-to-speech needs to be explicitly instructed to spell out anything that might even remotely be pronounceable. So it's saying "ab" (which I guess sounds a bit like "of"), instead of spelling out "A - B".

In the previous Observatory I did a bit of parsing on the planet name string to pick out the letters and make that happen. Unfortunately in Observatory Core the part that finds interesting planets (the Explorer plugin) is not as closely coupled to the part that makes the voice announcements (built into Core) which needs to be able to handle arbitrary notifications from all plugins, so I can't assume anything about how the content is formatted to make decisions like "should this part be spelled out".

In light of the above I'm planning to extend the interface through which plugins send notifications, so that the plugins themselves can optionally specify how something should be said out loud, if necessary (along with a few other enhancements to assist with some future planned features). Unfortunately I can't commit to a timeframe on that right now.
 
For the record: I checked my custom criteria file in Notepad++, all looked good, UTF-8, no weird characters. So I converter it to UTF-16, then converted it back to UTF-8 and... it works! :)

No idea what was the reason of my issues but apparently they're gone. :)

Next step will be criteria for jumponium mats. :)
 
Last edited:
Yeah, this was an issue in the original observatory as well at first. The text-to-speech needs to be explicitly instructed to spell out anything that might even remotely be pronounceable. So it's saying "ab" (which I guess sounds a bit like "of"), instead of spelling out "A - B".

In the previous Observatory I did a bit of parsing on the planet name string to pick out the letters and make that happen. Unfortunately in Observatory Core the part that finds interesting planets (the Explorer plugin) is not as closely coupled to the part that makes the voice announcements (built into Core) which needs to be able to handle arbitrary notifications from all plugins, so I can't assume anything about how the content is formatted to make decisions like "should this part be spelled out".

In light of the above I'm planning to extend the interface through which plugins send notifications, so that the plugins themselves can optionally specify how something should be said out loud, if necessary (along with a few other enhancements to assist with some future planned features). Unfortunately I can't commit to a timeframe on that right now.
Legend. No rush, all in good time
 
Some very simple custom rules (ps. we should have an area where we can submit our favourite rules without them getting lost in the forum threads!) - these also gets Zira to give me a bit more of a human science officer feel to the announcement - I just add the Kelvin to the details for reference. I'll extend these soon with an IF ELSE to give different announcements if they are closer than say 500ls, e.g. X "is a very close undiscovered WHATEVER world, fascinating". Great work OP, and happy nerd tinkering everyone!


Code:
::An Undiscovered Ammonia World, Commander::
scan.WasDiscovered == false and scan.PlanetClass == 'Ammonia world'
::Detail::
'Undiscovered Ammonia world ' .. math.floor(scan.SurfaceTemperature) .. ' K'

::An Undiscovered Water World, Commander::
scan.WasDiscovered == false and scan.PlanetClass == 'Water world'
::Detail::
'Undiscovered Water World ' .. math.floor(scan.SurfaceTemperature) .. ' K'

::An Undiscovered Earthlike World, Commander::
scan.WasDiscovered == false and scan.PlanetClass == 'Earthlike body'
::Detail::
'Undiscovered Earthlike Body ' .. math.floor(scan.SurfaceTemperature) .. ' K'
 
Last edited:
Holy! It's amazing! The criteria work like a charm!

Code:
::Global::
maxLevels = {}
maxLevels['arsenic'] = 3.0
maxLevels['cadmium'] = 3.4
maxLevels['germanium'] = 6.4
maxLevels['niobium'] = 3.0
maxLevels['polonium'] = 1.3
maxLevels['vanadium'] = 10
maxLevels['yttrium'] = 2.6
maxLevels['desperationLevel'] = 0.2

function checkRawMatContent(scan, matName)
    local resResult = false
    local resTitle, resDesc = ''
 
    if scan.Landable then
        for material in materials(scan.Materials) do
            if material.name == matName then
                if tonumber(material.percent) >= ((1 - tonumber(maxLevels['desperationLevel'])) * tonumber(maxLevels[matName])) then
                    resResult = true
                    resDesc = 'Content: ' .. string.format("%.1f", material.percent) .. ' %'
                    if scan.Volcanism ~= nil and scan.Volcanism ~= '' then
                        resTitle = 'High ' .. matName .. ' content with volcanism'
                    else
                        resTitle = 'High ' .. matName .. ' content'
                    end
                end
            end
        end
    end
    return resResult, resTitle, resDesc
end
::End::
-- Raw mats
::Criteria::
resResult, resTitle, resDesc = checkRawMatContent(scan, 'arsenic')
if resResult then
    return resResult, resTitle, resDesc
end
::End::
::Criteria::
resResult, resTitle, resDesc = checkRawMatContent(scan, 'cadmium')
if resResult then
    return resResult, resTitle, resDesc
end
::End::
::Criteria::
resResult, resTitle, resDesc = checkRawMatContent(scan, 'germanium')
if resResult then
    return resResult, resTitle, resDesc
end
::End::
::Criteria::
resResult, resTitle, resDesc = checkRawMatContent(scan, 'niobium')
if resResult then
    return resResult, resTitle, resDesc
end
::End::
::Criteria::
resResult, resTitle, resDesc = checkRawMatContent(scan, 'polonium')
if resResult then
    return resResult, resTitle, resDesc
end
::End::
::Criteria::
resResult, resTitle, resDesc = checkRawMatContent(scan, 'vanadium')
if resResult then
    return resResult, resTitle, resDesc
end
::End::
::Criteria::
resResult, resTitle, resDesc = checkRawMatContent(scan, 'yttrium')
if resResult then
    return resResult, resTitle, resDesc
end
::End::

1631308782155.png


My criteria are by any means a coding masterpiece but the results are amazing! I've been dreaming of something like this for years! :love::love::love:

Some credits sent for a beer or whatever OP drinks during weekends. 💪
 
Last edited:
Back
Top Bottom