Xonotic Forums
[SOLVED] Character Sound Files - Printable Version

+- Xonotic Forums (https://forums.xonotic.org)
+-- Forum: Support (https://forums.xonotic.org/forumdisplay.php?fid=3)
+--- Forum: Xonotic - Help & Troubleshooting (https://forums.xonotic.org/forumdisplay.php?fid=4)
+--- Thread: [SOLVED] Character Sound Files (/showthread.php?tid=7729)



Character Sound Files - Castor - 05-17-2018

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;


RE: Character Sound Files - Lyberta - 05-18-2018

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.


RE: Character Sound Files - Mirio - 05-18-2018

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.


RE: Character Sound Files - Castor - 05-18-2018

(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#).


RE: Character Sound Files - Lyberta - 05-19-2018

If you're willing to dive into the source code, you can grep for the names of those sounds and see how they work. Btw the limit of 255 seems to be for all player sounds combined, no an individual ones.


RE: Character Sound Files - Mario - 05-19-2018

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.


RE: Character Sound Files - Castor - 05-22-2018

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.


RE: Character Sound Files - Castor - 05-23-2018

(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?


RE: Character Sound Files - Mario - 05-24-2018

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.


RE: Character Sound Files - Castor - 06-05-2018

Nice! Well, time to accept that challenge and to add 256 different types of shouts.

I'll be in my basement.