-
Notifications
You must be signed in to change notification settings - Fork 0
Home
The Package Mod is a utility for modpack makers to create bulk crafting recipes that must be researched on a per-player basis before becoming usable.
Developers: In a JSON file, you may encode custom recipes with as many types of items and as many of that item are necessary. Each recipe can be encoded with a set of research requirements, including items to be consumed, a number of packages that must be made by the player, and prerequisites that prevent a package from being researched until the required researches are completed. For examples, check Examples.json in the main directory.
Let's go through the Examples.json file.
All packages must be defined in the "packages" array as shown. Each package is defined in its own separate set of curly braces.
"name": This name is how the package is displayed in "Select" menus and on the package itself. Must be unique.
"id": This is used for commands. Must be unique.
"resultItem": This is an item array (enumerated later).
"packageNumber": Use if you'd like to define a hierarchy of packages with the same name. This number does not visibly show anywhere; please do not use it to differentiate between different packs with the same name.
"ingredients": An array of item arrays. No limit to its size.
"research": An array of item, pack, and prereq arrays. In research, all arrays must begin with "item", "pack", or "prereq" so that my code will know how to process it!
Item Arrays: In the research array, specified as "item". Must give at least the item ID. Next, the count; if not specified, the count is 1. Next, the metadata; if not specified, the meta is 0.
Pack Arrays: In the research array, specified as "pack". Must include the pack name and the number of packs you'd like the player to create, in that order.
Prerequisite Arrays: In the research array, specified as "pack". Must include the pack name.