Release EDDI 3.3 - Bring your cockpit to life

Do you know that there's a SublimeText3 syntax highlighter for Cottle/EDDI on GitHub?
I posed some questions in the Sublime forum about how to build it, some experts build it, and the end result is that now it is "official" and installable as a Package :)

Thought you guys may like to know it.
Excuse my ignorance, but could you explain how to use this. The Github page contains no details.
I found what looks like you entry in the sublime forum, but don't understand it and it has a link to the real info that gives an error 404.
 
Last edited:
Hello everyone ...
Question to the specialists: How can I recognise when a self-generated variable ( SetState() ) is updated by ED ?
OK, one case is clear, when an EDDI event script is triggered by ED and the state-variables are contained there.
But I have noticed that state-variables are updated although they are not present in the corresponding script.
Example replenish ammunition:
In the Ship loadout script, state-variables are set for ammunition. When the script is triggered, these are updated.
But they are also updated when you select the corresponding function in the station main menu or immediately after docking
or in the "Equipment" menu. In the Journal.log you will only find the ED event "BuyAmmo" but not "Loadout".
The EDDI event "Ship restocked" is triggered by "BuyAmmo", but no state-variables are defined there (yet).

Many greetings and a happy first advent from ...

nepomuk

Translated with www.DeepL.com/Translator (free version)
I hope I'm understanding your question correctly here, but as far as I'm aware, user defined state variables (made with SetState() ) will not change unless made to do so with another SetState(). The only times I can think of that this would happen for you, are:
1. When you restart EDDI, and all user defined variables are reset.
2. You exit game (to main menu or desktop) and reload into the game, and the Loadout script is run again.
3. You swap ships and the Loadout script is run again (I think).

I don't think there are any other ways those variables would change, SetState() would not work well if they did. Have you tried searching your scripts for those variables? Use the 'Filter' box at the bottom of the Speech Responder tab to find all scripts with a matching variable. Maybe you have them somewhere else too?

Other than that, I'm not aware of any way to check if a variable has been changed, unless you set a second variable at the same time, to check against, but that would probably be redundant as it's being updated at the same time. There are no 'watch' facilities in EDDI (that I know of anyway) that would allow you to watch variables in real-time to see when they change. Hmm, maybe that's something the team could add at a later date? A kind of 'debug mode' that would show all set variables in real-time? I know it would probably be a huge impact on performance, hence using it only as a debug mode. Well, just a thought. :)

