Referencing assets in other mods

Hi, how can create a mod that references assets from other mods? Is it possible to do this without access to the original mod source? Specifically I would like to create a compatibility mod for my fluid mod that includes recipes where the output or ingredient would be a fluid from another mod like Ficsit Farming or Refined Power. I can determine the asset paths using FModel, even their properties, and I assume I should be able to create placeholders like in the starter project, but I do not know how. A nice bonus would be if I could do this without creating a separate mod and conditionally register the recipes/schematics if the mods are present. I am interested in solutions not involving C++ :)
Solution:
There's no secret steps. You have the answers. Use FModel to find the name and path of an asset, then make a version just like the starter project and point to that. That will correctly reference content from another mod. The problems start with making it work when other people can't haven't or won't install the other mod.
Jump to solution
7 Replies
Solution
AngryBeaver
AngryBeaver4w ago
There's no secret steps. You have the answers. Use FModel to find the name and path of an asset, then make a version just like the starter project and point to that. That will correctly reference content from another mod. The problems start with making it work when other people can't haven't or won't install the other mod.
AngryBeaver
AngryBeaver4w ago
To force people to install the other mod add it as a dependency in your uplugin. If it's meant to be optional read the docs we have on optional module loading so you can isolate the changes necessary. You may even have to CDO your own content to link the two mods together optionally.
Argual
ArgualOP4w ago
"then make a version just like the starter project" This is the part I do not know how to do. If I knew how I can create the placeholder assets I believe I could eventually find my way, but I thought there are some keys or ids for the objects that need to be set. If I understand you correctly, it is enough if I "replicate" the structure of the mod I want to interface with, and if the path (and type) of the assets I reference to are correct, it will work in game? If so, one last question I have is where to put the placeholders? In the same folders as the "regular" mods are I assume?
AngryBeaver
AngryBeaver4w ago
So long as it's the right type of thing, the right class. With the same name in the same path. That's all you need there's no other data needed to make the link. You have to put them where they should be. So you will have to make a folder of the fake mod. I don't think the class to even be perfect, just so long as it's something in the inheritance tree of the real thing. Unreal points to files by their path and filenames internally. It's why redirector files and core redirects work
Argual
ArgualOP4w ago
I think I get the idea. And to conditionally load the submodule I define these things in, I can reference the root game world module of the mod i want to interface with, and spawn the compatibility submodule if it exists?
AngryBeaver
AngryBeaver4w ago
Yup
Argual
ArgualOP4w ago
Thank you! <3
Want results from more Discord servers?
Add your server