Page 2 of 2 FirstFirst 1 2
Results 11 to 20 of 20

Thread: How do you make a Campaign?

  
  1. #11
    Dragon DragonsLover's Avatar
    Join Date
    Aug 2009
    Location
    Quebec
    Posts
    1,490
    Gamer IDs

    Steam ID: dragonslover

    Default Re: How do you make a Campaign?

    Yup, you must have some knowledge on hex editing. Here's a very basic tutorial:

    - Before you bring the change, open the .MP2 file into a sound editing software like Audacity. Note the duration of the sound in seconds and round it. Like, if it's 4,7 seconds, round it to 5.
    - By using MAStudio 2002, import your speech file you desire into an existing slot. Note the size of the file.
    - Once done, open the .SDT file you just altered using an hexadecimal editor such as XVI32. Search for the name of the .mp2 file used inside that file.
    - Before the name, you should have two 00 bytes and right before, you should have the file size (represented in orange in the quote above). The size bytes are small endian, which means they're read backwards. In the example above, it should be 49 7A, which, in decimal, means 18810 bytes. Check if the file size is the same as the one you've noted earlier and brings the correction if necessary. Do NOT write in INSERT mode.
    - If you move the hex cursor to the right, you should meet four 00 bytes after the file name, four random bytes, four extra 00 bytes and then you'll reach the sampling rate thing. Here, multiply the duration of the sound you noted earlier by 44100 and this should give you a number. Change this number in hexadecimal and revert it in small endian. Write down that value by replacing the old one in the SDT file where the cursor is. Then save the file.

    If everything goes fine, you should hear the complete sound into the game.
    I like dragons! They're the center of my life! I'll never forget them...



  2. #12
    Mapmaker Skarok's Avatar
    Join Date
    Apr 2011
    Location
    Germany
    Posts
    399
    Gamer IDs

    Gamertag: Skarok

    Default Re: How do you make a Campaign?

    Quote Originally Posted by DragonsLover View Post
    - Before the name, you should have two 00 bytes and right before, you should have the file size (represented in orange in the quote above). The size bytes are small endian, which means they're read backwards. In the example above, it should be 49 7A, which, in decimal, means 18810 bytes. Check if the file size is the same as the one you've noted earlier and brings the correction if necessary. Do NOT write in INSERT mode.
    - If you move the hex cursor to the right, you should meet four 00 bytes after the file name, four random bytes, four extra 00 bytes and then you'll reach the sampling rate thing. Here, multiply the duration of the sound you noted earlier by 44100 and this should give you a number. Change this number in hexadecimal and revert it in small endian. Write down that value by replacing the old one in the SDT file where the cursor is. Then save the file.
    I am somewhat confused. This is what I got right now, the Line that is marked Blue is the one I want to edit. The original MP2 I'm editing has a size of 15361 bytes.

    Spoiler



    Now I have no idea what the name even is, I just used CTRL F to fund LvlSpe05.mp2 and this is what it showed me. I assume it is 76, as the two 00's are almost diirectly before it, which would make the 6C my file size. Now the decimal I'd get from 6C is 108 and the Binary is 1101100. Both of them are nowhere like the file size of my innitial file, so I'm not sure whether I'm loking at the right numbers.

    Instead of the four 00's I have 5, though i assume that the first one is actually one of the random numbers. After them I have FF, which would be 255 in decimals and 11111111 in binary. Do I only change this or also the diggits after it? Also, 'Small endian' means stuff like 6C and similar values, right? And to edit it, would I simply use the 'Overwrite String' options?
    There is absoluetly nothing wrong with DK Mobile, whatsoever.

  3. #13
    Elite Dragon Mothrayas's Avatar
    Join Date
    Nov 2009
    Location
    The Netherlands
    Posts
    1,635

    Default Re: How do you make a Campaign?

    Look at the two bytes right before the two 00's: they say 01 3C. The system uses little endian, so in hex it actually reads 0x3C01. 0x3C01 in decimal is 15361. So those two bytes are the file size.

    And from the look of it, the sample count would be where "68 94 05 00" is in your file. This would convert to 0x59468 which in turn is 365672 in decimal. Assuming 44100 samples/second, that would be a bit over eight seconds. Dunno if that's accurate, but I suppose it might be.

    Quick note about little endian:
    Say you have a hex number 0x12345678. In little endian, you put the bytes in reverse, so that number would be put in as "78 56 34 12". The opposite is big endian, where the number would appear as "12 34 56 78".

    The Awakening


  4. #14
    Mapmaker Skarok's Avatar
    Join Date
    Apr 2011
    Location
    Germany
    Posts
    399
    Gamer IDs

    Gamertag: Skarok

    Default Re: How do you make a Campaign?

    Quote Originally Posted by Mothrayas View Post
    And from the look of it, the sample count would be where "68 94 05 00" is in your file. This would convert to 0x59468 which in turn is 365672 in decimal. Assuming 44100 samples/second, that would be a bit over eight seconds. Dunno if that's accurate, but I suppose it might be.
    I think I somewhat understood it now. Little endian means I simply put every byte into the reverse, so the last one becomes the first and the first the last. And I always have to take four bytes. Is it possible that there is something else aside from a 0 at the beginning though? So that I'd have something like 1x1234657? Also, the speech file I have is only 2.5 seconds long, so I'd need to multiply it with 44100 which would give me 110250. Now I'm confused as to why it suddenly gets so much bigger, considering the speech I used is relatively short while the former was way longer. Am I doing something wrong? Sorry for my confusion, I was always really bad at Math. But thanks for your help nevertheless!
    There is absoluetly nothing wrong with DK Mobile, whatsoever.

  5. #15
    Elite Dragon Mothrayas's Avatar
    Join Date
    Nov 2009
    Location
    The Netherlands
    Posts
    1,635

    Default Re: How do you make a Campaign?

    Quote Originally Posted by Skarok View Post
    And I always have to take four bytes.
    Not necessarily always, but in this case, yes. Four bytes are equal to 32 bits, and 32-bit computers work most efficiently with such numbers. They also have a good enough range for most purposes, either unsigned (0 to 4294967295) or signed (-2147483648 to 2147483647).

    Quote Originally Posted by Skarok View Post
    Is it possible that there is something else aside from a 0 at the beginning though? So that I'd have something like 1x1234657?
    No. "0x" is just notation that signifies a hexadecimal number. There's no such thing as "1x" or anything like that.

    Quote Originally Posted by Skarok View Post
    Also, the speech file I have is only 2.5 seconds long, so I'd need to multiply it with 44100 which would give me 110250. Now I'm confused as to why it suddenly gets so much bigger, considering the speech I used is relatively short while the former was way longer. Am I doing something wrong?
    I think you're supposed to change that number in the file so that it matches the new file. So convert the bytes "68 94 05 00" to what it should be (which is 110250 -> 0x1AEAA -> "AA AE 01 00").

    The Awakening


  6. #16
    Mapmaker Skarok's Avatar
    Join Date
    Apr 2011
    Location
    Germany
    Posts
    399
    Gamer IDs

    Gamertag: Skarok

    Default Re: How do you make a Campaign?

    Thanks, I think I got it now! At least the test file I used doesn't have that "s-s-s-s-s-s-s-s sound" after the speech got played. Just one more question; I would like to use the completely empty Demo STD files to store new speeches. The problem is that they seem to lack any of these important numbers plus they apparently use WAV files instead of the usual MP2s. This is how it looks like with the sound file I loaded into it.

    Spoiler



    Now can I simply fill in these blank spots myself or is this not going to work? It looks to me like it says that there isn't even a file at all, so I'm not sure as to whether that would work.
    There is absoluetly nothing wrong with DK Mobile, whatsoever.

  7. #17
    Elite Dragon Mothrayas's Avatar
    Join Date
    Nov 2009
    Location
    The Netherlands
    Posts
    1,635

    Default Re: How do you make a Campaign?

    The file size would still be behind the filename, I guess. Scroll up one line and the filesize, followed by the 00 00s, should be visible on the end of the previous line.

    Also, the sample count should still be put in the same spot as it used to be (the four bytes in between two other sets of four 00s), except now the original value is 0x00000000. Just put your sample count number where it should be.

    Also, I'd replace the ".wav" with ".mp2" just in case. (Assuming you don't use wav, of course).

    The Awakening


  8. #18
    Mapmaker Skarok's Avatar
    Join Date
    Apr 2011
    Location
    Germany
    Posts
    399
    Gamer IDs

    Gamertag: Skarok

    Default Re: How do you make a Campaign?

    The weird thing was that DKII doesn't use any WAV files for the speeches, it's MP2 everywhere else. So what I did was just copy the files from the Mentor STD over to replace that one and now I have 1500 MP2 slots again that seem to actually work. Should be easy enough now to add new speeches in, thanks for your help!
    There is absoluetly nothing wrong with DK Mobile, whatsoever.

  9. #19

    Default Re: How do you make a Campaign?

    Quote Originally Posted by DragonsLover View Post
    It's somehow a bit complicated. You must build your campaign by using the files of the original one. Even though it is possible to make new separate levels, you're kinda forced to use the texts and sounds of the original campaign since there's no solution to use custom ones that easily.

    No that is not correct you have an editor for the str filesw hich should in theory help people to put text . its at http://keeper.lubiki.pl

  10. #20
    Mapmaker Skarok's Avatar
    Join Date
    Apr 2011
    Location
    Germany
    Posts
    399
    Gamer IDs

    Gamertag: Skarok

    Default Re: How do you make a Campaign?

    Quote Originally Posted by Syntheticdawn View Post
    No that is not correct you have an editor for the str filesw hich should in theory help people to put text . its at http://keeper.lubiki.pl
    Yes, you can create new text messages, but you are forced to use the already existing files for this and each one can only hold 60 lines of text.
    There is absoluetly nothing wrong with DK Mobile, whatsoever.

Similar Threads

  1. How to make map thumbnails?
    By Beeb in forum DK2 Mapmaking
    Replies: 7
    Last Post: December 20th, 2021, 20:56
  2. Make Grenade usable by creatures?
    By Trotim in forum KeeperFX
    Replies: 5
    Last Post: October 10th, 2011, 15:13
  3. [0.38c] Savegames make game unstable?
    By Krizzie in forum KeeperFX
    Replies: 5
    Last Post: March 16th, 2011, 18:49
  4. tring to make maps, No success
    By dk2player in forum DK1 Mapmaking
    Replies: 8
    Last Post: October 22nd, 2010, 08:14

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
  •