4
« on: August 01, 2023, 03:10:15 PM »
These are quality-of-life issues, from a modding perspective.
1. Right now... Skins are referred to, in Variants. But they aren't referred to with a unique identifier (say, "skinId"). Instead, they're using "hullId". But they're not actually referring to a proper Hull ID string from ship_data.csv and they're not referring to the hullId string in a .ship file.
This isn't ideal; something like that in the JSON files should be unique, imo, so that there's no situation where, say, code reading JSONs encounters a "hullId" that leads to a null or other such issues. If "skinId" is "" (the default value) then the variant should be using baseHullID, obviously.
I realize, that for regular modding, getting baseHullID is a thing, but there are other situations where this can create some extra complexity, and I think this might help you keep .skin / .variant more-maintainable as well.
2. Can you spend a little time on the crashy-crashy behaviors with Skins?
For example... the falcon_p is one of many situations where the engine crashes in most-unhelpful ways atm:
A. For example, this line:
"removeWeaponSlots":["WS 003","WS 004"], # ids
If either "WS 003" or "WS 004" aren't present in the .ship file, the engine crashes and produces an unhelpful error message.
B. Same thing happens here with this data:
"weaponSlotChanges":{
"WS 005":{
#"angle": 0,
#"arc": 210,
#"mount": "TURRET",
#"size": "SMALL",
"type": "COMPOSITE"
},
"WS 006":{
#"angle": 0,
#"arc": 210,
#"mount": "TURRET",
#"size": "SMALL",
"type": "COMPOSITE"
},
"WS 007":{
#"angle": 0,
#"arc": 210,
#"mount": "TURRET",
#"size": "SMALL",
"type": "MISSILE"
},
"WS 008":{
#"angle": 0,
#"arc": 210,
#"mount": "TURRET",
#"size": "SMALL",
"type": "MISSILE"
},
},
...it's also not really clear what, exactly, is happening w/ the commented out data there, but I presume that all that's occurring is an override of the Weapon Slot's type.
This isn't the only example of screwy behavior with Skins, but it's one of the areas where users can create situations where the engine crashes, but it's unclear why. If nothing else, a "was attempting to parse Skin <skin id> and failed to load, crashing now, kthxbye" would be better than what it does now, because then the user knows where things went horribly wrong.