Valheim
0 of 0

File information

Last updated

Original upload

Created by

aedenthorn

Uploaded by

aedenthorn

Virus scan

Safe to use

Tags for this mod

About this mod

A simple framework for organizing and displaying quests.

Requirements
Permissions and credits
Changelogs
Donations
This mod is meant to serve as a means of implementing quests of all sorts in Valheim.

For an example of how it works, see:


This mod has two basic functions - displaying quests and organizing quests.


Displaying Quests

Quests can have names and descriptions; each quest stage can have a name and a description; and each objective in a stage can have a name and a description.

The config has templates for displaying each of these, as well has the main header of the display. If a quest doesn't have a given field, that template will be ignored.

Templates accept rich text tags like <color=#xxxxxx>, <b>, <i>, <size=xx>.

The display can be toggled using a custom hotkey (default j). It can be moved around by dragging with the mouse.


Organizing Quests

If you are not a modder, you can skip this section.

Basically, mods implement their own quest functionality, relying on this mod to tell them which quests a player has, and what is the state of those quests.  Quest info is saved in BepInEx\plugins\QuestFramework\ as binary files for each player_world combination.

Quest Manipulation

Set this mod's dll as a dependency for your mod and use the QuestFrameworkAPI class to access the current player's quests.

  • GetCurrentQuests() gets a Dictionary of the quests with the quest ids as keys.
  • GetQuestByID(string ID) gets the quest specified by the ID or null if it is not active for the player.
  • AddQuest(QuestData qd, bool force = false) adds a quest. To update an existing quest, force must be true.  Returns true if successful.
  • RemoveQuest(string ID) removes a quest from the player's quests. Returns true if successful.
  • IsQuestActive(string ID) returns true if the quest is active for the local player.
  • ChangeStage(string questID, string stageID) sets the current stage for a specified quest. Returns true if successful.
  • GetCurrentStage(string questID) returns the current stage ID for a specified quest.

You can also access this mod's quest dictionary directly at QuestFramework.BepInExPlugin.currentQuests.questDict.


Quest Format

Use the QuestFramework.QuestData class to submit quests to the mod.

  • string QuestData.name
  • string QuestData.desc
  • string QuestData.ID - the unique id for the quest
  • string QuestData.currentStage
  • Dictionary<string, object> QuestData.data - an arbitrary set of data specific to your quest mod's quests (e.g. progress, etc.).
  • Dictionary<string, QuestStage> QuestData.questStages

QuestStage class

  • string QuestStage.name
  • string QuestStage.desc
  • string QuestStage.ID - the unique id for the stage
  • Dictionary<string, object> QuestStage.data - an arbitrary set of data specific to your quest mod's quests (e.g. progress, etc.).
  • Dictionary<string, QuestObjective> QuestStage.objectives

QuestObjective
class

  • string QuestObjective.name
  • string QuestObjective.desc
  • string QuestObjective.ID - the unique id for the stage
  • Dictionary<string, object> QuestObjective.data - an arbitrary set of data specific to your quest mod's quests (e.g. progress, etc.).


Console Commands

questframework reset - reset mod config

questframework end <index> - abandon a quest (use list to get the index of the quest)

questframework list - get indexed list of active quests

questframework clear - abandon all quests



Config

A config file BepInEx/config/aedenthorn.QuestFramework.cfg is created after running the game once with this mod.

You can adjust the config values by editing this file using a text editor or in-game using the Config Manager.


Technical

To install this mod, the easiest way is to just use Vortex, the Nexus Mods mod manager. It should take care of all dependencies.

To install manually, place the dll file in the BepInEx/plugins folder. You will need BepInEx.

Code is at https://github.com/aedenthorn/ValheimMods.

If you want to complain or ask for help or help me test my mods, you can visit my Discord server.

Click here for a list of all my mods for Valheim.