DavidJCobb / ReachVariantEditor

A tool for editing Halo: Reach game variants.
23 stars 9 forks source link

Limited Access To Sounds From !snd Tag #15

Closed Sopitive closed 2 years ago

Sopitive commented 2 years ago

The current documentation only lists a portion of the sounds actually available in the list of sounds in the !snd tag. I have also been browsing the fsb, though not all of those sounds are likely accessible via Megalo. I was wondering if it were at all possible to access sounds, such as the "better_luck_next_time" and similar ones that are not listed in the current documentation. There are a few unused sounds that are included in the !snd tag of every .map file, many of which would be fun to use in a modified game type.

DavidJCobb commented 2 years ago

Within map files, the mgls tag type is what defines the list of sounds available to Megalo. Game variant scripts specify sounds as an index into that list (ReachVariantTool has hardcoded names which map to these indices, for convenience).

The only way to use arbitrary sounds, beyond those provided, would be to alter the list in the map file. Doing that wouldn't affect the list of sound names that ReachVariantTool recognizes, but you would be able to specify sound indices numerically (e.g. writing 0 instead of announce_slayer). It doesn't look like you can extend the list length in Assembly; even if you can, I'm not sure the game would accept game variants that specify sound indices above 94, the current maximum; even if it does, the file format would use only seven bits to encode sound indices, so sound indices above 128 would not be usable.

Additionally, when you enter a numeric value for a sound, it is not bounds-checked properly when compiling a script, which is a bug on my end. So if you were to enter, say, 127, that actually might get encoded into the file as an out-of-bounds sound index, instead of triggering a compiler error.