Release EDDI Scripts and EDDI enabled VA Commands Thread

Hello pls HELP ME! EDDI is driving me crazy since ive completed some community goals! EVERY single thing that happens in game now EDDI warns "commander youve expressed interest in the following community goal" bla bla bla! Ive deleted my 'personality" and recovered an old one but STILL that DAMN warn pops up EVERY SINGLE FRIKKING second!!! It's driving me nuts! What gives?

{_ Set Context _}
{SetState('eddi_context_last_subject', 'community goal')}
{_ Save goal location to context if there is only one goal present _}
{if len(event.cgid) = 1:
{SetState('eddi_context_goal_system_name', event.system[0])}
{SetState('eddi_context_goal_station_name', event.station[0])}
}

{F('Honorific')},

{if len(event.name) > 1:
{OneOf("you have expressed interest in", "I am tracking")}
the following community goals:
|else:
The community goal,
}

{set cur to 0}
{while cur < len(event.name):

{if cur = 0 && len(event.name) = 1:
{_ nothing _}
|elif cur = 0 && len(event.name) > 1:
The first,
|elif cur < (len(event.name) - 1):
The next,
|else:
The last,
}

{event.name[cur]},

{if event.iscomplete[cur]:
{OneOf("is complete", "has finished")}
|else:
{if (event.expiry[cur] / 3600) < 12:
{OneOf("is nearing completion",
"shall end in {Humanise(round(event.expiry[cur] / 3600, 1))} hours",
"is nearly complete")}
|else:
{OneOf("is not yet complete",
"is active",
"is incomplete")}
}
}

{if event.tier[cur]:
{OneOf("and has reached", "and currently at")} {event.tier[cur]}.
{if event.contribution[cur] > 0:
Your expected reward is
{Occasionally(2, "currently")}
{Occasionally(2, "calculated at")}
{Humanise(event.tierreward[cur])} credits
{Occasionally(2, "in the {event.percentileband[cur]}th percentile")}
}
}.

{_ Create a comparison function _}
{set compare(stat) to:
{if stat < 0.01:
just a {OneOf("fraction", "token")} of
|elif stat < 0.10:
less than a tenth of
|elif stat < 0.25:
less than a quarter of
|elif stat < 0.5:
less than half of
|elif stat < 0.75:
less than
|elif stat < 0.96:
{OneOf("fractionally","just")}
less than
|elif stat < 1.05:
{OneOf("approximately","roughly","nearly")}
equal to
|elif stat < 1.25:
a little more than
|elif stat < 1.5:
more than
|elif stat < 2:
significantly more than
|else:
vastly more than
}
}
{set compare_contribution to (event.contribution[cur] / round(event.total[cur] / event.contributors[cur], 0))}

{if compare_contribution != 0:
{if event.toprank[cur]:
Congratulations!
You are one of {event.topranksize[cur]} top commanders in this event, having contributed
{compare(compare_contribution)}
the average.
|else:
{Occasionally(2, "You have contributed
{compare(compare_contribution)}
the average.")}
}
}

{if !event.iscomplete[cur]:
You may
{if event.contribution[cur] > 0:
{OneOf("contribute more", "make additional contributions")}
|else:
{OneOf("contribute", "make a contribution")}
}
{if event.station[cur] = station.name:
{Occasionally(2, "here")}
{Occasionally(2, "at this station")}.
|elif event.system[cur] = system.name:
at {P(event.station[cur])}
{Occasionally(2, "here")}
{Occasionally(2, "in this system", "in the current system")}.
|else:
at {P(event.station[cur])},
in {OneOf("{P(event.system[cur])}", "the {P(event.system[cur])} system" )}.
}
}

{set cur to cur + 1}
{Pause(1000)}
}

This is the 'event' is nice all all but it's outta control!
 
Last edited:
Hello pls HELP ME! EDDI is driving me crazy since ive completed some community goals! EVERY single thing that happens in game now EDDI warns "commander youve expressed interest in the following community goal" bla bla bla! Ive deleted my 'personality" and recovered an old one but STILL that DAMN warn pops up EVERY SINGLE FRIKKING second!!! It's driving me nuts! What gives?
Can someone help me track this 'trigger' ?

Thank you!

Uncheck the 'community goal update' in the speech responder for the moment, til a fix is deployed. only works in a custom personality, ofc.
 
Uncheck the 'community goal update' in the speech responder for the moment, til a fix is deployed. only works in a custom personality, ofc.

Yes, this is the best advice for now. In 2.4.03 the game started spamming that particular event and there is no way to distinguish the unsolicited events from the rest. It's a bit annoying as T'Kael had just got it working nicely. Back to the drawing board.
 
Yes, this is the best advice for now. In 2.4.03 the game started spamming that particular event and there is no way to distinguish the unsolicited events from the rest. It's a bit annoying as T'Kael had just got it working nicely. Back to the drawing board.

Okay yeah i figured that much but i had hope it could get a "chillin' pill" ... Congrats to you guys on the terrific EDDI work, i know this will be sorted out soon! o7
 
Hello cmdrs, me again! (LOL)

SO i had this wicked fun time building a FAS pure hull mega on a HAZ today! and as u might know tons of cargo and materials are purged into de void as u kill them! So i check on the left panel what they drop, swap to right panel for what i need, scoop and profit! But hey, doing this for every god damn ship u kill in a haz is very tiresome and annoying! Well them to my question! Would be possible to create a cmd into VA / EDDI that would check how many given material (item) u have on your journal log and say to you a response like "cmdr you have 14 phase alloys on board!" ... That would be so handy!
Well maybe the idea is there and someone more keen than me can create such wonder! Fly safe and code smart cmdrs o7
 
Last edited:
Hey guys, I am about halfway through this thread and haven't seen it addressed yet. I'm wanting to modify the refueling script a little bit. I've tried looking at other scripts that were similar to what I want and I've tried piecing it together, but it still isn't working. All I can get it to say is "{ShipName} is refuelling". Can you guys see what I am doing wrong and give me some idea how to fix it? I hard set the fuellevel to a few different percentages and hit the test button and it works, but once in game it doesn't work. It's kinda confusing. I've not done this kinda stuff in forever, so I need help. :)

Thanks a million!!! Loving what I am seeing here!

Code:
{set happend to OneOf(
"You're ready to go Mac, you're ",
"That's all she'll hold Boss, you're ",
"Looks like you're all topped off, you're "
)}


{Pause(2000)}


{set fuellevel to (event.fuelremaining/ship.fueltanktotalcapacity) * 100}


{if fuellevel >= 99:
        {happend} {ShipName()} has been fully refuelled.
|elif fuellevel <=75:
        {ShipName()} is refuelling.
}
 
Hey guys, I am about halfway through this thread and haven't seen it addressed yet. I'm wanting to modify the refueling script a little bit. I've tried looking at other scripts that were similar to what I want and I've tried piecing it together, but it still isn't working. All I can get it to say is "{ShipName} is refuelling". Can you guys see what I am doing wrong and give me some idea how to fix it? I hard set the fuellevel to a few different percentages and hit the test button and it works, but once in game it doesn't work. It's kinda confusing. I've not done this kinda stuff in forever, so I need help. :)

