Release EDDI Scripts and EDDI enabled VA Commands Thread

In the US, EDDI reports SOL in thousands of years also.

Strange. I just checked the manual for the journal and it says the age is reported in millions of years.
In the journal of my last trip it says 11326. Maybe it's only an error with Sol. I haven't been there in a while but next time I'll check the journal to see what it says. In my test by hardcoding the system to Sol there was no journal with Sol so now i'm wondering from what source EDDI got its age.
 
So sorry for the really late reply on things, I haven't had much time to play lately and even less to try to work out a script! That said, huge thank you for the massive start there Darkcyde! In fact I think I can basically turn that into a script that works perfectly for me with very little modification >_>

But first just to confirm something...

If I understand your example right the

"Fine+=Bounty+=Bounty+=BountyInc+=Bond+=Bond+=Bond"

Portion could basically be read as a list like
  • Fine
  • Bounty
  • Bounty
  • BountInc
  • Bond
  • Bond
  • Bond

Then in your example code where it looks at 0 (if split instead of joined) it would be "Fine", which it will always look at first when the script is run.

As for my script/idea itself I think like you said the solution to iterate through after reaching the target system is to make a new state variable to store the number. Given my limited knowledge and borrowing your code I believe it would look something like:

Code:
Set Text [system_list] to [C:\\Elite\systems_list.txt]
Set Text [State variable] to 'system_list'
Set int [system_counter] value to 0
Set int [State variable] to 'system_counter'
Execute external plugin, 'EDDI 2.3.0'

Code:
{set position to state.system_counter}
{set systems to split(state.system_list, "+=")}
{set system to systems[position]}
{set current to state.eddi_context_system_system}    

{if system = current:
   {set system to systems[position + 1]}
   (Unsure as to what code to use here, but something to add 1 to the system_counter state...)
}


My big issue/question now is running it. Although I could constantly have it running on the "Jumped" event somehow, and then grab system name as needed to paste to galaxy map, I feel like that is a waste since I don't always need it active. However, unless I'm woefully wrong here, I should be able to trigger the compare script via Voice Attack at the end of the route I'm on and then after the script completes use the code that Hoodathunk (thanks!) posted to paste to galaxy map...

Code:
    (Run Eddi Script that compares current system to list of systems, wait for it to finish)


    Begin Text Compare : [EDDI state system] Does Not Equal ''
    Set Text [destination] to [EDDI state system]
    Execute external plugin, 'EDDI 2.3.0' and wait for return

(snipped for opening galaxy map as I use bindED so my script will be slightly different here)

    Quick Input, '{TXT:destination}'
    Press Enter key and hold for 0.03 seconds and release

I'm not 100% sure on the [EDDI state system] thing here due to the what was said about storing stuff between events, however since this would be added in the same VA command as the one running the script to compare systems I don't think it'd be too much issue. At worse I just add a new state variable in the startup script though. But all in all this would leave two simple voice attack commands that would startup the routing, reset the list to begin from the start, and then on command paste the next system into the galaxy map for me.
 
yet another 404

Just got done with a VA command to report your ranks and ratings. This set of commands will report your current rank and progress toward your next rank, as well as your current Imperial or Federation ships and permits. It also ouputs this info to the VA log. Commands are as follows:

combat rankReports your current combat rank and progress to your next rank
exploration rankReports your current exploration rank and progress to your next rank
trade rankReports your current trade rank and progress to your next rank
pilots federation ranksReports all three PF ranks and progress to the next rank
federal ranksReports your current Federal Navy rank, progress to your next promotion, and your currently unlocked ships and system permits.
imperial ranksReports your current rank in the Empire, progress to your next promotion, and your currently unlocked ships and system permits.
full progress reportReports all of the above

The profile of course requires EDDI. I was running EDDI 2.0.13 when I created it.

Download it from my Dropbox here.

Hope you guys find it useful!

Does anyone have a copy of these files? I get a 404 when clicking on his link..
 
Script Help

I think I've finally gotten my Body Scanned script to where I want it. I'm an information junkie, I like hearing all the scan info about a body that is available, so my scanned script is very detailed. I've had mixed results using the BodyDetails function (values being not set when they are in the journal) so I settled on using a mix of bodydetails and eventdetails. Some of the units of measurement are different if called from bodydetails vs the event. I've tried to make the script work well with a Surface Scanner, and with out a surface scanner.

I am absoulty not a programmer; code makes my head hurt. I've copied liberaly from this thread and the EDDI thread to piece togeter the pieces.

It's broken down into sections:

Mass & Surface Temperture:
I convert the meters stored in event.radius to kilometers, and convert kelvin to Fahrenheit (USA here).
Code:
{OneOf("{P(reportbody.name)} is", "It is", "This body is")}

{if event.earthmass <= 0.0200:
       a miniscule, {round(event.radius / 1000, 0)} kilometer radius, {round(event.earthmass, 4)} earthmass,
   |elif event.earthmass <= 0.1000:
       a tiny, {round(event.radius / 1000, 0)} kilometer radius, {round(event.earthmass, 4)} earthmass,
      |elif event.earthmass <= 3.0:
       a medium sized, {round(event.radius / 1000, 0)} kilometer radius, {round(event.earthmass, 2)} earthmass,
   |elif event.earthmass <= 10.0:
       a large, {round(event.radius / 1000, 0)} kilometer radius, {round(event.earthmass, 2)} earthmass,
   |elif event.earthmass <= 20.0:
       a huge, {round(event.radius / 1000, 0)} kilometer radius, {round(event.earthmass, 2)} earthmass,
   |elif event.earthmass <= 50.0:
       an incredibly large, {round(event.radius / 1000, 0)} kilometer radius, {round(event.earthmass, 2)} earthmass,
   |else:
       a gigantic, {round(event.radius / 1000, 0)} kilometer radius, {round(event.earthmass, 2)} earthmass,
   }

{if reportbody.temperature:
{set temp to (reportbody.temperature * 1.8 - 459.67)}

{if reportbody.temperature <=0:
    frozen {round(temp, 0)} degree, 
|elif reportbody.temperature < 173:
    frigid {round(temp, 0)} degree,
|elif reportbody.temperature < 213:
    cold {round(temp, 0)} degree,
|elif reportbody.temperature < 243:
    arctic {round(temp, 0)} degree,
|elif reportbody.temperature < 258:
    cool {round(temp, 0)} degree,
|elif reportbody.temperature < 273:
    chilly {round(temp, 0)} degree,
|elif reportbody.temperature < 300:
    temperate {round(temp, 0)} degree,
|elif reportbody.temperature < 315:
    warm {round(temp, 0)} degree,
|elif reportbody.temperature < 375:
    heated {round(temp, 0)} degree,
|elif reportbody.temperature < 500:
    hot {round(temp, 0)} degree,
|elif reportbody.temperature < 700:
    sweltering {round(temp, 0)} degree,
|elif reportbody.temperature < 1000:
    scorchingly hot {round(temp, 0)} degree,
|elif reportbody.temperature < 1500:
    melting {round(temp, 0)} degree,
|elif reportbody.temperature < 2300:
    molten {round(temp, 0)} degree,
|elif reportbody.temperature < 3300:
    boiling {round(temp, 0)} degree,
|elif reportbody.temperature < 10000:
    blazingly hot {round(temp, 0)} degree,
|else:
    incredibly hot {round(temp, 0)} degree,
}
|else:
with an undetected surface tempature,
}

Body Type, Misc details, orbital info and landable status:
Code:
{if reportbody.tidallylocked:
     tidally-locked,
}

{if reportbody.terraformstate = "Terraformable":
    terraformable, 
|elif reportbody.terraformstate = "Terraformed":
    terraformed, 
}
    
{if len(reportbody.rings) > 0:
  {len(reportbody.rings)} ringed, 
    {if reportbody.reserves:
        with {reportbody.reserves},
    }
}

{if event.bodyclass= "Sudarsky class I gas giant":
   Class one gas giant. 
|elif event.bodyclass= "Sudarsky class II gas giant":
   Class two gas giant. 
|elif event.bodyclass= "Sudarsky class III gas giant":
   Class three gas giant. 
|elif event.bodyclass= "Sudarsky class IV gas giant":
   Class four gas giant. 
|elif event.bodyclass= "Sudarsky class V gas giant":
   Class five gas giant. 
|else:
   {event.bodyclass}. 
}

{if reportbody.terraformstate = "Terraforming":
  In the process of being terraformed. 
}

{OneOf("{P(reportbody.name)} has", "It has", "This body has","This {event.bodyclass} has")}
a gravity of {round(reportbody.gravity, 2)} G's with a

{if reportbody.rotationalperiod < -20.0:
            slow retrograde
        |elif reportbody.rotationalperiod < -0.5:
            retrograde
        |elif reportbody.rotationalperiod < 0:
            fast retrograde
        |elif reportbody.rotationalperiod <= 0.5:
            fast
        |elif reportbody.rotationalperiod > 20.0:
            slow
}

rotational period of {Humanise(reportbody.rotationalperiod)} day{if reportbody.rotationalperiod != "1":s}, and an orbital period of {Humanise(reportbody.orbitalperiod)} day{if reportbody.orbitalperiod != "1":s}.

 
{if reportbody.landable = true || event.landable = true:
  {OneOf("This body is", "It is", "This planet is")} suitable for landing.

|elif !reportbody.landable || !event.landable:
  {if event.bodyclass = "Sudarsky class I gas giant" || event.bodyclass = "Sudarsky class II gas giant" || event.bodyclass = "Sudarsky class III gas giant" || event.bodyclass = "Sudarsky class IV gas giant" || event.bodyclass = "Sudarsky class V gas giant" || event.bodyclass = "Water world" || event.bodyclass = "Earth-like world" || event.bodyclass = "Ammonia world" || event.bodyclass = "Water Giant" || event.bodyclass = "Helium-rich" || event.bodyclass = "Gas giant with ammonia based life" || event.bodyclass = "Gas giant with water based life"  || reportbody.atmosphere  || event.bodyclass ="Earthlike body": 
    {OneOf("This body is", "It is", "This planet is")} unsuitable for landing.
  |else:
    The landable status of this body is unable to be detected.
  }
|elif reportbody.landable = false || event.landable = false:
{OneOf("This body is", "It is", "This planet is")} unsuitable for landing.
}

Atmosphere and Volcanism:
I borrowed heavily from Estelyen's atmosphere script:
https://forums.frontier.co.uk/showt...ion-and-more?p=5431518&viewfull=1#post5431518
Code:
{_Atmosphere }

