Release EDDI - Windows app for immersion and more

Status
Thread Closed: Not open for further replies.

Need a bit help here, it seems.

I have:
- a command in va that sets the integer: eddi_minimal to 0, saved to profile
- another that sets it to 1
- set Text variable 'State variable' to a variable: eddi_minimal
- execute the plugin with context: setstate

On jumping event in EDDI config i put the whole script into a conditional block, like:
{if eddi_minimal = 0:
{OneOf("Destination confirmed","Jump in progress","Telemetry obtained")}.
...
}

Am i missing something? The test function says nothing at all...
 
Need a bit help here, it seems.

I have:
- a command in va that sets the integer: eddi_minimal to 0, saved to profile
- another that sets it to 1
- set Text variable 'State variable' to a variable: eddi_minimal
- execute the plugin with context: setstate

On jumping event in EDDI config i put the whole script into a conditional block, like:
{if eddi_minimal = 0:
{OneOf("Destination confirmed","Jump in progress","Telemetry obtained")}.
...
}

Am i missing something? The test function says nothing at all...

State variables are put in the state object, so you need:

{if state.eddi_minimal = 0:
 
@JGM, I guess my question flew under the radar back there, but could you possible answer this one?

I want to extend the Jump event response with an option to tell the player if any of the items in the cargo bay are illegal in the destination system. I found no event, object or property in the raws that would get this info.
But, I found a property in the EDDB "stations.json" called "prohibited_commodities", that gives a list of the illegal wares at that station. The only problem is, I found no reference to this in the EDDI raws, the "station" object doesn't query for this property, so I can't access it from whitin EDDI. If it did, it would be possible to get the list of stations of the target system when jumping and then match the ship's cargo against the list of illegal wares for each station in the system.

Would it be possible to add this property to the station object?
 
State variables are put in the state object, so you need:

{if state.eddi_minimal = 0:

Ah, o.k.
Would the Test Script function work while switching those variables?
Doesn't seem so, still won't say anything.

edit: doesn't work even after restarting VA either.
Perhaps it would be better for me to use the personality switch for this scenario?

edit: YES!
Got it working. Thought i had to set State Variable to 'A variable: eddi_minimal'. Changed that to Text: eddi_minimal and it worked!
 
Last edited:
I've had the opportunity to 'pre-beta test' the 'setstate' functionality and I can attest that it's very powerful.

For example, in anticipation of 2.1.0 b1, I have written VA commands with turn off and on the speech responder...

VA Command 'Data Interface off' :
Execute external plugin 'EDDI 2.1.0-b1' and wait for return (with context = disablespeechresponder)

VA Command 'Data Interface on' :
Execute external plugin 'EDDI 2.1.0-b1' and wait for return (with context = enablespeechresponder)

Additionally, I've created a Boolean 'state object' variable called 'verbose', which controls how chatty the speech responder scripts can be...

VA Command 'Data Interface brief' :
Set Boolean [verbose] to False
Set Text [State Variable] to 'verbose'
Execute external plugin 'EDDI 2.1.0-b1' and wait for return (with context = setstate & Text Variables = State Variable)

VA Command 'Data Interface verbose' :
Set Boolean [verbose] to True
Set Text [State Variable] to 'verbose'
Execute external plugin 'EDDI 2.1.0-b1' and wait for return (with context = setstate & Text Variables = State Variable)

For example, using 'verbose', I can do this with the 'Galnet news published' script...

Code:
{if state.verbose:
    {set regexfilter to "^(?!(.*Weekly|Report.*)|(.*Powerplay|Update.*)|(.*Starport|Update.*)).*$"}
    {if len(event.items) = 1:
        A new Galnet article has been published, entitled {event.items[0].title}.
        {if match(event.items[item].title, regexfilter):
            it reads 
            {Pause(1000)}
            {event.items[0].content}.
        }
    |elif len(event.items) > 1:
        {len(event.items)} new Galnet articles have been published.  
        {set item to 0}
        {while item < len(event.items):
            {if item = 0:
                The first is entitled {event.items[item].title}, 
                {if match(event.items[item].title, regexfilter):
                    and reads 
                    {Pause(1000)}
                    {event.items[item].content}.
                }
            |elif item = 1:
                The second is entitled {event.items[item].title}, 
                {if match(event.items[item].title, regexfilter):
                    and reads 
                    {Pause(1000)}
                    {event.items[item].content}.
                }
            |elif item = len(event.items) - 1:
                The last is entitled {event.items[item].title}, 
                {if not(match(event.items[item].title, regexfilter)):
                    and reads 
                    {Pause(1000)}
                    {event.items[item].content}.
                }
            |else:
                The next is entitled {event.items[item].title},
                {if not(match(event.items[item].title, regexfilter)):
                    and reads 
                    {Pause(1000)}
                    {event.items[item].content}
                }
            }
            {set item to item + 1}
            {Pause(1000)}
        }.
    }
|else:
    {if len(event.items) = 1:
        A new Galnet article has been published, entitled {event.items[0].title}.
    |elif len(event.items) > 1:
        {len(event.items)} new Galnet articles have been published.  Their titles are
        {set item to 0}
        {while item < len(event.items):
            {if item = len(event.items) - 1:
                and {event.items[item].title}
            |else:
                {event.items[item].title},
            }
            {set item to item + 1}
        }.
    }
}


Another example, I can now repeat the landing pad location after 'docking granted'...

VA Command 'Pad location' :
Set integer [landingpad] value to the value of [EDDI docking granted landingpad]
Set Text [station] to [EDDI docking granted station]
Set Text [State Variable] to 'landingpad'
Execute external plugin 'EDDI 2.1.0-b1' and wait for return (with context = setstate & Text Variables = State Variable)
Set Text [State Variable] to 'station'
Execute external plugin 'EDDI 2.1.0-b1' and wait for return (with context = setstate & Text Variables = State Variable)
Set Text [Script] to 'Pad location'
Execute external plugin 'EDDI 2.1.0-b1' and wait for return (with context = speech & Text Variables = Script)


Speech Responder script called 'Pad location'

Code:
{set station to StationDetails(state.station)}
{if station.model = "Coriolis Starport" || station.model = "Orbis Starport" || station.model = "Ocellus Starport" || station.model = "Unknown Starport":
    {Pause(500)}
    Landing pad {state.landingpad} is at
    {if state.landingpad = 1:
        six o'clock near
    |elif state.landingpad = 2:
        six o'clock near
    |elif state.landingpad = 3:
        six o'clock far
    |elif state.landingpad = 4:
        six o'clock far
    |elif state.landingpad = 5:
        seven o'clock near
    |elif state.landingpad = 6:
        seven o'clock near
    |elif state.landingpad = 7:
        seven o'clock
    |elif state.landingpad = 8:
        seven o'clock far
    |elif state.landingpad = 9:
        eight o'clock near
    |elif state.landingpad = 10:
        eight o'clock far
    |elif state.landingpad = 11:
        nine o'clock near
    |elif state.landingpad = 12:
        nine o'clock near
    |elif state.landingpad = 13:
        nine o'clock
    |elif state.landingpad = 14:
        nine o'clock far
    |elif state.landingpad = 15:
        nine o'clock far
    |elif state.landingpad = 16:
        ten o'clock near
    |elif state.landingpad = 17:
        ten o'clock near
    |elif state.landingpad = 18:
        ten o'clock far
    |elif state.landingpad = 19:
        ten o'clock far
    |elif state.landingpad = 20:
        eleven o'clock near
    |elif state.landingpad = 21:
        eleven o'clock near
    |elif state.landingpad = 22:
        eleven o'clock
    |elif state.landingpad = 23:
        eleven o'clock far
    |elif state.landingpad = 24:
        twelve o'clock near
    |elif state.landingpad = 25:
        twelve o'clock far
    |elif state.landingpad = 26:
        one o'clock near
    |elif state.landingpad = 27:
        one o'clock near
    |elif state.landingpad = 28:
        one o'clock
    |elif state.landingpad = 29:
        one o'clock far
    |elif state.landingpad = 30:
        one o'clock far
    |elif state.landingpad = 31:
        two o'clock near
    |elif state.landingpad = 32:
        two o'clock near
    |elif state.landingpad = 33:
        two o'clock far
    |elif state.landingpad = 34:
        two o'clock far
    |elif state.landingpad = 35:
        three o'clock near
    |elif state.landingpad = 36:
        three o'clock near
    |elif state.landingpad = 37:
        three o'clock
    |elif state.landingpad = 38:
        three o'clock near
    |elif state.landingpad = 39:
        four o'clock near
    |elif state.landingpad = 40:
        four o'clock far
    |elif state.landingpad = 41:
        five o'clock near
    |elif state.landingpad = 42:
        five o'clock near
    |elif state.landingpad = 43:
        five o'clock
    |elif state.landingpad = 44:
        five o'clock far
    |elif state.landingpad = 45:
        five o'clock far
    }
    , as you enter with the green lights on your right.
}


This should give you a little taste as to the power of State objects. I hope you find this useful.

H/T to Cmdr Tkael for his excellent Galnet reader script.
 
Last edited:
@JGM, I guess my question flew under the radar back there, but could you possible answer this for me?

I want to extend the Jump event response with an option to tell the player if any of the items in the cargo bay are illegal in the destination system. I found no event, object or property in the raws that would get this info.
But, I found a property in the EDDB "stations.json" called "prohibited_commodities", that gives a list of the illegal wares at that station. The only problem is, I found no reference to this in the EDDI raws, the "station" object doesn't query for this property, so I can't access it from whitin EDDI. If it did, it would be possible to get the list of stations of the target system when jumping and then match the ship's cargo against the list of illegal wares for each station in the system.

Would it be possible to add this property to the station object?

Thanks
 
I've had the opportunity to 'pre-beta test' the 'setstate' functionality and I can attest that it's very powerful.

For example, in anticipation of 2.1.0 b1, I have written VA commands with turn off and on the speech responder...

VA Command 'Data Interface off' :
Execute external plugin 'EDDI 2.1.0-b1' and wait for return (with context = disablespeechresponder)

VA Command 'Data Interface on' :
Execute external plugin 'EDDI 2.1.0-b1' and wait for return (with context = enablespeechresponder)

Additionally, I've created a Boolean 'state object' variable called 'verbose', which controls how chatty the speech responder scripts can be...

VA Command 'Data Interface brief' :
Set Boolean [verbose] to False
Set Text [State Variable] to 'verbose'
Execute external plugin 'EDDI 2.1.0-b1' and wait for return (with context = setstate & Text Variables = State Variable)

VA Command 'Data Interface verbose' :
Set Boolean [verbose] to True
Set Text [State Variable] to 'verbose'
Execute external plugin 'EDDI 2.1.0-b1' and wait for return (with context = setstate & Text Variables = State Variable)

For example, using 'verbose', I can do this with the 'Galnet news published' script...

Code:
{if state.verbose:
    {set regexfilter to "^(?!(.*Weekly|Report.*)|(.*Powerplay|Update.*)|(.*Starport|Update.*)).*$"}
    {if len(event.items) = 1:
        A new Galnet article has been published, entitled {event.items[0].title}.
        {if match(event.items[item].title, regexfilter):
            it reads 
            {Pause(1000)}
            {event.items[0].content}.
        }
    |elif len(event.items) > 1:
        {len(event.items)} new Galnet articles have been published.  
        {set item to 0}
        {while item < len(event.items):
            {if item = 0:
                The first is entitled {event.items[item].title}, 
                {if match(event.items[item].title, regexfilter):
                    and reads 
                    {Pause(1000)}
                    {event.items[item].content}.
                }
            |elif item = 1:
                The second is entitled {event.items[item].title}, 
                {if match(event.items[item].title, regexfilter):
                    and reads 
                    {Pause(1000)}
                    {event.items[item].content}.
                }
            |elif item = len(event.items) - 1:
                The last is entitled {event.items[item].title}, 
                {if not(match(event.items[item].title, regexfilter)):
                    and reads 
                    {Pause(1000)}
                    {event.items[item].content}.
                }
            |else:
                The next is entitled {event.items[item].title},
                {if not(match(event.items[item].title, regexfilter)):
                    and reads 
                    {Pause(1000)}
                    {event.items[item].content}
                }
            }
            {set item to item + 1}
            {Pause(1000)}
        }.
    }
|else:
    {if len(event.items) = 1:
        A new Galnet article has been published, entitled {event.items[0].title}.
    |elif len(event.items) > 1:
        {len(event.items)} new Galnet articles have been published.  Their titles are
        {set item to 0}
        {while item < len(event.items):
            {if item = len(event.items) - 1:
                and {event.items[item].title}
            |else:
                {event.items[item].title},
            }
            {set item to item + 1}
        }.
    }
}


Another example, I can now repeat the landing pad location after 'docking granted'...

VA Command 'Pad location' :
Set integer [landingpad] value to the value of [EDDI docking granted landingpad]
Set Text [station] to [EDDI docking granted station]
Set Text [State Variable] to 'landingpad'
Execute external plugin 'EDDI 2.1.0-b1' and wait for return (with context = setstate & Text Variables = State Variable)
Set Text [State Variable] to 'station'
Execute external plugin 'EDDI 2.1.0-b1' and wait for return (with context = setstate & Text Variables = State Variable)
Set Text [Script] to 'Pad location'
Execute external plugin 'EDDI 2.1.0-b1' and wait for return (with context = speech & Text Variables = Script)


Speech Responder script called 'Pad location'

Code:
{set station to StationDetails(state.station)}
{if station.model = "Coriolis Starport" || station.model = "Orbis Starport" || station.model = "Ocellus Starport" || station.model = "Unknown Starport":
    {Pause(500)}
    Landing pad {state.landingpad} is at
    {if state.landingpad = 1:
        six o'clock near
    |elif state.landingpad = 2:
        six o'clock near
    |elif state.landingpad = 3:
        six o'clock far
    |elif state.landingpad = 4:
        six o'clock far
    |elif state.landingpad = 5:
        seven o'clock near
    |elif state.landingpad = 6:
        seven o'clock near
    |elif state.landingpad = 7:
        seven o'clock
    |elif state.landingpad = 8:
        seven o'clock far
    |elif state.landingpad = 9:
        eight o'clock near
    |elif state.landingpad = 10:
        eight o'clock far
    |elif state.landingpad = 11:
        nine o'clock near
    |elif state.landingpad = 12:
        nine o'clock near
    |elif state.landingpad = 13:
        nine o'clock
    |elif state.landingpad = 14:
        nine o'clock far
    |elif state.landingpad = 15:
        nine o'clock far
    |elif state.landingpad = 16:
        ten o'clock near
    |elif state.landingpad = 17:
        ten o'clock near
    |elif state.landingpad = 18:
        ten o'clock far
    |elif state.landingpad = 19:
        ten o'clock far
    |elif state.landingpad = 20:
        eleven o'clock near
    |elif state.landingpad = 21:
        eleven o'clock near
    |elif state.landingpad = 22:
        eleven o'clock
    |elif state.landingpad = 23:
        eleven o'clock far
    |elif state.landingpad = 24:
        twelve o'clock near
    |elif state.landingpad = 25:
        twelve o'clock far
    |elif state.landingpad = 26:
        one o'clock near
    |elif state.landingpad = 27:
        one o'clock near
    |elif state.landingpad = 28:
        one o'clock
    |elif state.landingpad = 29:
        one o'clock far
    |elif state.landingpad = 30:
        one o'clock far
    |elif state.landingpad = 31:
        two o'clock near
    |elif state.landingpad = 32:
        two o'clock near
    |elif state.landingpad = 33:
        two o'clock far
    |elif state.landingpad = 34:
        two o'clock far
    |elif state.landingpad = 35:
        three o'clock near
    |elif state.landingpad = 36:
        three o'clock near
    |elif state.landingpad = 37:
        three o'clock
    |elif state.landingpad = 38:
        three o'clock near
    |elif state.landingpad = 39:
        four o'clock near
    |elif state.landingpad = 40:
        four o'clock far
    |elif state.landingpad = 41:
        five o'clock near
    |elif state.landingpad = 42:
        five o'clock near
    |elif state.landingpad = 43:
        five o'clock
    |elif state.landingpad = 44:
        five o'clock far
    |elif state.landingpad = 45:
        five o'clock far
    }
    , as you enter with the green lights on your right.
}


This should give you a little taste as to the power of State objects. I hope you find this useful.

H/T to Cmdr Tkael for his excellent Galnet reader script.

Just when I thought I had a decent handle on scripting in EDDI 2 and VA. This stuff is way over my head :D

I'm finding somethings easier to script in VA than EDDI at times.

Looks like my little personality "Infinity" is going to have a little Twitch/OBS overlay module. Was an idea I was thinking about when i first started using EDDI and then EDDI 2
 
jgm, the default scripts appear to be unchanged in the new beta?
For instance, the default script for "Docking denied" is still "We have been denied docking." with none of the described additions.
(I checked both my custom personality and the default personality, no difference to the default was found).
 
Last edited:
jgm, the default scripts appear to be unchanged in the new beta?
For instance, the default script for "Docking denied" is still "We have been denied docking." with none of the described additions.
(I checked both my custom personality and the default personality, no difference to the default was found).

Yes, for some odd reason the updates weren't included in the package.

If you want you can grab them from https://www.mcdee.net/elite/eddi.json and put them in to your EDDI directory (replacing the existing one). It'll be packaged correctly in the next beta release.
 
Yes, for some odd reason the updates weren't included in the package.

If you want you can grab them from https://www.mcdee.net/elite/eddi.json and put them in to your EDDI directory (replacing the existing one). It'll be packaged correctly in the next beta release.

This doesn't work. As soon as I start EDDI, it overwrites the downloaded eddi.json file with an almost empty one.

EDIT: Ok, what did work was changing the filename to beta.json and editing the 'name' inside the file to 'beta', then throwing it into the personalities folder.
 
Last edited:
This doesn't work. As soon as I start EDDI, it overwrites the downloaded eddi.json file with an almost empty one.

EDIT: Ok, what did work was changing the filename to beta.json and editing the 'name' inside the file to 'beta', then throwing it into the personalities folder.

Sorry, to be clear what I meant by 'EDDI directory' is wherever you installed EDDI (e.g. c:\Program files (x86)\VoiceAttack\Apps\EDDI). NOT your %APPDATA%\EDDI
 
jgm,

I have a feature request to add to your long list ;)

I would like voice attack to have access to the utility mount variables, similar to the ship compartment variables

My interest is in writing a Voice Attack ((EDDI Shields down)) script which will scan the Utility Mount locations and automatically disable any Shield Boosters, keeping the shield recharge time to a minimum. When shields come back up, the shield boosters will be reactivated via ((EDDI Shields up)). These scripts would 'just work', regardless of the ship presently manned.
 
Last edited:
jgm,

I have a feature request to add to your long list ;)

I would like voice attack to have access to the utility mount variables, similar to the ship compartment variables

My interest is in writing a Voice Attack ((EDDI Shields down)) script which will scan the Utility Mount locations and automatically disable any Shield Boosters, keeping the shield recharge time to a minimum. When shields come back up, the shield boosters will be reactivated via ((EDDI Shields up)). These scripts would 'just work', regardless of the ship presently manned.

They should already be there, as tiny hardpoints (which is their official designation).
 
Ah, ok... I generally see them referred as Utility Mounts, hence the disconnect. Thanks!

Credit to TheThingIs for the original VA commands in my profile (taken from his MultiCrew profile), but I've been tinkering with automatic toggling of shield boosters a little already. I imagine you might be using the same or a very similar structure?

Here's my version of the ((set ship modules)) command from the MultiCrew profile:
Variables info: SC=Shield Cells SB=Shield Boosters
Position=where in the module list it is located, 1=top
SizeClass=the size and class of that module


Configure Variables
Auto switch to the next shield cell module when you use the last shield cell on that module. If not set you have to do it manually using the Reload Shield Cells command
Set Boolean [Auto switch modules when empty] to True
Activate heatsink each time a shield cell is used
Set Boolean [Activate Heatsink] to True


Find and set Shield Cell Bank (SC) modules


Begin Text Compare : [{TXT:Ship compartment 1 module}] Equals 'Shield Cell Bank'
Set integer [SC Module 1 Position] value to 1
Set Text [SC Module 1 SizeClass] to '{INT:Ship compartment 1 module class}{TXT:Ship compartment 1 module grade}'
Else
Set integer [SC Module 1 Position] value to 0
Set Text [SC Module 1 SizeClass] to '1E'
End Condition


Begin Text Compare : [{TXT:Ship compartment 2 module}] Equals 'Shield Cell Bank'
Set integer [SC Module 2 Position] value to 2
Set Text [SC Module 2 SizeClass] to '{INT:Ship compartment 2 module class}{TXT:Ship compartment 2 module grade}'
Else
Set integer [SC Module 2 Position] value to 0
Set Text [SC Module 2 SizeClass] to '1E'
End Condition


Begin Text Compare : [{TXT:Ship compartment 3 module}] Equals 'Shield Cell Bank'
Set integer [SC Module 3 Position] value to 3
Set Text [SC Module 3 SizeClass] to '{INT:Ship compartment 3 module class}{TXT:Ship compartment 3 module grade}'
Else
Set integer [SC Module 3 Position] value to 0
Set Text [SC Module 3 SizeClass] to '1E'
End Condition