If I have misunderstood your question (I'm not 100% sure that I have understood it) then I apologise, then could you explain it a bit more? Otherwise, I hope I have been of a little help at least. :)

DC
 
Last edited:
Excuse my ignorance, but could you explain how to use this. The Github page contains no details.
I found what looks like you entry in the sublime forum, but don't understand it and it has a link to the real info that gives an error 404.
I freely admit I may be wrong here, but looking over this, it seems to be a plugin for 'Sublime Text 4', a code editor, not for EDDI. My guess is that using the plugin in that software, you can copy in your EDDI scripts to see the syntax highlighting, and once you are satisfied with it being correct, you then copy it back into EDDI. I can't see any way that the plugin would work in EDDI directly, unless I'm missing something (which is quite possible).

EDDI already uses syntax highlighting to a certain degree. The above just seems to use brighter colours, and I'd guess you could customise these to your liking.
 
I hope I'm understanding your question correctly here, but as far as I'm aware, user defined state variables (made with SetState() ) will not change unless made to do so with another SetState(). The only times I can think of that this would happen for you, are:
1. When you restart EDDI, and all user defined variables are reset.
2. You exit game (to main menu or desktop) and reload into the game, and the Loadout script is run again.
3. You swap ships and the Loadout script is run again (I think).

I don't think there are any other ways those variables would change, SetState() would not work well if they did. Have you tried searching your scripts for those variables? Use the 'Filter' box at the bottom of the Speech Responder tab to find all scripts with a matching variable. Maybe you have them somewhere else too?

Other than that, I'm not aware of any way to check if a variable has been changed, unless you set a second variable at the same time, to check against, but that would probably be redundant as it's being updated at the same time. There are no 'watch' facilities in EDDI (that I know of anyway) that would allow you to watch variables in real-time to see when they change. Hmm, maybe that's something the team could add at a later date? A kind of 'debug mode' that would show all set variables in real-time? I know it would probably be a huge impact on performance, hence using it only as a debug mode. Well, just a thought. :)

If I have misunderstood your question (I'm not 100% sure that I have understood it) then I apologise, then could you explain it a bit more? Otherwise, I hope I have been of a little help at least. :)

DC

Hello Darkcyde,
yes, I think you misunderstood me. Sorry for my bad description.
I need to check something again. I think I have a thinking error. I'll get back to you on this question. ...
 
Hello Darkcyde,
yes, I think you misunderstood me. Sorry for my bad description.
I need to check something again. I think I have a thinking error. I'll get back to you on this question. ...
I'm not sure if this is relevant for you, but I have remembered something else about SetState(). You cannot set it to be 'null' or 'void' to try to erase it. Using: {SetState('test1', void)} will not work, and the variable will keep it's original value.

So, for example:
Code:
{SetState('test1', true)}
{state.test1}.

{SetState('test1', void)}    (or {SetState('test1', null)} )
{state.test1}.
This will result in: true. true.

I thought I should mention it, just in case your problem is something like this. :)
 
Last edited:
I'm not sure if this is relevant for you, but I have remembered something else about SetState(). You cannot set it to be 'null' or 'void' to try to erase it. Using: {SetState('test1', void)} will not work, and the variable will keep it's original value.

So, for example:
Code:
{SetState('test1', true)}
{state.test1}.

{SetState('test1', void)}    (or {SetState('test1', null)} )
{state.test1}.
This will result in: true. true.

I thought I should mention it, just in case your problem is something like this. :)
Hello Darkcyde,
oh no thinking error thinking error on my part 🙄. I thought my state variables are read again with the appropriate script. But this is nonsense. 🤪
They are read out like at the start of the game.
 
Excuse my ignorance, but could you explain how to use this. The Github page contains no details.
I found what looks like you entry in the sublime forum, but don't understand it and it has a link to the real info that gives an error 404.

I freely admit I may be wrong here, but looking over this, it seems to be a plugin for 'Sublime Text 4', a code editor, not for EDDI. My guess is that using the plugin in that software, you can copy in your EDDI scripts to see the syntax highlighting, and once you are satisfied with it being correct, you then copy it back into EDDI. I can't see any way that the plugin would work in EDDI directly, unless I'm missing something (which is quite possible).

EDDI already uses syntax highlighting to a certain degree. The above just seems to use brighter colours, and I'd guess you could customise these to your liking.
Sorry for me not have been clear enough, @Ultra Fluffy . @Darkcyde is right: it is an "extension" for Sublime Text 3 (there's a 4?). It can be installed from the editor using the "Package Control" (sort of autoinstaller) and then it will works like @Darkcyde said, using the colors/theme already choosed in the editor (by picking the Cottle syntax manually). *
OR, you can save your scripts in a text file with a .cottle extension and keep there your scripts if you have massive edits across them to do (in my case, i translate EDDI personalities in italian, so i have a whole lot of search/replace to do in ALL the scripts).



* In my case, being a younger no more ;) a Dark theme and a font size larger than the one in EDDI are sort of mandatory features.
 
1638175692879.png

This is how it appears using my theme and color definitions: i can see at a glance single quoted strings (i use them for strings that needs no localization) in pink, double-quoted and "stray" strings in magenta, and the usual keywords/punctuation/constants/comments highlighting.
 
Hm... is there a way to trigger the "system report" script exclusively(!) when I want to hear it? It can be a bit unnerving when traveling through known systems and the only workaround I know is to mute EDDI completely.

Edit: Also, is there a way that EDDI can tell me if I have already discovered all planets of the system I'm in ? I think that's not possible, is it?
 
