Okay i'm having this issue now! EDDI only speaks my ships names letter by letter , spelling them out! I already tried to delete shipmonitor.json, enable and disable the shipyard plug in but nothing seems to resolve this! Any tips? Big thx cmdrs o7
Okay i'm having this issue now! EDDI only speaks my ships names letter by letter , spelling them out! I already tried to delete shipmonitor.json, enable and disable the shipyard plug in but nothing seems to resolve this! Any tips? Big thx cmdrs o7
I've had similar problems with a few of my scripts. It seem to be the P() function reading out letters when it doesn't understand a word. I've just removed the P() and I get back the correct pronunciations.
{_ Context }
{SetState('eddi_context_last_subject', 'message')}
{SetState('eddi_context_last_action', 'receive')}
{SetState('eddi_context_message_name', event.from)}
{SetState('eddi_context_message_content', event.message)}
{if event.player = true:
{if event.message = "o7":
{event.from} salutes
{if event.channel = "player":
you
}.
|else:
Message received from {event.source} {event.from}. Message reads: {event.message}.
}
|elif event.source != "Station":
Message received from {event.source} {event.from}. Message reads: {event.message}.
|elif event.source = "A":
Message received from {event.source} {event.from}. Message reads: {event.message}.
|elif event.source = "B":
Message received from {event.source} {event.from}. Message reads: {event.message}.
|elif event.source = "C":
}
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'.
{SetState('eddi_context_last_subject', 'message')}
{SetState('eddi_context_last_action', 'receive')}
{SetState('eddi_context_message_name', event.from)}
{SetState('eddi_context_message_content', event.message)}
{SetState('eddi_context_message_player', event.player)}
{SetState('eddi_context_message_channel', event.channel)}
{SetState('eddi_context_message_source', event.source)}
Hi DeeM77,
you'll have to make it with VA:
Use setstate() in EDDI message received event to store the necessary variables like this, and create a new script in EDDI (called 'message received 2', or something like that), based on the rest of the original script, and using these state variables instead the 'event.' ones:
Then, depending on the content of the variable 'eddi_context_message_source', you can make a script in VA connected to the EDDI message received event with ifs, using the 'say' plugin command to call the 'message received 2' EDDI script with the desired voice.
If you have a list about male-female names of NPCs in Elite, maybe you can make an array and make this script even more sophisticated![]()
Hope, this helps!
{INT:Ship utility slots}
{BOOL:Ship utility slot x occupied} and {TXT:Ship utility slot n module}
Utility slots are size 0 hardpoints, so it sounds like you are already pretty much there. . ;-)Does anyone known if it is possible to have a readout of the utility slots? I found the commands for compartments and hardpoints. I'd like to build a script for my scanners.
{set utilities to []}
{for hp in ship.hardpoints:
{if hp.size = 0:
{set utilities to cat(utilities, [hp.module.name]) }
}
}
{ShipName()} is equipped with the following utilities:
{List(utilities)}
Utility slots are size 0 hardpoints, so it sounds like you are already pretty much there. . ;-)
If you're running the latest beta, you can use something like the following to get a list of your installed modules:
Code:{set utilities to []} {for hp in ship.hardpoints: {if hp.size = 0: {set utilities to cat(utilities, [hp.module.name]) } } } {ShipName()} is equipped with the following utilities: {List(utilities)}
{TXT:Ship tiny hardpoint n module}
Okay i'm having this issue now! EDDI only speaks my ships names letter by letter , spelling them out! I already tried to delete shipmonitor.json, enable and disable the shipyard plug in but nothing seems to resolve this! Any tips? Big thx cmdrs o7
{_ 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(6000)}
{if state.jumpingdetails= "full":
{F("FSD full")}
|else:
{F("FSD min")}
}
}
Set Text [Script] to 'Full Jumping info Commander'Execute external plugin, 'EDDI 2.4.6-b1'
Set Text [jumpdetails] to 'full'
Set Text [State variable] to 'jumpdetails'
Execute external plugin, 'EDDI 2.4.6-b1'
Pause 1 second
Write '[Blue] {TXT:EDDI state jumpdetails}' to log
It seems that your VA script is using 'jumpdetails' for the state variable, but your FSD Engaged script is using 'jumpINGdetails'. So, it should always execute the 'FSD min' script. Make sure your FSD min script is named correctly, as it is case sensitive, and either add 'ing' to your VA script variable, or remove it from the FSD Event script variable.
{_ Caluation of destination system}
{if state.destinationexploration:
{set dest to SystemDetails(state.destinationexploration)}
{set diff_x to sub(dest.x, system.x)}
{set diff_y to sub(dest.y, system.y)}
{set diff_z to sub(dest.z, system.z)}
{set pow_x to pow(diff_x, 2)}
{set pow_y to pow(diff_y, 2)}
{set pow_z to pow(diff_z, 2)}
{set distance to add(pow_x, pow_y)}
{set distance to add(distance, pow_z)}
{set distance to pow(distance, 0.5)}
{set distance to round(distance, 1)}
{SetState('distance', distance)}
}
Set Text [destination] to 'SOL'
Set Text [State variable] to 'destination'
Execute external plugin, 'EDDI 2.4.6-b1' and wait for return
(plugin context "setstate"
Text variables "State variable")
Morning folks, I'm trying to make a script to calculate the distance to a system I choose. So anytime I jump it says or I can ask EDDI "Distance to destination system!" and EDDI replies with that system is 123 light years away. I had a script like this before but its broken.
...
in addition I would love to be able to have multiple destinations calculated so I can have the distance to any system by just saying "Distance to Sol" "Distance to WYRD" in VA
{set curr to SystemDetails("Leesti")}
{set dest to SystemDetails("Sol")}
{set distance to round(Distance(curr.x, curr.y, curr.z, dest.x, dest.y, dest.z), 2)}
Morning folks, I'm trying to make a script to calculate the distance to a system I choose. So anytime I jump it says or I can ask EDDI "Distance to destination system!" and EDDI replies with that system is 123 light years away.
I had a script like this before but its broken.
{_ Calculate distance to destination system}
{if state.destinationexploration:
{set dest to SystemDetails(state.destinationexploration)}
{set dx to dest.x - system.x}
{set dy to dest.y - system.y}
{set dz to dest.z - system.z}
{set distance to round(pow(dx * dx + dy * dy + dz * dz, 0.5), 1)}
{SetState('distance', distance)}
}
in addition I would love to be able to have multiple destinations calculated so I can have the distance to any system by just saying "Distance to Sol" "Distance to WYRD" in VA
I used to use that calculation myself, but I was introduced to an 'undocumented' command called 'Distance()'.
Wow. Can't find that in the EDDI source, so maybe it's an undocumented Cottle built-in?
No idea, and unfortunately I can't remember which kind soul told me about it, otherwise I'd give them all the credit. :/ It could have even been Cmdr McDonald himself.
store["Distance"] = new NativeFunction((values) =>
{
return (decimal)Math.Round(Math.Sqrt(Math.Pow((double)(values[0].AsNumber - values[3].AsNumber), 2)
+ Math.Pow((double)(values[1].AsNumber - values[4].AsNumber), 2)
+ Math.Pow((double)(values[2].AsNumber - values[5].AsNumber), 2)), 2);
}, 6);