{SetState("eddi_atmosphere_type", 0)}
{if event.bodyclass= "Sudarsky class I gas giant":
   Class one or Jovian gas giants have primarily hydrogen and helium atmospheres. Coloration comes from clouds in the upper atmosphere of ammonia, water vapor, hydrogen sulphide, phosphine and sulphur.
      {SetState("eddi_atmosphere_type", 1)}
|elif event.bodyclass= "Sudarsky class II gas giant":
   Class two gas giants have primarily hydrogen and helium atmospheres. Water vapor in the upper cloud layers creates high reflected light levels.
      {SetState("eddi_atmosphere_type", 1)}
|elif event.bodyclass= "Sudarsky class III gas giant":
   Class three gas giants have primarily hydrogen and helium atmospheres without distinctive cloud layers.  They are primarily blue in color.
      {SetState("eddi_atmosphere_type", 1)}
|elif event.bodyclass= "Sudarsky class IV gas giant":
   Class four gas giants have primarily hydrogen and helium atmospheres with carbon monoxide and upper clouds of alkali metals above lower cloud layers of silicates and iron compounds. This causes bright colours.
      {SetState("eddi_atmosphere_type", 1)}
|elif event.bodyclass= "Sudarsky class V gas giant":
   Class five gas giants have primarily hydrogen and helium atmospheres, with thick clouds of silicates and iron compounds, even metallic iron. They often emit a dull glow from the internal heat within the clouds.
      {SetState("eddi_atmosphere_type", 1)}
|elif event.bodyclass= "Gas giant with water based life":
   Gas giant's with water based life have primarily a hydrogen and helium based atmosphere, but not far below the surface exists life based in the water cloud layer.
      {SetState("eddi_atmosphere_type", 1)}
|elif find(event.bodyclass, "Water Giant") >= 0:
   This gas giant is mainly composed of Water vapor.
   {SetState("eddi_atmosphere_type", 1)}
|elif event.bodyclass="Earthlike body":
   This outdoor world has a human breathable atmosphere and  indigenious life.
   {SetState("eddi_atmosphere_type", 1)} 
|elif event.bodyclass = "Ammonia World" || event.bodyclass ="Ammonia world":
   This terrestrial ammonia world has an active ammonia based chemistry and carbon ammonia based life.
   {SetState("eddi_atmosphere_type", 2)}
|elif event.bodyclass = "Gas giant with ammonia based life":
   This gas giant with ammonia-based life is a primary hydrogen and helium based atmospheric gas gieant, but a little below the surface cloud layers, life exists based in the ammonia cloud layer.
   {SetState("eddi_atmosphere_type", 1)}

|else: 
   {if reportbody.atmosphere = "ammonia atmosphere" || reportbody.atmosphere = "argon atmosphere" || reportbody.atmosphere = "carbon dioxide atmosphere" || reportbody.atmosphere = "helium atmosphere" || reportbody.atmosphere = "methane atmosphere" || reportbody.atmosphere = "neon atmosphere" || reportbody.atmosphere = "nitrogen atmosphere" || reportbody.atmosphere = "silicate vapour atmosphere" || reportbody.atmosphere = "sulfur dioxide atmosphere" || reportbody.atmosphere = "sulphur dioxide atmosphere" || reportbody.atmosphere = "water atmosphere":
      {SetState("eddi_atmosphere_element", slice(reportbody.atmosphere, 0, find(reportbody.atmosphere, " atmosphere", 0)))}
      {SetState("eddi_atmosphere_type", 0)}
   |elif reportbody.atmosphere = "ammonia rich atmosphere" || reportbody.atmosphere = "argon rich atmosphere" || reportbody.atmosphere = "carbon dioxide rich atmosphere" || reportbody.atmosphere = "helium rich atmosphere" || reportbody.atmosphere = "methane rich atmosphere" || reportbody.atmosphere = "neon rich atmosphere" || reportbody.atmosphere = "nitrogen rich atmosphere" || reportbody.atmosphere = "silicate vapour rich atmosphere" || reportbody.atmosphere = "sulfur dioxide rich atmosphere" || reportbody.atmosphere = "sulphur dioxide rich atmosphere" || reportbody.atmosphere = "water rich atmosphere":
      {SetState("eddi_atmosphere_element", slice(reportbody.atmosphere, 0, find(reportbody.atmosphere, " rich", 0)))}
      {SetState("eddi_atmosphere_type", 0)}
   |elif reportbody.atmosphere = "hot thick ammonia atmosphere" || reportbody.atmosphere = "hot thick argon atmosphere" || reportbody.atmosphere = "hot thick carbon dioxide atmosphere" || reportbody.atmosphere = "hot thick helium atmosphere" || reportbody.atmosphere = "hot thick methane atmosphere" || reportbody.atmosphere = "hot thick neon atmosphere" || reportbody.atmosphere = "hot thick nitrogen atmosphere" || reportbody.atmosphere = "hot thick silicate vapour atmosphere" || reportbody.atmosphere = "hot thick sulfur dioxide atmosphere" || reportbody.atmosphere = "hot thick sulphur dioxide atmosphere" || reportbody.atmosphere = "hot thick water atmosphere":
      {SetState("eddi_atmosphere_element", slice(reportbody.atmosphere, 10, (find(reportbody.atmosphere, " atmosphere", 0)-10)))}
      {SetState("eddi_atmosphere_type", 0)}
   |elif reportbody.atmosphere = "hot thick ammonia rich atmosphere" || reportbody.reportbody = "hot thick argon rich atmosphere" || reportbody.atmosphere = "hot thick carbon dioxide rich atmosphere" || reportbody.atmosphere = "hot thick helium rich atmosphere" || reportbody.atmosphere = "hot thick methane rich atmosphere" || reportbody.atmosphere = "hot thick neon rich atmosphere" || reportbody.atmosphere = "hot thick nitrogen rich atmosphere" || reportbody.atmosphere = "hot thick silicate vapour rich atmosphere" || reportbody.atmosphere = "hot thick sulfur dioxide rich atmosphere" || reportbody.atmosphere = "hot thick sulphur dioxide rich atmosphere" || reportbody.atmosphere = "hot thick water rich atmosphere":
      {SetState("eddi_atmosphere_element", slice(reportbody.atmosphere, 10, (find(reportbody.atmosphere, " rich", 0)-10)))}
      {SetState("eddi_atmosphere_type", 0)}
   |elif reportbody.atmosphere = "thick ammonia atmosphere" || reportbody.atmosphere = "thick argon atmosphere" || reportbody.atmosphere = "thick carbon dioxide atmosphere" || reportbody.atmosphere = "thick helium atmosphere" || reportbody.atmosphere = "thick methane atmosphere" || reportbody.atmosphere = "thick neon atmosphere" || reportbody.atmosphere = "thick nitrogen atmosphere" || reportbody.atmosphere = "thick silicate vapour atmosphere" || reportbody.atmosphere = "thick sulfur dioxide atmosphere" || reportbody.atmosphere = "thick sulphur dioxide atmosphere" || reportbody.atmosphere = "thick water atmosphere":
      {SetState("eddi_atmosphere_element", slice(reportbody.atmosphere, 6, (find(reportbody.atmosphere, " atmosphere", 0)-6)))}
      {SetState("eddi_atmosphere_type", 0)}
   |elif reportbody.atmosphere = "thick ammonia rich atmosphere" || reportbody.atmosphere = "thick argon rich atmosphere" || reportbody.atmosphere = "thick carbon dioxide rich atmosphere" || reportbody.atmosphere = "thick helium rich atmosphere" || reportbody.atmosphere = "thick methane rich atmosphere" || reportbody.atmosphere = "thick neon rich atmosphere" || reportbody.atmosphere = "thick nitrogen rich atmosphere" || reportbody.atmosphere = "thick silicate vapour rich atmosphere" || reportbody.atmosphere = "thick sulfur dioxide rich atmosphere" || reportbody.atmosphere = "thick sulphur dioxide rich atmosphere" || reportbody.atmosphere = "thick water rich atmosphere":
      {SetState("eddi_atmosphere_element", slice(reportbody.atmosphere, 6, (find(reportbody.atmosphere, " rich", 0)-6)))}
      {SetState("eddi_atmosphere_type", 0)}
   |elif reportbody.atmosphere = "thin ammonia atmosphere" || reportbody.atmosphere = "thin argon atmosphere" || reportbody.atmosphere = "thin carbon dioxide atmosphere" || reportbody.atmosphere = "thin helium atmosphere" || reportbody.atmosphere = "thin methane atmosphere" || reportbody.atmosphere = "thin neon atmosphere" || reportbody.atmosphere = "thin nitrogen atmosphere" || reportbody.atmosphere = "thin silicate vapour atmosphere" || reportbody.atmosphere = "thin sulfur dioxide atmosphere" || reportbody.atmosphere = "thin sulphur dioxide atmosphere" || reportbody.atmosphere = "thin water atmosphere":
      {SetState("eddi_atmosphere_element", slice(reportbody.atmosphere, 5, (find(reportbody.atmosphere, " atmosphere", 0)-5)))}
      {SetState("eddi_atmosphere_type", 0)}
   |elif reportbody.atmosphere = "thin ammonia rich atmosphere" || reportbody.atmosphere = "thin argon rich atmosphere" || reportbody.atmosphere = "thin carbon dioxide rich atmosphere" || reportbody.atmosphere = "thin helium rich atmosphere" || reportbody.atmosphere = "thin methane rich atmosphere" || reportbody.atmosphere = "thin neon rich atmosphere" || reportbody.atmosphere = "thin nitrogen rich atmosphere" || reportbody.atmosphere = "thin silicate vapour rich atmosphere" || reportbody.atmosphere = "thin sulfur dioxide rich atmosphere" || reportbody.atmosphere = "thin sulphur dioxide rich atmosphere" || reportbody.atmosphere = "thin water rich atmosphere":
      {SetState("eddi_atmosphere_element", slice(reportbody.atmosphere, 5, (find(reportbody.atmosphere, " rich", 0)-5)))}
      {SetState("eddi_atmosphere_type", 0)}
   |elif reportbody.atmosphere ="No atmosphere" || reportbody.atmosphere = "" || event.landable:
          {SetState("eddi_atmosphere_type", 1)}
          {OneOf("{reportbody.name} has no atmosphere ","There is no atmosphere on this {event.bodyclass}","This body has no atmosphere")}.
   |elif !reportbody.atmosphere:
         {OneOf("{reportbody.name} has an undetected atmosphere composition","This {event.bodyclass}'s atmosphere composition is undetected","This body's atmosphere composition is undetected")}.
         {SetState("eddi_atmosphere_type", 1)}

   |else:
      {OneOf("{reportbody.name} has a {reportbody.atmosphere}","There is a {reportbody.atmosphere} on this {event.bodyclass}","This body has a {reportbody.atmosphere}")}.
      {SetState("eddi_atmosphere_type", 1)}
   }
}
{if state.eddi_atmosphere_type = 0:
   {OneOf("{reportbody.name} has ","There is ","This {event.bodyclass} has ","This body has ")}
   {if reportbody.pressure < 35000:
      a trace
   |elif reportbody.pressure < 60000:
      a very thin
   |elif reportbody.pressure < 80000:
      a thin
   |elif reportbody.pressure < 120000:
      an average
   |elif reportbody.pressure < 500000:
      a thick
   |elif reportbody.pressure < 10000000:
      a dense
   |elif reportbody.pressure < 100000000:
      a very dense
   |else:
      a crushing
   }
   atmosphere composed mainly of {state.eddi_atmosphere_element}.
|elif state.eddi_atmosphere_type = 2:
   {OneOf("{reportbody.name} has ","There is ","This {event.bodyclass} has ","This body has ")}
   {if reportbody.pressure < 35000:
      a trace
   |elif reportbody.pressure < 60000:
      a very thin
   |elif reportbody.pressure < 80000:
      a thin
   |elif reportbody.pressure < 120000:
      an average
   |elif reportbody.pressure < 500000:
      a thick
   |elif reportbody.pressure < 10000000:
      a dense
   |elif reportbody.pressure < 100000000:
      a very dense
   |else:
      a crushing
   }
   atmosphere composed mainly of toxic gases like methane and ammonia.
}
{SetState("eddi_atmosphere_type", 0)}
{_ Volcanism}
{if reportbody.volcanism.type = "Magma":
   There are 
   {if reportbody.volcanism.amount = "Major":
      {OneOf("numerous", "many", "lots of")} 
   |elif reportbody.volcanism.amount = "Minor":
      {OneOf("some", "a few", "a small amount of")} 
   } 
   lava flows consisting mostly of {reportbody.volcanism.composition} on the surface.
|elif reportbody.volcanism.type = "Geysers":
   There are
   {if reportbody.volcanism.amount = "Major":
      {OneOf("numerous", "many", "lots of")} 
   |elif reportbody.volcanism.amount = "Minor":
      {OneOf("some", "a few", "a small number of")} 
   } geysers of volcanic origin that are ejecting mostly {reportbody.volcanism.composition} {OneOf("detected", "present")} on the surface.
    
      
}

