Release EDDI 3.3 - Bring your cockpit to life

I found a way to be notified of undiscovered bodies in a system.
There's a variable for "alreadydiscovered" but this only returns on a body you've already scanned.

A way around this is as follows.
You can put this in your discovery scan event.

Code:
{if Len(reportsystem.bodies) < reportsystem.totalbodies:
  There may be undiscovered bodies in this system
}

The "totalbodies" variable reports back the full number of bodies in the system as reported by the discovery scanner. Whereas Len(reportsystem.bodies) seems to only returns bodies that have been found (as appears in the system map).

Hope this helps someone.
I'll post my updated EDDI personality in the next few days for anyone who wants it.

Note: I typed this on my phone so sorry if there's any syntax errors.
 
I found a way to be notified of undiscovered bodies in a system.
There's a variable for "alreadydiscovered" but this only returns on a body you've already scanned.

A way around this is as follows.
You can put this in your discovery scan event.

Code:
{if Len(reportsystem.bodies) < reportsystem.totalbodies:
  There may be undiscovered bodies in this system
}

The "totalbodies" variable reports back the full number of bodies in the system as reported by the discovery scanner. Whereas Len(reportsystem.bodies) seems to only returns bodies that have been found (as appears in the system map).

Hope this helps someone.
I'll post my updated EDDI personality in the next few days for anyone who wants it.

Note: I typed this on my phone so sorry if there's any syntax errors.
reportsystem.bodies contains full body data for bodies that EDDI knows about. This may include data from EDSM in previously discovered systems but in an undiscovered system it'll just contain just the data about the bodies that you've scanned yourself.
 
Last edited:
reportsystem.bodies contains full body data for bodies that EDDI knows about. This may include data from EDSM in previously discovered systems but in an undiscovered system it'll just contain just the data about the bodies that you've scanned yourself.

Strange, I'm out of the bubble now and have been experimenting with it, there are undiscovered systems entirely that still seem to work.
Eg: I pop on, system map shows just a star, undiscovered. discovery scanner says there's say 10 bodies, so there is still bodies that are yet to be found.
I tested it with a voice call out so I actually got the count from Len(reportsystem.bodies) and reportsystem.totalbodies and sure enough it called out 1 (.bodies) and 10 (totalbodies), and correctly stated that there was undiscovered bodies in the system.
Tested on a few systems and all worked as intended.
Only way I can think that would happen is if someone had been through all of those systems which uploaded it to edsm, but didnt turn in the data meaning they'd still be undiscovered?
 
Strange, I'm out of the bubble now and have been experimenting with it, there are undiscovered systems entirely that still seem to work.
Eg: I pop on, system map shows just a star, undiscovered. discovery scanner says there's say 10 bodies, so there is still bodies that are yet to be found.
I tested it with a voice call out so I actually got the count from Len(reportsystem.bodies) and reportsystem.totalbodies and sure enough it called out 1 (.bodies) and 10 (totalbodies), and correctly stated that there was undiscovered bodies in the system.
Tested on a few systems and all worked as intended.
Only way I can think that would happen is if someone had been through all of those systems which uploaded it to edsm, but didnt turn in the data meaning they'd still be undiscovered?
I think you misunderstand my intent. I'm not trying to offer a correction, you're approach is correct. :)
 
I use the true/false query on body.alreadydiscovered ...

