About this mod
Provides a simple, flexible means of letting users know about updates to BepInEx mods hosted on the Nexus.
- Requirements
- Permissions and credits
- Changelogs
- Donations
Features
- Adds a customizable Nexus Updates window to the main menu that shows update information
- Update information includes a Visit button and an Ignore button
- Option to show all mods or only updatable mods
- Option to create empty config files for mods that don't use them
The ignore button only shows if you are only showing updatable mods.
Making Mods Compatible
For mod authors, just add an int config setting with the key "NexusID" and the value of the mod's id on the nexus. E.g.:
nexusID = Config.Bind<int>("General", "NexusID", 48, "Nexus mod ID for updates");
For mod users, if you have a mod that hasn't added this config value, you can try adding the key value pair NexusID = ## (replace ## with that mod's Nexus ID) to that mod's config file (provided it uses standard config creation method) and this mod will pick it up, e.g.:
NexusID = 48
Warning, this appears to break some mods. They must be fragile.
You can find the number in the URL for the mod, e.g.:
https://www.nexusmods.com/valheim/mods/48
And you can find the config files in the folder BepInEx/config. If a mod doesn't have a config file, you can have this mod create an empty one for it.
You should only have to do this once, and the entry will stay there even though it's not recognized by that mod as a config variable.
All of my mods are now updated to support this mod in the latest versions.
How It Works
It uses BepInEx to find metadata for all BepInEx plugins installed.
It then finds the BepInEx config file for each mod and gets its nexus id that has been helpfully supplied by the mod author or manually added by the mod user.
Next, it sends an http request (yes, this mod connects to the Internet...) to Nexus Mods that simply consists of the mod's nexus page url. It parses the html code for the version string and compares it to the version in the DLL file.
Finally, it displays a list of mods with new versions on the main menu with buttons that trigger your browser to visit each mod's nexus page.
Config
A config file BepInEx/config/aedenthorn.NexusUpdate.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.
To reload the config from the config file, type nexusupdate reset into the game's console (F5).
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.