Repacking an edited mod (Convert loose to .dfmod)

Discuss modding questions and implementation details.
Post Reply
Pr0ph3t
Posts: 11
Joined: Fri Dec 06, 2019 4:57 pm

Repacking an edited mod (Convert loose to .dfmod)

Post by Pr0ph3t »

Hi everyone !

I've been reading the documents, I even got Unity but I'm having a LOT of trouble understanding how I'm supposed to do this :(

I edited the Airships mod to force only small ships for charter because the big ones go too fast and fall off the map with tedious travel (doesn't seem to happen with the small ones). So I unpacked the .dfmod using 'extract text' in the DaggerfallUnity splash screen, now I want to repack that directory back into a .dfmod.

I really don't understand where this 'Daggerfall Tools -> Mod Builder' option is. Is there a utility or something where you select the dir and it just packs it ?

Thank you everybody

l3lessed
Posts: 1409
Joined: Mon Aug 12, 2019 4:32 pm
Contact:

Re: Repacking an edited mod (Convert loose to .dfmod)

Post by l3lessed »

I just figured this out. First off, there is a tutorial. If you haven't read it., read it. It can still be a little confusing. However, it isn't that hard once you understand it.

1st step is creating the mod .json file by creating a new mod in the mod building without adding any assets to it. Just type in the mod information, and save the file settings for the mod. This should create a .json file to track the mod. The Json file is critical to create and include in the bundled mod file, as it is the main meta data tracker it seems.

Next, click the asset window button to open it up. There should be the json file listed under the assets. If not, without anything selected in the unity editor, click save file settings and then click add asset. Again, you should see the Json file included in the mod builder asset window now.

Next add the assets you want to bundle into your mod, click build, and select where you want it to compile the final .dfmod file. It will create three folders, one for each main operating system. It will compile the final mod in the one your computer's os is running.

Some side notes to consider, if the mod has any script files it uses to manage art or sound assets, you may need to modify the script files if you also modify the art assets. Many times, it isn't as easy as just swapping out an asset and repacking it.

viewtopic.php?f=22&t=277

Simple Flow Chart
Mod Builder -> Mod JSON File (Must have to track mod assets and data) -> Assets -> DFMod
My Daggerfall Mod Github: l3lessed DFU Mod Github

My Beth Mods: l3lessed Nexus Page

Daggerfall Unity mods: Combat Overhaul Mod

Enjoy the free work I'm doing? Consider lending your support.

Pr0ph3t
Posts: 11
Joined: Fri Dec 06, 2019 4:57 pm

Re: Repacking an edited mod (Convert loose to .dfmod)

Post by Pr0ph3t »

Hey there!

My problem is getting the 'daggerfall tools > mod builder' menu.

Just finished cloning the github DF trying to figure out how to 'attach it' to unity

User avatar
TheLacus
Posts: 1305
Joined: Wed Sep 14, 2016 6:22 pm

Re: Repacking an edited mod (Convert loose to .dfmod)

Post by TheLacus »

Hi! What you are trying to do is not possible. Extract text button is a security feature as it allows to easily export c# scripts as text files for reading.

A mod with .dfmod extension is not a simple zip archive, is something more advanced that contains assets converted to a format suitable for target platform. This is why multiple versions are available for different operating system. It is not possible to recreate source files from a mod and rebuild it again.

I suggest you to provide feedback to mod author and request changes. There is extensive support for mod settings so hopefully you can get your change approved at least as an option.

Pr0ph3t
Posts: 11
Joined: Fri Dec 06, 2019 4:57 pm

Re: Repacking an edited mod (Convert loose to .dfmod)

Post by Pr0ph3t »

ah thank you very much

User avatar
gunsling3r
Posts: 25
Joined: Sun Dec 01, 2019 2:45 am

Re: Repacking an edited mod (Convert loose to .dfmod)

Post by gunsling3r »

I have a completed mod yet I am not even able to successfully run Example 3 under tutorial.
I do not see "example" gameobject under scene. I have followed tutorial 3 multiple times.

I also see this error recently:

Code: Select all

Error (): `UnityEngine.UIElements.BaseField<TValueType>' must be type definition or nested non-inflated type to MakeGenericType
This is what I have under jason. Note that locations of assets have been changed, rest is same to just test mod loading.

Code: Select all

{
    "ModTitle": "Example3-Loading & Setup",
    "ModVersion": "",
    "ModAuthor": "lypyl",
    "ContactInfo": "lypyl@dfworkshop.net",
    "DFUnity_Version": null,
    "ModDescription": "This mod is an example that will load a prefab & 5 audio tracks\nand play those tracks at random once the player starts a game.",
    "GUID": "f566e8be-335e-465c-9cbd-84f4ff721690",
    "Files": [
        "Assets/Untracked/Example3/Example.prefab",
        "Assets/Untracked/Example3/Zero Gravity 1.ogg",
        "Assets/Untracked/Example3/Zero Gravity 2.ogg",
        "Assets/Untracked/Example3/Zero Gravity 3.ogg",
        "Assets/Untracked/Example3/Zero Gravity 4.ogg",
        "Assets/Untracked/Example3/Zero Gravity 5.ogg",
        "Assets/Untracked/Example3/Zero Gravity_ReadMe.txt",
        "Assets/Untracked/Example3/ExampleModLoader.cs",
        "Assets/Untracked/Example3/RandomAudioClipPlayer.cs",
        "Assets/Untracked/ModBuilder/example3.dfmod.json"
    ],
    "Contributes": null
}
Can someone provide me a unitypackge with working example3 please?

Post Reply