Skeleton_With_Gun Posted 15 hours ago Report Posted 15 hours ago I've been trying to create a little sound replacement mod for the Bell, but have run into some issues. I'm 99% sure I have the modinfo and file structure set up right, but the log throws the following whenever I try to load: 13.9.2026 14:11:55 [Error] [dreamybell_1.0.zip] An exception was thrown trying to to load the ModInfo: 13.9.2026 14:11:55 [Error] [dreamybell_1.0.zip] Exception: Object reference not set to an instance of an object. at Vintagestory.Common.ModContainer.LoadModInfo(ModCompilationContext compilationContext, ModAssemblyLoader loader) in VintagestoryLib\Common\API\ModContainer.cs:line 344 Bizarrely, this problem goes away if it goes into the mods folder as an unzipped folder, but then the sounds won't play properly. Any advice? I've attached the full mod, be warned that I spliced the bell sounds with Dreamybull clips so maybe don't play the sound files over speakers. dreamybell_1.0.zip
Novadegree Posted 14 hours ago Report Posted 14 hours ago (edited) You have your assets folder, modicon, and modinfo in a folder named dreamybell_1.0 in the zip . Just the mod files go into the zip, no container folder. I'm sorry I don't know how to explain it properly but try this file. I didn't check your code (I wouldn't know if it was right or not anyways). Hope it works for you. Actually there isn't any code, you're going to have to come up with a patch json file to tell the game to replace the sound. But what I said about the folder inside the zip holds true. Good luck. dreamybell_1.0.zip Maybe this post will help you Where To Get Started With Audio Replacement Mod? Again Good luck. Edited 11 hours ago by Novadegree
Brady_The Posted 11 hours ago Report Posted 11 hours ago Novadegree is right about the folder structure. Your sounds most likely do not work because you are using the incorrect folder. "game" is used as a stand-in for all Vanilla game folders (creative, game, survival). Simply renaming the folder should do the trick.
Novadegree Posted 11 hours ago Report Posted 11 hours ago (edited) 8 minutes ago, Brady_The said: Novadegree is right about the folder structure. Your sounds most likely do not work because you are using the incorrect folder. "game" is used as a stand-in for all Vanilla game folders (creative, game, survival). Simply renaming the folder should do the trick. Doesn't there have to be an mybellsound.json with an op replace for the game to read them? I don't see anything in the mod other than sound file. I guess not. Interesting. Edited 11 hours ago by Novadegree
Diff Posted 11 hours ago Report Posted 11 hours ago (edited) 11 minutes ago, Novadegree said: Doesn't there have to be an mybellsound.json with an op replace for the game to read them? I don't see anything in the mod other than sound files. If you're just replacing an existing sound, that's all you need. That "Shut The Insects Up!" mod I linked from inside the thread you linked only has these files: ├── assets │ └── game │ └── sounds │ └── creature │ ├── beesting.ogg │ ├── cicada-short-looping.ogg │ ├── cicada.ogg │ └── grasshopper.ogg ├── modicon.png └── modinfo.json Compare to this mod: ├── assets │ └── survival │ └── sounds │ └── creature │ └── bell │ ├── alarm.ogg │ ├── death.ogg │ └── listen.ogg ├── modicon.PNG └── modinfo.json Only real difference besides the asset paths (which are all correct) is the domain, like Brady said. Edited 11 hours ago by Diff
Novadegree Posted 11 hours ago Report Posted 11 hours ago 1 minute ago, Diff said: If you're just replacing an existing sound, that's all you need. That "Shut The Insects Up!" mod I linked from inside the thread you linked only has these files: ├── assets │ └── game │ └── sounds │ └── creature │ ├── beesting.ogg │ ├── cicada-short-looping.ogg │ ├── cicada.ogg │ └── grasshopper.ogg ├── modicon.png └── modinfo.json That post is what I used to check what I said after my dumb butt said something 1
Skeleton_With_Gun Posted 6 hours ago Author Report Posted 6 hours ago Thank you all for the help! Not sure how long it will be before I can try it out, but I appreciate you all regardless
Recommended Posts