Release EDDI Scripts and EDDI enabled VA Commands Thread

I've spent some time looking at this. In general I've not foudn a problem with it. There are a few areas where some more context being passed around will help (Darkcyde pointed out that adding context to the 'Entered normal space' event might help) but in general there are three areas that might cause problems.

The first is that the context variables might not be set. You can check these in the Touchdown event to confirm that they are present and correct, or just read them out.

The second is that the BodyDetails() might not return an object. This would be because the data isn't available. The easiest way to check this is to run a 'SystemDetails()' and then loop through the name of each body in the bodies array to see if the body you want is present.

The third is that the BodyDetails() does return an object but does not have material details. This should be relatively easy to spot, because you will be able to use reportbody.name but not reportbody.materials.

If you could let me know which systems and bodies you've tried this on I can take a closer look at the database. Also, were these previously discovered systems or did you discover them yourself? And if the latter, did you use a DSS to scan them?
 
I'm running my tests in the BPM 89444 system since it's my home system.

I've set context in both "Location" and "Entering Normal Space" as described above, and wrote the following in Touchdown :

Code:
{_ Fetch from context }
{set reportbody to BodyDetails(state.eddi_context_body_name, state.eddi_context_body_system)}

Touchdown.

{state.eddi_context_body_name}
{Pause(2000)}
{state.eddi_context_body_system}
{Pause(2000)}
BPM 89444 has {len(SystemDetails("BPM 89444").bodies)} bodies.

It reads out the state variables, but keep saying BPM 89444 has 0 bodies. And the body report function doesn't seem to work either, it keeps saying "it doesn't know which system I'm talking about". It's really frustrating, those are already discovered worlds.

New scans on unknown worlds seem to work fine and the bodyreport() function works as intended. I can make it repeat, it knows "which body I'm takling about" from context.

Seems that the problem comes from worlds that are already scanned and known? I don't understand why BodyDetails() would work on scan, but wouldn't work on already identified worlds. :S


*cryyyyyyyy* :eek:
 
Last edited:
I'm running my tests in the BPM 89444 system since it's my home system.

I've set context in both "Location" and "Entering Normal Space" as described above, and wrote the following in Touchdown :

Code:
{_ Fetch from context }
{set reportbody to BodyDetails(state.eddi_context_body_name, state.eddi_context_body_system)}

Touchdown.

{state.eddi_context_body_name}
{Pause(2000)}
{state.eddi_context_body_system}
{Pause(2000)}
BPM 89444 has {len(SystemDetails("BPM 89444").bodies)} bodies.

It reads out the state variables, but keep saying BPM 89444 has 0 bodies. And the body report function doesn't seem to work either, it keeps saying "it doesn't know which system I'm talking about". It's really frustrating, those are already discovered worlds.

New scans on unknown worlds seem to work fine and the bodyreport() function works as intended. I can make it repeat, it knows "which body I'm takling about" from context.

Seems that the problem comes from worlds that are already scanned and known? I don't understand why BodyDetails() would work on scan, but wouldn't work on already identified worlds. :S


*cryyyyyyyy* :eek:

BodyDetails() fetches its information from crowd-sourced data. If that data isn't present that there's not a lot we can do about it. We have suggested to Frontier that they might like to provide us with the details of the already-discovered bodies so that we can incorporate the data but they haven't been very receptive to the idea.
 
BodyDetails() fetches its information from crowd-sourced data. If that data isn't present that there's not a lot we can do about it. We have suggested to Frontier that they might like to provide us with the details of the already-discovered bodies so that we can incorporate the data but they haven't been very receptive to the idea.

Ahhh, so this may explain why it's not working for me in the Tukatjanino system. Although I thought being in the middle of the bubble this would have been a relatively well known system.

I've been experimenting here all evening and getting nothing positive, it's all not working, yet when I jump to Pangerang to scan the planets, Body report works as expected, and landing on the planet in Ethet also works fine, reporting the gravity (using MikeMarts Touchdown script).

It's just the Tukatjanino system that's the problem then. Typical I manage to choose a system that it won't work in to do my testing! :p :rolleyes: :eek:

Apologies jgm. Now I know that the info is crowd sourced and not taken from the journal events, local database, or from Frontier, it makes much more sense.

