I recently made a weapon mod that I uploaded to the workshop, but it isn’t working, even though I thought I had everything covered. I have my models bundled fine and my .dat files are formatted correctly, but I can’t spawn the items in the mod and the name of the mod is red in the manager list, which I couldn’t find anything about online. My files and folders in the mod folder are as follows:
Name Mars Magazine
Description Low caliber military grade <color=epic>Mars</color> magazine. Designed to fit 10 rounds.
It should also be noted that a GUID fails to generate at the top of Mars.dat and Mars_10.dat, I think that might be the source of the problem. I tried generating and pasting a GUID manually but it just deleted itself from the .dat files when I uploaded it to the workshop. I also tried changing the folder order to match some other working mods I had installed but nothing worked. Any help is appreciated!
Did your mod work at some point previously? It sounds like you’ve tried doing quite a bit all at once. Some notes based on what you’ve said:
This usually happens if your Unity setup is wrong. Maybe you haven’t bundled all the necessary files, or you’re using the wrong version of Unity. There’s possibly an error visible from the in-game error logs available from the main menu, which would help point you in the right direction if so.
There’s a few reasons a mod might be red. For example, you might have the visibility set to Hidden or Unlisted.
Although if you’re just trying to test your mod and make sure it works, it’d be much simpler and quicker to not upload it to the Steam Workshop until it’s done. Players often make the mistake of having their custom files in the game folder, and being downloaded to their own Steam Workshop mod with the same files, which can cause issues.
If you use a .masterbundle setup, the folder hierarchy should be 1:1 to your Unity setup (particularly important for .masterbundle setups). Otherwise, general rule of thumb is to at least have your top-level folders like they are for vanilla content.
I checked the error logs like you said and it says that it’s missing the item “GameObject”, which I’m sure I bundled, although I’ll check again and try bundling again in Unity.
Also yeah, the name of the mod is red because it’s privated on the workshop, didn’t actually know that before.
Edit: I did some more research and apparently that error is caused by the stuff that you said, like an incorrect unity version. I’m going to try downgrading my unity version and try again. I also checked the latest patch notes and the highest unity version supported by the game is 2020.3.43f1 and I was using 2021.3.16f1, so that’s most likely where the problem is.
Using a slightly older patch such as x.37 shouldn’t cause an issue, but @ludroth is using the same version that the game is currently running (2020.3.43f1). Their issue was most likely caused by something else.
They haven’t provided additional information/images recently, but my current guess is that the Asset_Prefix in their MasterBundle.dat isn’t correct. This could be because:
It’s just the wrong path. E.g., they might have it as Asset_Prefix FolderNameHere rather than Asset_Prefix Assets/FolderNameHere.
They changed the name, and only the name, in their most recent bundling. IIRC, if the only thing that changed was a folder name, then your .masterbundle won’t actually update. You’d need to delete your previous .masterbundle files (including the .hash, .manifest, and multi-platform files too), and then re-bundle them.
It’s also worth double-checking that the Asset_Bundle_Name is correct. It should be the same as the asset label you’ve added to the main FolderNameHere folder in Unity.
Alternatively, the GameObject for the item might just be incorrectly set up.