Materials Available:
I have two versions, the standard version that just reports high percents. (I'm still trying to figure out how to adjust the percent threshold that are reported), and a detailed report that Hoodathunk very helpfully provided. I use voiceattack to set a state variable in EDDI to determine what version I want.
Code:
{_ Body materials report }

{if !state.detailedmat: 

   {if !reportbody.landable || !event.landable:

   |else:
      {if reportbody.landable = true || event.landable = true:
        {set goodmaterials to []}
        {set greatmaterials to []}
        {for material in reportbody.materials:
            {if material.percentage >= MaterialDetails(material.material).greatpctbody:
                {set greatmaterials to cat(greatmaterials, [material])}
            |elif material.percentage >= MaterialDetails(material.material).goodpctbody:
                {set goodmaterials to cat(goodmaterials, [material])}
            }
        }

        {if len(greatmaterials) > 0:
            This body contains very high levels of
            {if len(greatmaterials) = 1:
                {greatmaterials[0].material} at {round(greatmaterials[0].percentage, 1)} percent
            |elif len(greatmaterials) = 2:
                {greatmaterials[0].material} at {round(greatmaterials[0].percentage, 1)} percent and {greatmaterials[1].material} at {round(greatmaterials[1].percentage,1)} percent
            |else:
                {set cur to 0}
                {while cur < len(greatmaterials):
                    {if cur = 0:
                        {greatmaterials[cur].material} at {round(greatmaterials[cur].percentage, 1)} percent
                    |elif cur < len(greatmaterials) - 1:
                        , {greatmaterials[cur].material} at {round(greatmaterials[cur].percentage, 1)} percent
                    |else:
                        , and {greatmaterials[cur].material} at {round(greatmaterials[cur].percentage, 1)} percent
                    }
                    {set cur to cur + 1}
                }
            }
        }
        {if len(goodmaterials) > 0:
            {if len(greatmaterials) > 0:
                and high levels of
            |else:
                This body contains high levels of
            }
            {if len(goodmaterials) = 1:
                {goodmaterials[0].material} at {round(goodmaterials[0].percentage, 1)} percent
            |elif len(goodmaterials) = 2:
                {goodmaterials[0].material} at {round(goodmaterials[0].percentage, 1)} percent and {goodmaterials[1].material} at {round(goodmaterials[1].percentage, 1)} percent
            |else:
                {set cur to 0}
                {while cur < len(goodmaterials):
                    {if cur = 0:
                        {goodmaterials[cur].material} at {round(goodmaterials[cur].percentage, 1)} percent
                    |elif cur < len(goodmaterials) - 1:
                        , {goodmaterials[cur].material} at {round(goodmaterials[cur].percentage, 1)} percent
                    |else:
                        , and {goodmaterials[cur].material} at {round(goodmaterials[cur].percentage, 1)} percent
                    }
                    {set cur to cur + 1}
                }
            }
        }
        {if len(greatmaterials) > 0 || len(goodmaterials) > 0:
            .
        |else:
        No particular abundant minerals detected.         
        }
            
}
}

|else:

{if reportbody.landable = true || event.landable = true && len(reportbody.materials) > 0:

        {OneOf("This body contains measureable levels of", "There is measurable levels of", "The following materials are detected on the surface","This {event.bodyclass} contains measurable levels of")}
        {if len(reportbody.materials) = 1:
            {reportbody.materials[0].material} at {round(reportbody.materials[0].percentage, 1)} percent
        |elif len(material) = 2:
            {reportbody.materials[0].material} at {round(reportbody.materials[0].percentage, 1)} percent,
            and {reportbody.materials[1].material} at {round(reportbody.materials[1].percentage, 1)} percent
        |else:
            {set cur to 0}
            {while cur < len(reportbody.materials):
                {if cur = 0:
                    {reportbody.materials[cur].material} at {round(reportbody.materials[cur].percentage, 1)} percent
                |elif cur < len(reportbody.materials) - 1:
                    , {reportbody.materials[cur].material} at {round(reportbody.materials[cur].percentage, 1)} percent
                |else:
                        , and {reportbody.materials[cur].material} at {round(reportbody.materials[cur].percentage, 1)} percent
                }
                {set cur to cur + 1}
            }
        }
        {if len(reportbody.materials) > 0:
            .
        }
}
}

I use a state variable that is set at starting the game and refreshed when doing my preflight check that set's if a surface scanner is equpped. The script then reads out if it's a Detailed surface scan, or a normal scan.

Here is the entire script in all it's messy glory:
Code:
{_ Context }
{SetState('eddi_context_last_subject', 'body')}
{SetState('eddi_context_last_action', 'scan')}
{SetState('eddi_context_body_system', system.name)}
{SetState('eddi_context_body_name', event.name)}

{set reportbody to BodyDetails(state.eddi_context_body_name, state.eddi_context_body_system)}
{if !reportbody:
   {set reportbody to event}
   {set planettype to bodyclass}
}

{if state.surface_scanner = 1:
    Detailed surface Scan of {P(reportbody.name)} complete.
|else:
    Scan of {P(reportbody.name)} complete.
}


{OneOf("{P(reportbody.name)} is", "It is", "This body is")}

{if event.earthmass <= 0.0200:
       a miniscule, {round(event.radius / 1000, 0)} kilometer radius, {round(event.earthmass, 4)} earthmass,
   |elif event.earthmass <= 0.1000:
       a tiny, {round(event.radius / 1000, 0)} kilometer radius, {round(event.earthmass, 4)} earthmass,
      |elif event.earthmass <= 3.0:
       a medium sized, {round(event.radius / 1000, 0)} kilometer radius, {round(event.earthmass, 2)} earthmass,
   |elif event.earthmass <= 10.0:
       a large, {round(event.radius / 1000, 0)} kilometer radius, {round(event.earthmass, 2)} earthmass,
   |elif event.earthmass <= 20.0:
       a huge, {round(event.radius / 1000, 0)} kilometer radius, {round(event.earthmass, 2)} earthmass,
   |elif event.earthmass <= 50.0:
       an incredibly large, {round(event.radius / 1000, 0)} kilometer radius, {round(event.earthmass, 2)} earthmass,
   |else:
       a gigantic, {round(event.radius / 1000, 0)} kilometer radius, {round(event.earthmass, 2)} earthmass,
   }

{if reportbody.temperature:
{set temp to (reportbody.temperature * 1.8 - 459.67)}

{if reportbody.temperature <=0:
    frozen {round(temp, 0)} degree, 
|elif reportbody.temperature < 173:
    frigid {round(temp, 0)} degree,
|elif reportbody.temperature < 213:
    cold {round(temp, 0)} degree,
|elif reportbody.temperature < 243:
    arctic {round(temp, 0)} degree,
|elif reportbody.temperature < 258:
    cool {round(temp, 0)} degree,
|elif reportbody.temperature < 273:
    chilly {round(temp, 0)} degree,
|elif reportbody.temperature < 300:
    temperate {round(temp, 0)} degree,
|elif reportbody.temperature < 315:
    warm {round(temp, 0)} degree,
|elif reportbody.temperature < 375:
    heated {round(temp, 0)} degree,
|elif reportbody.temperature < 500:
    hot {round(temp, 0)} degree,
|elif reportbody.temperature < 700:
    sweltering {round(temp, 0)} degree,
|elif reportbody.temperature < 1000:
    scorchingly hot {round(temp, 0)} degree,
|elif reportbody.temperature < 1500:
    melting {round(temp, 0)} degree,
|elif reportbody.temperature < 2300:
    molten {round(temp, 0)} degree,
|elif reportbody.temperature < 3300:
    boiling {round(temp, 0)} degree,
|elif reportbody.temperature < 10000:
    blazingly hot {round(temp, 0)} degree,
|else:
    incredibly hot {round(temp, 0)} degree,
}
|else:
with an undetected surface tempature,
}


{if reportbody.tidallylocked:
     tidally-locked,
}

{if reportbody.terraformstate = "Terraformable":
    terraformable, 
|elif reportbody.terraformstate = "Terraformed":
    terraformed, 
}
    
{if len(reportbody.rings) > 0:
  {len(reportbody.rings)} ringed, 
    {if reportbody.reserves:
        with {reportbody.reserves},
    }
}

{if event.bodyclass= "Sudarsky class I gas giant":
   Class one gas giant. 
|elif event.bodyclass= "Sudarsky class II gas giant":
   Class two gas giant. 
|elif event.bodyclass= "Sudarsky class III gas giant":
   Class three gas giant. 
|elif event.bodyclass= "Sudarsky class IV gas giant":
   Class four gas giant. 
|elif event.bodyclass= "Sudarsky class V gas giant":
   Class five gas giant. 
|else:
   {event.bodyclass}. 
}

{if reportbody.terraformstate = "Terraforming":
  In the process of being terraformed. 
}

{OneOf("{P(reportbody.name)} has", "It has", "This body has","This {event.bodyclass} has")}
a gravity of {round(reportbody.gravity, 2)} G's with a

{if reportbody.rotationalperiod < -20.0:
            slow retrograde
        |elif reportbody.rotationalperiod < -0.5:
            retrograde
        |elif reportbody.rotationalperiod < 0:
            fast retrograde
        |elif reportbody.rotationalperiod <= 0.5:
            fast
        |elif reportbody.rotationalperiod > 20.0:
            slow
}

rotational period of {Humanise(reportbody.rotationalperiod)} day{if reportbody.rotationalperiod != "1":s}, and an orbital period of {Humanise(reportbody.orbitalperiod)} day{if reportbody.orbitalperiod != "1":s}.

 
{if reportbody.landable = true || event.landable = true:
  {OneOf("This body is", "It is", "This planet is")} suitable for landing.

|elif !reportbody.landable || !event.landable:
  {if event.bodyclass = "Sudarsky class I gas giant" || event.bodyclass = "Sudarsky class II gas giant" || event.bodyclass = "Sudarsky class III gas giant" || event.bodyclass = "Sudarsky class IV gas giant" || event.bodyclass = "Sudarsky class V gas giant" || event.bodyclass = "Water world" || event.bodyclass = "Earth-like world" || event.bodyclass = "Ammonia world" || event.bodyclass = "Water Giant" || event.bodyclass = "Helium-rich" || event.bodyclass = "Gas giant with ammonia based life" || event.bodyclass = "Gas giant with water based life"  || reportbody.atmosphere  || event.bodyclass ="Earthlike body": 
    {OneOf("This body is", "It is", "This planet is")} unsuitable for landing.
  |else:
    The landable status of this body is unable to be detected.
  }
|elif reportbody.landable = false || event.landable = false:
{OneOf("This body is", "It is", "This planet is")} unsuitable for landing.
}


{_Atmosphere }

{SetState("eddi_atmosphere_type", 0)}
{if event.bodyclass= "Sudarsky class I gas giant":
   Class one or Jovian gas giants have primarily hydrogen and helium atmospheres. Coloration comes from clouds in the upper atmosphere of ammonia, water vapor, hydrogen sulphide, phosphine and sulphur.
      {SetState("eddi_atmosphere_type", 1)}
|elif event.bodyclass= "Sudarsky class II gas giant":
   Class two gas giants have primarily hydrogen and helium atmospheres. Water vapor in the upper cloud layers creates high reflected light levels.
      {SetState("eddi_atmosphere_type", 1)}
|elif event.bodyclass= "Sudarsky class III gas giant":
   Class three gas giants have primarily hydrogen and helium atmospheres without distinctive cloud layers.  They are primarily blue in color.
      {SetState("eddi_atmosphere_type", 1)}
|elif event.bodyclass= "Sudarsky class IV gas giant":
   Class four gas giants have primarily hydrogen and helium atmospheres with carbon monoxide and upper clouds of alkali metals above lower cloud layers of silicates and iron compounds. This causes bright colours.
      {SetState("eddi_atmosphere_type", 1)}
|elif event.bodyclass= "Sudarsky class V gas giant":
   Class five gas giants have primarily hydrogen and helium atmospheres, with thick clouds of silicates and iron compounds, even metallic iron. They often emit a dull glow from the internal heat within the clouds.
      {SetState("eddi_atmosphere_type", 1)}
|elif event.bodyclass= "Gas giant with water based life":
   Gas giant's with water based life have primarily a hydrogen and helium based atmosphere, but not far below the surface exists life based in the water cloud layer.
      {SetState("eddi_atmosphere_type", 1)}
|elif find(event.bodyclass, "Water Giant") >= 0:
   This gas giant is mainly composed of Water vapor.
   {SetState("eddi_atmosphere_type", 1)}
|elif event.bodyclass="Earthlike body":
   This outdoor world has a human breathable atmosphere and  indigenious life.
   {SetState("eddi_atmosphere_type", 1)} 
|elif event.bodyclass = "Ammonia World" || event.bodyclass ="Ammonia world":
   This terrestrial ammonia world has an active ammonia based chemistry and carbon ammonia based life.
   {SetState("eddi_atmosphere_type", 2)}
|elif event.bodyclass = "Gas giant with ammonia based life":
   This gas giant with ammonia-based life is a primary hydrogen and helium based atmospheric gas gieant, but a little below the surface cloud layers, life exists based in the ammonia cloud layer.
   {SetState("eddi_atmosphere_type", 1)}

|else: 
   {if reportbody.atmosphere = "ammonia atmosphere" || reportbody.atmosphere = "argon atmosphere" || reportbody.atmosphere = "carbon dioxide atmosphere" || reportbody.atmosphere = "helium atmosphere" || reportbody.atmosphere = "methane atmosphere" || reportbody.atmosphere = "neon atmosphere" || reportbody.atmosphere = "nitrogen atmosphere" || reportbody.atmosphere = "silicate vapour atmosphere" || reportbody.atmosphere = "sulfur dioxide atmosphere" || reportbody.atmosphere = "sulphur dioxide atmosphere" || reportbody.atmosphere = "water atmosphere":
      {SetState("eddi_atmosphere_element", slice(reportbody.atmosphere, 0, find(reportbody.atmosphere, " atmosphere", 0)))}
      {SetState("eddi_atmosphere_type", 0)}
   |elif reportbody.atmosphere = "ammonia rich atmosphere" || reportbody.atmosphere = "argon rich atmosphere" || reportbody.atmosphere = "carbon dioxide rich atmosphere" || reportbody.atmosphere = "helium rich atmosphere" || reportbody.atmosphere = "methane rich atmosphere" || reportbody.atmosphere = "neon rich atmosphere" || reportbody.atmosphere = "nitrogen rich atmosphere" || reportbody.atmosphere = "silicate vapour rich atmosphere" || reportbody.atmosphere = "sulfur dioxide rich atmosphere" || reportbody.atmosphere = "sulphur dioxide rich atmosphere" || reportbody.atmosphere = "water rich atmosphere":
      {SetState("eddi_atmosphere_element", slice(reportbody.atmosphere, 0, find(reportbody.atmosphere, " rich", 0)))}
      {SetState("eddi_atmosphere_type", 0)}
   |elif reportbody.atmosphere = "hot thick ammonia atmosphere" || reportbody.atmosphere = "hot thick argon atmosphere" || reportbody.atmosphere = "hot thick carbon dioxide atmosphere" || reportbody.atmosphere = "hot thick helium atmosphere" || reportbody.atmosphere = "hot thick methane atmosphere" || reportbody.atmosphere = "hot thick neon atmosphere" || reportbody.atmosphere = "hot thick nitrogen atmosphere" || reportbody.atmosphere = "hot thick silicate vapour atmosphere" || reportbody.atmosphere = "hot thick sulfur dioxide atmosphere" || reportbody.atmosphere = "hot thick sulphur dioxide atmosphere" || reportbody.atmosphere = "hot thick water atmosphere":
      {SetState("eddi_atmosphere_element", slice(reportbody.atmosphere, 10, (find(reportbody.atmosphere, " atmosphere", 0)-10)))}
      {SetState("eddi_atmosphere_type", 0)}
   |elif reportbody.atmosphere = "hot thick ammonia rich atmosphere" || reportbody.reportbody = "hot thick argon rich atmosphere" || reportbody.atmosphere = "hot thick carbon dioxide rich atmosphere" || reportbody.atmosphere = "hot thick helium rich atmosphere" || reportbody.atmosphere = "hot thick methane rich atmosphere" || reportbody.atmosphere = "hot thick neon rich atmosphere" || reportbody.atmosphere = "hot thick nitrogen rich atmosphere" || reportbody.atmosphere = "hot thick silicate vapour rich atmosphere" || reportbody.atmosphere = "hot thick sulfur dioxide rich atmosphere" || reportbody.atmosphere = "hot thick sulphur dioxide rich atmosphere" || reportbody.atmosphere = "hot thick water rich atmosphere":
      {SetState("eddi_atmosphere_element", slice(reportbody.atmosphere, 10, (find(reportbody.atmosphere, " rich", 0)-10)))}
      {SetState("eddi_atmosphere_type", 0)}
   |elif reportbody.atmosphere = "thick ammonia atmosphere" || reportbody.atmosphere = "thick argon atmosphere" || reportbody.atmosphere = "thick carbon dioxide atmosphere" || reportbody.atmosphere = "thick helium atmosphere" || reportbody.atmosphere = "thick methane atmosphere" || reportbody.atmosphere = "thick neon atmosphere" || reportbody.atmosphere = "thick nitrogen atmosphere" || reportbody.atmosphere = "thick silicate vapour atmosphere" || reportbody.atmosphere = "thick sulfur dioxide atmosphere" || reportbody.atmosphere = "thick sulphur dioxide atmosphere" || reportbody.atmosphere = "thick water atmosphere":
      {SetState("eddi_atmosphere_element", slice(reportbody.atmosphere, 6, (find(reportbody.atmosphere, " atmosphere", 0)-6)))}
      {SetState("eddi_atmosphere_type", 0)}
   |elif reportbody.atmosphere = "thick ammonia rich atmosphere" || reportbody.atmosphere = "thick argon rich atmosphere" || reportbody.atmosphere = "thick carbon dioxide rich atmosphere" || reportbody.atmosphere = "thick helium rich atmosphere" || reportbody.atmosphere = "thick methane rich atmosphere" || reportbody.atmosphere = "thick neon rich atmosphere" || reportbody.atmosphere = "thick nitrogen rich atmosphere" || reportbody.atmosphere = "thick silicate vapour rich atmosphere" || reportbody.atmosphere = "thick sulfur dioxide rich atmosphere" || reportbody.atmosphere = "thick sulphur dioxide rich atmosphere" || reportbody.atmosphere = "thick water rich atmosphere":
      {SetState("eddi_atmosphere_element", slice(reportbody.atmosphere, 6, (find(reportbody.atmosphere, " rich", 0)-6)))}
      {SetState("eddi_atmosphere_type", 0)}
   |elif reportbody.atmosphere = "thin ammonia atmosphere" || reportbody.atmosphere = "thin argon atmosphere" || reportbody.atmosphere = "thin carbon dioxide atmosphere" || reportbody.atmosphere = "thin helium atmosphere" || reportbody.atmosphere = "thin methane atmosphere" || reportbody.atmosphere = "thin neon atmosphere" || reportbody.atmosphere = "thin nitrogen atmosphere" || reportbody.atmosphere = "thin silicate vapour atmosphere" || reportbody.atmosphere = "thin sulfur dioxide atmosphere" || reportbody.atmosphere = "thin sulphur dioxide atmosphere" || reportbody.atmosphere = "thin water atmosphere":
      {SetState("eddi_atmosphere_element", slice(reportbody.atmosphere, 5, (find(reportbody.atmosphere, " atmosphere", 0)-5)))}
      {SetState("eddi_atmosphere_type", 0)}
   |elif reportbody.atmosphere = "thin ammonia rich atmosphere" || reportbody.atmosphere = "thin argon rich atmosphere" || reportbody.atmosphere = "thin carbon dioxide rich atmosphere" || reportbody.atmosphere = "thin helium rich atmosphere" || reportbody.atmosphere = "thin methane rich atmosphere" || reportbody.atmosphere = "thin neon rich atmosphere" || reportbody.atmosphere = "thin nitrogen rich atmosphere" || reportbody.atmosphere = "thin silicate vapour rich atmosphere" || reportbody.atmosphere = "thin sulfur dioxide rich atmosphere" || reportbody.atmosphere = "thin sulphur dioxide rich atmosphere" || reportbody.atmosphere = "thin water rich atmosphere":
      {SetState("eddi_atmosphere_element", slice(reportbody.atmosphere, 5, (find(reportbody.atmosphere, " rich", 0)-5)))}
      {SetState("eddi_atmosphere_type", 0)}
   |elif reportbody.atmosphere ="No atmosphere" || reportbody.atmosphere = "" || event.landable:
          {SetState("eddi_atmosphere_type", 1)}
          {OneOf("{reportbody.name} has no atmosphere ","There is no atmosphere on this {event.bodyclass}","This body has no atmosphere")}.
   |elif !reportbody.atmosphere:
         {OneOf("{reportbody.name} has an undetected atmosphere composition","This {event.bodyclass}'s atmosphere composition is undetected","This body's atmosphere composition is undetected")}.
         {SetState("eddi_atmosphere_type", 1)}

   |else:
      {OneOf("{reportbody.name} has a {reportbody.atmosphere}","There is a {reportbody.atmosphere} on this {event.bodyclass}","This body has a {reportbody.atmosphere}")}.
      {SetState("eddi_atmosphere_type", 1)}
   }
}
{if state.eddi_atmosphere_type = 0:
   {OneOf("{reportbody.name} has ","There is ","This {event.bodyclass} has ","This body has ")}
   {if reportbody.pressure < 35000:
      a trace
   |elif reportbody.pressure < 60000:
      a very thin
   |elif reportbody.pressure < 80000:
      a thin
   |elif reportbody.pressure < 120000:
      an average
   |elif reportbody.pressure < 500000:
      a thick
   |elif reportbody.pressure < 10000000:
      a dense
   |elif reportbody.pressure < 100000000:
      a very dense
   |else:
      a crushing
   }
   atmosphere composed mainly of {state.eddi_atmosphere_element}.
|elif state.eddi_atmosphere_type = 2:
   {OneOf("{reportbody.name} has ","There is ","This {event.bodyclass} has ","This body has ")}
   {if reportbody.pressure < 35000:
      a trace
   |elif reportbody.pressure < 60000:
      a very thin
   |elif reportbody.pressure < 80000:
      a thin
   |elif reportbody.pressure < 120000:
      an average
   |elif reportbody.pressure < 500000:
      a thick
   |elif reportbody.pressure < 10000000:
      a dense
   |elif reportbody.pressure < 100000000:
      a very dense
   |else:
      a crushing
   }
   atmosphere composed mainly of toxic gases like methane and ammonia.
}
{SetState("eddi_atmosphere_type", 0)}
{_ Volcanism}
{if reportbody.volcanism.type = "Magma":
   There are 
   {if reportbody.volcanism.amount = "Major":
      {OneOf("numerous", "many", "lots of")} 
   |elif reportbody.volcanism.amount = "Minor":
      {OneOf("some", "a few", "a small amount of")} 
   } 
   lava flows consisting mostly of {reportbody.volcanism.composition} on the surface.
|elif reportbody.volcanism.type = "Geysers":
   There are
   {if reportbody.volcanism.amount = "Major":
      {OneOf("numerous", "many", "lots of")} 
   |elif reportbody.volcanism.amount = "Minor":
      {OneOf("some", "a few", "a small number of")} 
   } geysers of volcanic origin that are ejecting mostly {reportbody.volcanism.composition} {OneOf("detected", "present")} on the surface.
    
      
}

{_ Body materials report }

{if !state.detailedmat: 

   {if !reportbody.landable || !event.landable:

   |else:
      {if reportbody.landable = true || event.landable = true:
        {set goodmaterials to []}
        {set greatmaterials to []}
        {for material in reportbody.materials:
            {if material.percentage >= MaterialDetails(material.material).greatpctbody:
                {set greatmaterials to cat(greatmaterials, [material])}
            |elif material.percentage >= MaterialDetails(material.material).goodpctbody:
                {set goodmaterials to cat(goodmaterials, [material])}
            }
        }

        {if len(greatmaterials) > 0:
            This body contains very high levels of
            {if len(greatmaterials) = 1:
                {greatmaterials[0].material} at {round(greatmaterials[0].percentage, 1)} percent
            |elif len(greatmaterials) = 2:
                {greatmaterials[0].material} at {round(greatmaterials[0].percentage, 1)} percent and {greatmaterials[1].material} at {round(greatmaterials[1].percentage,1)} percent
            |else:
                {set cur to 0}
                {while cur < len(greatmaterials):
                    {if cur = 0:
                        {greatmaterials[cur].material} at {round(greatmaterials[cur].percentage, 1)} percent
                    |elif cur < len(greatmaterials) - 1:
                        , {greatmaterials[cur].material} at {round(greatmaterials[cur].percentage, 1)} percent
                    |else:
                        , and {greatmaterials[cur].material} at {round(greatmaterials[cur].percentage, 1)} percent
                    }
                    {set cur to cur + 1}
                }
            }
        }
        {if len(goodmaterials) > 0:
            {if len(greatmaterials) > 0:
                and high levels of
            |else:
                This body contains high levels of
            }
            {if len(goodmaterials) = 1:
                {goodmaterials[0].material} at {round(goodmaterials[0].percentage, 1)} percent
            |elif len(goodmaterials) = 2:
                {goodmaterials[0].material} at {round(goodmaterials[0].percentage, 1)} percent and {goodmaterials[1].material} at {round(goodmaterials[1].percentage, 1)} percent
            |else:
                {set cur to 0}
                {while cur < len(goodmaterials):
                    {if cur = 0:
                        {goodmaterials[cur].material} at {round(goodmaterials[cur].percentage, 1)} percent
                    |elif cur < len(goodmaterials) - 1:
                        , {goodmaterials[cur].material} at {round(goodmaterials[cur].percentage, 1)} percent
                    |else:
                        , and {goodmaterials[cur].material} at {round(goodmaterials[cur].percentage, 1)} percent
                    }
                    {set cur to cur + 1}
                }
            }
        }
        {if len(greatmaterials) > 0 || len(goodmaterials) > 0:
            .
        |else:
        No particular abundant minerals detected.         
        }
            
}
}

|else:

{if reportbody.landable = true || event.landable = true && len(reportbody.materials) > 0:

        {OneOf("This body contains measureable levels of", "There is measurable levels of", "The following materials are detected on the surface","This {event.bodyclass} contains measurable levels of")}
        {if len(reportbody.materials) = 1:
            {reportbody.materials[0].material} at {round(reportbody.materials[0].percentage, 1)} percent
        |elif len(material) = 2:
            {reportbody.materials[0].material} at {round(reportbody.materials[0].percentage, 1)} percent,
            and {reportbody.materials[1].material} at {round(reportbody.materials[1].percentage, 1)} percent
        |else:
            {set cur to 0}
            {while cur < len(reportbody.materials):
                {if cur = 0:
                    {reportbody.materials[cur].material} at {round(reportbody.materials[cur].percentage, 1)} percent
                |elif cur < len(reportbody.materials) - 1:
                    , {reportbody.materials[cur].material} at {round(reportbody.materials[cur].percentage, 1)} percent
                |else:
                        , and {reportbody.materials[cur].material} at {round(reportbody.materials[cur].percentage, 1)} percent
                }
                {set cur to cur + 1}
            }
        }
        {if len(reportbody.materials) > 0:
            .
        }
}
}


I see a lot of great scripts, but as a new player I am not sure where I cut and paste this code so that it works. In looking at VA if I press New Command I do not know what option to press to paste this into. There are so many great scripts on this forum but not much in way of helping noobs know what to do with them or how to use them.. Maybe someone could post a short walk through on how to use a script on here?
 
Hi and welcome here Bazslaz,

in VA, you can't copy-paste full command scripts, you have to enter them manually, or import from a *.vap file, like the one what Darkcyde has in his Dropbox folder. There is an option to import a full profile (basically adding a full profile), and when editing your profile, you can import separate commands from an another already 'imported' full profile.

In EDDI, first I would suggest to choose a profile for basis, you can use the default EDDI profile, or choose a custom full profile. I use Darkcyde's profile as basis. Then, if you'd like to edit a script for example for 'Jumped' event, then in EDDI, go to the Speech responder tab, look for the Jumped event, Edit, voila, there is the script for editing. You can copy-paste here the scripts available here. Be careful, there might be some variables (set with 'SetState'), which might be used in another events, so don't delete those lines, if you edit the script.

I would suggest to start with something simple, try to understand the existing scripts, the usage of the variables.

If you have EDDI and VA running, VA starts EDDI automatically, you don't have to start EDDI additionally. If you import the EDDI.vap into VA, there is a voice command 'configure EDDI' to open the EDDI window.

A few links for EDDI programming:

https://r3c.github.io/cottle/

https://github.com/cmdrmcdonald/EliteDangerousDataProvider/wiki

http://snafets.de/elite/eddi_scripts/index.php?

One to keep you calm, while editing scripts :) :

