Release EDDI Scripts and EDDI enabled VA Commands Thread

I have noticed an oddity with recent versions of EDDI when used with VA and when responding to a jumped event. EDDI responds quickly but the call to VA is very slow and can be in the order of a minute. Other tools, such as EDDiscovery, show that the journal and status files are updated quickly by ED but EDDI takes an age to pass the event along to VA.

Other EDDI/VA events respond quickly so it is not the EDDI/VA interface, it just seems to be this one event. So my question is:

Is there a reason for this?

Is there something in EDDI either accidentally or deliberately that is causing an excessive delay in passing this event over to VA?

Thanks.
 
Have you already reviewed the readme and the wiki?
This thread (though long) is also quite instructive.[/QUOTE]

Thanks Tkael! I had seen those, but I am looking at them again. Also reading back through the thread (started around mid-point) I came across a reference to COTTLE - that may have been the missing piece to my puzzle! I will keep reviewing thread for nuggets of information (helpful bunch here) and look for a 'simplier' script to dissect and learn from.
 
I have noticed an oddity with recent versions of EDDI when used with VA and when responding to a jumped event. EDDI responds quickly but the call to VA is very slow and can be in the order of a minute. Other tools, such as EDDiscovery, show that the journal and status files are updated quickly by ED but EDDI takes an age to pass the event along to VA.

Other EDDI/VA events respond quickly so it is not the EDDI/VA interface, it just seems to be this one event. So my question is:

Is there a reason for this?

Is there something in EDDI either accidentally or deliberately that is causing an excessive delay in passing this event over to VA?

Thanks.
We're aware of this issue and have a fix slotted for the next release.
 
"disablespeechresponder" will prevent EDDI responding speech responder scripts, so I'm not sure "disablespeechresponder" is really what you want.
If there are specific scripts that you would like EDDI to not respond to, you should disable those scripts in the speech responder tab of EDDI's UI.
That said, I'll make sure in the code that we're clearing pending speech when "disablespeechresponder" is invoked.

Well, I still didn't get it to work as I intended. I am either doing something wrong or it simply can't be done. Let's see what the documentation states:

disablespeechresponder
This function tells the speech responder to not talk unless specifically asked for information. This lasts until either VoiceAttack is restarted or an enablespeechresponder call is made.

shutup
This function stops any active EDDI speech.

I tried changing "disablespeechresponder" for "shutup" on that command Sigma executes as soon as it starts. OK, when I loaded the game, EDDI said nothing, then I thought it worked. I took off, jumped to another system... EDDI was quiet. Very good. Then I said "System report". It told me the system I was, government, etc. Then I took some time scanning/identifying the planet/moons of that system.... and then EDDI wouldn't stop reporting all the findings.

When I said "shutup", it would stop talking about the planet it was reporting then less than a second later it would start talking about the next one and so on. (I guess its queue was pretty crowded and it had a lot to say *LOL*).

Unless my english is failing me (remember, I am from Brazil), "disablespeechresponder" would be what I am looking for. After receiving that "command", EDDI would be quiet unless asked to respond, right?

For what I tested so far, "shutup" will only cut the current response, not all the messages EDDI has in its queue.

I really didn't want to resort to manually disabling some of the scripts. They are all usefull. I just want EDDI to only talk when asked to.

On a second thought... would the presence of a command such as "((EDDI body scanned))" make EDDi start talking?
 
Ok.. ok.. after 123.5 quadrillion miles of jumping to waypoint 6 of Distant Worlds 2 journey I'm tired of attempting to figure this out myself, so I'm going to ask a pro :)

Basically, I want EDDI to "occasionally" tell me how far in light years to my next waypoint when I jump to next system.

I saw this in FSD Engaged, so I've been tweaking and tweaking trying to get it to do what I want. I set my home station to the next waypoint in hope to simplify this dream.

{if reportsystem.distancefromhome:
{Occasionally(7, "{OneOf("You are", "Current location is", "You are now")} {Humanise(reportsystem.distancefromhome)} lightyears from {OneOf("home", "{P(homesystem.name)}")}.")}
}

If I move this snippit around in the script. Sometimes it'll say I'm ZERO LIGHT YEARS from home.

I've played with the Distance() thing a bit too in hopes to make a new voice response from current location to X location.

By the way, I in no way know how to script. I do things like change the word "landing" to "farting" pretty comfortably for humor, but past that I'm oblivious.

Any help is appreciated :)
 
Ok.. ok.. after 123.5 quadrillion miles of jumping to waypoint 6 of Distant Worlds 2 journey I'm tired of attempting to figure this out myself, so I'm going to ask a pro :)

Basically, I want EDDI to "occasionally" tell me how far in light years to my next waypoint when I jump to next system.

