Release EDDI Scripts and EDDI enabled VA Commands Thread

Another question for you EDDI brainiacs, LOL!

In the Mission Accepted event there is an entry called "expiry". It is not, however, listed in the examples of how to use it so the format is not declared. I was just wondering what is the format of that field. It's supposed to be the expiration date of the mission, so I leaning towards "date" field format. Or is it some other INT or DEC?

Thanx
 
I have a question about scripts like this one:
Code:
{if reportbody.orbitalperiodprobability < 0.1:
        {set orbitNotables to cat(orbitNotables, [cat("incredibly fast", retrograde)])}
|elif reportbody.orbitalperiodprobability < 1:
        {set orbitNotables to cat(orbitNotables, [cat("extremely fast", retrograde)])}
|elif reportbody.orbitalperiodprobability < 3:
        {set orbitNotables to cat(orbitNotables, [cat("unusually fast", retrograde)])}
}
The meaning of "incredibly" is that it is so much rare (so: incredible) to have an orbit so fast (related to what? radius?) or that it is the orbital period, in absolute, being incredibly fast?

'cause i heard values which were not so big, still marked as "incredibly", and in italian this kind of phrasing works only in the latter case.

Dunno if i'm able to explain myself. Basically, there's a lot of code like this and i don't get the real meaning.
 
Last edited:
I have a question about scripts like this one:
Code:
{if reportbody.orbitalperiodprobability < 0.1:
        {set orbitNotables to cat(orbitNotables, [cat("incredibly fast", retrograde)])}
|elif reportbody.orbitalperiodprobability < 1:
        {set orbitNotables to cat(orbitNotables, [cat("extremely fast", retrograde)])}
|elif reportbody.orbitalperiodprobability < 3:
        {set orbitNotables to cat(orbitNotables, [cat("unusually fast", retrograde)])}
}
The meaning of "incredibly" is that it is so much rare (so: incredible) to have an orbit so fast (related to what? radius?) or that it is the orbital period, in absolute, being incredibly fast?

'cause i heard values which were not so big, still marked as "incredibly", and in italian this kind of phrasing works only in the latter case.

Dunno if i'm able to explain myself. Basically, there's a lot of code like this and i don't get the real meaning.
I've always thought it means that (in this case) the time it takes for the body to make one orbit around the host star, is very fast. So compared to Earth: we have an orbital period of 12 months, so if it were "extremely fast" it might be 6 months, and "incredibly fast" might be 2-3 months or even less.
 
I've always thought it means that (in this case) the time it takes for the body to make one orbit around the host star, is very fast. So compared to Earth: we have an orbital period of 12 months, so if it were "extremely fast" it might be 6 months, and "incredibly fast" might be 2-3 months or even less.
That's what i understand too. But then, why the qualifier (incredibly") is based on the probability of it? That's what confuses me.
I got something like "it has a incredibly fast rotation period of one day". What? It could be incredible if other properties of the planet (size, mass, whatever) make that period extremly rare but if that is the meaning it did'nt arrive to me.
So, since i'm trying to build the "default" italian personality, i'm asking :)
 
That's what i understand too. But then, why the qualifier (incredibly") is based on the probability of it? That's what confuses me.
I got something like "it has a incredibly fast rotation period of one day". What? It could be incredible if other properties of the planet (size, mass, whatever) make that period extremly rare but if that is the meaning it did'nt arrive to me.
So, since i'm trying to build the "default" italian personality, i'm asking :)
Hmm, I see what you mean. Is it compared to Earth? Or maybe compared to other bodies that are that distance from their star? Or maybe something else?

I would guess that it is compared to Earth, because there is no way to compare body X with other alike bodies, at least not without having a huge database to look up similar bodies in. I know EDSM could probably provide the information, but I think that would take too long to process, and would slow EDDI down when reporting. Comparing it to Earth is quick and easy, and only requires knowing the absolute number of days that body X takes to orbit it's star.
 
Hi... I'm a noob with two questions :D

1.) When using "Bodies to map": is there a way to make EDDI also say when there are no worthwhile planets? It does work, but the script checks if mappedbodies > 1. And I would like to know before mapping some random planet.

2.) When using "route" to find nearest human tech broker / material trader / whatever: is there a way to make EDDI copy the result to the clipboard?
 
Hi... I'm a noob with two questions :D

1.) When using "Bodies to map": is there a way to make EDDI also say when there are no worthwhile planets? It does work, but the script checks if mappedbodies > 1. And I would like to know before mapping some random planet.