http://www.costadelmar-radio.com/

Best regards!


I think I've finally gotten my Body Scanned script to where I want it. I'm an information junkie, I like hearing all the scan info about a body that is available, so my scanned script is very detailed. I've had mixed results using the BodyDetails function (values being not set when they are in the journal) so I settled on using a mix of bodydetails and eventdetails. Some of the units of measurement are different if called from bodydetails vs the event. I've tried to make the script work well with a Surface Scanner, and with out a surface scanner.

I am absoulty not a programmer; code makes my head hurt. I've copied liberaly from this thread and the EDDI thread to piece togeter the pieces.

It's broken down into sections:

Mass & Surface Temperture:
I convert the meters stored in event.radius to kilometers, and convert kelvin to Fahrenheit (USA here).
Code:
{OneOf("{P(reportbody.name)} is", "It is", "This body is")}

{if event.earthmass <= 0.0200:
       a miniscule, {round(event.radius / 1000, 0)} kilometer radius, {round(event.earthmass, 4)} earthmass,
   |elif event.earthmass <= 0.1000:
       a tiny, {round(event.radius / 1000, 0)} kilometer radius, {round(event.earthmass, 4)} earthmass,
      |elif event.earthmass <= 3.0:
       a medium sized, {round(event.radius / 1000, 0)} kilometer radius, {round(event.earthmass, 2)} earthmass,
   |elif event.earthmass <= 10.0:
       a large, {round(event.radius / 1000, 0)} kilometer radius, {round(event.earthmass, 2)} earthmass,
   |elif event.earthmass <= 20.0:
       a huge, {round(event.radius / 1000, 0)} kilometer radius, {round(event.earthmass, 2)} earthmass,
   |elif event.earthmass <= 50.0:
       an incredibly large, {round(event.radius / 1000, 0)} kilometer radius, {round(event.earthmass, 2)} earthmass,
   |else:
       a gigantic, {round(event.radius / 1000, 0)} kilometer radius, {round(event.earthmass, 2)} earthmass,
   }

{if reportbody.temperature:
{set temp to (reportbody.temperature * 1.8 - 459.67)}

{if reportbody.temperature <=0:
    frozen {round(temp, 0)} degree, 
|elif reportbody.temperature < 173:
    frigid {round(temp, 0)} degree,
|elif reportbody.temperature < 213:
    cold {round(temp, 0)} degree,
|elif reportbody.temperature < 243:
    arctic {round(temp, 0)} degree,
|elif reportbody.temperature < 258:
    cool {round(temp, 0)} degree,
|elif reportbody.temperature < 273:
    chilly {round(temp, 0)} degree,
|elif reportbody.temperature < 300:
    temperate {round(temp, 0)} degree,
|elif reportbody.temperature < 315:
    warm {round(temp, 0)} degree,
|elif reportbody.temperature < 375:
    heated {round(temp, 0)} degree,
|elif reportbody.temperature < 500:
    hot {round(temp, 0)} degree,
|elif reportbody.temperature < 700:
    sweltering {round(temp, 0)} degree,
|elif reportbody.temperature < 1000:
    scorchingly hot {round(temp, 0)} degree,
|elif reportbody.temperature < 1500:
    melting {round(temp, 0)} degree,
|elif reportbody.temperature < 2300:
    molten {round(temp, 0)} degree,
|elif reportbody.temperature < 3300:
    boiling {round(temp, 0)} degree,
|elif reportbody.temperature < 10000:
    blazingly hot {round(temp, 0)} degree,
|else:
    incredibly hot {round(temp, 0)} degree,
}
|else:
with an undetected surface tempature,
}

Body Type, Misc details, orbital info and landable status:
Code:
{if reportbody.tidallylocked:
     tidally-locked,
}

