PDA

View Full Version : Adding new textures



Combat-Enforcer
July 22nd, 2010, 17:07
Is there any way I can add brand new textures into the game which can be potentially used in a map? With new textures, I mean things such as - wall tiles, floor tiles, different organic rock themes; world textures etc which are both unique to certain locations in the map, and which are coded to act with everything else (such as when a player comes along and fortifies a wall, consequently making it that style of texture) or additionally allow player 2 (or which ever designated) to employ a certain type of texture? Such as; his walls or dungeon has an overall different style to yours, to give him some kind of 'signature' representation.

But with this, I would like to do it without overwriting the old textures, so that they are only present in certain areas or maps which they have been explicitely placed in.

Thanks in advanced.

Combat-Enforcer
July 22nd, 2010, 17:33
Mefistotelis? What's that?

Mothrayas
July 22nd, 2010, 17:43
The creator of KeeperFX.

Combat-Enforcer
July 22nd, 2010, 17:46
Well, as for that; I hardly think it's impossible, especially if mefistotelis can do it.

Unless, it's something which requires the source code which only he has? (Unless DK is purely open source).

I'm not really sure what Necror is trying to say.

mefistotelis
July 22nd, 2010, 21:02
I can't give you "for dummies" tutorial, but here's everything you need:

Textures are written in TMAPA000.DAT - TMAPA007.DAT in DATA folder. They have 8-bit RAW format. Image dimensions are: 256x2176. I think DKTools can convert themto BMP; but remember that you must not change its colour patette if you want to export them to RAW again.

One map can only use one texture file. The file used is written for every map in its .INF file. For example the value inside MAP00009.INF is 2, so this map uses TMAPA002.DAT. If you want to make your own texture pack, just use another number and update INF files to use them.

Good luck!

EDIT: Almost forgot - some files may be compressed with RNC - if you see "RNC" at start of a data file, then it's compressed. Use DKTools to decompress them; there are also command line tools to do this on syndicate.lubie.org. You don't have to re-compress them when you've done - DK accepts uncompressed files too.

Combat-Enforcer
July 22nd, 2010, 21:11
Perfect, thanks!

Do you mean that the game has a 'certain colour pallette'? Or that each group of textures have their own set colour pallette?

But damn, I don't think a program like GIMP can save .raw files. I think i tried before, but Gimp didn't want to open it.

Additionally, where can I find DKtools? I can only find the french version.

Combat-Enforcer
July 22nd, 2010, 22:06
Also, I'm new to mapping on DK, are there any campaign mods which allow you to go back and forth between dungeons? As in, when you conquer a realm, you can return to your dungeon there at any time, transport creatures, money and technology and other stuff?

And would there be a way to establish triggers accross maps? For instance, you reach a certain point in the series of levels, which causes you to become under attack by heroes in another? Or one map gets an impenetrable wall broken down when you perform an action in another.

dotted
July 22nd, 2010, 22:08
http://dungeon-keeper.net/index.php?option=com_kunena&Itemid=53&func=view&catid=64&id=19469

Combat-Enforcer
July 22nd, 2010, 23:06
Yes, but as I said I can only find the French version of the toolset, not the English translation.

A New Room
July 22nd, 2010, 23:12
There is only the French version, as far as I'm aware.

Combat-Enforcer
July 22nd, 2010, 23:15
There is? Damn.

I can't understand most of it.

DragonsLover
July 22nd, 2010, 23:26
You must use DKTools v.0.9.5.0 to be able to extract and import textures. The program is only in French but there's not so many texts in the program so, I don't see why it should cause a problem.

Once you have downloaded the program on DK.net, open the program and select the "Texture" tab.
First bar is the palette to use, click on the folder icon to browse for the .PAL file.
Second bar is the texture to extract, do the same thing again.
Third bar is the destination folder where to extract the texture. The blue arrow button next to it allows you to extract the texture into a .BMP file in the selected folder.
Fourth bar is the image to import. The button next to it allows you to import an image file. Here, I guess you only need a .BMP file, but you have to be sure to use the same colour palette used by the game. It is supposed that, when you open up the .BMP, the colour palette is already defined correctly.

To the right side, you will be able to see all the tiles. The button at the top allows you to extract every tiles separately. As for the bottom part, you can enables the modification of the texture. I don't know much about it.

Combat-Enforcer
July 22nd, 2010, 23:35
Which program am I looking for? There are 10 different applications which come with that download.


You must use DKTools v.0.9.5.0 to be able to extract and import textures. The program is only in French but there's not so many texts in the program so, I don't see why it should cause a problem.

I can't understand the functions or labels next to certain strings; and the readme which comes with it is entirely in French.

Some things are straight forward, but with others it's not so easy considering that I am not well acquianted with the Dungeon Keeper filesystem/engine.

