Betty Help?

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
gamer993
Posts: 575
Joined: Mon, 18. Aug 08, 14:12
xr

Betty Help?

Post by gamer993 » Tue, 8. Sep 15, 06:14

Hello all, I am looking for some info on how to mod Betty. I have several sectors that I created, and they have names that match up with several words Betty already says. (such as crystal star, both words are already in game). My question is this, how do you make Betty announce the sector name when you jump in? IE she says entering sector ______. If I stitch the sound files together how would I "attach" them so she says it when entering the sector?

I read these -->

http://forum.egosoft.com/viewtopic.php?t=187374
http://forum.egosoft.com/viewtopic.php?t=268926

But I am still pretty confused, what all do I need to do besides extract 00144.dat and find the words I want and extract them. How would I add them back on to the file?

Thanks!
A person is smart, people are dumb, stupid panicky animals, and you know it.

X2 and TC the best of the X games!
My X2 M6 Uses guide

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

Post by Cycrow » Tue, 8. Sep 15, 11:52

As well as the dat file, you will also need to edit the pck/xml file, 00144.pck
Which list all the timing of the voice and matches them to a page/id

however, if all the sounds exists already, you dont need to extract and add them back to the dat file, you simply edit the xml file and point new text ids to the existing sound positions.

You can also create text that joins multiple text/voices together.

how you attach them to sectors, is to simply use the correct page/id
the id is made up from the x/y coordinates of the sector

you should look in the main text file, 0001-L044.xml.
This defines all the text, this then links with the voice file to add the voices

User avatar
JSDD
Posts: 1378
Joined: Fri, 21. Mar 14, 20:51
x3tc

Post by JSDD » Tue, 8. Sep 15, 12:50

gamer993 wrote:IE she says entering sector ______. If I stitch the sound files together how would I "attach" them so she says it when entering the sector?

I read these -->

http://forum.egosoft.com/viewtopic.php?t=187374
http://forum.egosoft.com/viewtopic.php?t=268926

But I am still pretty confused, what all do I need to do besides extract 00144.dat and find the words I want and extract them. How would I add them back on to the file?
... you mentioned "crystal star":
afaik the word "star" isnt spoken solely, i.e. it's available in "guiding star" or "starburst", so you have to extract the voice "star" from guiding star or starburst

how to extract that word ??

--> create a new text file, create a new pageID, for example file "7777-L044.xml" which contains:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<language id="44">

<page id="7777">
  <!--here your text pieces-->
  <t id="1">Star</t>
</page>

</language>
now you have only the text piece "star", to link it to the voice piece stoken "star", extract the file "00044.pck" using 7zip, you should get a file "0044" without file extention, open it with "notepad++", save it as "0044.xml"
the first 3 lines look like these:

Code: Select all

<?xml version="1.0" ?>
<language id="44">
<page id="3919" stream="1">
...
go to the end of that file, and append (before the bracket </language> !!!) a new page ID like this:

Code: Select all

<page id="7777" stream="1">
  <t id="1" s="xxxx" l="yyyy"/>
</page>
now you have to find out what numbers must replace xxxx and yyyy
s= starting time in milliseconds
l= length in miliiseconds


find "Starburst" in the vanilla t files --> it is pageID 17 textID 4711
allright, now copy the string "4711", go into 0044.xml, press CTRL + F, and find the corresponding line:
line 9004: <t id="4711" s="35433195" l="1271"/>
you see that the duration of the voice piece "starburst" is 1271 ms, i would guess that the piece "star" is about 500ms, so:
xxxx = 35433195 (voice begins at this point of time)
yyyy = 500
replace them!!

now you have linked the text piece "star" to the corresponding voice piece, but to rename a sector you have to create a new text piece (in your file "7777-L044.xml") an link the text pieces together:
(i will use pageID 17 textID 2053 for the piece "crystals")

Code: Select all

<!--sector names-->
<page id="7">
 <!--sector x=21 y=17-->
 <t id="1021822">{17,2053} {7777,1}</t>
</page>
now you have renamed the sector x=21 y=17 to "Crystals Star" with voice ;)
but considering that packed files are favoured by the game engine, you have to delete (or even better: replace) the original "0044.pck"
(simply create a folder in \mov named "\orig-files" and move it in there)

ps: pageID 7 are the sector names, pageID 19 their descriptions, the textID
1021822 is made up like the following:
102 + (y+1) + (x+1) ... in case (21|17) is results in: 102 18 22
the same for descriptions, just use 103 instead of 102
you can link multiple text pieces together by referencing them via {pageID,textID}
To err is human. To really foul things up you need a computer.
Irren ist menschlich. Aber wenn man richtig Fehler machen will, braucht man einen Computer.