I saw this in FSD Engaged, so I've been tweaking and tweaking trying to get it to do what I want. I set my home station to the next waypoint in hope to simplify this dream.

{if reportsystem.distancefromhome:
{Occasionally(7, "{OneOf("You are", "Current location is", "You are now")} {Humanise(reportsystem.distancefromhome)} lightyears from {OneOf("home", "{P(homesystem.name)}")}.")}
}

If I move this snippit around in the script. Sometimes it'll say I'm ZERO LIGHT YEARS from home.

I've played with the Distance() thing a bit too in hopes to make a new voice response from current location to X location.

By the way, I in no way know how to script. I do things like change the word "landing" to "farting" pretty comfortably for humor, but past that I'm oblivious.

Any help is appreciated :)
Something like this would do (replacing the destination system name as needed of course):
Code:
{set destinationSystem to SystemDetails('Sagittarius A*')}


{if destinationSystem:
   {set distance to Distance(system.name, destinationSystem.name)}
   {Occasionally(7, "{OneOf(\"You are\", \"Current location is\", \"You are now\")} {Humanise(distance)} light years from your final destination.")}
}
 
Well, I still didn't get it to work as I intended. I am either doing something wrong or it simply can't be done. Let's see what the documentation states:

I tried changing "disablespeechresponder" for "shutup" on that command Sigma executes as soon as it starts. OK, when I loaded the game, EDDI said nothing, then I thought it worked. I took off, jumped to another system... EDDI was quiet. Very good. Then I said "System report". It told me the system I was, government, etc. Then I took some time scanning/identifying the planet/moons of that system.... and then EDDI wouldn't stop reporting all the findings.

When I said "shutup", it would stop talking about the planet it was reporting then less than a second later it would start talking about the next one and so on. (I guess its queue was pretty crowded and it had a lot to say *LOL*).

Unless my english is failing me (remember, I am from Brazil), "disablespeechresponder" would be what I am looking for. After receiving that "command", EDDI would be quiet unless asked to respond, right?

For what I tested so far, "shutup" will only cut the current response, not all the messages EDDI has in its queue.

I really didn't want to resort to manually disabling some of the scripts. They are all usefull. I just want EDDI to only talk when asked to.

On a second thought... would the presence of a command such as "((EDDI body scanned))" make EDDi start talking?
"shutup" stops the immediate queued speech while "disablespeechresponder" prevents new speech from being queued. In a future update, "disablespeechresponder" will also flush speech queues but for now that's something that you'll have to do manually via "shutup" commands.
 
"shutup" stops the immediate queued speech while "disablespeechresponder" prevents new speech from being queued. In a future update, "disablespeechresponder" will also flush speech queues but for now that's something that you'll have to do manually via "shutup" commands.

This is actually just the info I came in here looking for. So, just so I'm clear, there is currently no way to clear the speech queue?

I ask, because the other day I did a bunch of ship component transfers, then went and scanned a system with 25 planets. The queue just seemed to keep going. I kept telling it to shut up, and then the next bit of speech would start. I even disabled speech with "Be quiet", but the then when I turned it back on it just continued where it left off.

Now I make sure to use "Be quiet" before doing actions that will result in a lot of speech.

---

On another note: is there any way with EDDI to retrieve the current throttle?

I did some searches and couldn't find anything. I'm currently setting a variable whenever I have VA change the throttle, and then read that so I can use a command like "Reduce speed" to drop by 25%. But (of course) that only works properly if I only ever set the throttle using VA.
 
When collecting materials, I'd like VoiceAttack to tell me how many total of that material I have in inventory and what grade it is. Can anyone tell me how to do that?

Thanks.
 
When collecting materials, I'd like VoiceAttack to tell me how many total of that material I have in inventory and what grade it is. Can anyone tell me how to do that?

Thanks.

There may be a better way to do this, but I've just taken this from the Material Inventory script, and hybridised it with parts of my Material Collected script...

Add it to your Material Collected script. The default is an empty script (apart from setting some variables) so just paste this in under those.
Code:
{_ Function to obtain a material from inventory}
{set _inventory(required) to:
    {for material in materials:
        {if material.material = required:
            {return material}
        }
    }
}

{set matis to MaterialDetails(event.name)}
{OneOf("{matis.rarity.name} {matis.name} {OneOf('Received','Collected','Ob-tained')}",
       "{OneOf('Received','Collected','Ob-tained')} {matis.rarity.name} {matis.name}")}.

{set inventory to _inventory(event.name)}
You have {inventory.amount} unit{if inventory.amount != 1:s} {OneOf("on board", "in your inventory", "in your storage")}.

That should work fine for you, unless/until someone provides a better solution. I'm pretty sure you could get rid of the inventory function at the top, and replace it with less code, but I can't think of it right now.