DragonsLover
July 22nd, 2010, 23:51
Download DKTools v0.9.5.0 (http://dungeon-keeper.net/index.php?option=com_remository&Itemid=79&func=fileinfo&id=92)

I have translated the so few buttons and labels of the "Texture" section. Download that file: 433

Inside, there's a "DKTools.lng" file. Replace it with the existing one and hey, presto! It's in english now.

Combat-Enforcer
July 23rd, 2010, 00:03
Thanks, allthough this is a different program to what dotted provided earlier.

Edit: I can access the textures now, thanks for the help.

And now that I can add textures, is there any way to create custom tiles which I could use to feature them on unique places on a custom map?

mefistotelis
July 23rd, 2010, 05:38
Do you mean that the game has a 'certain colour pallette'? Or that each group of textures have their own set colour pallette?
There's one for all textures; variants are only for different gamma levels. You may find it based on file size, which will be 3*256 (after decompression).


But damn, I don't think a program like GIMP can save .raw files. I think i tried before, but Gimp didn't want to open it.
It can open RAWs. Look at bottom of open window.

Combat-Enforcer
July 23rd, 2010, 06:42
Oh, i see.

If I were to make a new texture set which uses different colours; would I have to use a new colour pallette, or does Dungeon Keeper not allow/understand that?

Edit: Yeah, I see that now. I must have tried to open a dodgey file before.

DragonsLover
July 23rd, 2010, 09:30
Beware that textures and sprites share the same PAL****.DAT files. This means that if you alter the colours of the palette for the textures, you will alter the colours of the creatures and things as well, which would give ugly results.

You better don't touch the colour palettes. Just modify the textures by respecting the colours and it would be fine.

Combat-Enforcer
July 23rd, 2010, 11:10
I meant creating a new one entirely in order to implament different colours into a new texture; which i don't think that would affect unless it actually gets assigned to the creature skins and such.

DragonsLover
July 24th, 2010, 00:00
Why needing different colours? I mean, DK palette has mostly all the colours you need (excepted perhaps for medium and dark blue). Here's the colour palette used in the game (darkest gamma):

435


...unless it actually gets assigned to the creature skins and such.

It DOES affect the creature skins and such. Like I said earlier, textures and sprites (creatures, objects, spells, etc.) both share the same palette. If you alter the pink gradient above, for example, the Warlock cloak will change of colours, the Orc's skin colour will be also changed, etc. You CAN'T make a colour palette specially for a new set of textures without altering the colours of creatures and things unless tweaking the code of the game to tell it to use different colour palettes, but then, I think it could become troublesome, and I doubt Mefisto would do something about that.

Combat-Enforcer
July 24th, 2010, 03:15
Yes. THIS one does, because this is the default pallette. I am talking about a new one entirely which only be assigned to any recently created textures which I have made for that purpose; I have no reason to overwrite the existing one, or assigning it to the creature skins which work perfectly fine on their own.

Speaking of creatures, are there tutorials on how to create new creatures/add new images of animation? Additionally, what method did the charactor designers use to create the sprite based charactors, are they screenshots taken of a 3d model?

mefistotelis
July 24th, 2010, 07:32
To mix colurs, like displaying half-transparent (Concealed) creature, DK uses colour conversion tables. These are written in tables.dat (the game can re-create this file if its removed for some reason).

DK only creates one colour conversion table, and it requires two input palettes and the output palette to be exactly the same.

You can't add new creatures, only modify existing ones. There's no tool (yet) to recompress creature sprites.

Combat-Enforcer
July 24th, 2010, 08:53
Oh, really? That's a shame.

Hopefully someone can make such which allows for this, or create that capability.

But before that, is there a way to extract them? I could get an idea of how they are made first, and perhaps modify some to create new creatures before I am able to add them to the game, such as brown-grey-red trolls, differently clothed warlocks etc. They wouldn't be unique or anything, but they could help add some diversity to whatever they are used for.

mefistotelis
July 24th, 2010, 20:00
Read here for info about creature sprites:
http://old.forum.keeperklan.com/viewtopic.php?f=29&t=907

There's also a command line extractor, published with source. If I remember correctly it's here:
http://syndicate.lubie.org/swars/rework/swars_rework_dattab.php

Some code co modify JTYs is present in colour changer, downloadable here:
https://sourceforge.net/projects/adikted/

DragonsLover
July 25th, 2010, 01:41
DKTools also allows you to extract the creatures. You must select "JTY" tab in the program.

Combat-Enforcer
July 25th, 2010, 15:15
Thanks, excellent. These seem fairly easy to make.

So I guess that the creatures are just render shots of 3d models?

Additionally, would I have to make them compatible to the limits of the pre-existing pallette?

http://img.photobucket.com/albums/v449/Kajgue/BrownTroll-Animation.gif

The animation looks a bit odd to me, are all animation files numbered consistently in the Creature.JTY? I'm not sure if I've missed some out.

DragonsLover
July 26th, 2010, 03:05
So I guess that the creatures are just render shots of 3d models?

That, or it's a very good work of a professional pixel artist.


Additionally, would I have to make them compatible to the limits of the pre-existing pallette?

Yes. You must use the limits of the PAL*****.DAT files.


The animation looks a bit odd to me, are all animation files numbered consistently in the Creature.JTY? I'm not sure if I've missed some out.

Which program did you use? With DKTools, it works just fine.

Combat-Enforcer
July 26th, 2010, 11:22
I extracted them with DKTools, that Troll animation there doesn't seem to look like the origional.

Allthough it would make more sense creating rendershots of an animated 3d model, seeing as they were on the cutscenes awell.

DragonsLover
July 27th, 2010, 02:35
That's weird, because me, I get this:

http://dungeon-keeper.net/images/fbfiles/avatars/gallery/Dungeon%20Keeper%201/troll0.gif

but separated into 30 frames. So, if it works for me, it should work for you as well.

Combat-Enforcer
July 30th, 2010, 04:52
Nono, that was just a preview to show the 'walking toward camera' animation. I can't tell if it looks correct or not.

Perhaps it's just an illusion because it's not fast enough.

DragonsLover
July 30th, 2010, 10:06
Seems to be good for me. And if it's a bit slow, this is because the .GIF is slow. It is easily possible to make it animating faster.

And in the game, the frames are based upon the amount of game turns per second so, again, the speed of the animations may vary.

Combat-Enforcer
July 31st, 2010, 00:21
Yes, I set the timing on the .gif manually, not knowing what the actual speed should be. I just thought that the animation looks a little strange, as in not like it does in the game, but it could be just an illusion due to the speed of the .gif.