Begin Text Compare : [{TXT:Ship compartment 4 module}] Equals 'Shield Cell Bank'
Set integer [SC Module 4 Position] value to 4
Set Text [SC Module 4 SizeClass] to '{INT:Ship compartment 4 module class}{TXT:Ship compartment 4 module grade}'
Else
Set integer [SC Module 4 Position] value to 0
Set Text [SC Module 4 SizeClass] to '1E'
End Condition


Begin Text Compare : [{TXT:Ship compartment 5 module}] Equals 'Shield Cell Bank'
Set integer [SC Module 5 Position] value to 5
Set Text [SC Module 5 SizeClass] to '{INT:Ship compartment 5 module class}{TXT:Ship compartment 5 module grade}'
Else
Set integer [SC Module 5 Position] value to 0
Set Text [SC Module 5 SizeClass] to '1E'
End Condition


Begin Text Compare : [{TXT:Ship compartment 6 module}] Equals 'Shield Cell Bank'
Set integer [SC Module 6 Position] value to 6
Set Text [SC Module 6 SizeClass] to '{INT:Ship compartment 6 module class}{TXT:Ship compartment 6 module grade}'
Else
Set integer [SC Module 6 Position] value to 0
Set Text [SC Module 6 SizeClass] to '1E'
End Condition


