EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   General::General Discussion (https://www.eqemulator.org/forums/forumdisplay.php?f=586)
-   -   EQ Music: Reimagined (https://www.eqemulator.org/forums/showthread.php?t=39719)

Grimluck 06-02-2015 02:34 PM

Excellent news!!!

Shendare 06-02-2015 09:46 PM

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.

Shendare 06-03-2015 12:18 AM

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.

Shendare 06-03-2015 03:08 AM

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.

Grimluck 06-03-2015 12:20 PM

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.

Shendare 06-05-2015 04:56 AM

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)
To make the music fade, use the 4th and 5th fields. 4th field fades the sound/music in over the course of as many milliseconds as you specify when the character gets in range. 5th field fades the sound/music out over the milliseconds when the character goes out of range. 500/1000 or so seems good for sound effects. 1000/2000 seems nice for music.

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!

Grimluck 06-05-2015 11:43 AM

Very very nice! This info is invaluable. Thank you!

Shendare 06-05-2015 11:54 AM

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)
2,pickchar.xmi,0,0,.7,1000,3000,1,0.0,0.0,0.0,0.00,0.00,0,1000.00,0,0,0,1.00,0,0,0

Not at home where I can test it, though. Let me know if it doesn't work.

Grimluck 06-05-2015 11:57 AM

Testing now.

Grimluck 06-05-2015 12:09 PM

Didn't work. eqtheme.mp3 still overrid the pickchar.xmi & my pickchar.mp3 file i added to /sounds.

Shendare 06-05-2015 12:11 PM

Darn. I'll mess with it some more tonight.

Better not be a hard-coded thing!

Grimluck 06-05-2015 12:14 PM

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.

Shendare 06-05-2015 12:16 PM

And if you rename eqtheme.mp3 to stop it from playing over pickchar, you'll lose the background music during the loading screen. Hmph.

Grimluck 06-05-2015 12:22 PM

Yes, since apparently eqtheme.mp3 is hardcoded. Hmmmmmmm.

Shendare 06-05-2015 12:26 PM

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...

Grimluck 06-05-2015 12:29 PM

I'll take a look.

Grimluck 06-05-2015 12:34 PM

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?

Shendare 06-05-2015 12:45 PM

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.

Grimluck 06-05-2015 12:47 PM

I'll test it out.

Grimluck 06-05-2015 01:31 PM

No cigar. Changing the eqtheme.mp3 line to pickchar.xmi/mp3 didn't change anything. Still played the eqtheme before and during character selection.

Shendare 06-05-2015 01:36 PM

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.

Grimluck 06-05-2015 01:38 PM

Not liking the sound of that.

Shendare 06-05-2015 01:44 PM

Does replacing the actual eqtheme.mp3 file with your custom pickchar.mp3 do what you want, though?

Shendare 06-05-2015 03:30 PM

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)
LoopType affects sounds (.wav files) only, separating constant sound effects (campfire, waterfall) from delayed repeating sound effects (bats screeching, water dripping, rocks rumbling). Music (.mp3 and .xmi) is unaffected. It always loops immediately after finishing.

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.

Shendare 06-05-2015 03:35 PM

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.

Grimluck 06-05-2015 04:11 PM

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.

Shendare 06-05-2015 04:13 PM

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!

Grimluck 06-05-2015 04:16 PM

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?

Grimluck 06-05-2015 04:17 PM

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!

Shendare 06-05-2015 04:17 PM

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.

Grimluck 06-05-2015 04:19 PM

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.

Shendare 06-05-2015 04:30 PM

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.

Grimluck 06-05-2015 04:38 PM

Even better!

Grimluck 06-05-2015 04:50 PM

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!

Shendare 06-05-2015 04:52 PM

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.

Grimluck 06-05-2015 06:48 PM

I found an ultimate MIDI collection online where someone already did that.

Shendare 06-05-2015 06:49 PM

Awesomesauce!

Grimluck 06-05-2015 09:03 PM

Have you since stumbled across which file governs the merchant theme?

Shendare 06-05-2015 09:35 PM

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.

Grimluck 06-05-2015 09:46 PM

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.