Release EDDI Scripts and EDDI enabled VA Commands Thread

Here are all the functions that EDDI adds to Cottle:
Code:
BlueprintDetails()
BodyDetails()
CombatRatingDetails()
Distance()
EconomyDetails()
Emphasize()
EmpireRatingDetails()
ExplorationRatingDetails()
F()
FederationRatingDetails()
GalnetNewsArticle()
GalnetNewsArticles()
GalnetNewsDelete()
GalnetNewsMarkRead()
GalnetNewsMarkUnread()
GovernmentDetails()
Humanise()
ICAO()
List()
Log()
MaterialDetails()
Occasionally()
OneOf()
P()
Pause()
Play()
SecondsSince()
SecurityLevelDetails()
SetState()
ShipCallsign()
ShipDetails()
ShipName()
Spacialise()
SpeechPitch()
SpeechRate()
SpeechVolume()
StartsWithVowel()
StateDetails()
StationDetails()
SuperpowerDetails()
SystemDetails()
TradeRatingDetails()
 
I've set up a page in the wiki and also created issue #303 for we devs to automate the documentation like we do for the events.

This won't happen overnight, but it's progress.

Many of these functions are documented in Help.md (which opens when you click the 'Help' button while editing scripts or is accessible on Github at https://github.com/EDCD/EDDI/blob/master/SpeechResponder/Help.md). I'm surprised that 'Distance()' wasn't already recorded there. Definitely something for us to fix. :)
 
Last edited:
Hi BumbleB,

I used to use that calculation myself, but I was introduced to an 'undocumented' command called 'Distance()'.

Set your current system and destination system, then use Distance to get the distance between them. Like so:-
Code:
{set curr to SystemDetails("Leesti")}
{set dest to SystemDetails("Sol")}
{set distance to round(Distance(curr.x, curr.y, curr.z, dest.x, dest.y, dest.z), 2)}

This will set the variable 'distance' to the numerical value in light years to two decimal places. So, in the above example, 'distance' is set to '111.03'. Then all you need to do is use VA to set the destination you want a distance for, and have your script use your current system to start the measure from.

If you need any further help with this, then I'll see what I can do for you. :)

o7

-=] Darkcyde [=-

Typically I just set that as my home system in EDDI, or set it as my destination in Captain's Log if I'm using that as an overlay.

Broken how? Need more info to advise.

I can offer some micro-optimisations and readability improvements based on the principles of
  • the arithmetic operators +, -, * etc generally make for more readable script than the corresponding functions
  • x * x is far more efficient than pow(x, 2)
  • passing a larger formula "across the boundary" is generally faster than passing lots of fragments back and forth
That said, performance gains can differ greatly depending on your system.

Code:
{_ Calculate distance to destination system}

{if state.destinationexploration:
{set dest to SystemDetails(state.destinationexploration)}

{set dx to dest.x - system.x}
{set dy to dest.y - system.y}
{set dz to dest.z - system.z}

{set distance to round(pow(dx * dx + dy * dy + dz * dz, 0.5), 1)}

{SetState('distance', distance)}
}

I tend to use the EDSM bot in one of the exploration Discord servers for that, but that does mean alt-tabbing out of the game and that's bad enough even if you aren't in VR. So I can definitely see the use case. Thing is, the selection of destinations would probably need to be set up in advance -- full speech recognition for all systems is a tall order.

Thoughts welcomed.

Thanks for the tips guys but I'm not cottle programmer, I can just about handle Voice-attack on a good day. I'm totally confused as to what to put where in EDDI and VA. I've tried to add what you guys have put but I'm getting some weird responses as i think some variables used in other scripts.

I already use EDDI built in Home System which is good I just want to be able to set the destination system and get the distances from that every time I jump and be able to change it on VA. I'm basically setting up my EDDI to be VR ready when i do go VR next yr sometime.
 
Guys I am trying to create a "full report" command in VA so that my "virtual co-pilot" will tell me about the state of the ship.

I tried using:
Code:
{DEC:Ship health}
{DEC:Ship power plant health}
{DEC:Ship thrusters health}
{DEC:Ship power distributor health}
{DEC:Ship frame shift drive health}
{DEC:Ship life support health}
{DEC:Ship sensors health}

But it isn't accurate. For example, last night after a dogfight I used the command and VA told me my Hull (Ship health) was 100, while in fact it was bellow 95. And then I openned the "Modules panel" and checked the state of the above listed modules and many didn't match too.

Any hints on what I should change? Or is it some sort of bug in EDDI (or lack of access to the ED API)?
 
From what I remember those values are not updated often maybe every 5 mins at best. Not good in the middle of a fight
 
Guys I am trying to create a "full report" command in VA so that my "virtual co-pilot" will tell me about the state of the ship.

I tried using:
Code:
{DEC:Ship health}
{DEC:Ship power plant health}
{DEC:Ship thrusters health}
{DEC:Ship power distributor health}
{DEC:Ship frame shift drive health}
{DEC:Ship life support health}
{DEC:Ship sensors health}

But it isn't accurate. For example, last night after a dogfight I used the command and VA told me my Hull (Ship health) was 100, while in fact it was bellow 95. And then I openned the "Modules panel" and checked the state of the above listed modules and many didn't match too.

Any hints on what I should change? Or is it some sort of bug in EDDI (or lack of access to the ED API)?

I'm afraid the data that's available in this area is not well suited for combat scenarios, as BumbleB has already said. The data is not available via any sort of continuous feed. Instead it is given as discrete "events" when certain conditions are met.

The best sources we have for this data are the Frontier API and the "Loadout" event in the player journal.
- Frontier have asked that 3rd party apps be nice and poll the Frontier API as rarely as possible (for EDDI, we'll typically poll each time you dock or switch ships, when you first log in, and only rarely when you are in open space).
- The "Loadout" event in the player journal is only written when you first start or switch ships. The "HullDamage" event is only written for every 20% change in your hull.
- There is no "ModuleDamage" event in the player journal.

Note: See here or here if you'd like more information on how the player journal works and on what data is available there.
 
Last edited:
Thanks for the explanation, Tkael.

So, for now, there is no way to do what I wanted. Oh well :D

Again, huge congrats to the EDDI team. You guys have been doing an outstanding work \o/
 
Hi guys,

I have a request for help creating a script.

I would like to have ASTRA (Ivona's Amy voice in TTS) ask me if I would like her to raise the landing gear. I have this in the Undocked event. Here's my prototype script (with some notes added in bold):

Code:
{set title to OneOf(' sir',' captain',' commander','')}        [B]{_ THIS GIVES A 3 IN 4 CHANCE OF CALLING ME BY AN HONORARY TITLE USED LATER IN THE SCRIPT, AND 1 IN 4 CHANCE OF NOT USING A TITLE AT ALL}[/B]
{set initiative to OneOf('1','2','3')}                                   [B]{_ THIS IS MY ATTEMPT AT MAKING A RANDOM 1 IN 3 CHANCE USED LATER IN THE SCRIPT}[/B]


{Pause(2750)}


{Occasionally(2, "
   {OneOf('The Docking clamps have dissengaged.', 'The docking clamps have released.', 'Thrusters engaged.', 'Full control re-established.', 'Docking clamps free.', 'Disengaged from local networks.')} 
   {Pause(250)}
                 ")}




{set limpetcheck to F("Limpet check")}
{set contactscheck to F("ContactsCheck")}


{if limpetcheck || contactscheck:
    {Pause(2000)}
    {limpetcheck}
    {contactscheck}         [B]{_ IF THIS LIMPET CHECK OR CONTACTS SCRIPT IS ACTIVATED THEN SHE WONT ASK ME ABOUT LANDING GEAR}[/B]


|elif initiative = "1":        [B]{_ OTHERWISE SHE HAS A 1 IN 3 CHANCE TO ASK ME IF I WANT THE LANDING GEAR RASIED} [/B]
   {Pause(2000)}
   {OneOf('Shall I','Would you like me to')}
   {OneOf('raise','retract')}
   the landing gear {title}?




|elif initiative = "2":       [B]{_ AND A 1 IN 3 CHANCE OF SIMPLY TELLING ME THAT SHE IS RAISING THEM AND DOING IT ON HER ON OWN}[/B]
   {Pause(2000)}
   {Occasionally(2, 'I am')}
   {OneOf('raising','retracting')}
   the landing gear
   {Occasionally(2, 'now')}
   {title}.

[B]{_ MEANING BY DEFAULT THERE IS ALSO A 1 IN 3 CHANCE OF NOT ASKING ME AT ALL, REQUIRING ME TO TELL HER TO RAISE THE LANDING GEAR THROUGH VOICE ATTACK, JUST TO ADD VARIETY AND THE FEELING THAT SHE IS ASSISTING ME, NOT TAKING COMPLETE CONTROL OF THE SHIP}[/B]

}

So in the above example, when she asks me "Would you like me to raise the landing gear?", I would like EDDI to store some kind of value somewhere for Voice Attack to access, for example Set RequestLandingGear to 1, (I'm not sure how exactly).

Then I would like to use my VoiceAttack script for my voice command Yes, to run something like an if statement along the lines of, if RequestLandingGear = 1 then trigger the RaiseLandingGear command.

Also when she tells me "I'm raising the landing gear" I would like to add a line in that bunch of code to trigger the RaiseLandingGear command in Voice Attack.


I apologize if this has already been answered in another area of the forum but I'm yet to find it.

Thank you in advance for any help or for pointing me in the direction of where to find such an example. And a big thank you to everyone who contributes to this thread.

EDIT: I have been reading about EDDI voice integration on this page (https://github.com/EDCD/EDDI/wiki/VoiceAttack-Integration) under the setstate section and I think this might be what I'm trying to do. Am I right in saying I would add a line of code to the EDDI script such as this ?

Code:
|elif initiative = "1":        
   {Pause(2000)}
   {OneOf('Shall I','Would you like me to')}
   {OneOf('raise','retract')}
   the landing gear {title}?
[B]{SetState('request_landing_gear', 'true')}[/B]

And if so, would I then add a condition in my Voice Attack script for when I say "Yes" such as this?

Code:
Begin Text Compare : [{TXT:EDDI state request_landing_gear}] Equals 'true'
Execute command, '((Landing Gear Up))' (and wait until it completes)
Set Text [EDDI state request_landing_gear] to 'false'

I am currently playing around with it now to see if I can get something to happen but I'm missing the mark somewhere.

I also still have to work out where I will set some kind of timer so that the state request_landing_gear will be set to false after 20 or 30 seconds of not saying anything. And also how to simply execute a VA command from EDDI for when she tells me she is raising the gear on her own.

Thanks again to anyone willing to help me out.
 
Last edited:
Fuel check not working anymore

Hello everyone!

I've searched forums but didn't found solution to my problem with sudden wrong fuel check reports. EDDI reports 25% of fuel remaining after first jump and 0% on second. When I refuel at station, it does say that fuel is at maximum capacity, but as soon as I jump, it reports wrong numbers.
Anyone have a clue what could be the issue? It worked fine up until (I think) I bought Type-9 and transferred it later to another station. Everything else works flawlessly.

Thanks for help and +10 to amazing community!
 
Hello everyone!

I've searched forums but didn't found solution to my problem with sudden wrong fuel check reports. EDDI reports 25% of fuel remaining after first jump and 0% on second. When I refuel at station, it does say that fuel is at maximum capacity, but as soon as I jump, it reports wrong numbers.
Anyone have a clue what could be the issue? It worked fine up until (I think) I bought Type-9 and transferred it later to another station. Everything else works flawlessly.

Thanks for help and +10 to amazing community!

Sometimes the shipyard monitor gets confused about which ship you're in, due to a concurrency bug. We're working on it. Try closing EDDI or VA and the game, removing %APPDATA%\EDDI\shipardmonitor.json and re-launching.
 
Does anyone here know if what I'm trying to do is possible with EDDI?


Hi,

I've seen something similar in Cmdr. Ishmair's Voiceattack profile for Elite. It is at the calibration section, it asks, if I'd like to do the full calibration, and there are possibilities for answer yes or no. If you get stuck somewhere, I have moderate amount of programming knowledge, but lots of free time, and your idea sounds very interesting to me, so PM me:).


The profile itself is available at the Voiceattack forums:

http://voiceattack.com/SMF/index.php?topic=474.0

Best regards!
 
Does anyone here know if what I'm trying to do is possible with EDDI?

I do something similar in my VA-profile only not for retracting the gear. I've modified the commands I use for if I wanted to have my AI ask if she should retract the gear and put them in a small profile containing only the commands needed.
The command ((EDDI undocked)) is triggered when the undocking event occurs and starts the command with the question.
You can find the vap-file here: https://www.dropbox.com/s/nottzo3f00yyari/landinggear.vap?dl=0
 
Thanks guys, I appreciate your help. I have some time off work coming up in a week or two so I'm looking forward to sitting down and using your examples to try to get something working. I will post my results for anyone interested.
 
Hi guys!Im newbie scripting EDDI but im pretty good in VA and i was looking for something which tells VA do i have an Active target(means ship here) or not as it is essential for one of my VA command but i didnt find anyway around only EDDI so only have 2 question.Is there any way to integrated to EDDI to share that whit my group or only write the code an make a wee install guide how to do it and second as im newbie and actually no clue how to make script in EDDI and may someone willing to help me out whit that would be awesome even just some guide start from basics as i dont know C# at all but seems pretty useful whit ED.Thank you very much in Advance.
Cmnd Wormhole
 
Hi guys!Im newbie scripting EDDI but im pretty good in VA and i was looking for something which tells VA do i have an Active target(means ship here) or not as it is essential for one of my VA command but i didnt find anyway around only EDDI so only have 2 question.Is there any way to integrated to EDDI to share that whit my group or only write the code an make a wee install guide how to do it and second as im newbie and actually no clue how to make script in EDDI and may someone willing to help me out whit that would be awesome even just some guide start from basics as i dont know C# at all but seems pretty useful whit ED.Thank you very much in Advance.
Cmnd Wormhole
Frontier doesn't share targeting info with 3rd party apps. And what kinds of scripts do you want to write? Have you looked through the prior pages in this thread? Quite a few good scripts have been shared here already.
 
Well if you destroy a ship in the Logfile just like any other Event such as docked/undocked etc....Tbh i didnt look thru all 40 pages but will do....basicly as i said i get a Vocie Command to set target so target=True which esentially moving the left panel Tab but when u got an active target 5 Tab active however when u have no active target only 3 Tab active so i need a trigger which set it false...but will look thru might get lucky but hope someone can help me out whit it!Thx
 
Back
Top Bottom