Heroes of Might and Magic Community
visiting hero! Register | Today's Posts | Games | Search! | FAQ/Rules | AvatarList | MemberList | Profile


Age of Heroes Headlines:  
5 Oct 2016: Heroes VII development comes to an end.. - read more
6 Aug 2016: Troubled Heroes VII Expansion Release - read more
26 Apr 2016: Heroes VII XPack - Trial by Fire - Coming out in June! - read more
17 Apr 2016: Global Alternative Creatures MOD for H7 after 1.8 Patch! - read more
7 Mar 2016: Romero launches a Piano Sonata Album Kickstarter! - read more
19 Feb 2016: Heroes 5.5 RC6, Heroes VII patch 1.7 are out! - read more
13 Jan 2016: Horn of the Abyss 1.4 Available for Download! - read more
17 Dec 2015: Heroes 5.5 update, 1.6 out for H7 - read more
23 Nov 2015: H7 1.4 & 1.5 patches Released - read more
31 Oct 2015: First H7 patches are out, End of DoC development - read more
5 Oct 2016: Heroes VII development comes to an end.. - read more
[X] Remove Ads
LOGIN:     Username:     Password:         [ Register ]
HOMM1: info forum | HOMM2: info forum | HOMM3: info mods forum | HOMM4: info CTG forum | HOMM5: info mods forum | MMH6: wiki forum | MMH7: wiki forum
Heroes Community > Heroes 4 - Lands of Axeoth > Thread: [HELP NEEDED] Mass edit creature images
Thread: [HELP NEEDED] Mass edit creature images This thread is 2 pages long: 1 2 · NEXT»
NimoStar
NimoStar


Responsible
Legendary Hero
Modding the Unmoddable
posted June 12, 2021 08:47 PM
Edited by NimoStar at 20:42, 13 Jun 2021.

[HELP NEEDED] Mass edit creature images

WARNING boring chunk of text ahead, skip the quote part to get to the actual thing
Quote:

It is a lot of effort to mod H4, to find the delicate balance within the elements and to be at the same time innovative and to conform to the community.

There is a persistent effects that even has a trope page called
"They changed it, now it sucks"
This is about the conservativeness of fanbases

However I am at fault too. Even if my changes are good and I am ready to rationally defend them, criticisms do have a base I'm willingly ignoring because I can't modify: Game appearance.

Simply put the human brain is made of habit. ANd not just the human brain, conductism has been studying this for the past 100 years or so starting with Pavlov's dog. Philosophically, this goes all the way back several centuries to Hume: We expect things to work a certain way because we have seen them work this way before. As a philosopher I can't overlook this... yet in the practice, I have.

People look at a sprite, the same sprite they have been looking at for the past 20 years, in my Ultimate mod. They send it to attack, yet the sprite gets killed. They assumed there would be no retaliation. But things have changed: There is retaliation now. Even if the new abilities are more useful, your brain has tricked you. You were conditioned in all your previous games to think and act in a certain way. Now you look at the exact same creature, each of its pixels unchanged, but the game has betrayed you! Your brain has betrayed you? No, it must be the modder. That darned NimoStar has betrayed you! Curse his mod that made you lose your hard earned stack of sprites! Does he have ANY idea how many daily H4 recruiting there are there!?

On the other hand some player may cast a spell on the very Sprites they have always known as harmless, only to see it reflected back onto them due to the added Magic Mirror. Treason of the highest order, again!

And in a way, I did "betray" them. But not on purpose. And I want to fix that.



Quote:

You see, I am 100% certain these sort of gameplay changes are necessary to make level 1 creatures more useful in the late-game. Normal sprites are completely worthless in late game with their default H4 abilities, since they can't deal punishment, nor can they absorb it, and they have no special effects on the battlefield. They are neither resistant to might or magic, they atk and def is puny, so the new abilities are completely indispensable to give them a late-game role.

