Release EDDI - Windows app for immersion and more

Status
Thread Closed: Not open for further replies.
I don't have any experince with scripting, but i'll try. Any hint on where to find examples of similar checks?

The 'Swapout check' script does a fair bit with compartments, so that would probably be a good place to look for inspiration.
 
I actually have the code to do this, but EDDI isn't always standalone. If it is started through VoiceAttack it causes problems. I need to talk to the VoiceAttack devs to see of there are any ways around this.

Well the VA note to get the new version by logging out of VA and run the EDDI app to update.
COULD have it show in VA as a batch loaded files launch from VA that runs the update to EDDI and then runs a reset EDDI in VA - a bit of odd code
Note to have EDDI also add a "Launch VoiceAttack" option if they have it installed (both in the App and as a option after update)

Then it doesn't need to have VA directly do anything new
 
I'm pleased to announce the release of EDDI 2.1. This version contains a significant number of changes and fixes, so if you're using EDDI please upgrade at your earliest opportunity.

The full changelog is as follows:

  • Core
    • Add 'stolen' flag and 'missionid' identifier to cargo
    • Use more intelligent method to work from FD names to definitions for commodities, and provide better fallback names if missing
    • Ensure that there is a space either side when using the word 'dash' in place of the symbol '-'
    • Unconditionally disable EDDN and EDSM responders whilst in CQC. This ensures that no data is accidentally sent to these systems
    • Add option to write speech responder output to a file. This is an option that can be checked in the speech responder tab, and writes all speech to %APPDATA%\EDDI\speechresponder.out
    • Allow speech responder to not speak when subtitles are written
    • Retry companion API profile call if returned information is outdated. This should help to avoid situations where outfitting and market data is out-of-date
    • Ensure that distance from home is updated whenever system co-ordinates are updated
    • Ensure that personality names do not contain illegal file or path characters to avoid issues when saving them
    • Send EDDN messages with "Unknown Commander" when commander name is not known
    • Provide new API for EDDI versioning. This allows EDDI to provide more information about updates to users, and is a precursor for automatic updates
    • Track current vehicle which commander is controlling, and make the value available to the speech and VoiceAttack responders
    • Update local system database with details from the journal and companion API. This ensures that this data is always as up-to-date as possible
    • Add unknown ship materials
    • Update Zinc good and great percentages with latest data
    • Fix material name for Cadmium
    • Add 'Engineer' government type for engineer bases
    • Enable update and outdate messages
  • Events
    • Add event when being scanned for cargo by an NPC
    • Add event when being attacked by an NPC
    • Add event when being interdicted by an NPC
    • Add 'Ship shutdown' event
    • Add 'Power voucher received' event
    • Add 'target' to BountyAwardedEvent for Elite release 2.2.03 and above
    • Add 'distance' to JumpedEvent. This provides the distance jumped, in light years
    • ModificationCraftedEvent now has details of commodities used in crafting as well as materials
    • Update mission accepted and completed events to contain more fields. Details on the new fields are in the relevant documentation
    • Update location event with details of station name and type where available
    • Add events when entering and leaving a station's no-fire zone. Details about the individual events are in the relevant documentation
    • Add powerplay events. Details on the new events are in the relevant documentation
    • Provide correct name of repaired item in ShipRepairedEvent
  • Speech Responder
    • Ensure that speech responder's P() Cottle function works for ships
    • Add SetState() Cottle function. Details on how to use this are in the SpeechResponder documentation
    • Fix implementation of ShipDetails() Cottle function so that it works according to its documentation
    • Use fixed-width font for edit script window
  • Speech Responder scripts
    • Update Commodity sale check' script to not suggest that stolen goods or mission-specific goods can be sold
    • Added 'Synthesised' script
    • Fix 'Mission completed' script to correctly provide information about commodities received as mission rewards
    • Update 'Hull damaged' script to only report damage if the player is in the vehicle that is damaged
    • Update 'Docking granted' script to provide clearer information on the location of pads
    • Update 'Touchdown' script to use "coordinates" rather than "co-ordinates" as the latter can cause problems with some TTS voices
    • Update 'Swapout check' script to use modules' modified flag to see if a module has modifications
    • Update 'Commodity sale check' script to ensure that a commodity is in demand at the target station before reporting on a sale
    • Add scripts for new events 'Entered CQC', 'Power commodity fast tracked', 'Power commodity delivered', 'Power commodity obtained', 'Power salary claimed', 'Power expansion vote cast', 'Power defected', 'Power left', and 'Power joined'
    • Update script for 'Mission completed' event to provide more detail on the accepting faction and reward
    • Update script for 'Mission accepted' event to provide a warning about illegal passengers
    • Update script for 'Jumping' event to recognise when last system's allegiance is null (as opposed to empty)
    • Update 'Docking denied' script to provide info on the reason
    • Update 'Location' script to provide correct information when docked at ground stations
    • Update 'Body scanned' script to provide additional information about rotation period of the planetary
    • Update 'Galnet news published' script to read full contents of interesting items
  • VocieAtack integration
    • Add 'Voice' parameter for VoiceAttack's 'say' and 'speech' commands to allow individual over-rides of default Voice
    • Add VoiceAttack 'setspeechresponderpersonality' context to change the speech responder's personality. Details on this is in the VoiceAttack documentation
    • Add VoiceAttack 'disablespeechresponder' and 'enablespeechresponder' contexts to temporarily disable and enable the speech responder. Details on these are in the VoiceAttack documentation
    • Remove reference to 'last jump' in VoiceAttack documentation (this is provided by the JumpedEvent)
    • Use recursive/dynamic method to populate VoiceAttack variables. This provides many more VoiceAttack variables than were previously available; details are in the relevent documentation
    • Add module definitions for SRV, fighter and training loadouts
    • Provide update and MOTD information in VoiceAttack window if applicable
    • Add ability to set state variables from VoiceAttack. Details on how to use this are in the VoiceAttack documentation
    • Ensure that VoiceAttack decimal values are not written as integers

