Release EDDI Scripts and EDDI enabled VA Commands Thread

@Wozzlebatneo , you could also do something like this:
Code:
{Pause(2000)}

{set response to:
    We have been denied docking
    {if event.reason = "ActiveFighter":
         because our fighter is deployed
    |elif event.reason = "Distance":
        because we are too far from the station
    |elif event.reason = "Hostile":
        because the station's controlling faction doesn't like us
    |elif event.reason = "NoSpace":
        because there is no space available
    |elif event.reason = "Offences":
        because we have recently committed an offence against them
    |elif event.reason = "TooLarge":
        because there are no landing pads that can accomodate the size of our ship
    }.
}

{for voice in VoiceDetails(): {set voiceCount to voiceCount + 1} }
{set randomVoice to VoiceDetails()[rand(0, voiceCount)].name}
{Transmit(Voice(response , randomVoice))}
Everything that should be spoken is added to the "response" variable, then we randomly select a voice from all available voices and pipe it all through the Transmit() function.

If you later decide that you'd like to return the script to the default, there is a handy "Reset to Default" button at the bottom center of the "Edit script" window.
That works really well. Thank you.
WOZZ
 
Cool, that looks good to me. I will play around with the suggestions and report back. Thanks for your help.
WOZZ
I wrote this, but I doesn't work, LOL
{_ Context }
{SetState('eddi_context_last_subject', 'trade_voucher')}
{SetState('eddi_context_last_action', 'redeem')}
{SetState('eddi_context_trade_voucher_amount', event.amount)}

