Adventure Game Studio

AGS Development => Editor Development => Topic started by: Crimson Wizard on Mon 09/09/2024 18:00:15

Title: Improving voice clip naming rule
Post by: Crimson Wizard on Mon 09/09/2024 18:00:15
So, I posted this on github in our repository. I've been considering to fix the naming rule for the voice clips to let avoid conflicts when characters have identical first 4 characters. My proposal was to instead require using a full character name in the clip names.
https://github.com/adventuregamestudio/ags/issues/1456

But then I found there's another separate possible conflict, that is when character name has digits in it.

For example: character names are cGuy1 and cGuy11. And you do this:
Code (ags) Select
cGuy1.Say("&11 word");
cGuy11.Say("&1 word");
Both will result in a voice clip name "guy111".

This of course is a very rare case, but it's still possible. Which means that the current rule has a loophole.
Besides, having any digits in character's name makes following clip number harder to distinguish.

The only way to avoid a situation like that completely is to separate name and number with a symbol that cannot be in a scriptname, but can be in a filename. Such symbol as a dot ('.') or a hyphen ('-'), or else.
I.e. make voice clips called like: guy1.1.ogg or guy1-1.ogg.

What do you think about this?
Title: Re: Improving voice clip naming rule
Post by: Snarky on Mon 09/09/2024 18:36:12
Yeah, makes sense. Maybe a space? Just looks better aesthetically, IMO... As long as that doesn't interfere with any command-line tools (where spaces in file names often require special handling).
Title: Re: Improving voice clip naming rule
Post by: eri0o on Mon 09/09/2024 19:53:46
I would prefer no spaces. Spaces are evil and should never exist, everyone should just speak in german.
Title: Re: Improving voice clip naming rule
Post by: Crimson Wizard on Fri 20/09/2024 23:23:42
So, I am ready to merge this in, the only doubt is separator.

I did it with a dot, which makes it look like
- "MyCharacter.1.ogg"
or
- "MyCharacter1.1.ogg" - example of character name with trailing digits.

An alternative is a hyphen, which will make it look like
- "MyCharacter-1.ogg"
or
- "MyCharacter1-1.ogg"