Release EDDI - Windows app for immersion and more

Status
Thread Closed: Not open for further replies.
I tested out the code I wrote above. The Entered normal space event fires when you enter glide, But the {if event.body.gravity > 1: always evaluates as true, but there doesn't seem to be any gravity information when it goes to tell you what the gravity is. Going to have to work on it a bit.

I just can't get this to work. If there were a PlanetDetails function, it would be possible, but absent that, this just doesn't work.
 
Last edited:
I tested out the code I wrote above. The Entered normal space event fires when you enter glide, But the {if event.body.gravity > 1: always evaluates as true, but there doesn't seem to be any gravity information when it goes to tell you what the gravity is. Going to have to work on it a bit.

I just can't get this to work. If there were a PlanetDetails function, it would be possible, but absent that, this just doesn't work.

As far as I know gravity is not part of the event but interesting to see that if statements can cause "unexpected" behavior with unset variables.

Here is jgm's response and below the post are some stubs that might help you.

This is possible if the planet is in EDDB. You'd have to look at system.bodies to find a matching planet, then read the gravity from there.
 
As far as I know gravity is not part of the event but interesting to see that if statements can cause "unexpected" behavior with unset variables.

Here is jgm's response and below the post are some stubs that might help you.

2.1.1(-beta) also has a BodyDetails() function you can use to fetch it directly.
 
2.1.1(-beta) also has a BodyDetails() function you can use to fetch it directly.

Yup. Here's my take at the modified code, including a check for whether the planet is landable, otherwise who cares what the gravity is, right? ;-)

Code:
{Pause(5000)}

{OneOf("{ShipName()} has", "")} {OneOf("left supercruise", "{OneOf(\"entered\", \"returned to\", \"dropped to\")} normal space")}

{if event.bodytype = 'Planet':
    {OneOf("near", "close to", "in the vicinity of")} planet {P(event.body)}
    {set body to BodyDetails(event.body)}
    {if body.landable && body.gravity > 1:
        Caution: {P(event.body)} is a high gravity world, at {body.gravity} G.

    }

|elif event.bodytype = 'Star':
    {OneOf("near", "close to", "in the vicinity of")} star {P(event.body)}
|elif event.bodytype = 'Station':
    {OneOf("near", "close to", "in the vicinity of")} {P(event.body)}
}.
 
Last edited:
Yup. Here's my take at the modified code, including a check for whether the planet is landable, otherwise who cares what the gravity is, right? ;-)

Code:
{Pause(5000)}

{OneOf("{ShipName()} has", "")} {OneOf("left supercruise", "{OneOf(\"entered\", \"returned to\", \"dropped to\")} normal space")}

{if event.bodytype = 'Planet':
    {OneOf("near", "close to", "in the vicinity of")} planet {P(event.body)}
    {set body to BodyDetails(event.body)}
    {if body.landable && body.gravity > 1:
        Caution: {P(event.body)} is a high gravity world, at {body.gravity} G.

    }

|elif event.bodytype = 'Star':
    {OneOf("near", "close to", "in the vicinity of")} star {P(event.body)}
|elif event.bodytype = 'Station':
    {OneOf("near", "close to", "in the vicinity of")} {P(event.body)}
}.

When I add this to your code I get nothing for gravity

Code:
|else
        {P(event.body)}'s gravity is {body.gravity} G.
 
Where you added it could be a contributor, but right off the bat, I'd say your problem is you have "|else" when it should be "|else:"

I think it said everything below the |else except for the actual gravity value. I've corrected it to |else: and am going to test it now. I'll update this post when I'm done with the test.

Edit: Nope. Even with the |else: it did the same thing. "Planet's gravity is G". The gravity value isn't being set.

As for it being in the wrong place, below is my Entered normal space script

Code:
{Pause(5000)}

{OneOf("{ShipName()} has", "")} {OneOf("left supercruise", "{OneOf(\"entered\", \"returned to\", \"dropped to\")} normal space")}

{if event.bodytype = 'Planet':
    {OneOf("near", "close to", "in the vicinity of")} planet {P(event.body)}
    {set body to BodyDetails(event.body)}
    {if body.landable && body.gravity > 1:
        Caution: {P(event.body)} is a high gravity world, at {body.gravity} G.
    |else:
        {P(event.body)}'s gravity is {body.gravity} G.
    }

|elif event.bodytype = 'Star':
    {OneOf("near", "close to", "in the vicinity of")} star {P(event.body)}
|elif event.bodytype = 'Station':
    {OneOf("near", "close to", "in the vicinity of")} {P(event.body)}
}.

For all I know, this doesn't work on high gravity planets either. I've not tried as I've not found one with a gravity greater than 1, but it only makes sense. Unless you can find some flaw with the code.
 
Last edited:
I think it said everything below the |else except for the actual gravity value. I've corrected it to |else: and am going to test it now. I'll update this post when I'm done with the test.

Edit: Nope. Even with the |else: it did the same thing. "Planet's gravity is G". The gravity value isn't being set.

As for it being in the wrong place, below is my Entered normal space script

Code:
{Pause(5000)}

{OneOf("{ShipName()} has", "")} {OneOf("left supercruise", "{OneOf(\"entered\", \"returned to\", \"dropped to\")} normal space")}

{if event.bodytype = 'Planet':
    {OneOf("near", "close to", "in the vicinity of")} planet {P(event.body)}
    {set body to BodyDetails(event.body)}
    {if body.landable && body.gravity > 1:
        Caution: {P(event.body)} is a high gravity world, at {body.gravity} G.
    |else:
        {P(event.body)}'s gravity is {body.gravity} G.
    }

|elif event.bodytype = 'Star':
    {OneOf("near", "close to", "in the vicinity of")} star {P(event.body)}
|elif event.bodytype = 'Station':
    {OneOf("near", "close to", "in the vicinity of")} {P(event.body)}
}.

For all I know, this doesn't work on high gravity planets either. I've not tried as I've not found one with a gravity greater than 1, but it only makes sense. Unless you can find some flaw with the code.

It should work, but it's doesn't. Best I can determine, BodyDetails() is broken, as it will not accept event.body as a body name. I even tried {set body to BodyDetails(event.body, event.system)}... nothing.
 
Last edited:
This doesn't work either...

Code:
{for body in system.bodies:
    {if body.name = event.body:
        {if body.landable:
            {if body.gravity > 1:
                Caution: {P(event.body)} is a high gravity world, at {body.gravity} G.
            |else:
                The gravity of {P(event.body)} is {body.gravity} G.
            }
        }
    }
}

And I'm at a loss why it doesn't.

Even tried this...

Code:
{set sys to SystemDetails(event.system)}
{for body in sys.bodies:
    {if body.name = event.body:
        {if body.landable:
            {if body.gravity > 1:
                Caution: {P(event.body)} is a high gravity world, at {body.gravity} G.
            |else:
                The gravity of {P(event.body)} is {body.gravity} G.
            }
        }
    }
}

Nope.

'event.body' and 'event.system' are populated, nothing else is.

Wondering if there's a problem with the EDDI server?
 
Last edited:
jgm, when exporting shipyard loadouts to coriolis, things like cabins and the new mil. slots are empty.

I can't reproduce this. Please could you hit the 'Export to coriolis' button for a ship that shows this issue and then paste the URL as-is in the URL bar (should start with /import) here?
 
I'm pleased to announce the release of version 2.2.0 of EDDI. This introduces the idea of context and adds the EDDP responder, which allows you to listen to changes in the state of systems as they are discovered by other players.

You can obtain EDDI from https://www.mcdee.net/elite/EDDI.exe.

The full changelog is as follows:

  • Core
    • Fix issue where commander insurance % is not set internally
    • Add assisted upgrade for new versions of EDDI
    • Allow opt-in to beta versions of EDDI
    • Incorporate data from Body scanned and Star scanned events in to local database
    • Ensure that location script is always triggered on first login
    • Add CQC rating to commander
    • Fix issue where hull damage events were not always triggered
    • Add module definitions for Module Reinforcement Packages
    • Initial addition of EDDI context. Context attempts to keep track of what EDDI is talking about, to provide the possibility of two-way dialogue. Details about context can be found in the speech responder documentation
    • Station objects no longer have economy arrays, instead they just have a primaryeconomy item
    • Attempting to copy a personality over an existing personality will no longer succeed
  • Events
    • Add 'Mission failed' event
    • Add 'System faction changed' and 'System state changed' EDDP events
  • EDDP monitor
    • Add EDDP monitor. This monitor watches EDDP for state and ownership information about systems and generates events when changes are spotted. See the 'EDDP monitor' tab for more information
  • Speech Responder
    • Add 'View' button for all scripts
    • Add speech responder function 'BodyDetails' to obtain body details. Details of this function are in the SpeechResponder help documentation
    • Script changes:
    • 'Body report' - new script that uses context information to report on a body
    • 'Body scanned' - added context information. Call new function 'Body report' to provide body details
    • 'Bounty awarded' - added context information
    • 'Bounty incurred' - added context information
    • 'Cleared save' - added context information
    • 'Cockpit breached' - added context information
    • 'Combat promotion' - added context information
    • 'Commodity collected' - added context information
    • 'Commodity ejected' - added context information
    • 'Commodity refined' - added context information
    • 'Commodity sale check' - avoid overly-long response if there are lots of commodities that can be sold
    • 'Commodity sold' - added context information
    • 'Docked' - do not pause just to find out that there is no commodity/swapout/limpet check result
    • 'Docking granted' - added context information. Call new function 'Landing pad report' to provide pad details
    • 'Fine incurred' - added context information
    • 'Jumping' - added context information
    • 'Landing pad report' - use context information to report on a landing pad
    • 'Material collected' - added context information
    • 'Material discarded' - added context information
    • 'Material discovered' - added context information
    • 'Material donated' - added context information
    • 'Message received' - added context information
    • 'Message sent' - added context information
    • 'Repeat last speech' - new script that repeats the last speech
    • 'Star report' - new script that uses context information to report on a star
    • 'Star scanned' - added context information. Call new function 'Star report' to provide body details
    • 'System distance report' - use context information to report on the distance to a system
    • 'System faction changed' - new script triggered when there is a change in the controlling faction of a system
    • 'System report' - use context information to report on a system
    • 'System state changed' - new script triggered when there is a change in the controlling faction of a system
    • 'System state report' - use context information to report on the state of a system
    • 'Undocked' - do not pause just to find out that there is no limpet check result
  • VoiceAttack Responder
    • Ensure that state changes are picked up by VoiceAttack plugin immediately
    • Update VoiceAttack with context-related commands:
    • 'Please repeat that/What was that?/Could you say that again?/Say that again' - repeat EDDI's last scripted response
    • 'Remind me of that landing pad/Which landing pad was it?' - repeat the landing pad name and location when docking
    • 'Tell me about it/Tell me more' - provide more information about the last item EDDI mentioned
    • 'Tell me about the/that system' - provide more information about the last system EDDI mentioned
    • 'Tell me about the/that planet/body' - provide more information about the last body EDDI mentioned
    • 'Tell me about the/that star' - provide more information about the last star EDDI mentioned
    • 'How far is that system?' - provide a distance report for the last system EDDI mentioned
  • Misc
    • Send additional data to EDSM
 
Last edited:
QQ, RE the Speech Responder and the collection relative to beta 3, are there any changes? Mainly I have my custom based on b3, however, curious if there are any specific I should look for in the release version which diffs; or would it be best to simply create a new custom from the default in v2.2.0, and then overlay my customization?
 
Last edited:
jgm,

Would you have any insight why BodyDetails() is not producing the desired result in the script for 'Entered normal space' below?

Code:
{Pause(5000)}

{OneOf("{ShipName()} has", "")} {OneOf("left supercruise", "{OneOf(\"entered\", \"returned to\", \"dropped to\")} normal space")}

{if event.bodytype = 'Planet':
    {OneOf("near", "close to", "in the vicinity of")} planet {P(event.body)}.
    {set body to BodyDetails(event.body, event.system)}
    {Pause(1000)}
    {if body.landable:
        {if body.gravity > 1:
            Caution: {P(event.body)} is a high gravity world, at {body.gravity} G.
        |else:
            Gravity of {P(event.body)} at {body.gravity} G.
        }
    }

|elif event.bodytype = 'Star':
    {OneOf("near", "close to", "in the vicinity of")} star {P(event.body)}
|elif event.bodytype = 'Station':
    {OneOf("near", "close to", "in the vicinity of")} {P(event.body)}
}.

Both event.body and event.system appear to be valid, but getting nothing returned from BodyDetails(). That I can tell, my usage of BodyDetails() is no different from its application in 'Body report' or 'Star Report'.

Very perplexing.
 
Last edited:
jgm,

Would you have any insight why BodyDetails() is not producing the desired result in the script for 'Entered normal space' below?

Code:
{Pause(5000)}

{OneOf("{ShipName()} has", "")} {OneOf("left supercruise", "{OneOf(\"entered\", \"returned to\", \"dropped to\")} normal space")}

{if event.bodytype = 'Planet':
    {OneOf("near", "close to", "in the vicinity of")} planet {P(event.body)}.
    {set body to BodyDetails(event.body, event.system)}
    {Pause(1000)}
    {if body.landable:
        {if body.gravity > 1:
            Caution: {P(event.body)} is a high gravity world, at {body.gravity} G.
        |else:
            Gravity of {P(event.body)} at {body.gravity} G.
        }
    }

|elif event.bodytype = 'Star':
    {OneOf("near", "close to", "in the vicinity of")} star {P(event.body)}
|elif event.bodytype = 'Station':
    {OneOf("near", "close to", "in the vicinity of")} {P(event.body)}
}.

Both event.body and event.system appear to be valid, but getting nothing returned from BodyDetails(). That I can tell, my usage of BodyDetails() is no different from its application in 'Body report' or 'Star Report'.

Very perplexing.

Is it a known body? Which one are you trying it with?
 
Is it a known body? Which one are you trying it with?

That's a very good question.

First time I tried testing this script was on a planet in the 'George Pantazis' system, which (just checking now) eddb has no data on... so there you go. Duh!

OK, this is my latest version with 'known planet' checking.

Code:
{Pause(4000)}

{OneOf("{ShipName()} has", "")} {OneOf("left supercruise", "{OneOf(\"entered\", \"returned to\", \"dropped to\")} normal space")}

{if event.bodytype = 'Planet':
    {OneOf("near", "close to", "in the vicinity of")} planet {P(event.body)}.

    {Pause(1000)}
    {set body to BodyDetails(event.body, event.system)}
    {if !body.name || body.name = "":
        No data available on this planet, Commander.
    |else:
        {if body.landable:
            {if body.gravity > 4:
                Danger: {P(body.name)} is an extremely high gravity world, at {body.gravity} G.
            |elif body.gravity > 2:
                Caution: {P(body.name)} is a high gravity world, at {body.gravity} G.
            |elif body.gravity > 0.5:
                Warning: {P(body.name)} is a medium gravity world, at {body.gravity} G.
            |else:
                {P(body.name)} is a low gravity world, at {body.gravity} G.
            }
        }
    }

|elif event.bodytype = 'Star':
    {OneOf("near", "close to", "in the vicinity of")} star {P(event.body)}
|elif event.bodytype = 'Station':
    {OneOf("near", "close to", "in the vicinity of")} {P(event.body)}
}.

Now off to find a known planet to check it out! :p
 
Last edited:
Status
Thread Closed: Not open for further replies.
Back
Top Bottom