PDA

View Full Version : Change TGA powered maps' backgrounds


AngeloG
5 Sep 2010, 14:41
Posted this on the Steam forums aswell, but I feel like posting this here too.

With this program you can change the background of maps. Team17 has for some unknown reason removed the "change landscape" button when custom TGA's are loaded into the in-game editor. This application allows you to change the landscape of those maps (background, such as Cheese, Space, Vulcano, etc).

Includes source code. Will eventually be updated to allow more advanced options. :)

Click (http://wormgineers.com/index.php?page=File&id=227)

hundreds
5 Sep 2010, 21:53
You MUST get this program if you design maps for WR. Titanic actually has icebergs behind it now. I crapped my pants - I'm not afraid to admit it.

bonz
5 Sep 2010, 22:16
And it works online, by the way.

hundreds
6 Sep 2010, 01:35
Aye, aye captain bonz.

AngeloG
6 Sep 2010, 15:59
I crapped my pants - I'm not afraid to admit it.

Haha, I'm glad you like it. :D

Thurbo
6 Sep 2010, 17:00
I got that program but it does NOT work. Is it possible to do something wrong?

hundreds
6 Sep 2010, 17:17
I think you need an updated .Net Framework. Other than that, all you do is open the LDS file (right in your UserLandscapes folder) and pick an item from the drop down box. Hit Save and your good.

AngeloG
6 Sep 2010, 17:55
I think you need an updated .Net Framework.

4.0, to be exact.

Download: http://www.microsoft.com/downloads/details.aspx?FamilyID=9cfb2d51-5ff4-4491-b0e5-b386f32c0992

Thurbo
6 Sep 2010, 18:46
So that's the problem: There aren't any lds files in the Userlandscapes folder - how come?

hundreds
6 Sep 2010, 18:49
Well you have to make them first. You can do that by opening any TGA in the WR editor, and then saving it.

Then use Angelo's tool to edit that LDS file.

Thurbo
6 Sep 2010, 20:08
Why aren't they integrated before?
This system of importing maps is way more difficult than it was in Armageddon. Btw how do you create proper alpha channels in Paint Shop Pro 7 to make your maps usable in WR?

hundreds
6 Sep 2010, 21:18
I am not sure why they didn't just save all the LDS files themselves. I suggested it, but I guess they decided not to.

I don't use PSP 7, but in Photoshop, you essentially have to use the Paint Bucket tool to "fill" areas of the Alpha Channel with varying shades of black.

100% Black = Totally transparent and worms can walk freely there.
1% Black (practically white) = You can see the graphics but worms can still freely walk there.
0% Black (total white) = Solid ground with soil behind it.

Make sure you save the file as a 32-bit TGA (not 24) and open it in the level editor. Save the LDS, and you should be good to go.

Skeeter
7 Sep 2010, 12:16
Good tool.

Btw a small hitch, u get a error when u click browse but then click cancel when deciding not to choose a file.

Any way to do mass conversions like load loads of maps and then say click on a tiny button which sets what background it will use (cycle one button if space is limited) then click somit like "convert all".

Saves it been a long process of loading a single map then picking then saving.

bonz
7 Sep 2010, 12:29
How about adding command line parameters for such mass conversions?

Wormetti
7 Sep 2010, 13:47
It takes the filename as a command line argument but not the background type and it doesn't automatically make the change.

Making a command line tool in a language that doesn't need the .net framework would be easy.

Byte 0x14

00 City
01 Castle
02 Stadium
03 Industrial
04 Cheese
05 Airport
06 Nothing
07 Titanic
08 Vulcano
09 Lavacave
0A Forest
0B Urban
0C Space

Credit to AngeloG of course.

Thurbo
7 Sep 2010, 15:16
Using the proper names of the themes (backgrounds) in the program would be quite helpful, since I have no idea what "Airport", "Urban", "Industrial" and "Forest" is at the moment...

Need a quick consideration:
Forest and Industrial should most likely be Jungle and Construction. There's nothing else that fits.
There's only London and Warzone left, so... London = Urban and Warzone = Airport?
(Airport? Why Airport? Does that building in the background look like a control tower?)

Wormetti
7 Sep 2010, 15:26
I just used the names that AngeloG wrote.

Team17 uses these names:

Arctic
Armageddon
Cheese
Construction
Hawaii
Hell
Jungle
London
Manhattan
Medieval
Space
Sport
Warzone

Thurbo
7 Sep 2010, 15:35
Well, so then:

00 City = Manhattan
01 Castle = Medieval
02 Stadium = Sport
03 Industrial = Construction
04 Cheese = Cheese
05 Airport = Warzone
06 Nothing = Armageddon
07 Titanic = Arctic
08 Vulcano = Hawaii
09 Lavacave = Hell
0A Forest = Jungle
0B Urban = London
0C Space = Space

...I think?

Skeeter
7 Sep 2010, 15:39
Now this isnt a required feature but it would be a "nice" feature to have. A preview button of the said backgrounds. Not necasarily with your map imposed on it just a preview of what it looks like of the many to choose from. I know the names are all well and good and some people do know some of the backgrounds visually but maybe not all. Like i said it is a "nice" feature to have but not a "vital" feature so up to u.

If it was a visual studio 2008 project id have tried to add it myself but when i try opening some files best i can do is view the code but as im a learner programmer it would have been helpful if it was a project file etc even then i duno if it is a visual basic code i think its .net basic.

hundreds
7 Sep 2010, 17:34
100% agree with this last comment. I usually have to set a background, then go see what it looks like in WR. A preview by itself is fine, with your map, even better.

SilPho
7 Sep 2010, 18:15
It's a great idea but are there any complications in using images which Team17 own the rights to? Maybe it falls under fair use but it might be worth thinking about.

AngeloG
7 Sep 2010, 19:48
No, as long as they're shown as screenshots it's fine.

Timiditas
8 Sep 2010, 18:23
Make sure you save the file as a 32-bit TGA (not 24) and open it in the level editor. Save the LDS, and you should be good to go.
Paint Shop Pro specifically doesn't support saving alpha layer to TGA files, its restricted to 24bit.
I use PSP too (v11 by the way, still doesn't support it). What I do is save my levels as PNG and convert them to TGA with Gimp afterwards, which does the job properly.

This system of importing maps is way more difficult than it was in Armageddon.
I strongly disagree, although I'd have liked to see WR support PNG import.

Wormetti
13 Sep 2010, 12:20
There is a modified version by pjumpleby:


Target framework changed to .Net 2.0, users of windows vista and above don't need to install extra files. (Should also compile and run under Mono framework).
Added current background label.
Uses streams to read/write to file. Saves on memory and loading time as the whole file doesn't have to be opened.
Lauching the app with a file name and background index causes the app to load the file update the background and close without the gui showing e.g. LDStractor <file-path> <background-index>
LDStractor "C:\test.lds" 6
Should be no problems editing files one after another

You have to join the site to download (http://wrmaps.com/index.php?option=com_jdownloads&Itemid=4&task=view.download&catid=15&cid=125). I mirrored it here (no registration required) (http://gtamp.com/worms/ldstractor_mod_pjumpleby.rar).

Darkspark
13 Sep 2010, 21:10
Come on T17. It's 2010.

Create an easy way to either share maps, and even import maps. Intuitiveness isn't a random occurence, it's a design choice.