Create an account

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[SOLVED] Character Sound Files


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;

Attached Files Thumbnail(s)

In common/effects/qc/globalsound.qh I see:
REGISTRY(PlayerSounds, BITS(8) - 1)

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

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.
[Image: 21.png]
IRC (QuakeNet): #bot.xonotic | #xonotic.pickup | #xonotic | #xonotic.cup
Steam | | YouTube
Movies: Mirification #1 | #2 | Mirificaption #1 | #3 | #4 | [BOT] Clan #3 | #5 | #6 | #7 | [BOT] Clan #4 | #8


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

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.

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.
[Image: 230.png]

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:
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.
[Image: 230.png]

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

I'll be in my basement.

Possibly Related Threads...
Thread Author Replies Views Last Post
  [SOLVED] Character Using Wrong Sounds Castor 0 429 05-24-2018, 07:23 PM
Last Post: Castor
  [SOLVED] Surround sound refuses to work with C-Media CMI-8788 soundcards Lee_Stricklin 2 984 03-06-2017, 08:24 PM
Last Post: Lee_Stricklin
Sad [NEEDS INFO] Strange bug - my character is moving all the time ! Oncl'Tom 2 1,308 02-12-2017, 06:57 PM
Last Post: organic
  [SOLVED] Remove OS-specific files ljc 1 1,037 11-12-2016, 11:10 AM
Last Post: Mario
  [SOLVED] How do you open dat files on linux? Beagle 10 3,047 04-21-2016, 11:54 PM
Last Post: Beagle
  [SOLVED] After compile what files to zip up? end user 4 2,842 02-27-2013, 06:13 PM
Last Post: Mr. Bougo
  [SOLVED] Sound troubles Ubuntu dadx4 15 9,957 02-23-2013, 05:12 AM
Last Post: zykure
  [SOLVED] Sound doesn't work machine! 13 8,293 02-17-2013, 09:31 AM
Last Post: Mr. Bougo
  [SOLVED] Mac OS X 10.8.2: No Sound MDYou 25 10,261 10-14-2012, 04:22 AM
Last Post: Mr. Bougo
  [NEED HELP] autobuild sound problems frostwyrm333 0 1,380 07-30-2012, 01:11 AM
Last Post: frostwyrm333

Forum Jump:

Users browsing this thread:
1 Guest(s)

Forum software by © MyBB original theme © iAndrew 2016, remixed by -z-