Forums
July 23, 2021, 04:01 PM

Author Topic: wkFlamingHealthBars  (Read 1763 times)

0 Members and 1 Guest are viewing this topic.

Offline terion

wkFlamingHealthBars
« 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).

Offline LilScrappy94

Re: wkFlamingHealthBars
« Reply #1 on: September 20, 2020, 10:35 AM »

Offline Spid3yo

Re: wkFlamingHealthBars
« Reply #2 on: September 20, 2020, 01:19 PM »
I've wanted this for so long!

Offline Komito

Re: wkFlamingHealthBars
« Reply #3 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?
« Last Edit: September 20, 2020, 01:40 PM by TheKomodo »

Offline terion

Re: wkFlamingHealthBars
« Reply #4 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.
« Last Edit: September 20, 2020, 02:23 PM by terion »

Offline Komito

Re: wkFlamingHealthBars
« Reply #5 on: September 20, 2020, 02:40 PM »
Now we're cooking with gas! Nice one terion :)  :-*

Thanks!

Offline Ducky

  • The Water Seeking Missile
  • New Member
  • *

  • Denmark Denmark
  • Posts: 10
  • Quack
    • View Profile
Re: wkFlamingHealthBars
« Reply #6 on: September 22, 2020, 01:51 PM »


Love all this stuff keep it up Terion

Offline Komito

Re: wkFlamingHealthBars
« Reply #7 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?
« Last Edit: September 22, 2020, 09:27 PM by TheKomodo »

Offline TheMadCharles

Re: wkFlamingHealthBars
« Reply #8 on: September 23, 2020, 10:23 PM »
are we limited to just 4 teams having flame bars? or can we add more manually?

Offline Komito

Re: wkFlamingHealthBars
« Reply #9 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.

Offline terion

Re: wkFlamingHealthBars
« Reply #10 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


Offline Komito

Re: wkFlamingHealthBars
« Reply #11 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 :)
« Last Edit: September 24, 2020, 04:07 PM by TheKomodo »

Offline oScarDiAnno

Re: wkFlamingHealthBars
« Reply #12 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!

Offline Kradie

Re: wkFlamingHealthBars
« Reply #13 on: September 24, 2020, 05:58 PM »
Thank you Mr Terion! This is highly appreciated :)
If the world hates you, remember that it hated me first.

John 15:18.

Offline Ducky

  • The Water Seeking Missile
  • New Member
  • *

  • Denmark Denmark
  • Posts: 10
  • Quack
    • View Profile
Re: wkFlamingHealthBars
« Reply #14 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
« Last Edit: September 25, 2020, 12:24 AM by Ducky »