EDDI is available at http://www.mcdee.net/elite/EDDI.exe and links to documentation etc. are in the original post.
 
The 'Swapout check' script does a fair bit with compartments, so that would probably be a good place to look for inspiration.

Thanks mate! As i did not completely get the module part, i fiddled together this one:

Code:
{set oldshiphadbay to 0}
{set newshiphasbay to 0}

{if len(event.storedshipid) = 19:
  {set oldshiphadbay to 1}
 |elif len(event.storedshipid) = 23:
  {set oldshiphadbay to 1}
 |elif len(event.storedshipid) = 44:
  {set oldshiphadbay to 1}
 |elif len(event.storedshipid) = 57:
  {set oldshiphadbay to 1}
 |elif len(event.storedshipid) = 99:
  {set oldshiphadbay to 1}
}

{if len(event.shipid) = 19:
  {set newshiphasbay to 1}
 |elif len(event.shipid) = 23:
  {set newshiphasbay to 1}
 |elif len(event.shipid) = 44:
  {set newshiphasbay to 1}
 |elif len(event.shipid) = 57:
  {set newshiphasbay to 1}
 |elif len(event.shipid) = 99:
  {set newshiphasbay to 1}
}

{if newshiphasbay = 1:
 {if oldshiphadbay = 0:
  Remember to activate your Crew and set the number of bays accordingly.}
}

Of course, far from efficient, but at least it's working.
Not too shabby for a first try, me thinks.
Any optimization tips would be welcome.
 
Thanks mate! As i did not completely get the module part, i fiddled together this one:

Code:
{set oldshiphadbay to 0}
{set newshiphasbay to 0}

{if len(event.storedshipid) = 19:
  {set oldshiphadbay to 1}
 |elif len(event.storedshipid) = 23:
  {set oldshiphadbay to 1}
 |elif len(event.storedshipid) = 44:
  {set oldshiphadbay to 1}
 |elif len(event.storedshipid) = 57:
  {set oldshiphadbay to 1}
 |elif len(event.storedshipid) = 99:
  {set oldshiphadbay to 1}
}

{if len(event.shipid) = 19:
  {set newshiphasbay to 1}
 |elif len(event.shipid) = 23:
  {set newshiphasbay to 1}
 |elif len(event.shipid) = 44:
  {set newshiphasbay to 1}
 |elif len(event.shipid) = 57:
  {set newshiphasbay to 1}
 |elif len(event.shipid) = 99:
  {set newshiphasbay to 1}
}

