Acceptable symbols for sprite names?

Ask about editing graphics, sounds, models, music, etc here!
Shaders (GLSL) and SNDINFO questions also go here!

Moderators: GZDoom Developers, Raze Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Post Reply
Gabenslair
Posts: 11
Joined: Sat Jul 07, 2018 12:18 pm

Acceptable symbols for sprite names?

Post by Gabenslair »

I know for sure that decorate accepts the alphabet and numerals, but since it also accepts things like * and !, i want to know just how many symbols can be registered into DECORATE/Zscript classing.
I Assume that if it does ultilize the ASCII format, then we're likely dealing with 255 symbols correct me if im wrong.

The reason why im asking this is because i want to try and make sprites that won't conflict with other sprites in other mods, and if i use lesser used symbols, then I'll have a better chance that whatever sprite im naming wont collide with another's sprite. Would give more arm space if i tried something like "*&£DA0" or "@AEDA0" and that would register into the decorate/zscript format
Gez
 
 
Posts: 17835
Joined: Fri Jul 06, 2007 3:22 pm

Re: Acceptable symbols for sprite names?

Post by Gez »

Gabenslair wrote:I Assume that if it does ultilize the ASCII format, then we're likely dealing with 255 symbols correct me if im wrong.
Technically ASCII is 128 values, not 256; and a full 32 of those are control characters that are not usable at all in names. Notably, £ which you used in an example, is not an ASCII character. Then you can also exclude space and quote marks. Then it's not case-sensitive, "boss" and "BOSS" will be interpreted the same, so you can remove a further 26 characters from consideration. Finally, "TNT1", "____" and "####" are reserved values used for special sprite behavior, and "^" is not usable in lump names since ZDoom interprets ^ as a substitute for \.
User avatar
Enjay
 
 
Posts: 26534
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Acceptable symbols for sprite names?

Post by Enjay »

The best way to do this, IMO, is to use names that have a good chance of being unique to you (e.g. using letters from your username/mod name etc.). Obviously, it's not a guarantee, but it's reasonably effective.
SanyaWaffles
Posts: 806
Joined: Thu Apr 25, 2013 12:21 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Windows 11 for the Motorola Powerstack II
Graphics Processor: nVidia with Vulkan support
Location: The Corn Fields
Contact:

Re: Acceptable symbols for sprite names?

Post by SanyaWaffles »

Does anyone know how many theoretical unique sprite values you can have with all that? I was trying to discuss the sprite name limits for standalone TCs.
NiGHTMARE
Posts: 3463
Joined: Sat Jul 19, 2003 8:39 am

Re: Acceptable symbols for sprite names?

Post by NiGHTMARE »

Unless there are any other unusable characters not mentioned in Gez's post, there are 67 possible characters.

If that's the case, then the number of different possible sprite names is 67 x 67 x 67 x 67 - 2 = 20,151,119.

I believe you can only use A - Z, [, \, and ] for the fifth character, which would mean there are 584,411,451 possible frames.

Of course, you'll need to reduce these figures by the number of existing sprite names and frames in the game your project is for.
SanyaWaffles
Posts: 806
Joined: Thu Apr 25, 2013 12:21 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Windows 11 for the Motorola Powerstack II
Graphics Processor: nVidia with Vulkan support
Location: The Corn Fields
Contact:

Re: Acceptable symbols for sprite names?

Post by SanyaWaffles »

What characters are usable? I was under the impression only A-Z and numbers were usable for sprite names.
NiGHTMARE
Posts: 3463
Joined: Sat Jul 19, 2003 8:39 am

Re: Acceptable symbols for sprite names?

Post by NiGHTMARE »

Gez already provided the answer in his post. In summary, all standard ASCII characters except:

- control characters (0 - 27)
- space (32)
- " (34)
- ^ (94)
- lower case letters (97 - 122)

I'm assuming DEL (127) also can't be used ;)

The other standard ASCII characters are those which can be found on a normal QWERTY keyboard: ` ! $ % & * ( ) _ - + = [ { ] } ; : ' @ # ~ , \ | < . > ? /
SanyaWaffles
Posts: 806
Joined: Thu Apr 25, 2013 12:21 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Windows 11 for the Motorola Powerstack II
Graphics Processor: nVidia with Vulkan support
Location: The Corn Fields
Contact:

Re: Acceptable symbols for sprite names?

Post by SanyaWaffles »

Some of those might be tricky to use due to certain file systems not allowing colons and slashes and other symbols unless you store them in a WAD format.
Gabenslair
Posts: 11
Joined: Sat Jul 07, 2018 12:18 pm

Re: Acceptable symbols for sprite names?

Post by Gabenslair »

I tested the DECORATE file for any acceptable sprite names.

You are only allowed a singular case of letters and numerals for the first 4 symbols. 36 in total.
Any sort of ascii symbol that is other than the accepted symbols described above will incur an error that displays "Sprite names must be exactly 4 characters"
since DECORATE is deprecated and in general GZDOOM's development is in a state of stagnation, case is closed.
Post Reply

Return to “Assets (and other stuff)”