Example:
{for body in reportSystem.bodies : {if body.alreadymapped: {set alreadymapped to alreadymapped + 1}} {if body.alreadydiscovered = true : {set alreadydiscovered to alreadydiscovered + 1}} {if body.alreadydiscovered = false : {set no_discovered to no_discovered + 1}} ...
 
I use the true/false query on body.alreadydiscovered ...

Example:
{for body in reportSystem.bodies : {if body.alreadymapped: {set alreadymapped to alreadymapped + 1}} {if body.alreadydiscovered = true : {set alreadydiscovered to alreadydiscovered + 1}} {if body.alreadydiscovered = false : {set no_discovered to no_discovered + 1}} ...
The problem with this is that .alreadydiscovered will only return properly once the body has been scanned. Meaning you would still need to FSS scan the entire system before knowing which bodies are undiscovered.
I wanted to know if their are undiscovereds when I honk, not when I scan.
Caveat, using it that way WILL work on stars, as it seen when you discovery scan, the stars are counted as scanned, and the alreadydiscovered variable will be populated correctly. So you can still use this as a way to find completely undiscovered systems (as the stars will be undiscovered so the script will work and advise you that there are undiscovered bodies), but the count won't be correct, and it won't work on systems that have been discovered but still have some undiscovered bodies in them.
That's why I was happy to find my work around as it works purely from a discovery scan, even on partially scanned systems
 
I think you misunderstand my intent. I'm not trying to offer a correction, you're approach is correct. :)
So, after a bit more flying around it seems it wasn't working as I had hoped.
I've now found some systems where it will report as undiscovered when everything has already been found.
So I guess the first few I tested, people must have been linked to EDSM, but these newer ones Ive come across they hadnt, and therefore EDDI doesnt know about themso it returns as undiscovered incorrectly.

Not sure there's any other way around this :(
to clarify,
reportSystem.totalbodies - this will return the total count of bodies as shown by the discovery scanner yes?
reportSystem.bodies - this will only return bodies that EDDI knows about, which it gets from either scanning ourselves, or from data fetched from EDSM.
There is no other way to get a count of bodies as shown on the system map directly from the game and not relying on EDSM? I assume that information isn't written to the journal and therefore cant be accessed by EDDI directly?
 
I found a way to be notified of undiscovered bodies in a system.
There's a variable for "alreadydiscovered" but this only returns on a body you've already scanned.

A way around this is as follows.
You can put this in your discovery scan event.

Code:
{if Len(reportsystem.bodies) < reportsystem.totalbodies:
  There may be undiscovered bodies in this system
}

The "totalbodies" variable reports back the full number of bodies in the system as reported by the discovery scanner. Whereas Len(reportsystem.bodies) seems to only returns bodies that have been found (as appears in the system map).

Hope this helps someone.
I'll post my updated EDDI personality in the next few days for anyone who wants it.

Note: I typed this on my phone so sorry if there's any syntax errors.
I've been using something similar to this as well. I have a script to report on the current scanned state of a system:
Code:
{_ Bodies Exploration Report _}
{_ Report on the current exploration status of the current system. _}


{_ Preferences _}
{F("Body Mapping Preferences")}

{_ Fetch from context _}
{set reportSystem to SystemDetails(state.eddi_context_system_name)}

{_ Identify bodies worth mapping _}
{set totalBodies to reportSystem.totalbodies}
{set scannedBodies to len(reportSystem.bodies)}
{set scannedStars to 0}
{set toMap to 0}
{set mappedBodies to 0}

{_ For some reason, on rare occasions the number of system.bodies is greater than it should _}
{_ be when loading, i.e. 23 in a system with only 22 bodies. This tries to fix that. _}
{if scannedBodies > totalBodies: {set scannedBodies to totalBodies}}

{for body in reportSystem.bodies:
    {if body.mapped:
        {set mappedBodies to mappedBodies + 1}
    |elif body.bodyType.invariantName = "Star":
        {set scannedStars to scannedStars + 1}
    |elif body.terraformState.invariantName != "Not terraformable":
        {if reportTerraformables:
            {set toMap to toMap + 1}
        }
    |elif reportPlanetTypes[body.planetClass.invariantName] || body.estimatedvalue > highValueThreshold:
        {set toMap to toMap + 1}
    }
}

{if totalBodies > 0:
    This system has
    {if totalBodies = scannedBodies:
        been fully
        {set pre to "but"}
    |elif scannedBodies - scannedStars > 0:
        {Occasionally(2, "only")} been partially
        {set pre to "and"}
        {set mid to "so far"}
        {set post to "yet"}
    |else:
        not been
        {set pre to "so"}
        {set post to "yet"}
    }
    scanned
    {if scannedBodies < totalBodies:
        {set remaining to totalBodies - scannedBodies}
        , with {remaining} {if remaining = 1: body |else: bodies} remaining
    }
    {if toMap > 0:
        , and {if mid: {mid},} {F("Bodies to map")}
    |elif toMap = 0 && mappedBodies > 0:
        , and all bodies worth mapping {mid}, have been mapped.
    |else:
        , {pre} no 
        {if totalBodies - scannedStars > 0:
            bodies worth mapping
        |else:
            mappable bodies
        }
    have been detected {post}.
    }
}
I mainly use it when loading into a game to remind me how much of the system I have scanned & mapped, and how much I have left to do, but I can call it up at any time to give me the details. You're welcome use and modify it if you wish. :)

At the top, I have a function call to the preferences. I made it a separate script to centralise all preferences for the multiple scripts that have this at the beginning.
Code:
{_ Body Mapping Preferences _}
{_ Used to centralise reporting preferences that are used in various scripts_}

{set reportTerraformables to true}   {_ Reports all terraformable and terraformed bodies _}
{set highValueThreshold to 80000}    {_ The minimum threshold for estimated exploration value worth mapping _}
{set reportNoBodiesToMap to true}    {_ Report when no mappable bodies found in a system _}
{set reportPlanetTypes to [
    "Ammonia world": true,
    "Earth-like world": true,
    "Gas giant with ammonia based life": false,
    "Gas giant with water based life": false,
    "Helium gas giant": false,
    "Helium-rich gas giant": false,
    "High metal content world": false,
    "Icy body": false,
    "Metal-rich body": false,
    "Rocky body": false,
    "Rocky ice world": false,
    "Class I gas giant": false,
    "Class II gas giant": false,
    "Class III gas giant": false,
    "Class IV gas giant": false,
    "Class V gas giant": false,
    "Water giant": false,
    "Water giant with life": false,
    "Water world": true
]}
 
So, after a bit more flying around it seems it wasn't working as I had hoped.
I've now found some systems where it will report as undiscovered when everything has already been found.
So I guess the first few I tested, people must have been linked to EDSM, but these newer ones Ive come across they hadnt, and therefore EDDI doesnt know about themso it returns as undiscovered incorrectly.

Not sure there's any other way around this :(
to clarify,
reportSystem.totalbodies - this will return the total count of bodies as shown by the discovery scanner yes?
reportSystem.bodies - this will only return bodies that EDDI knows about, which it gets from either scanning ourselves, or from data fetched from EDSM.
There is no other way to get a count of bodies as shown on the system map directly from the game and not relying on EDSM? I assume that information isn't written to the journal and therefore cant be accessed by EDDI directly?
Correct, the journal doesn't provide any detail about the number of bodies currently visible in the system map.
 
Guys, i'd like to ask there before opening a "feature request" on GitHub (but: if i should do that instead, pls tell me :) )

Do you think that these new commands (buttons, Menu, whatever) could be added in EDDI UI?

1) "Create a new personality" - Copies the default one in the personalities folder, asking for a new name and description
2) "Refresh" - updates the list of selectable personalities in the combo box
3) "Export <this script> - <the personality> to a .cottle file" - exports the scripts in a text file as we see and read them in the editor.