{if newshiphasbay = 1:
 {if oldshiphadbay = 0:
  Remember to activate your Crew and set the number of bays accordingly.}
}

Of course, far from efficient, but at least it's working.
Not too shabby for a first try, me thinks.
Any optimization tips would be welcome.

You don't need to hardcode ship id's if you check for the presence of the module. So far the code below seems to work well.

I created a 'Fighter bay check' script that checks for the presence of a fighter hanger and sets some states:
Code:
{set modulefound to 0}

{for compartment in ship.compartments:
   {if compartment.module.name = "Fighter Hangar":
      {set modulefound to 1}
   }
}

{if modulefound = 1:
   {if state.fighterbay = 0:
      {SetState("fighterbaywas", 0)}
   |else:
      {SetState("fighterbaywas", 1)}
   }
   {SetState("fighterbay", 1)}
|else:
   {if state.fighterbay = 0:
      {SetState("fighterbaywas", 0)}
   |else:
      {SetState("fighterbaywas", 1)}
   }
   {SetState("fighterbay", 0)}
}

Next, I dropped that check script into the "Commander continued", & "Commander started" scripts:
Code:
{_ Check for the presence of a fighter bay _}
{F("Fighter bay check")}

Finally, I dropped a check and the final output into the "Ship swapped" script:
Code:
{_ Check for the presence of a fighter bay _}
{F("Fighter bay check")}

{if state.fighterbay = 1:
   {if state.fighterbaywas = 0:
      {Pause(1000)}
      {OneOf("Ready for fighter crew assignments.", "Fighter crew ready for new assignments.")}
   }
}
 
Last edited:
Tkael, I like this a lot! I (until now!) did this in a brute force VA command.

If I may suggest some further optimization...


Fighter bay check:
Code:
{set fighterbay to false}

{for compartment in ship.compartments:
   {if compartment.module.name = "Fighter Hangar":
      {set fighterbay to true}
   }
}

{SetState("fighterbay", fighterbay)}


Ship Swapped:
Code:
{set fighterbaywas to state.fighterbay}

{_ Check for the presence of a fighter bay _}
{F("Fighter bay check")}

{if state.fighterbay && !fighterbaywas:
    {Pause(1000)}
    {OneOf("Ready for fighter crew assignments.", "Fighter crew ready for new assignments.")}
}


I would also insert a 'Fighter bay check' script call into your VA command that is executed whenever a VA profile is loaded.

Now, if you're using VA to launch your fighter, you can do something like this in your VA 'Launch Fighter' command...

Code:
Begin Boolean Compare : [EDDI state fighterbay] Equals False
    Say, 'Unable to comply. Fighter bay not installed'
End Condition - Exit when condition met
Execute command, '((Deploy Fighter))' (and wait until it completes)
 
Last edited:
Tkael, Hoodathunk: Thanks mates, pretty sure i can make up something outta this!
Great inspiration.

jgm: i still get 'your test buggy' when returning to ship from srv, is that an FD thing?
 
I have noticed alot more streamers using EDDI on twitch. I think the cat is out of the bag on using EDDI for streaming data with voice and overlays ;)
 
jgm,

The ability to access state variables created within a speech responder script from Voice Attack appears to not behave as expected after updating from 2.1.0-b3 to 2.1.0-final.

I tested the functionality with the following speech responder and Voice Attack scripts:

Voice Attack 'State variable test':
Code:
Set Boolean [test_bool] to True
Set Text [State variable] to 'test_bool'
Execute external plugin, 'EDDI 2.1.0' and wait for return
Set integer [test_int] value to 4
Set Text [State variable] to 'test_int'
Execute external plugin, 'EDDI 2.1.0' and wait for return
Set decimal [test_dec] value to 3.14
Set Text [State variable] to 'test_dec'
Execute external plugin, 'EDDI 2.1.0' and wait for return
Set Text [test_txt] to 'this is a test'
Set Text [State variable] to 'test_txt'
Execute external plugin, 'EDDI 2.1.0' and wait for return
Set Text [Script] to 'State test'
Execute external plugin, 'EDDI 2.1.0' and wait for return
Write '[Blue] Test Boolean = {BOOL:EDDI state test_bool}' to log
Write '[Blue] Test Integer = {INT:EDDI state test_int}' to log
Write '[Blue] Test Decimal = {DEC:EDDI state test_dec}' to log
Write '[Blue] Test Text = {TXT:EDDI state test_txt}' to log
Write '[Blue] Test Two Boolean = {BOOL:EDDI state test2_bool}' to log
Write '[Blue] Test Two Integer = {INT:EDDI state test2_int}' to log
Write '[Blue] Test Two Decimal = {DEC:EDDI state test2_dec}' to log
Write '[Blue] Test Two Text = {TXT:EDDI state test2_txt}' to log