But I would like to also appropiately signal this, to change the creature graphics, so that people can intuitively know which creatures have significantly altered abilities. Something simple, like ULTIMATE sprites having golden wings, would go a long way to visually signaling the gameplay changes to old-time players accustomed to the Old Ways. This way, when looking at the sprites, the golden wings will give out these AREN'T the same they knew at before. The brain sees the change, the brain absorbs the change. You can go back and forth knowing that golden sprites have a different ability-set compared to pink-reddish ones, and everyone will be happy again, order to the universe restored.



There is just one problem: This isn't workload-feasible.



There are 107 Sprites, err, sprite-files: One for each map and combat action.

Each of these are further separated into frames.

They aren't directly editable.

The way to edit these goes:

1- Open the H4D file in ilive's editor
2- Export H4D to ORA
3- Open ORA in GIMP (takes a while, each frame has to be read separately)
4- Edit EACH frame (say they are like 15 per file)
5- Export the ORA (takes a while, each frame has to be exported)
6- Import the ORA to ilive's program.
7- Save the modified H4D.

And this is for ONE of the 107 files. Rinse and repeat...

Say miraculously you got these seven steps into a 5 minute routine. Those are 535 minutes with the 107 images, which boils down to nearly 9 hours of inhuman nonstop robotic work. For the SPRITE creature alone. There are dozens of creatures, so you can see why this isn't doable. It would take several months of nonstop round the clock image importing, exporting and resaving like it was your full time job.

So, what can be done?

Well, the only answer is some sort of automation.

What I propose is the following: An interfase that can alter the pixel color values of H4D files directly in a mass manner, without having to manually import and reimport. Just give some settings, select the files to apply, and make it edit the appropiate HEX pixel values in the files as to alter the colors.

This is the GIMP color altering GUI. Something like this would be useful:


So, you just select your settings, select the 107 sprite .h4d files, and voilá, you get your golden winged sprites.

Perhaps the image preview isn't even necessary, just know that the program has processed the files.

I would be able to perhaps even pay for this, but not a lot, since well, I'm Argentinian and a single US dollar costs 150 Argentinian pesos.

Anyways, this tool would benefit the entire community, and is the gateway for more mods, and the open display of modding changes in the form of creature graphics alterations.

There are Linux-based tools which are open source and may be useful to check for this. "Imagemagick" is one of them. This tool can mass edit images from the linux terminal. Others I heard mentioned are Mogrify and Convert, though I'm not so sure about those. I mention them for a code and fnctionality base. Many web-based services of image editing and convertion use these.

So, this is my dream. This is my quest...
* For a better Heroes 4.
* For more intuitive managing.
* To end frustration with changes borne out of lack of differentiation.
* For improved aesthetics.
* To distinguish creature-looking-heroes from actual creatures,
* ...even giving each hero a unique combat look.
* To create ambient-specific variants of map objects with a single click.
* For future creature upgrades and variations.
* And much, much more.


Help me, and together, we can make this possible.

May the wings of the new Magic Sprite ever shelter and guide you



So, I hope someone can be up for this, since it would be a massive upgrade for the game, image editing, and all future modding thereof...

____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Salamandre
Salamandre


Admirable
Omnipresent Hero
Wog refugee
posted June 12, 2021 11:59 PM

Russians are pretty knowledgeable at bat files, try http://wforum.heroes35.net/

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
iliveinabox05
iliveinabox05


Honorable
Famous Hero
posted June 13, 2021 09:03 AM

So there is actually a mass import feature in the resource editor (advanced menu), which is being actively used to import an entire set of ora files into their corresponding actor sequence files.

There is also a mass export feature, though I guess it's sort of hidden, and currently only applies to actor sequence objects. It extracts the objects, but not ora's of each of the objects, so a full mass export feature could be added for that.

When viewing an h4r file's contents in the resource editor, open up the actor sequence node, and then right click on any of the unit nodes. This will give you the option to "extract sequence", select the folder to extract it to (make sure there aren't any folders there with the name of the unit you're exporting).

