Open budak7273 opened 1 year ago
Started on resource-extraction-data branch a519908
I thought aloud for a bit about this in https://discord.com/channels/555424930502541343/555505343031934979/1218211168401883217 and Robb pointed me to this issue. The wall of text, assembled together:
(About handling modded resource node meshes/materials for a dynamic, mod-aware https://ficsit.app/mod/BuildableResourceNodesRedux extension): Yeah, that's what I'd need to work on:
IMHO, the most optimal way to deal with this would be to "standardize" resource nodes. What I mean is to have a list of resource node types in SML, and have mods register the resource node types they add in the Mod Content Registry. I would also recommend adding some additional information in the registry entries:
Aerated Crude Oil
from https://ficsit.app/mod/PneumaticFrackingMachine could be listed as a custom node with help text.Satmonium
would be registered by SatisfactoryPlus
even though its assets are in KLib
because the mod making use of Satmonium
is SatisfactoryPlus
). SatisfactoryPlus
should also be listed here when making resource nodes from other mods unavailable (so that "why does resource X not show up in my world?" is easy to answer).This approach contemplates several use-cases:
However, this approach requires making a few concessions:
But I believe the advantages are worth it in the long run:
Addendum:
To be very clear, the only bits I would add to SML would be the API for "resource node descriptors", which boils down to a data structure (see above for the information it would contain, some fields might need to be sub-structures) and a few functions to manipulate the content registry (e.g. "add resource node descriptor", "get all resource node descriptors"...)
The use-cases listed above would be implemented by other mods. They're use-cases I've considered when drafting this idea in order to make the proposed SML API as general as possible.
Allow mods that implement new resources to offer information about the resource's nodes for use by other mods.
Mods define data assets that specify this information
SML BPFL will allow lookup of details from an FGResourceDescriptor class
Interface allows items to supply a data asset to be returned when they are looked up
Base-game items can't be made to implement the interface, so SML will redirect their calls to return data assets that SML defines for these
https://discord.com/channels/555424930502541343/562722670974599227/1124783052971847761