OpenXcom Forum

Modding => Help => Topic started by: Nikita1221 on November 05, 2022, 03:21:27 pm

Title: How to turn an image of HWP into spritesheet for HWP?
Post by: Nikita1221 on November 05, 2022, 03:21:27 pm
So. Let's say i have ripped some vehicle from old game i like, and i would like to add said vehicle into the game. For armour i use drawing routine 2 (HWP).
But there is a problem. I have an image, while engine takes four spites.
From what i gathered, xcom puts 4 sprites as shown in the attachment (with different colored rectangles being different sprites) and crops everything bellow green line.
So, my question — to what size should i transform original image, so i could chop it in sprites? With other words — what the positions of sprites relative to each others?
Title: Re: How to turn an image of HWP into spritesheet for HWP?
Post by: Solarius Scorch on November 06, 2022, 01:15:25 pm
With Falko's invaluable site down, I would like to know myself...

I know youngsters use all sorts of dedicated software nowadays, maybe someone can suggest something. :D
Title: Re: How to turn an image of HWP into spritesheet for HWP?
Post by: mikKoi on November 06, 2022, 02:32:21 pm
Never done 2x2 units, but assuming that uncropped size is 64x56 pixels. Drawing order might be as in the attachment or might not. At least it should be the right order for tiles/frames in the spritesheet.

Edit'to: expanded attachment with a grid cropping layout for the pointer (maybe the official).
Title: Re: How to turn an image of HWP into spritesheet for HWP?
Post by: bohemond on November 12, 2022, 01:10:50 am
You can use UnitSprite studio for this. It's not ideal, but it can be done with some effort.
I've written a guide: https://github.com/bohemond-of-antioch/OpenXcom-UnitSpriteStudio/wiki/Use-Smart-merge-to-create-2x2-units

After you have the UFO Spritesheet split up correctly, you can just use UnitSprite studio to edit it and you don't have to repeat the process again.
Title: Re: How to turn an image of HWP into spritesheet for HWP?
Post by: mikKoi on November 12, 2022, 12:57:58 pm
Great tool! Should help a lot.

Center height for the battlescape’s grid selector/pointer can be adjusted by the lowest sprite. I made an animation for it :P https://drive.google.com/file/d/1JBnW6r3KovYD7bW-FFKnOGJHFpCi9kVZ/view So, actually that two pixel wide vertical gap only needs to be cut-pasted to the farthest sprite.