How to add custom Items: Difference between revisions
Deltaflare (talk | contribs) m minor formatting fixes, linking to sections |
Deltaflare (talk | contribs) m →Possible Errors (& Fixes): rephrase |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 42: | Line 42: | ||
A more in-depth example of this is shown below as we extract the colormap for our use. | A more in-depth example of this is shown below as we extract the colormap for our use. | ||
It is recommended to start sprinting with the full colormap imported into your sprite editor, so that there are no issues with the indexes later. The easiest way to get the colormap is to export an existing sprite | It is recommended to start sprinting with the full colormap imported into your sprite editor, so that there are no issues with the indexes later. The easiest way to get the colormap is to export an existing sprite! Navigate to the '''Dungeon Graphics''' dropdown, and you will see a list of items for ''Tilesets, Backgrounds (used for [[Fixed Room|Fixed Rooms]], with a tutorial on those [[Fixed Room Guide|here]]), Traps, Items, and Color Map.'' The one we are interested in is '''Items'''. | ||
[[File:Item tutorial dungeon graphics nav.png|alt=Screenshot of ST dropdown for Dungeon Graphics, with Item sprites located there|center]] | |||
''Important: The colormap seen in this section is different compared to the one exported with items. Do not use the "Color Map" entry from this dropdown unless you know what you're doing.'' | |||
Exporting the Stick with the Palette ID set to '''1''' shows this message:[[File:Item tutorial 8 exporting stick.png|alt=Screenshot of Stick sprite with the Palette ID set to 1|center|border]]<small>(Note: all ST screenshots are cropped to save space, the editor does not shrink this much)</small>[[File:Item tutorial 9 export dialog.png|alt=Screenshot of export dialog ("This exports currently selected image with the currently selected palette. image will contain all palettes")|center|border]] | |||
[[File:Item tutorial 8 exporting stick.png|alt=Screenshot of Stick sprite with the Palette ID set to 1|center|border]] | |||
[[File:Item tutorial 9 export dialog.png|alt=Screenshot of export dialog ("This exports currently selected image with the currently selected palette. image will contain all palettes")|center|border]] | |||
This means that the sprite of the Stick will ''look'' brown, but still have the full colormap in its data. Opening the PNG in a sprite editor shows which colors will be used in each variation of the palette. Using an eyedrop tool or color selection mechanic can highlight the index of the brown being used (index 25). Finding the other shades of brown from there gives a point of reference for each row. | This means that the sprite of the Stick will ''look'' brown, but still have the full colormap in its data. Opening the PNG in a sprite editor shows which colors will be used in each variation of the palette. Using an eyedrop tool or color selection mechanic can highlight the index of the brown being used (index 25). Finding the other shades of brown from there gives a point of reference for each row. | ||
[[File:Item tutorial 10 stick index example.png|alt=Screenshot of Stick PNG open in sprite editor, showing which colors share the same columns|center|thumb|408x408px|These colors | [[File:Item tutorial 10 stick index example.png|alt=Screenshot of Stick PNG open in sprite editor, showing which colors share the same columns|center|thumb|408x408px|These 3 colors share the same positions within every palette]] | ||
This is useful if you make a sprite that you want ''multiple variants'' of (Stick, Iron Thorn, Apple, Golden Apple, etc.). | This is useful if you make a sprite that you want ''multiple variants'' of (Stick, Iron Thorn, Apple, Golden Apple, etc.). | ||
| Line 68: | Line 68: | ||
'''“Expected colors are from Palette 0” when using a non-0 palette''' | '''“Expected colors are from Palette 0” when using a non-0 palette''' | ||
[[File:Item tutorial 14 error 1.png|alt=Screenshot of error that could happen when importing into Slot 63 specifically|center|400x400px]] | [[File:Item tutorial 14 error 1.png|alt=Screenshot of error that could happen when importing into Slot 63 specifically|center|400x400px]] | ||
Even with the Palette ID number set in the UI, '''the tool first looks at the index number of the ''transparent'' color to start checking the rest.''' This means if you mistakenly used the transparent color from Palette 0 when making your sprite, the editor ''now expects everything to come from'' ''Palette 0''. “Color 49” is the black outline color in ''Palette 3''. Because “color 49” is not an expected color, the editor rejects the image. | Even with the Palette ID number set in the UI, '''the tool first looks at the index number of the ''transparent'' color to start checking the rest.''' This means if you mistakenly used the transparent color from Palette 0 when making your sprite, the editor ''now expects everything to come from'' ''Palette 0''. “Color 49” is the black outline color in ''Palette 3''. Because “color 49” is not an expected color ("color 1" is the s the black outline color in Palette 0), the editor rejects the image. | ||
'''“Expected colors are from Palette x”''' | '''“Expected colors are from Palette x”''' | ||
[[File:Item tutorial 15 error 2.png|alt=Error for uploading to slot 63|center|400x400px]] | [[File:Item tutorial 15 error 2.png|alt=Error for uploading to slot 63|center|400x400px]] | ||
Even with the transparency and outline colors corrected, you may still get an “expected colors” error, despite them matching the palette at a glance. Note that Palettes 1 and 3 share a set of greens (index 27, and index 59). Using the “incorrect green” causes the error (especially if indexing a | Even with the transparency and outline colors corrected, you may still get an “expected colors” error, despite them matching the palette at a glance. Note that Palettes 1 and 3 share a set of greens (index 27, and index 59). Using the “incorrect green” causes the error (especially if indexing a RGB-mode sprite; the drawing program could attempt to auto-assign incorrect indexes). This is why it's recommended to work directly with the colormap. | ||
To fix any of these errors, correct the offending colors in your PNG and import again. | To fix any of these errors, correct the offending colors in your PNG and import again. | ||
| Line 88: | Line 88: | ||
==== Possible Error (& Fix) ==== | ==== Possible Error (& Fix) ==== | ||
[[File:Item tutorial uncaught error ex.png|alt=Screenshot of uncaught error that happens when importing with incorrect colors|center|thumb|400x400px|Uncaught error that happens when importing with incorrect colors]] | [[File:Item tutorial uncaught error ex.png|alt=Screenshot of uncaught error that happens when importing with incorrect colors|center|thumb|400x400px|Uncaught error that happens when importing with incorrect colors]] | ||
If you have any “expected color” issues, SkyTemple first will give an error showing the incorrect index, then throw an uncaught TypeError exception. This is slightly different from the error with slot 63 because SkyTemple first creates an entry then cannot process the color data | If you have any “expected color” issues, SkyTemple first will give an error showing the incorrect index, then throw an uncaught TypeError exception. This is slightly different from the error with slot 63 because SkyTemple first creates an entry, then cannot process the color data when importing. So the entry becomes invalid while the editor still tries to display it. ''Don’t panic! You can correct this without having to reload/close without saving!'' Correct the color errors and import as ''replacing'' ''current entry'' (i.e.: replacing the invalid entry with colors that the editor can properly validate). | ||
[[File:Image tutorial 13 import settings off.png|alt=Screenshot of import settings needed to replace an existing sprite entry|center|300x300px]] | [[File:Image tutorial 13 import settings off.png|alt=Screenshot of import settings needed to replace an existing sprite entry|center|300x300px]] | ||
==== Current Limitations - Important ==== | ==== Current Limitations - Important! ==== | ||
{{Main|Item/Trap Graphics#Sprite Slots}} | {{Main|Item/Trap Graphics#Sprite Slots}} | ||
Edits to '''slots 96 - 103''' will ''permanently overwrite'' the sprites present in that row (this includes things like Pokémon shadows). | Edits to '''slots 96 - 103''' will ''permanently overwrite'' the sprites present in that row (this includes things like Pokémon shadows). | ||
| Line 99: | Line 99: | ||
Go back to the ''Items > [item name]'' , and set the Sprite ID to '''63''' (or whatever index you inserted it at). Increment the Palette ID, and you will see the sprite change colors depending on the ones you used (remember the IDs start at 0). | Go back to the ''Items > [item name]'' , and set the Sprite ID to '''63''' (or whatever index you inserted it at). Increment the Palette ID, and you will see the sprite change colors depending on the ones you used (remember the IDs start at 0). | ||
[[Category:Tutorials]] | |||