Skip to content

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

json
{
  "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 packs
Usually the Pack ID is the pack name without any spaces, except for categories with similar pack names

This is a compulsory key

json
  "pack_id": "pack_name with no space"

Pack Name
Your Pack's name.
Doesn't have to be unique.

This is a compulsory key

json
  "pack_name": "name of pack"

Pack Description
Your Pack's Description.
You can choose to leave it empty, but it MUST exist
json
  "pack_description": "description of pack",

Message
A message you want to highlight
These can be issues, extra info, or anything you prefer

Here are some examples

json
  "message": ["error", "Has issues now"]
Has issues now
json
  "message": ["warn", "May cause issues when using with custom packs"]
May cause issues when using with custom packs
json
  "message": ["info", "Also changes planks"]
Also changes planks

Icon
A custom type of icon that you want to use
This can be a .gif, .apng or any image you like

Remember to remove the leading period

json
  "icon": "gif"

Priority
The level of priority you want to give the pack to replace other packs
The 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

json
  "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

json
  "conflict": ["PackID"]

Build
This is ONLY for behaviour packs
Uses 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

json
  "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

shell
./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