cmdrmcdonald / EliteDangerousDataProvider

Apache License 2.0
133 stars 31 forks source link

BodyDetails() not working when loading a game #204

Open Darkcyde13 opened 7 years ago

Darkcyde13 commented 7 years ago

Hi,

During my explorations at the moment, I have noticed that when I load a game into a star system that I have not fully scanned, the 'Body report' script says it "doesn't know what body I'm asking about" when I scan planets.

I have narrowed it down to the BodyDetails function. While the two State variables used in BodyDetails are populated in the 'Body scanned' event (I have checked by getting EDDI to speak them separately in 'Body report') BodyDetails() will not work if the system variable (second argument) is used. If I remove this, BodyDetails() works as expected.

After jumping to a new system, BodyDetails() works fine with both arguments, for a while, but can stop working again in large systems, or if I take a long time to do all the scanning. I have had it fail after 25 scans and also 38. Those were the two I counted to see if it was always the same number.

TL;DR - BodyDetails() fails immediately after loading a game, and before jumping to another system. It also fails after a certain amount of time/scans in any system.

I had noticed this behaviour a while ago, but I hoped that the new version of ED or EDDI may fix it. As this is not the case, I'm now reporting it.

Keep up the great work Cmdr McDonald! :)

Best regards,

Darkcyde

cmdrmcdonald commented 7 years ago

My best guess is that the system name is either not present or being lost for some reason in EDDI's internal state.

Can you confirm that you are running with the default personality? If not, please could you try with the default personality to see if that gives a different result?

What are the names of the systems you are scanning?

BodyDetails() itself does work with the system name in the second argument, for example the following script with hard-coded names works:

{SetState('eddi_context_body_system', 'Maia')}
{SetState('eddi_context_body_name', 'Maia A 5 a')}
{F("Body report")}
Darkcyde13 commented 7 years ago

Hi,

Thanks for the suggestions. I wasn't using the base default personality, however, my 'Body scanned' and 'Body report' are practically default, with only one or two minor cosmetic alterations to how the 'I'm not sure which body you are talking about' is spoken.

That aside, I have tried to reproduce the problems as you suggested, with the EDDI default. As is normal with my luck (in all things!), now that I actually WANT it to fail, it has been working perfectly as it should! Gah!

I've tried hard coding many of the ones that initially failed, either after loading or during a scan session in a large system, and now they all work too!

However, as a note, clicking the Test button for Body scanned using the default test data of Dagutii A B C 1 b, does cause this to fail.

In the absence of being able to provide concrete evidence now, here's part of my Speechresponder.out file where this has happened. I had this set to test other things, but forgot to turn it off. You can see a few lines in, that I've logged out and back into game, where it says "Welcome back commander Darkcyde". You can see that I am in the same system as I logged out and it was working before quitting and restarting Elite. Also note that the same thing has happened to the Star scan of the Y-class star in that system, so it's not restricted to just the Body scan. Scan of N G C 4 4 6 3 Sector M Y dash H d10 dash 28 2 complete. This is a extremely high-gravity ringed Sudarsky Class 3 gas giant that is unsuitable for landing. Scan of N G C 4 4 6 3 Sector M Y dash H d10 dash 28 2 d complete. This is a low-gravity tidally-locked Rocky body that is suitable for landing. It has a rotational period of 6.6 days. Scan and analysis of N G C 4 4 6 3 Sector M Y dash H d10 dash 28 2 c complete. This is a low-gravity Rocky body that is suitable for landing. It has a retrograde rotational period of -4.04 days. Welcome back commander Darkcyde. You are near N G C 4 4 6 3 Sector M Y dash H d10 dash 28 2 in the N G C 4 4 6 3 Sector M Y dash H d10 dash 28 system. Scan and analysis of N G C 4 4 6 3 Sector M Y dash H d10 dash 28 2 c a complete. I'm not sure which body you are asking about. Scan and analysis of N G C 4 4 6 3 Sector M Y dash H d10 dash 28 2 b complete. I'm unsure of which body you are referring to. Scan and analysis of N G C 4 4 6 3 Sector M Y dash H d10 dash 28 2 a complete. I'm unsure which body you're asking about. Scan of N G C 4 4 6 3 Sector M Y dash H d10 dash 28 3 complete. I'm not sure of which body you are referring to. Scan of Y-class star N G C 4 4 6 3 Sector M Y dash H d10 dash 28 4 complete. I'm unsure of which star you are referring to. Scan of N G C 4 4 6 3 Sector M Y dash H d10 dash 28 4 e complete. I'm not sure which body you're asking about..

