aliens

Author Topic: How to turn an image of HWP into spritesheet for HWP?  (Read 2207 times)

Offline Nikita1221

  • Sergeant
  • **
  • Posts: 10
    • View Profile
How to turn an image of HWP into spritesheet for HWP?
« 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?

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11721
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: How to turn an image of HWP into spritesheet for HWP?
« Reply #1 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

Offline mikKoi

  • Sergeant
  • **
  • Posts: 46
  • That's raider country!
    • View Profile
Re: How to turn an image of HWP into spritesheet for HWP?
« Reply #2 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).
« Last Edit: November 07, 2022, 01:48:16 am by mikkoi »

Offline bohemond

  • Sergeant
  • **
  • Posts: 44
    • View Profile
Re: How to turn an image of HWP into spritesheet for HWP?
« Reply #3 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.

Offline mikKoi

  • Sergeant
  • **
  • Posts: 46
  • That's raider country!
    • View Profile
Re: How to turn an image of HWP into spritesheet for HWP?
« Reply #4 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.