sound

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

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

Post Reply
User avatar
Hairless-Ape
Posts: 313
Joined: Wed, 6. Nov 02, 20:31
xr

sound

Post by Hairless-Ape » Thu, 11. Mar 21, 23:00

Old question, but can't seem to find the answer..

Can you modify sound in the game (not the background music, but sound effects such as engine noise, or even better, one of the Voices that talks) ?


Thanks.
Out of my mind. Back in 5 minutes.

PSCO1
Posts: 1087
Joined: Thu, 4. Jun 09, 17:08
x4

Re: sound

Post by PSCO1 » Fri, 12. Mar 21, 11:08

With X3 modManager, in CAT files (idk witch one), search for "s\..." folder

You can extract the file(s) and put in the game directory by creating a "s" folder

Exemple: my "s" folder contains 2 files: "919.wav" and "920.wav" witch are sound volume reduced for the cluster flak array weapon

User avatar
Hairless-Ape
Posts: 313
Joined: Wed, 6. Nov 02, 20:31
xr

Re: sound

Post by Hairless-Ape » Fri, 12. Mar 21, 14:04

Thanks, I'll 'try' to get this working.

The X3 ModManager 0.0.8 install doesn't seem to work well. It says I need the VB Runtime's, asks if I want to download them, and then says it can't find them :). Tried installing VB6 runtimes from microsoft in admin mode and it seems to finish, but hard to say since it exits so quickly. Then at the end if you try to run modmanager, it gives an error "file not found: x3mmext.dll", even though that file is in the very same executable directory.
Using Windows 10. I guess he's not updated this program in a long time. I will just use X3 Editor 2 to extract stuff.

How did you figure out that 919.wav is for the cluster flak array? trial and error (playing the file), or is there a reference somewhere?

I've looked through all extracted files and don't see any audio files that might be one of the in-game Voices. Perhaps those audio files are embedded somewhere in the main executable ?

Thank you much.
Out of my mind. Back in 5 minutes.

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22197
Joined: Sun, 14. Nov 04, 23:26
x4

Re: sound

Post by Cycrow » Fri, 12. Mar 21, 18:07

The X3 ModManager was merged with the Editor, so you only need to use the X3 Editor 2 now.

For sounds, the list of sounds is in types/sounds.pck

also, if you look in the other types files, like TLaser, then this is where you assign what sound file to use for the laser sound.

The voices are all stored in a single file (well 2 for AP)
this is mov/00144.dat and mov/00244.dat the 44 is for English voices.

then in the mov/00044.pck/xml file is the list that links the text entries for the voice to their positions within that file

User avatar
Hairless-Ape
Posts: 313
Joined: Wed, 6. Nov 02, 20:31
xr

Re: sound

Post by Hairless-Ape » Fri, 12. Mar 21, 20:44

Excellent. Thank you so much.

Wouldn't have any utility by chance that extracts and/or re-encodes voices would you?

I can see the xml info in 00044.pck. It's a bit cryptic, but I assume s="bla bla" is the starting byte pointer, and l="bla bla" is the length of the file in bytes.. hopefully correct.
Guessing the binary information is a raw .WAV file format ?? any idea.
Not sure what the Page id="" value stands for. Perhaps a language format.
Ultimately, I'm trying to see if I can replace some of the voices. I Can build a program to extract and re-encode it all, but not sure what format the audio is in.

Thoughts?

Thanks.
Out of my mind. Back in 5 minutes.

User avatar
Hairless-Ape
Posts: 313
Joined: Wed, 6. Nov 02, 20:31
xr

Re: sound

Post by Hairless-Ape » Fri, 12. Mar 21, 23:50

Cycrow,

Maybe m3 format stream for these?

Looks like others have replaced some of the voices before.. Like Joubarbe :). Would be nice to gain more insight into the details.

Cheers.
Out of my mind. Back in 5 minutes.

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22197
Joined: Sun, 14. Nov 04, 23:26
x4

Re: sound

Post by Cycrow » Sat, 13. Mar 21, 00:42

I believe its some wmv format but not 100% sure, loading the dat file in something like gspot should tell you

Don't have any utility to do it, but I was planning on adding something to the pligin manager to do it automatically, just not had the time.

The page I'd and text I'd is how the texts are stored for the game. Check out the main text file, t/0001-L044
Texts are grouped into pages, and pages where it has voice=yes will have an entry in the voice file
The game uses these ids to play the voices

The biggest issue with changing the voices in mods is the need to distribute the whole large audio file, this is made abit easier in AP though

User avatar
alexalsp
Posts: 1820
Joined: Fri, 18. Jul 14, 05:28
x4

Re: sound

Post by alexalsp » Sat, 13. Mar 21, 09:13

It would be nice to have the ability to compile voices in the X3 Editor. :roll:

User avatar
Hairless-Ape
Posts: 313
Joined: Wed, 6. Nov 02, 20:31
xr

Re: sound

Post by Hairless-Ape » Sun, 14. Mar 21, 03:01

Great advice. I used gspot as you suggested. It was ale to identify the format:

File Type: ASF (.WMA/.WMV)
Mime Type: video/x-ms-asf
File Length Correct
Sys Bitrate: 48 kb/s
Created: 2008 Sep 05 09:03:22


Using GSpot to actually play it, it seemed that it was one single large audio file rather than many bound into one binary. Playing it, it sounded like one separate clip followed by the next and so on.
So I'm assuming, for the moment, that it could be renamed and modified in an audio editor, but of course this would require careful tracking of the byte pointers for each preexisting clip.. or perhaps add new clips to the end, and just change the reference file to point to those new locations instead of the original locations (cheat). Will play some more with it.
Out of my mind. Back in 5 minutes.

User avatar
Hairless-Ape
Posts: 313
Joined: Wed, 6. Nov 02, 20:31
xr

Re: sound

Post by Hairless-Ape » Mon, 15. Mar 21, 00:56

Cycrow wrote:
Sat, 13. Mar 21, 00:42
The page I'd and text I'd is how the texts are stored for the game. Check out the main text file, t/0001-L044
I can't find this file in my Mayhem folder structure anywhere?
Out of my mind. Back in 5 minutes.

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22197
Joined: Sun, 14. Nov 04, 23:26
x4

Re: sound

Post by Cycrow » Mon, 15. Mar 21, 11:19

for the core game, the text file is usually in one of the .cat/.dat files, in the t directory.

Mods use additional text files, all in the t directory too, its possible mayhem removed the main text file and uses its own one.
It will either be an xml or pck file.

if you use the X3 Editor you can open via VFA, then look at all the files in the t directory

Post Reply

Return to “X³: Terran Conflict / Albion Prelude - Scripts and Modding”