I’ve created a plugin for the Ultima VII/Exult shp file format. There are two ways I’ve been doing it and mostly making it work.
Shapes are indexed with #255 being the transparent color, consisting of frames (or layers) that each can have a different size and offsets.
The Frames way:
- a helper tool that converts the shp to png
- importing the pngs as frames in Aseprite
- writing the offsets (imported from the shp file) to cel “user data” for each frame
- resizing the canvas to accommodate all frames
- on importing the pngs I’ve temporarily disabled the Animation detection
- can be saved in aseprite format and no data is lost
- on export the offset is read from the cel “user data” and the correct frame size is being used (instead of canvas size) - this produces exact same shp files as having been imported
Issues:
- on importing the pngs as frames, each frame gets prompted for frame properties (Duration). Is there a way to disable this (temporarily)?
The layer way: this is more like our The Gimp plugin handles it.
- the same helper tool that converts the shp to png
- importing the pngs as layers in Aseprite
- writing the offsets to the layer names
- resizing the canvas to accommodate all layers
- on export the offset data is correctly read from the layer name
Issue:
- no import issue anymore
- can I make Aseprite directly open shp files without having to go through the “Import Shp” menu?
Code at exult/mapedit/tools/aseprite_plugin at aseprite_plugin · DominusExult/exult · GitHub
Layer code (just the main.lua needed) at -- Exult SHP Format Extension for Asepritelocal pluginName = "exult-shp"lo - Pastebin.com (this is WIP, not yet versioned on github and might contain other errors)