{if reportbody.terraformstate = "Terraformable":
    terraformable, 
|elif reportbody.terraformstate = "Terraformed":
    terraformed, 
}
    
{if len(reportbody.rings) > 0:
  {len(reportbody.rings)} ringed, 
    {if reportbody.reserves:
        with {reportbody.reserves},
    }
}

{if event.bodyclass= "Sudarsky class I gas giant":
   Class one gas giant. 
|elif event.bodyclass= "Sudarsky class II gas giant":
   Class two gas giant. 
|elif event.bodyclass= "Sudarsky class III gas giant":
   Class three gas giant. 
|elif event.bodyclass= "Sudarsky class IV gas giant":
   Class four gas giant. 
|elif event.bodyclass= "Sudarsky class V gas giant":
   Class five gas giant. 
|else:
   {event.bodyclass}. 
}

{if reportbody.terraformstate = "Terraforming":
  In the process of being terraformed. 
}

{OneOf("{P(reportbody.name)} has", "It has", "This body has","This {event.bodyclass} has")}
a gravity of {round(reportbody.gravity, 2)} G's with a

{if reportbody.rotationalperiod < -20.0:
            slow retrograde
        |elif reportbody.rotationalperiod < -0.5:
            retrograde
        |elif reportbody.rotationalperiod < 0:
            fast retrograde
        |elif reportbody.rotationalperiod <= 0.5:
            fast
        |elif reportbody.rotationalperiod > 20.0:
            slow
}

rotational period of {Humanise(reportbody.rotationalperiod)} day{if reportbody.rotationalperiod != "1":s}, and an orbital period of {Humanise(reportbody.orbitalperiod)} day{if reportbody.orbitalperiod != "1":s}.

 
{if reportbody.landable = true || event.landable = true:
  {OneOf("This body is", "It is", "This planet is")} suitable for landing.

|elif !reportbody.landable || !event.landable:
  {if event.bodyclass = "Sudarsky class I gas giant" || event.bodyclass = "Sudarsky class II gas giant" || event.bodyclass = "Sudarsky class III gas giant" || event.bodyclass = "Sudarsky class IV gas giant" || event.bodyclass = "Sudarsky class V gas giant" || event.bodyclass = "Water world" || event.bodyclass = "Earth-like world" || event.bodyclass = "Ammonia world" || event.bodyclass = "Water Giant" || event.bodyclass = "Helium-rich" || event.bodyclass = "Gas giant with ammonia based life" || event.bodyclass = "Gas giant with water based life"  || reportbody.atmosphere  || event.bodyclass ="Earthlike body": 
    {OneOf("This body is", "It is", "This planet is")} unsuitable for landing.
  |else:
    The landable status of this body is unable to be detected.
  }
|elif reportbody.landable = false || event.landable = false:
{OneOf("This body is", "It is", "This planet is")} unsuitable for landing.
}

Atmosphere and Volcanism:
I borrowed heavily from Estelyen's atmosphere script:
https://forums.frontier.co.uk/showt...ion-and-more?p=5431518&viewfull=1#post5431518
Code:
{_Atmosphere }

{SetState("eddi_atmosphere_type", 0)}
{if event.bodyclass= "Sudarsky class I gas giant":
   Class one or Jovian gas giants have primarily hydrogen and helium atmospheres. Coloration comes from clouds in the upper atmosphere of ammonia, water vapor, hydrogen sulphide, phosphine and sulphur.
      {SetState("eddi_atmosphere_type", 1)}
|elif event.bodyclass= "Sudarsky class II gas giant":
   Class two gas giants have primarily hydrogen and helium atmospheres. Water vapor in the upper cloud layers creates high reflected light levels.
      {SetState("eddi_atmosphere_type", 1)}
|elif event.bodyclass= "Sudarsky class III gas giant":
   Class three gas giants have primarily hydrogen and helium atmospheres without distinctive cloud layers.  They are primarily blue in color.
      {SetState("eddi_atmosphere_type", 1)}
|elif event.bodyclass= "Sudarsky class IV gas giant":
   Class four gas giants have primarily hydrogen and helium atmospheres with carbon monoxide and upper clouds of alkali metals above lower cloud layers of silicates and iron compounds. This causes bright colours.
      {SetState("eddi_atmosphere_type", 1)}
|elif event.bodyclass= "Sudarsky class V gas giant":
   Class five gas giants have primarily hydrogen and helium atmospheres, with thick clouds of silicates and iron compounds, even metallic iron. They often emit a dull glow from the internal heat within the clouds.
      {SetState("eddi_atmosphere_type", 1)}
|elif event.bodyclass= "Gas giant with water based life":
   Gas giant's with water based life have primarily a hydrogen and helium based atmosphere, but not far below the surface exists life based in the water cloud layer.
      {SetState("eddi_atmosphere_type", 1)}
|elif find(event.bodyclass, "Water Giant") >= 0:
   This gas giant is mainly composed of Water vapor.
   {SetState("eddi_atmosphere_type", 1)}
|elif event.bodyclass="Earthlike body":
   This outdoor world has a human breathable atmosphere and  indigenious life.
   {SetState("eddi_atmosphere_type", 1)} 
|elif event.bodyclass = "Ammonia World" || event.bodyclass ="Ammonia world":
   This terrestrial ammonia world has an active ammonia based chemistry and carbon ammonia based life.
   {SetState("eddi_atmosphere_type", 2)}
|elif event.bodyclass = "Gas giant with ammonia based life":
   This gas giant with ammonia-based life is a primary hydrogen and helium based atmospheric gas gieant, but a little below the surface cloud layers, life exists based in the ammonia cloud layer.
   {SetState("eddi_atmosphere_type", 1)}

|else: 
   {if reportbody.atmosphere = "ammonia atmosphere" || reportbody.atmosphere = "argon atmosphere" || reportbody.atmosphere = "carbon dioxide atmosphere" || reportbody.atmosphere = "helium atmosphere" || reportbody.atmosphere = "methane atmosphere" || reportbody.atmosphere = "neon atmosphere" || reportbody.atmosphere = "nitrogen atmosphere" || reportbody.atmosphere = "silicate vapour atmosphere" || reportbody.atmosphere = "sulfur dioxide atmosphere" || reportbody.atmosphere = "sulphur dioxide atmosphere" || reportbody.atmosphere = "water atmosphere":
      {SetState("eddi_atmosphere_element", slice(reportbody.atmosphere, 0, find(reportbody.atmosphere, " atmosphere", 0)))}
      {SetState("eddi_atmosphere_type", 0)}
   |elif reportbody.atmosphere = "ammonia rich atmosphere" || reportbody.atmosphere = "argon rich atmosphere" || reportbody.atmosphere = "carbon dioxide rich atmosphere" || reportbody.atmosphere = "helium rich atmosphere" || reportbody.atmosphere = "methane rich atmosphere" || reportbody.atmosphere = "neon rich atmosphere" || reportbody.atmosphere = "nitrogen rich atmosphere" || reportbody.atmosphere = "silicate vapour rich atmosphere" || reportbody.atmosphere = "sulfur dioxide rich atmosphere" || reportbody.atmosphere = "sulphur dioxide rich atmosphere" || reportbody.atmosphere = "water rich atmosphere":
      {SetState("eddi_atmosphere_element", slice(reportbody.atmosphere, 0, find(reportbody.atmosphere, " rich", 0)))}
      {SetState("eddi_atmosphere_type", 0)}
   |elif reportbody.atmosphere = "hot thick ammonia atmosphere" || reportbody.atmosphere = "hot thick argon atmosphere" || reportbody.atmosphere = "hot thick carbon dioxide atmosphere" || reportbody.atmosphere = "hot thick helium atmosphere" || reportbody.atmosphere = "hot thick methane atmosphere" || reportbody.atmosphere = "hot thick neon atmosphere" || reportbody.atmosphere = "hot thick nitrogen atmosphere" || reportbody.atmosphere = "hot thick silicate vapour atmosphere" || reportbody.atmosphere = "hot thick sulfur dioxide atmosphere" || reportbody.atmosphere = "hot thick sulphur dioxide atmosphere" || reportbody.atmosphere = "hot thick water atmosphere":
      {SetState("eddi_atmosphere_element", slice(reportbody.atmosphere, 10, (find(reportbody.atmosphere, " atmosphere", 0)-10)))}
      {SetState("eddi_atmosphere_type", 0)}
   |elif reportbody.atmosphere = "hot thick ammonia rich atmosphere" || reportbody.reportbody = "hot thick argon rich atmosphere" || reportbody.atmosphere = "hot thick carbon dioxide rich atmosphere" || reportbody.atmosphere = "hot thick helium rich atmosphere" || reportbody.atmosphere = "hot thick methane rich atmosphere" || reportbody.atmosphere = "hot thick neon rich atmosphere" || reportbody.atmosphere = "hot thick nitrogen rich atmosphere" || reportbody.atmosphere = "hot thick silicate vapour rich atmosphere" || reportbody.atmosphere = "hot thick sulfur dioxide rich atmosphere" || reportbody.atmosphere = "hot thick sulphur dioxide rich atmosphere" || reportbody.atmosphere = "hot thick water rich atmosphere":
      {SetState("eddi_atmosphere_element", slice(reportbody.atmosphere, 10, (find(reportbody.atmosphere, " rich", 0)-10)))}
      {SetState("eddi_atmosphere_type", 0)}
   |elif reportbody.atmosphere = "thick ammonia atmosphere" || reportbody.atmosphere = "thick argon atmosphere" || reportbody.atmosphere = "thick carbon dioxide atmosphere" || reportbody.atmosphere = "thick helium atmosphere" || reportbody.atmosphere = "thick methane atmosphere" || reportbody.atmosphere = "thick neon atmosphere" || reportbody.atmosphere = "thick nitrogen atmosphere" || reportbody.atmosphere = "thick silicate vapour atmosphere" || reportbody.atmosphere = "thick sulfur dioxide atmosphere" || reportbody.atmosphere = "thick sulphur dioxide atmosphere" || reportbody.atmosphere = "thick water atmosphere":
      {SetState("eddi_atmosphere_element", slice(reportbody.atmosphere, 6, (find(reportbody.atmosphere, " atmosphere", 0)-6)))}
      {SetState("eddi_atmosphere_type", 0)}
   |elif reportbody.atmosphere = "thick ammonia rich atmosphere" || reportbody.atmosphere = "thick argon rich atmosphere" || reportbody.atmosphere = "thick carbon dioxide rich atmosphere" || reportbody.atmosphere = "thick helium rich atmosphere" || reportbody.atmosphere = "thick methane rich atmosphere" || reportbody.atmosphere = "thick neon rich atmosphere" || reportbody.atmosphere = "thick nitrogen rich atmosphere" || reportbody.atmosphere = "thick silicate vapour rich atmosphere" || reportbody.atmosphere = "thick sulfur dioxide rich atmosphere" || reportbody.atmosphere = "thick sulphur dioxide rich atmosphere" || reportbody.atmosphere = "thick water rich atmosphere":
      {SetState("eddi_atmosphere_element", slice(reportbody.atmosphere, 6, (find(reportbody.atmosphere, " rich", 0)-6)))}
      {SetState("eddi_atmosphere_type", 0)}
   |elif reportbody.atmosphere = "thin ammonia atmosphere" || reportbody.atmosphere = "thin argon atmosphere" || reportbody.atmosphere = "thin carbon dioxide atmosphere" || reportbody.atmosphere = "thin helium atmosphere" || reportbody.atmosphere = "thin methane atmosphere" || reportbody.atmosphere = "thin neon atmosphere" || reportbody.atmosphere = "thin nitrogen atmosphere" || reportbody.atmosphere = "thin silicate vapour atmosphere" || reportbody.atmosphere = "thin sulfur dioxide atmosphere" || reportbody.atmosphere = "thin sulphur dioxide atmosphere" || reportbody.atmosphere = "thin water atmosphere":
      {SetState("eddi_atmosphere_element", slice(reportbody.atmosphere, 5, (find(reportbody.atmosphere, " atmosphere", 0)-5)))}
      {SetState("eddi_atmosphere_type", 0)}
   |elif reportbody.atmosphere = "thin ammonia rich atmosphere" || reportbody.atmosphere = "thin argon rich atmosphere" || reportbody.atmosphere = "thin carbon dioxide rich atmosphere" || reportbody.atmosphere = "thin helium rich atmosphere" || reportbody.atmosphere = "thin methane rich atmosphere" || reportbody.atmosphere = "thin neon rich atmosphere" || reportbody.atmosphere = "thin nitrogen rich atmosphere" || reportbody.atmosphere = "thin silicate vapour rich atmosphere" || reportbody.atmosphere = "thin sulfur dioxide rich atmosphere" || reportbody.atmosphere = "thin sulphur dioxide rich atmosphere" || reportbody.atmosphere = "thin water rich atmosphere":
      {SetState("eddi_atmosphere_element", slice(reportbody.atmosphere, 5, (find(reportbody.atmosphere, " rich", 0)-5)))}
      {SetState("eddi_atmosphere_type", 0)}
   |elif reportbody.atmosphere ="No atmosphere" || reportbody.atmosphere = "" || event.landable:
          {SetState("eddi_atmosphere_type", 1)}
          {OneOf("{reportbody.name} has no atmosphere ","There is no atmosphere on this {event.bodyclass}","This body has no atmosphere")}.
   |elif !reportbody.atmosphere:
         {OneOf("{reportbody.name} has an undetected atmosphere composition","This {event.bodyclass}'s atmosphere composition is undetected","This body's atmosphere composition is undetected")}.
         {SetState("eddi_atmosphere_type", 1)}

   |else:
      {OneOf("{reportbody.name} has a {reportbody.atmosphere}","There is a {reportbody.atmosphere} on this {event.bodyclass}","This body has a {reportbody.atmosphere}")}.
      {SetState("eddi_atmosphere_type", 1)}
   }
}
{if state.eddi_atmosphere_type = 0:
   {OneOf("{reportbody.name} has ","There is ","This {event.bodyclass} has ","This body has ")}
   {if reportbody.pressure < 35000:
      a trace
   |elif reportbody.pressure < 60000:
      a very thin
   |elif reportbody.pressure < 80000:
      a thin
   |elif reportbody.pressure < 120000:
      an average
   |elif reportbody.pressure < 500000:
      a thick
   |elif reportbody.pressure < 10000000:
      a dense
   |elif reportbody.pressure < 100000000:
      a very dense
   |else:
      a crushing
   }
   atmosphere composed mainly of {state.eddi_atmosphere_element}.
|elif state.eddi_atmosphere_type = 2:
   {OneOf("{reportbody.name} has ","There is ","This {event.bodyclass} has ","This body has ")}
   {if reportbody.pressure < 35000:
      a trace
   |elif reportbody.pressure < 60000:
      a very thin
   |elif reportbody.pressure < 80000:
      a thin
   |elif reportbody.pressure < 120000:
      an average
   |elif reportbody.pressure < 500000:
      a thick
   |elif reportbody.pressure < 10000000:
      a dense
   |elif reportbody.pressure < 100000000:
      a very dense
   |else:
      a crushing
   }
   atmosphere composed mainly of toxic gases like methane and ammonia.
}
{SetState("eddi_atmosphere_type", 0)}
{_ Volcanism}
{if reportbody.volcanism.type = "Magma":
   There are 
   {if reportbody.volcanism.amount = "Major":
      {OneOf("numerous", "many", "lots of")} 
   |elif reportbody.volcanism.amount = "Minor":
      {OneOf("some", "a few", "a small amount of")} 
   } 
   lava flows consisting mostly of {reportbody.volcanism.composition} on the surface.
|elif reportbody.volcanism.type = "Geysers":
   There are
   {if reportbody.volcanism.amount = "Major":
      {OneOf("numerous", "many", "lots of")} 
   |elif reportbody.volcanism.amount = "Minor":
      {OneOf("some", "a few", "a small number of")} 
   } geysers of volcanic origin that are ejecting mostly {reportbody.volcanism.composition} {OneOf("detected", "present")} on the surface.
    
      
}

