====== Custom Communication Dialogs ====== ECS also allows you to easily display dialogs that looks like the standard X3 communication dialogs. They feature the video usually displayed next to the message and optional sound. ===== OK Dialog ====== File to call : **plugin.sk.ecs.dialog.ok** It's used to display a simple text with a Ok / Acknowledge / whatever button. Parameters are as follows: * ship : object sending the message (ship/station/roid/whatever) * sound : Sound ID to be player with 'send audio message..' command (can be null) * dialog.title : window's title * dialog.content : window's main text * dialog.ok : button ok caption Once called, is the 'ship' parameter has a pilot and sound is set to a correct sound ID, it will display the video next to the dialog window. You can get the game sound id by reading the 0001 textfile entry in the game's data files. This function will always return -1 === Example === $result = call script 'plugin.sk.ecs.dialog.ok' ship = Pirate Nova Raider sound = 33 // <---'go away' audio sample dialog.title = 'Incoming Transmission' dialog.content = 'I'm busy, go away!' dialog.ok = 'Okay!' ===== Yes/No Dialog ====== File to call : **plugin.sk.ecs.dialog.yesno** It's used to build a two choice communication dialog, and it basically works like the previous script: * ship : object sending the message (ship/station/roid/...) * sound : Sound ID to be player with 'send audio message..' command (can be null) * dialog.title : window's title * dialog.content : window's main text * dialog.yes : option 1 caption (can be of course something else than "yes") * dialog.no : option 2 caption This function will return -1 : If the player closed the window pressing [Escape] 1 : Player chooses the first answer (yes) 2 : Player chooses the second answer (no) === Example === $result = call script 'plugin.sk.ecs.dialog.yesno' ship = Pirate Mamba Raider sound = 506 // 'please help me' audio sample dialog.title = 'Incoming Transmission' dialog.content = 'I'm under attack! Can you help me?' dialog.yes = 'Okay' dialog.no = 'No way!' ===== Custom Dialog ====== File to call : **plugin.sk.ecs.dialog.menu** This one allows you to build your own custom menu through the X3:TC script commands ("create custom menu array") and display it in the same way as a communication dialog. Parameters: * ship : object sending the message (ship/station/roid/...) * sound : Sound ID to be player with 'send audio message..' command (can be null) * dialog.title : window's title * dialog.menu : custom menu array The function will return -1 if the player closes the window pressing [Escape]. Otherwise the result will be the value selected in your custom menu by the player.