QUESTION - Link between NPC video output, 0001-L044 and audio page Id's

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

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

Post Reply
dertien
Posts: 274
Joined: Tue, 22. Feb 05, 13:27
x2

QUESTION - Link between NPC video output, 0001-L044 and audio page Id's

Post by dertien » Sun, 12. Aug 12, 23:54

Hello Everyone,

I found this thread in the tutorial section that tells us how to find a spoken text message http://forum.egosoft.com/viewtopic.php?t=268926. Fine I understood that and that is part of the info I wanted to find. Now...To find out exactly what I want, maybe it's easier if I just give an example, so here goes

Let us assume this:

We are flying about in a Terran sector
We see a terran vessel, select it and start a communication session:
You get a little window in the top right, with the NPC's avatar , and the male avatar speaks out the words "spit it out, pilot"

Let's stop here for a minute.

I can find the reference "spit it out, pilot" in File 0001-L044 with a page ID of 350111

Code: Select all

<page id="350111" title="Argon/Terran Male Variation 2" descr="0" voice="yes">
<t id="0">{1,1,{1,8,32}}</t>
 <t id="1">Hey! You're either blind or stupid; maybe both.</t>
 <t id="2">I won't say this again, stand down.</t>
 <t id="3">This is your last chance - break it off.</t>
 <t id="4">You just crossed the line, make your peace.</t>
 <t id="5">Vessel under attack, require immediate assistance.</t>
 <t id="6">I hope you choke on my waste pipe!</t>
 <t id="7">Look, I'll give you anything! Anything!</t>
 <t id="8">Losing hull integrity. Son of a...!</t>
 <t id="9">I'll see you on the other side! Arrrgh!</t>
 <t id="10">Got it!</t>
 <t id="11">Pilot, you clearly have no idea how close you are to death. Stand down.</t>
 <t id="12">Your ignorance astounds me. Cease fire.</t>
 <t id="14">Weapons systems are now locked. Any last requests?</t>
<t id="20">Spit it out, pilot.</t>
This basically tells me that the sound file for this is located in file 00044.pck (xml)

Code: Select all

<page id="3941" stream="1">
  <t id="350101" s="441051" l="8397"/>
  <t id="350102" s="449948" l="9726"/>
  <t id="350103" s="460174" l="10713"/>
  <t id="350104" s="471387" l="9845"/>
  <t id="350105" s="481732" l="11867"/>
  <t id="350106" s="494099" l="16407"/>
  <t id="350107" s="511005" l="15476"/>
  <t id="350108" s="526981" l="13356"/>
  <t id="350109" s="540838" l="9429"/>
  <t id="350110" s="550766" l="17517"/>
  <t id="350111" s="568783" l="1421"/> 
</page>
So far so good, now can anyone tell me this:

- In which file, and where should I look for the ID reference, ID movie file, start time and duration in milliseconds that tells the game to go to this video file and play that NPC scene for that many seconds in the top right corner of my game window.
- In short, what binds "spit it out pilot" to the bald bearded terran pilot video that starts off in 00001.wma at 00:46:07.800, frame 83034 when opened in Avidemux, a video editing soft.

I know that the video files are all in the MOV folder and that they are simple wma/avi files that can be edited with a video editing software package.

If I have the liberty to change the ID, Time and Length in a certain xml file that controls the right-top-corner NPC video avatar, changing NPC visual characters and most importantly adding new ones would be a breeze. We could populate the universe with more than 15 clones of the same character, and add another immersion factor. How cool would that be?

Thank you

User avatar
OOZ662
Posts: 1211
Joined: Tue, 8. Apr 08, 10:45
x4

Post by OOZ662 » Mon, 13. Aug 12, 14:17

I'm really sleepy at the moment, so this may be totally off what you're looking for...but "s" is the starting point in milliseconds from the start of the file, and "l" is the length in milliseconds.

dertien
Posts: 274
Joined: Tue, 22. Feb 05, 13:27
x2

Post by dertien » Mon, 13. Aug 12, 15:07

Hi OOZ662,

Thanks for the reply, but that was not really what I am after.

I am looking for the reference that triggers the NPC video window when you contact a ship or a station.

When you contact a split ship, you get a split avatar in the NPC video top right corner window.
When you contact a terran ship, you see a terran avatar in the NPC video top right corner window.
Etc...