Thanks a million!!! Loving what I am seeing here!

Code:
{set happend to OneOf(
"You're ready to go Mac, you're ",
"That's all she'll hold Boss, you're ",
"Looks like you're all topped off, you're "
)}


{Pause(2000)}


{set fuellevel to (event.fuelremaining/ship.fueltanktotalcapacity) * 100}


{if fuellevel >= 99:
        {happend} {ShipName()} has been fully refuelled.
|elif fuellevel <=75:
        {ShipName()} is refuelling.
}

I'm reluctant to get into debugging 3rd party scripts. I'll just say that turning on the option in the "Speech responder" tab to write text to disk is invaluable.

Then you might want to investigate by getting the script to state "event.fuelremaining" and "ship.fueltanktotalcapacity".

You might also like to read the Cottle Docs.
 
I'm reluctant to get into debugging 3rd party scripts. I'll just say that turning on the option in the "Speech responder" tab to write text to disk is invaluable.

Then you might want to investigate by getting the script to state "event.fuelremaining" and "ship.fueltanktotalcapacity".

You might also like to read the Cottle Docs.


Oh, well, I thought that's what we did here as the first 19 pages I went through was quite a large amount of doing just that.

The stuff I put in there is just things from other scripts that I got from here. For instance, from the amount of fuel used, max jumps, etc that I got from something back on the first 5 pages or so of posts. I was just trying to cobble it together to get what I wanted. It just wasn't working the way I thought it would.

EDIT: Hell, I don't even know how to get it to state those values or where to even get those values from. Maybe I'm not even populating those values because I'm not calling them from wherever they are.
 
Last edited:
Sure, debugging each others' scripts is exactly what the scripting community do here and exactly what this thread is for, but as one of the app dev team I have to ration my time in here vs working on the app itself. I try to keep my finger on the pulse here but otherwise keep a low profile.
 
So, looks like I am not getting any value into event.fuelremaining. I've tried calling it and it is apparently empty. I called ship.fueltanktotalcapacity and it reports the right amount. Oh well, until I learn more how to call modules this isn't going to get anywhere.
 
So, looks like I am not getting any value into event.fuelremaining. I've tried calling it and it is apparently empty. I called ship.fueltanktotalcapacity and it reports the right amount. Oh well, until I learn more how to call modules this isn't going to get anywhere.

