Issue replacing city wall model

Discuss modding questions and implementation details.
Alth
Posts: 16
Joined: Wed Feb 20, 2019 9:59 pm

Re: Issue replacing city wall model

Post by Alth » Sat Feb 01, 2020 7:34 am

I assume I just add all the files to a package and export?
Attachments
WallReplacer.7z
(284.17 KiB) Downloaded 2 times

BadLuckBurt
Posts: 296
Joined: Sun Nov 05, 2017 8:30 pm

Re: Issue replacing city wall model

Post by BadLuckBurt » Sat Feb 01, 2020 8:45 am

I imported that package and just followed the setup I suggested, this is your model in-game:

Image

Some issues I noticed in your setup (not related to the model showing up in-game):

1. You haven't checked 'Generate Colliders' in the FBX properties (Unity's right pane). This means the model will not have any collision.
2. The orientation of the model is wrong as you can see in my screenshot. Kaedius linked to a Blender script and gave some instructions to fix that here: viewtopic.php?f=27&t=888&p=27295&hilit= ... fix#p27184

I've attached a ZIP with the folder as I have set it up. If you unzip this in Assets/Game/Mods, you should be able to just open the dfmod.json file with ModBuilder and build the mod.

I've also attached the built version of the mod for Windows.

I don't know why your setup doesn't work but maybe TheLacus can shine some light on this.
Attachments
wallreplacertest.dfmod.zip
(160.92 KiB) Downloaded 2 times
WallReplacerTest.zip
(20 KiB) Downloaded 2 times

Alth
Posts: 16
Joined: Wed Feb 20, 2019 9:59 pm

Re: Issue replacing city wall model

Post by Alth » Sun Feb 02, 2020 1:54 am

Yeah, still not working for me. No idea what is wrong.

Edit: Just noticed a message in the console: "Ignoring virtual mod WallReplacer because released mod is already loaded." That might be the issue but I don't know what it means.

Edit2: I think the message was just because I had the built mod file in StreamingAssets/Mods but it still does not work.

BadLuckBurt
Posts: 296
Joined: Sun Nov 05, 2017 8:30 pm

Re: Issue replacing city wall model

Post by BadLuckBurt » Sun Feb 02, 2020 5:42 am

I dont know anything about that error or virtual mods but i have tested your model in the game, not the editor

Alth
Posts: 16
Joined: Wed Feb 20, 2019 9:59 pm

Re: Issue replacing city wall model

Post by Alth » Sun Feb 02, 2020 6:12 am

BadLuckBurt wrote:
Sun Feb 02, 2020 5:42 am
I dont know anything about that error or virtual mods but i have tested your model in the game, not the editor
Okay so the problem was that I didn't know that you have to build and run the actual game. I assumed running in the editor would give the same result. Is it not possible to test this from the editor? Seems a bit tedious to have to build the whole game to test a model. Is the build faster after the first time?

Thanks to you guys for the help! Now I can join in with making the game better (hopefully) :)

BadLuckBurt
Posts: 296
Joined: Sun Nov 05, 2017 8:30 pm

Re: Issue replacing city wall model

Post by BadLuckBurt » Sun Feb 02, 2020 6:19 am

You dont have to build the whole game. You can just use the main release and load the built mod version in there

I know its possible to run mods in the editor but Ive never done it so someone else will have to answer that

User avatar
Ralzar
Posts: 815
Joined: Mon Oct 07, 2019 4:11 pm
Location: Norway

Re: Issue replacing city wall model

Post by Ralzar » Sun Feb 02, 2020 9:15 am

You can run mods in the editor. However, you need to build the mod once, so it produces a .dfmod.json file.
This file is just mod metadata and a list of the filepaths for all files the mod uses.

The .dfmod.json file has to be put in the editor folder Game/Mods.

Edit: Or maybe you don’t have to build the mod, just save settings.
My released mods

"I feel like Ralzar specifically wrote those mods for me and then said "Use them". Just so he could watch me die more."
-FuzzyBeanPlays

Alth
Posts: 16
Joined: Wed Feb 20, 2019 9:59 pm

Re: Issue replacing city wall model

Post by Alth » Sun Feb 02, 2020 11:07 am

Ralzar wrote:
Sun Feb 02, 2020 9:15 am
You can run mods in the editor. However, you need to build the mod once, so it produces a .dfmod.json file.
This file is just mod metadata and a list of the filepaths for all files the mod uses.

The .dfmod.json file has to be put in the editor folder Game/Mods.

Edit: Or maybe you don’t have to build the mod, just save settings.
Hmm I have tried that, I'll figure it out eventually. At least I know how to get it to work in the game now.

User avatar
Ralzar
Posts: 815
Joined: Mon Oct 07, 2019 4:11 pm
Location: Norway

Re: Issue replacing city wall model

Post by Ralzar » Sun Feb 02, 2020 11:19 am

Alth wrote:
Sun Feb 02, 2020 11:07 am
Ralzar wrote:
Sun Feb 02, 2020 9:15 am
You can run mods in the editor. However, you need to build the mod once, so it produces a .dfmod.json file.
This file is just mod metadata and a list of the filepaths for all files the mod uses.

The .dfmod.json file has to be put in the editor folder Game/Mods.

Edit: Or maybe you don’t have to build the mod, just save settings.
Hmm I have tried that, I'll figure it out eventually. At least I know how to get it to work in the game now.
Try this:
1: Open the master files in Unity.
2: Create a new folder with the name of your intended mod in Assets/Game/Mods.
3: Create a script file containing your mod script. Put this in the folder you just made.
4: Click "Daggerfall Tools"->"Mod Builder"
5: Click "Create A New Mod". Do not change folders, simply write the name of your mod and click "Save".
6: Fill in the name, version etc fields in the Mod Builder window.
7: Select the script file you made in step 3. Click "Add selected assets"
8: Click "Save Mod settings to file"
10: Click “Build Mod”. Select a folder outside the project folders.
11: Give Unity about 5 minutes to build the mod.


This will build the mod and create the correct files in the editor. Most likely you are not using the correct folders in the editor.
My released mods

"I feel like Ralzar specifically wrote those mods for me and then said "Use them". Just so he could watch me die more."
-FuzzyBeanPlays

Post Reply