1st tool
if you go here https://falkooxc.pythonanywhere.com/sprites2png
and select a zipfile that contains a set of sprites like armors or units(can be >200 files per armor) [files have to be directly in the zipfile not in a subfolder]
then you select how many columns you want
and on the click on getpng you will get a png for download that contains all sprites in an ordered list
so instead of
- type: MYNEWUNIT.PCK
width: 32
height: 40
files:
0: Resources/mymod/MYNEWUNIT/
you do
- type: MYNEWUNIT.PCK
subX: 32
subY: 40
width: 512 #needs the real image width 512 is example
height: 720 #needs the real image height 720 is example
files:
0: Resources/mymod/MYNEWUNIT.png
that way you make your mod easier to manage (pirates mod has >10000 files !) and reduce filesize by >80% (if the sprites are very similar)
2nd tool
here https://falkooxc.pythonanywhere.com/palconvert you can upload a image and convert its colors
at the moment you can only convert images that have "tftd - battlescape"-colors into ufo-battlescape colors
i attached a file where one can compare the difference this tool makes
to enable conversion of tftd-geoscape or ufopedia images one needs to change the conversion-image that i also attached here
go into your favorite image program
open the converpal.png
the first pixel is the color that appears if i find no match or (at the moment) it appears for all pixel if i select a non "tftd-barttlescap-depth0" source
the rest of the first line is the target-palette colors 1-255
then you have multiple lines the first pixel color defines the source palette
ff00ff=depth0
ff30ff=depth1
ff50ff=depth2
ff70ff=depth3
ff90ff=ufopedia
ffb0ff=geoscape
in the last lines you will find the source palette with their corresponding first color
or you can select userdefined and the palette/colors of the uploaded image will be used
if you do that you also need to uload a Palette-Convert-File and a Target-Palette-File (under more)
tool 3 :
https://falkooxc.pythonanywhere.com/makegif
gives you the option to make new 4-tile aliens/tanks with a lot less pain than normal
take a look at the docusprites picture for "how it works" (alternative there is another descriptive image here (https://openxcom.org/forum/index.php?topic=2349.msg28706#msg28706)
i take the a big tftd 4tile unit
for all ufo/tftd 4-tile units i have templates where one can edit the single frames of each animation as a complete unit
the splitting in a spritesheet png image is done via web
with the second tool https://falkooxc.pythonanywhere.com/palconvert you can fix tftd palettes (in most cases its better if you fix the colors of the template before editing/splitting)
in this docu image i wanted to show how to easy switch colors here "yellowish to green" because big ass muton soldiers need a green bigass terror unit not "walking stones"
or you can change existing spritesheets here i made a non-brown/orange version of ethereal (took like 30 seconds )
if you run into errors post the images and choices you uploaded in this thread
no i use offline python3+Pillow and on the web python2+PIL these are "basic" image editing libraries
cairo has more drawing functions you can make vector based images and so on thats not needed here
from PIL import Image
import glob,math
def combinesprites(pathglob,nrcols,outfn):
"""path2files,numberofcolumns,outputfilname"""
ifns=[fn for fn in glob.glob(pathglob) if fn.lower().endswith(".gif") or fn.lower().endswith(".png")]
ifns.sort()
if ifns:
ifiles=[]
pre=Image.open(ifns[0])
out=Image.open(ifns[0])
for x in range(pre.size[0]):
for y in range(pre.size[1]):
out.putpixel((x,y),0)
for fn in ifns:
ifiles.append(Image.open(fn))
ifiles[-1].palette=pre.palette
out=out.resize((pre.size[0]*nrcols,pre.size[1]*int(math.ceil(len(ifns)/nrcols))))
addx=0
addy=0
for i,im in enumerate(ifiles):
for x in range(pre.size[0]):
for y in range(pre.size[1]):
out.putpixel((addx+x,addy+y),im.getpixel((x,y)))
if addx+pre.size[0] < out.size[0]:
addx+=pre.size[0]
else:
addx=0
addy+=pre.size[1]
out.save(outfn,optimize=False,transparency=0)
if __name__ == "__main__":
combinesprites("odata/tftd/tank01/*.gif",16,"out.png")