Hope you find this useful! :)

-=] Darkcyde [=-
 
So, a little something for the weekend. How about a new version of my EDDI personality?

Here's Darkcyde's Defaults - "Explorer's Edition".
https://www.dropbox.com/s/adbt7pei7psaehb/Darkcydes_Defaults_16-03-19.rar?dl=0

It has a new body mapping system and VA commands to get the most out of it. Remember those pesky planets that get auto-scanned when they are very close to the main star? Well, now you can ask VA to tell you about them, and have them read out by the Body Report! Just say "Tell me about" and then the body name, like "Tell me about body A 1" or "Tell me about body AB 2 C". There are limitations, so read the change log!

Here's the changes since the last version:-
Code:
Release 16-03-19
================

VoiceAttack
-----------
- Added 'body mapped' and 'body scanned' events which update the saved mapping lists.
- Added command 'What should I map?' to call the 'Bodies to Map' script.
- Renamed 'Update System Scan Value' to 'Update System Scan Data'.
- Renamed 'Load System Scan Value' to 'Load System Scan Data'.
- Updated 'System Scan' commands to include mapping lists.
- Updated 'Update System Scan Data' to use DEC value for System Value instead of TXT.
- Added Krait Phantom and the Mamba to the Hardpoints -> Setup Firegroups command

- Added command 'Tell me about body ...' Used to get Body report for a specific body in the current system. e.g. "Tell me about body A 6".
   Specifically designed to provide information for bodies that get auto-scanned from the 'honk' and don't report.
   This VA command separates out the spoken body name and passes it to the 'Body Info Request' script in EDDI.
   After much trial and error, I think I've got this working just right (within voice recognition capabilities).
   Currently configured to allow for the following:-
     Star designations - A, AB, ABC, B, BC, C
     Body/Planet designations - 1 to 9
     Moon designations - A to E
   As the honk is short range when scanning bodies, nothing more than this should be needed.  However, this can still be used to repeat other bodies with designations within the scope of this command, i.e "Tell me about body 9 E". Any more options could make the number of dynamic commands excessive and be a performance hit.
   Note: This will not add to your system scan value, as this depends on the 'estimatedscanvalue' variable which is only available from the Body Scanned event.

- Added command 'What have I mapped?' to call 'Bodies Mapped' script.


Event Scripts
-------------
- Body Mapped
 - Added call to 'Body Name Tidy' to use shortend body names.
 - Added code to support 'Bodies to Map' script. Deletes mapped body from saved lists.
 - Added call to 'Bodies to Map' when last 'good' and/or 'possible' candidate body has been mapped.
 - Added 'mapped' state variable to record which bodies have been mapped in this system.
 - Added alphanumeric sort for the 'mapped' list.

- Body Scanned
 - Updated event.name check and store in 'state.systemscan' variable array. Should finally fix multiple repeats of speech, particularly when they are not consecutive.
 - Added code to support 'Bodies to Map' script.  Adds body to mapping lists if it's valuable.
 - Added 'good candidates' (>80K Cr), and 'possible candidates' (>10K Cr) lists.
 - Added alphanumerical sorting to the mapping lists, based on body name.
 - Removed all mapping code as now collated into new function script 'Bodies Scanned' (see below).

- Commander Continued
 - Added check to set state of 'bodies_to_map' used for checking mapped bodies.
 - Added speech to remind you if you have bodies to map in your current system.

- Jumped
 - Reset 'systemscan' state variable.
 - Added code to support 'Bodies to Map' script. Resets mapable planet lists.

- Ship Interdicted
 - Updated interdictor faction for Empire or Federation.

- SRV Launched
 - Added state variable for SRV launching.

- SRV Under Ship
 - Check SRV launched variable so speech isn't triggered immediately when SRV launched.

- Star Scanned
 - Updated event.name check and store in 'state.systemscan' variable array. Should finally fix multiple repeats of speech, particularly when they are not consecutive.

- Touchdown
 - Replace setting 'body' with 'reportbody'.
 - Updated state.loading check in case it has not been set to anything.

- Undocked
 - Updated autoroute IF statement and moved splitting of state variable into the IF block.

Function Scripts
----------------
- Bodies Mapped
 - New function to list the bodies mapped so far in the current system.

- Bodies Scanned
 - New function to record system value and body mapping worth.
 - Added code to support 'Bodies to Map' script.  Adds body to mapping lists if it's valuable.
 - Added 'good candidates' (>80K Cr), and 'possible candidates' (>10K Cr) lists.
 - Added alphanumerical sorting to the mapping lists, based on body name.
 - Added planet types as well as value to determine 'good' or 'possible' mapping candidates. Will now add bodies if "Tell me about body..." is used in VA.
 - Only adds scan value if event data is present (from an actual scan) as value is only available from that.
 - Added check of 'mapped' variable to see if the body has already been mapped and change speech accordingly, and also not re-add already mapped bodies.

- Bodies to Map
 - New script to report all noteworthy (read: valuable) bodies scanned so far in the current system.
   - Terraformable
   - Ammonia
   - Earth-like
   - Water Worlds.
   - Any body over 80K Cr.
 - Best called from VoiceAttack by asking "What should I map?".
 - Allows for rapid scanning of the system, then report valuable bodies, when requested.
 - Should only report bodies not yet mapped. Mapping will remove that body from the lists. Jumping will clear the lists.
 - Added variation to report speech.
 - Added 'possible candidate' section to report bodies worth over 10K not included in the main section (High-metal content worlds & Metal-rich bodies). 
 - Added option to report all mapping candidates, or only the good ones (default is good only).

- Body Reports (All)
 - Embarking on the Distant Worlds 2 Expedition, I've set the reporting to be minimal to speed things up greatly.

- Body Atmosphere Report
 - Re-wrote the atmosphere compositions sections to give almost the same variation of replies per atmosphere type.
 - Updated punctuation to sound correct no matter what items are reported or not.
 - Updated IF statement to report an atmosphere by checking 'reportbody.atmosphere' instead of '.pressure'.  I found a planet with zero pressure, but still had an atmosphere to report. The default was ignoring it.
 - Found that previous change to realistically reflect atmosphere also corrected blatantly wrong descriptions.  I found a planet that was described as "Ammonia and Oxygen" for it's type, yet had none of those element present in it's composition.
 - If no pressure description, make the description 'a' to 'an'.

- Body Info Request
 - Used to get and format the body name from the VoiceAttack command 'Tell me about body...'
 - Takes the spoken body name from the VoiceAttack state variable, formats it to that expected by the 'Body Report', then calls 'Body Report'.
 - Can be used without VA, but you will need to manually edit the 'test string' near the top of this script to be the body name, then click the 'Test' button.
   (Note: Test buttons not working in 3.3.7-b1, but this personality will work on older versions of EDDI).

- Body Materials Report
 - Updated reporting materials IF statement if reportMats isn't set to all materials.

- Body Name Tidy
 - Updated to fix use in 'Entered Normal Space' event.
 - Updated to account for planets that orbit secondary stars, that orbit a main star.
 - Updated IF statement for mainstar... Then changed it back. :P
 - Greatly reduced final IF statement, used to ascertain body type.
 - Updated 'parent' setup and checks, if 'body = system' and if length of 'parent' > 1. Helps prevent BodyDetails() object error.

- Body Report
 - Updated Rings section to not add duplicate ring types, ie "Rocky and Rocky rings".
 - Added code to support 'Bodies to Map' script... Then moved it to 'Body Scanned' event.
 - Added call to new 'Bodies Scanned' function.

- Body Volcanism Report
 - Updated locations so that magma is correctly reported as being a sub-surface phenomena.

- Star Report
 - Re-arranged to be more like the default script, while retaining my modifications.
Enjoy and have fun! ;)