As for failing halfway through scanning a system, I have found a couple in the NGC 4463 Sector area with 30+ bodies, so I will give them a go with the EDDI default personality and see what happens. So you can see what I mean by this, here is a part of my Speechresponder.out file where this occurred a little while ago (I can't remember exactly when I was in this system, must have been a week or two ago):-

Destination confirmed. your Asp Explorer is in transit to the N G C 4 6 0 9 Sector E E dash I b39 dash 2 system. This is your first visit to this system. There is no human presence here. Scan of M-class star N G C 4 6 0 9 Sector E E dash I b39 dash 2 A complete. This is a very common main sequence star that is around 5 and a half billion years old. As you can see, it emits a orange-red light. There is nothing particularly notable about this star. 0% refuelled. Warning; Fuel tanks at %. commander. Refuelled by 1.2 tonnes. Warning; Fuel level at %.. Scan and analysis of N G C 4 6 0 9 Sector E E dash I b39 dash 2 A 1 complete. This is a medium-gravity Rocky ice body that is unsuitable for landing. Scan of N G C 4 6 0 9 Sector E E dash I b39 dash 2 A 4 complete. This is a medium-gravity tidally-locked Icy body that is unsuitable for landing. Scan and analysis of N G C 4 6 0 9 Sector E E dash I b39 dash 2 A 5 complete. This is a medium-gravity Icy body that is unsuitable for landing. Scan and analysis of N G C 4 6 0 9 Sector E E dash I b39 dash 2 A 3 complete. This is a medium-gravity Icy body that is unsuitable for landing. Scan and analysis of N G C 4 6 0 9 Sector E E dash I b39 dash 2 A 2 complete. This is a medium-gravity Icy body that is unsuitable for landing. Scan and analysis of N G C 4 6 0 9 Sector E E dash I b39 dash 2 A 6 complete. This is a medium-gravity ringed Sudarsky Class 1 gas giant that is unsuitable for landing. Scan of N G C 4 6 0 9 Sector E E dash I b39 dash 2 A 6 b complete. This is a low-gravity tidally-locked Icy body that is suitable for landing. It has a rotational period of 13 days. Scan and analysis of N G C 4 6 0 9 Sector E E dash I b39 dash 2 A 6 A complete. This is a low-gravity tidally-locked Icy body that is suitable for landing. It has a rotational period of 6.3 days. Scan and analysis of N G C 4 6 0 9 Sector E E dash I b39 dash 2 A 6 c complete. This is a low-gravity tidally-locked Icy body that is suitable for landing. It has a slow rotational period of 52 days. Scan of N G C 4 6 0 9 Sector E E dash I b39 dash 2 A 6 d complete. This is a low-gravity Icy body that is suitable for landing. It has a rotational period of 4.2 days. Scan and analysis of N G C 4 6 0 9 Sector E E dash I b39 dash 2 A 7 complete. This is a medium-gravity ringed Icy body that is unsuitable for landing. Scan and analysis of N G C 4 6 0 9 Sector E E dash I b39 dash 2 B C 2 complete. This is a medium-gravity Icy body that is unsuitable for landing. Scan and analysis of N G C 4 6 0 9 Sector E E dash I b39 dash 2 B C 1 complete. I'm unsure of which body you are asking about. Scan of L-class star N G C 4 6 0 9 Sector E E dash I b39 dash 2 B complete. I'm not sure of which star you're referring to. Scan and analysis of N G C 4 6 0 9 Sector E E dash I b39 dash 2 B 2 complete. I'm not sure of which body you are referring to. Scan and analysis of N G C 4 6 0 9 Sector E E dash I b39 dash 2 B 2 A complete. I'm unsure which body you are referring to.

This log is from when I arrived in the system. As you can see from the last three entries the Body Report has stopped working. I've cut the log here, but it continues with all the remaining bodies in this system.

Both these situations continue to say they don't know what body I'm talking about, until I jump to the next system and it starts working again.

I'm really sorry for the long post, and little to no evidence of any use. I thought these problems were a little frustrating, but they are nothing compared to not being able to reproduce them when I needed to!

I'll monitor the situation closely now. When I find a system that causes these issues, I'll come back here to report with as much info as I can. I'll go ahead and scan those two larger system I just found in the NGC area, and see if I can get it to fail again.

Kind regards,

Darkcyde.

Darkcyde13 commented 7 years ago

I have just realised that I updated to beta 5 before I ran my testing tonight, and I notice you made a small change to BodyDetails. I don't suppose this could have affected my testing could it? I mean, could it have fixed some, if not all, of my problems?

EDIT: Last night, the following, when copied into a new script in a copy of the default personality, didn't work:- {SetState('eddi_context_body_system', 'NGC 4463 Sector NJ-X b18-1')} {SetState('eddi_context_body_name', 'NGC 4463 Sector NJ-X b18-1 B 7')} {F("Body report")}

After the beta 5 upgrade today, it now works. So I'm thinking it may be sorted now? I'll test a bit more. :)