Last edited:
Hm... is there a way to trigger the "system report" script exclusively(!) when I want to hear it? It can be a bit unnerving when traveling through known systems and the only workaround I know is to mute EDDI completely.

Edit: Also, is there a way that EDDI can tell me if I have already discovered all planets of the system I'm in ? I think that's not possible, is it?

Hello Belandriel,
as far as I know, this is not possible with the stand-alone version of EDDI. If you use voice attack, you could do that two different commands.
Switch off/on current voice
turn off/on EDDI's voice output

2nd question: I think so. There is the event script "System scan complete".
 
Hm... is there a way to trigger the "system report" script exclusively(!) when I want to hear it? It can be a bit unnerving when traveling through known systems and the only workaround I know is to mute EDDI completely.

Edit: Also, is there a way that EDDI can tell me if I have already discovered all planets of the system I'm in ? I think that's not possible, is it?
As @nepomuk says, the only way to get the 'System report' to trigger when you want it, is to use Voice Attack. You could create a VA command that runs the report when you ask it to. Literally, you can say "Please run the System report", or anything else you like.

In my VA profile, I have a command that does just this, but I have greatly expanded it. It also includes the political state as well as the physical properties of the system. Not only that, but I have options to allow me to ask about the targeted system in the cockpit, or the selected system when in the Galaxy map. That last one I use a lot when looking for systems to explore out in the black. Being told about interesting systems before you decide to jump to them, is very nice.

Here's what the first part of my VA command looks like:
1638907681374.png

For your second question, part of my EDDI script that deals with all of the above, also tells me if I have visited, or explored the system in question. That also includes if I have fully or partially scanned the system, or not scanned the system at all. On top of that, it also gives a brief list of all the body types and how many of them are present in the system.

This is all done as briefly as possible, so it doesn't take too long. The only thing it needs, is for you to have visited before (or the system is well known in the bubble), or for someone else to have visited and reported the data to EDSM. I take that into consideration too, so if EDSM doesn't know about the system, I have speech to let me know that. If I visit a system unknown to EDSM, that has been explored by someone who didn't report it, then I have speech to say "Universal Cartographics database updated. This system has previously been visited by other Commanders".

I have my scripts run when jumping, or when I ask for the information. Here's a couple of examples:
Destination confirmed. Silcarius is on route to the Kambila system. This is your first visit to this system. Kambila is a poorly policed independent Theocracy of 580,000 people, and is aligned to Pranav Antal. Church of the Space Cat is the controlling power. There are 3 orbital stations and 2 planetary stations in this system. This system is made up of: 2 stars, 1 Class 1 gas giant, 1 Water world, 1 Ammonia world and 10 Icy bodies. 2 of these are valuable mapping targets.
Telemetry obtained. Into the Black 2 is heading to the Synuefe A R dash U d 3 dash 7 system. This is your first visit to this system. You may be the first person to discover this system. Checking, please stand by:
Fuel reserves now at 86 percent.
Auto scan complete. star A is notable, relative to similar class G stars, with an unusually high solar mass of 1.2 times Sol's. As you can see, it emits a yellow-white light. Universal Cartographics database updated. This system has already been discovered.
Telemetry obtained. Into the Black 2 is heading to the Phylur B M dash Y c 15 system. This is your first visit to this system. This system may not have been previously discovered. Verifying, please stand by:
Auto scan complete. Body 1 Analysis completed. Planet 1 is an exceptional High metal content world with an incredibly high mass at nearly 11 times Earth's, an incredibly large radius of over 11 and a half thousand kilometers, and an extremely high surface temperature of just over 6 thousand degrees Celsius.
Universal Cartographics has verified you are the first person to visit this system.
1 star and 1 body analysed, 18 bodies remain to be scanned here.

Here's an example from when I ask about a system on the GalMap:
Coll 2 8 5 Sector L B dash L b 9 dash 3 is unpopulated. You have yet to visit here. However, it has been previously visited by other Commanders, and is reported as: 2 stars, 1 High metal content world, 1 Rocky ice world and 19 Icy bodies.

