Release EDDI Scripts and EDDI enabled VA Commands Thread

Quick question, is there any EDDI variable that detects when you kill an NPC?

On a side note, I've read the online EDDI Github document several times and I can't wrap my head around how to use the "Variables" (specifically the "Status" variables) in VA.

I've lucked out and "guessed" at a couple of them (for example: "fsd_status" I figured out was used in "EDDI Ship fsd fsd_status" was kinda easy), but I really can't figure out the prefixes for most of them (for example: "in_dager"???)

Thanx
 
Last edited:
Quick question, is there any EDDI variable that detects when you kill an NPC?

On a side note, I've read the online EDDI Github document several times and I can't wrap my head around how to use the "Variables" (specifically the "Status" variables) in VA.

I've lucked out and "guessed" at a couple of them (for example: "fsd_status" I figured out was used in "EDDI Ship fsd fsd_status" was kinda easy), but I really can't figure out the prefixes for most of them (for example: "in_dager"???)

Thanx
This link is very useful.
 
Quick question, is there any EDDI variable that detects when you kill an NPC?
You could use either of these events depending on the NPC ships you're shooting at wanted status;
On a side note, I've read the online EDDI Github document several times and I can't wrap my head around how to use the "Variables" (specifically the "Status" variables) in VA.

I've lucked out and "guessed" at a couple of them (for example: "fsd_status" I figured out was used in "EDDI Ship fsd fsd_status" was kinda easy), but I really can't figure out the prefixes for most of them (for example: "in_dager"???)
As mentioned this: https://github.com/EDCD/EDDI/wiki/VoiceAttack-Integration is a great resource for information. In the Wiki article all the variables are prefixed with the type of the variable so;
TXT is a text variable and therefore requires a text comparison to test it's value
BOOL is a boolean variable and requires a boolean comparison to test it's value
INT an integer value
DEC a decimal value

When using the variables in VA you don't need the prefix or the {} unless you're outputting the value to the log then you'd use something like this;
Code:
Write [Blue] 'bindED active VA plugin (v{TXT:bindED.version}) detected.' to log

I use the following in a command that is called via another command, i.e. the When I ... options are all unticked in VA, so it kind of acts like a function/subroutine. This is called before the FSD is toggled, jumping to SC or Hyperspace ... the message along the lines of you cannot do that as something is deployed annoyed me.
Code:
Begin Boolean Compare : [Status landing gear down] Equals True
    Set text [~log.message] to 'Retracting landing gear'
    Execute command, 'Log.in.Purple' (by name) - passing values (and wait until it completes)
    Execute command, 'retract landing gear' (by name) (and wait until it completes)
    Pause 0.05 seconds
End Condition
Begin Boolean Compare : [Status hardpoints deployed] Equals True
    Set text [~log.message] to 'Retracting Hardpoints'
    Execute command, 'Log.in.Purple' (by name) - passing values (and wait until it completes)
    Execute command, 'retract weapons' (by name) (and wait until it completes)
    Pause 0.05 seconds
End Condition
Begin Boolean Compare : [Status cargo scoop deployed] Equals True
    Set text [~log.message] to 'Retracting Cargo Scoop'
    Execute command, 'Log.in.Purple' (by name) - passing values (and wait until it completes)
    Execute command, 'retract scoop' (by name) (and wait until it completes)
    Pause 0.05 seconds
End Condition
The Log.in.Purple command is simply this, again with the When I ... options unticked and >ed.logging.active is a profile variable that can be made true or false via a voice command.
Code:
Begin Text Compare : [~passedText1] Has Been Set
    Set text [~log.message] to [~passedText1]
End Condition
Begin Boolean Compare : [>ed.logging.active] Equals True
    Write [Purple] '{TXT:~log.message}' to log
End Condition

Edit: Another example is this code with forms part of my leave now command which does the following;
  • All power to engines
  • Retract Everything
  • and as long as the ship is mass locked ... Boost the Engines
  • Once ship is out of mass lock the ship jumps to SuperCruise
