Hi all,
I am having some trouble understanding the general file structure and how to resolve sprites for a given ship (outside of a mod). Here's what I am trying to achive - I would like to resolve a sprite for a given ship by id. The general structure is (almost) clear, too - we have ship_data.csv as a collection of all available entities, and each ship furthermore has one or more possible hulls (inside the data/hulls directory). For any given hull, the *.ship JSON contains a token called spriteName, pointing to the correct sprite (inside the graphics/ships directory).
Take the Hammerhead, for example - the ship's id is 'hammerhead', so there is a 'hammerhead.ship' in the hulls directory. The spriteName attribute points to graphics/ships/hammerhead/hammerhead_base.png. In addition, there is a skin for the Hammerhead D - hammerhead_d.skin, pointing to graphics/ships/hammerhead/hammerhead_damaged.png.
However, when trying to resolve each ship using said algorithm, I encounter some inconsistencies. Take the Cerberus, for example - there just isn't any cerberus.ship JSON, but two variants in the data/hulls/skins. Again, both JSONs point to the respective sprite. So, when trying to resolve the available sprites for each ship (by id), should I change my algorithm to:
* First, try to find {shipId}.ship in data/hulls. If it exists, add the sprite from its spriteName attribute.
* Find any {shipId}*.ship in data/hulls/skins. For each file encountered, add respective sprites.
Is there anything wrong with that attempt? Thanks in advance.