A lot of new maps! (script to import maps from Wormux)

3 replies [Last post]
daneel
User offline. Last seen 16 years 13 weeks ago. Offline
Joined: 2008-06-19
Posts: 5

I have made a script to import maps from Wormux.

1. Download this:

http://download.gna.org/wormux/BonusPack_31Maps_20080614.tar.bz2

Or use the official Wormux maps.

2. Uncompress it.
3. Use this script:

# Use: hedgemaps.sh directory_of_a_wormux_map
# Tested with: http://download.gna.org/wormux/BonusPack_31Maps_20080614.tar.bz2
# Requirements: imagemagick
# By Daneel
# GPL 2.0

CAD=""
pattern1='file="*'
pattern2='"*'
HEDGE=/usr/share/games/hedgewars

mkdir listo
mkdir "listo/$1"

cd "$1"
M=$(cat config.xml | grep name=\"map)
cd ..

for i in $M 
do
	CAD="$i#$pattern1"
	
	if [ "$CAD" != "$i" ]
	then 
		CAD="$CAD%$pattern2"
		echo $CAD 
		break
	fi	
	#echo $CAD	
		
done

M=$CAD
convert "$1/$M" -resize 2048x1024\! "listo/$1/map.png"
cp "$HEDGE/Data/Maps/cheese/map.cfg" "listo/$1/"

like this: sh hedgemap.sh titanoc

Then, copy the map from "listo" directory to HEDGEDATA/Data/Maps/
like this:

sudo cp -R listo/titanoc /usr/share/games/hedgewars/Data/Maps

4. Enjoy!

Conversion of background (themes in Hedgewars) isn't supported, because i can't understand how hedgewars use theme's files (more documentation please!).

Thanks!

unC0Rr
unC0Rr's picture
User offline. Last seen 11 weeks 5 days ago. Offline
Joined: 2006-11-27
Posts: 576

Here is a bit deprecated, but still useful description of themes: http://hedgewars.org/node/105

daneel
User offline. Last seen 16 years 13 weeks ago. Offline
Joined: 2008-06-19
Posts: 5

Thanks, another question: support for closed maps (like caves) is planned ?

unC0Rr
unC0Rr's picture
User offline. Last seen 11 weeks 5 days ago. Offline
Joined: 2006-11-27
Posts: 576

yes, it's planned, but this feature has low priority

User login

Copyright © 2004-2024 Hedgewars Project. All rights reserved. [ contact ]