You're close, but 'event.fuelremaining' doesn't exist and will always return zero. Per the 'Variables' button, the variable that you want to call is 'event.total'.
 
Last edited:
But it works in the Jumped script I found earlier that tells you how much fuel you used.

Code:
{set fuellevel to (event.fuelremaining/ship.fueltanktotalcapacity) * 100}


This jump used {Humanise(event.fuelused)} tons of fuel.  You have {Humanise(fuellevel)} percent fuel remaining.




{if fuellevel <= 5:
    Your fuel level is under 5%.  If you do not refuel soon you risk being stranded.
|elif fuellevel <= 25:
    You have a quarter tank of fuel remaining.  Refuel soon.
|elif fuellevel <= 50:
    Your tank is half empty.  It is recommended you refuel soon.
}

At least it sounds like it works when you do the jump. That's why I thought it was a valid event.
 
Nevermind, I think I get it now. I looked at the very bottom of the variables button. Never done that before. Got lazy, I guess. Looks like each event had its own thing that I didn't realize. So, what I needed to do was set event.total=ship.fueltanktotalcapacity in that fully refueled part that contains happend (I only say that because if I change the size of my fuel tank or ship that has a different size, I don't want a hard coded value in there or else it will be wrong)?

I guess I'm just not cut out for this stuff. I'm having too hard of a time figuring this out.
 
Nevermind, I think I get it now. I looked at the very bottom of the variables button. Never done that before. Got lazy, I guess. Looks like each event had its own thing that I didn't realize. So, what I needed to do was set event.total=ship.fueltanktotalcapacity in that fully refueled part that contains happend (I only say that because if I change the size of my fuel tank or ship that has a different size, I don't want a hard coded value in there or else it will be wrong)?

I guess I'm just not cut out for this stuff. I'm having too hard of a time figuring this out.

Each event has its own set of variables, and they may not be consistent between events (something for us to work on one day perhaps). Since 'event.total' is described as the new fuel level of the ship, it is the equivalent of the jumped event's 'event.fuelremaining' variable for this event (and if event.total=ship.fueltanktotalcapacity then the tank is full). Try modifying your original script with this change:
Code:
{set fuellevel to (event.total/ship.fueltanktotalcapacity) * 100}
 
Yo! How would i got by getting EDDI to read the 'visitor's beacon' text information?! Is it possible?!

0q4q5PG.jpg


that would be REALLY immersive!
 
Last edited:
So I've been playing around with EDDI and VA trying to tweak the relative...chattiness, and I was wondering if anyone else has given something like this a go.


I started out by just doing this to the FSD engaged script:


Code:
        {if !system.visits || SecondsSince(system.lastvisit) > 14400:
            {set times to 1}
        |elif system.visits > 5: 
            {set times to 5}
        |else:
            {set times to system.visits}
        }




        {if !system.population:
            {OneOf("This system is unpopulated","There is no human presence here", "Humans have yet to colonise this system")}.
        |else:
            {Occasionally(times,
                F("System report"))
            }
        }


Basically, it uses the # of times I've visited a given system to adjust how likely EDDI is to give me a system report for a populated system, capping the number at 5 so that I've always got at least a 20% chance of hearing the report. It also checks to see if it's been more than 4 hours since I've visited a system; if it has been, I'm guaranteed a system report.


I think this works okay, but I haven't had a chance to really play with it much.