Trade vouchers for {Humanise(event.amount)} credits redeemed
{Occasionally(2, "
{if len(event.rewards) = 1:
by {P(event.rewards[0].faction)}
|else:
by
{set cur to 0}
{while cur < len(event.rewards):
{if cur = 0:
|elif cur < len(event.rewards) - 1:
,
|else:
and
}
{P(event.rewards[cur].faction)}
{set cur to cur + 1}
}
}
")}.
{Transmit(Voice(response , event.from, ": ", event.message), OneOf( "Microsoft Paul")))}


I had to find one that actually said something when I tested it
Regards
WOZZ
 
I wrote this, but I doesn't work, LOL
{_ Context }
{SetState('eddi_context_last_subject', 'trade_voucher')}
{SetState('eddi_context_last_action', 'redeem')}
{SetState('eddi_context_trade_voucher_amount', event.amount)}

Trade vouchers for {Humanise(event.amount)} credits redeemed
{Occasionally(2, "
{if len(event.rewards) = 1:
by {P(event.rewards[0].faction)}
|else:
by
{set cur to 0}
{while cur < len(event.rewards):
{if cur = 0:
|elif cur < len(event.rewards) - 1:
,
|else:
and
}
{P(event.rewards[cur].faction)}
{set cur to cur + 1}
}
}
")}.
{Transmit(Voice(response , event.from, ": ", event.message), OneOf( "Microsoft Paul")))}

I had to find one that actually said something when I tested it
Regards
WOZZ
If you're looking for something in the same style as my last suggestion, try:
Code:
{_ Context }
{SetState('eddi_context_last_subject', 'trade_voucher')}
{SetState('eddi_context_last_action', 'redeem')}
{SetState('eddi_context_trade_voucher_amount', event.amount)}

{set response to:
    Trade vouchers for {Humanise(event.amount)} credits redeemed
    {Occasionally(2, "
        {if len(event.rewards) = 1:
            by {P(event.rewards[0].faction)}
        |else:
            by
            {set cur to 0}
            {while cur < len(event.rewards):
                {if cur = 0:
                |elif cur < len(event.rewards) - 1:
                    ,
                |else:
                    and
                }
            {P(event.rewards[cur].faction)}
            {set cur to cur + 1}
            }
        }
    ")}.
}

{for voice in VoiceDetails(): {set voiceCount to voiceCount + 1} }
{set randomVoice to VoiceDetails()[rand(0, voiceCount)].name}
{Transmit(Voice(response , randomVoice))}
If you would like to just use Microsoft Paul, you would replace the last 3 lines with:
Code:
{Transmit(Voice(response, "Microsoft Paul"))}

Other notes:
1. I have to set the response variable before I can use it (otherwise it will always be empty)
2. The Voice() function does not take 4 arguments. It takes at most two.
3. The Transmit() function does not take 2 arguments. It only allows one.

Please click on the "Help" button in the "Edit script" window if you'd like to learn more about how to use functions like Voice() and Transmit().
 
Last edited:
If you're looking for something in the same style as my last suggestion, try:
Code:
{_ Context }
{SetState('eddi_context_last_subject', 'trade_voucher')}
{SetState('eddi_context_last_action', 'redeem')}
{SetState('eddi_context_trade_voucher_amount', event.amount)}

{set response to:
    Trade vouchers for {Humanise(event.amount)} credits redeemed
    {Occasionally(2, "
        {if len(event.rewards) = 1:
            by {P(event.rewards[0].faction)}
        |else:
            by
            {set cur to 0}
            {while cur < len(event.rewards):
                {if cur = 0:
                |elif cur < len(event.rewards) - 1:
                    ,
                |else:
                    and
                }
            {P(event.rewards[cur].faction)}
            {set cur to cur + 1}
            }
        }
    ")}.
}

{for voice in VoiceDetails(): {set voiceCount to voiceCount + 1} }
{set randomVoice to VoiceDetails()[rand(0, voiceCount)].name}
{Transmit(Voice(response , randomVoice))}
If you would like to just use Microsoft Paul, you would replace the last 3 lines with:
Code:
{Transmit(Voice(response , "Microsoft Paul"))}

Other notes:
1. I have to set the response variable before I can use it (otherwise it will always be empty)
2. The Voice() function does not take 4 arguments. It takes at most two.
3. The Transmit() function does not take 2 arguments. It only allows one.

Please click on the "Help" button in the "Edit script" window if you'd like to learn more about how to use functions like Voice() and Transmit().
Ah, thank you again for your efforts, I think I now have grasped the process, albeit somewhat tentatively, but your explanation turned me from having no idea to getting a basic understanding. thanks again
WOOZ
 
Hello All

While I really want to not bother people and use my brains to figure things out on my own, I would also like to play Elite more than fixing VA commands. SO I need to ask a question.

I am working on a system to launch a fighter manned by my crew member. I have utilized the most up to date version of "Ishmair's Elite Dangerous Using [EDDIBindED Plugins]-Profile" that I found in another thread and have watched some of Bronney's youtube's on what he did to fix up the keeping track of tabs in various contexts, ship, fighter, srv, etc.

My problem is that I have a command that gets to the point of picking a fighter and launching it with the crewperson. It works great the first time. The problem comes when I recall and try to relaunch the crewperson. Because the menus "remember" the last thing chosen it now, instead of selecting the crew member, moves down 1 item in the menu and chooses the "Cancel" on the menu.

My question is this: Is there a way to know what of the 3 choices on that menu is already chosen in the same way that Bronney figured out how to make the commands know what tab a panel was on?

Is there a variable stored for this, or any other, panel menu?

1609541893342.png


This is the text of the command:

Execute command, 'fighter bay' (and wait until it completes)
Execute command, 'Keybinding - Interface Mode > UI PANEL SELECT' (and wait until it completes)
Execute command, 'Keybinding - Interface Mode > UI PANEL SELECT' (and wait until it completes)
Execute command, 'Keybinding - Interface Mode > UI PANEL DOWN' (and wait until it completes)
Execute command, 'Keybinding - Interface Mode > UI PANEL SELECT' (and wait until it completes)

So the problem lies in the fact that the above picture is how the "menu" comes up and the second time the above command runs it fails cause it chooses the cancel at the bottom.

Any help is appreciated.
 
Last edited:
I haven't played ED or used VA for more than a year, so this might be woefully out of date, but my approach was to set a Boolean variable at startup to track whether the fighter had been launched before and adjust the launch key sequence accordingly. The initial setup was 'Set Boolean [FighterFirstLaunch] to True'. Then I used ((EDDI fighter launched)) to alter this to 'Set Boolean [FighterFirstLaunch] to False'. The actual routine to launch the fighter was titled ((Fighter 1 Launch)) which is something like:

Begin Boolean Compare : [FighterFirstLaunch] Equals True
{key sequence for initial launch}
Else
{key sequence for subsequent launches}
End Condition

I can't remember if I needed to reset [FighterFirstLaunch] during a session (for example after docking or rearming). I think it was only at initial startup but I'm not sure. I also had a set of routines to determine if Fighter 1 or Fighter 2 was next to launch and always reset this to Fighter 1 on docking. Sorry if this is vague. I'm sure someone will have invented a better way of doing it by now!
 
I haven't played ED or used VA for more than a year, so this might be woefully out of date, but my approach was to set a Boolean variable at startup to track whether the fighter had been launched before and adjust the launch key sequence accordingly. The initial setup was 'Set Boolean [FighterFirstLaunch] to True'. Then I used ((EDDI fighter launched)) to alter this to 'Set Boolean [FighterFirstLaunch] to False'. The actual routine to launch the fighter was titled ((Fighter 1 Launch)) which is something like:

Begin Boolean Compare : [FighterFirstLaunch] Equals True
{key sequence for initial launch}
Else
{key sequence for subsequent launches}
End Condition

I can't remember if I needed to reset [FighterFirstLaunch] during a session (for example after docking or rearming). I think it was only at initial startup but I'm not sure. I also had a set of routines to determine if Fighter 1 or Fighter 2 was next to launch and always reset this to Fighter 1 on docking. Sorry if this is vague. I'm sure someone will have invented a better way of doing it by now!

No thanks, that's great, gives me something to work with! Never occurred to me to set a variable after the first launch.
 
Happy New Year, cmdrs.

I've just bought VA and find it brilliant (I was using EDDI only, before). I'm trying to write a new function that reads the EDDI modification crafted event variables but I'm stuck. I think I can't pass the EDDI variables to VA variables because whatever type I try, the Say function says "is not set"
This is an example of the failed variables, I've created others in different types (SMALL, TXT) but without success.
Screenshot 2021-01-02 153431.png

This is the code from the Say function:
Code:
Module is {TXT:txtmodule}
decvariable is {DEC:decvariable}
Before loop Quality is {SMALL:smallbefore}
Before loop Quality is {DEC:decc}
Before loop Quality is {DEC:QualityBefore}
The actual variable is {DEC:EDDI modification crafted quality}

The decvariable is just a local VA variable that successfully takes the value of 1 when is spoken aloud.
All the others, except from the last line, which is actually the EDDI variable and it has a value, are "not set"
Can someone shed some light in this?
Thanks, cmdrs.
 
Happy New Year, cmdrs.

I've just bought VA and find it brilliant (I was using EDDI only, before). I'm trying to write a new function that reads the EDDI modification crafted event variables but I'm stuck. I think I can't pass the EDDI variables to VA variables because whatever type I try, the Say function says "is not set"
This is an example of the failed variables, I've created others in different types (SMALL, TXT) but without success.
View attachment 202777
This is the code from the Say function:
Code:
Module is {TXT:txtmodule}
decvariable is {DEC:decvariable}
Before loop Quality is {SMALL:smallbefore}
Before loop Quality is {DEC:decc}
Before loop Quality is {DEC:QualityBefore}
The actual variable is {DEC:EDDI modification crafted quality}

The decvariable is just a local VA variable that successfully takes the value of 1 when is spoken aloud.
All the others, except from the last line, which is actually the EDDI variable and it has a value, are "not set"
Can someone shed some light in this?
Thanks, cmdrs.
Hello CMDR ...
I hope I have understood you correctly. You want to send EDDI variables to VA. Correct ?

... hmmm, unfortunately I didn't find the corresponding page on the github page of EDDI, so here the text from the help when editing scripts.
The function SetState() should be the right one for you.
SetState()
This function will set a session state value. The value will be available as a property of the 'state' object in future templates within the same EDDI session.
SetState takes two arguments: the name of the state value to set, and its value. The name of the state value will be converted to lower-case and spaces changed to underscores. The value must be either a boolean, a number, or a string; other values will be ignored.
Common usage of this is to keep track of the cumulative or persistent information within a session, for example:
{SetState("distance_travelled_today", state.distance_travelled_today + event.distance)}
Example:
Set the variable in EDDI, {SetState("type_station",station.model)}
in VA get the variable {TXT:EDDI state typ_station}

@T'kael - I wanted to go to the page for the explanation of the functions at github (e.g. SetState() ),
but didn't find anything :oops:
 
Hello CMDR ...
I hope I have understood you correctly. You want to send EDDI variables to VA. Correct ?

... hmmm, unfortunately I didn't find the corresponding page on the github page of EDDI, so here the text from the help when editing scripts.
The function SetState() should be the right one for you.

Example:
Set the variable in EDDI, {SetState("type_station",station.model)}
in VA get the variable {TXT:EDDI state typ_station}

@T'kael - I wanted to go to the page for the explanation of the functions at github (e.g. SetState() ),
but didn't find anything :oops:

Thanks for your reply.

I can get EDDI variables in VA, I just can't copy them to local VA variables. In the code snippet, the last line is a variable directly from EDDI that is successfully read aloud. I just can't copy it to another variable so that I can compare the values further down the code, to see if the value has changed since start.

I will take a look at your solution and try it out.
 
Execute command, 'fighter bay' (and wait until it completes)
Execute command, 'Keybinding - Interface Mode > UI PANEL SELECT' (and wait until it completes)
Execute command, 'Keybinding - Interface Mode > UI PANEL SELECT' (and wait until it completes)
Execute command, 'Keybinding - Interface Mode > UI PANEL DOWN' (and wait until it completes)
Execute command, 'Keybinding - Interface Mode > UI PANEL SELECT' (and wait until it completes)
The above is from Ishmair's. I've solved the crewmen picking problem (and cargo transfer from an SRV, etc) with down down down down then an up to make sure it picks the 2nd last options, etc. Please take a look at my [Deploy; launch] fighter one crewmen.

Begin Boolean Compare : [FighterFirstLaunch] Equals True
{key sequence for initial launch}
Else
{key sequence for subsequent launches}
End Condition
Thank you, this should delete the 1 2 problem I am having. Will work on this soon. Was always wondering how to track which fighter launched, which constructing..
 
I found what I was doing wrong. In the "Set a Decimal Value" window, I was including the datatype of the original variable in the field. I should have omitted it, since both variables are decimal.
Screenshot 2021-01-02 153431-2.png

The correct entry is: {EDDI modification crafted quality}
(without the "DEC:" part).
 
I found what I was doing wrong. In the "Set a Decimal Value" window, I was including the datatype of the original variable in the field. I should have omitted it, since both variables are decimal.
View attachment 202805
The correct entry is: {EDDI modification crafted quality}
(without the "DEC:" part).
Excellent find! Was reading through these posts waiting for someone to catch that ;) Don't feel bad, I've been working with VA for five years, and have a public profile with over a thousand downloads, yet still I make simple mistakes with tokens now and then... just the other day, I was adding tons of debug 'write to event log' actions to sus out an error for a nested token variable - darn thing worked in the 'multi-command' above it, couldn't see why it wouldn't work for the 'single-command' version of the same even as I reviewed spelling for typos, didn't catch the actual issue:
{TXT:AVCS_QCC_DATA_MACROS_{{TXT:~avcs_choice_command}}}
was supposed to be:
{TXT:AVCS_QCC_DATA_MACROS_{TXT:{TXT:~avcs_choice_command}}}
😣

FYI: You can also do without the "Save value to profile" (unless you are loading this variable to retrieve info when this profile first loads) -- and if you are using QuantityBefore in this command alone, and not passing it around or needing to refer to it later, you can change the scope of that variable from Global to something that will be destroyed once this command is completed: ~QuantityBefore is command scoped, will be read/used by this command, then will no longer exist until this command runs again. See VoiceAttack Manual for more details on Advanced Variable Control (Scope and Events)
 
Is there a way to tell the difference between the Steam version of Elite and the Epic version? The reason I ask is that in the Steam version a screenshot is F12, in the Epic version you actually have to use the Windows Screen shot system, WindowsKey + Prtscn. If there is a way to tell I would like to set up my screenshot command to use the appropriate version.
 
New question, this works but I was wondering about some of what I did.
1609617598591.png

Do I need to save the value of my variables to the profile? Would the other 2 commands pickup the variable values with out passing them to the commands? I am not sure about how all the internal VA variable stuff works.
 
Is there a way to tell the difference between the Steam version of Elite and the Epic version? The reason I ask is that in the Steam version a screenshot is F12, in the Epic version you actually have to use the Windows Screen shot system, WindowsKey + Prtscn. If there is a way to tell I would like to set up my screenshot command to use the appropriate version.
From the perspective of the player journals, I'm not aware of a way to distinguish other than by keeping track of which commander name is associated with which account.
 
New question, this works but I was wondering about some of what I did.
View attachment 202832
Do I need to save the value of my variables to the profile? Would the other 2 commands pickup the variable values with out passing them to the commands? I am not sure about how all the internal VA variable stuff works.
Not necessarily. You could probably use command-scoped variables for this purpose (prefixed with ~ or ~~, see the documentation here).
 
Is there a way to tell the difference between the Steam version of Elite and the Epic version? The reason I ask is that in the Steam version a screenshot is F12, in the Epic version you actually have to use the Windows Screen shot system, WindowsKey + Prtscn. If there is a way to tell I would like to set up my screenshot command to use the appropriate version.

If this is for public distribution, then you might consider setting things up on the first run, so that certain user-specific settings are in place to function correctly. Maybe present a Get User Input box that can save a variable to profile with this info, then under your Screenshot command, a simple referral to that variable would work. It could be a true/false, or even a keypress variable that gets set to either WindowsKey + Prtscn or F12 -- also, while this is default in Steam, it's also changeable, so you may ask the user to verify this is correct, too, rather than assuming.

I ran into a similar issue with international users, folks with QWERTZ or AZERTY keyboards, where my shared public profile was designed for QWERTY - rather than any potentially unreliable automatic detection system (since someone from such a country MAY be using a QWERTY keyboard for English games) I decided to simply ask them on first use, and save a variable. Simple and easy, completely reliable.

New question, this works but I was wondering about some of what I did.
View attachment 202832
Do I need to save the value of my variables to the profile? Would the other 2 commands pickup the variable values with out passing them to the commands? I am not sure about how all the internal VA variable stuff works.

No, you don't need to save those to profile - this is only for retrieving the state of a variable between sessions (like closing voiceattack and reopening it, and then using a command to load this variable from profile to restore it's saved value such as the "PrintScreen" variable you might save on first use) And yes, since those variables are scoped Globally, passing them is redundant. They can be seen by any command after being set (and again, no need to save)
 
Last edited:
It could be a true/false, or even a keypress variable that gets set to either WindowsKey + Prtscn or F12 -- also, while this is default in Steam, it's also changeable, so you may ask the user to verify this is correct, too, rather than assuming.

I just realized, the WK+Prtscn will work in both. Might as well as just use the one. DOH!
 
Back
Top Bottom