ihhub / fheroes2

fheroes2 is a recreation of Heroes of Might and Magic II game engine.
https://ihhub.github.io/fheroes2/
GNU General Public License v2.0
2.7k stars 375 forks source link

Make pixel artist work more efficient #6553

Closed ihhub closed 1 year ago

ihhub commented 1 year ago

Preliminary checks

Describe the problem requiring a solution

Based on the latest feedback from people who want to contribute into the project's pixel art there are multiple obstacles for them to get started with work. We have to improve and simplify the onboarding stage for any potential artists.

Describe the possible solution

This is the list of things we need to do in order to simplify artists' work

Additional info

No response

oleg-derevenetz commented 1 year ago

add a separate compilation stage to compile tools such as icn2img and extractor. We don't need to cover every single OS. Windows and (optional for now) macOS are enough. Most of artists use only these OSes. Only SDL 2.

Tools are already being built for Windows, macOS and Linux, they are just not packed into the ZIP file.

For instance, icn2img accepts only a single image.

Do you want it to process multiple ICN files at once?

oleg-derevenetz commented 1 year ago

Hi @ihhub Could you please tell me, which tools are still worth to build and put into the ZIP file? As far as I can see, not all tools even have a project file for MSVC. Are there any superfluous/outdated ones among them? Maybe some need to be modernized, like icn2img? I am very little familiar with the artists' needs.

ihhub commented 1 year ago

Hi @oleg-derevenetz , extractor and icn2img. The rest of tools are no in use by anyone.

An artist should download these 2 tools, ideally run a script which will unpack files and create all necessary images. We can also add extra generated files which will contain image offsets present in some ICN images.

ihhub commented 1 year ago

Hi @zenseii , could I please ask you to draft a documentation file for artists? We added an extra package into pre-releases for Windows and macOS builds. These tools help to extract files including image conversion. A simple guide would be sufficient. We also need to include this guide / README file into the archive which we can do later.

zenseii commented 1 year ago

Hi, @oleg-derevenetz.

I tested the extraction script and it seems it doesn't work with the HEROES2X.agg file. It reports Cannot open file *.agg. The Succession Wars HEROES2.agg worked fine.

oleg-derevenetz commented 1 year ago

@zenseii

I tested the extraction script and it seems it doesn't work with the HEROES2X.agg file. It reports Cannot open file *.agg. The Succession Wars HEROES2.agg worked fine.

It will report this if there is no *.agg files :) My home-grown implementation of wildcards is case-sensitive, so this script runs the following command: extractor *.AGG *.agg. If there are HEROES2.AGG and HEROES2X.AGG, it will extract both, but will report about missing *.agg files, which is not an error.

D:\Temp>tools\extractor.exe agg HEROES2.AGG
Processing HEROES2.AGG...
Total extracted: 1434, failed: 0
D:\Temp>tools\extractor.exe agg HEROES2X.AGG
Processing HEROES2X.AGG...
Total extracted: 52, failed: 0
D:\Temp>tools\extractor.exe agg *.AGG *.agg
Processing .\HEROES2.AGG...
Processing .\HEROES2X.AGG...
Processing *.agg...
Cannot open file *.agg
Total extracted: 1486, failed: 0

1434 + 52 = 1486

zenseii commented 1 year ago

It will report this if there is no *.agg files :) My home-grown implementation of wildcards is case-sensitive, so this script runs the following command: extractor *.AGG *.agg. If there are HEROES2.AGG and HEROES2X.AGG, it will extract both, but will report about missing *.agg files, which is not an error.

I see now. Yes you're right. I was confused by the message and that the Succession Wars and the Price of Loyalty files were included in the same agg and icn folders afterwards. There's no problem here then: image

zenseii commented 1 year ago

Actually, what happens with the ICNs that have the same names in both HEROES2.agg and HEROES2.aggx, @oleg-derevenetz ? For example for the Polish assets the font.icn in HEROES2.agg contains the English font while the font.icn in HEROES2X.agg contains the Polish font afaik. Other localizations have such cases too.

oleg-derevenetz commented 1 year ago

@zenseii

Actually, what happens with the ICNs that have the same names in both HEROES2.agg and HEROES2X.agg

The former will be overwritten by the latter. Yes, it would be good then to modify this script so these AGG files will be extracted to separate directories. I'll do this later today.

zenseii commented 1 year ago

Hi, @ihhub and @oleg-derevenetz. Are we planning to add the generation of the palette image into the script too or do we leave it as a command line tool? I just need to know what to write in the guide.

oleg-derevenetz commented 1 year ago

@zenseii

Are we planning to add the generation of the palette image into the script too or do we leave it as a command line tool? I just need to know what to write in the guide.

Well, why not, if @ihhub deems it appropriate.

ihhub commented 1 year ago

Hi @zenseii and @oleg-derevenetz , yes, we should add this into the scripts.

oleg-derevenetz commented 1 year ago

Hi @ihhub the only item left in this issue is "add a list of color indexes used for cycling into the documentation". Is this item still relevant? How to obtain these color indexes?