Page 1 of 1
Testing A Mod Script Without Having to Keep Rebuilding Mod
Posted: Wed Mar 04, 2020 9:38 pm
by Magicono43
As the title says, is there a way that I can quickly test a .cs script without having to rebuild the mod every-time I change a few lines of code? I'm trying to solve something with some trial and error, but it takes most of the time just rebuilding the mod over and over again.
Re: Testing A Mod Script Without Having to Keep Rebuilding Mod
Posted: Wed Mar 04, 2020 9:51 pm
by Ralzar
Haha, I know your pain.
What you need is to make sure you are keeping your mod code in Assets/Game/Mods
When you start the DaggerfallUnityStartup scene, it will read your *dmfod.json files as dfmod files.
Example of how I keep my files:
- modstructure.PNG (20.84 KiB) Viewed 1094 times
This is not the most ideal way of doing it though. It's better to just keep each dfmod.json file in its respective mods subfolder. I simply started doing it like this and haven't bothered to change my habits.
Re: Testing A Mod Script Without Having to Keep Rebuilding Mod
Posted: Thu Mar 05, 2020 1:44 am
by Magicono43
Does the mod still function property if you just have dfmod.json inside the Assets/Game/Mods folder? I tried to put that alone inside and the mod was called "'mod name' debug" but when I started the game it would not do any of the debug log commands I gave it.
If I built and made a normal dfmod file and put it inside StreamAssets/Mods folder with the others, it functioned properly this time. I must be messing some of this up royally just bumbling around, but maybe i'll just keep rebuilding every-time. I guess the .json does not actually hold any of the scripts and assets, it's just there to debug mod builder settings or something.
Re: Testing A Mod Script Without Having to Keep Rebuilding Mod
Posted: Thu Mar 05, 2020 5:41 am
by BadLuckBurt
You should probably give this a read:
https://www.dfworkshop.net/projects/dag ... p-new-mods
I dont know what you put in the dfmod.json but code should go into separate.cs files
Re: Testing A Mod Script Without Having to Keep Rebuilding Mod
Posted: Thu Mar 05, 2020 12:40 pm
by Hazelnut
Take some time to read the modder docs TheLacus wrote. May help.
Re: Testing A Mod Script Without Having to Keep Rebuilding Mod
Posted: Fri Mar 06, 2020 1:40 am
by Magicono43
Hazelnut wrote: ↑Thu Mar 05, 2020 12:40 pm
Take some time to read the modder docs TheLacus wrote. May help.
I skipped that one and read the other ones, since it looked like it was doing mostly graphical assets and seemed like more than I needed, but I guess scripts are sort of assets as well, so I probably should.
Re: Testing A Mod Script Without Having to Keep Rebuilding Mod
Posted: Fri Mar 06, 2020 9:16 am
by Hazelnut
There's plenty about assets, but there's also this page...
https://www.dfworkshop.net/projects/dag ... /features/