-
Notifications
You must be signed in to change notification settings - Fork 4
Custom Lists
- Custom lists are community made lists of characters for the site, it can vary from kirins only, unicorns, or completely fan made characters you've never seen before!
- Not at all. All it requires is understanding in the format and how it works
- First. lists are loaded by a URL that contains a JSON. A JSON is a file that stores data, like a YAML/INI/XML
- There are 2 formats of customs lists. one is legacy and not recommended to use, and the other one is more modern and supports custom filters
- The legacy format look something like:
[
{
"name": "Applejack",
"img": "characters/mane6/Applejack.webp"
},
{ "name": "Fluttershy", "img": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg=="},
{ "name": "Pinkie Pie", "img": "characters/mane6/Pinkie_Pie.webp"},
{ "name": "Rainbow Dash", "img": "characters/mane6/Rainbow_Dash.webp"},
{ "name": "Rarity", "img": "characters/mane6/Rarity.webp"},
{ "name": "Twilight Sparkle", "img": "characters/mane6/Twilight_Sparkle.webp"}
]-
As you can see above, the JSON above consits of a list/array (indicated by the usage of
[and]at the start and the end). this array consists of objects that consists of multiple keys and values:- The
"name"property is the text that appears above the character - The
"img"property is the src of the image, it can be a relative path to the same domain of ponysmash (reusing characters from MLP: FiM), an absolute path to an external site like gyazo or the base64 of an image (not really friendly as they can be VERY long) - The
"filly"property (optional) sets if the character is underage (true/false), this will make it so that the buttons say "Cute!" and "Not cute" in the case this property istrue, - The
"smashText"property (optional) sets the text for the smash button. Example :"smashText": "Smash head with hammer", - The
"passText"property (optional) sets the text for the pass button. Example :"passText": "Not even if equestria depended on it",
- The
-
Due to the limitations of the legacy format. it only supports having a static list of characters, meaning you are forced to play with all the characters in a list. filters are not supported
- Modern lists are somewhat similar, but there are a few key differences. like adding support for custom filters. It looks like this:
{
"version": 1,
"list": [
{
"name": "Adagio Dazzle (EQG)",
"img": "characters/eqg/Adagio_Dazzle.webp",
"gender": "female"
},
{
"name": "Apple Bloom (EQG)",
"img": "characters/eqg/Apple_Bloom.webp",
"filly": true,
"gender": "female"
},
{
"name": "Applejack (EQG)",
"img": "characters/eqg/Applejack.webp",
"gender": "female"
},
{
"name": "Aria Blaze (EQG)",
"img": "characters/eqg/Aria_Blaze.webp",
"gender": "female"
},
{
"name": "Big McIntosh (EQG)",
"img": "characters/eqg/Big_McIntosh.webp",
"gender": "male"
}
],
"extensions": {
"appleFamily": {
"list": "apples",
"filters": {
"noEqg": {
"logic": {
"type": "inList",
"charProp": "name",
"against": "eqg"
},
"value": false
}
}
}
},
"filters": {
"showUnderage": {
"text": "Show underage",
"logic": {
"type": "equals",
"charProp": "filly",
"against": true
},
"value": false
},
"showFemales": {
"text": "Show females",
"logic": {
"type": "equals",
"charProp": "gender",
"against": "female"
},
"value": true
},
"showMales": {
"text": "Show males",
"logic": {
"type": "equals",
"charProp": "gender",
"against": "male"
},
"value": true
}
}
}- This time however the list itself is an object (
{and}). This object has 2 key values.-
version: This is a number that specifies what version of customs list the list is using. This is optional, but if its missing it will get treated as if its value was 1 -
list: This is where the contents of a Legacy formatted list would go in. You can add more key value pairs to each character, like in the list above, some have the"filly"key -
extensions: This is used to make the custom list depend on another (built-in) list. Useful for expanding built-in lists or saving the work of having to add characters already in the game by hand in the list. For more information read the Extensions Documentation -
filters: This is the custom filters of the list. Its an object in which each property is a filter, you can name them whatever you want, but the values should follow specific rules. For more information read the Filters Documentation
-
- Linebreaks (newlines), dont really matter as long as they dont change the values of things (they arent in the middle of a string)
- Comments are not allowed (lines that start with //)
- The list CANNOT end with a comma (,), else the load will fail.
- You can use a site like JSONLint to verify your JSON is valid (it wont validate whether you made is valid. just the syntax)
- You can name the json file whatever you want, place it somewhere on the internet, like on a gist or pastebin
- Once its uploaded you need to get the raw URL of the list, usually in the service you have the list you have a "raw" button at the top, if you click it you should only see the list and nothing else, not even a UI of any sort (it should look something like:
https://pastebin.com/raw/0gHxT256orhttps://pastebin.com/raw/mYMf6yqW) - Now you can try to load that URL into the game and see if it works, if it didn't work, you will get an alert telling you what could be the problem.
- Once its uploaded you need to get the raw URL of the list, usually in the service you have the list you have a "raw" button at the top, if you click it you should only see the list and nothing else, not even a UI of any sort (it should look something like:
- ALL characters from modern lists will be deduplicated based on the
imgproperty, this includes conflicts with custom lists and its extensions. Whichever one stays on the list will not always be consistent. - IF you still have problems figuring out how this works, you can check the example lists above or make a new issue explaining your problem, i would be happy to help