If this has fixed it, then Thank you Cmdr McDonald!

Darkcyde13 commented 7 years ago

I had high hopes after I scanned the first large system without problems. I've also not had the scan after loading problem since beta 5. However, I have been scanning the second large system that I mentioned above and it has once again failed. The following is the last few lines of the Speechresponder.out file:- Scan of Phylucs I X dash W c 1 dash 0 B 4 complete. This is a low-gravity tidally-locked terra-formable High metal content body that is unsuitable for landing. Scan of Phylucs I X dash W c 1 dash 0 B 4 a complete. This is a low-gravity tidally-locked Rocky body that is unsuitable for landing. This planet shows signs of volcanism, with high levels of active Silicate magma flows. Scan of Phylucs I X dash W c 1 dash 0 B 6 complete. I'm not sure which body you're asking about. I'm not sure which body you're asking about. I'm not sure which body you are asking about.

This is using the EDDI default personality as you suggested. The last two lines are where I clicked the test button on the Body report event script after swapping personalities to my custom one and back to the default.

This happened after loading the game in this system and scanning only 10 bodies (the 10th is the failure), although there are 11 asteroid belt clusters around the second star, and a total of 19 planets and 2 stars in total.

As a test, in a new copy of the default, I added lines to speak the body and system names as stored in the State variables. These worked perfectly... Body: Phylucs IX-W c1-0 B 6 System: Phylucs IX-W c1-0 I'm not sure which body you are asking about.

So the State variables are there and working as normal, it's just that BodyDetails has somehow 'forgotten' how to use them.

I enabled the verbose log and click the test button again, then saved just that section into a new log file. I wanted to upload a ZIP of the Verbose log, but for some reason I can't, so here's a link to the log in my Dropbox: https://www.dropbox.com/s/t6p91b2gliqvkjy/eddi.log?dl=0

I hope this may help figure out what went (and goes) wrong.

Best regards,

Darkcyde.

Darkcyde13 commented 7 years ago

I've just loaded up my game in the Pro EURL NJ-T B58-1 system for a quick session, and guess what? Yup, first planet scanned and BodyReport 'doesn't know which body I'm asking about'. I still have the two lines in BodyReport that speak the body and system names as they are in the State variables, and they are populated correctly with the correct information, just as they were yesterday.

So, unfortunately BodyReport is still malfunctioning. Is there anything else I can do to help provide more information that may help in tracking down where the problem actually lies?

While this is probably of no help, I've thought of the three main questions/problems:-

  1. Why does BodyReport fail immediately after a game load? Is some internal variable not being set correctly?
  2. Why does BodyReport fail after X number of scans in a system? Is there a data overflow somewhere?
  3. Why does jumping to a new star system fix BodyReport so that it starts working again? Does this clear system variables?

Sorry, just trying to be helpful if I can. :)

Keep up the excellent work Commander!

Darkcyde.

cmdrmcdonald commented 7 years ago

After looking at this a bit more I suspect that what is happening is that the local cache of system data is timing out and when fetching the updated information from the remote server it isn't as up-to-date. This would explain what is going on here. I need to take a look at the server to see if/when it's updating body details and ensure that it remains as up-to-date as possible.

souprmage commented 7 years ago

I too have been having this same issue, using default voice as well. I don't recall the exact version I have, but it was the official build after 2.3 was released.