How do you convert a QuestPack to a dfmod with Minimum Requirement for 0.10.24 Build

Discuss modding questions and implementation details.
Post Reply
User avatar
harbinger451
Posts: 192
Joined: Mon Apr 13, 2020 4:08 pm
Contact:

How do you convert a QuestPack to a dfmod with Minimum Requirement for 0.10.24 Build

Post by harbinger451 »

Hi, and sorry for the totally noobie questions, but I'm converting my Prostitutes And Lovers Quest Pack into a dfmod that will have a minimum requirement of the DFUnity 0.10.24 build. This is my first attempt at producing a dfmod, so please bear with me, and on the face of it packaging a quest pack as a dfmod should be a simple introduction to the process, but I have two questions.

1. When placing the developement files into ...

daggerfall-unity-master/Game/Mods/Prostitutes And Lovers v1.2/

... should the quest and questlist files be loose in that folder, be in thier own "Quests" folder, or be nested in "Assets/Quests" folders? (the readme in "Mods" doesn't mention quests specifically but I'm guessing they're just another asset)

2. When filling in the Mod-Builder window, the "DFUnity Version" field already lists the latest build ... does this represent a minimum requirement? If not, how do I make the latest build a minimum requirement?

I'm so new to this, its embarrasing, but I am willing to learn. And thank you for your patience.
Last edited by harbinger451 on Tue Jul 07, 2020 2:04 pm, edited 1 time in total.
Image

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

Re: Converting a QuestPack to a dfmod with Minimum Requirement for 0.10.24 Build

Post by l3lessed »

The minimum requirement will be filed in by whatever build number your editor has loaded. As long as it matches the release build number, your good. I will point out, most mods will work when moving up a build, so the message is more of a warning for people to double check.

As for building the mod, not 100% sure since I haven't done quests yet. However, from my personal experience, you run into the least amount of issues if you load files into their base folders, where the engine already has its built in files. So, I put my scripts somwhere in the "assets/scripts" directory before I compile them. When I tried to put them in their own custom directory outside the "assets/scripts" folder for my own organization purposes, I ran into some issues (can't remember exactly).

I recommend doing the same for all the quest files.

I found it works better to go with the default engine directory/file structure for file placement, whenever possible.
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.

User avatar
harbinger451
Posts: 192
Joined: Mon Apr 13, 2020 4:08 pm
Contact:

Re: Converting a QuestPack to a dfmod with Minimum Requirement for 0.10.24 Build

Post by harbinger451 »

So I've packaged the quest files and quest list in "Game/Mods/Prostitutes And Lovers v1.2/Assets/Quests" and the "dfmod.ison" file in "Game/Mods/Prostitutes And Lovers v1.2/" into a dfmod mod using the mod builder. Then put that dfmod into "StreamingAssets/Mods" and played the game. The mod is listed in the mod manager after startup, and the details are all present and correct. Its enabled. But when playing none of the quests appear.

What am I doing wrong?

EDIT - Oh, rookie mistake, I just figured out I need a script to register the quest list ... let's see how long it takes me to figure out how to do that correctly.
Image

User avatar
harbinger451
Posts: 192
Joined: Mon Apr 13, 2020 4:08 pm
Contact:

Re: How do you convert a QuestPack to a dfmod with Minimum Requirement for 0.10.24 Build

Post by harbinger451 »

Okay, I got it all working. I just had to pack the quests and quest list in their own "Quests" folder and the script (see below) in its own "Scripts" folder ... no need for nesting any of it in an "Assets" folder - wouldn't work when I did that.

If anyone's interested, this is the script I ended up with for registering the quest pack:

Code: Select all

using System;
using UnityEngine;
using DaggerfallWorkshop.Game;
using DaggerfallWorkshop.Game.Questing;
using DaggerfallWorkshop.Game.Utility.ModSupport;

namespace ProstitutesAndLovers
{
	public class ProstitutesAndLoversMod : MonoBehaviour
	{
		static Mod mod;

		[Invoke(StateManager.StateTypes.Start, 0)]
		public static void Init(InitParams initParams)
		{
			mod = initParams.Mod;
			var go = new GameObject(mod.Title);
			go.AddComponent<ProstitutesAndLoversMod>();
		}

		void Awake()
		{
			InitMod();
			mod.IsReady = true;
		}

		public static void InitMod()
		{
			Debug.Log("Begin mod init: Prostitutes And Lovers");

			{
				if (!QuestListsManager.RegisterQuestList("ProstitutesAndLovers"))
					throw new Exception("Quest list name is already in use, unable to register Prostitutes And Lovers quest list.");
			}

			Debug.Log("Finished mod init: Prostitutes And Lovers");
		}

	}
}
Image

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

Re: How do you convert a QuestPack to a dfmod with Minimum Requirement for 0.10.24 Build

Post by Ralzar »

Oh hey. This will be handy. I actually tried to figure this out at some point, more for curiosities sake than anything, and I just could not get it to work for some reason.

Maybe I'll return to the experiment at some point and base it off this code :)

Post Reply