Mission Director Beispiele

gamer993
Posts: 575
Joined: Mon, 18. Aug 08, 14:12
xr

Post by gamer993 » Tue, 8. Sep 15, 16:24

Cycrow wrote:As well as the dat file, you will also need to edit the pck/xml file, 00144.pck
Which list all the timing of the voice and matches them to a page/id

however, if all the sounds exists already, you dont need to extract and add them back to the dat file, you simply edit the xml file and point new text ids to the existing sound positions.

You can also create text that joins multiple text/voices together.

how you attach them to sectors, is to simply use the correct page/id
the id is made up from the x/y coordinates of the sector

you should look in the main text file, 0001-L044.xml.
This defines all the text, this then links with the voice file to add the voices
Ah didn't realize about the 00144.pck, where is it located? Which folder? Doesn't sound too hard.
A person is smart, people are dumb, stupid panicky animals, and you know it.

X2 and TC the best of the X games!
My X2 M6 Uses guide

gamer993
Posts: 575
Joined: Mon, 18. Aug 08, 14:12
xr

Post by gamer993 » Tue, 8. Sep 15, 16:27

JSDD wrote:
gamer993 wrote:IE she says entering sector ______. If I stitch the sound files together how would I "attach" them so she says it when entering the sector?

I read these -->

http://forum.egosoft.com/viewtopic.php?t=187374
http://forum.egosoft.com/viewtopic.php?t=268926

But I am still pretty confused, what all do I need to do besides extract 00144.dat and find the words I want and extract them. How would I add them back on to the file?
... you mentioned "crystal star":
afaik the word "star" isnt spoken solely, i.e. it's available in "guiding star" or "starburst", so you have to extract the voice "star" from guiding star or starburst

how to extract that word ??

--> create a new text file, create a new pageID, for example file "7777-L044.xml" which contains:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<language id="44">

<page id="7777">
  <!--here your text pieces-->
  <t id="1">Star</t>
</page>

</language>
now you have only the text piece "star", to link it to the voice piece stoken "star", extract the file "00044.pck" using 7zip, you should get a file "0044" without file extention, open it with "notepad++", save it as "0044.xml"
the first 3 lines look like these:

Code: Select all

<?xml version="1.0" ?>
<language id="44">
<page id="3919" stream="1">
...
go to the end of that file, and append (before the bracket </language> !!!) a new page ID like this:

Code: Select all

<page id="7777" stream="1">
  <t id="1" s="xxxx" l="yyyy"/>
</page>
now you have to find out what numbers must replace xxxx and yyyy
s= starting time in milliseconds
l= length in miliiseconds


find "Starburst" in the vanilla t files --> it is pageID 17 textID 4711
allright, now copy the string "4711", go into 0044.xml, press CTRL + F, and find the corresponding line:
line 9004: <t id="4711" s="35433195" l="1271"/>
you see that the duration of the voice piece "starburst" is 1271 ms, i would guess that the piece "star" is about 500ms, so:
xxxx = 35433195 (voice begins at this point of time)
yyyy = 500
replace them!!

now you have linked the text piece "star" to the corresponding voice piece, but to rename a sector you have to create a new text piece (in your file "7777-L044.xml") an link the text pieces together:
(i will use pageID 17 textID 2053 for the piece "crystals")

Code: Select all

<!--sector names-->
<page id="7">
 <!--sector x=21 y=17-->
 <t id="1021822">{17,2053} {7777,1}</t>
</page>
now you have renamed the sector x=21 y=17 to "Crystals Star" with voice ;)
but considering that packed files are favoured by the game engine, you have to delete (or even better: replace) the original "0044.pck"
(simply create a folder in \mov named "\orig-files" and move it in there)

ps: pageID 7 are the sector names, pageID 19 their descriptions, the textID
1021822 is made up like the following:
102 + (y+1) + (x+1) ... in case (21|17) is results in: 102 18 22
the same for descriptions, just use 103 instead of 102
you can link multiple text pieces together by referencing them via {pageID,textID}
Wow thank you for the excellently detailed description! Doesn't sound terrible hard to understand, I think it is something I can do!
A person is smart, people are dumb, stupid panicky animals, and you know it.

X2 and TC the best of the X games!
My X2 M6 Uses guide

Post Reply

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