[QUestion]How can I integrate my own voices/audios for texts

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

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

Post Reply
Max Bain
Posts: 1458
Joined: Wed, 27. Jun 18, 19:05
x3ap

[QUestion]How can I integrate my own voices/audios for texts

Post by Max Bain » Tue, 31. Mar 20, 09:23

As title says, I want to add some texts with some audio files. I know how to do it in the "t" file and I also added the "voice-l044" folder with subfolder and audio files, but the audio does not appear in game.

I added to the ship classes some new texts:

Code: Select all

	
	<add sel="/language/page[@id='20221']">
			 <t id="3501">t</t>			 
			 <t id="3531">t</t>			 
			 <t id="3541">t</t>			 
			 <t id="4501">t</t>			 
			 <t id="5501">t</t>			 
			 <t id="5511">t</t>			 
			 <t id="5531">t</t>	
	</add>
So in game I see the "t" added to the text where I want it to be.
In the mod folder I have a folder like

Code: Select all

voice-l044\20221\normal
with several .ogg files named as seen above, so "3501.ogg" and so on.
My t file is named 0001.xml.

What am I missing? It seems my own audio files are not added to some library or so, but I couldnt find one for audios.
XR Ship Pack (adds several ships from XR) Link
Weapon Pack (adds several new weapons) Link
Economy Overhaul (expands the X4 economy with many new buildings) Link
X4 Editor (view stats of objects and make your own mod within a few clicks) Link

User avatar
SirFrancisDrake
Posts: 188
Joined: Mon, 23. Dec 13, 11:24
x4

Re: [QUestion]How can I integrate my own voices/audios for texts

Post by SirFrancisDrake » Tue, 31. Mar 20, 17:40

Hi,

sound files are defined in the sound_library.xml.

You could use this code for your mod.

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<diff>
	<add sel="/soundlibrary">
		<sound id="20221_normal" description="Ship Types" repeat="1" is3d="1" preload="0">
			<sample start="extensions\XR_ShipPack\voice-L049\20221\normal" />
				<effects>
					<filter mode="bandpass" frequency="0.26" oneoverq="1.45" />
					<reverb room="sewer pipe" roomsize="10" drymix="5" density="90" />
				</effects>
		</sound>
	</add>
</diff>
But i saw that you use the same page id as ego. You'd better not do that. It could cause problems. Rather create your own page id.

Greetings,
SirFrancisDrake

Post Reply

Return to “X4: Foundations - Scripts and Modding”