Silence "One of your ships is under attack" audio warning
Moderators: Moderators for English X Forum, Scripting / Modding Moderators
Silence "One of your ships is under attack" audio warning
I assume this question has come up before but my Google-fu is not finding much, Either it's impossible to solve or I don't know how to search for it. The only I found is this:
http://forum.egosoft.com/viewtopic.php?t=262893
On that thread one user asks the author how to get rid of this message and he replies that all sounds are in one big file and positions are expressed in ms values. I don't want to reply on that thread and resurrect a 2009 thread. So I'm asking here: is there a way to change the position where the message starts/end? If so, we could have it defined to take 1ms so it's effectively silent.
If that doesn't work, next thing would be a patched sound file. If the file is too big to distribute (there may be copyright issues with that too) I could make a patcher program, run it and it extracts and patches the original file by making the warning by silent (I see X3 files are .wav files so binary patching to introduced silence shouldn't be too complicated).
Thanks!
http://forum.egosoft.com/viewtopic.php?t=262893
On that thread one user asks the author how to get rid of this message and he replies that all sounds are in one big file and positions are expressed in ms values. I don't want to reply on that thread and resurrect a 2009 thread. So I'm asking here: is there a way to change the position where the message starts/end? If so, we could have it defined to take 1ms so it's effectively silent.
If that doesn't work, next thing would be a patched sound file. If the file is too big to distribute (there may be copyright issues with that too) I could make a patcher program, run it and it extracts and patches the original file by making the warning by silent (I see X3 files are .wav files so binary patching to introduced silence shouldn't be too complicated).
Thanks!
Read this post. Especially what Litcube said.
Sorry for being too lazy :D
Google is smarter than I:
http://www.arcl07.dsl.pipex.com/x3tc/t13.speach.xml
Seems to be page 13, id=1100019:
Google is smarter than I:
http://www.arcl07.dsl.pipex.com/x3tc/t13.speach.xml
Seems to be page 13, id=1100019:
Code: Select all
<t id="1100019">Attention: One of your ships is under attack</t>
Wow, I love how accessible is this game in terms of modding, someone like me with 0 modding experience whatsoever can spend 15 minutes to vastly improve the enjoyment of the game by removing an annoying message like that.
Thanks for your help, I commented out the line in the marker file that defined the audio part of that message and the message is silent now, yay! It's interesting that other lines were also commented out (some about missiles), this was probably done by XTM 2.2a that I'm playing with.
More questions :) I want to make this "mod" as a separate archive of some sort so that I can:
1. distribute it here so anyone else can use it
2. save it personally to use it later, after I give up on X3 again and then pick it up again some years from now (this has happened before). It will be much more easier for me to install all these changes as separate archives (say using the Plugin Manager) rather than have to remember what file to modify and how.
So, is there a way to disable that audio message with a separate archive but WITHOUT having to distribute the FULL (modified) marker file? The problem with distributing the full file is that it's a copy of whatever marker file I start with (which may be vanilla or XTM modified or whatever) so it's a very incompatible approach. I'd like to find a compatible approach, that basically just somehow "overrides" the settings for that audio message but is compatible with most mods and vanilla.
Thanks!
Thanks for your help, I commented out the line in the marker file that defined the audio part of that message and the message is silent now, yay! It's interesting that other lines were also commented out (some about missiles), this was probably done by XTM 2.2a that I'm playing with.
More questions :) I want to make this "mod" as a separate archive of some sort so that I can:
1. distribute it here so anyone else can use it
2. save it personally to use it later, after I give up on X3 again and then pick it up again some years from now (this has happened before). It will be much more easier for me to install all these changes as separate archives (say using the Plugin Manager) rather than have to remember what file to modify and how.
So, is there a way to disable that audio message with a separate archive but WITHOUT having to distribute the FULL (modified) marker file? The problem with distributing the full file is that it's a copy of whatever marker file I start with (which may be vanilla or XTM modified or whatever) so it's a very incompatible approach. I'd like to find a compatible approach, that basically just somehow "overrides" the settings for that audio message but is compatible with most mods and vanilla.
Thanks!
Thanks again man, you're a lifesaver!
So let me get this straight. Fake patches are collections of modified files (collected in cat/dat pairs). They are numbered and the highest number to include a file makes that file version take precedence of all others. This means that if I need to comment out a line from the mov/00044.pck sound marker file, I still have to make a full copy of the file that I want to modify (starting with some version of it), then comment that line out, then include the fully modified file in a new cat/dat pair. Then when that pair is activated last (or at least, last pair that includes the modified file) it will take precedence.
This however still has the problem I was trying to solve. I have to include the full modified file in the fake patch. So if I take the file to modify after installing Xtended Mod 2.2 then it will only work with that setup and if I ever decide to buy and play Albion Prelude it won't work there because the base marker file is probably very different. Is there a way to perform an effective change to a file without overriding the full contents of that file? (kinda like how Unix diff/patch work)
Alternatively, is there a way to override the page number/message-id set from t/0001-L044 for this message? If I can do that (and assign some unused page-number/message-id), then, without a sound marker associated with this unused page-number/message-id it just won't play any audio.
Sorry if again I missed something from that thread you pointed me to :)
So let me get this straight. Fake patches are collections of modified files (collected in cat/dat pairs). They are numbered and the highest number to include a file makes that file version take precedence of all others. This means that if I need to comment out a line from the mov/00044.pck sound marker file, I still have to make a full copy of the file that I want to modify (starting with some version of it), then comment that line out, then include the fully modified file in a new cat/dat pair. Then when that pair is activated last (or at least, last pair that includes the modified file) it will take precedence.
This however still has the problem I was trying to solve. I have to include the full modified file in the fake patch. So if I take the file to modify after installing Xtended Mod 2.2 then it will only work with that setup and if I ever decide to buy and play Albion Prelude it won't work there because the base marker file is probably very different. Is there a way to perform an effective change to a file without overriding the full contents of that file? (kinda like how Unix diff/patch work)
Alternatively, is there a way to override the page number/message-id set from t/0001-L044 for this message? If I can do that (and assign some unused page-number/message-id), then, without a sound marker associated with this unused page-number/message-id it just won't play any audio.
Sorry if again I missed something from that thread you pointed me to :)
OK, that last question was stupid. There doesn't seem to be anything in the game associating messages with IDs, the text resource files do the reverse, they associate IDs with messages (audio and text). The semantical purpose of the ID is hardcoded in the game code and scripts (ie when a script/code wants to issue a message it references some hardcoded ID which is then looked up by the engine in the text resource files). The ID -> message translation is probably done in order to support internationalization (different languages for text/audio).
So anyway, there doesn't seem to be a way to override just one line of the mov/00044.pck with a mod, you have to ship the fully (modified) mov/00044.pck file which means this change becomes incompatible with anything other mod that changes the original mov/00044.pck file. Oh well.
So anyway, there doesn't seem to be a way to override just one line of the mov/00044.pck with a mod, you have to ship the fully (modified) mov/00044.pck file which means this change becomes incompatible with anything other mod that changes the original mov/00044.pck file. Oh well.
... if you want to overwrite the text spoken by betty:
--> find the id of the text you want to replace with <<nothing>> (i think it is page id 13 text id 1100019)
--> add a text entry in your text file with the same id of betty´s text an reference it to a non-existent text id (e.g. {13,0} which means page id 13 text id 0)
(text file) 9999-L044.xml
(script) setup.mytext.xml
problem is that you cant avoid betty to speak the sector name afterwards (i guess)
*here* i made something similar for the station anouncements (english & german text file)
--> create your own text file... betty ... wrote:Attention: One of your ships is under attack
--> find the id of the text you want to replace with <<nothing>> (i think it is page id 13 text id 1100019)
--> add a text entry in your text file with the same id of betty´s text an reference it to a non-existent text id (e.g. {13,0} which means page id 13 text id 0)
(text file) 9999-L044.xml
Code: Select all
<?xml version="1.0" encoding="utf-8" ?>
<language id="44">
<page id="13" >
<t id="1100019">{13,0}</t>
</page>
</language>
Code: Select all
load text: id=9999
reeturn null
*here* i made something similar for the station anouncements (english & german text file)
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
Irren ist menschlich. Aber wenn man richtig Fehler machen will, braucht man einen Computer.
Mission Director Beispiele
Wow, nice trick. So essentially by redefining the text ID entry with something that references a missing ID, it becomes invalid and will be ignored by the engine as if it's not even defined. I'll try this at home, thanks for the help!
I'm not bothered by the sector name issue because apparently (I'm playing XTM 2.2a) in my game Betty never adds the spoken sector name after the "your ship is under attack" audio. After I modified the marker file in my game it was a much better gaming experience, fighting has become a real pleasure in this game.
One last (stupid) question, how would precedence be resolved?
I mean, I have X3:TC 3.2, Xtended Mod 2.2b. X3:TC comes with everything in its vanilla cat/dat files. XTended Mod 2.0 adds its own cat/dat files. The Xtended mod 2.2 patch (and the 2.2a hotfix) are installed as unpacked files in the various directories (t/ scripts/ etc...). I also have a few other scripts/mods installed that install as unpacked files (SEWN, Dockware Manager, Ship Browser, Galaxy Asteroid Yield, Enhanced Mission Briefings).
If I do what you suggested, will that override all of these or do I need to mess up with the fake patch stuff?
Thanks again!
I'm not bothered by the sector name issue because apparently (I'm playing XTM 2.2a) in my game Betty never adds the spoken sector name after the "your ship is under attack" audio. After I modified the marker file in my game it was a much better gaming experience, fighting has become a real pleasure in this game.
One last (stupid) question, how would precedence be resolved?
I mean, I have X3:TC 3.2, Xtended Mod 2.2b. X3:TC comes with everything in its vanilla cat/dat files. XTended Mod 2.0 adds its own cat/dat files. The Xtended mod 2.2 patch (and the 2.2a hotfix) are installed as unpacked files in the various directories (t/ scripts/ etc...). I also have a few other scripts/mods installed that install as unpacked files (SEWN, Dockware Manager, Ship Browser, Galaxy Asteroid Yield, Enhanced Mission Briefings).
If I do what you suggested, will that override all of these or do I need to mess up with the fake patch stuff?
Thanks again!
nomemeics wrote:If I do what you suggested, will that override all of these or do I need to mess up with the fake patch stuff?
--> copy & paste the code above in a text file & save it as .xml format
--> activate the script editor & create a script (name = "setup.xxxwhateverxxx"), add the "load text"-instruction etc. as described before
(or simply download the files from the link above & edit that text file)
then paste the text file in your t-folder & the script "setup.blablabla" in your scripts-folder
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
Irren ist menschlich. Aber wenn man richtig Fehler machen will, braucht man einen Computer.
Mission Director Beispiele
Cool, I was going to use XEditor2 for the text resource file and Exscriptor for writing the script. They make it really easy to do those tasks :)
For my knowledge, what is the order of running the setup.* scripts that are unpacked in the scripts/ directory? Undefined? (ie random, filesystem order dependent, moon phase dependent, etc)
For my knowledge, what is the order of running the setup.* scripts that are unpacked in the scripts/ directory? Undefined? (ie random, filesystem order dependent, moon phase dependent, etc)
... a setup.script is a script, which executes itself when loading your savegame / starting a new game
... in this case it only loads the text file in your game, in other scripts packages for example they "install" new commands / hotkeys / etc.
ps. it´s up to you HOW you create those files, notepad can also create .xml files ^^
... in this case it only loads the text file in your game, in other scripts packages for example they "install" new commands / hotkeys / etc.
ps. it´s up to you HOW you create those files, notepad can also create .xml files ^^
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
Irren ist menschlich. Aber wenn man richtig Fehler machen will, braucht man einen Computer.
Mission Director Beispiele
Yes I get that and I thank you for all your answers. My question (maybe a bit irrelevant to the topic of this thread), what is the order in which the setup.* scripts are executed. If I have scripts/setup.foo.xml and scripts/setup.bar.xml which one is executed first? Or is that unspecified and generally nobody can rely on this ordering. Thanks!
IDK if this is helpful to your question about the order of setup.* scripts, but they are generally written such that order is unimportant. Often each mod will only have one setup script that will handle all the setup for that mod, so order of execution isn't ever a concern.
Should you need to make sure that something is done after all the setups have been called, you might start a new task from within your setup script.
setup.my.important.stuff:
my.after.setup.script:
Should you need to make sure that something is done after all the setups have been called, you might start a new task from within your setup script.
setup.my.important.stuff:
Code: Select all
START $null -> call script 'my.after.setup.script': param='whatever'
Code: Select all
=wait 10000 ms
... do important after setup stuff ...