input-locations.json specifies the source of mod archives for creating the database.
It's a JSON file containing a JSON array.
The TypeScript types for this file are under build/src/types.d.ts InputLocations.
An example zip mod entry would be:
{ "url": "https://github.com/CCDirectLink/input-api/archive/refs/tags/v1.0.2.zip" }And an example ccmod entry would be:
{ "url": "https://github.com/krypciak/cc-fancy-crash/releases/download/v1.1.0/cc-fancy-crash-1.1.0.ccmod" }npDatabase.json contains the mod "database".
It contains all information necessary to display the mods in a list and to automatically install them by tools like CCModManager.
The minified version of this file (npDatabase.min.json) is generated alongside this file as well.
The TypeScript types for this file are under build/src/types.d.ts PackageDB.
The recommended method of adding and updating mods is through LeaBot.
See how to do that in CONTRIBUTING.md
Modifying the database manually is sometimes required.
For example, CCLoader can only be updated that way.
- Select the branch you want to add your mod to.
stableis for stable versions,testingis for prototypes and beta versions. - Export your selected branch as an enviroment variable:
- In the case of
stable, runexport BRANCH=stable
- In the case of
- Switch to the branch you choose with.
To do that, rungit checkout $BRANCH - Add your mod to the
input-locations.jsonfile. For specific details, see DATABASE.md - Commit the changes
- Switch back to the
masterbranch.
To do that, rungit checkout master - Now to update the
npDatabase.jsonfile, run:- Run
npm install - Now you have two choices:
- If you just want to have the entry you just changed updated, run:
npm run start - If you want to re-generate the entire database from scratch, run:
npm run startScratch
- If you just want to have the entry you just changed updated, run:
- Run
- If successful, you should be checked-out on the selected branch
- Amend the last commit to also include the current changes
- Switch back to the
masterbranch - Run
npm run testto verify that the mod you're introducing doesn't break the database
- Tools are in
tools.json(also in thenpDatabase.jsonformat) and need to be modified manually.
Because CCBot doesn't support updating CCLoader, it has to be done manually.
Follow Steps and instead of adding a mod in step 4. replace
all occurrences of the old version substring X with the new version string Y.
For example:
X = 2.24.2-v2.14.1
Y = 2.25.0-v2.14.2
Example replacement:
"ccmodPath": "CCLoader-2.24.2-v2.14.1/ccloader/ccmod.json",=>
"ccmodPath": "CCLoader-2.25.0-v2.14.2/ccloader/ccmod.json",Do that for the ccloader entry, Simplify and ccloader-version-display.
git clone https://github.com/CCDirectLink/CCModDB
cd CCModDB
# Create a fork of the repository
gh repo fork --remote
# Create a new branch called "mymods" based on the "stable" branch
git checkout -b mymods upstream/stable
# Delete all commits besides the first one
git reset --hard "$(git rev-list --max-parents=0 HEAD)"
# Push the changes
git push --set-upstream origin --force