Materials Available:
I have two versions, the standard version that just reports high percents. (I'm still trying to figure out how to adjust the percent threshold that are reported), and a detailed report that Hoodathunk very helpfully provided. I use voiceattack to set a state variable in EDDI to determine what version I want.
Code:
{_ Body materials report }

{if !state.detailedmat: 

   {if !reportbody.landable || !event.landable:

   |else:
      {if reportbody.landable = true || event.landable = true:
        {set goodmaterials to []}
        {set greatmaterials to []}
        {for material in reportbody.materials:
            {if material.percentage >= MaterialDetails(material.material).greatpctbody:
                {set greatmaterials to cat(greatmaterials, [material])}
            |elif material.percentage >= MaterialDetails(material.material).goodpctbody:
                {set goodmaterials to cat(goodmaterials, [material])}
            }
        }

        {if len(greatmaterials) > 0:
            This body contains very high levels of
            {if len(greatmaterials) = 1:
                {greatmaterials[0].material} at {round(greatmaterials[0].percentage, 1)} percent
            |elif len(greatmaterials) = 2:
                {greatmaterials[0].material} at {round(greatmaterials[0].percentage, 1)} percent and {greatmaterials[1].material} at {round(greatmaterials[1].percentage,1)} percent
            |else:
                {set cur to 0}
                {while cur < len(greatmaterials):
                    {if cur = 0:
                        {greatmaterials[cur].material} at {round(greatmaterials[cur].percentage, 1)} percent
                    |elif cur < len(greatmaterials) - 1:
                        , {greatmaterials[cur].material} at {round(greatmaterials[cur].percentage, 1)} percent
                    |else:
                        , and {greatmaterials[cur].material} at {round(greatmaterials[cur].percentage, 1)} percent
                    }
                    {set cur to cur + 1}
                }
            }
        }
        {if len(goodmaterials) > 0:
            {if len(greatmaterials) > 0:
                and high levels of
            |else:
                This body contains high levels of
            }
            {if len(goodmaterials) = 1:
                {goodmaterials[0].material} at {round(goodmaterials[0].percentage, 1)} percent
            |elif len(goodmaterials) = 2:
                {goodmaterials[0].material} at {round(goodmaterials[0].percentage, 1)} percent and {goodmaterials[1].material} at {round(goodmaterials[1].percentage, 1)} percent
            |else:
                {set cur to 0}
                {while cur < len(goodmaterials):
                    {if cur = 0:
                        {goodmaterials[cur].material} at {round(goodmaterials[cur].percentage, 1)} percent
                    |elif cur < len(goodmaterials) - 1:
                        , {goodmaterials[cur].material} at {round(goodmaterials[cur].percentage, 1)} percent
                    |else:
                        , and {goodmaterials[cur].material} at {round(goodmaterials[cur].percentage, 1)} percent
                    }
                    {set cur to cur + 1}
                }
            }
        }
        {if len(greatmaterials) > 0 || len(goodmaterials) > 0:
            .
        |else:
        No particular abundant minerals detected.         
        }
            
}
}

|else:

{if reportbody.landable = true || event.landable = true && len(reportbody.materials) > 0:

        {OneOf("This body contains measureable levels of", "There is measurable levels of", "The following materials are detected on the surface","This {event.bodyclass} contains measurable levels of")}
        {if len(reportbody.materials) = 1:
            {reportbody.materials[0].material} at {round(reportbody.materials[0].percentage, 1)} percent
        |elif len(material) = 2:
            {reportbody.materials[0].material} at {round(reportbody.materials[0].percentage, 1)} percent,
            and {reportbody.materials[1].material} at {round(reportbody.materials[1].percentage, 1)} percent
        |else:
            {set cur to 0}
            {while cur < len(reportbody.materials):
                {if cur = 0:
                    {reportbody.materials[cur].material} at {round(reportbody.materials[cur].percentage, 1)} percent
                |elif cur < len(reportbody.materials) - 1:
                    , {reportbody.materials[cur].material} at {round(reportbody.materials[cur].percentage, 1)} percent
                |else:
                        , and {reportbody.materials[cur].material} at {round(reportbody.materials[cur].percentage, 1)} percent
                }
                {set cur to cur + 1}
            }
        }
        {if len(reportbody.materials) > 0:
            .
        }
}
}

I use a state variable that is set at starting the game and refreshed when doing my preflight check that set's if a surface scanner is equpped. The script then reads out if it's a Detailed surface scan, or a normal scan.

Here is the entire script in all it's messy glory:
Code:
{_ Context }
{SetState('eddi_context_last_subject', 'body')}
{SetState('eddi_context_last_action', 'scan')}
{SetState('eddi_context_body_system', system.name)}
{SetState('eddi_context_body_name', event.name)}

{set reportbody to BodyDetails(state.eddi_context_body_name, state.eddi_context_body_system)}
{if !reportbody:
   {set reportbody to event}
   {set planettype to bodyclass}
}

{if state.surface_scanner = 1:
    Detailed surface Scan of {P(reportbody.name)} complete.
|else:
    Scan of {P(reportbody.name)} complete.
}


{OneOf("{P(reportbody.name)} is", "It is", "This body is")}

{if event.earthmass <= 0.0200:
       a miniscule, {round(event.radius / 1000, 0)} kilometer radius, {round(event.earthmass, 4)} earthmass,
   |elif event.earthmass <= 0.1000:
       a tiny, {round(event.radius / 1000, 0)} kilometer radius, {round(event.earthmass, 4)} earthmass,
      |elif event.earthmass <= 3.0:
       a medium sized, {round(event.radius / 1000, 0)} kilometer radius, {round(event.earthmass, 2)} earthmass,
   |elif event.earthmass <= 10.0:
       a large, {round(event.radius / 1000, 0)} kilometer radius, {round(event.earthmass, 2)} earthmass,
   |elif event.earthmass <= 20.0:
       a huge, {round(event.radius / 1000, 0)} kilometer radius, {round(event.earthmass, 2)} earthmass,
   |elif event.earthmass <= 50.0:
       an incredibly large, {round(event.radius / 1000, 0)} kilometer radius, {round(event.earthmass, 2)} earthmass,
   |else:
       a gigantic, {round(event.radius / 1000, 0)} kilometer radius, {round(event.earthmass, 2)} earthmass,
   }

{if reportbody.temperature:
{set temp to (reportbody.temperature * 1.8 - 459.67)}

{if reportbody.temperature <=0:
    frozen {round(temp, 0)} degree, 
|elif reportbody.temperature < 173:
    frigid {round(temp, 0)} degree,
|elif reportbody.temperature < 213:
    cold {round(temp, 0)} degree,
|elif reportbody.temperature < 243:
    arctic {round(temp, 0)} degree,
|elif reportbody.temperature < 258:
    cool {round(temp, 0)} degree,
|elif reportbody.temperature < 273:
    chilly {round(temp, 0)} degree,
|elif reportbody.temperature < 300:
    temperate {round(temp, 0)} degree,
|elif reportbody.temperature < 315:
    warm {round(temp, 0)} degree,
|elif reportbody.temperature < 375:
    heated {round(temp, 0)} degree,
|elif reportbody.temperature < 500:
    hot {round(temp, 0)} degree,
|elif reportbody.temperature < 700:
    sweltering {round(temp, 0)} degree,
|elif reportbody.temperature < 1000:
    scorchingly hot {round(temp, 0)} degree,
|elif reportbody.temperature < 1500:
    melting {round(temp, 0)} degree,
|elif reportbody.temperature < 2300:
    molten {round(temp, 0)} degree,
|elif reportbody.temperature < 3300:
    boiling {round(temp, 0)} degree,
|elif reportbody.temperature < 10000:
    blazingly hot {round(temp, 0)} degree,
|else:
    incredibly hot {round(temp, 0)} degree,
}
|else:
with an undetected surface tempature,
}


{if reportbody.tidallylocked:
     tidally-locked,
}

{if reportbody.terraformstate = "Terraformable":
    terraformable, 
|elif reportbody.terraformstate = "Terraformed":
    terraformed, 
}
    
{if len(reportbody.rings) > 0:
  {len(reportbody.rings)} ringed, 
    {if reportbody.reserves:
        with {reportbody.reserves},
    }
}

{if event.bodyclass= "Sudarsky class I gas giant":
   Class one gas giant. 
|elif event.bodyclass= "Sudarsky class II gas giant":
   Class two gas giant. 
|elif event.bodyclass= "Sudarsky class III gas giant":
   Class three gas giant. 
|elif event.bodyclass= "Sudarsky class IV gas giant":
   Class four gas giant. 
|elif event.bodyclass= "Sudarsky class V gas giant":
   Class five gas giant. 
|else:
   {event.bodyclass}. 
}

{if reportbody.terraformstate = "Terraforming":
  In the process of being terraformed. 
}

{OneOf("{P(reportbody.name)} has", "It has", "This body has","This {event.bodyclass} has")}
a gravity of {round(reportbody.gravity, 2)} G's with a

{if reportbody.rotationalperiod < -20.0:
            slow retrograde
        |elif reportbody.rotationalperiod < -0.5:
            retrograde
        |elif reportbody.rotationalperiod < 0:
            fast retrograde
        |elif reportbody.rotationalperiod <= 0.5:
            fast
        |elif reportbody.rotationalperiod > 20.0:
            slow
}

rotational period of {Humanise(reportbody.rotationalperiod)} day{if reportbody.rotationalperiod != "1":s}, and an orbital period of {Humanise(reportbody.orbitalperiod)} day{if reportbody.orbitalperiod != "1":s}.

 
{if reportbody.landable = true || event.landable = true:
  {OneOf("This body is", "It is", "This planet is")} suitable for landing.

|elif !reportbody.landable || !event.landable:
  {if event.bodyclass = "Sudarsky class I gas giant" || event.bodyclass = "Sudarsky class II gas giant" || event.bodyclass = "Sudarsky class III gas giant" || event.bodyclass = "Sudarsky class IV gas giant" || event.bodyclass = "Sudarsky class V gas giant" || event.bodyclass = "Water world" || event.bodyclass = "Earth-like world" || event.bodyclass = "Ammonia world" || event.bodyclass = "Water Giant" || event.bodyclass = "Helium-rich" || event.bodyclass = "Gas giant with ammonia based life" || event.bodyclass = "Gas giant with water based life"  || reportbody.atmosphere  || event.bodyclass ="Earthlike body": 
    {OneOf("This body is", "It is", "This planet is")} unsuitable for landing.
  |else:
    The landable status of this body is unable to be detected.
  }
|elif reportbody.landable = false || event.landable = false:
{OneOf("This body is", "It is", "This planet is")} unsuitable for landing.
}


{_Atmosphere }

{SetState("eddi_atmosphere_type", 0)}
{if event.bodyclass= "Sudarsky class I gas giant":
   Class one or Jovian gas giants have primarily hydrogen and helium atmospheres. Coloration comes from clouds in the upper atmosphere of ammonia, water vapor, hydrogen sulphide, phosphine and sulphur.
      {SetState("eddi_atmosphere_type", 1)}
|elif event.bodyclass= "Sudarsky class II gas giant":
   Class two gas giants have primarily hydrogen and helium atmospheres. Water vapor in the upper cloud layers creates high reflected light levels.
      {SetState("eddi_atmosphere_type", 1)}
|elif event.bodyclass= "Sudarsky class III gas giant":
   Class three gas giants have primarily hydrogen and helium atmospheres without distinctive cloud layers.  They are primarily blue in color.
      {SetState("eddi_atmosphere_type", 1)}
|elif event.bodyclass= "Sudarsky class IV gas giant":
   Class four gas giants have primarily hydrogen and helium atmospheres with carbon monoxide and upper clouds of alkali metals above lower cloud layers of silicates and iron compounds. This causes bright colours.
      {SetState("eddi_atmosphere_type", 1)}
|elif event.bodyclass= "Sudarsky class V gas giant":
   Class five gas giants have primarily hydrogen and helium atmospheres, with thick clouds of silicates and iron compounds, even metallic iron. They often emit a dull glow from the internal heat within the clouds.
      {SetState("eddi_atmosphere_type", 1)}
|elif event.bodyclass= "Gas giant with water based life":
   Gas giant's with water based life have primarily a hydrogen and helium based atmosphere, but not far below the surface exists life based in the water cloud layer.
      {SetState("eddi_atmosphere_type", 1)}
|elif find(event.bodyclass, "Water Giant") >= 0:
   This gas giant is mainly composed of Water vapor.
   {SetState("eddi_atmosphere_type", 1)}
|elif event.bodyclass="Earthlike body":
   This outdoor world has a human breathable atmosphere and  indigenious life.
   {SetState("eddi_atmosphere_type", 1)} 
|elif event.bodyclass = "Ammonia World" || event.bodyclass ="Ammonia world":
   This terrestrial ammonia world has an active ammonia based chemistry and carbon ammonia based life.
   {SetState("eddi_atmosphere_type", 2)}
|elif event.bodyclass = "Gas giant with ammonia based life":
   This gas giant with ammonia-based life is a primary hydrogen and helium based atmospheric gas gieant, but a little below the surface cloud layers, life exists based in the ammonia cloud layer.
   {SetState("eddi_atmosphere_type", 1)}

|else: 
   {if reportbody.atmosphere = "ammonia atmosphere" || reportbody.atmosphere = "argon atmosphere" || reportbody.atmosphere = "carbon dioxide atmosphere" || reportbody.atmosphere = "helium atmosphere" || reportbody.atmosphere = "methane atmosphere" || reportbody.atmosphere = "neon atmosphere" || reportbody.atmosphere = "nitrogen atmosphere" || reportbody.atmosphere = "silicate vapour atmosphere" || reportbody.atmosphere = "sulfur dioxide atmosphere" || reportbody.atmosphere = "sulphur dioxide atmosphere" || reportbody.atmosphere = "water atmosphere":
      {SetState("eddi_atmosphere_element", slice(reportbody.atmosphere, 0, find(reportbody.atmosphere, " atmosphere", 0)))}
      {SetState("eddi_atmosphere_type", 0)}
   |elif reportbody.atmosphere = "ammonia rich atmosphere" || reportbody.atmosphere = "argon rich atmosphere" || reportbody.atmosphere = "carbon dioxide rich atmosphere" || reportbody.atmosphere = "helium rich atmosphere" || reportbody.atmosphere = "methane rich atmosphere" || reportbody.atmosphere = "neon rich atmosphere" || reportbody.atmosphere = "nitrogen rich atmosphere" || reportbody.atmosphere = "silicate vapour rich atmosphere" || reportbody.atmosphere = "sulfur dioxide rich atmosphere" || reportbody.atmosphere = "sulphur dioxide rich atmosphere" || reportbody.atmosphere = "water rich atmosphere":
      {SetState("eddi_atmosphere_element", slice(reportbody.atmosphere, 0, find(reportbody.atmosphere, " rich", 0)))}
      {SetState("eddi_atmosphere_type", 0)}
   |elif reportbody.atmosphere = "hot thick ammonia atmosphere" || reportbody.atmosphere = "hot thick argon atmosphere" || reportbody.atmosphere = "hot thick carbon dioxide atmosphere" || reportbody.atmosphere = "hot thick helium atmosphere" || reportbody.atmosphere = "hot thick methane atmosphere" || reportbody.atmosphere = "hot thick neon atmosphere" || reportbody.atmosphere = "hot thick nitrogen atmosphere" || reportbody.atmosphere = "hot thick silicate vapour atmosphere" || reportbody.atmosphere = "hot thick sulfur dioxide atmosphere" || reportbody.atmosphere = "hot thick sulphur dioxide atmosphere" || reportbody.atmosphere = "hot thick water atmosphere":
      {SetState("eddi_atmosphere_element", slice(reportbody.atmosphere, 10, (find(reportbody.atmosphere, " atmosphere", 0)-10)))}
      {SetState("eddi_atmosphere_type", 0)}
   |elif reportbody.atmosphere = "hot thick ammonia rich atmosphere" || reportbody.reportbody = "hot thick argon rich atmosphere" || reportbody.atmosphere = "hot thick carbon dioxide rich atmosphere" || reportbody.atmosphere = "hot thick helium rich atmosphere" || reportbody.atmosphere = "hot thick methane rich atmosphere" || reportbody.atmosphere = "hot thick neon rich atmosphere" || reportbody.atmosphere = "hot thick nitrogen rich atmosphere" || reportbody.atmosphere = "hot thick silicate vapour rich atmosphere" || reportbody.atmosphere = "hot thick sulfur dioxide rich atmosphere" || reportbody.atmosphere = "hot thick sulphur dioxide rich atmosphere" || reportbody.atmosphere = "hot thick water rich atmosphere":
      {SetState("eddi_atmosphere_element", slice(reportbody.atmosphere, 10, (find(reportbody.atmosphere, " rich", 0)-10)))}
      {SetState("eddi_atmosphere_type", 0)}
   |elif reportbody.atmosphere = "thick ammonia atmosphere" || reportbody.atmosphere = "thick argon atmosphere" || reportbody.atmosphere = "thick carbon dioxide atmosphere" || reportbody.atmosphere = "thick helium atmosphere" || reportbody.atmosphere = "thick methane atmosphere" || reportbody.atmosphere = "thick neon atmosphere" || reportbody.atmosphere = "thick nitrogen atmosphere" || reportbody.atmosphere = "thick silicate vapour atmosphere" || reportbody.atmosphere = "thick sulfur dioxide atmosphere" || reportbody.atmosphere = "thick sulphur dioxide atmosphere" || reportbody.atmosphere = "thick water atmosphere":
      {SetState("eddi_atmosphere_element", slice(reportbody.atmosphere, 6, (find(reportbody.atmosphere, " atmosphere", 0)-6)))}
      {SetState("eddi_atmosphere_type", 0)}
   |elif reportbody.atmosphere = "thick ammonia rich atmosphere" || reportbody.atmosphere = "thick argon rich atmosphere" || reportbody.atmosphere = "thick carbon dioxide rich atmosphere" || reportbody.atmosphere = "thick helium rich atmosphere" || reportbody.atmosphere = "thick methane rich atmosphere" || reportbody.atmosphere = "thick neon rich atmosphere" || reportbody.atmosphere = "thick nitrogen rich atmosphere" || reportbody.atmosphere = "thick silicate vapour rich atmosphere" || reportbody.atmosphere = "thick sulfur dioxide rich atmosphere" || reportbody.atmosphere = "thick sulphur dioxide rich atmosphere" || reportbody.atmosphere = "thick water rich atmosphere":
      {SetState("eddi_atmosphere_element", slice(reportbody.atmosphere, 6, (find(reportbody.atmosphere, " rich", 0)-6)))}
      {SetState("eddi_atmosphere_type", 0)}
   |elif reportbody.atmosphere = "thin ammonia atmosphere" || reportbody.atmosphere = "thin argon atmosphere" || reportbody.atmosphere = "thin carbon dioxide atmosphere" || reportbody.atmosphere = "thin helium atmosphere" || reportbody.atmosphere = "thin methane atmosphere" || reportbody.atmosphere = "thin neon atmosphere" || reportbody.atmosphere = "thin nitrogen atmosphere" || reportbody.atmosphere = "thin silicate vapour atmosphere" || reportbody.atmosphere = "thin sulfur dioxide atmosphere" || reportbody.atmosphere = "thin sulphur dioxide atmosphere" || reportbody.atmosphere = "thin water atmosphere":
      {SetState("eddi_atmosphere_element", slice(reportbody.atmosphere, 5, (find(reportbody.atmosphere, " atmosphere", 0)-5)))}
      {SetState("eddi_atmosphere_type", 0)}
   |elif reportbody.atmosphere = "thin ammonia rich atmosphere" || reportbody.atmosphere = "thin argon rich atmosphere" || reportbody.atmosphere = "thin carbon dioxide rich atmosphere" || reportbody.atmosphere = "thin helium rich atmosphere" || reportbody.atmosphere = "thin methane rich atmosphere" || reportbody.atmosphere = "thin neon rich atmosphere" || reportbody.atmosphere = "thin nitrogen rich atmosphere" || reportbody.atmosphere = "thin silicate vapour rich atmosphere" || reportbody.atmosphere = "thin sulfur dioxide rich atmosphere" || reportbody.atmosphere = "thin sulphur dioxide rich atmosphere" || reportbody.atmosphere = "thin water rich atmosphere":
      {SetState("eddi_atmosphere_element", slice(reportbody.atmosphere, 5, (find(reportbody.atmosphere, " rich", 0)-5)))}
      {SetState("eddi_atmosphere_type", 0)}
   |elif reportbody.atmosphere ="No atmosphere" || reportbody.atmosphere = "" || event.landable:
          {SetState("eddi_atmosphere_type", 1)}
          {OneOf("{reportbody.name} has no atmosphere ","There is no atmosphere on this {event.bodyclass}","This body has no atmosphere")}.
   |elif !reportbody.atmosphere:
         {OneOf("{reportbody.name} has an undetected atmosphere composition","This {event.bodyclass}'s atmosphere composition is undetected","This body's atmosphere composition is undetected")}.
         {SetState("eddi_atmosphere_type", 1)}

   |else:
      {OneOf("{reportbody.name} has a {reportbody.atmosphere}","There is a {reportbody.atmosphere} on this {event.bodyclass}","This body has a {reportbody.atmosphere}")}.
      {SetState("eddi_atmosphere_type", 1)}
   }
}
{if state.eddi_atmosphere_type = 0:
   {OneOf("{reportbody.name} has ","There is ","This {event.bodyclass} has ","This body has ")}
   {if reportbody.pressure < 35000:
      a trace
   |elif reportbody.pressure < 60000:
      a very thin
   |elif reportbody.pressure < 80000:
      a thin
   |elif reportbody.pressure < 120000:
      an average
   |elif reportbody.pressure < 500000:
      a thick
   |elif reportbody.pressure < 10000000:
      a dense
   |elif reportbody.pressure < 100000000:
      a very dense
   |else:
      a crushing
   }
   atmosphere composed mainly of {state.eddi_atmosphere_element}.
|elif state.eddi_atmosphere_type = 2:
   {OneOf("{reportbody.name} has ","There is ","This {event.bodyclass} has ","This body has ")}
   {if reportbody.pressure < 35000:
      a trace
   |elif reportbody.pressure < 60000:
      a very thin
   |elif reportbody.pressure < 80000:
      a thin
   |elif reportbody.pressure < 120000:
      an average
   |elif reportbody.pressure < 500000:
      a thick
   |elif reportbody.pressure < 10000000:
      a dense
   |elif reportbody.pressure < 100000000:
      a very dense
   |else:
      a crushing
   }
   atmosphere composed mainly of toxic gases like methane and ammonia.
}
{SetState("eddi_atmosphere_type", 0)}
{_ Volcanism}
{if reportbody.volcanism.type = "Magma":
   There are 
   {if reportbody.volcanism.amount = "Major":
      {OneOf("numerous", "many", "lots of")} 
   |elif reportbody.volcanism.amount = "Minor":
      {OneOf("some", "a few", "a small amount of")} 
   } 
   lava flows consisting mostly of {reportbody.volcanism.composition} on the surface.
|elif reportbody.volcanism.type = "Geysers":
   There are
   {if reportbody.volcanism.amount = "Major":
      {OneOf("numerous", "many", "lots of")} 
   |elif reportbody.volcanism.amount = "Minor":
      {OneOf("some", "a few", "a small number of")} 
   } geysers of volcanic origin that are ejecting mostly {reportbody.volcanism.composition} {OneOf("detected", "present")} on the surface.
    
      
}

{_ Body materials report }

{if !state.detailedmat: 

   {if !reportbody.landable || !event.landable:

   |else:
      {if reportbody.landable = true || event.landable = true:
        {set goodmaterials to []}
        {set greatmaterials to []}
        {for material in reportbody.materials:
            {if material.percentage >= MaterialDetails(material.material).greatpctbody:
                {set greatmaterials to cat(greatmaterials, [material])}
            |elif material.percentage >= MaterialDetails(material.material).goodpctbody:
                {set goodmaterials to cat(goodmaterials, [material])}
            }
        }

        {if len(greatmaterials) > 0:
            This body contains very high levels of
            {if len(greatmaterials) = 1:
                {greatmaterials[0].material} at {round(greatmaterials[0].percentage, 1)} percent
            |elif len(greatmaterials) = 2:
                {greatmaterials[0].material} at {round(greatmaterials[0].percentage, 1)} percent and {greatmaterials[1].material} at {round(greatmaterials[1].percentage,1)} percent
            |else:
                {set cur to 0}
                {while cur < len(greatmaterials):
                    {if cur = 0:
                        {greatmaterials[cur].material} at {round(greatmaterials[cur].percentage, 1)} percent
                    |elif cur < len(greatmaterials) - 1:
                        , {greatmaterials[cur].material} at {round(greatmaterials[cur].percentage, 1)} percent
                    |else:
                        , and {greatmaterials[cur].material} at {round(greatmaterials[cur].percentage, 1)} percent
                    }
                    {set cur to cur + 1}
                }
            }
        }
        {if len(goodmaterials) > 0:
            {if len(greatmaterials) > 0:
                and high levels of
            |else:
                This body contains high levels of
            }
            {if len(goodmaterials) = 1:
                {goodmaterials[0].material} at {round(goodmaterials[0].percentage, 1)} percent
            |elif len(goodmaterials) = 2:
                {goodmaterials[0].material} at {round(goodmaterials[0].percentage, 1)} percent and {goodmaterials[1].material} at {round(goodmaterials[1].percentage, 1)} percent
            |else:
                {set cur to 0}
                {while cur < len(goodmaterials):
                    {if cur = 0:
                        {goodmaterials[cur].material} at {round(goodmaterials[cur].percentage, 1)} percent
                    |elif cur < len(goodmaterials) - 1:
                        , {goodmaterials[cur].material} at {round(goodmaterials[cur].percentage, 1)} percent
                    |else:
                        , and {goodmaterials[cur].material} at {round(goodmaterials[cur].percentage, 1)} percent
                    }
                    {set cur to cur + 1}
                }
            }
        }
        {if len(greatmaterials) > 0 || len(goodmaterials) > 0:
            .
        |else:
        No particular abundant minerals detected.         
        }
            
}
}

|else:

{if reportbody.landable = true || event.landable = true && len(reportbody.materials) > 0:

        {OneOf("This body contains measureable levels of", "There is measurable levels of", "The following materials are detected on the surface","This {event.bodyclass} contains measurable levels of")}
        {if len(reportbody.materials) = 1:
            {reportbody.materials[0].material} at {round(reportbody.materials[0].percentage, 1)} percent
        |elif len(material) = 2:
            {reportbody.materials[0].material} at {round(reportbody.materials[0].percentage, 1)} percent,
            and {reportbody.materials[1].material} at {round(reportbody.materials[1].percentage, 1)} percent
        |else:
            {set cur to 0}
            {while cur < len(reportbody.materials):
                {if cur = 0:
                    {reportbody.materials[cur].material} at {round(reportbody.materials[cur].percentage, 1)} percent
                |elif cur < len(reportbody.materials) - 1:
                    , {reportbody.materials[cur].material} at {round(reportbody.materials[cur].percentage, 1)} percent
                |else:
                        , and {reportbody.materials[cur].material} at {round(reportbody.materials[cur].percentage, 1)} percent
                }
                {set cur to cur + 1}
            }
        }
        {if len(reportbody.materials) > 0:
            .
        }
}
}


I see a lot of great scripts, but as a new player I am not sure where I cut and paste this code so that it works. In looking at VA if I press New Command I do not know what option to press to paste this into. There are so many great scripts on this forum but not much in way of helping noobs know what to do with them or how to use them.. Maybe someone could post a short walk through on how to use a script on here?
 
Right then folks I'm looking for the variables in that EDDI reports to Voice attack for a few couple of scripts I'm trying to write.

I basically want to keep a log (txt file) of my CMDRs I have killed and who as killed me. (Planning a friendly PvP event this weekend.)

((EDDI Killed)) & ((EDDI Died)) I'll be using but for the ((EDDI Died)) there doesn't seem to be any voice attack variables in the wiki. I could guess but is there a way to find out what variables EDDI reports that Voice attack can pick up?

((EDDI Killed))

{TXT:EDDI killed rating} The combat rating of the player killed
{TXT:EDDI killed victim} The name of the player killed

((EDDI Died))

*from the wiki*
commanders The names of the commanders who killed you
- ships The ships the commanders who killed you were flying
- ratings The ratings of the commanders who killed you


{TXT:EDDI died commanders} *I'm guessing*
{TXT:EDDI died ships} *I'm guessing*
{TXT:EDDI died ratings}*I'm guessing*
 
Bazslaz, most to of the scripts here are EDDI speech responder scripts. Using the example of my body scanned script that you posted, to use this script, you would replace the contents in the EDDI body scanned speech responder script. To edit an EDDI script, first you need to make a custom profile, then you will be able to edit the scripts.
 
Hi Cynor,

If I understand your example right ...
Yup, pretty much spot on! :)

