- Introduction
- What Contributions Are We Seeking?
- Getting Started
- Localization
- Things to Watch Out For
- Optional Compats
- Updating Mods
First off, thank you for your interest in contributing to this project! It's people like you who are helping to make this project even better than it's ever been before!
These guidelines exist to ensure all developers and contributors are on the same page and to reduce conflict and friction between everyone working on the project. Please read, understand, and do your best to follow them when contributing.
Not to be confused with GitHub, which we use to host the main Monifactory repository, Git is a program that tracks file changes for us and makes collaboration easier
- Git Basics will give you a basic overview of how to use Git
- Git Cheat Sheet is a Git cheat sheet which contains most commands you'll need to use.
- Git Tips and Tricks contains tricks you can use with Git to allow you to use it to it's full potential.
Git sometimes is a hard program to master, there are a few ways to use git
- Ol' Reliable Git command - just typing "git pull" and "git commit" into your preferred shell(E.G. Command Prompt, bash, zsh) will work, recommended for advanced actions or if you don't want to navigate a menu
- Github Desktop (Not available for Linux) - Gives you a GUI to select which files you want to commit, good for beginners or people who don't want to manually type "git add ~/foo/bar" to every file they want to stage.
- VSCode built-in Git utility(Requires VSCode, obviously) - Similar to Git Desktop but built into VSCode and is way less invasive, not as good as Github Desktop for beginners but can be nice if you don't want to switch programs all the time
- LazyGit
- A Command line UI, you use the arrow keys and the "Tab" key to navigate through it's menu's, the middle ground between Github Desktop and just using manual git commands, you can use winget on windows, brew on macOS, your linux distro's package manager, or just compile it from source.
- Git - Version control software used to manage files in a repository(A directory containing code, in this case, this should be your minecraft folder)
- GitHub - Used to host said repositories and allow for easy collaboration worldwide.
We are currently looking for the following kinds of contributions:
- Bug fixes
- Documentation improvements
- Small quality of life improvements
- Spelling/grammar fixes
- Localizations
Specifically, we are not looking for:
- Major changes/features
- Adding/removing core mods to/from the pack
If this is your first time using github, see here on how to create a fork and clone it to your desktop.
The following guide was written with prism launcher in mind, see here for curselauncher instructions.
- Create a new Monifactory instance from the latest release, in this example, the instance folder will be named Monifactory
- Open the
instances\Monifactoryfolder, take everything contained within it and store it in a temporary folder (temp). - Clone your fork of the Monifactory repository into
instances\Monifactory, with the repository's folder being namedminecraft. (If using the desktop app, see here for an image example.) - Once the repo is installed, go back to your temporary folder and move the files from the
temproot folder andtemp\minecraft\modsfolder back into the Monifactory folder. - Make sure to switch to your preferred pack mode.
If you encounter a problem and there have been mod updates since the latest release, you may need to update your mods using the mod manifest file.
- Look for a file named
manifest.jsonin your instance and make a .zip with it inside. - Use your launcher to import the zipped manifest as a new pack - this will download a bunch of updated mod .jars from Curseforge.
- Delete the contents of your instance's
modsfolder, and replace them with the mod .jars that were just downloaded.
If you want to use Juke to update your mods folder, you will need to install NodeJS here, make sure the settings for NodeJS are correct for your system operating system and CPU architecture.
- Go to the
build\directory - Run
npm install .to install the required packages - Then run
node index.ts update-mods-folderto update your mods folder. Once those files are moved back in place, you should be able to launch the instance as a modpack while also being able to commit and pull from it as a repository, saving you tons of time. Do note that if the modlist changes, you will need to install the applicable mods/updates into your instance, you can also just rerun the command to completely purge and update your mods folder.
Monifactory supports localization for nearly everything, including the questbook. Our weblate instance can be found here, and guide for using weblate can be found here. The site also has a minimalist mode, and supports uploading raw language files, if you prefer other options.
If you wish to add a language for localization, either ask Pansmith to add it, or make a pull request with some translations already done in that language. (Weblate will automatically add lang files for everything upon detecting a new language). Also note that the discord has a thread for Monifactory's Translations in the #moni-dev channel for easy communication with other contributors.
| Color | Info Highlighted |
|---|---|
| Black (0) | Currently Unused |
| Dark Blue (l) | Currently Unused |
| Dark Green (2) | Currently Unused |
| Cyan (3) | Machines & other processing |
| Red (4) | Warnings |
| Dark Purple (5) | Notes about things in Beta |
| Orange (6) | Items AND fluids |
| Light Gray (7) | Currently Unused |
| Gray (8) | Keyboard/mouse controls |
| Light Blue (9) | Content new to Monifactory |
| Lime (A) | RF and EU Power |
| Aqua (B) | Mod names |
| Light Red (C) | HM/EM exclusive info |
| Pink (D) | CWU & Data |
| Yellow (E) | Supplemental Information |
| White (F) | Default text |
One thing to watch out for when contributing is that we have multiple difficulty "modes".
The files used when changing modes are located in the config-overrides folder.
Some files normally located in the config folder are there instead,
and only copied over to their normal locations when the pack mode is switched.
An example of this would be the genesis.snbt FTBQuests chapter, as it changes almost entirely from mode to mode.
If you want to make a change across all modes, make sure to make the same change to all three overrides.
Keeping the KubeJS files clean and easy to read is important for a couple reasons; outside of making fellow contributor's lives easier, it lets people who are new to KubeJS be able to easily reference Monifactory when getting started with learning how to packdev. This might seem like a lot, but if you take a look at how the other files do it, it comes fairly naturally; the list below is a reference in case you are not sure.
- If you're using VSCode as an editor, open workspace
.vscode/moni.code-workspaceand install ESLint extension. Make sure to install ESLint withnpm installinkubejsdirectory beforehand. Copy.github/hooksdirectory into.git/as well. This will ensure code quality in the scripts you are writing. - On a similar note, we use
UTF-8character encoding. This information is visible on the bottom-right if you're using VSCode. - Please sprinkle in one-line comments throughout to explain what certain blocks of code do. Nobody's code is self-explanatory.
- When possible, use a list/array and
forEachto perform a similar action multiple times. It's more compact and easier to modify that way. - Use empty lines to delineate between distinct blocks of code in the same file - one line if the two blocks work together to perform the same function, two otherwise.
- All mod-focused scripts' filenames should be the same as that mod's namespace. (Visible when viewing item IDs) Furthermore all scripts' filenames should be entirely lowercase.
KubeJS offers a feature to automatically load resource packs & datapacks put into the kubejs/assets and kubejs/data folders respectively. Like with the above style guide, most of this comes naturally, this just serves as a reference guide when needed.
- Avoid sub-folders that aren't strictly necessary! For example, the Sculk Energy Core item models should not go into
kubejs/assets/kubejs/models/item/sculk_energy_coresor similar, they just go intokubejs/assets/kubejs/models/item. This may result in folders with many files in them! That is okay. The one exception to this rule are the contents ofkubejs/assets/kubejs/textures. - Keep large lang files organized! one example of where this is necessary is
kubejs/assets/lang/gtceu/en_us.json. Categories are separated and labelled as best as can be done without comments since JSON has no capacity for them. If you need to add to a large lang file, find the relevant category and add to the bottom of it, following the spacing established by other members of that category. - Do not include any redundant lang file entries! One thing that used to be a common practice was to copy mods' entire lang files into the directory used to override mods' internal resource packs and only changing the relevant entries. This clogs up things with large amounts of useless information.
- Do not leave any unused files or assets in these folders! One example is how there used to be an entire suite of Draconic Evolution-themed casings before the theming was switched to the Deep Dark instead. Those unused assets were left in the folder for months after the switch. Debug assets such as those in
kubejs\assets\kubejs\textures\block\debugare exempt.
Optional Compatiblities for mods should be balanced so that they fit naturally in the modpack's progression without overshadowing existing options. For example, an optional compatability should not have wireless be unlocked before it's possible in the base modpack. Optional Compatibilies serve to extend and add additional options, not replace.
If you're updating mods, please make sure to test the basic functionality of every mod you're updating. It's easy to forget, but mod updates can break as many things as they fix - don't let that happen to Moni's updates as well!
PERFORM THOROUGH CHECKS BEFORE UPDATING:
| Mod | Problems that result from updating |
|---|---|
| HammerLib | Causes datapack errors when loading into existing worlds |
| Solar Flux Reborn | Depends on an updated HammerLib |