Page 1 of 2 12 LastLast
Results 1 to 20 of 25

Thread: Creating a World - Developer's Setup Kit for Sound Editing

  1. #1
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,095
    Blog Entries
    35

    Default Creating a World - Developer's Setup Kit for Sound Editing

    IntroductionThe most common way of providing custom sound in a mod is to include the generated IDX an DAT files, usually omitting the TXT files and any supporting sound files. This provides a major inconvenience when having to update sounds: a newly generated IDX\DAT set will have to provided which can run into hundreds of MB in the case of 'music' regardless of the extent of the change.

    Winner of 3rd place in the 2019 'Favorite Tool & Resource for TW2 Engine' competition

    Easy AlternativeThis installation provides an easy to use base for editing sound and animation files as well as a one click solution to generate new IDX\DAT files.
    The ease of use principle should encourage modders to provide their mods with the original sound and animation files while encouraging the modding efforts of others. It also makes updating a mod extremely simple affair and in the case of sounds keeps the update to a low file size.
    The InstallerWith the above in mind I have created an installer that will provide a working mod folder (battles only**) dedicated to the working with sounds and animations. It contains the following:
    • The original sound TXT files as available here
    • The animation files provided here plus the updated ram animations from kingdoms
    • A set of zero byte IDX\DAT files for sound and animation (more in the 'The BAT file' section)
    • A custom BAT file automating the generating of IDX\DAT files (more in the 'The BAT file' section)
    • A CFG file with a dedicated log section, the log itself easily available by the provided desktop shortcut

    ** To test in a campaign simply copy the data\world folder from the default game into the mod, these files were not provided to keep the download small and uncluttered.
    The BAT fileThis is the heart of the process and works as follows:
    • copies the zero byte IDX\DAT files into their respective directories, forcing the game to generate new files
    • renames the original game's data\animation directory
    • starts the mod in Steam compatible mode
    • after a wait of 20 seconds reverses the directory renaming

    All of this effectively means that you only have to edit your files and start the mod to be able to test.

    Spoiler for BAT file coding
    Code:
    @echo off
    REM --- copying zero byte files
    xcopy data\animations\_zerobytefiles\*.* data\animations /q /y
    xcopy data\sounds\_zerobytefiles\*.* data\sounds /q /y
    REM --- going up two levels to main game level
    cd ..\..
    REM --- going to the data subfolder and renaming the main game's animation folder
    cd data
    ren animations animations_backup
    REM --- going back up one level to main game level
    cd .\..
    REM --- standard universal batch file
    IF EXIST kingdoms.exe (start kingdoms.exe @%0\..\Configuration.cfg) ELSE (
    IF EXIST medieval2.exe (start medieval2.exe @%0\..\Configuration.cfg) ELSE (
        echo ERROR: Cannot find the M2TW or Kingdoms executable.
        echo You probably installed this mod into the wrong folder.
        pause
      )
    )
    REM --- pausing the processing of commands for 20 seconds
    timeout 20
    REM --- reversing the renaming AFTER timeout has expired:
    REM --- going to the data subfolder and renaming the main game's animation folder
    cd data
    ren animations_backup animations
    Set up for upload in a larger modGeneral
    Use the provided BAT file for your mod (no edit required)
    To use the provided CFG file simply edit the mod folder name in the [features] section, edit the log's name at your convenience
    Sound
    Provide all sound TXT files and the full content (including zerobytefiles folder) of the data\sounds directory without any DAT\IDX files
    Should your mod generate IDX\DAT files beyond the set in the zerobytefiles folder then create the additional requirement by a simple copy\rename of existing zero byte files
    Animation
    Provide the descr_skeleton file and the full content (including zerobytefiles folder) of the data\animations directory without any DAT\IDX files
    Note
    The BAT file will generate the required IDX\DAT files at the first start of the mod
    Working Examples and Application
    Animations
    • Open descr_skeletons.txt and go to line 290
    • Replace the CAS file entry (Strat_Diplomat_stand_A_idle.cas) with the one from the 'die_to_back_right_1' line (Strat_Diplomat_backward_1.cas)
    • Save
    • Start Dev Kit with the desktop shortcut
    • Play as England and have your diplomat in France attempt diplomacy in Angers
    • Watch him fall over backwards instead of doing his diplomatic dance

    To implement that in your properly set up mod will only require to upload the edited descr_skeleton file.
    Tip: always keep custom files in custom folders for easy updating.
    Sounds
    • Create the data\sounds\music directory
    • Place into it a MP3 file of your choice
    • Rename the file to (Credits)_We_are_all_one
    • Start Dev Kit with the desktop shortcut
    • Go to Options\View the Credits and listen to your sound track

    To implement that in your properly set up mod will only require to upload the new sound track
    Download and Installation
    This is one of my 'click through' installations. As long as your registry is fine the installer will find the correct installation path. If not, simply follow the instruction displayed in the installer
    Last edited by Gigantus; May 21, 2020 at 07:12 AM.










  2. #2
    Withwnar's Avatar Script To The Waist
    Join Date
    Oct 2008
    Location
    Earth
    Posts
    6,329

    Default Re: Creating a World - Developer's Setup Kit for Sound Editing

    Good one, Gigantus.

    renames the original game's data\animation directory
    You mean in the data folder of the base/core game not the mod's data folder, yes? Why does it need to do that? I've never worked with animations so maybe that's a noob question.

    The BAT file will generate the required IDX\DAT files at the first start of the mod
    That sounds like it only happens the first time you run the mod. But wouldn't it generate them on every running of the mod? Or is this BAT only intended to be used on the first run, and after that players should launch it in the normal way?

  3. #3
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,095
    Blog Entries
    35

    Default Re: Creating a World - Developer's Setup Kit for Sound Editing

    For some reason animations require the default game's IDX\DAT files to be unavailable for generating to be able to use the 'unpacked' animation files for generating. Very unlike sound generation.

    The generating will happen every time you start the mod - the music generating causes a delay of roughly 2-3 seconds at start up depending on your processing power, animations is barely measurable. I have yet to experiment with file calling within a BAT file - it would require a second BAT file to replace this one with a regular one for use in updates.
    The rather short delay however did not seem to warrant that.










  4. #4
    Lifthrasir's Avatar "Capre" Dunkerquois
    Patrician Moderator Emeritus

    Join Date
    Jan 2010
    Location
    City of Jan Baert
    Posts
    13,950
    Blog Entries
    4

    Default Re: Creating a World - Developer's Setup Kit for Sound Editing

    Oh Man, this (the sounds) couldn't come at a better time. I'll have a look at it. Many thanks for this Gig

    Edit: quick question: is the sounds kit works for all versions of the game? I mean - if this seems to be ok for a Steam version, what about the disk version of the game, especially the non-english one?
    I'm asking because for my mod, there are some sounds and voices missing for the non-english version of the game.
    Last edited by Lifthrasir; December 09, 2019 at 02:05 AM.
    Under the patronage of Flinn, proud patron of Jadli, from the Heresy Vault of the Imperial House of Hader

  5. #5
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,095
    Blog Entries
    35

    Default Re: Creating a World - Developer's Setup Kit for Sound Editing

    The language used\installed shouldn't really matter as I would think the TXT files are the same**, nor does it matter if it is the steam or disk version. It works just the same for all.

    For some languages the local sound (mp3) files are missing and hence some accents are not working. I am guessing you are talking about German, check here how to fix that particular issue. It's a very simple matter of re-allocating the accent of some of the factions in descr_sounds_accents.

    ** I changed the local language in my desk version to German to test the issue in the linked resource and generated new IDX\DAT files from these TXT files after the descr_sounds_accent adjustment without a problem.
    Last edited by Gigantus; December 09, 2019 at 10:14 PM.










  6. #6
    Lifthrasir's Avatar "Capre" Dunkerquois
    Patrician Moderator Emeritus

    Join Date
    Jan 2010
    Location
    City of Jan Baert
    Posts
    13,950
    Blog Entries
    4

    Default Re: Creating a World - Developer's Setup Kit for Sound Editing

    I thought some version didn't get the same amount of accent compare to the english one? It seems that the french disk version of the game has some missing voices with SSHIP
    Under the patronage of Flinn, proud patron of Jadli, from the Heresy Vault of the Imperial House of Hader

  7. #7
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,095
    Blog Entries
    35

    Default Re: Creating a World - Developer's Setup Kit for Sound Editing

    That's exactly was I was saying - the language specific stuff (mainly strat voices and all the data\text files) is in the localized.pack file - for the German version (the link I gave) no sound files were provided for the Eastern_european and Scottish accent, hence the relevant factions were totally mute on the strat map.

    Check which accent the mute factions have in the French version and adjust descr_sounds_accents accordingly, then generate a new set of IDX\DAT files. You have the means now for that easy a fix, don't you?

    Once again - it's not the TXT files that are the culprit, it's the missing sound files of the localized pack files. To be a bit cheeky - if CA had used my update system they only would have had to provide an edited descr_sounds_accents file and they would have been spared this embarrassment of mute factions
    Last edited by Gigantus; December 10, 2019 at 02:44 AM.










  8. #8
    Lifthrasir's Avatar "Capre" Dunkerquois
    Patrician Moderator Emeritus

    Join Date
    Jan 2010
    Location
    City of Jan Baert
    Posts
    13,950
    Blog Entries
    4

    Default Re: Creating a World - Developer's Setup Kit for Sound Editing

    I don't have a french version of the game. My both versions (disk and Steam) are in english. Ironic for a French, isn't it?

    Seriously, if I get you right, I just need to ask the guys who reported that issue to send me or to check their descr_sounds_accents.txt file to find out. But there's a modified version of that file in out latest release. Could this be due to missing entries in the voice folder, itself located in the sounds folder? If yes, I'd just need to extract the sounds folder from the original game (in English) and would need to include in in my mod. At least, it will work in english. Am I right?
    Under the patronage of Flinn, proud patron of Jadli, from the Heresy Vault of the Imperial House of Hader

  9. #9
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,095
    Blog Entries
    35

    Default Re: Creating a World - Developer's Setup Kit for Sound Editing

    Correct, default would be to simply cross check the mute factions against their accent allocation and change to it 'live' accent. that change only affects the events.dat\idx files (6MB max, compressed less then1MB) so you could simply provide these files plus the edited TXT file as interim solution










  10. #10
    Lifthrasir's Avatar "Capre" Dunkerquois
    Patrician Moderator Emeritus

    Join Date
    Jan 2010
    Location
    City of Jan Baert
    Posts
    13,950
    Blog Entries
    4

    Default Re: Creating a World - Developer's Setup Kit for Sound Editing

    I'll see what Ican do
    Many thanks for your help again
    Under the patronage of Flinn, proud patron of Jadli, from the Heresy Vault of the Imperial House of Hader

  11. #11
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,095
    Blog Entries
    35

    Default Re: Creating a World - Developer's Setup Kit for Sound Editing

    UPDATE


    Winner of 3rd place in the 2019 'Favorite Tool & Resource for TW2 Engine' competition











  12. #12

    Default Re: Creating a World - Developer's Setup Kit for Sound Editing

    Hi Gigantus! May I ask?
    if I know that steam version for example does not have 3 these files in Voice.dat:

    German_General_Selected_Chivalry_1
    German_General_Selected_Chivalry_2
    German_General_Selected_Chivalry_4

    These files are not directly in the Steam version. (I myself recently compared the unpacked sound files with the CD version), and hence the question, in order to fix this, I need
    take missing voice files (from English, French, Polish version of game - doesn't matter) and pack them with all sounds files and music separately for players from each country? (Oh God, this is bad. Tell me it's not, please)

    Assuming that my mod will be translated into 5 other languages, and if I want to satisfy for them the need to fix this deficiency - for m2tv players of all countries (localization for which was released on steam - there are like 7-8 languages)
    Last edited by Leeekaaa; February 02, 2023 at 03:12 PM.

  13. #13
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,095
    Blog Entries
    35

    Default Re: Creating a World - Developer's Setup Kit for Sound Editing

    You can make your life easier - I extracted the missing voice files (bit over 1000 files), get them here.










  14. #14

    Default Re: Creating a World - Developer's Setup Kit for Sound Editing

    Well, I complicated it myself. I found out by comparison unpack cd and steam that 943 files are missing (not counting animals) before I stumbled upon your topic.

    By the way, thanks - because I didn’t pay attention to animals (yes, I don’t need wardogs there, but here’s everything else: horses, camels and elephants - it’s very necessary and important)


    (I'm not very good with English - it's hard to delve into your guide) but tell me please me in simple language: If we talking about mod for m2tw:
    I still have to:
    •delete 8 sound files: idx and dat)
    •generate new files with these (1009-13 (wardogs)) missing files after puting them to sound folder with all my other mods sounds files?.

    In other words, should I do all the same things that I used to do when I packed sounds in my mod before?

    Or does your guide show how to pack these voice sound files into the Steam version itself (ie the original game)?


    Those. if we are talking about mods (and fixing the missing voice files for the steam on which it runs) - then these missing voice files - will they be in the sounds folder of the mod itself in the end?


    And I will have 8 sound files (idx and dat) of the mod - first ones for the cd version and the second ones - for 1.52 (steam)?
    (I don't want mod players to get stressed out by reading all sorts of guides on how to fix this - I want them to have as little body movement as possible before they start playing - because many of them from RF and Ukr and dont know English very well to undaerstand how to use this guide)

    thanks in advance for your reply.
    Last edited by Leeekaaa; February 03, 2023 at 02:40 AM.

  15. #15
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,095
    Blog Entries
    35

    Default Re: Creating a World - Developer's Setup Kit for Sound Editing

    You basically proceed as you would with replacing sound files.

    1. Add files into the data\sounds directory
    2. delete all idx and dat files
    3. Start the game

    If you use this dev kit to do it then afterwards simply make a backup of the sounds directory in the main game's folder and then copy the sounds directory from the dev kit over - that way you'll have it for the main game and all your mods.










  16. #16

    Default Re: Creating a World - Developer's Setup Kit for Sound Editing

    Quote Originally Posted by Gigantus View Post
    You basically proceed as you would with replacing sound files.

    1. Add files into the data\sounds directory
    2. delete all idx and dat files
    3. Start the game

    If you use this dev kit to do it then afterwards simply make a backup of the sounds directory in the main game's folder and then copy the sounds directory from the dev kit over - that way you'll have it for the main game and all your mods.
    Aa My brain is about to explode.


    Can you write point by point (step by step) what should I do to add the missing 943 voice files to the vanilla steam version? (so I don't have to pack them into my mod's sound files)


    I installed the dev kit but I don't understand anything.
    I can't even replace the track (Credits)_We_are_all_one in the Steam version.

    Please be my savior - and explain it in detail

  17. #17

    Default Re: Creating a World - Developer's Setup Kit for Sound Editing




  18. #18
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,095
    Blog Entries
    35

    Default Re: Creating a World - Developer's Setup Kit for Sound Editing

    So far you did everything right. Unfortunately it is very complicated (see those 11 steps in the other guide) to add those voice files to the base game. Adding them to another mod is the same way you added it to the devkit.

    A much easier way then those 11 steps is to simply install and play my Bare Geomod modding set up - it is the main game with a number of small fixes and already includes these voice files. It also has all factions available to play from the start.










  19. #19

    Default Re: Creating a World - Developer's Setup Kit for Sound Editing

    Hm. Where can I find these 11 steps of the green mile?


    PS, Yes, I saw that you improved and fixed almost all the bugs of the original game. This is great. But the Vanilla game itself doesn't interest me (I don't plan to play it and haven't played it for 10 years). I need it solely as a base for the mod. And here is the insertion of missing voice files - this is my main task. Since the future belongs to the Steam version, and a lot of people are already playing the mod on the Steam version (mostly English-speaking players) and I would like their game to be as comfortable as possible (without blood from the ears, as one guy said somewhere here)

    UPD: Oh I have finded it.

    I ll try it. and if I still have questions even then, I will ask you them (if you don't mind).
    Last edited by Leeekaaa; February 03, 2023 at 11:06 AM.

  20. #20
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,095
    Blog Entries
    35

    Default Re: Creating a World - Developer's Setup Kit for Sound Editing

    If you want to add the voice files to another mod then you do it the same way as you did in the dev kit (my post #15, your post #17) - you will need to have all the necessary sounds txt files present in that mod.

    The '11 steps' are only for installing it in the Steam base game.










Page 1 of 2 12 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •