Adding mods to the database - WFIOST/H3VR-Mod-Installer-Database GitHub Wiki
This tutorial will cover how to add mods to the H3VR Mod Installer Database
Tools:
Step 1: Fork the repo
For the first step, we must "fork" this repo. Forking is creating a copy of the database and saving it to your GitHub account.
To fork this repo, first sign in or sign up for GitHub, then press the "Fork" button in the top right of this page (figure 1.0)
After a few second you will be put onto your fork of the H3VR Mod Installer Database repo!
Step 2: Edit a file
Now that we have our forked repo, we can now edit the database code.
In the middle of the page, there should be a folder called "Database" (figure 1.1). Open this folder and then open the .json file of the category you want to add your mod to.
For me, I will open mapmods.json
.
Now, press the "pencil" symbol (figure 2.0), which will allow us to edit the file.
Scroll down to the bottom of the file, and copy the previous entry, and paste it on the next line.
IMPORTANT
Add a comma (,) on the bracket before your copy pasted section (figure 2.1)!
Now, edit the copied entry, ensuring you add all significant info, including a UNIQUE modid
!
For the Path
, right click on the download link of the file you want downloaded, for example the BoneTome "Download" button, and press "copy link location" (figure 2.2).
Then insert it as the Path
.
For the rawname
, download the file, and copy and paste the filename of the downloaded file, INCLUDING THE FILE EXTENTION!
IMPORTANT
MAKE SURE NEW LINES IN THE DESCRIPTIONS ARE SEPARATED BY \n (figure 2.2). THIS WILL BREAK THE DESCRIPTION!
Finally, Arguments
and delInfo
For Arguments
, you must specify the directions Mod Installer will take when handling the mod. For example, unzipToDir?CustomLevels/TakeAndHold
will extract the folder to CustomLevels
. This must be accurate for proper installation of the mod.
For delInfo
, you must specify where the folder/file of the mod is, so it can be deleted. You can specify multiple files by seperating the files with ?
.
Finally, for dependencies, it depends on what mod you are trying to add, but for custom maps, you can leave it as wurstmod
.
Step 3: Validating and releasing!
Now if you have edited the entry to your liking enough, we can now validate it and add it to the real database!
First, to validate.
- Select all text in the edited database file, and copy it.
- Go to this website and paste the JSON into the text field in the middle
- Change the JSON template to the right to "2 space tab"
- Press "Process"
- If it says "Valid", then you did it!
Now, to add it to the main database.
On the page that we were editing the file, scroll down to the bottom (figure 3.0)
Press "Commit Changes", then go back to the main page of your fork by pressing the name (figure 3.1)
There should be a new option on the box above the files, with the text "pull request" (figure 3.2).
Press that button, and press "Create pull request" (figure 3.3)
Now replace the Update [file you edited]
please specify the file you edited and the mod you added.
Then, press Create Pull Request once more, and then you are done!
I (Frityet) or Potatoes will review this change, and add it to the database!