3) is a request deriving from the very hard way to compare/update existing personalities. I know there's a discussion going on how to improve this whole part, but meanwhile is a pain: we cannot even open 2 EDDI instance to copy/paste scripts between them, there's not any utility that helps managing the scripts, so at least an export function would give use the ability to have one version in a editor and another on EDDI to make changes.
 
Guys, i'd like to ask there before opening a "feature request" on GitHub (but: if i should do that instead, pls tell me :) )

Do you think that these new commands (buttons, Menu, whatever) could be added in EDDI UI?

1) "Create a new personality" - Copies the default one in the personalities folder, asking for a new name and description
2) "Refresh" - updates the list of selectable personalities in the combo box
3) "Export <this script> - <the personality> to a .cottle file" - exports the scripts in a text file as we see and read them in the editor.

3) is a request deriving from the very hard way to compare/update existing personalities. I know there's a discussion going on how to improve this whole part, but meanwhile is a pain: we cannot even open 2 EDDI instance to copy/paste scripts between them, there's not any utility that helps managing the scripts, so at least an export function would give use the ability to have one version in a editor and another on EDDI to make changes.
1) The Copy personality button already does this.
2) I imagine that this would be because the folder contents may have changed. We can look into this.
3) .cottle files are exactly the way that @VerticalBlank has wanted to handle this, as you've already discussed in the current ticket https://github.com/EDCD/EDDI/issues/523 (there's no need to open a new ticket for the same issue. :)).
 