Speech responder 'State test':
Code:
Test boolean is {state.test_bool}.
{Pause(1000)}
Test integer is {state.test_int}.
{Pause(1000)}
Test decimal is {state.test_dec}.
{Pause(1000)}
Test text is {state.test_txt}.

{set test2_bool to false}
{SetState("test2_bool", test2_bool)}
{SetState("test2_int", 7)}
{SetState("test2_dec", 2.72)}
{SetState("test2_txt", "This is another test")}

{Pause(3000)}
Test two boolean is {state.test2_bool}.
{Pause(1000)}
Test two integer is {state.test2_int}.
{Pause(1000)}
Test two decimal is {state.test2_dec}.
{Pause(1000)}
Test two text is {state.test2_txt}.


The speech responder script behaved (verbally) exactly of written/expected. Voice Attack produced the following results:

Code:
Test Boolean = True
Test Integer = 4
Test Decimal = 3.14
Test Text = this is a test
Test Two Boolean = Not set
Test Two Integer = Not set
Test Two Decimal = Not set
Test Two Text = Not set


As you can see, EDDI state variables can be accessed from Voice Attack when Voice Attack creates the states variables, but not when the speech responder does.

In my circumstance, this has 'broken' some speech responder/VA scripts that were previously working and used regularly in 2.1.0-b3.
 
Last edited:
I downloaded EDDI yesterday and installed. This morning when I invoked VA and the profile was told 2.1 is available. Followed the link in this forom which downloaded the (seemingly) identical EDDI.exe and copied the extracted EDDI folder into the VA Apps folder overwriting the old one. When starting VA it still tells me version 1.4.0 initialised.
What have I done wrong?
 
Last edited:
I downloaded EDDI yesterday and installed. This morning when I invoked VA and the profile was told 2.1 is available. Followed the link in this forom which downloaded the (seemingly) identical EDDI.exe and copied the extracted EDDI folder into the VA Apps folder overwriting the old one. When starting VA it still tells me version 1.4.0 initialised.
What have I done wrong?

It sounds like you downloaded EDDI.zip, which was an old version.

You should ensure that you download http://www.mcdee.net/elite/EDDI.exe and follow the upgrade instructions at https://github.com/cmdrmcdonald/EliteDangerousDataProvider#upgrading-eddi
 
