The Ultimate Site of Worms Armageddon

Worms: Armageddon => General discussion => Wormkit Modules => Topic started by: terion on September 20, 2020, 09:29 AM

Title: wkFlamingHealthBars
Post by: terion on September 20, 2020, 09:29 AM
This wormkit module brings back famous flaming team health bars to WA 3.8.

Usage:
1) Extract wkFlamingHealthBars.dll, wkFlamingHealthBars.ini and healthbars/ to your WA installation directory.
2) Edit wkFlamingHealthBars.ini config to match your team names. More teams can be added by copy&pasting [team#] section. Up to 128 teams can be configured.
3) Launch the game. If the configured team name is matched and the game was able to load the specified IMG file, the flame should be visible.

Notes:
If you are using colorblind settings, then use files with "gfx1" suffix. Otherwise use "gfx0" suffix.
Custom healthbars can be created with sprite editor - make sure you use exactly the same palette colors.
The animated bars are only visible locally and other players do not see the flames (unless you agree to use the same .ini file settings and files).
Title: Re: wkFlamingHealthBars
Post by: LilScrappy94 on September 20, 2020, 10:35 AM
https://imgur.com/a/PqscaY2

Kewl
Title: Re: wkFlamingHealthBars
Post by: Spid3yo on September 20, 2020, 01:19 PM
I've wanted this for so long!
Title: Re: wkFlamingHealthBars
Post by: TheKomodo on September 20, 2020, 01:27 PM
Pretty nice, any chance someone could make a simpler tutorial how to make custom ones? I can't make sense of the readme files for creating your own...

Edit - A step by step, what file do you "extract" how do you actually load it so you can change colours etc?

Yeah, I have no idea what to do to make custom stuff, any chance you could make a green/purple flaming bar please?
Title: Re: wkFlamingHealthBars
Post by: terion on September 20, 2020, 02:17 PM
The healthbar image is just a simple 256x8px gradient image which is warped by the game to imitate a flame effect.

I've attached a template pack to create your own health bars. Load "template/gradient template without palette.bmp" in Photoshop and draw something on the gradient. Then use Image -> Mode -> Indexed Colors. In the "palette" combo box select "Custom..." palette, then click "Load" and specify "template/photoshop palette gfx0.act". Then click "OK" and play around with dithering (None/Pattern/Diffusion/Noise) method and levels. Then save the image as "fire-whatever-gfx0.img.bmp". Repeat this step with gfx1.act for colorblind palette.

Next, put your "fire-whatever-gfx0.img.bmp" and "fire-whatever-gfx1.img.bmp" next to "healthbars.dir.txt". Open "healthbars.dir.txt" in notepad, add those two files to the list and save the file.
Launch "SpriteEditor.exe", then click "Reconstruct from log" button and specify "healthbars.dir.txt" file.  The files will be converted to IMG format. Simply copy the img files to your WA/healthbars/ directory and edit wkFlamingHealthBars.ini file to use the new images.

Important note: Do not use gfx0 (normal colors) and gfx1 (colorblind colors) images at the same time. If you do so, you will reach the palette colors limit and the images will turn white.
Title: Re: wkFlamingHealthBars
Post by: TheKomodo on September 20, 2020, 02:40 PM
Now we're cooking with gas! Nice one terion :)  :-*