I guess this means that long exploration trips will also not provide material or planetary details, as these will not be on the internet anywhere yet.

I also assume that making a local database of known bodies would be prohibitively huge and unwieldy too.
 
Last edited:
Ahhh, so this may explain why it's not working for me in the Tukatjanino system. Although I thought being in the middle of the bubble this would have been a relatively well known system.

I've been experimenting here all evening and getting nothing positive, it's all not working, yet when I jump to Pangerang to scan the planets, Body report works as expected, and landing on the planet in Ethet also works fine, reporting the gravity (using MikeMarts Touchdown script).

It's just the Tukatjanino system that's the problem then. Typical I manage to choose a system that it won't work in to do my testing! :p :rolleyes: :eek:

Apologies jgm. Now I know that the info is crowd sourced and not taken from the journal events, local database, or from Frontier, it makes much more sense.

I guess this means that long exploration trips will also not provide material or planetary details, as these will not be on the internet anywhere yet.

I also assume that making a local database of known bodies would be prohibitively huge and unwieldy too.

If you are using a DSS to scan bodies then the data will be sent to EDDN and find its way in to the hive mind.
 
If you are using a DSS to scan bodies then the data will be sent to EDDN and find its way in to the hive mind.

Yes, I am using a DSS.

I just jumped to Lu Xianses system where I have not purchased the exploration data so that I could go scan them myself. I've just completed my scan of Lu Xianses 1 A, a landable moon of the first planet, and the materials are not being reported. I've added {material.material} into the part that gets material details, and nothing is said, it's just blank, yet {material.percentage} is spoken with the correct amounts for the eleven materials it contains (19.5%, 19.1%, 16.1%, etc). Am I missing something here? Surely if the correct percentages are available to be listed, the names should be also?