Hmm, sorry this reply is a bit long, but this subject has been something of a pet project for me recently, and I've done a lot of work on it for my VA profile and EDDI personality. 😁

EDIT: Corrected typos.
 
Last edited:
@Belandriel

EDDI needs some sort of trigger to begin executing an event. With EDDI running as a standalone app the trigger is normally from player journal data being written to a file. When running EDDI as a VoiceAttack plugin, you may additionally use the Speech function to invoke a System report as a command action.

It should be possible to write a script similar to Bodies to map that would tell you about any undiscovered bodies in the system you are in (or tell you if you've fully discovered the system).
 
(just asking for a "simple and fast" answer, and a pointer to a source file for the hard details)
invoke a System report as a command action.
Could it be possible to obtain the same (invoke a script) by sending Windows custom messages (events?) to the EDDI.exe process/window?
Or to write a simple "host" to use EDDI as a plugin so to have keystrokes or screen buttons to fire EDDI events? (sort of that tiny hosts that runs VST plugins instead of loading a full DAW)
 
First of all, thank you all for your answers!

1.) Sorry, my bad. I should have mentioned that I already use Voice Attack and know how to make (very) simple commands. I didn't know though how to use event scripts, so thanks for that info. Alas, the only parameters seem to be:
  • {event.count} - The count of bodies from the scanned system
  • {event.systemname} - The name of the scanned system
Can I somehow make a script where I ask EDDI "Is this system already scanned?" where he can reply with a simple "Yes" or "No"?

2.) I can mute EDDI via Voice Attack, but I just want him to not automatically provide a system report after every jump when arriving at the star. Is there a way to do that? Because the option to untick "System report" is greyed out in EDDI.
 
First of all, thank you all for your answers!

1.) Sorry, my bad. I should have mentioned that I already use Voice Attack and know how to make (very) simple commands. I didn't know though how to use event scripts, so thanks for that info. Alas, the only parameters seem to be:
  • {event.count} - The count of bodies from the scanned system
  • {event.systemname} - The name of the scanned system
Can I somehow make a script where I ask EDDI "Is this system already scanned?" where he can reply with a simple "Yes" or "No"?

2.) I can mute EDDI via Voice Attack, but I just want him to not automatically provide a system report after every jump when arriving at the star. Is there a way to do that? Because the option to untick "System report" is greyed out in EDDI.
For item 1, it sounds like you want something like Darkcyde has in their setup so I'll leave it to @Darkcyde to expand on that.

For item 2, System report is an invoked script rather than something directly triggered from a journal event. Please use the search function in the bottom left corner of the Speech Responder to find and disable the specific line of code that is invoking System report?
 
@T'kael My explanation is a bit longer. I hope this is all correct. I had already finished it and didn't want to delete it now. ;)

Hello Belandriel,
Ok, the second question first. The "System report" script is not an "Event script", that is, the script is not triggered by an Elite event. The script is called by another script. Because the name of the script is in another script or is called via the function {F("xxx")}, the box with the check mark is grayed out.
To prevent the script from always starting, you would have to delete the call to the script or mark it as. This would then look like this {_ F("System report")} in the calling script.
The "System report" script is called in the "FSD engaged" script.
With VA you can create a command ( ((EDDI system report)) ) and assign a key or key combination to the command.

Sorry for my English.

Translated with www.DeepL.com/Translator (free version)
 
Can I somehow make a script where I ask EDDI "Is this system already scanned?" where he can reply with a simple "Yes" or "No"?
I'm not sure if you mean create only in VA, or in EDDI then using VA to call the script. Well, I'm better with EDDI than VA, so I've gone that route. :)

Create a new script in EDDI, and call it whatever you like. Maybe "System Scan Check" or something like that. Then paste this into it:
Code:
{_ Fetch from context _}
{set reportSystem to SystemDetails(state.eddi_context_system_name)}

