Release EDDI Scripts and EDDI enabled VA Commands Thread

Hmm, so I had the idea to use destinationstation, as a carrier will appear in the Status.json when targeted as a destination (when in the same system). However, this only seems to be populated by using the RouteDetail() function, so will not work in this way.

Thank you for the script, but I think you may have misunderstood.

The problem is that when entering normal space at a fleet carrier, event.bodytype is not "station". It is always either "planet" / "moon" / "star", describing the body that the fleet carrier is orbiting.

I'm at the point now where I think this could be impossible with the information we currently have available with EDDI (but will be glad to be proved wrong if that's not that case). However, as fleet carriers are noted as a destination in the Status.json file, I'm wondering if it will be possible to have this 'destination' data made available to EDDI under the status object? Maybe something like status.target or status.destination (as that's what it is called in the file). @T'kael any thoughts on this at all?

This is what the Status.json looks like when a fleet carrier is locked as a destination:
Code:
{ "timestamp":"2021-09-28T18:26:28Z", "event":"Status", "Flags":150994952, "Flags2":0, "Pips":[2,8,2], "FireGroup":1, "GuiFocus":0, "Fuel":{ "FuelMain":25.700008, "FuelReservoir":0.544398 }, "Cargo":0.000000, "LegalState":"Clean", "Balance":2474362611, "Destination":{ "System":7267755566465, "Body":1, "Name":"SRS ASTRA INCLINANT Q7W-66T" } }

With this data, I thought about matching a fleet carrier signal source with this 'destination' when entering normal space, as this will almost certainly be the same, meaning that you returned to normal space at that particular fleet carrier.

EDIT: No.. wait.. that wouldn't work 100%. You could target a FC and then drop to normal space somewhere else, so my idea wouldn't be completely accurate. Damn. Still, it would be nice to have that 'status.destination' available. ;)

Well, that gives us an array of carriers. It's a start. I've not given up yet.

[EDIT]

First thing for me is to figure out is what object type a carrier is seen as.
 
Last edited:
Well, that gives us an array of carriers. It's a start. I've not given up yet.
Well, I had been working on getting a SystemDetails().carriersignalsources list, then iterating through the SystemDetails().stations, and where they match known fleet carriers in the first list, getting all the relevant 'station' data. I was hoping that I could then use something like StationDetails().distancefromstar and maybe match that with the distance the body is, but you can have multiple FC's at a single body. Or maybe some other station data, but there really isn't anything I can find that could be used to match things up correctly and reliably.

The closest thing I can think of right now, is to use the distancefromstar property, and match that with the body you arrive at (or as close as you can), but like I said, you can have multiple FC around a body, so you wouldn't be able to tell which one you had arrived at.
 
It's a tricky problem and I'm afraid there probably isn't enough information in the journal to resolve it. I'd love to be wrong about that though so please let me know if you think you see a workable angle. :)
 
It's a tricky problem and I'm afraid there probably isn't enough information in the journal to resolve it. I'd love to be wrong about that though so please let me know if you think you see a workable angle. :)
I may try to run some test later, looking at the Status.json file, to see if that can give us any opportunity to take advantage of. In the mean time, would it be possible to add a feature to the status variables of EDDI for the 'destination' property of the Status.json file please? I can open a ticket if you prefer?
 
Oooohhh.... I may be onto something here... Bear with me, it's a little convoluted...

So, the Status.json file stores the currently selected destination, which includes FC's. Entering normal space at the selected FC makes the music track "DestinationFromSupercruise" play, albeit briefly before it changes to "Exploration". Entering normal space anywhere else, other than the selected destination, only plays the "Exploration" music, not the destination music. This gives us the opportunity we're looking for. If the destination in the Status.json is a FC, then the music track will only play when arriving at it! It's the missing link we need between FC's and entering normal space!

Now, the problem with this is that the 'Entered normal space' event triggers before the music event does. However, if we have the destination property available to use under status, then we can add code to the 'Music' event that will check if the destination is a FC, and then speak an appropriate response, something like "The fleet carrier <name> is located here".

Here's a quick and dirty example of the code we could add to the music event:
Code:
{if event.musictrack = "DestinationFromSupercruise":
    {set reportSystem to SystemDetails(system.systemname)}
    {if find(reportSystem.carriersignalsources, status.destination) > -1:
        The fleet carrier {status.destination} is located here.
    }
}

So... thoughts?

EDIT: Greatly shortened the code. I realised I didn't need to do so much set up. :)
 