-=] Darkcyde [=-
 
Last edited:
Hello,

Is there a way to know if the current target is hostile ? I could not find the information in the EDDI doc.
 
Last edited:
Hello,

Is there a way to know if the current target is hostile ? I could find the information in the EDDI doc.
Not directly, since we don't receive that information from FDev through the Ship targeted or Under attack events.
That said, if an NPC is attacking you then I suspect that you'd be able to identify the attacker from the Message received events.
 
Can anyone help with a "message received" script that ignores anything coming from a station? I still want all NPC and player chatter, but the docking and fire zone messages from stations are annoying.
 
Can anyone help with a "message received" script that ignores anything coming from a station? I still want all NPC and player chatter, but the docking and fire zone messages from stations are annoying.
Are you using EDDI version 3.4.0 with the default Message received script (please compare your version to the default)? I believe station messages should be muted with the default script.
 
Are you using EDDI version 3.4.0 with the default Message received script (please compare your version to the default)? I believe station messages should be muted with the default script.

I'm using 3.4.0, but for some reason my default script looked like it had been edited previously.

I'm using this now, and everything seems to be ok.

{_ Context }
{SetState('eddi_context_last_subject', 'message')}
{SetState('eddi_context_last_action', 'receive')}
{SetState('eddi_context_message_name', event.from)}
{SetState('eddi_context_message_content', event.message)}

{if event.player = true:
{if event.message = "o7":
{event.from} salutes
{if event.channel = "player":
you
}.
|else:
Message received from {event.source} {event.from}. Message reads: {event.message}.
}
|elif event.source != "Station":
Message received from {event.source} {event.from}. Message reads: {event.message}.
}
 
Top Bottom