@Ruddy88 I just wanted to say a quick thanks for bringing this subject up. It's given me reason to look over the scripts in my personality, and update and improve them. I probably wouldn't have bothered to go back over them otherwise. :)

I have a couple of code pieces that I've updated, that you may (or may not) be interested in for the aforementioned reporting...

In the 'FSD engaged' script, I have this near the end:
Code:
        {if reportsystem.visits = 0 && reportsystem.population = 0:
            {if len(reportsystem.bodies) = 0:
                {_ Based on data fetched from EDSM.  If the system has been discovered, _}
                {_ but not reported to EDSM, this will incorrectly say you are the first. _}
                {OneOf("This system may not have been previously discovered",
                       "You may be the first person to discover this system",
                       "This system may not have been registered with Universal Cartographics",
                       "This system may yet to be registered with Universal Cartographics")}.
                {OneOf("Checking", "Confirming", "Verifying")}, please stand by:
                {SetState("eddi_context_undiscovered", true)}
            }
        }
When jumping to a new system, this will tell you if EDDI thinks it's not yet been discovered. Now, bearing in mind that this can be wrong (as you have found out), I've come up with another piece of code. This time, it's for the 'Star scanned' script.

Put this just before the {F("Star report")} line in 'Star scanned':
Code:
    {if event.mainstar:
        {if event.alreadydiscovered = false:
            Universal Cartographics {OneOf("has confirmed", "confirms", "has verified", "verifies")}
            you are the first {OneOf("", "commander", "person")}
            to {OneOf("discover", "enter", "visit")}
            {OneOf(system.systemname, "this system")}.
        |elif state.eddi_context_undiscovered = true:
            Universal Cartographics
            {OneOf("database", "information")}
            {Occassionally(2, "has been")} updated.
            This system has {OneOf("already been discovered", "been discovered already")}.
        }
        {SetState("eddi_context_undiscovered", false)}
    }
This is triggered by the autoscan that is performed after every jump, and uses the game data from the Journal to confirm if the system has already been visited or not by checking the status of the main star. It won't tell you if the whole system has been scanned, but will tell you if the system has been visited before by someone else.

If the system has already been discovered, and EDDI knows about it, then nothing will be spoken. This is to prevent it from triggering while travelling around the bubble or Colonia.

I've also overhauled the script I posted above, to be much better and more accurate. I've also made a VoiceAttack command that will allow you to select any system on the galaxy map and request information on it, like if it's been explored already or not. However, this only works in Odyssey as it uses the new 'Copy to clipboard' button in the GalMap, which Horizons doesn't have.

Well, anyway, thanks again for giving me something to get my teeth into again, and hopefully (maybe) you'll find these useful. ☺️
 
