Xonotic Forums

Full Version: Character Sound Files
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

I've been editing sound files for a couple of characters, and I've obviously noted that for some shouts there are multiple files, in which case each are appended a single-digit number to differentiate them. In-game, I gather that there's some algorithm that will pick the relevant names first, and, if there are more than one of the shouts available, it will pick one of those at random.

The question is this (because I can't see any indication of it); how many of each sound file can Xonotic handle for one character profile? Up to 9? Fewer? If more than, how should I append numbers? Or is there some other determination? When I attempted adding over 10 of one shout type, I couldn't discern whether or not it was actually working (if anything it sounded like they were shouting less frequently), with numbers appended as 01, 02, 03, etcetera...was this wrong?

For example, a coms folder might have .ogg files arranged like this;
I'm not exactly sure if the "01, 02, 03, ..." naming works, so I would rather go with "1, 2, 3, ..." which is used already.
(05-18-2018, 08:18 AM)Mirio Wrote: [ -> ]I'm not exactly sure if the "01, 02, 03, ..." naming works, so I would rather go with "1, 2, 3, ..." which is used already.

Aye, if it works, it would seem to have done so pretty subtly on my machine...
I tried it on the premise that it was keeping files in the right order, but in retrospect...I'm not sure why. It's using them randomly, as I'd want it to. xD

I'll try adding more than ten and see what happens. Maybe the game discounts 0s... I'm not adding shedloads, just on a couple of shout types I've got a few over ten files (such as teamshoot#).
The limitation would be in the accuracy of randomness, I believe, since you can define the maximum number of sounds in the player model's .sounds file.
On that note, I managed to get my additional files working in-game. I used the .sound file for the models they're associated with, and that's leading me to believe that the cap isn't 255 per map, rather, per individual character. Just a guess. I don't have enough sound files to test that theory.

I only really bumped into what I'm labelling as a bug. One of my models now isn't using three death sounds (it only has three), for some odd reason. They were working beforehand but now they aren't. I've quadruple-checked the .sounds file and even went as far as pushing the three files through Audacity to 'reapply' the .ogg extension. And I certainly haven't exceeded the cap of 255 - whatever it applies to - as I've just today added more files on a new character, and all of theirs works as expected.
Nonetheless, everything else in that respect works fine. Cheers guys.

I'm a dipshit, I was pointing to a folder called 'player' when I'd accidentally pluralised the actual folder. Don't know when, how or why, but yeah. Problem solved.
(05-18-2018, 12:13 AM)Lyberta Wrote: [ -> ]In common/effects/qc/globalsound.qh I see:
Code:
REGISTRY(PlayerSounds, BITS(8) - 1)

So it looks like there is a limit of 255 player sounds.

Okay. Would it be possible to increase it or is that going to unlock a world of hurt?
That is a limit for the number of different player sounds you can have, and it's not a hard one AFAIK. The number of clips you can have per player sound is different, and I don't believe it is limited.
But still, that's a limit you're extremely unlikely to ever come close to.
Nice! Well, time to accept that challenge and to add 256 different types of shouts.

I'll be in my basement.