Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Cape Pack

jadar edited this page Mar 15, 2014 · 22 revisions

A Cape Pack is a ZIP file that stores cape images. It is very similar to a Resource Pack. A metadata file is used to map cape files to cape names, it's formatted in JSON. The cape name is the name that is used in the permission node for giving access to a cape, as well as the name that shows up in the cape change GUI on the client. The file is located in the plugins/RankCapes/ folder. Put the file's name in the plugin config.

###Contents
    ZIP Layout
    Metadata
    Cape Images


####ZIP Layout This is the layout of the cape pack file. ``` root - - pack.mcmeta - exampleCape1.png - exampleCape2.png - example1/ - - exampleCape3.png - exampleCape4.png ``` The pack.mcmeta is required for the plugin and mod to function properly. If it's not included, the plugin won't even activate on the server. You can also put images in folders. ####Metadata The `pack.mcmeta` file is required for the plugin/mod to work. It maps image file names to cape names. The cape name is what shows up in the [cape change GUI](https://github.com/jadar/RankCapesBukkit/wiki/RankCapes-Client-Mod#wiki-usage). It uses JSON to store data.

There are two types of capes you can use, Static and Animated.

Static capes are stored as a JSON string.

{
    "capeName" : "exampleCape1.png"
}

Animated capes are stored as JSON objects.

{
    "animatedCapeName" : {
        "frames" : [
            "capeFrame1.png",
            "capeFrame2.png",
            "capeFrame3.png"
        ],
        "fps": 3,
        "animateWhenMoving": true
    }
}

Animated capes must include the "frames" array or "fps" value. Otherwise, it will not be recognized correctly. If there is a problem, be sure to check the logs.

NOTE: DO NOT forget to put commas on the end of the every line that isn't a bracket or at the end of an array or object. The plugin/mod will complain if you don't.

If you put images in folders in the ZIP, you must put the file name as folder/filename.png.

A full pack.mcmeta example.

{
    "ultimate": {
        "frames": [
            "donor-plus.png",
            "donor.png",
            "elite.png",
            "ultimate.png"
        ],
        "fps": 1,
        "animateWhenMoving": true
    },
    "owner": "owner.png",
    "donor": "donor/donor.png"
}
####Cape Images The cape images must be in the PNG image format. The image size may be 22x17 if you use the standard size, or 64x32. If you use 64x32, only the top left 22x17 will be used. You can use other sizes to get other resolutions. Here is a table of sizes you can use.
22x17 - standard size
64x32 - standard size, only top left 22x17 is used.
128x64 - only top left 44x22 is used.
256x128 - only top left 88x44 is used.
512x256 - only top left 176x88 is used.
1024x512 - only top left 352x176 is used.
2048x1024  - only top left 704x352 is used.
(integer divisible by 64)x(width / 2) - only top left (width * 0.34375)x(width / 2)

If you make any capes larger than 64x32, you must make the dimensions of the whole image divisible by 64. Not the top left dimensions.

Here are some templates.

512x256
1024x512
2048x1024

If you need any other sizes, just scale one of the images down using Paint.NET, Paint, or GIMP.

Clone this wiki locally