2.) When using "route" to find nearest human tech broker / material trader / whatever: is there a way to make EDDI copy the result to the clipboard?
Hiya,

I've just answered No.1 for you in the other thread. ☺️ As for No.2, I don't think EDDI can copy to the clipboard (I may be wrong though). If you use Voice Attack, then you could use that to copy to the clipboard.
 
Hiya,

I've just answered No.1 for you in the other thread. ☺️ As for No.2, I don't think EDDI can copy to the clipboard (I may be wrong though). If you use Voice Attack, then you could use that to copy to the clipboard.
Thanks a lot for your answer. Sorry, I wasn't sure where to post my question, so I put it in both threads ^^

Alas I am not much of a programmer... could you tell me how I can use Voice Attack to copy the information to the clipboard, please?
 
Thanks a lot for your answer. Sorry, I wasn't sure where to post my question, so I put it in both threads ^^

Alas I am not much of a programmer... could you tell me how I can use Voice Attack to copy the information to the clipboard, please?
There may be an easier way to do this, but I'm not that great at using VA. Anyway...

At the end of the 'Route details' script, add this line:
{SetState('routedetails_destination', event.system)}
This will save the destination system in a variable VA can use. Then in VA, there is a function you can add to a command called 'Set a text value to the Windows clipboard'. It's in the 'Other > Windows' menu. Add it to whatever VA command you want to copy the info to the clipboard in. When you select it, in the box that pops up, enter this:
{TXT:EDDI state routedetails_destination}
This will copy the variables contents (the system name) to the clipboard.

This is the most basic way to do it. Me being me, I'd try to set it all up to happen automatically when a route is created, and I've already thought about it, but it's a little trickier than I first imagined (at least for my level of VA knowledge anyway). I'll keep at it and let you know if I come up with something, but hopefully the above can be of some help for now. :)
 
Thanks a lot for your answer. Sorry, I wasn't sure where to post my question, so I put it in both threads ^^

Alas I am not much of a programmer... could you tell me how I can use Voice Attack to copy the information to the clipboard, please?
OK, so after a bit of tinkering, I think I've got something that may be of some use...

In whatever EDDI script you are using to access the RouteDetails() function, add this line just before the {set system to RouteDetails("human")} (or whatever route you are requesting) line:
Code:
{SetState('routedetails_destination', '')}
This makes sure the 'routedetails_destination' variable is made blank before the route is created. This is important for the VA parts.

So, in VA I've written this:
Code:
Write [Blue] 'Dest: {TXT:EDDI state routedetails_destination}.' to log
Set decimal [timer] value to 0
Start Loop While : [EDDI state routedetails_destination] Equals ''
    Pause 1 second
    Set decimal [timer] to [timer] plus 1.00000
    Write [Blue] 'Timer: {DEC:timer}' to log
    Begin Decimal Compare : [timer] Equals 10.00000
        Loop Break
    End Condition
End Loop
Begin Text Compare : [EDDI state routedetails_destination] Does Not Equal ''
    Set Windows clipboard to '{TXT:EDDI state routedetails_destination}'
    Write [Blue] 'Destination set: {TXT:EDDI state routedetails_destination}.' to log
Else
    Write [Blue] 'Timer: Failed to copy to clipboard within 10 seconds.' to log
End Condition
I've got the 'Write to log' commands in there for testing, so just delete them once you're happy with it all. You could even change the last line " ...failed to copy..." to make EDDI say that it's failed. :)

Put the above code in a new VA command called ((EDDI route details)). This will then run every time the RouteDetails() function is used in EDDI, and (fingers crossed) should copy whatever destination is set by that function, to the Windows Clipboard. It will wait for the destination to be set (that's the WHILE loop), but if 10 seconds pass without a destination being set, it will exit the command. This prevents it waiting forever. You can adjust the timer to however long you want by changing the line that says '10.00000' to any other number.

I've also attached a VA profile with just that command in it, so you can import it if you don't feel up to writing it yourself. :)

Good luck, and I hope this helps with what you want to achieve. (y)

DC

EDIT: Oh, I should have said, to be clear, that the line {SetState('routedetails_destination', event.system)} still needs to be at the end of the RouteDetails() script. ;)
 

Attachments

  • EDDI-VA Darkcyde Route Details-Profile.zip
    1.8 KB · Views: 17
Last edited:
OK, so after a bit of tinkering, I think I've got something that may be of some use...

In whatever EDDI script you are using to access the RouteDetails() function, add this line just before the {set system to RouteDetails("human")} (or whatever route you are requesting) line:
Code:
{SetState('routedetails_destination', '')}
This makes sure the 'routedetails_destination' variable is made blank before the route is created. This is important for the VA parts.