Last edited:
Is the "final destination" variable only set after a route plot, or is it set whenever you select a target station?

If that makes no sense, it's cos I'm in the pub. 😁
 
Is the "final destination" variable only set after a route plot, or is it set whenever you select a target station?

If that makes no sense, it's cos I'm in the pub. 😁
Well, I tried selecting a couple of FC's and stations, and seeing if destinationstation was set, but it wasn't. The only way I managed to set it, was to use RouteDetails(). If there is another way to set it, I didn't find it, but then, I didn't look much harder after finding it wasn't set just by selecting a FC/station.

Have a couple of pints for me! (y) 😁
 
Well, I tried selecting a couple of FC's and stations, and seeing if destinationstation was set, but it wasn't. The only way I managed to set it, was to use RouteDetails(). If there is another way to set it, I didn't find it, but then, I didn't look much harder after finding it wasn't set just by selecting a FC/station.

Have a couple of pints for me! (y) 😁

Is the "final destination" variable only set after a route plot, or is it set whenever you select a target station?

If that makes no sense, it's cos I'm in the pub. 😁
Yes it's only set by RouteDetails() at this time.
 
Ahh, it's almost Christmas, so have a Christmas gift from me... a new version of my EDDI personality. ;) I've made a lot of updates since my last version three months ago, so be sure to check out the change log! 😁

Seems my last version was downloaded 95 times (or at least viewed that many times). I never realised that so many would like it... well, interested enough to take a look at it anyway. ;) Thanks everyone! 😊

As always, let me know if you find any bugs, or anything wrong. 👍
 

Attachments

  • Darkcyde's Defaults - 21-12-21.zip
    240.5 KB · Views: 198
Yes it's only set by RouteDetails() at this time.

Just came across this in the stickies regarding journal entries:

[exceprt]
SuitLoadout on starting on-foot, or when disembarking:
Fix station type when docking at FleetCarrier
Fix bug with incorrect LoadoutID in CreateSuitLoadout event
[/excerpt]

I'll see what else I can find out.
 
Aaaaaand.... new question.

I have a "tell me about the next system" VA script. On a lot of systems the name of the system is spoken as "say as, say as characters less than" blah blah.

Any ideas how to get it to either give it its best shot at pronouncing the name, or just spell it out letter by letter?

Cheers.
 
Aaaaaand.... new question.

I have a "tell me about the next system" VA script. On a lot of systems the name of the system is spoken as "say as, say as characters less than" blah blah.

Any ideas how to get it to either give it its best shot at pronouncing the name, or just spell it out letter by letter?

Cheers.
Have you tried using SSML? You need to tick the option on the Say Something with TTS dialogue then use something like this
Code:
<speak version="1.0" xml:lang="en-US">
You've entered the
       <say-as interpret-as="characters">{TXT:EDDI jumped system}</say-as>
system
</speak>
 
Aaaaaand.... new question.

I have a "tell me about the next system" VA script. On a lot of systems the name of the system is spoken as "say as, say as characters less than" blah blah.

Any ideas how to get it to either give it its best shot at pronouncing the name, or just spell it out letter by letter?

Cheers.
I'm not so great at VA, so I use it sparingly, mainly to call EDDI scripts where I get EDDI to do all the work.

In this case I have something similar in my VA/EDDI where I use a VA command to ask for info on the current system I'm in / system selected on the GalMap / system targeted in the cockpit. I use VA to get the correct system based on whichever one I have asked for, and set some variables, then pass those over to EDDI to do the main work via the 'System report' script. This way I can get EDDI to do all the correct pronunciation of system and body names.

You may find it useful for you, if you handed over the pronunciation stuff to EDDI, but I guess that depends on how you use your command and how much it relies on EDDI.

My VA command is a bit long (ok, maybe not that long for some people ;)), but here it is in case it's of use for anyone:
When I say: Tell me about the [current; selected; target] system
Code:
Set text [Script] to 'Processing:'
Execute external plugin, 'EDDI 4.0.1' using context 'say'
Set text [temp_system] to '{TXT:EDDI state eddi_context_system_system}'
Set text [eddi_context_system_system] to [Not Set]
Set text [eddi_context_report_name] to [Not Set]
Set text [State variable] to 'eddi_context_report_name'
Execute external plugin, 'EDDI 4.0.1' using context 'setstate' and wait for return