this is the bit that does the engine boosting;
Code:
-- Boost the engines
Execute command, 'boost engine' (by name) (and wait until it completes)
Start Loop While : [Status fsd status] Equals 'masslock'
    -- Determine how long to wait for the engine cap to recharge before boosting again
    Begin Condition : ([Ship model] Equals 'Federal Corvette' AND [Ship name] Equals 'cerberus')
        Pause 6.5 seconds
    Else If : ([Ship model] Equals 'Imperial Cutter' AND [Ship name] Equals 'transporter')
        Pause 10 seconds
    Else If : ([Ship model] Equals 'Imperial Cutter' AND [Ship name] Equals 'cargo cutter')
        Pause 10 seconds
    Else
        Set text [~log.message] to 'Tweak the pause time! Based on ship type and how long cap takes to recharge'
        Execute command, 'Log.in.Pink' (by name) - passing values (and wait until it completes)
        Pause 15 seconds
    End Condition
    Set text [~log.message] to 'Boosting engines ...'
    Execute command, 'Log.in.Gray' (by name) - passing values (and wait until it completes)
    -- Boost the engines
    Execute command, 'boost engine' (by name) (and wait until it completes)
End Loop
 
Last edited:
@UseLessUK

Thanx a bunch. Nice examples.

I'm actually using "Bounty awarded" currently, but the notification comes in way too late for my intended purpose. Right now, when I targetlock an enemy AND my weapons are deployed, the command loops the "Here they come!" track from Star Wars. It's pretty exhilarating (to me) to dogfight while that's playing. But I wanted to play the last climactic clip (like the last 3 seconds or so) of that track when I destroy the enemy, and Bounty awarded comes in like 10 seconds after I've blown him up. It doesn't work, for my personal taste.

I've actually been using VA for several years and the command structure and syntax, I would say I'm pretty good at.
It's the EDDI structure and syntax that occasionally trips me up.

But your post was very helpful. Thanx!
 
That is really odd as I also use the Bounty Awarded event, you did create a command called ((EDDI bounty awarded)) to handle the event, and it works fine ... as soon as the NPC dies I get a random saying via the TTS I have setup.
 

Attachments

  • VA_Cap_001.jpg
    VA_Cap_001.jpg
    63 KB · Views: 69
I find this a bit hard, so i'm asking:
Reporting fuel reserve:
  1. how could i differentiate between the main tank and the optional modules? like "your main tank is full and the additional tanks are at 25%"?
  2. how could i convert the % in actual Tons?
 
I find this a bit hard, so i'm asking:
Reporting fuel reserve:
  1. how could i differentiate between the main tank and the optional modules? like "your main tank is full and the additional tanks are at 25%"?
  2. how could i convert the % in actual Tons?
1. I don't think you can. As far as I'm aware all tanks are considered as one by the game, so EDDI can't separate the two types. Happy to be corrected if this is wrong though.
2. Use status.fuel. This will give you the tonnes to 6 decimal places, like 31.533116 (just tested in my Krait Phantom, 32 tonne tank).
 
2. Thanks!
1.


Could'nt EDDI get if there's optional tanks in the ship, get the modules size, and do the math?

Looking into it, I've found in the help:
  • fueltank details of the ship's fuel tank (this is a Module object)
  • fueltankcapacity the capacity of the main fuel tank
  • fueltanktotalcapacity the capacity of the main fuel tank plus all secondary fuel tanks
These are ship objects, so ship.fueltankcapacity will tell you the tonne capacity of the main tank. It should be relatively easy to work it all out from there. :)
 
Math in VA.

I'm trying to do "A = (B - C)" (B and C are both tokens), but don't see how to do it directly.

Is there a better way of doing it than : set A to B, then set A to (A - B)?

Cheers.
 
Got it set up just like that.
Well got back to the bubble and joined another CMDR in a HazRes and it's then I noticed what was instant now has a delay. So I'm seeing the same behaviour as you in that you kill an NPC and then have a delay before you're notified about the kill.
 
Should'nt be {set A to B-C}?
Unfortunately, he's asking about VoiceAttack coding, not EDDI scripting. In EDDI it's so much easier, but in VA things like that are a bit more complicated. I had a quick look, but can't see any other way than his original suggestion: Set A to B. Set A to A - C.
 
Unfortunately, he's asking about VoiceAttack coding, not EDDI scripting. In EDDI it's so much easier, but in VA things like that are a bit more complicated. I had a quick look, but can't see any other way than his original suggestion: Set A to B. Set A to A - C.
😬🤐😅
 
Top Bottom