So, in VA I've written this:
Code:
Write [Blue] 'Dest: {TXT:EDDI state routedetails_destination}.' to log
Set decimal [timer] value to 0
Start Loop While : [EDDI state routedetails_destination] Equals ''
    Pause 1 second
    Set decimal [timer] to [timer] plus 1.00000
    Write [Blue] 'Timer: {DEC:timer}' to log
    Begin Decimal Compare : [timer] Equals 10.00000
        Loop Break
    End Condition
End Loop
Begin Text Compare : [EDDI state routedetails_destination] Does Not Equal ''
    Set Windows clipboard to '{TXT:EDDI state routedetails_destination}'
    Write [Blue] 'Destination set: {TXT:EDDI state routedetails_destination}.' to log
Else
    Write [Blue] 'Timer: Failed to copy to clipboard within 10 seconds.' to log
End Condition
I've got the 'Write to log' commands in there for testing, so just delete them once you're happy with it all. You could even change the last line " ...failed to copy..." to make EDDI say that it's failed. :)

Put the above code in a new VA command called ((EDDI route details)). This will then run every time the RouteDetails() function is used in EDDI, and (fingers crossed) should copy whatever destination is set by that function, to the Windows Clipboard. It will wait for the destination to be set (that's the WHILE loop), but if 10 seconds pass without a destination being set, it will exit the command. This prevents it waiting forever. You can adjust the timer to however long you want by changing the line that says '10.00000' to any other number.

I've also attached a VA profile with just that command in it, so you can import it if you don't feel up to writing it yourself. :)

Good luck, and I hope this helps with what you want to achieve. (y)

DC

EDIT: Oh, I should have said, to be clear, that the line {SetState('routedetails_destination', event.system)} still needs to be at the end of the RouteDetails() script. ;)
To be honest, I don't have a clue what you did there with VA, but it works :D Thank you so much!
 
OK, so after a bit of tinkering, I think I've got something that may be of some use...

In whatever EDDI script you are using to access the RouteDetails() function, add this line just before the {set system to RouteDetails("human")} (or whatever route you are requesting) line:
Code:
{SetState('routedetails_destination', '')}
This makes sure the 'routedetails_destination' variable is made blank before the route is created. This is important for the VA parts.

So, in VA I've written this:
Code:
Write [Blue] 'Dest: {TXT:EDDI state routedetails_destination}.' to log
Set decimal [timer] value to 0
Start Loop While : [EDDI state routedetails_destination] Equals ''
    Pause 1 second
    Set decimal [timer] to [timer] plus 1.00000
    Write [Blue] 'Timer: {DEC:timer}' to log
    Begin Decimal Compare : [timer] Equals 10.00000
        Loop Break
    End Condition
End Loop
Begin Text Compare : [EDDI state routedetails_destination] Does Not Equal ''
    Set Windows clipboard to '{TXT:EDDI state routedetails_destination}'
    Write [Blue] 'Destination set: {TXT:EDDI state routedetails_destination}.' to log
Else
    Write [Blue] 'Timer: Failed to copy to clipboard within 10 seconds.' to log
End Condition
I've got the 'Write to log' commands in there for testing, so just delete them once you're happy with it all. You could even change the last line " ...failed to copy..." to make EDDI say that it's failed. :)

Put the above code in a new VA command called ((EDDI route details)). This will then run every time the RouteDetails() function is used in EDDI, and (fingers crossed) should copy whatever destination is set by that function, to the Windows Clipboard. It will wait for the destination to be set (that's the WHILE loop), but if 10 seconds pass without a destination being set, it will exit the command. This prevents it waiting forever. You can adjust the timer to however long you want by changing the line that says '10.00000' to any other number.

I've also attached a VA profile with just that command in it, so you can import it if you don't feel up to writing it yourself. :)

Good luck, and I hope this helps with what you want to achieve. (y)

DC

EDIT: Oh, I should have said, to be clear, that the line {SetState('routedetails_destination', event.system)} still needs to be at the end of the RouteDetails() script. ;)
The while loop shouldn't be necessary and you can skip the SetState too. Once you trigger RouteDetails() in Cottle or the route context in VA), you can pick up the result directly from ((EDDI route details)) with the value of {TXT:EDDI route details system}. 😉
 
The while loop shouldn't be necessary and you can skip the SetState too. Once you trigger RouteDetails() in Cottle or the route context in VA), you can pick up the result directly from ((EDDI route details)) with the value of {TXT:EDDI route details system}. 😉
Ahh, I see. See, I said I wasn't great at VA. ☺️

So, then this is all that's needed in the VA ((EDDI route details)):
Code:
Begin Text Compare : [EDDI route details system] Does Not Equal ''
    Set Windows clipboard to '{TXT:EDDI route details system}'
Else
    Set text [Script] to 'Failed to copy destination to the Windows clipboard.'
    Execute external plugin, 'EDDI 4.0.1-b1' using context 'say'
End Condition
@Belandriel, I've updated the file with the command in for importing, as attached. I've also updated the ELSE to make EDDI say it's failed, but you can delete that part if you don't want it. :)

Thank you @T'kael for the advice and info. (y)

DC
 

Attachments

  • EDDI-VA Darkcyde Route Details-Profile.zip
    1.4 KB · Views: 20
So, in my usual way, I've iterated on my VA command already... 😁
Code:
Begin Text Compare : [EDDI route details system] Does Not Equal ''
    Set Windows clipboard to '{TXT:EDDI route details system}'
    Set text [Script] to 'Destination copied to the clipboard.'
    Execute external plugin, 'EDDI 4.0.1-b1' using context 'say'
Else
    Set text [Script] to 'Clipboard not updated.'
    Execute external plugin, 'EDDI 4.0.1-b1' using context 'say'
End Condition

I've added confirmation speech for when the destination has been copied to the clipboard. I've also altered the 'failed' speech to be more general, for when there is simply nothing to copy, i.e. no human broker in range. That's not really a 'failure' to copy, and the clipboard will retain whatever was already in there, so this now makes more sense.
 
2.) When using "route" to find nearest human tech broker / material trader / whatever: is there a way to make EDDI copy the result to the clipboard?
EDDI does that automatically when a search is initiated from the "Material Monitor" tab. Also when searching for Interstellar Factors on the "Crime Monitor" tab and the "Next in Route" button in the "Mission Monitor" tab.

If the corresponding VA commands aren't doing the same, I'm sure we can fix that up.
 
EDDI does that automatically when a search is initiated from the "Material Monitor" tab. Also when searching for Interstellar Factors on the "Crime Monitor" tab and the "Next in Route" button in the "Mission Monitor" tab.

If the corresponding VA commands aren't doing the same, I'm sure we can fix that up.
There's a ticket for that. https://github.com/EDCD/EDDI/issues/2002
Essentially, setting the clipboard is tied to the UI code and isn't triggered if not done through the UI. We need to disentangle that.
That said, VoiceAttack is perfectly capable of setting the clipboard on its own (as discussed above) too.
 
Morning All, I'm having an issue with the mission destination not being cleared if I abandon a mission. I'm looking for a way to count the missions, and if there aren't any, clear the destination.

Help is always appreciated
 
Morning All, I'm having an issue with the mission destination not being cleared if I abandon a mission. I'm looking for a way to count the missions, and if there aren't any, clear the destination.

Help is always appreciated
Hi Don_Chooluvit,

This should do what you are requesting:
Code:
{if missionsCount = 0:
    {set route to RouteDetails("cancel")}
}

If you're looking for this to happen when you abandon a mission, just paste it at the end of the 'Mission abandoned' event script (otherwise add it to whatever script you want it to happen in).

Unfortunately, I'm not in a position to test this properly at the moment, but I believe it should work fine. The only caveat to this, is that it may need to be {if missionsCount = 1:, as I'm not sure if the missionsCount variable is decreased before or after the 'Mission abandoned' script is run. Try it and see how you get on, and let us know if you have any problems. :)
 
@Darkcyde Thanks, I'll give it a go in between meetings.


EDIT BINGO!! That works perfectly!!! I might add it to the Update Mission route as a failsafe as well. I kept having EDDI try to navigate me back to missions destinations either after they were completed or abandoned.
 
Last edited:
@Darkcyde Thanks, I'll give it a go in between meetings.


EDIT BINGO!! That works perfectly!!! I might add it to the Update Mission route as a failsafe as well. I kept having EDDI try to navigate me back to missions destinations either after they were completed or abandoned.
Yeah, I believe this is because the RouteDetails() function always takes you back to your origin when using it for missions. I think this is because people usually run missions to get rep with a faction, so returning to origin is favoured.

I made my own take on this for missions, and I added an option to go back to origin or not (personally, I set it to 'off' all the time). Maybe this is something that the team could add at some point, an option to return to origin or not? 🤔
 
Top Bottom