I know that all the muppet videos are actually one large file in the MOV folder 00001.dat, which is actually an mpeg file that can be edited to put in other avatars.

Okay, you can mod this file the easy way and change those with pics or with movies of your own, as long as you respect the length of the movie, nothing will go wrong. However, there are only ! 5 different avatars for terran pilots: 3 male and 2 females. If I would know what line in what file triggers these, plus the lenght, you could add a lot more NPC faces, and get a greater immersion factor.

I was wondering if anyone had already tackled the subject.

Hence my question.

I have something in the works, will post it later today or tomorrow.

dertien
Posts: 274
Joined: Tue, 22. Feb 05, 13:27
x2

Post by dertien » Mon, 13. Aug 12, 15:20

I would add stills in there, but would go close to the original that egosoft put in there, for example the guy in the middle row at the end could be a goner, or Noah in the plot for example.

This is a cartoon effect, but I could do others too, need to test this out what it would look like ingame.

Regular Cartoon effect

http://img228.imageshack.us/img228/9179 ... effect.jpg

Cartoon effect with dots

http://img827.imageshack.us/img827/2113/ce2x.jpg

Cartoon effect with monitor effect

http://img832.imageshack.us/img832/4286 ... effect.jpg

Hope this helped to clarify

User avatar
X2-Illuminatus
Moderator (Deutsch)
Moderator (Deutsch)
Posts: 24965
Joined: Sun, 2. Apr 06, 16:38
x4

Post by X2-Illuminatus » Mon, 13. Aug 12, 15:54

Which video and which voice is played, when you contact a ship, depends on the properties (face and voice id) of the pilot of that ship. You can set these values when creating a passenger and turning him to a pilot later (See <RetVar/IF><RefObj> create passenger in ship: name=<Var/String> race=<Var/Race> voice=<Var/Number> face=<Var/String>?) or directly via the "set pilot speaker:"-command, which can be found under General Object Commands -> Pilots.

The face and voice id often correspond to the page ids (without the game specific id 30 = X3R, 35 = X3TC, 38 = X3AP) that have spoken texts (voice="yes"). So in your example, a pilot with the voice id=111 and face id=111 will be shown as an Argon/Terran Male.

The reference to the video files is stored in a types-file called "Videos.txt" and includes the start and end points of the video streams.


Edit: Nice images, but they are a bit too large to be posted with img-tags in the forum, so I removed the img-tags.
Nun verfügbar! X3: Farnham's Legacy - Ein neues Kapitel für einen alten Favoriten

Die komplette X-Roman-Reihe jetzt als Kindle E-Books! (Farnhams Legende, Nopileos, X3: Yoshiko, X3: Hüter der Tore, X3: Wächter der Erde)

Neuauflage der fünf X-Romane als Taschenbuch

The official X-novels Farnham's Legend, Nopileos, X3: Yoshiko as Kindle e-books!

dertien
Posts: 274
Joined: Tue, 22. Feb 05, 13:27
x2

Post by dertien » Mon, 13. Aug 12, 16:20

Hello Illuminatus,

That is what I am looking for and I thank you for this quick reply. Will be testing that later, since I am now video editing the vanilla mpeg file and replacing the muppet vids with stills.

Lovely, I am getting somewhere here.

Thank you again, could not have found that on my own, or it would have taken a week.

dertien
Posts: 274
Joined: Tue, 22. Feb 05, 13:27
x2

Post by dertien » Mon, 13. Aug 12, 23:23

Hm, I thought it would be a little simpler to add new pilots to the list.

So if I understand correctly Illuminatus, the list is you have put there has a restricted/fixed number of ID's for faces.

Code: Select all

id      face 

Argon: 
101      Military Female 
102      Military Male 
103      Military Officer 
104      Transporter Female 1 
105      Transporter Female 2 
106      Transporter Male 1 
107      Argon Male 
108      Argon Male 
109      Argon Female 

Boron: 
201      Boron 1 
202      Boron 2 
203      Boron 3 
204      Boron 4 
205      Boron 5 

Split:       
301      Split 1 
302      Split 2 
303      Split 3 
304      Split 4 
305      Split 5 

Paranid:    
401      Paranid 1 
402      Paranid 2 
403      Paranid 3 
404      Paranid 4 
405      Paranid 5 

