Updated Adding support for a new Mod (markdown)
This commit is contained in:
@@ -8,11 +8,24 @@ The easiest way to access all the raw information is through the game itself. S
|
||||
|
||||
Create a fork of this repo in which to make your changes. If you're not sure how to do this, check out GitHub's [help page](https://help.github.com/articles/fork-a-repo/) to get started. This will guide you through the process starting from the GitHub website all the way through having the code on your own computer.
|
||||
|
||||
## 3. Create a new directory
|
||||
## 3. Set up your environment
|
||||
|
||||
Crafting Guide comes with a number of different command-line scripts for processing data and testing. You'll need to get your machine set up with a few command-line tools to run them before you can begin. Start by downloading [Node.js](http://nodejs.org/download/) for your OS and installing it. Next, open a terminal and navigate to your new local repo. Run the following commands to get the rest of the tools you need and build everything locally.
|
||||
```bash
|
||||
sudo npm install -g coffeescript
|
||||
npm install
|
||||
grunt clean build
|
||||
./scripts/server
|
||||
```
|
||||
|
||||
At this point, you have a local server running the CraftingGuide website running at [http://localhost:8000]
|
||||
(http://localhost:8000). As you work with your mod, you should verify your work on your local website.
|
||||
|
||||
## 4. Create a new directory
|
||||
|
||||
Open up your clone of the Crafting Guide repository, and create a new directory: `./src/data/<mod_slug>/` where the `mod_slug` is the slug generated from the Mod's official name (see: [About Slugs](https://github.com/andrewminer/crafting-guide/wiki/About-Slugs)).
|
||||
|
||||
## 2. Export the images
|
||||
## 5. Export the images
|
||||
|
||||
When you pop open your inventory, you'll see the NotEnoughItems (NEI) interface. Click on "NEI Subsets", then "Mod", and finally, hold Shift and click the mod you want to work with. This will restrict the NEI display to only the items from that mod.
|
||||
|
||||
@@ -22,7 +35,7 @@ Now, if you check your world's directory, you should see a `dumps/itempanel_icon
|
||||
|
||||
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 files
|
||||
## 6. Create the data files
|
||||
|
||||
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.
|
||||
|
||||
@@ -30,12 +43,9 @@ Next is the hard part. From the last step, you should have a `mod-version.cg` i
|
||||
|
||||
Be sure to test frequently using the `./script/verify` script included in the repo.
|
||||
|
||||
## 4. Test Locally
|
||||
## 7. Test Locally
|
||||
|
||||
As you're going along, you may find it helpful to view your new mod in the website. To do so, first add your new file name to the `DefaultMods` list in `./src/scripts/constants.coffee`. Then, on the command line, use the `grunt clean build` 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. To do so, first add your new file name to the `DefaultMods` list in `./src/scripts/constants.coffee`. It's often handy to open a second terminal window and run `grunt clean build watch` to continuously rebuild the website as you're working. Recall that you local server should still be 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:
|
||||
@@ -57,10 +67,10 @@ sense. In particular, you should look for:
|
||||
* Can you add everything (even non-craftable items) to the "Items you have" section? If not...
|
||||
* Make sure you added those items to the data file, even if they don't have recipes.
|
||||
|
||||
## 5. Submit a pull request
|
||||
## 8. Submit a pull request
|
||||
|
||||
Finally, you're almost done! Push your changes up to your fork of the repository, and [submit a pull request](https://help.github.com/articles/creating-a-pull-request/) which includes your work. Someone will review your work, and will probably point out a few things to correct. Make those changes locally, and push them up to your fork just as you did with the original set of changes. Once everything look good, you're changes will be integrated into the main repo.
|
||||
|
||||
## 6. Review in staging
|
||||
## 9. Review in staging
|
||||
|
||||
All changes are first deployed to a staging site at [http://new.crafting-guide.com](http://new.crafting-guide.com) for testing. When this is done, you'll be notified and asked to perform one last check. If everything looks good, then simply reply that you're satisfied, and your changes will be promoted to the main site.
|
||||
Reference in New Issue
Block a user