Updated Adding support for a new Mod (markdown)

This commit is contained in:
Andrew Miner
2015-02-03 10:25:57 -08:00
parent 01afdba5fc
commit fe6608b629
+12 -5
View File
@@ -20,19 +20,26 @@ Next, you'll want to drill through the Options, Tools, and Data Dumps buttons.
Now, if you check your world's directory, you should see a `dumps/itempanel_icons` directory containing all the images for that mod's items. These will need to be renamed by converting each file name into the slug version. Now, if you check your world's directory, you should see a `dumps/itempanel_icons` directory containing all the images for that mod's items. These will need to be renamed by converting each file name into the slug version.
Finally, create a new `images` directory in the repo under your mod's directory and copy all the images into it. Next, run the `./scripts/convert-nei-dump <path to .../dumps> ./src/data/<mod>/<version>` command to convert the images into the format needed by Crafting Guide. This will also give you a starter data file for that mod version.
## 3. Create the data file ## 3. Create the data files
Next is the hard part. Start by creating a new file named `<mod_slug>-<version>.cg` in your Mod's directory. Now, for each item whose image your exported, follow the [Crafting Guide Data Format V2](https://github.com/andrewminer/crafting-guide/wiki/Mod-Version-Data-Format) reference to enter all the items, recipes, and other information needed to describe your mod. Create the mod's overall data file by following the [Mod Data Format](https://github.com/andrewminer/crafting-guide/wiki/Mod-Data-Format) guide to create the `./src/data/<mod>/mod.cg` file.
Next is the hard part. From the last step, you should have a `mod-version.cg` in your Mod's current version directory. Now, for each item whose image your exported, follow the [Mod Version Data Format](https://github.com/andrewminer/crafting-guide/wiki/Mod-Version-Data-Format) reference to enter all the groups, items, recipes, and other information needed to describe your mod.
Be sure to test frequently using the `./script/verify` script included in the repo. Be sure to test frequently using the `./script/verify` script included in the repo.
## 4. Test Locally ## 4. Test Locally
As you're going along, you may find it helpful to verify your data file as you're going along. To do so, first add your new file name to the `DefaultBookUrls` list in `./src/scripts/constants.coffee`. Then, on the command line, use the `grunt` command to rebuild the project. Finally, run `./scripts/server` to start a local server. At this point, you should have your own version of Crafting Guide (with your mod included) running at [http://localhost:8000](http://localhost:8000). As you're going along, you may find it helpful to view your new mod in the website as you're going
along. To do so, first add your new file name to the `DefaultBookUrls` list in `./src/scripts/constants.coffee`. Then, on the command line, use the `grunt` command to rebuild the
project. Finally, run `./scripts/server` to start a local server. At this point, you should have your
own version of Crafting Guide (with your mod included) running at [http://localhost:8000]
(http://localhost:8000).
Test by crafting the various items in your mod, and walking through the steps to ensure everything makes sense. In particular, you should look for: Test by crafting the various items in your mod, and walking through the steps to ensure everything makes
sense. In particular, you should look for:
* Do the proper images show up for each item? If not... * Do the proper images show up for each item? If not...
* Check that the item name is correct in the data file, and that the image file has the matching * Check that the item name is correct in the data file, and that the image file has the matching