How Spore Packages' Filenames Work

Learning to mod or have something to contribute? Have a look and find more.
rob55rod
Admin
Admin
Posts: 4086
Joined: Sat Jul 02, 2011 9:50 am

How Spore Packages' Filenames Work

Unread post by rob55rod »

Spore deals with filenames within packages in a somewhat odd way: It doesn't have names at all, instead using hashes. A hash, in this case, is an 8-character-long value, composed of Hexadecimal numbers (0 - 9 and A - F). These hashes are usually generated from a string, using a special algorithm, although they don't have to be generated from a string. Here's an example of a hash:

Code: Select all

#406A0200
For sake of ease of use, SporeModder stores a list of names and aliases for hashes.
A name is a string which corresponds to a hash. EAxis has an algorithm for generating hashes from strings, and this algorithm is known well enough that some names have been salvaged from the hashes. Here's an example of a name:

Code: Select all

colorpicker
An alias is a string, similar to a name. There are two big differences, though. The first difference is that, while a name correlates to its hash through EAxis's algorithm, an alias does not. The second difference is that aliases always end with the ~ symbol. Generally speaking, aliases are used when either the original name is not known, or when there is no original name, as is the case for some situations where hashes are either randomly generated, or where there's a pattern to them which is used to identify them, as is the case for palettes. Here's an example of an alias:

Code: Select all

creature_parts~
SporeModder can also generate hashes from names. That's why, when you're developing a mod, you can use filenames containing almost any character you can type and it will work: SporeModder silently hashes the files' names, and even stores a list of names in a file in the mod, so you can access the names later, even if you lose the original files.

If you have any further questions, feel free to ask.


Having trouble with the Spore ModAPI Launcher Kit? Get help here!

If you're reading this, you have my permission to build off of my mods as long as I am credited. Please don't mirror my work unaltered, unless I no longer provide a working download.
Post Reply Previous topicNext topic

Return to “Modding Documentation”