Code:
Set Text [system_list] to [C:\\Elite\systems_list.txt]
Set Text [State variable] to 'system_list'
Set int [system_counter] value to 0
Set int [State variable] to 'system_counter'
Execute external plugin, 'EDDI 2.3.0'

Code:
{set position to state.system_counter}
{set systems to split(state.system_list, "+=")}
{set system to systems[position]}
{set current to state.eddi_context_system_system}    

{if system = current:
   {set system to systems[position + 1]}
   (Unsure as to what code to use here, but something to add 1 to the system_counter state...)
}
Close, very close, but not quite right. In VA you need to call the plugin after each [State variable] line as it can only handle one at a time, otherwise you are basically overwriting what the plugin looks for when it is called.

For the last part of the code, you could make it a little more efficient like this:
Code:
{if system = current:
   {SetState('system_counter', position +1)}
   {set system to systems[state.systems_counter]}
}



My big issue/question now is running it. Although I could constantly have it running on the "Jumped" event somehow, and then grab system name as needed to paste to galaxy map, I feel like that is a waste since I don't always need it active
EDDI will always call the Jumped event, and if you have the above code in it, it's not exactly 'constantly running'. Those few lines of code will not make an impact on performance, and if system doesn't equal current, then it's going to skip executing the rest anyway.