So there is almost a full mass export, and there is a full mass import. Then use the image editor of your choice in between.

I've added issues for this feature and the bug of not updating the frame title when loading a new file.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Baronus
Baronus


Legendary Hero
posted June 13, 2021 11:47 AM

Irfan viev is fantastic tool for mass working.

Create folder.
Put eg 1000 pictures.
Go to bath option.
Choice recolring eg to red.
Start bath.
You have 1000 recolored pictus in few minuts with the same name.
Create second folder for results.
The same you can reduce coloros to 256.
Thats all if you use png with transparency. You can convert it to bmp or gif? As you want!
But now in H3 you have transparent color repainted.
You must use change color option. Change to transpoarent blue known from heroes 3 using bath.
...

This way you can fast change thousands of pictures.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
NimoStar
NimoStar


Responsible
Legendary Hero
Modding the Unmoddable
posted June 13, 2021 08:41 PM
Edited by NimoStar at 22:29, 13 Jun 2021.

Quote:
Russians are pretty knowledgeable at bat files, try http://wforum.heroes35.net/


I don't think batch files will do much good without the appropiate tools for correctly processing the steps. But if all else fails, I will try that...

Quote:
There is also a mass export feature, though I guess it's sort of hidden, and currently only applies to actor sequence objects. It extracts the objects, but not ora's of each of the objects, so a full mass export feature could be added for that.


I have already mass exported every single file in the h4r with h4 resource extrator back in 2016, so that isn't what I need.

The problem is the ORA that you mention, that still requires opening every file individually.

Quote:
So there is actually a mass import feature in the resource editor (advanced menu), which is being actively used to import an entire set of ora files into their corresponding actor sequence files.


This could be useful , but as I read it it only covers 1, maybe 2 of the points

6- Import the ORA to ilive's program.
7- Save the modified H4D.

Seeing that you still have to open every one of the 107 files in the editor individually and export the ora from the h4d,
And then you have to open each one of the 107 oras and edit each layer and re export each of the 107 files,
You aren't really gaining much ground with the import alone.

Quote:
Irfan viev is fantastic tool for mass working.


But irfanview doesn't do this with .ora files. And iliveinabox tool doesn't have that feature for mass importing many PNG folders (as much as I would like to).

This means I still have to export and edit every .ORA one by one.

So, these are the missing pieces of the puzzle, both in Ilive's tool:

- Add .ORA/.PNG mass exporter. .PNG would be one folder for every h4d creature file. (by the way, PNGs have metadata, so you can put frame info such as offsets and blending mode there)
- Duplicate and change the .ora mass importer into a parallel .PNG folder mass importer

And voilá, there I can mass export PNGs with tool, then mass process with Irfanview, and then mass import PNGs with tool again.

Does that not sound doable? It's two functionalities that should just be extrapolation of existing ones.

Please make this possible. I actually took the time of doing the Sprite manually and can't do that every time
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Baronus
Baronus


Legendary Hero
posted June 13, 2021 11:08 PM
Edited by Baronus at 23:08, 13 Jun 2021.

Baronus

Probably bmp is better because its full bitmap so working faster.
Try alternative to Irfan - Xnview.  Working with ora.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
iliveinabox05
iliveinabox05


Honorable
Famous Hero
posted June 14, 2021 12:02 AM

Well, mass importer handles everything if you're making your own animations

I've added a mass export for actor sequences to ora files. Doing a mass export / import for pngs is doable, but does take a little more work. The basis is already there as going through and visiting the objects on export, but there is some additional logic for both import and export.

I've gotten to several of the bugs you've found, but haven't updated the delivery yet.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
NimoStar
NimoStar


Responsible
Legendary Hero
Modding the Unmoddable
posted June 14, 2021 12:24 AM
Edited by NimoStar at 00:35, 14 Jun 2021.

Quote:
mass importer handles everything if you're making your own animations


That just means making the 107 animations manually, though. As you well know the point now is just modifying the existing ones, not making 100% new creatures, since we can't code them in.