I downloaded your GENUINE "little" Tool today.
Managed to set it up with VA and did a quicktest to stow the landing gear automatically after undocking from a station with ((EDDI undocked)). Followed your instruction from the video on Page1 exactly. But the script is never triggered:( Bug?
To checkI created another event with ((EDDI entered normal space)) to just play a sound. This worked well.
 
I keep getting a 0 for cmdr.insurance. I have it set at 5.0 in the home system/station screen and when testing out of game, it seems to work but in-game, it always reads as 0.

My insurance check script is as follows

Code:
{set insurance to round(ship.value * cmdr.insurance / 100)}
{set covereds to round((cmdr.credits / insurance - 0.51))}

{if covereds = 0:
  Danger: you do not have enough credits to cover your insurance excess.
|elif covereds = 1:
  Caution: you only have enough credits to cover a single insurance excess.
|elif covereds < 4:
  Note: you only have enough credits to cover {covereds} insurance excesses.
|else:
  You have enough credits to cover round({covereds}) insurance excesses.
}

I use the -0.51 because I want it to round down. When I test the script out of game, it reads correctly. In game it reads as -1.
 
I checked the EDDI reference personaity and the script for insurance check is as above but it still doesn't read insurance properly. So as a workaround I changed the first line to say
Code:
{set insurance to round(ship.value * 0.05)}
And it works just fine.
 
I downloaded your GENUINE "little" Tool today.
Managed to set it up with VA and did a quicktest to stow the landing gear automatically after undocking from a station with ((EDDI undocked)). Followed your instruction from the video on Page1 exactly. But the script is never triggered:( Bug?
To checkI created another event with ((EDDI entered normal space)) to just play a sound. This worked well.

Got it working :D
Deleted my first VA script and made a new one.
 
jgm,

The ability to access state variables created within a speech responder script from Voice Attack appears to not behave as expected after updating from 2.1.0-b3 to 2.1.0-final.

I tested the functionality with the following speech responder and Voice Attack scripts:

Voice Attack 'State variable test':
Code:
Set Boolean [test_bool] to True
Set Text [State variable] to 'test_bool'
Execute external plugin, 'EDDI 2.1.0' and wait for return
Set integer [test_int] value to 4
Set Text [State variable] to 'test_int'
Execute external plugin, 'EDDI 2.1.0' and wait for return
Set decimal [test_dec] value to 3.14
Set Text [State variable] to 'test_dec'
Execute external plugin, 'EDDI 2.1.0' and wait for return
Set Text [test_txt] to 'this is a test'
Set Text [State variable] to 'test_txt'
Execute external plugin, 'EDDI 2.1.0' and wait for return
Set Text [Script] to 'State test'
Execute external plugin, 'EDDI 2.1.0' and wait for return
Write '[Blue] Test Boolean = {BOOL:EDDI state test_bool}' to log
Write '[Blue] Test Integer = {INT:EDDI state test_int}' to log
Write '[Blue] Test Decimal = {DEC:EDDI state test_dec}' to log
Write '[Blue] Test Text = {TXT:EDDI state test_txt}' to log
Write '[Blue] Test Two Boolean = {BOOL:EDDI state test2_bool}' to log
Write '[Blue] Test Two Integer = {INT:EDDI state test2_int}' to log
Write '[Blue] Test Two Decimal = {DEC:EDDI state test2_dec}' to log
Write '[Blue] Test Two Text = {TXT:EDDI state test2_txt}' to log


Speech responder 'State test':
Code:
Test boolean is {state.test_bool}.
{Pause(1000)}
Test integer is {state.test_int}.
{Pause(1000)}
Test decimal is {state.test_dec}.
{Pause(1000)}
Test text is {state.test_txt}.

{set test2_bool to false}
{SetState("test2_bool", test2_bool)}
{SetState("test2_int", 7)}
{SetState("test2_dec", 2.72)}
{SetState("test2_txt", "This is another test")}

{Pause(3000)}
Test two boolean is {state.test2_bool}.
{Pause(1000)}
Test two integer is {state.test2_int}.
{Pause(1000)}
Test two decimal is {state.test2_dec}.
{Pause(1000)}
Test two text is {state.test2_txt}.


The speech responder script behaved (verbally) exactly of written/expected. Voice Attack produced the following results:

Code:
Test Boolean = True
Test Integer = 4
Test Decimal = 3.14
Test Text = this is a test
Test Two Boolean = Not set
Test Two Integer = Not set
Test Two Decimal = Not set
Test Two Text = Not set


As you can see, EDDI state variables can be accessed from Voice Attack when Voice Attack creates the states variables, but not when the speech responder does.

In my circumstance, this has 'broken' some speech responder/VA scripts that were previously working and used regularly in 2.1.0-b3.

I've taken a look at this but can't reproduce it on my side.

What this might be, is that Voice Attack state variables (along with all other Voice Attack variables) are only refreshed when an event occurs. Because the responders are run asynchronously it is possible that sometimes the speech responder updates state before the Voice Attack responder starts, so that the state updates pretty much immediately. Other times it might be that the speech responder hasn't finished before the Voice Attack responder starts, so that the state doesn't update until the next event.

To confirm if this is the case, could you run your Speech Responder script, make an event occur, then check the Voice Attack state variables? They should be populated after the event occurs.

As to the issue itself, I'm afraid that there is no simple solution. There are a few things that I could do to help the state information show up in VoiceAttack regardless of events, but nothing simple or immediate I'm afraid.
 
Status
Thread Closed: Not open for further replies.
Back
Top Bottom