Hey all, I'll try and keep this short. I have a small test-script that I used to find out how VA, HCS and EDDI work together. This is the following script:
Code:
{if status.lights_on = "True":
Our lights are on.
|elif status.lights_on = "False":
Our lights are off.
|else:
Something weird is going on.
}
This script appeared to be working fine when I set it up. Now I am implementing the same sort of code for another script:
Both codes are deliberately overstated and both are pretty extensively tested in ED.
In the latter code, if I remove the hardpoints statements, the script works fine. But as it is: it does not work. Strangely, the previous script doesn't work anymore either. Stranger still: I have set up a VA-command that writes the {BOOL:.Status hardpoints deployed} (extra dot because :.S != :S) to my VA-log and there the value displays as set. Question 1: am I doing something wrong here?
I noticed the line in the Variables-document: "Information about your current status is available under the status object. Any values might be missing, depending on EDDI's configuration". Question 2: is that what is going on here, but why does my VA-log still show the value is set and what can I do about this?
I am sorry, that was a careless mistake on my part. The code wasn't a copy/paste, it was a fast type-out. The closing curly-bracket was in my code, otherwise the build-in test would have told me there was something wrong with the code. It did not. The compilation of the code was sound. The first code is a copy/paste and still isn't working either. No bracket-problems there. I will try again tomorrow.
However, I think something like my variable-call is wrong. For example: I first put my status.firegroup integer in "", like {if status.firegroup = "1": something}, which doesn't work. Without those it works fine. I tried this with the boolean, but that results in EDDI just reading both texts, regardless of the if-statements. I think it is something more like that.
Thanks for your reply, anyway. That could very well have been the problem.
However, I think something like my variable-call is wrong. For example: I first put my status.firegroup integer in "", like {if status.firegroup = "1": something}, which doesn't work. Without those it works fine. I tried this with the boolean, but that results in EDDI just reading both texts, regardless of the if-statements. I think it is something more like that.
Thanks for your reply, anyway. That could very well have been the problem.
•{INT:Status firegroup} an integer value indicating the ship's currently selected firegroup (this is a zero based count, so your first firegroup will be '0')
Thanks you, Joshua, but that problem I already solved.
I decided to show you all my whole process, in hopes that it shows what the problem is and is not: https://photos.app.goo.gl/fsWQgdd6r7FYUo763
I am aware that this problem can be solved another way, but I just want to understand what is going wrong here, so that it's not something that will keep biting me in the.... butt.
Here is the code, so you can try it yourself if you want. Should work just fine (or more probable: totally fail) if you test it while ED is running:
Code:
{if status.hardpoints_deployed = "True":
Target scanners equipped and
|elif status.hardpoints_deployed = "False":
Target scanners selected and
|else:
Hardpoint information missing and
}
{if status.lights_on = "True":
lights are on.
|elif status.lights_on = "False":
lights are off.
|else:
lights settings unknown.
}
Sorry for the double post. @admin: you can paste this into and under the previous post if you want.
I figured it out. I thought I'd tried everything, but clearly I didn't. I tried everything with the values capitalized, not without capitalized letters. This is the working script:
Code:
{if status.hardpoints_deployed = true:
Target scanners equipped and
|elif status.hardpoints_deployed = false:
Target scanners selected and
|else:
Hardpoint information missing and
}
{if status.lights_on = true:
lights are on.
|elif status.lights_on = false:
lights are off.
|else:
lights settings unknown.
}
If you're using the latest release candidate, you can use the CommodityMarketDetails() function to obtain information on a commodities average price.
CommodityMarketDetails()
This function will provide full information for a commodity, including information that is specific to a market, given the commodity name.
CommodityMarketDetails() takes one mandatory argument and two optional arguments.
The first argument, the name of the commodity for which you want more information, is mandatory.
The second argument, the name of the station to reference for market data, is optional. If not given then EDDI will default to the current station (if the current station is not set and no station is specified then this shall return empty).
The third argument, the name of the system to reference for market data, is optional. If not given then EDDI will default to the current star system (if the specified station cannot be found within the current star system then EDDI shall return empty).
Common usage of this is to provide further information about a commodity, for example:
{set marketcommodity to CommodityStationDetails("Pesticides", "Chelbin Service Station", "Wolf 397")} {marketcommodity.name} is selling for {marketcommodity.sellprice} with a current market demand of {marketcommodity.demand} units.
That said, the average commodity price has traditionally been hardcoded. We have an open ticket to obtain more up-to-date, dynamic values.
There is any event (or variables) I can use to get information about a planet (type of reserves, the materials I will find there, etc) when/after I land on it?
I know there is an event after we scan a planet. But that wouldn't be useful if said planet was already scanned or I have the whole system's info by means of a nav beacon, right?
Nav Beacon Scan event, and the subsequent Star scanned and Body scanned events
Hi guys,
I have found an issue with my EDDI and VA profiles and I was hoping for some advice.
Background:
For those (like me) that didn't know, when you scan a Nav Beacon (triggering the "Nav Beacon Scan" event in EDDI) the journal also creates an entry for every Star and Body in the system, as if you just scanned every body in the system simultaneously.
EDDI blocks the speech responder from triggering for every body in the event a Nav Beacon is scanned. That is to say, if the system has 42 bodies you won't hear the "Body scanned" event trigger 42 times in a row.... unless your'e me. Which is exactly the problem I need help with, because trust me it's a bit like psychological torture waiting it out, just floating in space because you can't initiate supercruise using voice until it's finished, having the same thing repeated over and over again. [ugh]
The Problem: When I scan a Nav Beacon, I hear a "Star scanned" and "Body scanned" event for every single body in the system.
The problem arises because of Voice Attack scripts I wrote called ((EDDI Star scanned)) and ((EDDI Body scanned)), which work more or less identically, like this:
Voice attack script called ((EDDI Star scanned)):
EDDI triggers the event called "Star scanned" and it plays out -> VA triggers an EDDI event that I made called rs_scan_star (which simply generates random speech options saying the star has been scanned) eg. "I am compiling the data from the {OneOf('Scan','Analysis','Review','Survey')} of this {reportbody.stellarclass}-class star now"
->Asks me if I want further information about the star (via a separate EDDI random speech event rs_request_report_star) -- then wait 8 seconds
-- If I say "YES" within 8 seconds -> The EDDI event called "Star report" is triggered.
-- If "No" -> give a verbal acknowledgment
-- If don't say anthing -> the timer expires, then saying yes or no will have no effect.
The same goes for my ((EDDI Body scanned)) script in VA.
I wrote this because when I'm flying around scanning individual bodies with a detailed surface scanner I might not want a full report generated from scanning every body, especially if it's just another small icy or rocky body. Investigation:
So I now know that Voice Attack is the culprit for creating 40+ instances of the "Scan of star complete" being spoken out (or at least my VA script is the culprit)
I removed my own created EDDI events that generated the random speech for scanning a star and body, and pasted it in the main "Star scanned" and "Body scanned" events. This meant that VA no longer triggered that part of the speech, instead EDDI did)
and I left the request for further info to still be generated via VA script called ((EDDI Star scanned)).
When I scanned the Nav Data point in game I no longer heard 40x repetitions of both "star scanned" and "body scanned" . But I did still hear "would you like more information about this star/body", repeated over and over again. Solution:
I tried creating a VA script called ((EDDI Nav beacon scan)) with a command to stop all queued speech in EDDI after 8 seconds (enough time for her to still tell me the scan is complete) using the activate external plugin - shutup command. I thought this would simply erase all the VA generated Body and Star scanned lines of speech waiting to come at me in one hit.
What I've found is that the Voice Attack log shows the event "External plugin: Body scanned" (something like that, maybe not verbatim) trickle feeding in, one every few seconds, well after my command to cancel all speech has triggered.
Does anyone know of a better way of handling this problem.
My scripts:
Here are my scripts to help out, or for anyone interested in a similar idea NOTE: Not working as intended in current form
EDDI - Star scanned event -changed to give more random speech options, and also to not automatically trigger the Star Report event in EDDI
Code:
{_ 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)}
{if event.estimatedvalue:
{SetState("eddi_context_system_value", state.eddi_context_system_value + event.estimatedvalue)}
{SetState("eddi_context_session_scan_value", state.eddi_context_session_scan_value + event.estimatedvalue)}
}
{Pause(1000)}
{OneOf(
"{OneOf('Scan','Analysis','Review','Survey')} of
{if reportbody.stellarclass:
{reportbody.stellarclass}-class
}
star
{OneOf('complete', 'completed')}",
"{if reportbody.stellarclass:
{reportbody.stellarclass}-class
}
star
{OneOf('Scan','Analysis','Review','Survey')}
{OneOf('complete', 'completed')}"
"The {OneOf('Scan','Analysis','Review','Survey')} of this
{if reportbody.stellarclass:
{reportbody.stellarclass}-class
}
star
{OneOf('is complete', 'was successful')}",
"We have successfully completed the
{OneOf('Scan','Analysis','Review','Survey')} of this
{if reportbody.stellarclass:
{reportbody.stellarclass}-class
}
star ",
"We have {Occasionally(2, 'successfully')}
{OneOf('Scanned','Analysed','Reviewed','Surveyed')} this
{if reportbody.stellarclass:
{reportbody.stellarclass}-class
}
star {OneOf('Sir', 'Commander', 'Captain', '')} ",
"I am compiling the data from the {OneOf('Scan','Analysis','Review','Survey')} of this
{if reportbody.stellarclass:
{reportbody.stellarclass}-class
}
star now {OneOf('Commander', 'Captain', 'Sir')}"
)}
Voice Attack - ((EDDI Star scanned))
Code:
Set small int (condition) [random] value as random from 1 to 2 //Rolls a 1 in 2 chance of triggering the following
Begin Small Integer Compare : [random] Equals 1 //if rolls a 1
Pause 3 seconds
Set Boolean [Request] to True //sets up a condition (true / false) which is used when recognising the words "Yes" and "No" later
Set Text [Script] to 'rs_request_report_star' //Selects the script to read - Simply one I wrote to generate random speech for asking if I want more info
Execute external plugin, 'EDDI 3.0.1-rc3' and wait for return //executes the above script
Set Text [CMDExecute] to 'star report' //sets up a future script to be read "Star report" to be executed later when I say "yes" (doesnt execute here, only when I actually say yes).
Pause 8 seconds //waits 8 seconds
Set Boolean [Request] to False //then disables the first condition called "request" by making a value of false. The command for "Yes" checks if True, and if not, wont execute the script "Star report"
End Condition
Voice Attack - Yes
Code:
Begin Boolean Compare : [Request] Equals True
Execute command, '{TXT:CMDExecute}' (by name) (and wait until it completes)
Set Boolean [Request] to False
Else
... //if I haven't said "yes" within 8 seconds of a request, it will just give some different results, not important to this problem
Voice Attack - Give me a star report, or what can you tell me about this star, or do you have any information on this star etc. etc.
Code:
Set Text [Script] to 'Star report' //This is in place if she doesn't offer me a more detailed report and I actually want on. (Remember the 1 in 2 chance mentioned above, designed to add variation to the experience)
Execute external plugin, 'EDDI 3.0.1-rc3' and wait for return
EDDI - rs(random speech)_request_report_star - For anyone who wants it. Not really part of the problem I'm having, but someone may find this useful in the future if they want to do something similar.
Code:
{set random to OneOf('1', '2')}
{if random = '1':
{OneOf("Shall I provide you {Occasionally(2, 'with')}","Would you like {Occasionally(2, 'to hear')}")}
|else:
I can {OneOf("provide you {Occasionally(2, 'with')}","give you")}
}
{OneOf("{Occasionally(2, 'more')} information","a brief","{Occasionally(2, 'more')} details")}
{OneOf("on","about")}
this Star
{if random = '2':
{Occasionally(2, 'now')} {OneOf('if you like', 'if you would like me to')}
}
{OneOf(' sir',' captain',' commander','')}?
Sorry for the wall of text guys but I couldn't explain it any other way really.
There is any event (or variables) I can use to get information about a planet (type of reserves, the materials I will find there, etc) when/after I land on it?
I know there is an event after we scan a planet. But that wouldn't be useful if said planet was already scanned or I have the whole system's info by means of a nav beacon, right?
I have found an issue with my EDDI and VA profiles and I was hoping for some advice.
Background:
For those (like me) that didn't know, when you scan a Nav Beacon (triggering the "Nav Beacon Scan" event in EDDI) the journal also creates an entry for every Star and Body in the system, as if you just scanned every body in the system simultaneously.
EDDI blocks the speech responder from triggering for every body in the event a Nav Beacon is scanned. That is to say, if the system has 42 bodies you won't hear the "Body scanned" event trigger 42 times in a row.... unless your'e me. Which is exactly the problem I need help with, because trust me it's a bit like psychological torture waiting it out, just floating in space because you can't initiate supercruise using voice until it's finished, having the same thing repeated over and over again. [ugh]
The Problem: When I scan a Nav Beacon, I hear a "Star scanned" and "Body scanned" event for every single body in the system.
The problem arises because of Voice Attack scripts I wrote called ((EDDI Star scanned)) and ((EDDI Body scanned)), which work more or less identically, like this:
Voice attack script called ((EDDI Star scanned)):
EDDI triggers the event called "Star scanned" and it plays out -> VA triggers an EDDI event that I made called rs_scan_star (which simply generates random speech options saying the star has been scanned) eg. "I am compiling the data from the {OneOf('Scan','Analysis','Review','Survey')} of this {reportbody.stellarclass}-class star now"
->Asks me if I want further information about the star (via a separate EDDI random speech event rs_request_report_star) -- then wait 8 seconds
-- If I say "YES" within 8 seconds -> The EDDI event called "Star report" is triggered.
-- If "No" -> give a verbal acknowledgment
-- If don't say anthing -> the timer expires, then saying yes or no will have no effect.
The same goes for my ((EDDI Body scanned)) script in VA.
I wrote this because when I'm flying around scanning individual bodies with a detailed surface scanner I might not want a full report generated from scanning every body, especially if it's just another small icy or rocky body. Investigation:
So I now know that Voice Attack is the culprit for creating 40+ instances of the "Scan of star complete" being spoken out (or at least my VA script is the culprit)
I removed my own created EDDI events that generated the random speech for scanning a star and body, and pasted it in the main "Star scanned" and "Body scanned" events. This meant that VA no longer triggered that part of the speech, instead EDDI did)
and I left the request for further info to still be generated via VA script called ((EDDI Star scanned)).
When I scanned the Nav Data point in game I no longer heard 40x repetitions of both "star scanned" and "body scanned" . But I did still hear "would you like more information about this star/body", repeated over and over again. Solution:
I tried creating a VA script called ((EDDI Nav beacon scan)) with a command to stop all queued speech in EDDI after 8 seconds (enough time for her to still tell me the scan is complete) using the activate external plugin - shutup command. I thought this would simply erase all the VA generated Body and Star scanned lines of speech waiting to come at me, one after the other.
What I've found is that the Voice Attack log shows the event "External plugin: Body scanned" (something like that, maybe not verbatim) trickle feeding in, one every few seconds, well after my command to cancel all speech has triggered.
Does anyone know of a better way of handling this problem.
My scripts:
Here are my scripts to help out, or for anyone interested in a similar idea NOTE: Not working as intended in current form
EDDI - Star scanned event -changed to give more random speech options, and also to not automatically trigger the Star Report event in EDDI
Code:
{_ 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)}
{if event.estimatedvalue:
{SetState("eddi_context_system_value", state.eddi_context_system_value + event.estimatedvalue)}
{SetState("eddi_context_session_scan_value", state.eddi_context_session_scan_value + event.estimatedvalue)}
}
{Pause(1000)}
{OneOf(
"{OneOf('Scan','Analysis','Review','Survey')} of
{if reportbody.stellarclass:
{reportbody.stellarclass}-class
}
star
{OneOf('complete', 'completed')}",
"{if reportbody.stellarclass:
{reportbody.stellarclass}-class
}
star
{OneOf('Scan','Analysis','Review','Survey')}
{OneOf('complete', 'completed')}"
"The {OneOf('Scan','Analysis','Review','Survey')} of this
{if reportbody.stellarclass:
{reportbody.stellarclass}-class
}
star
{OneOf('is complete', 'was successful')}",
"We have successfully completed the
{OneOf('Scan','Analysis','Review','Survey')} of this
{if reportbody.stellarclass:
{reportbody.stellarclass}-class
}
star ",
"We have {Occasionally(2, 'successfully')}
{OneOf('Scanned','Analysed','Reviewed','Surveyed')} this
{if reportbody.stellarclass:
{reportbody.stellarclass}-class
}
star {OneOf('Sir', 'Commander', 'Captain', '')} ",
"I am compiling the data from the {OneOf('Scan','Analysis','Review','Survey')} of this
{if reportbody.stellarclass:
{reportbody.stellarclass}-class
}
star now {OneOf('Commander', 'Captain', 'Sir')}"
)}
Voice Attack - ((EDDI Star scanned))
Code:
Set small int (condition) [random] value as random from 1 to 2 //Rolls a 1 in 2 chance of triggering the following
Begin Small Integer Compare : [random] Equals 1 //if rolls a 1
Pause 3 seconds
Set Boolean [Request] to True //sets up a condition (true / false) which is used when recognising the words "Yes" and "No" later
Set Text [Script] to 'rs_request_report_star' //Selects the script to read - Simply one I wrote to generate random speech for asking if I want more info
Execute external plugin, 'EDDI 3.0.1-rc3' and wait for return //executes the above script
Set Text [CMDExecute] to 'star report' //sets up a future script to be read "Star report" to be executed later when I say "yes" (doesnt execute here, only when I actually say yes).
Pause 8 seconds //waits 8 seconds
Set Boolean [Request] to False //then disables the first condition called "request" by making a value of false. The command for "Yes" checks if True, and if not, wont execute the script "Star report"
End Condition
Voice Attack - Yes
Code:
Begin Boolean Compare : [Request] Equals True
Execute command, '{TXT:CMDExecute}' (by name) (and wait until it completes)
Set Boolean [Request] to False
Else
... //if I haven't said "yes" within 8 seconds of a request, it will just give some different results, not important to this problem
Voice Attack - Give me a star report, or what can you tell me about this star, or do you have any information on this star etc. etc.
Code:
Set Text [Script] to 'Star report' //This is in place if she doesn't offer me a more detailed report and I actually want on. (Remember the 1 in 2 chance mentioned above, designed to add variation to the experience)
Execute external plugin, 'EDDI 3.0.1-rc3' and wait for return
EDDI - rs(random speech)_request_report_star - For anyone who wants it. Not really part of the problem I'm having, but someone may find this useful in the future if they want to do something similar.
Code:
{set random to OneOf('1', '2')}
{if random = '1':
{OneOf("Shall I provide you {Occasionally(2, 'with')}","Would you like {Occasionally(2, 'to hear')}")}
|else:
I can {OneOf("provide you {Occasionally(2, 'with')}","give you")}
}
{OneOf("{Occasionally(2, 'more')} information","a brief","{Occasionally(2, 'more')} details")}
{OneOf("on","about")}
this Star
{if random = '2':
{Occasionally(2, 'now')} {OneOf('if you like', 'if you would like me to')}
}
{OneOf(' sir',' captain',' commander','')}?
Sorry for the wall of text guys but I couldn't explain it any other way really.
In the `Nav beacon scan` event, there is a variable `event.numbodies` that you can use to count down until the nav beacon scan speech has all been suppressed. You'll need to set a state variable to this quantity for VoiceAttack, then subtract from the variable value and suppress speech while that state variable is greater than zero. Once it hits zero, you'll know that the nav beacon scans are done. (Note that this is the same method EDDI uses natively in the Speech responder).
When dropping from supercruise to land on a planet, EDDI replies that you've dropped from supercruise near planet "X". I'd like to change this so that ...
If dropping from supercruise near a planet, "dropped from supercruise near settlement "x" on planet "y"" vs near planet with no mention of settlement, etc.
A) is this even possible due to lack of granular reporting in log?
B) is there logic that differentiates between dropping near a planet to land at a settlement vs dropping near a station that happen to be in orbit around a planet (or star)?
C) Having zero coding ability, (old dog syndrome) can someone help me?
I'm thinking ...
{if event.bodytype = 'Planet':
{OneOf("near", "close to", "in the vicinity of")} planet {P(event.body)}
should be changed to something like ..
{if event.bodytype = 'Planet':
{OneOf("near", "close to", "in the vicinity of")} {(nearest.settlement)} on planet {P(event.body)}
But I have not seen anything like -> nearest.settlement for a variable.
When dropping from supercruise to land on a planet, EDDI replies that you've dropped from supercruise near planet "X". I'd like to change this so that ...
If dropping from supercruise near a planet, "dropped from supercruise near settlement "x" on planet "y"" vs near planet with no mention of settlement, etc.
A) is this even possible due to lack of granular reporting in log?
B) is there logic that differentiates between dropping near a planet to land at a settlement vs dropping near a station that happen to be in orbit around a planet (or star)?
C) Having zero coding ability, (old dog syndrome) can someone help me?
I'm thinking ...
{if event.bodytype = 'Planet':
{OneOf("near", "close to", "in the vicinity of")} planet {P(event.body)}
should be changed to something like ..
{if event.bodytype = 'Planet':
{OneOf("near", "close to", "in the vicinity of")} {(nearest.settlement)} on planet {P(event.body)}
But I have not seen anything like -> nearest.settlement for a variable.
I had the same idea a while ago, so I updated my Entered Normal Space script to do just that. I'm not at my PC right now, but you can download my personality from my signature below, and copy over that event script into your own. It's not 100% perfect, but its very close.
If you have trouble, I can help more when I'm back at my PC.
Hope it helps!
-=] Darkcyde [=-
EDIT: Back at my PC now. My bad, I was thinking of the wrong event, it's actually called "Settlement approached". To save you having to download all of my profile package, here is the script I use:-
Code:
{_ If the event triggers between 15 seconds and 4 minutes, _}
{_ this should be an approach to a targetted settlement _}
{set time to SecondsSince(0) - state.approach_time}
{if time > 240 || time < 15:
{SetState('approach_time', SecondsSince(0))}
|else:
On final approach to {event.name}.
{SetState('approach_time', 0)}
}
Mine is tied into my 'Missions System' for recording details of current missions, but I've cut those parts out for you already. So just copy the above into your 'Settlement approached' event script and you're done!
So not really a change to "dropped from supercruise near %settlement% on %planet%" but an additional triggered event (settlement approached script) that was previously empty. Hmm interesting. I'll plug this in and see what happens.
Am I correct in identifying {event.name} as the settlement's name variable?
and if so ...
Couldn't I also do -> {OneOf("near", "close to", "in the vicinity of")} {event.name} on planet {P(event.body)}
in the stock Entered normal space script?
So not really a change to "dropped from supercruise near %settlement% on %planet%" but an additional triggered event (settlement approached script) that was previously empty. Hmm interesting. I'll plug this in and see what happens.
Am I correct in identifying {event.name} as the settlement's name variable?
and if so ...
Couldn't I also do -> {OneOf("near", "close to", "in the vicinity of")} {event.name} on planet {P(event.body)}
in the stock Entered normal space script?
My apologies for getting the events mixed up, it's been a long time since I did that Settlement Approached script.
As for your suggestion, I'm afraid that will not work. Any variable beginning with 'event', is specific to that event. So {event.name} will be different in Settlement Approached (where it is the settlement name) compared to {event.name} in Body Scanned (where it is the planetary body name). The Entered Normal Space event does not have an {event.name} variable. Once the event has completed, those variables are no longer available.
However, thinking about it, I may have a solution. I've literally only just though of this as I was typing, so I've not tried it, but it should be possible to use Settlement Approached to set a State variable (one that persists in memory throughout all events) and then use that in the Entered Normal Space event, to do just what you are looking for.
It's late here now, but I'll give it a go and see if I can make that work. I'll give you a definitive reply within 24 hours.
I just tried a quick hop from Bauman Station in Kokobii, down to Martins Installation on the planet below, Kokobii A 3. This is what I got:- "left supercruise close to Martins Installation on Planet-A-3."
This is the 'Settlement Approached' script. Short and sweet:-
I set a timer so that it won't trigger if you fly close past a settlement and then exit super cruise a little time later, just in case you are not actually going to that settlement.
This is my full 'Entered Normal Space' script. It uses a function I wrote to tidy up and shorten body names, which I'll share below this:-
Code:
{_ 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)}
{if state.eddi_context_interdicted != "yes":
{Pause(3000)}
{OneOf("{ShipName()} has", "")}
{OneOf("left supercruise", "{OneOf('entered','returned to','dropped to')} normal space")}
{if event.bodytype && event.bodytype != "":
{OneOf("near", "near to", "close to", "in the vicinity of")}
{F("Body Name Tidy")}
{if event.bodytype = "Planet":
{set time to SecondsSince(0) - state.settlement_approach_time}
{_ If time since last settlement approach is more than 1 minute _}
{if time > 60:
{body}
|else:
{state.settlement_approached} on {body}
{SetState('settlement_approached', "")}
{SetState('settlement_approach_time', 0)}
}.
|elif event.bodytype = "Star":
{body}.
|elif event.bodytype = "Station":
{P(event.body)}.
|elif event.bodytype = "PlanetaryRing":
Planetary Ring {P(token(event.body," Ring",0))}.
}
}
}
{SetState('eddi_context_interdicted', 'no')}
My 'Body Name Tidy' function. Create a new script and call it 'Body Name Tidy', then copy this into it:-
Code:
{_ Body Name Tidy _}
{_ Tidy up body names _}
{_ If the body name contains the system name, it is removed _}
{_ Adds Star, Planet, or Moon depending on body location within the system _}
{_ Corrects pronunciation of letters in body names. No more 'hour' for 'h' with some TTS voices _}
{_ Returns 'body' for use in other scripts _}
{if event.name:
{set body to event.name}
{set system to system.name}
|elif reportbody.stellarclass:
{set body to state.eddi_context_star_star}
{set system to state.eddi_context_star_system}
|else:
{set body to state.eddi_context_body_name}
{set system to state.eddi_context_body_system}
}
{if (find(body, system) > -1) && (body != system):
{_ Remove system name if it's part of the body name _}
{set body to slice(body, len(system)+1)}
{_ Replacing spaces with dashes makes letters spoken as alphabetic letters _}
{set body to ucase(join(split(body, " "), "-"))}
{_ Add body type _}
{if len(body) < 3:
{if ord(body) > 64:
{set body to cat("Star-", body)}
|else:
{set body to cat("Planet-", body)}
}
|elif find(body, "+") > -1:
{set body to List(split(body, "+"))}
{set body to cat("Planets-", body)}
|elif len(body) < 5 && ord(body) > 64:
{set body to cat("Planet-", body)}
|elif find(body, "belt") = -1:
{set body to cat("Moon-", body)}
}
|elif body = system:
{set body to "The primary star"}
}
Of course, if you don't like the shorter names, then just change all instances of {body} in the 'Entered Normal Space' script above, with {P(event.body)} to return them to default.
Depending on how good you are at approaching a settlement and exiting SuperCruise quickly, you may need to adjust the time from 60 seconds up to something that is more suitable to you, but I think 60 seconds is a good number to start with.
Let me know how you get on with these. Hope this is what you are after.
I love trying to come up with solutions to peoples requests or problems with EDDI scripting. I tend to incorporate them into my own personality too. I think a lot of it is from other peoples suggestions, etc., although I have come up with a lot of ideas myself.
In fact, the EDDI team have added the recent cargo monitor because of the functionality I created using only the scripting language. They are going to add my Missions functionality next, and maybe my Fines & Bounties after that. I'm proud to have been the inspiration to add these to EDDI directly. Whatever else I do, I know that part of EDDI will always be based on my original ground work. A little piece of me will always be part of it.
If you want to see what else I've done, then download my personality from the link in my sig below, and try it out for yourself. I know several people use it as a base for their own.
And no, I don't have a patreon page. I've never thought about taking donations for what I do. So far, the thanks I get has been enough.
Plugged in your code and works as expected. You da man.
I did however encounter an unexpected anomaly. Settlements with + or ++ or (or more) after them get read out as "Cenker Gateway Plus Plus"
I'd like to remove (filter) out the occurrences of "+" whether its one, two, three or more?