The Ultimate Site of Worms Armageddon

Other Things => Other worms games => Topic started by: BigSheeno on November 11, 2019, 05:09 PM

Title: Extracting terrain files from Worms DC/United?
Post by: BigSheeno on November 11, 2019, 05:09 PM
So I've recently had the idea to try and extract the terrain files from Worms DC and United for use in potential terrains in Worms Armageddon (using wkTerrain) and I'm wondering if it's even possible, or if there's any tool to even convert/open these.
Title: Re: Extracting terrain files from Worms DC/United?
Post by: SiD on November 11, 2019, 08:09 PM
Squirminator2k is the guy to speak to about Worms DC terrains.

He converted the tetris theme to a format for Worms DC:
(https://i.imgur.com/7cnyoDQ.png)

Getting the stock theme assets from Worms DC would be nice, but possibly a bit tricky.
I had a go at making the 'Alien' theme once (just from screenshots I found) but soon gave up.

Talking of themes, would you happen to know where the 'Candy' theme originated? The one that's included with MapGEN (I don't think plutonic knows).
I know 1st gen worms had a candy theme, but the newer one (https://i.imgur.com/OBicMPB.png) is so good, i'd like to know where it came from.
Title: Re: Extracting terrain files from Worms DC/United?
Post by: BigSheeno on November 11, 2019, 11:59 PM
I'd thought to maybe contact him somehow, I wasn't sure exactly how. The thing is, there's a utility called WormPrefs that came with WormsDC that converts the appropriate formats(easily opened in an image editor) into the file type used for terrains which is the seemingly proprietary .DIY format, which can't be opened in editors. Of course, it doesn't do the reverse of this conversion, which is what I'm looking for right now of course. I'd thought maybe to just do it by screenshotting too but that seems like it'd be immensely frustrating.

Also I have no idea where that candy terrain is from but it is something I've wondered myself!
Title: Re: Extracting terrain files from Worms DC/United?
Post by: h3oCharles on November 16, 2019, 12:38 PM
Candy could be something Plutonic made himself, but don't quote me on that
Title: Re: Extracting terrain files from Worms DC/United?
Post by: Squirminator2k on February 01, 2021, 08:27 PM
Old thread, but if anyone with coding/programming know-how wants to have a go at cracking open WormsDC's .DIY format then I'd be happy to send along some files.
Title: Re: Extracting terrain files from Worms DC/United?
Post by: h3oCharles on February 02, 2021, 07:49 AM
wasn't sprite editor done through reverse engineering? is it possible to do a similar thing but with DC?
Title: Re: Extracting terrain files from Worms DC/United?
Post by: Squirminator2k on February 03, 2021, 12:56 AM
I would imagine so, it would just take someone with the know-how, the interest and the follow-through.

I'm interested, certainly, but I lack know-how, so I can't follow through.
Title: Re: Extracting terrain files from Worms DC/United?
Post by: Squirminator2k on February 03, 2021, 01:01 AM
It's worth noting: Graphics extracted from WormsDC would be lower-quality than those same graphics extracted from Worms United. Utd utilized a single shared 256-color palette for its display, while WormsDC utilizes multiple smaller palettes per-layer to get to 300+ colors.

As a breakdown, DC uses 16 colors for the terrain - a palette it also shares with sprites, with the color of worms, grenades, crates and mines determined by color values in the terrain/map file. Then there's 16 colors for the first layer of mountains, then another 16 for the back layer. I suspect each layer of water also uses 16 colors apiece, but when creating a terrain you're only picking the base color of the water using RGB values, and it extrapolates the rest from there. Ditto the sky gradient.

Utd, meanwhile, has a fixed 256-color palette which is used across all of its terrains.
Title: Re: Extracting terrain files from Worms DC/United?
Post by: Squirminator2k on February 05, 2021, 01:38 AM
So apparently, the answer to the question "Can we extract terrain data from Worms Utd?" is Yes. nizikawa managed it, and has been converting some of the terrain styles for use in WA.

Which, of course, means I've been converting the only two 1st-gen terrains that never made it to WormsDC... to WormsDC. Ha.

[attachment=1] [attachment=2]

[attachment=3] [attachment=4]