Closed mpstark closed 3 years ago
I really need this to fix the cyclops, it currently contains invalid hardpoint data
Error: AdvancedJSONMerge: "MechEngineer\advancedjsonmerge\hardpointdatadef_cyclops.json" could not resolve type for ID: hardpointdatadef_cyclops. Skipping this merge
I did some testing with BT and Unitys AssetBundles. Turns out, they are not loaded while ModTek makes its merges, so in order to get something out of them, they would have to be loaded, then accessed and finally unloaded. Quick example:
AssetBundle a = AssetBundle.LoadFromFile(path+"BattleTech_Data\\StreamingAssets\\data\\assetbundles\\heavymetal");
FileLog.Log("found in " + a.name + " " + a.Contains("Gear_JumpJet_Vectored_Thrust_Kit"));
FileLog.Log(a.LoadAsset<TextAsset>("Gear_JumpJet_Vectored_Thrust_Kit").text);
a.Unload(true);
This was executed as a ModTek dll in FinishedLoading, so it should be relatively easy to adapt this to checks if some json is in one of the dlc assetbundles, and if the check is true, load the json as a string to perform the merge. I would like to test this out, but it is probably faster if someone that knows the code helps me out by pointing me to the correct code pieces. What i need is:
This is why its very suggested to make overrides and not merges
Even with HBS modloader
fixed in #191 (lost ability to merge custom resource though, since now the merges are delayed until datamanager tries to load it)
RequiresDLC
for both ModDef and ModEntry