Music packet for 4351 client?

10/21/2023 02:00 zaphod77#1
Qonquer had a neat feature where when you went to any map the client would play mapnumber.mp3, before background music was a feature in official TQ.

The Twin City tune was legendary.

I wish to reproduce this in my 4351 source.

What packet actually triggers the client to start looping a mp3 of the specified filename from the sound directory?
10/21/2023 03:01 Arcо#2
That'd be the string packet. Take a look at this thread:
[Only registered and activated users can see links. Click Here To Register...]
10/21/2023 07:04 zaphod77#3
so of course the source i'm working with doesn't have any mention of a "string" packet.

ah well. thanks anyway.

this is going to be a pain with a source that doesn't seem to actually have the sound packet anywhere.

it does seem to have the send guild list packet, though, but a search of 0x14 in serverpackets directory found nothing. GRRR.
10/24/2023 01:16 .Nostalgia#4
try the decimal notation: 1015
Its also the packet that sends effects among other stuff
10/24/2023 02:03 Spirited#5
Quote:
Originally Posted by .Nostalgia View Post
try the decimal notation: 1015
Its also the packet that sends effects among other stuff
^ Yup. This. Some of the older servers may also use hexadecimal, so it could also be the constant 0x3F7. But yup, not all servers are gonna call their packets by the same name. Using the official names has been more of a recent thing / in CpySky's server projects. You can also look at the development wiki that's pinned to the private servers section. I'm working on a new version of that, too - just fyi. Should be easier to contribute to it soon.
10/25/2023 17:28 zaphod77#6
The subpackets are individually coded in their own files. the one for the sound packet simply isn't there.

While the main packet id is indeed written as 1015, the sub packet ids are hex, and a complete search didn't find it.

The source i have doesn't even have a placeholder for that subpacket, much less use it. :(

It just has effects, sendguid, and sendguildlist implemented, the other variants aren't even described.


For that matter, the other thread doesn't say how to make the music LOOP until the map change, and i haven't even been able to find the "korvacs wiki" that has the string types listed. i don't see it on the development wiki, much less whether the string name for a sound packet is a filename with or without extension.

I know moving to a newer client would easily solve the music problem (as those play map based music without server packets at all), but i like pre potency clients.
10/28/2023 09:37 .Nostalgia#7
Quote:
Originally Posted by zaphod77 View Post
The subpackets are individually coded in their own files. the one for the sound packet simply isn't there.

While the main packet id is indeed written as 1015, the sub packet ids are hex, and a complete search didn't find it.

The source i have doesn't even have a placeholder for that subpacket, much less use it. :(

It just has effects, sendguid, and sendguildlist implemented, the other variants aren't even described.


For that matter, the other thread doesn't say how to make the music LOOP until the map change, and i haven't even been able to find the "korvacs wiki" that has the string types listed. i don't see it on the development wiki, much less whether the string name for a sound packet is a filename with or without extension.

I know moving to a newer client would easily solve the music problem (as those play map based music without server packets at all), but i like pre potency clients.
Are you sure there is no "MusicRegion.ini" file in your client's INI folder?
01/07/2024 20:05 zaphod77#8
yes, i am sure. that was added later. sometime between 4351 and 4095.

qonquer uses earlier clients, and did the music. god i miss that server, it still had TreasureBirds in it's met zone. and you could hunt there with low level archers for much mets and dragon balls.
01/24/2024 03:07 zaphod77#9
so finally have a /sound command. the .wav files work. the .mp3 files do NOT. :(

/sound sound/wind.wav

works

/sound sound/1002.mp3

does NOT.

what the f? it's definitely there on the client.
01/24/2024 05:05 Spirited#10
Quote:
Originally Posted by zaphod77 View Post
so finally have a /sound command. the .wav files work. the .mp3 files do NOT. :(

/sound sound/wind.wav

works

/sound sound/1002.mp3

does NOT.

what the f? it's definitely there on the client.
Ah, yeah. That checks out. Looking at the Eudemons client source, it relies on WinAPI's [Only registered and activated users can see links. Click Here To Register...] function... which only plays wave files. I wonder if that changed in more modern versions of the client.
01/24/2024 17:28 zaphod77#11
but IT WORKED IN EARLIER CLIENTS!

i want my qonquer twin city music back, dammit! :)

don't suppose there's a music packet in that eudaemons client source?
01/24/2024 19:23 Spirited#12
Quote:
Originally Posted by zaphod77 View Post
but IT WORKED IN EARLIER CLIENTS!

i want my qonquer twin city music back, dammit! :)

don't suppose there's a music packet in that eudaemons client source?
Not that I'm aware of... but you could always use another version of the client that includes that. I've found that it's far easier to remove features than add them back in.
01/24/2024 21:42 zaphod77#13
How the heck am i going to figure this out? qonquer was 4338 as near as I can tell, and 4338 predates CP, which the source is using.

Doesn't help that the qonquer online client file seems long gone.

PlaySound does understand mp3 files inside of wav files, though, so my creation of wav files with mp3 in them should have worked.
01/24/2024 22:19 Spirited#14
Quote:
Originally Posted by zaphod77 View Post
How the heck am i going to figure this out? qonquer was 4338 as near as I can tell, and 4338 predates CP, which the source is using.

Doesn't help that the qonquer online client file seems long gone.

PlaySound does understand mp3 files inside of wav files, though, so my creation of wav files with mp3 in them should have worked.
Well, if you want to play mp3 files on their own without reencoding it, then you could try hooking the client and making your own player using DirectShow or something. Make a new packet type to trigger it or detour the function in NDSound.
01/24/2024 22:22 zaphod77#15
wow. the client is stupidly picky on the files. even creating a wav file with the usual codec in ffmpeg doesn't work. using an online converter i was able to make a 44 megabyte wav file that actually plays back in game.

how annoying.

and now it works again. sigh.... and i thought my last problem was bad...