Begin Text Compare : [{LASTSPOKENCMD}] Contains 'current'
    Set text [Script] to 'Current system:'
    Execute external plugin, 'EDDI 4.0.1' using context 'say' and wait for return
    Set text [eddi_context_system_system] to '{TXT:System name}'
Else If Text Compare : [{LASTSPOKENCMD}] Contains 'selected'
    Begin Text Compare : [{TXT:Status gui focus}] Equals 'galaxy map'
        Clear the Windows clipboard
        Begin Boolean Compare : [odyssey] Equals True
            Execute command, 'UI Right' (and wait until it completes)
            Start Loop : Repeat 12 Times
                Execute command, 'UI Down' (and wait until it completes)
            End Loop
            Execute command, 'UI Right' (and wait until it completes)
            Execute command, 'UI Right' (and wait until it completes)
            Execute command, 'UI Up' (and wait until it completes)
            Execute command, 'UI Accept' (and wait until it completes)
            Set text [Script] to 'Selected system:'
            Execute external plugin, 'EDDI 4.0.1' using context 'say' and wait for return
            Execute command, 'UI Right' (and wait until it completes)
            Execute command, 'UI Down' (and wait until it completes)
            Execute command, 'UI Accept' (and wait until it completes)
            Set text [eddi_context_system_system] to '{CLIP}'
        Else
            Set text [Script] to 'This does not function in Horizons.'
            Execute external plugin, 'EDDI 4.0.1' using context 'say'
        End Condition
    Else
        Set text [Script] to 'Please select a system on the Galaxy Map.'
        Execute external plugin, 'EDDI 4.0.1' using context 'say'
    End Condition
Else If Text Compare : [{LASTSPOKENCMD}] Contains 'target'
    Begin Condition : ([{TXT:EDDI state eddi_context_next_route_destination}] Has Been Set AND [{TXT:EDDI state eddi_context_next_route_destination}] Does Not Equal 'Not set')
        Set text [eddi_context_system_system] to '{TXT:EDDI state eddi_context_next_route_destination}'
        Set text [Script] to 'Target system:'
        Execute external plugin, 'EDDI 4.0.1' using context 'say' and wait for return
    Else
        Set text [Script] to 'No system currently targetted.'
        Execute external plugin, 'EDDI 4.0.1' using context 'say'
    End Condition
End Condition

Begin Text Compare : [eddi_context_system_system] Has Been Set
    Set text [State variable] to 'eddi_context_system_system'
    Execute external plugin, 'EDDI 4.0.1' using context 'setstate' and wait for return
    Set text [Script] to 'System report'
    Execute external plugin, 'EDDI 4.0.1' using context 'speech' and wait for return
End Condition
Set text [eddi_context_system_system] to '{TXT:temp_system}'
Set text [State variable] to 'eddi_context_system_system'
Execute external plugin, 'EDDI 4.0.1' using context 'setstate' and wait for return
The only downside to this, is the fact that the 'selected' system on the GalMap will only work in Odyssey due to the fact you can't set a system name to the clipboard in Horizons.
 
Aaaaaand.... new question.

I have a "tell me about the next system" VA script. On a lot of systems the name of the system is spoken as "say as, say as characters less than" blah blah.

Any ideas how to get it to either give it its best shot at pronouncing the name, or just spell it out letter by letter?

Cheers.
Have you tried using {TXT:Next system name (spoken)}? This should return EDDI's phonetic rendition of the system name, formatted using SSML (you'll want to enable SSML if using VoiceAttack to synthesize the speech).
 
The script already used the "spoken" variable.

Then, I had an epiphany. The script tells me about the system targeted. Why do I need it to tell me the name? I already know the bloody name. I chose it for god's sake. <facepalm> Thank you all for letting me completely waste your time. :oops:

I shall now hide in a cave for several years.
 
The script already used the "spoken" variable.

Then, I had an epiphany. The script tells me about the system targeted. Why do I need it to tell me the name? I already know the bloody name. I chose it for god's sake. <facepalm> Thank you all for letting me completely waste your time. :oops:

I shall now hide in a cave for several years.
Haha! 😆 No worries! :)
 
OK, it's that time again for a new version of my EDDI & VA personality. 😊

I had wanted to release this earlier in the week, but life got in the way, as it tends to do far too often.

Here's the latest changes:
Released 06-05-22
=================

VoiceAttack
===========
((EDDI docked))
- Changed the keypress function calls for automatically entering the hangar to 'one left' instead of 'three right'. This is faster, and should stop instances of keypresses being messed up by the game (it sometimes lagged and ended up doing four right and clicking 'refuel' instead).

