sparky has contributed to 70 posts out of 438571 total posts
(.02%) in 1,422 days (.05 posts per day).
20 Most recent posts:
SAS, you should not actually open Tool when you are trying to use it. It is not a regular application like that. And Tool++ was working there, but you just have to choose a radio button on the left to indicate which command to use.
If you are trying to use Tool, place tool.exe within your Halo Custom Edition folder. Then, open your Accessories folder which is found inside your Program Files folder. Inside the Accessories folder, you will see "Command Prompt" or "cmd.exe". Copy that and paste it into your Halo Custom Edition folder. Now when you want to use Tool, open the Command Prompt (cmd.exe) that is in your Halo Custom Edition folder and type into the field "tool" without quotes, and press the Return key. You will see a list of commands you can use with Tool. If you have questions about how to use the commands with Tool, see my previous YouTube video tutorial about generating sound tags, where you type into the Command Prompt executable something like this:
tool sounds "path to sound file folder within halo custom edition data folder" ogg 1
Edited by sparky on Apr 2, 2013 at 07:21 PM
You can toy around with values in Crazybump, and this should give you an idea of what each value does. Halo does not use every such kind of lighting effect with which you can play in Crazybump, but you can at least copy/paste your specular map or height map .tiff image to overwrite one you manually did (of the same dimensions) by using the bitmap image editor feature on your bitmap tag in the map file with Eschaton. Then you can re-extract that tag if you want just the bitmap tag by itself. Using Eschaton's copy/paste overwriting image data feature for bitmap tags in a map is also the easiest way to quickly test the change in-game.
By ambience, do you mean the snde Sound Environment tags, which are text-based metadata and not binary file metadata?
For regular sound file processing, you can see my video tutorial here which I plan to transcribe into a textual tutorial: http://www.youtube.com/watch?v=zYfr21szEAw.
I use Eschaton a lot also. Can you copy/paste a tag pathname for a particular tag that you are having problems converting? That would be one of those "Ambient" tags you mentioned.
SAS, I hope I'm not spamming here, but use this video tutorial for the sounds process:
See if you missed any steps here during the normal sound tag generation process. This is not specific to OpenSauce, but is what you should be normally doing.
Sorry for the late reply, but I recorded this video tutorial on how to use sound tags in Halo:
Let me know what you think and if you have any additional questions. This video is a revision to what I posted above, but follows the same basic process. You should be able to view the video, not just hear the audio of it, since the visual is significant here.
Quote: --- Original message by: suicidewafflez
I'm using Halo Map Tools V3.5 to inject my own audio and bitmaps into the campaign maps, but I can't get past the allocated size limit for each audio track.
HMT just truncates the audio file if it's larger than the allocated limit. The allocated limit normally won't allow .ogg files larger than 3 seconds which is a big problem as I want to inject longer .ogg files. I'm at maximum compression with all my .ogg files as well.
How do you increase the allocated size limit for each track in HMT?
Edited by suicidewafflez on Nov 30, 2012 at 07:33 PM
Edited by suicidewafflez on Nov 30, 2012 at 08:27 PM
First, import a longer sound track using the HEK method. I have some long tracks also in SparkMusic Demo (search http://www.halodemomods.com/ wiki for "sparkmusic" and get the demo map file, DemoHack it to Full (Demo Hack is also a the halodemomods.com wiki "Tools" page), then open it with HMT, extract tag meta, import meta into your map and there you have it.
HMT doesn't want to shift the data around so it just overwrites what number of bytes are already used and probably zeros out or null-pads the rest of it, if some is unused. The duration of the track mostly has to do with how many bytes your trying to fit into the map file; while several other Blam! engine values are used that can modify the duration of actual results in playback, the .ogg file format should have something in the header indicating the duration of the sound file also. I know of some people who would know this, and if you research .ogg file header formats online, you'll likely find info on where the duration of the sound is stored. My research above includes some of that.
Quote: --- Original message by: thescenmapper
1)i tryed to split it into permutations and it crash at the playing of the next permutation
2)first the map compiling its not the game crashing, but is all the map editor. some times ago i compiled other songs and they worked, now i re--installed my map editor ,resetted all and it not works, wtf? (if i don't update the codecs it gives me the access violation error, but the program is runned as admin, and they arent only read files.)
I don't understand. Which map editor are you using?
Edited by sparky on Dec 1, 2012 at 12:33 AM
When you use the method I said where you check the permutations flag and don't process the sound file again with Tool, it seems that during the game, you will need to wait until the end of the sound_looping is played, then a few seconds before the sound repeats, restart the game. You only have to do this once or twice; it seems to be a bug with the sound engine, where it's not buffering the entire sound data properly, so this fixes that problem, probably by refreshing the sound buffer to include all of what was previously played. That's my guess, anyway.
So restart the game just before the end of the song. You only have to do that once each time Halo is open and uses that song. So after doing this once, you can do "restart" or "new game" and it shouldn't crash anymore then, since Halo already has the right sound buffer size, but if you quit Halo, open Halo and play it again, it will crash because you then again must restart just before the sound loops.
Try that out and see how it works.
Edited by sparky on Nov 27, 2012 at 09:49 PM
It's a single download at the top of that page.
Also, I added step 2a to the first post.
EDIT: If you check the "split long sound in to permutations" without recompiling the tag with tool, the sound will still play properly, but with a .sound_looping tag, your game might crash when the sound loops, since there is a bug with the sound buffering, at least with Halo Demo PPC Mac and probably also therefore Halo Trial PC. If your game crashes and your map file corrupts due to:
- Using a map file that is over 256 MB, and/or
- This sound_looping tag bug
Then to get it to work without crashing, generally, you should be able to choose RESTART in the game menu option (for multiplayer maps) just before the ending of the sound is played, and it will loop properly thereafter during that game.
Edited by sparky on Nov 20, 2012 at 12:43 PM
Go into your system32 folder and copy-paste the "cmd" application from there into the Halo Custom Edition folder.
Make sure you have "tool.exe" inside your Halo Custom Edition folder. If you don't, try reinstalling the Halo Editing Kit or downloading the HCE and HEK Starter Kit from halodemomods.com: http://www.halodemomods.com/wiki/File:Halo_CE_and_HEK_Starter_Kit.zip
Now open the "cmd" found inside the Halo Custom Edition folder and type in:
This executes the tool.exe program inside the same directory as the cmd which you duplicated to your Halo Custom Edition folder. After typing "tool", you should see a list of commands which can be typed after typing "tool" in the command prompt again, so like:
Note that when you run the Tool command, Tool will only properly write files within one directory deep if there are permutations. For example, if you have:
Then the intro will work fine, but the loop, since it has permutations, must specify the "loop" directory at the end of the filepath in the command:
tool sounds music ogg 1
- will only work with the "intro"
tool sounds music\loop ogg 1
- will work with the "loop" since there are multiple sound files inside there which will become permutations in that "loop.sound" tag
The error you get if you encounter this problem will be:
### failed to import: couldn't read file.
Edit: I'm actually still testing this.
Edit: OK, if you're getting the above error, then use a single, longer sound file instead and do step 6a in the first post.
Edited by sparky on Nov 11, 2012 at 07:01 PM
An in-depth survey of Halo's .sound tags
Thursday, October 18, 2012 5:13:20 PM
With the Halo Editing Kit, the standard method of splitting a long sound file into permutations, such as when using a very long music file, is to do the following:
1. Open the music file with a sound editor.
2. Divide the music into segments 1 minute or shorter in duration (the maximum for highest quality ogg conversion later is about 1'28''483 ), copy-pasting each 1 minute segment into a new sound file and saving it with the following properties:
Format: WAV (uses extension ".wav")
Data Size: 16 bit
Frequency: 44.1 kHz
File Names: (numbered, such as) 00.wav, 01.wav, 02.wav, etc.
Maximum File Size: ~15.6 MB (each .ogg sound file permutation later must be at most exactly 4MB)
2a. (optional) It might be possible to save it as a single file rather than as segments; then you can run the tool command at quality 0 and do step 6a below.
3. Place those .wav files into the HEK data directory such as Halo Custom Edition\data\your_name\sound\artist_name\composer_name\music_title\00.wav . Upon compilation with Tool, the sound tag will take the name of "music_title" and will be placed within the corresponding tags folder inside "composer_name"; the sound tag's permutations will be added numerically according to their file names to the HEK sound tag.
4. Open Tool with the command prompt (both Tool and the command prompt are typically located inside the Halo Custom Edition directory) and run the command:
tool sounds your_name\sound\artist_name\composer_name\music_title ogg 1
5. Wait for Tool to compile the sound tag. If it displays errors, use a lower quality, such as:
tool sounds your_name\sound\artist_name\composer_name\music_title ogg 0.9
or less, anything between 0 and 1.0. The quality at this point does not matter, you just need it to generate the sound tag.
6. Open the sound tag in Guerilla and do the following, then save the .sound tag:
√ split long sound into permutations
minimum distance: (for standard background music, set to map portal area size, ie. 100000)
maximum distance: (for standard background music, set to map portal area size, ie. 100000)
Pitch Ranges ->
actual permutation count: 1
next permutation index: 1 (because the first permutation is index # 0, the second is index #1, and so on)
(next permutation): 2
(next permutation): 3
(next permutations): 4, 5, 6, etc.
(last permutation): -1
6a. (optional) If you are getting errors about not being able to read the file when doing permutations, use a larger file size on your audio permutations (longer audio durations) and so that means for this step you should use a single, long audio file and run Tool at ogg quality < 1.0, then do the following step:
Also, if you have a long audio file and want to increase the ogg sound quality on it when you import it, do the following step:
- After setting the "split long sound into permutations" flag and saving the .sound tag, run the sounds command in Tool again at ogg quality 1. It will split the single, longer sound file into permutations and automatically set up the permutation count and indices, now at the higher sound quality.
7. In Guerilla, start a new .sound_looping tag. Set the following in the sound_looping tag:
8. Save the .sound_looping tag and reference it as the background sound in a .scenario_structure_bsp tag for background music applied to that particular portal using Sapien, or use the .sound_looping tag elsewhere instead.
9. Build the map cache file in Tool and play the map in Halo Custom Edition.
If each step above is followed as indicated, this process works every time without a problem.
For those who want to do a more "hackish" approach using a hex editor also, you can find more information below:
The maximum size of the sound tag "samples" value, which is the size in bytes of the ogg data in the sound tag, is 4MB exactly. That's 4194304 bytes (4096 * 1024) or 0x400000 in hex. So if you open up your .sound tag file in a hex editor and search the beginning of the file for the hex value equal to that samples value as shown in Guerilla, you'll see the offset for that value in the tag. Now if you're dealing with an .ogg sound file, you can actually manually copy-paste any amount of .ogg sound data starting at the offset which begins with the ASCII string "OggS", the first instance of that. This is the beginning of the .ogg sound data, and so you could copy-paste whatever other .ogg sound file's data into there, of any duration. The issue is Halo's engine limitations. If you update the "samples" value manually to any value greater than 4MB, the game will crash. The map file will still compile in tool, but Guerilla won't be able to open the sound tag either, telling you the sound samples size is too large.
So the best thing you can do is copy-paste any sound file you want into there, as .ogg sound data, and maximize the duration that the game can play it by setting that hex value to 4194304 or 0x400000 (4MB). Then the sound tag can be opened in Guerilla and the HEK tools and Halo will only play 4MB of it before stopping.
If you're using OGG quality 10 (which is 1.0 in tool) and convert a 4MB .ogg sound file (which brings it to 1:28 -- 1 minute, 28 seconds -- in duration) to a 16bit 44.1kHz wav audio file, the size of the .wav file would be about 15,608,742 bytes, basically 15.6MB (reading as 14.8MB if you're on Vista), and of course the duration of the sound file would remain the same.
So that means that you SHOULD be able to convert a .wav file that is up to about 15,608,742 bytes with tool into an .ogg sound file with quality 1. In practice, it works as a single permutation at quality 0.9, which unfortunately crunches the samples byte size down to 3472892 bytes instead of our 4194304 maximum.
Now if we split the file into permutations, each permutation again could be 4MB in size. When we do this with our sound file that is 4MB, it splits it into 17 permutations of various sample sizes, about 200-400KB each.
Going back to our hex editor, we can now copy-paste a longer sound file into that permutation-based sound tag.
Here's how to do the entire process of converting a long sound file into a usable .sound tag:
- Take a long music file and in a sound editing program, cut it into segments that are this duration (min, sec, millisec) or slightly shorter: 1'28''483
- Save each segment as an .ogg sound file, quality 10.
- Check the file size of each .ogg file. Each file should be up to 4194304 bytes, but no more than that. If they are larger than that, go back and reduce the duration by a little bit and try again.
- Now you should have several segments of a long music file that are all .ogg files of the same export quality up to 4MB (4194304 bytes) in size.
- Make a note of the exact file size in bytes of each .ogg file you exported. I like renaming the file as something like "1 - 4191023b.ogg" to remind me how many bytes are in the file while still keeping it in order in the directory.
- Run one of those 4MB sound tags through tool at quality 0.9 and then open the resulting tag in Guerilla and check the option at the top to split it into permutations. Run the same tool command, but this time at quality 1.0. Now you have the .sound tag you'll be using. Open it up in Guerilla and you should see about 17 permutations.
- Set the number of permutations to the number of .ogg sound files you will be using. In my case, I'm using 4 .ogg sound files, so first I scroll down to the last item in the Permutations list, then I delete the permutations one at a time until there are only 4 remaining (the "next permutation index" for the fourth item will read "4"). On the last permutation (the fourth one, for me) I set the "next permutation index" to -1 instead of leaving it at 4, since there are no additional permutations thereafter.
- Save the .sound tag and open it in a hex editor. Also open each of your .ogg sound files.
- At the top of the .sound tag file, you will see in ASCII text the name of your sound file listed the number of times that is the number of .ogg files you saved. Select the first name and extend the selection to include 64 (0x40) bytes. Now instead select the following four bytes right after that. In Big Endian (reading with the larger values on the left), which is how the data is stored in this HEK .sound tag at this point, these four bytes should be a 32 bit integer representing the "samples" value for the first permutation, which is the number of bytes the game will expect to read from that .ogg sound file reference.
- Open the first .ogg sound file in the hex editor and select all the hex data. If you didn't know how large the file is in bytes, read the decimal version of the display indicating how many bytes you are selecting when you select all the contents of the file. So now you know how large the first .ogg file is. Go back to the .sound tag and type or paste the size of the first .ogg file into that 32 bit integer location. For example, if the .ogg file is 4191815 bytes, paste the hex equivalent of this (3FF647) into those four bytes. If you're using a decent hex editor, it should be easy to do this. Make sure you're not shifting the hex data around when you modify these values, just overwrite the four bytes... don't extend the four bytes into 5 bytes or shorten it into 3 bytes. Actually, the size will only be up to 400000 in hex, so you'll only be using three bytes of the four bytes here (ie. 00 40 00 00 would be equal to 400000, and in my case, 00 3F F6 47).
- Do the same thing with all the other .ogg files, pasting their file sizes as 32 bit integer values in the four bytes after each permutation's name string, which is 64 (0x40) bytes long. Now you should have the lengths of each "sample" value for your .ogg files set up properly, and since the values should all be 4194304 and less, the game engine won't crash when reading it.
- Now we copy/paste the actual .ogg sound file data into each permutation. What you do here is search inside your .sound tag for the .ogg header string, which starts with "OggS". But don't actually search for that string, because you'll get more results than you want. Depending upon your sound editor, you would be using a different version of the .ogg header than Tool used to compile the existing .ogg files into this HEK .sound tag. What you want to do is copy/paste your ENTIRE .ogg sound files, including their headers, into the .sound tag, overwriting the existing .ogg sound headers and sound data each time. I'll take you through the first one: After the list of permutations that we see at the top of the .sound tag, look for the first instance of "OggS", whose offset should be at around 124 bytes starting from the last permutation's ASCII text string name. I don't know about you, but I don't like juggling numbers very much, so I didn't have you copy-paste the previous "sample" integer sizes from before. Instead, I'd rather open up the sound tag in Guerilla and copy the value from the bottom of the tag. So open up the sound tag in Guerilla and copy the "samples" number of the first permutation. Switch back to the .sound tag in the hex editor and select that exact quantity of bytes -- including the .ogg header -- starting from that first instance of "OggS". Now copy-paste the entire data of the first .ogg sound file over those bytes. Be sure you are in the proper editing mode so that you only delete those bytes and paste the new bytes in place of them... typically, this means you are in "insertion" mode, rather than "overwrite" mode. So do that, and don't screw it up like a newbie ;P By the way, the end of that section you deleted should be butted right up against another string starting with "OggS", which just so happens to be our next permutation's sound data! So go ahead and copy-paste your next .ogg file's sound data, overwriting the next chunk of data whose byte length you obtained from the "samples" field for that permutation in Guerilla. (Make sure you are only dealing with the hex data, not the ASCII strings. You don't want to copy-paste ASCII text into the hex area or vice-versa.) Your last existing permutation should take you straight to the end of the HEK .sound tag hex data.
- Repeat the process as necessary. When finished, save the resulting file as another HEK .sound tag file (with the extension ".sound") and open it up in Guerilla to see if it worked!
Upon building this tag into a map file, I had the game play about the first 5 seconds of each permutation, one after the other, in a loop (because it was used in a sound_looping tag). Clearly, something else needs to be changed...
If we uncheck "split long sound into permutations", then the sound restarts at that breakpoint with the first permutation repeating from the beginning after about 5 seconds. If we change the permutation count value, the permutations are oddly selected, since the "next permutation index" is not set to -1 for each permutation.
I think the values that come 8 bytes before each permutation's 32 bit integer "sample" number in the hex data are what need to be changed. This value is actually an integer in Little Endian (highest digits last) that represents the size of the .wav file that was imported into this permutation as an .ogg. Wandering in the other direction, 16 bytes after this value is a float value in Big Endian that appears to be the compression ratio difference between the .wav file and its resulting compressed .ogg file.
Example: (Related information for each permutation separated by "|")
with 4 permutations:
name "1" | "2" | "3" | "4"
skip fraction 0
next permutation index -1
size of .wav sound data compressed for this permutation (little endian) 15,610,164
samples (big endian) 3,487,897
mouth data 0
subtitle data 0
(?) float (big endian) 2.00586 | 2.00983 | 2.00012 | 2.00409
(?) integer (little endian) 7,063,416 -> same
(?) integer (little endian) (total size as single permutation?) 3,016,376 | 3,016,208 | 3,016,304 | 3,016,472
(?) integer (little endian) 7,063,432 -> same
(?) integer (little endian) 3,016,424 | 3,016,256 | 3,016,888 | 3,016,520
(?) integer (little endian) 7,063,448 -> same
with 1 permutation:
(will update with findings later)
Edited by sparky on Oct 18, 2012 at 08:11 PM
Edited by sparky on Oct 18, 2012 at 08:12 PM
Edited by sparky on Nov 11, 2012 at 07:00 PM
Edited by sparky on Nov 14, 2012 at 03:03 AM
Edited by sparky on Nov 14, 2012 at 03:18 AM
OK I'll test it then with some sounds I've had waiting on the sidelines for a long time...
Is the maximum duration of sound file you can use 10 minutes?
2h 45m 15s
Those grate and glass shaders are only supposed to have one side, not two sides. Then you use a % two-sided flag on the shader name in 3ds max (like "alpha grate%") and that should solve all your orange errors.
In case you didn't understand that, let me spell it out for you:
STEP 1: Select by material name all the grate-related shaders such as the one in your screenshot.
STEP 2: Detach them from the bsp so that you can more easily work with them.
STEP 3: HIDE everything except for those areas.
STEP 4: Select by triangle
STEP 5: Check "Ignore backfacing" ON
STEP 6: Go around to the faces and delete one side of them. MAKE SURE you are deleting only ONE side of them. The faces must be facing the SAME DIRECTION on each individual polygon. This is the reason for Step 5, so that you don't accidentally delete a North-Facing triangle and a South-Facing triangle on the same polygon. It does not matter if all the normals are facing a particular direction, just that you have, for example, a square consisting of only two triangles and both those triangles are facing the same direction... but the triangles on the other squares don't matter in relation to those triangles, since they are not connected to that square. Get the point? In case it's hard to see which side the normals are on, check "show normals" and bring up the scale of that option so that you can see the blue lines indicating the normals' faces.
STEP 7: Since we had to delete one side of these triangles, go under the material editor and find the shader name associated with the material. Add a % sign to the end of the shader name of the triangles with which you are working. This indicates a double-sided shader triangle to the bsp collision compiler in Tool. (If you have any question about how to name shaders and materials, look at the start of the 3ds segment in my video tutorial.)
STEP 8: Re-attach these faces to the BSP.
STEP 9: Select by vertex and Select All. Click the Weld button.
If you actually viewed the video, you would see that I take you through step-by-step and very explicitly each step and explain why you do stuff like this to avoid certain errors. If you are certain you don't need any help with the setup (which you implied by saying you couldn't "get anything from this video"), then skip to 10m 54s, which is where I start with 3ds max.
You'll also run into portal issues unless you do what I say in the tutorial. I know it's over 4 hours long, but I stayed up late at night and even redid the tutorial recording several times over in order to get this information to you, so you might as well watch it one time. The .mov file is 21.85 GB, so YouTube is the preferred method of downloading it.
Edited by sparky on Sep 26, 2012 at 06:03 AM
If you are using original map file scenario bsps, then please consult my youtube video on the overall approach: https://www.youtube.com/watch?v=3osbPbk6nsU
It's long, but worth it in general. It is very detailed on each step. I did that tutorial when I was still learning about the controls in 3ds max... and so I'm not a pro in 3ds max, but the process I gave is legitimate and was used in the development of Bloodgulch Extreme: http://halodemomods.com/wiki/Bloodgulch_Extreme
I don't have experience with using multiple sound references in sound_looping, but you can see what the original halo music tags do, since I know they use scripting and they use sound_looping with sounds that have different permutations.
I don't have an obvious solution right now, so I defer to someone else here.
To check things out, start with the basics before looking at it in-depth.
- File paths are correct (with tool, this is pretty obvious and really wouldn't be an issue here for you)
- Sound tag metadata is set up properly: usage is "music" (or "scripted" something? don't know if that is necessary); minimum and maximum distances are set appropriately according to the map size (typically at least 1000 world units each, for background music); and the number of actual permutations is correct as you would like it to be (although this is really a touchy area)
- Sound Looping tag metadata is set up properly: it is possible that you might only be able to reference up to one sound tag and it would go into the "looping" reference spot...
- You've applied the background sound to a portal area in the scenario bsp using Sapien. This step I guess is optional if you are dealing with scripting and don't have music and environmental ambient sounds going on at the same time.
Then get into the more involved steps like scripting. Is your script formatted properly? Is it referencing the right file name(s)? Are the parameters passed matching the tags you're using? Is it set to run continuously? You always have alternative options with this game... is there a better way to do this, perhaps by editing the sound files to be smaller or by using permutations in the sound file? Does scripting allow you to play one permutation after another? (I think the answer to this last question is going to show you the solution to your issue.)
Edited by sparky on Sep 23, 2012 at 10:11 AM
Hey, folks. I'm working on redoing the energy sword (with animations) for the spartan, and I wonder if anyone else has done this or if I should just go ahead and finish up what I've already had in mind to do now for the past few days.
Also, I recorded a video tutorial, part one, on how to animate in first-person (for weapons). I was going to record myself doing the energy sword animations as the second part of the tutorial.
More info here: http://www.macgamingmods.com/forum/viewtopic.php?f=40&t=18242
So I wonder if anyone else here has done first-person model and animations for the Energy Sword to be used by the spartan. I'm wondering about the original model used by the elites in the game, which is what I'm using.
You people and your scripting nonsense. Not everything is scripting in this game, sheesh.
1. Extract the .scenario tag from the map unless you've already done that.
2. Open the .scenario tag in Sapien.
3. Find the names of the encounters you want to modify. Double-clicking them will bring the camera to their locations.