Begin Text Compare : [{TXT:Ship compartment 7 module}] Equals 'Shield Cell Bank'
Set integer [SC Module 7 Position] value to 7
Set Text [SC Module 7 SizeClass] to '{INT:Ship compartment 7 module class}{TXT:Ship compartment 7 module grade}'
Else
Set integer [SC Module 7 Position] value to 0
Set Text [SC Module 7 SizeClass] to '1E'
End Condition


Begin Text Compare : [{TXT:Ship compartment 8 module}] Equals 'Shield Cell Bank'
Set integer [SC Module 8 Position] value to 8
Set Text [SC Module 8 SizeClass] to '{INT:Ship compartment 8 module class}{TXT:Ship compartment 8 module grade}'
Else
Set integer [SC Module 8 Position] value to 0
Set Text [SC Module 8 SizeClass] to '1E'
End Condition


Begin Text Compare : [{TXT:Ship compartment 9 module}] Equals 'Shield Cell Bank'
Set integer [SC Module 9 Position] value to 9
Set Text [SC Module 9 SizeClass] to '{INT:Ship compartment 9 module class}{TXT:Ship compartment 9 module grade}'
Else
Set integer [SC Module 9 Position] value to 0
Set Text [SC Module 9 SizeClass] to '1E'
End Condition