Thanks!
Title: Re: wkFlamingHealthBars
Post by: Ducky on September 22, 2020, 01:51 PM
(https://i.imgur.com/v7xsQEf.gif)

Love all this stuff keep it up Terion
Title: Re: wkFlamingHealthBars
Post by: TheKomodo on September 22, 2020, 02:59 PM
How would you make it better quality though? At the moment it looks very dithered?

It still looks nice, but if we could make it crystal clear quality, that would be the dogs bollox!


Edit - I was wondering, is it at all possible to setup wkFlamingHealthBars so it automatically loads colours for all teams without putting in team names to a file?

Like just setting all teams to different colour so every game there are always flaming bars?
Title: Re: wkFlamingHealthBars
Post by: h3oCharles on September 23, 2020, 10:23 PM
are we limited to just 4 teams having flame bars? or can we add more manually?
Title: Re: wkFlamingHealthBars
Post by: TheKomodo on September 23, 2020, 11:51 PM
are we limited to just 4 teams having flame bars? or can we add more manually?

Quote
2) Edit wkFlamingHealthBars.ini config to match your team names. More teams can be added by copy&pasting [team#] section. Up to 128 teams can be configured.
Title: Re: wkFlamingHealthBars
Post by: terion on September 24, 2020, 02:32 PM
Thanks for positive feedback. I've updated the module with new features:
- Now you can create your own custom animations
- Teams that do not match any name in .ini file will use a default file specified for alliance color .ini or display normal health bar if filename is empty
- %COLOR% macro in filename will automatically match the alliance color of the team


How to create your own animations:
Health bar animations are regular IMG files with all animation frames stacked on top of each other. One frame is 128px wide and 13px tall. For example, if your animation has 10 frames, then the file dimensions must be 128x130px. The module will automatically determine animation type (flame/custom) based on image dimensions.

1) Create a 128x13px movie with your animation
2) Download ImageMagick and ffmpeg binaries ( https://imagemagick.org/download/binaries/ImageMagick-7.0.10-30-portable-Q8-x86.zip )
3) Extract all frames from your movie to png files:
ffmpeg.exe -i movie.mp4 img%04d.png
4) Merge all frames vertically:
magick.exe img*.png -append animation.png
5) Convert your animation.png to compatible IMG format, as explained here: https://www.tus-wa.com/forums/worms-armageddon/wkflaminghealthbars-32931/msg276949/#msg276949
6) If animation plays too fast, add AnimationDelay=1 or AnimationDelay=2 to your team in wkFlamingHealthBars.ini

(https://i.imgur.com/jYA0xa6.gif)
Title: Re: wkFlamingHealthBars
Post by: TheKomodo on September 24, 2020, 04:03 PM
Dude, that is AMAZING! Thanks for adding autoflame for teams :)

This is one of the nicest mods i've ever seen, being able to make your own animation for healthbars, mind = blown!

How about this then, the possibility of setting up custom animations for each team the same way you've done for each team without names?

So all 6 teams have their own custom animation that you can create yourself regardless of who plays? THAT would be over 9000!

Great work, really, it's the little joys in life like this that bring a lot of excitement :)
Title: Re: wkFlamingHealthBars
Post by: oScarDiAnno on September 24, 2020, 05:52 PM
terion, this is awesome! Thank you so much for this :)

Question, is it possible to comment some lines in the .ini files, so not to have to delete them?
No big deal though, I will move the lines I don't need now to a temporary file, just thought it could be useful :) thanks again!
Title: Re: wkFlamingHealthBars
Post by: Kradie on September 24, 2020, 05:58 PM
Thank you Mr Terion! This is highly appreciated :)
Title: Re: wkFlamingHealthBars
Post by: Ducky on September 24, 2020, 10:22 PM
Haha Terion you're insane, I was literally thinking it was a shame the flame bars weren't image based animations, and here you just go make that happen instantly.  8)

-ninja edit- So cool
(https://i.imgur.com/joB8mhe.gif)
Title: Re: wkFlamingHealthBars
Post by: Hulk_ on September 25, 2020, 09:35 AM
Thank you, that is sick!
Title: Re: wkFlamingHealthBars
Post by: Saint on September 25, 2020, 11:27 AM
can you make neon animation? :D
Title: Re: wkFlamingHealthBars
Post by: LilScrappy94 on September 25, 2020, 12:37 PM
(https://i.imgur.com/3xMDgT1.gif)

Weed theme, to go with Weed wkterrain  :)
Title: Re: wkFlamingHealthBars
Post by: LilScrappy94 on September 25, 2020, 02:13 PM
can you make neon animation? :D

Hello Saint, Im full of love today.
And to reward the good work from terion, I feel like I could help also.

I attach to this post your neon health bar.

And also a "tutorial" about how to make it.
Its a dirty tuto, I didnt take the time to edit it and make it smooth. You should just fast forward when i start to be boring lol.

But I think it could help.

Enjoy!


Title: Re: wkFlamingHealthBars
Post by: GrO on September 26, 2020, 04:19 PM
...neat job definitely, and while the bars are not in flames only now, should the module be renamed to something like:

- wkCustomHealthBars
or
- wkAnimatedHealthBars?

...just a thought :)

Best regards...
Title: Re: wkFlamingHealthBars
Post by: Ducky on September 28, 2020, 12:28 AM
It seems as if the animations overlap the healthbar outline/frame to the left and right sides, is it possible at all to change this?

Also even at full health some of the 128 pixels get cut off