0.1.0 • Published 3 years ago
@prtksxna/conveyorbelt v0.1.0
conveyorbelt
This tool is being developed for 🐟 Fishbowl, you can follow along on Twitter.
⚠️ Warning: The tool doesn't work when the number of frames in an animation changes.
⚠️ Warning: The tool isn't able to update the bounding box (collision map) of sprites that have a non-default bounding box. If you run the tool in
--verboseit'll warn you about the sprites whose bounding box wasn't changed.

CLI Help
% conveyorbelt run --help
Usage: conveyorbelt run [options]
Options:
-sd, --sprites-dir <string> Directory of GMS sprites (default: "sprites/")
-ad, --art-dir <string> Directory of Aseprite art (default: "art/")
-ap, --aseprite-path <string> Path to Aseprite executable (default: "~/Library/Application\\ Support/Steam/steamapps/common/Aseprite/Aseprite.app/Contents/MacOS/aseprite")
-p, --prefix <string> String prefix for GMS sprites (default: "s")
-v, --verbose Whether or not to use the verbose renderer (default: false)
-ne, --no-export Whether or not to export all Aseprite files on first run
-h, --help display help for commandConfiguration
SPRITES_DIRdefaults tosprites/: GameMaker spritesART_DIRdefaults toart/: Aseprite spritesPREFIXdefaults tos: The prefix that'll be used to find the sprite in GameMaker. For example if the aseprite is calledPlayer.asepritethe sprite this script will try to update would besPlayer.ASEPRITE_PATHdefaults toTODO. You will need to change this based on your platform and how you installed Aseprite. Possible paths- C:\Program Files (x86)\Aseprite\Aseprite.exe
- C:\Program Files\Aseprite\Aseprite.exe
- C:\Program Files (x86)\Steam\steamapps\common\Aseprite\Aseprite.exe (Steam)
- /Applications/Aseprite.app/Contents/MacOS/aseprite
- ~/Library/ApplicationSupport/Steam/steamapps/common/Aseprite/Aseprite.app/Contents/MacOS/aseprite (Steam)
Convention
- Aseprite file names need to match the sprite names in GameMaker (except the
PREFIX, see Configuration above) - If the sprite doesn't have any particular export layers or animations then a single PNG should be exported. For eg
UIBubble.asepriteshould makesUIBubble.png - Files can have only particular layers exported by prefixing the layer name with
-xor-xt(if you want the PNG to be trimmed). For egLightMonsoon.asepritewith the layers-xBedroomMorningand-xtBedroomNightwill result in the following PNG -sLightMonsoonBedroomMorningandsLightMonsoonBedroomNight. - Animations will have the frame number appended to the file name after a
-. SoRainParticle.asepritewould createsRainParticle-001.png,sRainParticle-002.pngand so on. - Files that have multiple animation tags will have the tag added at the end.
Example Aseprite files and how they'll be exported
- Single sprite
UIBubble.aseprite->UIBubble.png->sUIBubble - Single animation
AirConFan.aseprite->AirConFan001.png,AirConFan002.png... ->sAirConFan - Multiple animations (tags)
Alo.asepritewith tags (WalkFront,WalkBack)AloWalkFront001.png,AloWalkFront002.png... ->sAloWalkFrontAloWalkBack001.png,AloWalkBack002.png... ->sAloWalkBack
- Multiple layers (some prefix to mark only those for export):
LightBedroom.asepritewith layersxWindowMorningandxLampNight:LightBedroomWindowMorning.png->sLightBedroomWindowMorningLightBedroomLampNight.png->sLightBedroomLampNight
- Multiple layers + one animation for each
Window.asepritewith layers-xtOutsideand-xCurtains:WindowOutside001.png,WindowOutside002.png... ->sWindowOutsideWindowCurtains001.png,WindowCurtains002.png... ->sWindowCurtains
- Multiple layers + multiple tagged animation for each:
MomVideoCall.asepritewith layers-xBackgroundand-xPortrait.-xBackgroundhas animation with tagsNightandDayMomVideoCallBackgroundNight001.png,MomVideoCallBackgroundNight002.png... ->sMomVideoCallBackgroundNightMomVideoCallBackgroundDay001.png,MomVideoCallBackgroundDay002.png... ->sMomVideoCallBackgroundDay
-xPortraithas animation with tagsHappyandSad:MomVideoCallPortraitHappy001.png,MomVideoCallPortraitHappy002.png... ->sMomVideoCallPortraitHappyMomVideoCallPortraitSad001.png,MomVideoCallPortraitSad002.png... ->sMomVideoCallPortraitSad
0.1.0
3 years ago