Begin Text Compare : [{TXT:Ship compartment 10 module}] Equals 'Shield Cell Bank'
Set integer [SC Module 10 Position] value to 10
Set Text [SC Module 10 SizeClass] to '{INT:Ship compartment 10 module class}{TXT:Ship compartment 10 module grade}'
Else
Set integer [SC Module 10 Position] value to 0
Set Text [SC Module 10 SizeClass] to '1E'
End Condition


Begin Text Compare : [{TXT:Ship compartment 11 module}] Equals 'Shield Cell Bank'
Set integer [SC Module 11 Position] value to 11
Set Text [SC Module 11 SizeClass] to '{INT:Ship compartment 11 module class}{TXT:Ship compartment 11 module grade}'
Else
Set integer [SC Module 11 Position] value to 0
Set Text [SC Module 11 SizeClass] to '1E'
End Condition


Begin Text Compare : [{TXT:Ship compartment 12 module}] Equals 'Shield Cell Bank'
Set integer [SC Module 12 Position] value to 12
Set Text [SC Module 12 SizeClass] to '{INT:Ship compartment 12 module class}{TXT:Ship compartment 12 module grade}'
Else
Set integer [SC Module 12 Position] value to 0
Set Text [SC Module 12 SizeClass] to '1E'
End Condition