If people are already angry because of changing 1 ability, imagine how angry they will be if I replace a creature entirely
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
iliveinabox05
iliveinabox05


Honorable
Famous Hero
posted June 14, 2021 12:30 AM

NimoStar said:
That just means making the 107 animations manually, though. As you well know the point now is just modifying the existing ones, not making 100% new creatures.

If people are already angry because of changing 1 ability, imagine how angry they will be if I replace a creature entirely


Haha I'm aware, I'm just doing the tease thing. There's a reason there has been so much new development for the resource editor. I need to finish the resource editor tutorial video and then you'll be able to see what I was hinting at.

I don't think people would be completely upset about totally new sprites for at least some units, as a lot of people would agree some of the units are a bit ugly.

If I can wrap up some of the projects I'm working on I'd love to start getting into some modeling to make something new, even if it's just to replace an existing unit.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
NimoStar
NimoStar


Responsible
Legendary Hero
Modding the Unmoddable
posted June 16, 2021 03:05 AM

iliveinabox05 said:

Haha I'm aware, I'm just doing the tease thing. There's a reason there has been so much new development for the resource editor. I need to finish the resource editor tutorial video and then you'll be able to see what I was hinting at.

I don't think people would be completely upset about totally new sprites for at least some units, as a lot of people would agree some of the units are a bit ugly.

If I can wrap up some of the projects I'm working on I'd love to start getting into some modeling to make something new, even if it's just to replace an existing unit.


Well, I do think some units are ugly, for example the wolves are too small and squat, they look like cocker spaniels or something. That being siad it's hard to get a good isometric wolf sprite (if anyone has it be my guest to post it)

But some of the creature abilities are also bad and people still defended sprite and pikemen, so

Anyways, I have tried the .ORA mass export. It does take a while with no progress dialog, but it works. Certainly it is a big time saver and step forward. And thank you for it.

However, I wish you could export ALL the creature sprites at once. I may be a bit crazy but that is what I envisioned. It creates a separate folder so that would not be so hard, with all the creatures, would it?



I mean having the mass export enabled on the actor_sequence part to have everything at once, as it takes 73 times still to extract the creatures. On the other hand, the Mass Import seems like it would work as long as everything is on the same folder, so that's already a win.
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
iliveinabox05
iliveinabox05


Honorable
Famous Hero
posted June 16, 2021 03:11 AM

NimoStar said:
However, I wish you could export ALL the creature sprites at once. I may be a bit crazy but that is what I envisioned. It creates a separate folder so that would not be so hard, with all the creatures, would it?



I mean having the mass export enabled on the actor_sequence part to have everything at once, as it takes 73 times still to extract the creatures. On the other hand, the Mass Import seems like it would work as long as everything is on the same folder, so that's already a win.


So you mean the sprites for all creatures? That should certainly be doable. You'd just have to wait a bit longer with no progress bar, lol

I generally just keep an eye on the output directory to see which directories have been created / populated.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
NimoStar
NimoStar


Responsible
Legendary Hero
Modding the Unmoddable
posted June 16, 2021 03:55 AM
Edited by NimoStar at 05:41, 16 Jun 2021.

Other graphically underwhelming creatures are dwarves and halflings. They could stand to get replaced, if only in looks.
_________

Yees... export ALL of the creatures, then I only need to import them once as well.




And well, about waiting, guess I can just go do something else while it does it

On the negative side, still coudn't find any batch processor for ORA so will really just have to wait for PNGs to do this. (XnView didn't fullfill)



Looking at that pic makes me think, perhaps they should just be .ora and not .h4d.ora when extracted?

Also, IrfanView can open a frame, but not batch process them



I also tried a plugin for GIMP batch. Also unsupported type. No ORA.
https://alessandrofrancesconi.it/projects/bimp/


____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Baronus
Baronus


Legendary Hero
posted June 16, 2021 09:56 AM