Thing is, it got me thinking about the potential to use VA to set a state variable with a value from 1-10 called something like global_verbosity, which could then be used by every report to control the level of detail given by EDDI. (You could also have individually set levels of detail for different reports, defaulting to global_verbosity if the individual verbosity level hasn't been set.)


I haven't really worked through it yet, as I've just now downloaded Darkcyde's EDDI kit to examine, but I was thinking that things like Body report, etc. could have their relative levels of detail adjusted on the fly this way.


Basically, you'd end up with something like this (I think):


Code:
    {if !state.bodyreport_verbosity:
         {set state bodyreport_verbosity to state.global_verbosity}
    }


    {if state.bodyreport_verbosity <= 1:
        ((bare minimum level of detail; say only the name, gravity, and landable values))
    |elif state.bodyreport_verbosity <= 5:
        ((as above, but also terraformstate, volcanism, greatmaterials))
    |elif state.bodyreport_verbosity <= 7:
        ((as above, but also goodmaterials))
    |else:
        ((full report))
    }


This is just spitballing, mind you, so there's probably a smarter way to do this. Maybe it would make more sense to set a verbosity threshold in the conditional for each section like this:


Code:
    {if len(greatmaterials) > 0 && state.bodyreport_verbosity > 4:
          ....
    }


Also, at the risk of this being way too long, instead of calling EDDI's speech function from each command in VA, which is how the first .vap I found works, I set up a silent VA command that gets passed the name of the command that called it and which then references different .txt files on my hard drive to respond based on who called it. Lets me keep all my responses stored in a single folder and just edit them from there, which makes life a lot simpler. (Editing in VA is not the most fun thing.)


Not sure how well this will work, but here's a go at what that command looks like in VA:


Code:
((set the path for VA to find the .txt files))
Set Text [TTSResponsePath] to 'C:\Users\ChrisL\Documents\VA Project\Responses\' (save value to profile), 


Set small int (condition) [RND] value as random from 1 to 20, 


Begin Boolean Compare : [MuteActive] Equals False, 
	((if not muted, check specificity)) 
	Begin Small Integer Compare : [RND] Is Less Than Or Equals [AI_Specificity], 
		((if RND <= specificity then use specific/long responses)) 
		Begin Boolean Compare : [Response_Success] Equals True, 
			Set Text [TTSResponseFile] to [Response_Caller], 
		Else If Boolean Compare : [Response_Success] Equals False, 
			Set Text [TTSResponseFile] to [Response_Caller] (Replace '.txt' with '_Failure.txt'), 
		End Condition, 
	
	Else, 
		((else if RND > specificity then use generic/terse responses)) 
		Begin Boolean Compare : [Response_Success] Equals True, 
			Set Text [TTSResponseFile] to 'Generic_Success.txt', 
		Else If Boolean Compare : [Response_Success] Equals False, 
			Set Text [TTSResponseFile] to 'Generic_Failure.txt', 
		End Condition, 


	End Condition, 
	
	((build the path & filename into Script, then send Script to EDDI via Say,)) 


	Set Text [Script] to [{TXTCONCAT:TTSResponsePath:TTSResponseFile}], 
	Execute external plugin, 'EDDI 2.3.1' ,
	
Else, 
	((if mute is active, respond with a sound rather than TTS))
	Begin Boolean Compare : [Response_Success] Equals True, 
		Play random sound (from directory: C:\Users\ChrisL\Documents\VA Project\Responses\Affirmative Sounds), 
	Else, 
		Play random sound (from directory: C:\Users\ChrisL\Documents\VA Project\Responses\Negative Sounds), 
	End Condition, 


End Condition, 


Set Text [TTSResponseFile] to [Not Set], 
Set Text [Response_Caller] to [Not Set], 
Set Boolean [Response_Success] to [Not Set]


Response_Caller is set by the command that called this one...so, GalNet_HealthReport or LandingGear_Deploy. Response_Success is something I've been playing with...if I tell VA to extend my landing gear and they're already out, Response_Success would be false. It defaults to TRUE if it hasn't been set though, since there's no way for VA to know if something like the GalNet commands didn't work.


This adds variety to responses from EDDI/VA by allowing the system to randomly choose a generic response to a command (eg "Confirmed," "Acknowledged," etc.) or a specific one ("Accessing GalNet," "Deploying landing gear," etc.) without me having to set those responses up in every single VA command individually.


So...yeah. I guess I've been more focused on improving EDDI/VAs response variety than I have on core capabilities.
 
Is there any way to pass EDDI's honorific address for the commander to VA?

Hi HypnoFox,

one of the possibilities:

-create a VA command something like 'Honorific'.

-use the 'speech' EDDI plugin command:

Set Text [Script] to 'Honorific'
Execute external plugin 'EDDI 2.4.0-rc1' and wait for return (inside: plugin context: speech, text variables: Script)
Set Text [Script] to ''

-then you can call the VA command 'Honorific' in your scripts

The description from the EDDI Wiki:

speech

This function uses EDDI's voice to read a Speech Responder script. The name of the script should be a text variable with the name 'Script'.
If you want to use a different voice to the standard one then you can set the name of the voice you want to use in a text variable with the name 'Voice'. Note that when you set this variable it will continue to be used until you unset it, at which point EDDI will use the voice configured in its text-to-speech settings.
To use this function in your own commands use the 'Execute an external plugin function' command with the plugin context set to 'speech'.

I've tested , it works!

Best regards!
 
Little help

So basicly im very much lost how to do anything as i don´t understand the programming language/methode at all (and my english is not the best )

Im currently "trying" to build a script (without VA) that gives me a warnig if my cockpit is breached.

currently its just this:
Code:
{_ Context }
{SetState('eddi_context_last_subject', 'cockpit')}
{SetState('eddi_context_last_action', 'breach')}

cockpit breached - ALERT! Cockpit Breached - ALERT!
Emergency Oxygen Active! Dock in a nearby Station immediately.

and im not sure if this even works! after that i would like to use the Material monitor and readout the times i can synthesis the emergency oxygen and let eddi give me a feedback to this ( for example if it is avaible tell me the time how much i can to or if not give me another warning!)

can anybody help me out?
 
Back
Top Bottom