If {material.material} is blank (null?) that would explain why nothing is listed, as this:
{if material.percentage >= MaterialDetails(material.material).greatpctbody:
would not resolve because MaterialDetails() can't get anything from what is effectively an empty variable.

If I'm misunderstanding this, then I apologise. It just doesn't make sense to me otherwise.
 
Yes, I am using a DSS.

I just jumped to Lu Xianses system where I have not purchased the exploration data so that I could go scan them myself. I've just completed my scan of Lu Xianses 1 A, a landable moon of the first planet, and the materials are not being reported. I've added {material.material} into the part that gets material details, and nothing is said, it's just blank, yet {material.percentage} is spoken with the correct amounts for the eleven materials it contains (19.5%, 19.1%, 16.1%, etc). Am I missing something here? Surely if the correct percentages are available to be listed, the names should be also?

If {material.material} is blank (null?) that would explain why nothing is listed, as this:
{if material.percentage >= MaterialDetails(material.material).greatpctbody:
would not resolve because MaterialDetails() can't get anything from what is effectively an empty variable.

If I'm misunderstanding this, then I apologise. It just doesn't make sense to me otherwise.

Is this in the body scanned event?
 
Is this in the body scanned event?

Yes. I've also realised that it hasn't been saying it for other landable bodies I've been scanning either.

Edit: This is from my SpeechOut file from the other day:
Scan and analysis of L T T 6 2 5 5 6 a complete. L T T 6 2 5 5 6 a is a low-gravity tidally-locked Rocky body that is suitable for landing. It has a rotational period of 1.4 days.
Scan of L T T 6 2 5 5 6 d complete. L T T 6 2 5 5 6 d is a low-gravity tidally-locked Rocky body that is suitable for landing. It has a rotational period of 10 days.


Both of these are landable moons and have materials on them.
 
Last edited:
Yes. I've also realised that it hasn't been saying it for other landable bodies I've been scanning either.

Edit: This is from my SpeechOut file from the other day:
Scan and analysis of L T T 6 2 5 5 6 a complete. L T T 6 2 5 5 6 a is a low-gravity tidally-locked Rocky body that is suitable for landing. It has a rotational period of 1.4 days.
Scan of L T T 6 2 5 5 6 d complete. L T T 6 2 5 5 6 d is a low-gravity tidally-locked Rocky body that is suitable for landing. It has a rotational period of 10 days.


Both of these are landable moons and have materials on them.

That's odd. I just tried the first one here and received the following:

L T T 6 2 5 5 6 a is a low-gravity tidally-locked Rocky body that is suitable for landing. This planet shows signs of volcanism, with active iron magma flows. It has a rotational period of 1.4 days. This body contains high levels of Tellurium.

This is my development version of EDDI but I don't believe that anything has changed in that part of the code (except for me adding in volcanism). Could you try editing the 'Body scanned' speech and slipping the following in to the template after the existing setting of state:

Code:
{SetState('eddi_context_body_name', 'LTT 6255 6 a')}
{SetState('eddi_context_body_system', 'LTT 6255')}

and then testing it and seeing what it responds with?
 
That's odd. I just tried the first one here and received the following:

L T T 6 2 5 5 6 a is a low-gravity tidally-locked Rocky body that is suitable for landing. This planet shows signs of volcanism, with active iron magma flows. It has a rotational period of 1.4 days. This body contains high levels of Tellurium.

This is my development version of EDDI but I don't believe that anything has changed in that part of the code (except for me adding in volcanism). Could you try editing the 'Body scanned' speech and slipping the following in to the template after the existing setting of state:

Code:
{SetState('eddi_context_body_name', 'LTT 6255 6 a')}
{SetState('eddi_context_body_system', 'LTT 6255')}

and then testing it and seeing what it responds with?

I've added those lines immediately below where the state is set normally. I ran the test (by the test button) three times, and got the following:

Scan of Dagutii A B C 1 b complete. L T T 6 2 5 5 6 a is a low-gravity tidally-locked Rocky body that is suitable for landing. It has a rotational period of 1.4 days.
Scan of Dagutii A B C 1 b complete. L T T 6 2 5 5 6 a is a low-gravity tidally-locked Rocky body that is suitable for landing. It has a rotational period of 1.4 days.
Scan and analysis of Dagutii A B C 1 b complete. L T T 6 2 5 5 6 a is a low-gravity tidally-locked Rocky body that is suitable for landing. It has a rotational period of 1.4 days.
Scan of TTS-class star Coll 2 8 5 Sector R S dash K c8 dash 5 A complete. I'm not sure which star you are asking about.
Scan and analysis of Dagutii A B C 1 b complete. L T T 6 2 5 5 6 a is a low-gravity tidally-locked Rocky body that is suitable for landing. It has a rotational period of 1.4 days.


The fourth one (the star) I clicked accidentally after restarting EDDI, I then tested the correct one again, so there is a total of five above.

I also did a copy of EDDIs default personality to try this so I made sure any of my alterations didn't have any effect (not that I have made many to the Body scanned/Body report anyway). So this is with a fresh copy of the EDDI personality.

I must say that I have already tried this, hard coding the variables, during my testing the other day, and it didn't work then either. Although with that test, I put the hard coded into the BodyDetails().

Would you like me to try again with verbose logging turned on?
 
Last edited:
I've added those lines immediately below where the state is set normally. I ran the test (by the test button) three times, and got the following:

Scan of Dagutii A B C 1 b complete. L T T 6 2 5 5 6 a is a low-gravity tidally-locked Rocky body that is suitable for landing. It has a rotational period of 1.4 days.
Scan of Dagutii A B C 1 b complete. L T T 6 2 5 5 6 a is a low-gravity tidally-locked Rocky body that is suitable for landing. It has a rotational period of 1.4 days.
Scan and analysis of Dagutii A B C 1 b complete. L T T 6 2 5 5 6 a is a low-gravity tidally-locked Rocky body that is suitable for landing. It has a rotational period of 1.4 days.
Scan of TTS-class star Coll 2 8 5 Sector R S dash K c8 dash 5 A complete. I'm not sure which star you are asking about.
Scan and analysis of Dagutii A B C 1 b complete. L T T 6 2 5 5 6 a is a low-gravity tidally-locked Rocky body that is suitable for landing. It has a rotational period of 1.4 days.


The fourth one (the star) I clicked accidentally after restarting EDDI, I then tested the correct one again, so there is a total of five above.

I also did a copy of EDDIs default personality to try this so I made sure any of my alterations didn't have any effect (not that I have made many to the Body scanned/Body report anyway). So this is with a fresh copy of the EDDI personality.

I must say that I have already tried this, hard coding the variables, during my testing the other day, and it didn't work then either. Although with that test, I put the hard coded into the BodyDetails().

Would you like me to try again with verbose logging turned on?

Please could you send me over your personality file for me to take a look at? It should be in %APPDATA%\EDDI\personalities\
 
BodyDetails() fetches its information from crowd-sourced data. If that data isn't present that there's not a lot we can do about it. We have suggested to Frontier that they might like to provide us with the details of the already-discovered bodies so that we can incorporate the data but they haven't been very receptive to the idea.

OK, so if someone scans that system as if it were brand new with a DSS (and being linked to EDDN to transfer data), then it would eventually make available all the information on that system?

I'll try to scan a new system with a DSS, EDDN enabled and see what are the results. It's a shame I guess but on the other hand, if we can communicate data to EDDN, then I assume that we can have info about any body we scan with a DSS right ? Or am I misunderstanding ? [big grin]
 
Last edited:
OK, so if someone scans that system as if it were brand new with a DSS (and being linked to EDDN to transfer data), then it would eventually make available all the information on that system?

I'll try to scan a new system with a DSS, EDDN enabled and see what are the results. It's a shame I guess but on the other hand, if we can communicate data to EDDN, then I assume that we can have info about any body we scan with a DSS right ? Or am I misunderstanding ? [big grin]

If you scan the body then EDDI will take a local copy of the information so it will be available to you immediately.

If someone else scans the body the tool (assuming that whatever tool it is has the functionality) will send the data over EDDN, which will make its way back to EDDI's back-end servers which will update the data. This will then make its way to you, although not immediately as there is some caching involved at various layers.
 
Please could you send me over your personality file for me to take a look at? It should be in %APPDATA%\EDDI\personalities\

Here's a RAR file with my personality that I use normally, plus the copy of the default I used. I edited both of them as you instructed and have tested both in the same way, and have had the same results from both.

https://dl.dropboxusercontent.com/u/11253431/personalities.rar

I had an idea this morning for something else to test, just in case. I altered the {for material in ... to {for mat in ... as I wondered if having the same word (material) could be affecting it. A long-shot, I know. Then this is where it got a little weird. After making that change, I ran the test, and amazingly it worked perfectly! However, it only worked the once, subsequent clicking the test button resulted in exactly the same response I've been getting all along, no materials spoken.

I tried changing it back to 'material' but it still didn't work, so I changed it again to 'mat' yet still nothing. I gave up as I had to go to work, but tried it again when I got home a little while ago. Strangely it worked perfectly again, but as before, it only worked the once. I've tried closing and reopening EDDI, logging off & on Windows, restarting my PC, and even leaving it off for 15 minutes, but since that first success after I got home, the test has always failed. It's like I need my PC off for a few hours and then it may work, but only the once. It's weird and makes absolutely no sense to me at the moment.

I hope you can help figure this one out for me. I like a programming challenge, but this is just weird. [blah]

---

EDIT: Not sure if this will be of any help or not...

I just tried adding the following lines to the {for material in reportbody.materials: right at the top before anything else in the loop:-
Code:
            {set test to test +1}
            {test} {material.material},
This results in the numbers 1 to 11 being said, but that is all, no names of the materials. (I also set 'test' to be zero just before the loop). So it would seem to know that there are 11 materials on this body, just not their names.

EDIT 2: I wondered if maybe the EDDI sql database had been corrupted, so I moved it out of the EDDI folder and let a new one be created. I ran the test again having waited for over an hour (while doing other things) and it listed all the 11 material names perfectly (I'd left my code in). But once again, after this one time, it no longer says them, it just counts to 11 as before. Why does it correctly get the information on the first run, but then 'forgets' material names??

I'd also like to add, that when it DOES say all the 11 materials, this is during the initial for..in loop. When it gets to the following code section that does the actual speaking to report the found materials, it simply says the percentage, not the material name. This is what gets spoken on that first run test:-

Scan of Dagutii A B C 1 b complete. L T T 6 2 5 5 6 a is a low-gravity tidally-locked Rocky body that is suitable for landing. It has a rotational period of 1.4 days. 1 Iron, 2 Sulphur, 3 Carbon, 4 Nickel, 5 Phosphorus, 6 Chromium, 7 Germanium, 8 Vanadium, 9 Cadmium, 10 Tellurium, 11 Mercury, This body contains high levels of at 1.4%,.
(This is from my version of Body Report).
 
Last edited:
OK, so I tried to visit another system and it works perfectly...

Code:
{_ Fetch from context }
{set reportbody to BodyDetails(state.eddi_context_body_name, state.eddi_context_body_system)}

Touchdown.

We've landed on {reportbody.name}. This {reportbody.planettype} has a radius of {reportbody.radius} kilometers and the surface temperature is {reportbody.temperature} kelvins. 
{if reportbody.volcanism != "None":
{OneOf("My sensors detect", "According to my scanners it exists")} {reportbody.volcanism} on the surface.
|else:
{OneOf("There is no volcanism on this body", "No volcanism found on the surface", "Absence of volcanic activity")}.
}

{Pause(1000)}



{if !reportbody.name || reportbody.name = "":
    I'm not sure which body you are asking about.
|else:
Before launching the reckon vehicle, be aware that
    it is 
    {if reportbody.gravity < 0.5:
       a low-gravity
    |elif reportbody.gravity <2:
        a medium-gravity
    |elif reportbody.gravity <4:
       a high-gravity
    |else:
       an extremely high-gravity
    }
body. Mind your driving.
}

I tried with materials just with {reportbody.materials} and didn't get any results...I haven't attempted to figure this out...I'll just let you do the investigation and read your results :)

Thank you both for your help !!!! [heart]
 
After some investigation it appears that there is confusion internally between material.name and material.material. This is because there are two different data structures that were created independently and have different variable names.

I'll tidy this up in the next release of EDDI, but for now you can work around this with a bit of code something like:

Code:
{set materialname to material.name}
{if !materailname:
  {set materiallname to material.material}
}

And then use materialname. Please could you give this a go and see if it works?
 
Last edited:
After some investigation it appears that there is confusion internally between material.name and material.material. This is because there are two different data structures that were created independently and have different variable names.

I'll tidy this up in the next release of EDDI, but for now you can work around this with a bit of code something like:

Code:
{set materialname to material.name}
{if !materialname:
  {set materaillname to material.material}
}

And then use materialname. Please could you give this a go and see if it works?

Thank you for looking into this. I've added the code you posted into the Body Report like this:
Code:
        {for material in reportbody.materials:
            [B][I]{set materialname to material.name}
            {if !materialname:
              {set materialname to material.material}
            }[/I][/B]

            {if material.percentage >= MaterialDetails(materialname).greatpctbody:
                {set greatmaterials to cat(greatmaterials, [material])}
            |elif material.percentage >= MaterialDetails(materialname).goodpctbody:
                {set goodmaterials to cat(goodmaterials, [material])}
            }
        }

However, this doesn't work. Have I done this right? Or have I misunderstood how or where to use it?
 
Thank you for looking into this. I've added the code you posted into the Body Report like this:
Code:
        {for material in reportbody.materials:
            [B][I]{set materialname to material.name}
            {if !materialname:
              {set materialname to material.material}
            }[/I][/B]

            {if material.percentage >= MaterialDetails(materialname).greatpctbody:
                {set greatmaterials to cat(greatmaterials, [material])}
            |elif material.percentage >= MaterialDetails(materialname).goodpctbody:
                {set goodmaterials to cat(goodmaterials, [material])}
            }
        }

However, this doesn't work. Have I done this right? Or have I misunderstood how or where to use it?

That does look right, although I haven't tested it so not sure if the {if !materialname piece will work in the case where materialname is null. I'm not in front of EDDI at the moment so can't test it but it should be easy enough to throw a test together to see if that works. You could also through in a debug to hear if the material name is being set.
 
That does look right, although I haven't tested it so not sure if the {if !materialname piece will work in the case where materialname is null. I'm not in front of EDDI at the moment so can't test it but it should be easy enough to throw a test together to see if that works. You could also through in a debug to hear if the material name is being set.

OK, I've updated it to this:
Code:
            {set materialname to material.name} mat 1 {materialname}
            {if !materialname || materialname = null:
              {set materialname to material.material}  mat 2 {materialname}
            }

With it set like this, when the Body Report gets to this section, all it says is "mat 1 mat 2 mat 1 mat 2..." until it has gone through all the available materials. From this it would seem to me that neither material.name, or material.material are set to anything?

I'll wait for you to test further when you get the time. Thanks for all that you've done so far though! :)
 
Back
Top Bottom