Find and set Shield Booster (SB) modules


Begin Text Compare : [{TXT:Ship tiny hardpoint 1 module}] Equals 'Shield Booster'
Set integer [SB Module 1 Position] value to 1
Else
Set integer [SB Module 1 Position] value to 0
End Condition


Begin Text Compare : [{TXT:Ship tiny hardpoint 2 module}] Equals 'Shield Booster'
Set integer [SB Module 2 Position] value to 1
Else
Set integer [SB Module 2 Position] value to 0
End Condition


Begin Text Compare : [{TXT:Ship tiny hardpoint 3 module}] Equals 'Shield Booster'
Set integer [SB Module 3 Position] value to 1
Else
Set integer [SB Module 3 Position] value to 0
End Condition


Begin Text Compare : [{TXT:Ship tiny hardpoint 4 module}] Equals 'Shield Booster'
Set integer [SB Module 4 Position] value to 1
Else
Set integer [SB Module 4 Position] value to 0
End Condition


Begin Text Compare : [{TXT:Ship tiny hardpoint 5 module}] Equals 'Shield Booster'
Set integer [SB Module 5 Position] value to 1
Else
Set integer [SB Module 5 Position] value to 0
End Condition


Begin Text Compare : [{TXT:Ship tiny hardpoint 6 module}] Equals 'Shield Booster'
Set integer [SB Module 6 Position] value to 1
Else
Set integer [SB Module 6 Position] value to 0
End Condition


Begin Text Compare : [{TXT:Ship tiny hardpoint 7 module}] Equals 'Shield Booster'
Set integer [SB Module 7 Position] value to 1
Else
Set integer [SB Module 7 Position] value to 0
End Condition


