Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to declare QuestLists in .dfmod file. #2580

Merged
merged 5 commits into from
Feb 18, 2024

Conversation

Jagget
Copy link
Collaborator

@Jagget Jagget commented Feb 11, 2024

Currently you can activate new Quest Pack (quest list) by adding the file to StreamingAssets\QuestPacks\ folder.

In case of packing quests in .dfmod file, you must call QuestListsManager.RegisterQuestList("MyQuests").

It is not possible to ship quests in .dfmod without C# script.

I propose to register them in "Contributes" ModInfo section, the same way as BooksMappings

Example:

{
    "ModTitle": "QuestPack",
    "ModVersion": "1.0.0",
    "Files": [
        "QUEST1.txt",
        "QUEST2.txt",
        "QUEST3.txt",
        "QuestList-MyQuests.txt"
    ],
    "Contributes": {
        "QuestLists": [
            "MyQuests"
        ]
    }
}

image

image

Screenshot 2024-02-10 212729

@ajrb
Copy link
Collaborator

ajrb commented Feb 13, 2024

My thinking behind this was that if you were packaging quests into a mod then you'd very likely have some c# script even if just to set things up and act on settings etc. The quest pack idea was because Jay (and others) didn't want to create a dfmod package and script files etc for purely quests. Given some of the abuse of DFU quest packs have enabled I am not sure it was a good idea, but there you go. :-)

This may have been a better way to go than questpacks, but unless we intend to deprecate and remove quest pack functionality I don't really see what this achieves. What am I missing?

@Jagget
Copy link
Collaborator Author

Jagget commented Feb 13, 2024

Sometimes you want to pack mod just to have 1 file instead of 275. The reasoning behind it is simple and I believe the feature is useful. The same as with books, instead of 275 files that you need to add to StreamingAssets, there's only one. It's cleaner, it's easier to uninstall, it's better maintainable, you can turn the quests on and off as usual mod. And with a declarative approach you don't even need C# call. No need to deprecate anything, all 3 ways can easily coexist.

@KABoissonneault
Copy link
Collaborator

My thinking behind this was that if you were packaging quests into a mod then you'd very likely have some c# script even if just to set things up and act on settings etc. The quest pack idea was because Jay (and others) didn't want to create a dfmod package and script files etc for purely quests.

The culture has evolved, even quest-only modders can press Build on the Mod Builder nowadays, without any scripting knowledge.

Given some of the abuse of DFU quest packs have enabled I am not sure it was a good idea, but there you go. :-)

I'm with you in avoiding mods using quests to create unrelated systems, but DFU has to support them regardless.

Outside of that, my only issue with the PR is that it seems to require modifying the JSON manually to enable the feature, which is a step better than C#, but should probably be a Mod Builder feature. Granted, I think we can push that part to a later PR

@Jagget
Copy link
Collaborator Author

Jagget commented Feb 13, 2024

Outside of that, my only issue with the PR is that it seems to require modifying the JSON manually to enable the feature, which is a step better than C#, but should probably be a Mod Builder feature. Granted, I think we can push that part to a later PR

It is actually the same for Bookmappings and Spellicons. There's no editor for "Contributes" part of the dfmod.json

@KABoissonneault
Copy link
Collaborator

Yeah I recognize that it's an existing issue, we'll consider it later if users want one.

I want to add that in terms of having QuestPacks in .dfmod, I have observed users confused as to why Quest Pack 1 and other quest mods were not showing up in the DFU mod list. I think moving forward, I would prefer if all mods came in .dfmod files, and keep loose files for development and very specific user configuration purposes. So this PR has my approval

@KABoissonneault KABoissonneault added this to the DFU 1.0.1 milestone Feb 13, 2024
@ajrb
Copy link
Collaborator

ajrb commented Feb 15, 2024

Thanks for the answers. Looks good to me.

ajrb
ajrb previously approved these changes Feb 15, 2024
@KABoissonneault
Copy link
Collaborator

Having finally tested this, the feature is almost all good, save one last outstanding issue. Gonna approve after this

@KABoissonneault KABoissonneault merged commit db74adc into Interkarma:master Feb 18, 2024
@Jagget Jagget deleted the Declade-QuestLists-in-dfmod branch February 19, 2024 00:55
@KABoissonneault KABoissonneault mentioned this pull request Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants