Closed Slegnor closed 4 years ago
I may be wrong, but I was under the impression that the only variables available to VA were those listed here:- https://github.com/EDCD/EDDI/wiki/VoiceAttack-Integration Body/Star data isn't listed, so I thought that those wouldn't be available? If that's not the case, and they should be working, then that page needs updating too. :/
If you suspect regional settings, try replacing {DEC:EDDI star scanned semimajoraxis}
with {DECINV:EDDI star scanned semimajoraxis}
. Per VoiceAttack's help manual, this should render the value using the invariant culture settings rather than with your local / regional culture settings.
@darkcyde those are event variables, documented on the applicable event page: https://github.com/EDCD/EDDI/wiki/Star-scanned-event
@Tkael Ahh, I see. Sorry, I'd never realised those pages had that information. It's been a very long time since I last looked at the wiki. Guess I should use that more often in future! ;)
@Slegnor If the above suggestion doesn't work then please post a screenshot of your VoiceAttack command so that we can see how you're trying to use the variables. Thanks!
@Tkael I am using Malic_VR's profile for VA (.vap attached as .txt)
Someone on his discord channel pointed out that some variables have been changed (RotationPeriod to RotationalPeriod, orbitalinclination to inclination & distancefromarrival to distance) so i have updated those and they seem to be working now, at least for bodies, however I am still getting the following errors from stars, changing DECINV on them does not seem to make a difference:
13:23:15 - Decimal token could not be converted : {DECINV:EDDI star scanned semimajoraxis} 13:23:15 - Decimal token could not be converted : {DECINV:EDDI star scanned orbitalperiod} 13:23:15 - Decimal token could not be converted : {DECINV:EDDI star scanned periapsis} 13:23:15 - Decimal token could not be converted : {DECINV:EDDI star scanned inclination} 13:23:15 - Decimal token could not be converted : {DECINV:EDDI star scanned eccentricity} 13:23:15 - Plugin command : '((EDDI star scanned))'
Command is as follows:
Round values
Set decimal [SolarMass] value to the converted value of {DEC:EDDI star scanned solarmass} (round to 4 decimal places)
Set decimal [Lumin] value to the converted value of {DEC:EDDI star scanned luminosity} (round to 2 decimal places)
Set decimal [AbsMag] value to the converted value of {DEC:EDDI star scanned absolutemagnitude} (round to 2 decimal places)
Set decimal [DfA] value to the converted value of {DEC:EDDI star scanned distance} (round to 2 decimal places)
Set decimal [Eccentricity] value to the converted value of {DECINV:EDDI star scanned eccentricity} (round to 4 decimal places)
Set decimal [OrbitalInclination] value to the converted value of {DECINV:EDDI star scanned inclination} (round to 2 decimal places)
Set decimal [Periapsis] value to the converted value of {DECINV:EDDI star scanned periapsis} (round to 2 decimal places)
Error checking for some problem star parameters
Begin Decimal Compare : [Eccentricity] Has Not Been Set
Set decimal [Eccentricity] value to 0
End Condition
Begin Decimal Compare : [OrbitalInclination] Has Not Been Set
Set decimal [OrbitalInclination] value to 0
End Condition
Begin Decimal Compare : [Periapsis] Has Not Been Set
Set decimal [Periapsis] value to 0
End Condition
Convert Age to millions or billions
Set decimal [Age] value to the converted value of {DEC:EDDI star scanned age}
Begin Decimal Compare : [Age] Is Less Than Or Equals 999999999
Set decimal [Age] to [Age] divided by 1000000 (round to 4 decimal places)
Set Text [Prefix] to 'million'
Else
Set decimal [Age] to [Age] divided by 1000000000 (round to 4 decimal places)
Set Text [Prefix] to 'billion'
End Condition
Convert radius meters to miles
Set decimal [Radius] value to the converted value of {DEC:EDDI star scanned radius}
Set decimal [Radius] to [Radius] divided by 1609.344 (round to 2 decimal places)
Convert rotational period
Set decimal [RotationalPeriod] value to the converted value of {DEC:EDDI star scanned rotationalperiod}
Begin Decimal Compare : [RotationalPeriod] Is Greater Than Or Equals 31536000
Set decimal [RotationalPeriod] to [RotationalPeriod] divided by 31536000.00000 (round to 2 decimal places)
Set Text [RotationalUnit] to 'years'
Else
Set decimal [RotationalPeriod] to [RotationalPeriod] divided by 86400 (round to 2 decimal places)
Set Text [RotationUnit] to 'days'
End Condition
Convert orbital period
Set decimal [OrbitalPeriod] value to the converted value of {DECINV:EDDI star scanned orbitalperiod}
Begin Decimal Compare : [OrbitalPeriod] Is Greater Than Or Equals 3156000
Set decimal [OrbitalPeriod] to [OrbitalPeriod] divided by 3156000 (round to 2 decimal places)
Set Text [OrbitalUnit] to 'years'
Else
Set decimal [OrbitalPeriod] to [OrbitalPeriod] divided by 86400 (round to 2 decimal places)
Set Text [OrbitalUnit] to 'days'
End Condition
Convert Semi-major axis from meters to AU
Set decimal [SMA] value to the converted value of {DECINV:EDDI star scanned semimajoraxis}
Set decimal [SMA] to [SMA] divided by 149597870690 (round to 2 decimal places)
Convert temp to Fahrenheit
Set decimal [DegF] value to the converted value of {DEC:EDDI star scanned temperature}
Set decimal [DegF] to [DegF] minus 273
Set decimal [DegF] to [DegF] times 1.8
Set decimal [DegF] to [DegF] plus 32.00000 (round to 2 decimal places)
Output
Append, 'STAR SCANNED:
What results do you get when when you create a command that just writes the values of
{DECINV:EDDI star scanned semimajoraxis}
and {DEC:EDDI star scanned semimajoraxis}
to the event log (in isolation from the rest of Malic's command)?
I'm not sure I have added this correctly. created a blank profile and added the following:
The log result was this:
19:48:20 - Not set 19:48:20 - Not set 19:48:20 - Plugin command : '((EDDI body scanned))'
Looks ok but I'm not sure why your log result has 19:48:20 - Plugin command : '((EDDI body scanned))'
rather than 19:48:20 - Plugin command : '((EDDI star scanned))'
?
Sorry, copied the wrong bit of the log, it says the same for star scanned (i created the same commands for body and stars)
Oh, I think I see what's going on here. These variables describe orbital parameters relative to the primary star and consequently they may be null if the primary star is the only star in the star system. They are only written for primary and secondary stars in star systems with multiple stars.
If Malic's profile doesn't take those null values into account then it will throw errors whenever it scans primary stars. That is something that Malic will need to address within his profile.
@Tkael I think you are correct, now I knew what to look for, i just checked when droping into a system with 3 stars and i got this: 17:44:32 - Plugin command : '((EDDI star scanned))' 17:44:32 - Plugin command : '((EDDI star scanned))' 17:44:29 - Decimal token could not be converted : {DEC:EDDI star scanned semimajoraxis} 17:44:29 - Decimal token could not be converted : {DEC:EDDI star scanned orbitalperiod} 17:44:29 - Decimal token could not be converted : {DEC:EDDI star scanned periapsis} 17:44:29 - Decimal token could not be converted : {DEC:EDDI star scanned inclination} 17:44:29 - Decimal token could not be converted : {DEC:EDDI star scanned eccentricity} 17:44:29 - Plugin command : '((EDDI star scanned))'
Thanks for the figuring this out, I'm going to close this one off
EDDI version in which issue is found
3.5.0
VoiceAttack version in which issue is found (as applicable)
1.7.8 Steam
Steps to reproduce
Use the FSS to scan bodies and this appears in the VoiceAttack log:
Stars: 12:58:33 - Decimal token could not be converted : {DEC:EDDI star scanned semimajoraxis} 12:58:33 - Decimal token could not be converted : {DEC:EDDI star scanned orbitalperiod} 12:58:33 - Decimal token could not be converted : {DEC:EDDI star scanned rotationperiod} 12:58:33 - Decimal token could not be converted : {DEC:EDDI star scanned periapsis} 12:58:33 - Decimal token could not be converted : {DEC:EDDI star scanned orbitalinclination} 12:58:33 - Decimal token could not be converted : {DEC:EDDI star scanned eccentricity} 12:58:33 - Plugin command : '((EDDI star scanned))'
Planets: 11:07:19 - Decimal token could not be converted : {DEC:EDDI body scanned rotationperiod} 11:07:19 - Decimal token could not be converted : {DEC:EDDI body scanned orbitalinclination} 11:07:19 - Decimal token could not be converted : {DEC:EDDI body scanned distancefromarrival} 11:07:19 - Plugin command : '((EDDI body scanned))'
Expected
This has never worked so I assume some sort of number calculation should occur
Observed
The above errors
Investigation
It was suggested it may be a regional settings issue, so I have made sure everything is set to English in Regional options in Windows and it is using a . for decimal symbol not comma EDDi and VoiceAttack are set to English, not System Default/Auto