Begin Text Compare : [{TXT:Ship tiny hardpoint 8 module}] Equals 'Shield Booster'
Set integer [SB Module 8 Position] value to 1
Else
Set integer [SB Module 8 Position] value to 0
End Condition
The ((modules power toggle)) command:
Begin Integer Compare : [Module to toggle] Is Greater Than 0
Start Loop While : [Module Position] Does Not Equal [Module to toggle]
Begin Integer Compare : [Module Position] Is Less Than [Module to toggle]
Set integer [Module Position] to [Module Position] plus 1
Execute command, '((UI Down))' (by name) (and wait until it completes)
Else
Set integer [Module Position] to [Module Position] minus 1
Execute command, '((UI Up))' (by name) (and wait until it completes)
End Condition
Pause 0.02 seconds
Begin Boolean Compare : [Debug Mode] Equals True
Write '[Red] Module Position: {INT:Module Position}' to log
Pause 1 second
End Condition
End Loop
Execute command, '((UI Accept))' (by name) (and wait until it completes)
Pause 0.02 seconds
Execute command, '((UI Accept))' (by name) (and wait until it completes)
End Condition
The ((EDDI shields up)) command:
Begin Integer Compare : [SB Module 1 Position] Is Greater Than 0
Play sound, '{VA_SOUNDS}\hcspack-MULTI-CREW\Ships\Reactivating shield boosters.wav'
Execute command, 'Modules' (and wait until it completes)
Set integer [Module to toggle] value to the value of [SB Module 1 Position]
Execute command, '((Modules power toggle))' (and wait until it completes)
Set integer [Module to toggle] value to the value of [SB Module 2 Position]
Execute command, '((Modules power toggle))' (and wait until it completes)
Set integer [Module to toggle] value to the value of [SB Module 3 Position]
Execute command, '((Modules power toggle))' (and wait until it completes)
Set integer [Module to toggle] value to the value of [SB Module 4 Position]
Execute command, '((Modules power toggle))' (and wait until it completes)
Set integer [Module to toggle] value to the value of [SB Module 5 Position]
Execute command, '((Modules power toggle))' (and wait until it completes)
Set integer [Module to toggle] value to the value of [SB Module 6 Position]
Execute command, '((Modules power toggle))' (and wait until it completes)
Set integer [Module to toggle] value to the value of [SB Module 7 Position]
Execute command, '((Modules power toggle))' (and wait until it completes)
Set integer [Module to toggle] value to the value of [SB Module 8 Position]
Execute command, '((Modules power toggle))' (and wait until it completes)
Execute command, '((Look Ahead))' (and wait until it completes)
End Condition
Execute command, '((On every command))'
The ((EDDI shields down)) command:
Begin Integer Compare : [SB Module 1 Position] Is Greater Than 0
Play sound, '{VA_SOUNDS}\hcspack-MULTI-CREW\Ships\Disabling shield boosters for faster recharge.wav'
Execute command, 'Modules' (and wait until it completes)
Set integer [Module to toggle] value to the value of [SB Module 1 Position]
Execute command, '((Modules power toggle))' (and wait until it completes)
Set integer [Module to toggle] value to the value of [SB Module 2 Position]
Execute command, '((Modules power toggle))' (and wait until it completes)
Set integer [Module to toggle] value to the value of [SB Module 3 Position]
Execute command, '((Modules power toggle))' (and wait until it completes)
Set integer [Module to toggle] value to the value of [SB Module 4 Position]
Execute command, '((Modules power toggle))' (and wait until it completes)
Set integer [Module to toggle] value to the value of [SB Module 5 Position]
Execute command, '((Modules power toggle))' (and wait until it completes)
Set integer [Module to toggle] value to the value of [SB Module 6 Position]
Execute command, '((Modules power toggle))' (and wait until it completes)
Set integer [Module to toggle] value to the value of [SB Module 7 Position]
Execute command, '((Modules power toggle))' (and wait until it completes)
Set integer [Module to toggle] value to the value of [SB Module 8 Position]
Execute command, '((Modules power toggle))' (and wait until it completes)
Execute command, '((Look Ahead))' (and wait until it completes)
End Condition
Execute command, '((On every command))'

Disclaimer: This kind of script only works if your right panel is correctly positioned before the command sequence starts. I am not at fault is someone self destructs themselves, jettisons all of their cargo, etc. by manipulating the right panel via VA. ;-)
 
That works fine for people who have api access, I can't do that though as not everyone has access to it. What do you do if the api is down? Good change though, well done :)

Even though you auto check for shield boosters, don't you still have to manually edit it anyway to indicate where in the module tab they are? AFAIK they are listed in power usage order and without a complicated script to work that out (including engineered things) there is no way of knowing, hence the necessity to still manually edit it.
 
Last edited:
That works fine for people who have api access, I can't do that though as not everyone has access to it. What do you do if the api is down? Good change though, well done :)

Even though you auto check for shield boosters, don't you still have to manually edit it anyway to indicate where in the module tab they are? AFAIK they are listed in power usage order and without a complicated script to work that out (including engineered things) there is no way of knowing, hence the necessity to still manually edit it.

As I said, this is something I've only tinkered with. Suggestions for improvement are welcome.

You've got a good point - I didn't think to take into account the re-ordering that would naturally occur due to varying power usages, and it doesn't look like the power draw of each module is available via EDDI (yet?).

If I have to manually re-edit the commands for each ship I fly then it won't be worth doing. But if we could get the power draw then we may be able to create a sort function inside of VA? (https://en.wikipedia.org/wiki/Sorting_algorithm)
 
Last edited:
  • Added scripts for new events 'Entered CQC', 'Power commodity fast tracked', 'Power commodity delivered', 'Power commodity obtained', 'Power salary claimed', 'Power expansion vote cast', 'Power defected', 'Power left', and 'Power joined.


EDDI beta lists a 'Power preparation vote cast' but not a 'Power expansion vote cast' script?
 
Status
Thread Closed: Not open for further replies.
Back
Top Bottom