[HELP] How do I make Betty speak?

The place to discuss scripting and game modifications for X4: Foundations.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

Post Reply
Trajan von Olb
Posts: 544
Joined: Wed, 4. Feb 04, 21:39
x3tc

[HELP] How do I make Betty speak?

Post by Trajan von Olb » Wed, 5. May 21, 01:19

Hi,

I LOVE Betty :-) That's why I wish she would announce a lot more conditions and situations in the ship. The soundfiles are there, I found them. But how do I use them? How do I make BETTY say something, appropriately in the respective language and with the respective sound ("normal" etc.), which is why "PLAY_SOUND" fails. I have dealt with "SPEAK" a bit, but I can't find my way around.
Can someone kindly make ONE example where Betty speaks anything? For example, just "ATTENTION" (that is the "1" as a file)...

I think that this could become a nice MOD, there are so many ideas, and a lot of it is just hard work. Many thanks for answers!

Greetings Schmollo aka Trajan from Olb
Mein Traum vom Glück ist der Traum von einer anderen Menschheit. (S. Lem)

kuertee
EGOSOFT
EGOSOFT
Posts: 789
Joined: Sun, 14. Dec 03, 13:05
x4

Re: [HELP] How do I make Betty speak?

Post by kuertee » Wed, 5. May 21, 02:30

does this work?

Code: Select all

<speak actor="player.computer" page="X" line"Y" />
where X = betty's page id in the language files
and Y = the line id that you want her to speak.
Mods: RPG: Reputations and Professions, Social Standings and Citizenships, Crime has Consequences, Alternatives to Death. Missions/NPCs: Emergent Missions, NPC Reactions, Mod Parts Trader, High-sec Rooms are Locked, Hacking Outcomes, More Generic Missions, Waypoint Fields for Deployment. Others: Auto-cam, Friendly Fire Tweaks, Teleport From Transporter Room, Wear and Tear. QoL: Trade Analytics, Loot Mining, Ship Scanner, Signal Leak Hunter, Station Scanner, Surface Element Targeting, etc.

Trajan von Olb
Posts: 544
Joined: Wed, 4. Feb 04, 21:39
x3tc

Re: [HELP] How do I make Betty speak?

Post by Trajan von Olb » Wed, 5. May 21, 14:31

Hey Kuertee, thanks again.

That worked. But is there any way to make the further execution stop exactly until the speech sample is finished? Because if I put two in a row, then only the second one is spoken, presumably because the first one is "spoken over"... I looked at the parameter "delay" in "speak text", but there is only a small pause at the beginning, it says... I can't just measure a delay and set it via "delay", because that should work differently in different languages, that wouldn't be right somehow...

Any ideas?

Besides - as always ;-) - another small question. I wanted to insert a UI sound from the Ego library with:

Code: Select all

<play_sound sound="notification_encyclopedia_entry" type="ui"/>
Unfortunately nothing can be heard, maybe I'm doing something wrong with the syntax again?

Thanks already.

Greetings Schmollo

Translated with www.DeepL.com/Translator (free version)
Mein Traum vom Glück ist der Traum von einer anderen Menschheit. (S. Lem)

kuertee
EGOSOFT
EGOSOFT
Posts: 789
Joined: Sun, 14. Dec 03, 13:05
x4

Re: [HELP] How do I make Betty speak?

Post by kuertee » Wed, 5. May 21, 15:37

schmollo wrote:
Wed, 5. May 21, 14:31
...Because if I put two in a row, then only the second one is spoken ... Any ideas?
I'm surprise <speak /> doesn't have the "hidechoices" property of <add_npc_line />. "hidechoices" allows multiple <add_npc_line /> in a row - queueing each voice line properly.
Try <add_npc_line page="x" line="Y" hidechoices="true" />.
You may need to look at what other properties are required for it.
...

Code: Select all

<play_sound sound="notification_encyclopedia_entry" type="ui"/>
...Unfortunately nothing can be heard, maybe I'm doing something wrong with the syntax again?
That one, I can't help, actually.
I've not used play_sound.
And it does look like you've used its properties properly.
Have you looked at how its used by Egosoft in the base folders?
Mods: RPG: Reputations and Professions, Social Standings and Citizenships, Crime has Consequences, Alternatives to Death. Missions/NPCs: Emergent Missions, NPC Reactions, Mod Parts Trader, High-sec Rooms are Locked, Hacking Outcomes, More Generic Missions, Waypoint Fields for Deployment. Others: Auto-cam, Friendly Fire Tweaks, Teleport From Transporter Room, Wear and Tear. QoL: Trade Analytics, Loot Mining, Ship Scanner, Signal Leak Hunter, Station Scanner, Surface Element Targeting, etc.

Trajan von Olb
Posts: 544
Joined: Wed, 4. Feb 04, 21:39
x3tc

Re: [HELP] How do I make Betty speak?

Post by Trajan von Olb » Wed, 5. May 21, 20:40

Thank you very much! I have now pulled out ASTROGREP - what a great tool! I was able to find the error with it. The call name belongs in single inverted commas, like this:

Code: Select all

<play_sound sound="'notification_encyclopedia_entry'" type="ui"/>
That's how I'm going to search for Betty :-)

Greetings Trajan from Olb
Mein Traum vom Glück ist der Traum von einer anderen Menschheit. (S. Lem)

Post Reply

Return to “X4: Foundations - Scripts and Modding”