((EDDI npc interdiction commenced))
- Changed the name of this to use lowercase 'npc' as that is the correct format, so this should work as intended now.
- Added unblocking mouse and keyboard, in case this cancels 'Autoroute' halfway through, while the mouse and keyboard are blocked.

((EDDI shutdown))
- Copied the write to file code from the 'Update Mission Route' command. This makes things bit simpler than what I had originally.
- Removed setting [gameshutdown] as no longer needed.
- Added a 2 second pause to ensure that the 'missionsdata' variable is correctly set first.

((EDDI undocked))
- Changed setting to allow other commands to execute while this is running. This should stop the log spam when targetting other ships just after takeoff.
- Updated the launch speech section. Because there is no way to know if your Advanced Docking computer is set to work on launch, I've added a check for controls being used to take off. It's not 100% perfect, but close enough to work almost all of the time.
* Note: make sure your VA is set to use Joysticks if you use a joystick/flight stick. This is in Settings -> General -> Joystick Options button.

Update Mission Route
- Removed the [gameshutdown] check as no longer needed.

EDDI
====
General
- Updated all instances of 'ship.role' to 'ship.Role.invariantName' to be language independent.
This applies to the following scripts:
- Body mapped
- Discovery scan
- Location
- Market information updated
- Ring mapped
- Star scanned
- System scan complete

- New 'feature': Log off/on speech reduction.
For those farming materials who log off and on again quickly to respawn material sites, I have added some code in several events that should help to reduce the amount of speech done when loading a game. This was done at the request of (and with help from) CMDR Parduz from the ED forums.
Full speech will be performed when you first start a game, but be reduced when logging off/on. The full speech will be re-enabled if you enter supercruise/FSD, or be performed a single time when a 10 minute timer expires.
It mainly involves setting State variables, then checking them: state.eddi_logoff, state.eddi_relog, and state.eddi_logoff_time.
New code in:
- FSD engaged
- Location
- Mission check galaxy
- Music
- Shutdown
- Surface signals detected

Bodies to map
- Added full description of the mappable bodies, as suggested by Cmdr PHORO on the ED forums.
- Added two new variables for reporting: mapDistance and mapHighVal. Set in 'Body Mapping Preferences', see below.
- Rearranged the order items are reported in the full report. Makes it sound a bit better.
- Added the ability to give a short report or a fully detailed report. This uses a new configuration option for the report type: mapReportType. Set in 'Body Mapping Preferences', see below.
- Updated the check for "not yet scanned" in the 'reportNoBodies' section. This was occasionally being spoken even when all bodies had been scanned in systems with only stars in.
- Added the same checks to the speech in the "all bodies mapped" section. Sometimes there is no Journal event to say a body has been scanned, so EDDI doesn't know about it and thinks some bodies have not been scanned yet, even though they have. Proposed possible fix raised on Github #2315. (This should now be fixed in v4.0.2)
- Added a check for the 'Location' event, so that the short verison will be spoken on game start.
- Added Humanise() to the body's distance from arrival, if it's more than 800 Ls.

Body Mapping Preferences
- Added new configuration options:
mapDistance - Maximum distance in Ls from main star, to report bodies (default: 9999999)
mapHighVal - High value threshold for always reporting a mappable body (for overriding mapDistance) (default: 800000)
mapReportType
0 - Basic body report only (original EDDI default setting)
1 - Full body report first time and basic after that (new default setting)
2 - Full body report at all times

Community goal
- Updated the duration section to use the 'Time Remaining' function.
- Updated the reward section to report based on if the event has ended or not, and if Tier 1 has been reached or not.

Entered normal space
- Updated script to specify Community Goals as separate from normal missions.
- Updated the 'Station' section to add the word "the" if it is not already part of a megaship name, and not for starports also.
- Updated to use 'model' to store the '.invariant' station model names.

FSD engaged
- Updated 'not scoopable' section to only speak if a scoop is fitted to the ship (if you don't have one, you don't care if a star is scoopable).

Location
- Added a check for the last log off time, to skip speech if it's less than 10 minutes. See 'Music' below.

Market information updated
- Added code to prevent repeated speech in quick succession.

Material collected
- Removed the added (and unnecessary) hyphen from 'Obtained'.

Mission accepted
- Added a section near the end to report when all passenger cabins are now occupied.

