Galicate Posted June 26 Report Posted June 26 This is my first time making a code mod, and im trying to fetch a json file, but it cant seem to find it. `api.Logger.Notification(api.Assets.Exists(new AssetLocation("vintagediseases:diseases/testdisease.json")).ToString());` returns False I checked my bin/Debug and the files exist and are named properly. What am I doing wrong?
Solution The Insanity God Posted 2 hours ago Solution Report Posted 2 hours ago Essentially assets are stored in: "{modfolder}/assets/{domain}/{assetcategory}/path/to/asset". Where `assetcategory` is something that needs to be defined. The game uses this to separate assets, decide which side needs the files and whether they affect gameplay (which has effect on whether a client only mod can patch the file). I'm guessing your issue is probably forgetting to create the `AssetCategory`.
Recommended Posts