I'm not 100% sure on the [EDDI state system] thing here due to the what was said about storing stuff between events, however since this would be added in the same VA command as the one running the script to compare systems I don't think it'd be too much issue. At worse I just add a new state variable in the startup script though. But all in all this would leave two simple voice attack commands that would startup the routing, reset the list to begin from the start, and then on command paste the next system into the galaxy map for me.

Your code looks fine for the [EDDI state system] part. The 'state system' variable is available to anything EDDI (and VA) does while VA is still running.

You can use a similar method of storing variables to a file for the 'systems_counter' number too.

Also, I kinda already have all the functionality you are asking about in a little part of my Darkcyde Personality. A few weeks ago, Brigetiol1 asked me to come up with a solution to read a quote randomly from a list of about 20-30, and speak it at game load, but never repeating the same one twice until all of them had been used. OK, mine chooses one at random, but the list, saving between sessions and the basic methodology is almost exactly what you are looking for. To make it work, I simply added a special character to the end of each used quote, and when checking for a random one, if the character was present, it would choose another, and so on until it could find no other unused quotes, at which point it would reset them all and start again. I think this can be easily adapted to your requirements. If you want to try doing it yourself, just download my personality (link in my sig) and look for TextWisdom and TextRandomChoice in EDDI, and 'Quote of the day' in VA. Or I can come up with the code for you, if you like. :D




 
Right then folks I'm looking for the variables in that EDDI reports to Voice attack for a few couple of scripts I'm trying to write.

I basically want to keep a log (txt file) of my CMDRs I have killed and who as killed me. (Planning a friendly PvP event this weekend.)

((EDDI Killed)) & ((EDDI Died)) I'll be using but for the ((EDDI Died)) there doesn't seem to be any voice attack variables in the wiki. I could guess but is there a way to find out what variables EDDI reports that Voice attack can pick up?

((EDDI Killed))

{TXT:EDDI killed rating} The combat rating of the player killed
{TXT:EDDI killed victim} The name of the player killed

((EDDI Died))




{TXT:EDDI died commanders} *I'm guessing*
{TXT:EDDI died ships} *I'm guessing*
{TXT:EDDI died ratings}*I'm guessing*

Looking at the wiki, I would say you are correct in your assumptions. It looks like there was supposed to be a part explaining the VA versions of the variables, but it's just not filled in. So either they are in EDDI and the wiki wasn't updated, or they never made it in and the line about VA wasn't removed. I'd say write your scripts, and jump into CQC quickly and see if it works when you get killed, or buy a disposable Sidey, go to a neutral system and have a friend kill you. That should definitely tell you if they work or not.
 
Looking at the wiki, I would say you are correct in your assumptions. It looks like there was supposed to be a part explaining the VA versions of the variables, but it's just not filled in. So either they are in EDDI and the wiki wasn't updated, or they never made it in and the line about VA wasn't removed. I'd say write your scripts, and jump into CQC quickly and see if it works when you get killed, or buy a disposable Sidey, go to a neutral system and have a friend kill you. That should definitely tell you if they work or not.

My guess is that because the event object are arrays of 'Commanders', 'ships', and 'ratings', the EDDI speech responder data does NOT have EDDI Voice Attack equivalents... there's no pretty way to translate arrays to Voice Attack.

In order to keep statistics, it will have to be done in 'speech responder space', with data persisting via Darkcyde's methodology used for Missions and Fines & Bounties.

Definitely doable.
 
Last edited:
So here is what I'm coming up with right now thanks to all the help...

This bit runs on a voice attack command to startup the routing plan
Code:
Set Text [system_list] to [C:\\systems_list.txt]
Set Text [State variable] to 'system_list'
Execute external plugin, 'EDDI 2.3.0' and wait for return

Set int [system_counter] value to 0
Set int [State variable] to 'system_counter'           ((Technically this reads as "set int [State Variable] value to the value of [system_counter]" as I can't find anything else closer to it)) 
Execute external plugin, 'EDDI 2.3.0' and wait for return

This I put inside the Jumped script in my own personality (I'll feel silly if this isn't how I was supposed to it...)
Code:
{set position to state.system_counter}
{set systems to split(state.system_list, "+=")}
{set target_system to systems[position]}
{set current to state.eddi_context_system_system}    

{if system = current:
   {SetState('system_counter', position +1)}
   {set target_system to systems[state.systems_counter]}
}


And this final (very simplified) bit as voice attack command to test that everything is working
Code:
Begin Text Compare : [EDDI state target_system] Does Not Equal ''
    Set Text [destination] to [EDDI state target_system]
    Execute external plugin, 'EDDI 2.3.0' and wait for return


    Quick Input, '{TXT:destination}'
    Press Enter key and hold for 0.03 seconds and release

End Condition


Finally I made a systems_list.txt that reads

HIP 11728+=HIP 10510+=HIP 6796


However whenever I jump to a new system nothing seems to work. I jump to a random system, which should at least cause the jumped script to run the compare and nab the first system from the systems_list.txt, and run my test voice attack command... Nothing gets pasted. I jump to the first system on the list and run my test command... Same thing, nothing is pasted. I can't help but feel like I'm missing something pretty crucial yet super simple here, since everything seems like it should work to at least paste the first system in the list whenever I ask it to (assuming that I've jumped to a new system)
 
My guess is that because the event object are arrays of 'Commanders', 'ships', and 'ratings', the EDDI speech responder data does NOT have EDDI Voice Attack equivalents... there's no pretty way to translate arrays to Voice Attack.

In order to keep statistics, it will have to be done in 'speech responder space', with data persisting via Darkcyde's methodology used for Missions and Fines & Bounties.

Definitely doable.

Ahh, yes, you are right. I even noticed that there is an 's' on the end of them and thought 'they sound like arrays'. But as I've not got a lot of VA experience, it didn't cross my mind that VA may not be able to handle them. Sorry, that's my bad.

As you say though, it will be easy to do 'in EDDI space'. :)
 
I am absoulty not a programmer; code makes my head hurt. I've copied liberaly from this thread and the EDDI thread to piece togeter the pieces.
I see a lot of great scripts, but as a new player I am not sure where I cut and paste this code so that it works. In looking at VA if I press New Command I do not know what option to press to paste this into. There are so many great scripts on this forum but not much in way of helping noobs know what to do with them or how to use them.. Maybe someone could post a short walk through on how to use a script on here?


I'm with you...

just wish those who find running 20km to the airport to Pilot a plane to go skiing down slopes, after surfing or playing chess ( in their mind ) while cooking & riding a horse, can understand some of us have different skill sets .....AND DON'T WANT TO LEARN CODE TOO ! :D

Has to be a better way of getting 'the coders work' off this page and into a coherent format , others can understand & adapt


Bazslaz, most to of the scripts here are EDDI speech responder scripts. Using the example of my body scanned script that you posted, to use this script, you would replace the contents in the EDDI body scanned speech responder script. To edit an EDDI script, first you need to make a custom profile, then you will be able to edit the scripts.


Can you upload the 'finished' script here , http://snafets.de/elite/eddi_scripts/index.php
 
Last edited:
In the speech responder, how would you use a if statement to check if a variable contains specific text?

For example:

if mission.name contains "passenger"
 
In the speech responder, how would you use a if statement to check if a variable contains specific text?

For example:

if mission.name contains "passenger"

Code:
{if find(mission.name, "passenger") > -1:

}


From the Cottle documentation:

find(value, token[, start])

Find the 0-based index of given token in a map, or sub-string in a string. Search starts at index 0 unless start argument is specified.


Additionally, Find() will return -1 if the 'token' is not found. And FTR, 'map' is the Cottle documentation's way of saying 'array'.


I love find(). I will use find() to shortcut traversing an array to find multiple instances. For example, instead of:

Code:
{set cur to 0}
{while cur < len(array):
    {if array[cur] = test_value:
        .
        .
    }
    {set cur to cur + 1}
}


I will use:

Code:
{set pos to find(array, test_value}
{while pos > -1:
    .
    .
    {set pos to find(array, test_value, pos + 1)}
}
 
Last edited:
Thank you! I read the cottle documentation over and over but couldn't figure out what value,token and start meant.



You are quite welcome. Find() is very powerful, as is all of Cottle.

Cottle and its functions have a bit of a steep learning curve, but once you've mastered it, you can do amazing things with it.
 
Last edited:
Hi and welcome here Bazslaz,

in VA, you can't copy-paste full command scripts, you have to enter them manually, or import from a *.vap file, like the one what Darkcyde has in his Dropbox folder. There is an option to import a full profile (basically adding a full profile), and when editing your profile, you can import separate commands from an another already 'imported' full profile.

In EDDI, first I would suggest to choose a profile for basis, you can use the default EDDI profile, or choose a custom full profile. I use Darkcyde's profile as basis. Then, if you'd like to edit a script for example for 'Jumped' event, then in EDDI, go to the Speech responder tab, look for the Jumped event, Edit, voila, there is the script for editing. You can copy-paste here the scripts available here. Be careful, there might be some variables (set with 'SetState'), which might be used in another events, so don't delete those lines, if you edit the script.

I would suggest to start with something simple, try to understand the existing scripts, the usage of the variables.

If you have EDDI and VA running, VA starts EDDI automatically, you don't have to start EDDI additionally. If you import the EDDI.vap into VA, there is a voice command 'configure EDDI' to open the EDDI window.

A few links for EDDI programming:

https://r3c.github.io/cottle/

https://github.com/cmdrmcdonald/EliteDangerousDataProvider/wiki

http://snafets.de/elite/eddi_scripts/index.php?

One to keep you calm, while editing scripts :) :

http://www.costadelmar-radio.com/

Best regards!



Thanks for the help, this was very helpful information and will help a lot of noobs. Do you have a link to the Darkcyde profile you mention above as a starting point
 
Back
Top Bottom