Xn viev cant convert ora to gif or something like that?! Or extract single pictures?
Extract using xnview convert in irfan import using xnview to ora and via editor to h4d?! Where is problem?!

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
NimoStar
NimoStar


Responsible
Legendary Hero
Modding the Unmoddable
posted June 16, 2021 03:15 PM
Edited by NimoStar at 15:16, 16 Jun 2021.

Neither irfanview, or XnView, can batch convert ora image frames at all. Unsupported format. Further difficulties are even if there was, each single ora file would need own folder since they have the same frame names (frame 001 shadow 001, etc.)
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Baronus
Baronus


Legendary Hero
posted June 16, 2021 05:17 PM

But gimp?! Cant convert ora to gif?
gimp ora -> gif
irfan gif -> to single image
And edit.
Xnview images to gif.
Next reverse order.
Impossiboe too???

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
iliveinabox05
iliveinabox05


Honorable
Famous Hero
posted June 16, 2021 05:22 PM

Baronus said:
But gimp?! Cant convert ora to gif?
gimp ora -> gif
irfan gif -> to single image
And edit.
Xnview images to gif.
Next reverse order.
Impossiboe too???


He is talking about doing them all at once Baronus, not one at a time. There will be a lot of the ora files for each of the creatures, so he wants to be able to extract the pngs from all of them at once, rather than go through each one of them individually.

ora files definitely have their usefulness, but they come up short in this case as they aren't too widely supported.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
NimoStar
NimoStar


Responsible
Legendary Hero
Modding the Unmoddable
posted June 16, 2021 05:30 PM

Quote:
But gimp?! Cant convert ora to gif?
gimp ora -> gif


Not supported batch convert.

That would be me opening every ora and saving every frame.

Also would need to use indexed PNGs, not GIF

GIF only has 256 colors including transparency (boolean yes/no)

Heroes 4 images have at least 256 levels of transparency (alpha), thus some parts are more transparent than others.

Compare h3 sprites that only have yes/no transparency and you will see the difference.

I tried BIMP (batch processor for GIMP) and it doesn't recognize ora as a valid convertible/exportable format (it's on the screenshots), so it is only manual as iliveinabox says.

____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Baronus
Baronus


Legendary Hero
posted June 17, 2021 01:43 PM

Horrible built game. And these thousand frames creatures... Madness. So you know why Heroes 3 is best loved game in Heroes ever. :0))) I think this must be modded and done simplest.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
karmakeld
karmakeld


Responsible
Supreme Hero
posted June 18, 2021 09:06 PM
Edited by karmakeld at 21:10, 18 Jun 2021.

NimoStar said:


I mean having the mass export enabled on the actor_sequence part to have everything at once, as it takes 73 times still to extract the creatures. On the other hand, the Mass Import seems like it would work as long as everything is on the same folder, so that's already a win.


Namerutans tool. Select the main folder e.g Actor Sequence. Select Export All (to Ora).. ..then you wait..

Oh and how do you think the process of mirroring just about ALL objects is...? The same pain stacking method of having to do each individual frame and change the color settings... I stopped counting the hours years ago...
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
NimoStar
NimoStar


Responsible
Legendary Hero
Modding the Unmoddable
posted June 18, 2021 10:40 PM

Quote:

Namerutans tool. Select the main folder e.g Actor Sequence. Select Export All (to Ora).. ..then you wait..

Oh and how do you think the process of mirroring just about ALL objects is...? The same pain stacking method of having to do each individual frame and change the color settings... I stopped counting the hours years ago...


It was Ilive who told me to stop using namerutan's because of compatibility concerns.

And about the second, well, you should be glad then we are getting closer to not having to do that! Once the PNG mass export/import is done, it will just be pushing a button to mirror (though light direction changes are not necessarily that simple, maybe there is even an AI process for that once we have the PNGs).
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Jump To: « Prev Thread . . . Next Thread » This thread is 2 pages long: 1 2 · NEXT»
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.0852 seconds