Creating a new pack
If you need to create a new category, refer to Create a new category
JSON
A general pack has the following dictionary
{
"pack_id": "pack_name with no space",
"pack_name": "name of pack",
"pack_description": "description of pack",
"message": ["warn/error/info", "message for it"],
"icon": "gif/apng/*",
"priority": 0,
"conflict": ["<pack_id of conflicting packs>"],
"build": {
"with": "<language>",
"script": "<filename>"
}
}
There are somethat are necessary and some that aren't. Here is a full a run through of it.
Pack ID
Your Pack's ID, something that stands out from other packsUsually the Pack ID is the pack name without any spaces, except for categories with similar pack names
This is a compulsory key
"pack_id": "pack_name with no space"
Pack Name
Your Pack's name.Doesn't have to be unique.
This is a compulsory key
"pack_name": "name of pack"
Pack Description
Your Pack's Description.You can choose to leave it empty, but it MUST exist
"pack_description": "description of pack",
Message
A message you want to highlightThese can be issues, extra info, or anything you prefer
Here are some examples
"message": ["error", "Has issues now"]
Has issues now
"message": ["warn", "May cause issues when using with custom packs"]
May cause issues when using with custom packs
"message": ["info", "Also changes planks"]
Also changes planks
Icon
A custom type of icon that you want to useThis can be a .gif, .apng or any image you like
Remember to remove the leading period
"icon": "gif"
Priority
The level of priority you want to give the pack to replace other packsThe higher the priority, the more likely it replaces other packs
The default priority is always `0`
Priority only applies IF the file is a binary file, not if it is a text, JSON or JS file
"priority": 0
Conflict
A list of packs that conflict with one another.This doesn't affect anything in the backend, but serves as information while selecting a pack.
The list contains Pack IDs, not Pack Names
"conflict": ["PackID"]
Build
This is ONLY for behaviour packsUses a regolith-like implementation to build a pack
"with" specifies how to start the build, with python, npm, node or any of your preferrence "script" specifies the script used to build, which is always located inside the pack's folder, alongside with the pack icon
"build": {
"with": "<language>",
"script": "<filename>"
}
Add your necessary JSON to the category JSONs (located in ./jsons/packs) before moving on to the next
Making their folders
Assuming you have added the proper JSONs, you can now create their folders
You have to create a folder at
./packs/<category-name>/<pack-id>
There, add the preferred pack_icon template from ./pack_icons as pack_icon.png
You can also use your own pack icons!
Create a new folder called files inside the pack's folder. That is where you will store your pack's files
You can start adding the files!
Extra for behaviour-packs
If you are using a build script, you will need to create another directory to house the 'raw' files, add the script and its corresponding key in the pack's JSON (refer above)
An example script is available in ./pys/example_builder.py
Contributors