Yeah i found it since and made what i wanted thank you.[up]
{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")}
{for body in system.bodies:
{if body.name = event.body:
the
{if body.gravity >= 4:
{OneOf("super-high gravity", "super heavy gravity", "extreme gravity", "extremely high gravity")}
|elif body.gravity >= 2:
high gravity
|elif body.gravity > 0.5:
{_ do nothing _}
|elif body.gravity <= 0.5:
low gravity
}
}
}
For some reason and its driving me insane but whenever I drop near a planet after orbital cruise and glide it always states "extremely high gravity" no matter what even if the planet has 0.06 gravity. Can anyone figure this out?
This is for the "Entered normal space" script
{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 = "":
Planetary approach data not available.
|else:
{if body.landable:
{set gravity to round(body.gravity,2)}
{if gravity > 4:
Danger! {P(body.name)} is an extremely high gravity world, at {gravity} G.
|elif gravity > 2:
Caution! {P(body.name)} is a high gravity world, at {gravity} G.
|elif gravity > 0.5:
Warning! {P(body.name)} is a medium gravity world, at {gravity} G.
|else:
{P(body.name)} is a low gravity world, at {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)}
|elif event.bodytype = 'PlanetaryRing':
Planetary Ring {P(token(event.body," Ring",0))}
}.
Some voices respect the speech tags that EDDI uses more than others. You might find that using a different voice or re-enabling phonetic speech (which removes speech tags if it's disabled) may help with this issue.Two questions, but I'll ask the 2nd in it's own post.
1) This pertains to EDDI only. I'm using the stock docking report script save a change to the wait time - mine is set to 25000 to give enough time for the station to finish their speech. However EDDI just can't wait, she [EDDI] talks over the station the second the docking request granted to pad "X" is on screen. I've increased the wait time to 35000 with NO change.
What needs to be reset or changed to make this work again? This is a recent development.
Sweet, thank you very much. I'll give this a try when I get off work.Without diving too deeply, using a 'for loop', iterating through the system bodies is not the way to go. 'BodyDetails()' is your friend. This is my 'Entered normal space' script:
Code:{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 = "": Planetary approach data not available. |else: {if body.landable: {set gravity to round(body.gravity,2)} {if gravity > 4: Danger! {P(body.name)} is an extremely high gravity world, at {gravity} G. |elif gravity > 2: Caution! {P(body.name)} is a high gravity world, at {gravity} G. |elif gravity > 0.5: Warning! {P(body.name)} is a medium gravity world, at {gravity} G. |else: {P(body.name)} is a low gravity world, at {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)} |elif event.bodytype = 'PlanetaryRing': Planetary Ring {P(token(event.body," Ring",0))} }.
There are numerous specialized functions for getting access to systems, bodies, stations, materials, etc. Check out the 'Help' button when editing a personality script.
Some voices respect the speech tags that EDDI uses more than others. .... may help with this issue.
{_ Context }
{SetState("eddi_context_last_subject", "fsd")}
{SetState("eddi_context_last_action", "disengage")}
{SetState('eddi_context_system_name', event.system)}
{SetState('eddi_context_body_name', event.body)}
{SetState('eddi_context_body_system', event.system)}
{SetState("type", event.bodytype)}
{SetState("body", event.body)}
{if state.eddi_context_interdicted != "yes":
{Pause(1000)}
{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 = "":
Planetary approach data not available.
|else:
{if body.landable:
{set gravity to round(body.gravity,2)}
{if gravity > 4:
Danger! Extremely high gravity detected, at {gravity} G.
|elif gravity > 2:
Caution! High gravity detected, at {gravity} G.
|elif gravity > 1:
Warning! Medium gravity detected, at {gravity} G's.
|else:
Low gravity detected, at {gravity} G's.
}
}
}
|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)}
{Pause(1000)}
{F("Cargo legality check")}
{F("MissionStoreCheckStation")}
|elif event.bodytype = "PlanetaryRing":
Planetary Ring {P(token(event.body," Ring",0))}
}
}
{SetState("eddi_context_interdicted", "no")}
Everything works fine I just want her to say either the shorter name of the planet or just the planet type "high-metal content world" etc... I've tried everything I can think of but cannot get it to work. Thanks in advance,
'Body scanned' leaves naming the body in question to 'Body report', which no longer repeats the base system name if it doesn't have to.
Not at my dev machine right now but in 2.4.6-b2 I made a change that should help you. From the change log:
Hope this helps, or at least gives you some code to steal from.
{_ Fetch from context }
{set reportbody to BodyDetails(state.eddi_context_body_name, state.eddi_context_body_system)}
{if !reportbody.name || reportbody.name = "": {set reportbody to BodyDetails(state.eddi_context_body_name)} }
{if !reportbody.name || reportbody.name = "":
I'm not sure which body you are asking about.
|else:
{set shortBodyName to reportbody.name}
{set systemName to state.eddi_context_body_system}
{set sysNameLen to len(systemName)}
{if len(shortBodyName) > sysNameLen && eq(systemName, slice(shortBodyName, 0, sysNameLen)):
{set shortBodyName to cat("Body", Spacialise(slice(shortBodyName, sysNameLen)))}
}
{shortBodyName}
}
Yes, you can use the SetState function to set up a script that totals up estimated scan values and reports them to you.Now on to my next question. Is there a way to make a script where it will add up the values of the bodies you scanned and it will report to you the total value of credits you earned when you leave that system? Like when you high wake out if you scanned any bodies with a DSS it will give you total credits earned like "Total earned from scanned bodies: 400,000 credits". I think this will be greatly beneficial to explorers if so.
I actually made a separate script that I borrowed from another script that shortens the body name. Some reason when I tried to use the code within any script that I wanted it to just say the short body name it wouldn't work. But now since I made it separate and just call on the script {F("Short body name")} whenever I want it to say the short name it works perfectly. Here is the script,
Code:{_ Fetch from context } {set reportbody to BodyDetails(state.eddi_context_body_name, state.eddi_context_body_system)} {if !reportbody.name || reportbody.name = "": {set reportbody to BodyDetails(state.eddi_context_body_name)} } {if !reportbody.name || reportbody.name = "": I'm not sure which body you are asking about. |else: {set shortBodyName to reportbody.name} {set systemName to state.eddi_context_body_system} {set sysNameLen to len(systemName)} {if len(shortBodyName) > sysNameLen && eq(systemName, slice(shortBodyName, 0, sysNameLen)): {set shortBodyName to cat("Body", Spacialise(slice(shortBodyName, sysNameLen)))} } {shortBodyName} }
Definitely makes it explorer friendly
Yes, you can use the SetState function to set up a script that totals up estimated scan values and reports them to you.
https://github.com/EDCD/EDDI/blob/master/SpeechResponder/Help.md#setstate
The example in the link from the wiki is almost exactly what you need. By clicking on the `Variables` button in the `Body scanned` script, you can learn that variable you need to accumulate is called `event.estimatedvalue`. You would accumulate it exactly like the linked wiki describes.Awesome. However I have no idea what I'm doing when it comes to scripting, could someone point me in the right direction or help me create this script? I've just been copying and pasting other scripts and seeing what works through trial and error.
{SetState("systemvalue", state.systemvalue + event.estimatedvalue)}
{state.systemvalue}
That data comes from this repo: https://github.com/EDCD/EDDP (there are no guarantees that the data, or it's source, will not be changing in the future)well!i need some help whit EDDI.
the variable called {material.location} im looking for a documentation for it so i can call out something else instead how it is reporting to me.Someone enlight me where can i do that or should i have to get all data materials one by one and check what will be the output...Thank you guys.
There is no error here. The default script only speaks when you have less than 4 insurance rebuys remaining.Hi guys!
i`ve updated EDDI to v 3.0.1-b1.Since that update the "Insurace Check" script is silent.Im not sure it is just me or someone else as well however even the Basic EDDI personality script also silent,anyway here is "my" script.
{if cmdr.credits && cmdr.insurance && ship.value:
{set insurance to round(ship.value * cmdr.insurance / 100)}
{set covereds to round((cmdr.credits / insurance) - 0.5)}
{if covereds = 0:
figyelem: {Pause(500)} Nincs elég kredited egyetlen egy ribájra sem.
|elif covereds = 1:
figyelem: {Pause(500)} Csak egy ribájra van elegendő kredited
|elif covereds < 4:
Összesen {covereds} ribájra van elegendő kredited.
}
|else:
Nem tudom kiszámítani jelenleg,hány ribájra van elegendő {OneOf("kreditünk","kredited","kreditje")}.
{if !cmdr.credits: Credit balance could not be accessed.}
{if !cmdr.insurance: Insurance rate could not be accessed.}
{if !ship.value: Ship value could not be accessed.}
}
{set insurance to round(ship.value * cmdr.insurance / 100)}
{set covereds to round((cmdr.credits / insurance) - 0.5)}
{if covereds = 0:
Danger: you do not have enough credits to cover your insurance excess.
|elif covereds = 1:
Caution: you only have enough credits to cover a single insurance excess.
|elif covereds < 4:
Note: you only have enough credits to cover {covereds} insurance excesses.
|else:
{Occasionally(5, "You have enough credits to cover {covereds} insurance excesses.")}
}
{_ 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)}
{SetState('eddi_context_last_scan_estimated_value', event.estimatedvalue)}
[B]{SetState("systemvalue", state.systemvalue + event.estimatedvalue)}[/B]
{Pause(1000)}
Scan {OneOf("complete", "completed", "finished")}.
{F("Body report")}
{F("Report last scan value")}
{_ Context }
{SetState('eddi_context_last_subject', 'star')}
{SetState('eddi_context_last_action', 'scan')}
{SetState('eddi_context_star_system', system.name)}
{SetState('eddi_context_star_star', event.name)}
{SetState('eddi_context_last_scan_estimated_value', event.estimatedvalue)}
[B]{SetState("systemvalue", state.systemvalue + event.estimatedvalue)}[/B]
{Pause(1000)}
Scan of {event.stellarclass}-class star {OneOf("complete", "completed", "finished")}.
{F("Star report")}
{F("Report last scan value")}
{_ Context }
{SetState('eddi_context_last_subject', 'fsd')}
{SetState('eddi_context_last_action', 'engage')}
{SetState('eddi_context_system_name', event.system)}
{SetState('eddi_context_system_system', event.system)}
{SetState('eddi_context_fsd_target', event.target)}
{if event.target = 'Hyperspace':
{_ Rewrite context to represent a jump }
{SetState('eddi_context_last_subject', 'jump')}
{SetState('eddi_context_last_action', 'start')}
{set system to SystemDetails(event.system)}
{_ Wait for the FSD countdown and initial jump}
{Pause(5000)}
{OneOf("Destination locked","Jump in progress","Destination obtained")}.
[B] {if state.systemvalue = 0:[/B]
[B] {Pause(10)}[/B]
[B] |elif state.systemvalue > 1:[/B]
[B] The last system scanned value {Humanise(state.systemvalue)} credits.[/B]
[B] }[/B]
You are now {OneOf("heading to", "on route to", "travelling to", "in transit to")} the {P(system.name)} system.
{_ Context }
{SetState('eddi_context_last_subject', 'jump')}
{SetState('eddi_context_last_action', 'complete')}
{SetState('eddi_context_system_name', system.name)}
{SetState('eddi_context_system_system', system.name)}
{SetState('eddi_context_ship_fuelremaining', event.fuelremaining)}
{SetState('eddi_context_ship_fuelused', event.fuelused)}
[B]{SetState("systemvalue", state.systemvalue = 0)}[/B]
{_ Check fuel levels _}
{F("JumpFuel")}
{_ Report system state _}
{set statereport to F("System state report")}
{if statereport:
{Pause(2000)}
{statereport}
}