@Ruddy88 I just wanted to say a quick thanks for bringing this subject up. It's given me reason to look over the scripts in my personality, and update and improve them. I probably wouldn't have bothered to go back over them otherwise. :)

I have a couple of code pieces that I've updated, that you may (or may not) be interested in for the aforementioned reporting...

In the 'FSD engaged' script, I have this near the end:
Code:
        {if reportsystem.visits = 0 && reportsystem.population = 0:
            {if len(reportsystem.bodies) = 0:
                {_ Based on data fetched from EDSM.  If the system has been discovered, _}
                {_ but not reported to EDSM, this will incorrectly say you are the first. _}
                {OneOf("This system may not have been previously discovered",
                       "You may be the first person to discover this system",
                       "This system may not have been registered with Universal Cartographics",
                       "This system may yet to be registered with Universal Cartographics")}.
                {OneOf("Checking", "Confirming", "Verifying")}, please stand by:
                {SetState("eddi_context_undiscovered", true)}
            }
        }
When jumping to a new system, this will tell you if EDDI thinks it's not yet been discovered. Now, bearing in mind that this can be wrong (as you have found out), I've come up with another piece of code. This time, it's for the 'Star scanned' script.

Put this just before the {F("Star report")} line in 'Star scanned':
Code:
    {if event.mainstar:
        {if event.alreadydiscovered = false:
            Universal Cartographics {OneOf("has confirmed", "confirms", "has verified", "verifies")}
            you are the first {OneOf("", "commander", "person")}
            to {OneOf("discover", "enter", "visit")}
            {OneOf(system.systemname, "this system")}.
        |elif state.eddi_context_undiscovered = true:
            Universal Cartographics
            {OneOf("database", "information")}
            {Occassionally(2, "has been")} updated.
            This system has {OneOf("already been discovered", "been discovered already")}.
        }
        {SetState("eddi_context_undiscovered", false)}
    }
This is triggered by the autoscan that is performed after every jump, and uses the game data from the Journal to confirm if the system has already been visited or not by checking the status of the main star. It won't tell you if the whole system has been scanned, but will tell you if the system has been visited before by someone else.

If the system has already been discovered, and EDDI knows about it, then nothing will be spoken. This is to prevent it from triggering while travelling around the bubble or Colonia.

I've also overhauled the script I posted above, to be much better and more accurate. I've also made a VoiceAttack command that will allow you to select any system on the galaxy map and request information on it, like if it's been explored already or not. However, this only works in Odyssey as it uses the new 'Copy to clipboard' button in the GalMap, which Horizons doesn't have.

Well, anyway, thanks again for giving me something to get my teeth into again, and hopefully (maybe) you'll find these useful. ☺️
I like this so much!


I made a better version already. :LOL:
Code:
{if event.scantype = "AutoScan" && event.alreadydiscovered = false && event.mainstar:
    You are the first {OneOf("", "commander", "person")}
    to {OneOf("discover", "enter", "visit")}
    {OneOf(system.systemname, "this system")}.
}
I've added the 'mainstar' variable, so this will only activate if it's the primary star being scanned.
I've already used and adopted your "old version" and it is one of the most useful scripts of the pack (given that i play as an explorer more than anything else).
 
There's any way to add "Human named systems" to EDDI?
I mean:
If EDDI have to speaks about Greae Bluae YE-A g3, there's a way to know that the .... "human name" is "Lights Of Alexandria" and use it?
I see how this have to be taken from a database, i just don't know if it's already there or need to be implemented in the code, or not possible at all.
 
There's any way to add "Human named systems" to EDDI?
I mean:
If EDDI have to speaks about Greae Bluae YE-A g3, there's a way to know that the .... "human name" is "Lights Of Alexandria" and use it?
I see how this have to be taken from a database, i just don't know if it's already there or need to be implemented in the code, or not possible at all.
Not at the moment, but it could be possible if we were to implement https://github.com/EDCD/EDDI/issues/1714.
 
Last edited:
Top Bottom