msikma / pokesprite

Database project of box and inventory sprites from the Pokémon core series games
https://msikma.github.io/pokesprite/
MIT License
958 stars 164 forks source link

Add support for ribbons #59

Closed msikma closed 4 years ago

msikma commented 4 years ago

This adds a new 'misc' section for sprites that belong neither to Pokémon nor inventory items.

Included are 109 ribbons from Gen 3-7, but not (yet) the high resolution ones from Gen 8. Gen 3–5 ribbons should be 32x32 (but not all are), and Gen 6–7 40x40. All files and data were processed from Bulbapedia but I messed something up and so not all items have descriptions right now.

Also added is a data file, misc.json, with entries such as:

{
  "name": {
    "eng": "World Ribbon",
    "jpn": "ワールドリボン",
    "jpn_ro": "World Ribbon"
  },
  "gen": 3,
  "description": {
    "eng": "A Ribbon awarded to a Pokémon League Champion.",
    "gen": 7
  },
  "files": {
    "gen-3": "ribbon/world-ribbon.png"
  }
}

The top level gen refers to the generation in which the ribbon was first introduced. The description.gen refers to what gen a ribbon's description comes from. The files object can contain multiple entries and the key indicates what generation a file was ripped from.

If anyone has ideas on how to make this more clear, let me know. Thinking of changing gen into from-gen, or maybe use origin-gen for the top level one.

rawr51919 commented 4 years ago

Looks like some good work that's been done so far. It'll be huge once this is completed and added to pokesprite

msikma commented 4 years ago

Question: should the 32x32 ribbons be padded to 40x40? That would make them all the same size. This is a lossless operation since it's an even number of pixels horizontally and vertically. It would simplify building UIs that display ribbons from multiple generations. I'm leaning towards yes myself.

koenigderluegner commented 4 years ago

Yes from me for the same reason

msikma commented 4 years ago

Changed canvas size for all ribbons to 40x40 and fixed the gamma for Gen 4 and below—ribbons from the older games appeared slightly brighter, but now they're equal.

msikma commented 4 years ago

Sorry for lack of progress on this. Planning to have the final things worked out before the weekend.

msikma commented 4 years ago
Screenshot 2020-03-18 at 23 48 10

Did some work on the documentation. Made some adjustments to the JSON format too. I think almost everything is ready now.

msikma commented 4 years ago

Looks like it's done to me. I've added the Gen 8 sprites as well, and generated a docs page.

Screenshot 2020-03-21 at 19 06 30
msikma commented 4 years ago

I also regenerated the docs page to include ribbons, so you can now view them here: https://msikma.github.io/pokesprite/overview/misc.html