{_ Initialise variables _}
{set totalBodies to reportSystem.totalbodies}
{set scannedBodies to reportSystem.scannedbodies}
{set prescannedBodies to len(reportSystem.bodies)}
{set scannedStars to 0}

{_ Calculate the number of scanned stars _}
{for body in reportSystem.bodies:
    {if body.bodyType.invariantName = "Star" && body.scanned:
        {set scannedStars to scannedStars + 1}
    }
}

{_ Start Speaking _}
{if scannedBodies >= prescannedBodies || (scannedBodies = totalBodies && totalBodies > 0):
    Yes
|elif scannedStars > 0 || scannedBodies > 0:
    Partially
|else:
    No
}

Then in VA create a command like this (using the same script name you used for the above):
1638990225211.png
Whenever you jump into a system and ask "Is this system already scanned?", EDDI will let you know by saying either "Yes", "Partially", or "No".

Now, I have assumed you mean "have you scanned it", rather than "has anyone scanned it" (by other players). I wasn't really sure which you meant. So if you want a script that will do that instead (or as well), then I can come up with an improved version for you. :)

Basically, all this is, is a super stripped down version of the script I use (that I mentioned previously). So if you do want an updated version, it won't take long to make at all. I should warn you though, that it would rely on data from EDSM. So if a system has been scanned, but not reported to EDSM, then it could give an incorrect answer. For my own script, I simply get it to report if the system has previously been visited by other commanders. If you're interested in my full script, I can post that for you too. :)

EDIT: Added missing line in 'Initialise Variables' in the code.
 
Last edited:
I'm not sure if you mean create only in VA, or in EDDI then using VA to call the script. Well, I'm better with EDDI than VA, so I've gone that route. :)

Create a new script in EDDI, and call it whatever you like. Maybe "System Scan Check" or something like that. Then paste this into it:
Code:
{_ Fetch from context _}
{set reportSystem to SystemDetails(state.eddi_context_system_name)}

{_ Initialise variables _}
{set totalBodies to reportSystem.totalbodies}
{set scannedBodies to reportSystem.scannedbodies}
{set prescannedBodies to len(reportSystem.bodies)}
{set scannedStars to 0}

{_ Calculate the number of scanned stars _}
{for body in reportSystem.bodies:
    {if body.bodyType.invariantName = "Star" && body.scanned:
        {set scannedStars to scannedStars + 1}
    }
}

{_ Start Speaking _}
{if scannedBodies >= prescannedBodies || (scannedBodies = totalBodies && totalBodies > 0):
    Yes
|elif scannedStars > 0 || scannedBodies > 0:
    Partially
|else:
    No
}

Then in VA create a command like this (using the same script name you used for the above):
Whenever you jump into a system and ask "Is this system already scanned?", EDDI will let you know by saying either "Yes", "Partially", or "No".

Now, I have assumed you mean "have you scanned it", rather than "has anyone scanned it" (by other players). I wasn't really sure which you meant. So if you want a script that will do that instead (or as well), then I can come up with an improved version for you. :)

Basically, all this is, is a super stripped down version of the script I use (that I mentioned previously). So if you do want an updated version, it won't take long to make at all. I should warn you though, that it would rely on data from EDSM. So if a system has been scanned, but not reported to EDSM, then it could give an incorrect answer. For my own script, I simply get it to report if the system has previously been visited by other commanders. If you're interested in my full script, I can post that for you too. :)

EDIT: Added missing line in 'Initialise Variables' in the code.
Thanks @Darkcyde.
Note: scannedStars is a subset of reportSystem.scannedbodies (both stars and bodies are included in that count). ;-)
 
Wow, thank you guys! You gave me all the solutions I've been looking for :D

Will try everything out at the weekend!

P.S.: @nepomuk: your English is completely fine, aber ich glaube, zur Not können wir uns auch auf Deutsch unterhalten, falls ich mich recht erinnere und aus irgendeinem Post mal hervorging, dass Du dort irgendwo heimisch bist :D
 
Top Bottom