Teladi: 
501      Teladi 1 
502      Teladi 2 
503      Teladi 3 
504      Teladi 4 
505      Teladi 5 

Pirate: 
811      Pirate Argon Female 
812      Pirate Argon Male 1 
813      Pirate Argon Male 2 
821      Pirate Boron 1 
822      Pirate Boron 2 
831      Pirate Split 1 
832      Pirate Split 2 
841      Pirate Paranid 1 
842      Pirate Paranid 2 
851      Pirate Teladi 1 
852      Pirate Teladi 2 

Goner: 
901      Goner Priest 1 
902      Goner Priest 2 

Terran: 
1131     Terran Male 1 
1132     Terran Female 1 
1133     Terran Male 2 
1134     Terran Female 2 
1135     Terran Male 3 
1136     Terran Male 4 
1137     Terran Female 3 
1138     Terran Male 5 
1139     Terran Male 6 
1140     Terran Female 4 

Special Characters: 
120      Elena Kho 
121      Saya Kho 
122      Brett Sara / Exterminator 
126      Julian Brennan 
131      Argon Female (info terminal) 
142      Argon / Terran female (unknown) 
158      Ban Danna 
815      Don Tony Marani 
816      Miria Marani 
910      Kyle Brennan 
915      Thomus Becket 
916      Ion 
917      Dogun 
1141     computer interface 
1100-    ware images 
1129
I tried to add some entries in the videos file from 306-325 that should call up Julians face, and had a little contact test fly about in a split sector. That didn't do zip, as I expected.

Is there any script that you are aware of that goes through an array of these id's, and attaches it to a ship or is this list loaded from another list where you could simply add new entries to ?

That would be great since I have a whole lot of avatars, especially for the Terrans, ATF and Argons.

- Edit:

I am not a scripter, but is it possible to create a working script that:

a) evaluates what ID a ship has; for example

ID 102, military male (based on ship-race for example)

Then runs another script according to that ID=102 that would randomly choose a line from argonmilitary.txt and associate that with an entry in the videos.txt file ?

Is that even feasible or am I just dreaming away here ?

User avatar
mikhailskatchkov
Posts: 816
Joined: Sat, 5. Apr 08, 23:11
x3ap

Race1 avatars

Post by mikhailskatchkov » Sat, 16. Apr 16, 13:39

Mike here from the Star Wars mod.
Im trying the same thing here though i would like to add Voice and Vid IDs for "RACE1" and have no clue where to start even.
So any further info would be great.

Trying to add a race here with their own avatars, well actually even if i can get em to use atleast the Argon avatars that would be a good start coz at the moment there is nothing.

User avatar
X2-Illuminatus
Moderator (Deutsch)
Moderator (Deutsch)
Posts: 24965
Joined: Sun, 2. Apr 06, 16:38
x4

Post by X2-Illuminatus » Sat, 16. Apr 16, 14:26

The easy workaround would be writing a script that creates the pilot with the dedicated face and voice id (for example reusing Terran or Argon voices/faces). The MSCI article of the "create passenger" command linked above and the "move passenger to ship" command linked within should contain all the necessary pieces information to do so. You just need to tie that script into your usual ship creating process. So reference it either within a job script, or (as I think you cannot add race 1/2 jobs, can you?) in your own ship creating script (i.e. your selfmade job script).

To add own faces and voices (for X3AP), you would probably have to do the following:
1. Add own faces (face animations) to the mov\00001.dat file.
2. Edit addon\types\video.txt, so that it references your new faces.
3. Add own voice recordings to addon\mov\00244.dat.
4. Add the (voice) texts to addon\t\0001-L044.xml.
5. Connect text and voice file by adding the relevant (stream) information (start and length of audio streams) to addon\mov\00044.pck.

I haven't really tried any of that, as it's a lot of work. But that's what I think would be necessary.
Nun verfügbar! X3: Farnham's Legacy - Ein neues Kapitel für einen alten Favoriten

Die komplette X-Roman-Reihe jetzt als Kindle E-Books! (Farnhams Legende, Nopileos, X3: Yoshiko, X3: Hüter der Tore, X3: Wächter der Erde)

Neuauflage der fünf X-Romane als Taschenbuch

The official X-novels Farnham's Legend, Nopileos, X3: Yoshiko as Kindle e-books!

Post Reply

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