EDCD / EDDI

Companion application for Elite Dangerous
Other
444 stars 81 forks source link

VoiceAttack variables not updating after VoiceAttack restarts until user exits and re-enters the game. #1721

Closed MalicT closed 4 years ago

MalicT commented 4 years ago

EDDI version in which issue is found

3.5.2

VoiceAttack version in which issue is found (as applicable)

1.8.3

Steps to reproduce

Start VA Start Elite Use something that makes VA call a variable, example X,Y,Z of current system Close VA (mimic a crash or accidental close) Restart VA Call again for EDDI variable, example X,Y,Z of current system

Expected

X,Y,Z variable is recalled from last info, or at most update on next event in game that updates the variable(s)

Observed

X,Y,Z of current system is not set, not set, not set, and events in game will not update them even when an event is supposed to update them.

Investigation

Several variables are not saved between VA instances. (Press Ctrl+Alt+Shift and numbers 1-7 then release for VA to display some of the ones that get reset to "Not Set" on a VA restart while Elite is running.)

Only way to recall all the variables again is to exit to Elite man menu, and then back in to repopulate those variables.

Would expect that if the game is being played and VA closes, and then reopened that it recalls what was going on, not clear everything forcing the game to be relogged to get them all back.

Example of script I am using, you know your system X,Y,Z, and you know location of other system X,Y,Z, you can get staight line distance between the two.

During normal operation, the X,Y,Z is updated on every jump. This lets the user get distance figures between where the user is and known locations in the galaxy.

However, if VA crashes or closed anytime during the use of the game, those variables are not saved and are deleted, and are "Not Set" when VA is restarted.

No actions while in the game after this point will repopulate those variables. You would expect that a jump written to the player journal and the new system X,Y,Z would be updated, but they are not. It is almost that because other variables are not set for it to realize the game is being played because they are set to "Not Set" so nothing gets updated so they can not be used by VA.

Logging out of the game to the main menu and then back in then triggers events like ((EDDI commander continued)), ((EDDI commander progress)) and ((EDDI engineer progressed)) and after that variables are updated as expected, but not until then after the VA restart.

Tkael commented 4 years ago

When EDDI sends variable values to VoiceAttack, those VoiceAttack variables are not saved to persistent memory and consequently are not preserved between VoiceAttack instances.

When EDDI loads, it will read your current player journal to make sure its state information is correct. It won't begin writing variables to VoiceAttack until fresh events begin to be written after loading is complete. Thus, it may take some time between when EDDI launches and when the applicable variables (system X, Y, Z) are available in VoiceAttack.

Do you call the variables (system X, Y, Z) immediately after opening VoiceAttack or do you wait for EDDI CPU usage to settle (indicating that loading is complete) before you call for those variables?

MalicT commented 4 years ago

Have done both, have tried immediately and even letting it run 30+ minutes and then doing stuff in game that send journal entries. Have even created the ((EDDI va initialized)) to make sure that it has loaded.

Have tested removing all plugins except EDDI, and still same behavior, it will not load any variables after VA is shut down when Elite is running and VA is restarted. Until the game is exited back to main menu and reentered, it just stops loading any player journal data into EDDI variables.

Journal events are still happening, have been able to confirm this with EDDiscovery.

This has been an issue with EDDI since ever, was just when I started looking for issues with this, have not found any others with wording like this.

Tkael commented 4 years ago

The variable should be updated in VoiceAttack as soon as we handle any event while the value differs.

There is an issue with object equality comparison in v3.5.2 that we already identified and addressed with https://github.com/EDCD/EDDI/pull/1668, but that change has not yet been released. I believe that once the change above is released, this issue will be resolved.

Tkael commented 4 years ago

@richardbuckle FYI.