bohemond-of-antioch / HandObMaker

Makes HandObs for OpenXCom
Creative Commons Zero v1.0 Universal
1 stars 0 forks source link

Add support for Apocalypse HandObs #2

Open FilmBoy84 opened 2 years ago

FilmBoy84 commented 2 years ago

Apocalypse uses a larger resolution than UFO/TFTD for it's Handobs, though, excepting the addition of shadow sprites, the format remains the same in terms of sprite arrangement.

This tool has the potential to be very useful for OpenApoc modding as well as OpenXCOM if it can be made to support HandObs for Objects with a BigOb/PEquip icon as large as 64x80 (the largest possible object without modding, filling the backpack) producing the appropriate HandObs from that and made to output each as a PNG.

Currently attempting to use a BigOb of anything larger than 32x48 produces the following error image

It would be greatly appreciated if support for these larger Apoc BigOb (Known as pequip) and HandObs could be added

Please find an example of an Apoc BigOb and it's associated HandObs below (note, the artists appear to have tweaked them in post process, but at least it shows how scale of BigOb equates to HandOb and the perspective used in Apoc) - in this case, with the 44x80 MarSec Heavy Launcher. 17 88 89 90 91 92 93 94 95

bohemond-of-antioch commented 1 year ago

I made some improvements to the code that make it more feasible to be used for larger images. But what I need is information. I couldn't find anything worthwhile in my initial try.

  1. What is the inventory grid size? Is it 16 as in XCom?
  2. Why then is the MarSec Heavy Launcher 44? Do the items self-center in their respective grid size in OpenApoc?

I will see about using the images you provided to come up with some OpenApoc appropriate transforms.

FilmBoy84 commented 1 year ago

Apologies for delayed response

1) The inventory grid size is not uniform but generally within +/- 2px of 16x16px per square although some larger cells do exist and can be specified manually

I have included a couple of examples of the various equipscreens below - if you measure each cell, you will see the slight deviations

generic xcom

2) Apoc items generally have "offset" values set by the modder for the sprite, then the number of cells they occupy set seperately - this is to allow some "unusual" situations where an Item's visual size does not necessarily correlate to it's "in inventory size" but they are exceptions rather than a rule and specified separately via XML