Excellent news!!!
|
I've got the file format partially figured out. X/Y/Z/Radius of sounds is good, some static sounds are good, some time-of-day-limited sounds I'm figuring out.
It's a complicated little file format with the fields not being named and described. |
I've got it. I've finally actually got it.
There are three sound types in a ZoneNick_sounds.eff file. Type 0 - Different sounds for day and night, from ZoneNick_sndbnk.eff Type 1 - Background Music (with a pointer to which tune from ZoneNick.xmi to play) Type 2 - Same sound any time of day, from ZoneNick_sndbnk.eff I also figured out the fields in the .emt files to match up with the different sound types above. Everything. A straight up direct conversion from .eff files to a .emt file should be completely possible. This will be awesome for anyone who wants to customize their zones' sound effects and background music. We'll see if I can get it done before I have to turn in for the night. |
There are a few more side cases. Type 3 sounds are randomized, but I haven't quite figured it out yet, and some sounds show a radius of 0, but they still play within a certain radius. Gonna have to do some more h4xxing.
|
Good news all around! If there's anything I can do, let me know. About to start testing the fade in/out's of the themes. Hopefully one of those numbers controls that parameter.
|
Phew, marathon sessions of trial and error with numbers the last couple of nights.
I've gotten the .eff files 100% figured out, including a number of hard-coded values for sound effects and music selections. I've also gotten the .emt files figured out, aside from a couple of fields that don't seem to do anything no matter what I put in them. Those are just listed as '?'. Here's the .emt file format. You can paste this line at the top of the file for reference. The semicolon tells the client to skip that line. Code:
;?,soundfile (wav=sound, xmi/mp3=music for volume sliders),0=OK 1=OK,when 0=always 1=day 2=night,volume (1.0 = 100%),FadeInMS,FadeOutMS,?,X,Y,Z,WavFullVolRadius,WavMaxAudibleDist,1 = RandomizeLocation,Range,(1+ = Only when alt-tabbed away),(2+ = Only when alt-tabbed away),xmiIndex,Echo (50 = Max),IsEnvSound (for option toggle) xmiIndex is for choosing which MIDI song to play in an xmi music file. gfaydark.xmi has 6 different songs, for example, so you can specify 0-5 for that one for different locations (Kelethin, Crushbone, Felwithe) or different times of day. Friday's project will be making the converter from .eff to .emt so we can actually customize our zones! |
Very very nice! This info is invaluable. Thank you!
|
Something's off. I'm gonna take another look tonight. There's gotta be a way to specify a cooldown before the sound effect plays again. I must have missed it while messing with parameters and testing behavior.
In the meantime, this should get your pickchar music working: File: clz.emt Code:
;?,soundfile (wav=sound, xmi/mp3=music for volume sliders),0=OK 1=OK,when 0=always 1=day 2=night,volume (1.0 = 100%),FadeInMS,FadeOutMS,?,X,Y,Z,WavFullVolRadius,WavMaxAudibleDist,1 = RandomizeLocation,Range,(1+ = Only when alt-tabbed away),(2+ = Only when alt-tabbed away),xmiIndex,Echo (50 = Max),IsEnvSound (for option toggle) |
Testing now.
|
Didn't work. eqtheme.mp3 still overrid the pickchar.xmi & my pickchar.mp3 file i added to /sounds.
|
Darn. I'll mess with it some more tonight.
Better not be a hard-coded thing! |
Just logged in again. It seems the code DOES work, but my eqtheme.mp3 does not fade out in the pickchar theme comes in during character select. So both play simultaneously.
|
And if you rename eqtheme.mp3 to stop it from playing over pickchar, you'll lose the background music during the loading screen. Hmph.
|
Yes, since apparently eqtheme.mp3 is hardcoded. Hmmmmmmm.
|
Actually, I don't think it is.
I saw during my testing that in the .eff files, there were references to music files -1 through -24. My investigation showed that they were referencing the line numbers in this file: mp3index.txt If you wanted to change a built-in music reference without altering the original mp3 file or filename, you could simply change its entry in the .txt file there. You know... I wonder whether you could simply change eqtheme.mp3 to pickchar.xmi in that file... Hmm... |
I'll take a look.
|
Which .eff file references eqtheme.mp3? I wouldn't have to rename eqtheme,mp3 to pickchar.xmi/mp3 if I can make a new reference to pickchar.mp3 as #25. See what I'm saying?
|
The .eff files are zone-specific, and there isn't one for the character loading zone. It's probably hard-coded into the client to play mp3index #6 during loading and character selection, so I'd try changing that line in mp3index.txt.
|
I'll test it out.
|
No cigar. Changing the eqtheme.mp3 line to pickchar.xmi/mp3 didn't change anything. Still played the eqtheme before and during character selection.
|
Those bastards. Not that I'm entirely surprised, though. We've got a fair amount of hard-coded stuff in EQEmu that would really be better read from the DB instead.
|
Not liking the sound of that.
|
Does replacing the actual eqtheme.mp3 file with your custom pickchar.mp3 do what you want, though?
|
On my lunchbreak, I figured out the cooldown options, which clarified the unknown field before the x,y,z coords and the odd behavior of the fields between Range and xmiIndex.
Here's the updated field list for .emt files: Code:
;?,SoundFile (wav=sound, mp3/xmi=music for volume sliders),Unknown (0=OK 1=OK),WhenActive (0=always 1=day 2=night),Volume (1.0 = 100%),FadeInMS,FadeOutMS,LoopType (0 = Constant, 1 = Delayed Repeat),X,Y,Z,WavFullVolRadius,WavMaxAudibleDist,1 = RandomizeLocation,Range,MinRepeatDelay,MaxRepeatDelay,xmiIndex,Echo (50 = Max),IsEnvSound (for option toggle) If LoopType=0, both MinRepeatDelay and MaxRepeatDelay need to be 0, or the client doesn't know what to do with the conflicting information. If LoopType>0, the client will wait a random amount of time between MinRepeatDelay and MaxRepeatDelay milliseconds before repeating the sound effect. If both are the same, it'll be a constant cooldown between each activation. Note also that the delays must include the actual playtime of the music/sound. If you play a 5-second sound effect that should pause for 25 seconds after playing before it activates again, you'd set the Min/Max delay fields to 30000. 5 seconds to play, 25 second wait, 5 seconds to play again, etc. |
Also, the semicolon doesn't tell the client to ignore the line like I thought it did. The client just considers the semicolon part of the first field value, which appears to be ignored, but I can't know for sure.
So the client is looking for "SoundFile (wav=sound, mp3/xmi=music for volume sliders)" as a file in the EQ directory, and ignoring the line when it can't find one that matches. Oh well. That works, too. |
All replacing the eqtheme.mp3 with the pickchar.mp3 (renamed) does is change the repeating opening theme into a repeating character selection theme, as it was doing before. No change.
|
It's also weird that it only plays the first several seconds of the theme. The mp3 itself is over a minute and a half long. Probably just a case of faulty coding. Sorry, man.
Once you're in the game, though, it looks like we've got total control over music and sound effects for any zone. Artistic freedom! |
I tested the fade ins/outs of the various files I have configured for GFay work perfectly. Still, the only thing that needs to be fixed is the ambient environment sounds for the zone to be played simultaneously with the updated music. So, what you're saying is we need a separate line of code for the .wav enviornment sounds?
|
Yes, i think we'll just have to overlook the pickchar issue for now. Hopefully once Secrets fix is implemented it won't be an issue to change the pickchar music with the updated theme. No sweat!
|
Yep, and I've made good progress on a converter to make the appropriate .emt file entries from the .eff data. It'll all be good.
|
NICE! Now, I have a lot of work ahead of me. Not only do I need to finish working on the rest of the music themes with the updated virtual instruments, but now I have to go through all of the old zones and figure out the parameters for the new themes. What a big project ahead of me.
|
The .eff files contain the music entries for the zones as well, so those will carry over into the .emt file as you convert them. You'll be able to just change the entry's reference from, say, qeynos.xmi with xmiIndex 3 (pretending that's the theme for the Qeynos Monk guild area) to Qeynos_Monks.mp3 or whatever you'd like to do.
|
Even better!
|
So, I guess all I have to do is work on remaking all of those .xmi files into updated themes, and then once you get the files converted, just go within the files and change the files triggered into my updated themes. I love this stuff!
|
It's possible you could even find a program that would convert the old .xmi files into individual .mid files for each sub-song, which would be a headstart to upgrading them to nicer mp3s.
|
I found an ultimate MIDI collection online where someone already did that.
|
Awesomesauce!
|
Have you since stumbled across which file governs the merchant theme?
|
The merchant theme is song # 21 out of 24 in gl.xmi. Where the game is told to get it from there, I don't know. I haven't seen it in any config files, so it might be hard-coded.
|
that list you gave of the 24 themes, is that the .xmi index parameter? Maybe I can change that value to trigger the my merchant.mp3 in the /sounds folder from an gl.emt file.
|
All times are GMT -4. The time now is 12:37 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.