PrismaticFlower / swbf-unmunge

A totally groovy tool for getting access to game files for a game from 2005.
MIT License
25 stars 4 forks source link

ODF ClassParent parameters are incorrectly parsed as ClassLabel #12

Closed marth8880 closed 4 years ago

marth8880 commented 6 years ago

For example, this:

[WeaponClass]

ClassLabel = "com_weap_inf_smg_n7hurricane"
GeometryName = "m9_tempest.msh"

[Properties]

HUDTag = "m9_tempest"
GeometryName = "m9_tempest"
HighResGeometry = "m9_tempest"
OrdnanceName = "ssv_weap_inf_smg_n7hurricane_ord"

should be this:

[WeaponClass]

ClassParent = "com_weap_inf_smg_n7hurricane"
GeometryName = "m9_tempest.msh"

[Properties]

HUDTag = "m9_tempest"
GeometryName = "m9_tempest"
HighResGeometry = "m9_tempest"
OrdnanceName = "ssv_weap_inf_smg_n7hurricane_ord"
PrismaticFlower commented 6 years ago

This is caused by both keys being turned into the same BASE chunk, which suggests from the game's point of view they're the same. However it would be easy to add a lookup table to check if we're dealing with a known ClassLabel and output the correct key name for the user's benefit.

PrismaticFlower commented 5 years ago

Turns out there is one key difference between ClassLabel and ClassParent and that is that the latter produces class references in .req files. So swbf-unmunge simply always using ClassLabel is actually a bug after all. If I (or someone else) ever work on swbf-unmunge again this would be a good and easy thing to fix.