How-To: Creating new theme [updated, still old illustrations]
We receive many requests on theme creating topic. So, I'll try to describe this process.
Land generator theme in Hedgewars consists of many files: LandTex.png, Sky.png, horizont.png, Border.png, Flake.png and theme.cfg.
Let's have a look at 'nature' theme:
- LandTex.png is an image of 640x480 size. Actually, you may choose any dimensions you like when creating your own theme. The LandTex picture is tiled over generated landscape, so it should have no visible joints when being tiled for better looking.
- Sky.png is the picture of the sky, it should be 1024 px high, any width. The color of the sky above clouds is described in theme.cfg. 'avematan' theme has 64x1024 Sky.png, which is actually a gradient from dark-blue bottom to blue top. Sky.png is tiled horizontally.
- horizont.png is an image, drawn behind the landscape in front of the sky. It could be of any size. horizont.png is tiled horizontally, just under the water line.
- Border.png is the image of the border of landscape. It could be of any width, 32 px height. Top half of the picture is the border of the top lanscape edges, and the bottom half is the border of bottom edges.
- Flake.png is the image of those objects flying behind map.
Let's look at the screenshot:
'1' points to horizont.png
'2' shows where the Border.png is drawn
'3' is over Sky.png
'4' is painted on LandTex.png
'5' shows so-called 'map objects'.
What are 'map objects'? To understand well, we should look into theme.cfg and see, what's there.
- The first line of theme.cfg is the color value of landscape hole border color after explosion. It has format "R G B", where R, G and B are red, green and blue color components, each has value from 0 to 255;
- The next line describes sky color in the same format;
- Third line is soundtrack name, you may leave this line empty;
- Fourth line is the number of clouds to fly in the sky;
- 5th line is the number of map objects included in this theme
plant2 0 85 25 25 2 0 0 170 70 50 70 120 40
The first line is the name of the map object picture. The second describes the object: '0 85 25 25' is the rectangle of picture that should be behind the landscape, hidden from view (it has "left top width heigth" format). '2' is the number of rectangles that should be visible, '0 0 170 70' and '50 70 120 40' are visible rectangles described for this object. Let's see:
Green rectangles are rectangles described for 'inf' map object. Left rectangle is guaranteed to be visible, and the right - to be invisible when the land is generated.
The next line contains '0' - the number of special objects - that are painted on top of landscape. The example could be found in theme 'wood' (line '5' there means the maximum number of objects placed on the land).
Last two lines are: number of flakes and their properties in format 'number_of_frames frame_duration rotation_velocity falling_speed'
So, that's all! Enjoy creating new themes!
If you have created a new nice looking theme or map and wish to share it to community - you are welcome to tell us about that. We will be pleased to include your artwork in the next release of hedgewars.
Here ya go i just made this map in about 5 mins and thought id share it i have also made a new theme to go with it the download link is at the bottom of the page.
image:
then just run the game HAVE FUN!!:P
PS if you make me a sub-forum/thread i will make lots more stuff
PSS this project rulez!!
Good job, thank you! We plan to include this theme and map into the next release. What is the licence you are willing to choose? Does GPL satisfy you? Feel free to create your own thread in this forum!
Yeah GPL licence is good il make more soon!!
thanks for this awesome topic now Im working on my own super mario theme.
Dammit. I was just thinking about the same!
БЫСТРО БЛДЖАД! Полицейский, что это необходимо для Вас, блджа, падает отсюда блджад!
Hi
A question: we create a map (nice big image of some sort ). When we want to assign a theme to it and write "nature" in the cfg-file for example, what do we take from this theme? oundtrack - obviously.Skyline, flying things in the background - that too. But do we take the border properties and coordinates and if yes - how does this adjustment work? The walkable areas are obviously not in the cfg-file in the map's folder (along with 2 more images). How do we make all these walkable areas fit on our map?
Thanks in advance!
Best regards,
rbaleksandar
HTML = How To Meet the Ladies
Here is my Unofficial Manual for HW. Hope you like it. Still working on it. Don't worry. Will get it finished...Sometime in the future.
What walkable areas do you speak about? Every pixel that has alpha other than 0 is a solid shit. I wonder why no one created a semitransparent map yet. I was going to but ima lazy arse. Border properties sound like fun. There's destruction border color. It's described in theme.cfg. Border.png doesn't apply to a map anyhow since it's drawn, not generated. Still thinking about coordinates. Sholda smoke my guru-ganesh-beedies for this one.
БЫСТРО БЛДЖАД! Полицейский, что это необходимо для Вас, блджа, падает отсюда блджад!
My UFO fort takes advantage of semi-transparency. Not too much, but it does.
Thanks. Well, actually there are non-walkable areas. For example a slope with an angle more than 60 degree. A hedgehog can't walk there.
There should be some kind of coordinates for the borders in a team. The border is an image (e.g little grass with small amount of dirt underneath) and when you generated a random map and change themes, this borders are placed on slopes, valleys etc.
HTML = How To Meet the Ladies
Here is my Unofficial Manual for HW. Hope you like it. Still working on it. Don't worry. Will get it finished...Sometime in the future.
In fact borders are placed over the terrain, like a landtex patch. I feel dumb. Looks like i am, cause i can't understand you. I got whut a non walkable means (60 deg is walkable i think but 90 is surely not). But the rest... Can you try and explain exatly what you mean? I guess you are talking about some shit that is coded and not written in any cfg.
БЫСТРО БЛДЖАД! Полицейский, что это необходимо для Вас, блджа, падает отсюда блджад!
Okay, let me try
You have an image of a border. Like this one:
..\Hedgewars 0.9.9\share\hedgewars\Data\Themes\nature\Border.png
You can apply this theme (Nature I mean) on a map, right?
So now you have chosen your theme and you map.
How does the game adjust this border to the given map?
Look at all red circled areas. This is this Border.png. But how? The image itself is a rectangle. On the terrain it isn't at all. There are small circles, triangles, curves etc.
http://img218.imageshack.us/my.php?image=hwbordercs9.png
Hope this time I made myself clear enough
Best regards,
rbaleksandar
PS: Sorry, can't make the darn think to resize. When I put
img=640x480
it just shows...nothing. Only the label "Click to view full image" (or something like that). Same with other resolutions
HTML = How To Meet the Ladies
Here is my Unofficial Manual for HW. Hope you like it. Still working on it. Don't worry. Will get it finished...Sometime in the future.
The border.png is split into 2 parts, top border and the undershadow.
The engine automatically places it WITH the theme, it isn't separately chosen...
The game engine warps the image about to fit the top of the texture, probably with some mathematical algorithm based on the terrains angle etc. and tiles the image across.
Why would you care about this one? In fact the engine takes that rectangle splits it rorizontaly in 2 and verticaly in 128 or whatever images width is. Then engine aplies it to the terrain, rescaling those tiny stripes. You can do nothing about that.
Oh and once again, when you speak about maps, point out what exactly do you mean (predrawn maps or generated).
I hope that helped a little bit.
БЫСТРО БЛДЖАД! Полицейский, что это необходимо для Вас, блджа, падает отсюда блджад!
I was just very curious that's all And wanted to know if I had to do something too complicated for my tiny brain Obviously - don't have to
Thanks for the replies guys.
HTML = How To Meet the Ladies
Here is my Unofficial Manual for HW. Hope you like it. Still working on it. Don't worry. Will get it finished...Sometime in the future.
No problem rbaleksandar. The best way to learn is to try yourself first, remember that.
I've already made one. Needs soundtrack and some other stuff, but it's almost ready
HTML = How To Meet the Ladies
Here is my Unofficial Manual for HW. Hope you like it. Still working on it. Don't worry. Will get it finished...Sometime in the future.
Man, when i hear this, i compare to myself. By some stuff i usualy mean... Well when i hear this i imagine a 6% completion product, lol. I hope you do better that this.
БЫСТРО БЛДЖАД! Полицейский, что это необходимо для Вас, блджа, падает отсюда блджад!
Well, yes But trust me, since in next months I won't have any time at all (except study, eat, sleep, sh*t, f*ck from time to time lol), don't expect it soon
PS: When I'm ready with the drawing, I'll looks for some music talents around here
HTML = How To Meet the Ladies
Here is my Unofficial Manual for HW. Hope you like it. Still working on it. Don't worry. Will get it finished...Sometime in the future.
One can live without theese in bold believe me, cause i do, lol (can't live withoth lol though).
БЫСТРО БЛДЖАД! Полицейский, что это необходимо для Вас, блджа, падает отсюда блджад!
It's cause DrDickens is shamefully a virgin xD
Josh, please...Not everyone likes the c*ck So patience is needed here
HTML = How To Meet the Ladies
Here is my Unofficial Manual for HW. Hope you like it. Still working on it. Don't worry. Will get it finished...Sometime in the future.
You say a virgin as if it was something bad....
БЫСТРО БЛДЖАД! Полицейский, что это необходимо для Вас, блджа, падает отсюда блджад!
It depends on how old are you
If you were 40 then it's weird... doesn't it?
Press any key to continue, or any other key to cancel.
No, it doesn't. Let's not start no holywar.
БЫСТРО БЛДЖАД! Полицейский, что это необходимо для Вас, блджа, падает отсюда блджад!
Hey, guys, are we trolls or what? Now, a question to ask: how many objects can a theme include and how many is appropriate to make for the res of current maps?
HTML = How To Meet the Ladies
Here is my Unofficial Manual for HW. Hope you like it. Still working on it. Don't worry. Will get it finished...Sometime in the future.
32 is maximum, but this can be easily changed in sources
Thanks a lot!
HTML = How To Meet the Ladies
Here is my Unofficial Manual for HW. Hope you like it. Still working on it. Don't worry. Will get it finished...Sometime in the future.
The download link for the theme doesn't work for me.
and now the map download also not!
can u upload it again?
Hi!
That's because that map was created 2 years ago.
That link just expired.
There are plenty of maps in Hedgewars, so why do you want download this map?
Press any key to continue, or any other key to cancel.
i mean the download-link for the theme.
and there are not very much themes on this site.
Hi!
Oh my! Did you download the game? Then go to (C:\Program Files )\Hedgewars 0.9.11\share\hedgewars\Data\Themes there are plenty of themes fre for you to modify. Just note you won't be able to play on off server if you tinker with themes.
БЫСТРО БЛДЖАД! Полицейский, что это необходимо для Вас, блджа, падает отсюда блджад!
Is something changed in the syntax? I've read the first post, then i looked into theme EarthRise and i don't know what two lines from this file do.
Sorry for English
Those are the water colors, top and bottom in RGBA format, if iirc. The $ means it's in HEX notation (as in HTML #FFFFFF)
Right. The optional fourth number is the alpha color/channel.
But it's an inconsistency - or can I use RGB values(0 - 255) instead?
TIAS?
--
Oh, what the heck. 1PLXzL1CBUD1kdEWqMrwNUfGrGiirV1WpH <= tip a hedgewars dev
You can use both, e.g. to get some simple white you can use both of the following lines:
255 255 255
or
$FF $FF $FF
If you'd like to have some 100% red with 50% alpha:
255 0 0 128
or
$FF $0 $0 $80
You could mix number formats as well (which might be a bad idea):
$FF 255 $FF
You're no fun :-p
--
Oh, what the heck. 1PLXzL1CBUD1kdEWqMrwNUfGrGiirV1WpH <= tip a hedgewars dev
Actually, I don't know what does it mean and Google doesn't know it too
It's Try It And See acronym.
Less harsh version of RTFM (Read This "Fascinating" Manual) :P
http://www.acronymfinder.com/Slang/TIAS.html
Press any key to continue, or any other key to cancel.
I created a wiki article with updated and more complete info about theme creation:
http://www.hedgewars.org/node/2075
I will try to create a theme:D
Thanks for the tute, Palewolf - it was very helpful =)
I've started work on my own theme called Egypt...
Finally happy with it =)
http://www.box.net/shared/x9bck03oai
Hi, nice Theme How-to
This doesn't have to do with creating a new theme but I lost the Landtex.png, Landbacktex.png and the icon.png for the 9.14.1 nature theme, can someone re upload them for me?
You can always download separate files from the repo:
http://hedgewars.googlecode.com/hg/share/hedgewars/Data/Themes/Nature/LandTex.png?r=c279aeb615dfc34b006471d9e7b1cce472260a25
http://hedgewars.googlecode.com/hg/share/hedgewars/Data/Themes/Nature/LandBackTex.png?r=c279aeb615dfc34b006471d9e7b1cce472260a25
http://hedgewars.googlecode.com/hg/share/hedgewars/Data/Themes/Nature/icon.png?r=c279aeb615dfc34b006471d9e7b1cce472260a25
or just reinstall the game :P
sheepluva <- me my code stats ->
a Hedgewars Developer
click here to message me
<- where I'm from what I speak ->