Mission check station
- Added code to specify Community Goals as separate from normal missions.
- Updated the 'mission.status' variables to use 'mission.statusEDName' like the other 'Mission check...' scripts.

Mission completed
- Fixed initial check for 'active' missions in the last code block (line 138). If 'active' is void (can happen when taking missions from comms messages) this was triggering the wrong part, and would incorrectly say you still had "-1 missions".

Mission redirected
- Added code to set 'miss_name' from 'MissionDetails()', and check/use this instead of 'event.name'. 'event.name' seems to be bugged and never set (always void). Reported on Github #2296 (This should now be fixed in v4.0.2).

Missions Route Fast
- Updated the section reporting how many light years away your destination is. This should ignore '0' (zero) at the end of any distance less than 100 LY, for example "59.0" will be said as "59".
- Updated initial IF check in the missions FOR loop to ignore Community Goals.

Music
- Added a check for logging out to the main menu, and setting a State variable of the timestamp. This is then used to check for a relog in the 'Location' and 'Surface signals detected' events, allowing them to skip speech. This is useful when doing quick relogs. Thanks to CMDR Parduz from the forums for the idea.

Repair drone
- Updated script to use List() for reporting, instead of the loop at the end.

Shields down
- Returned "vun-erable" to the correct spelling of "vulnerable" as using a lexicon for my TTS makes this unnecessary.
- Corrected "shield" to "Shield" in the check for a shield generator.

Ship interdicted
- Corrected setting 'ship', instead of 'shiptype', to 'event.interdictor'.
- Updated to correct how 'Indepenent' pilots are described.

Ship repaired
- Removed the full stops from the 'paint' section near the beginning, as they are unnecessary.
- Updated script to collate same type items together, greatly shortening the report. No more 'Shield Booster' being repeated a dozen times! ;)
- Fixed broken weapon check. 'module.localizedname' was invalid, so this didn't work.
- Updated to check item/module health and only report if it is less than 100. This should stop it reporting all items/modules, when only a few were damaged.
Removed, as this does not work. Modules are usually back to 100 health from the repair, before this event triggers.
Additionally, I found that module health isn't always recorded when damage is taken.
- Added 'hull' to the repaired systems section.
- Removed the ship name from the repaired systems section, and added it to the report at the end. This shortens the code and makes the report a little shorter when there are multiple 'repaired systems'.

Surface signals detected
- Added a check for the last log off time, to skip speech if it's less than 10 minutes. See 'Music' above.
- Updated script to only say 'surface signals' at the end, removing all the repeats.

Swapout check
- Updated the module price check to be similar to the default. Fixes rare error when the price is set as 'void'.

System Exploration Report
- Updated the IF check that sets 'scannedBodies' to use 'max()' so the higher of 'prescannedBodies' or 'totalBodies' will be used. This is more efficient.
- Updated IF check for the 'physical characteristics' section. This should now report if you've visited 5 or fewer times, or if your last visit was more than 10 hours ago. This stops frequent repeating when doing short runs between the same systems.
- Updated check for the initial speech when listing the bodies in a system, so that it says "This system" when there are bodies to map.
- Added an override variable for the 'Bodies to map' function call, so that will always give a full detailed report.
- Added a fallback section to the 'remaining bodies to scan' section, for the rare occasions where this value could be zero or less than zero due to reportSystem having incomplete data.

System state report
- Added a second full stop in the conflicts section. I found faction names that end in an abreviation (like Inc.) would not consider the single full stop as an end of sentence pause. Adding a second one fixes this.

Time Remaining
- Updated script to use an array and List(). This improves the output and fixes a rare problem that didn't use 'and' before the last element.
- Update initial IF check to make sure 't_remaining' actually exists.
- Added initialising all the timer variables to 0, so they will not be 'void' when checking them (I know, noob mistake!).
- Updated the seconds section to add 'just over' at the start of the time report, instead of speaking the seconds in certain situations. This makes it sound better for longer timers.

Touchdown
- Added section to warn of high/low surface temperatures if playing in Odyssey, for on-foot activities. Set the desired temperature scale in Preferences at the top. (Temperature limits may need tweaking)

Undocked
- Added an additional check for missions to the route recalc check. On rare occasions this was activating when it should not.

Once again, I had over 90 'views' of my last version, so thanks to all who chose to use this. As always, if you find any bugs, or have any suggestions, please let me know! 😁
 

Attachments

  • Darkcyde's Defaults - 06-05-22.zip
    246.8 KB · Views: 193
Top Bottom