TA: Kingdoms Forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.


Welcome to TA: Kingdoms
 
HomePortalGallerySearchLatest imagesRegisterLog in

 

 How to make maps with custom textures... or anything really

Go down 
AuthorMessage
$_Spagg

$_Spagg


Posts : 385
Reputation : 14
Join date : 2010-10-31
Age : 110
Location : Brazil

How to make maps with custom textures... or anything really Empty
PostSubject: How to make maps with custom textures... or anything really   How to make maps with custom textures... or anything really EmptyMon Jul 04, 2016 9:07 pm

I've been meaning to write this for a while so I don't end up forgeting and for future reference maybe, it is actually very simple although a little tedious.
This guide is kinda intermediate and expects you to know how to use HPI viewer and HPI packer... or maybe not, if it's not easy enough to follow feel free to ask in the thread

Note: Click on the (CLICK) things to see the pictures

Here's what's needed:
- Cartographer (to make the map)
- HPI View
- HPI Packer
- Any image editor (to edit the textures)

1- First step: preparation
(this step only needs to be done once and you'l never need to repeat it for future map editions)
- Open HPI viewer and go to "File > Open HPI file" and select "terrain.hpi" in your tak folder (CLICK)
- Then "File > Extract All" and choose a destionation directory
Now you have all texture files that can be edited, just keep them somewhere and note that it is important that you dont change their filenames (CLICK)

2- Make the map
In this example I'll make a flat map with some textures that I'll want to change
(CLICK)
Since I don't want to change the whole map I'll put in some placeholder texture so I change only that one (and not the whole floor)
(CLICK)
In the picture you can see I chose a very easy to identify placeholder, so it will be easier to find this specific texture later on...
Map done, save it. (don't forget the player start positions etc)

3- Extract the map
- Open HPI viewer and open your map file (which should be be at takfolder > maps, or wherever you saved it) (CLICK)
- Extract all the hpi content to somewhere like your desktop then move it to an empty folder
The content should be a folder called "kmap", you want to copy the full folder, not only its contents
Here I created a folder called tutorial where the modificatios will go into
(CLICK)
I started by putting the kmap that we extracted with hpi viewer inside it

4- Modify it
Now here's the thing, anything else that you put into this directory (not the kmap directory) will override the game contents, if I create a folder called "unitscb" with some modified unit fbis it should override the game unit.
Note that overriding unitscb can be kinda buggy so I advise against it. Something that works is creating a canbuildcb and adding units to it (like in canbuildcb from the other hpis, look into them) so you can add units to the build list of builders. One thing I did before was make every mon be able to build every other race's builder, it works... if that race is loaded in the game (that is, if another player picks that race)
- Anyway, the only thing we want to do in this tutorial is override the map textures and nothing else, so let's just make an empty folder called "terrain" there
Now our folder looks like this: (CLICK)

5- Overriding the specific texture
Remember those textures we got from terrain.hpi before? Go to the directory where you saved them and look for the specific texture you want to override.
Took me quite a while to find it but I finally did, and there is she:
(CLICK)
(It should be easier to just grab a placeholder texture on the terrain folders beforehand and then pick it in the cartographer instead)
Now copy it into the empty "terrain" folder you created previously
(CLICK)
Now, as it is right now it won't change anything in the map, so let's go ahead and edit the picture in some image editor, here I'll use paint.net but just use whatever you like, the only thing that is important is for you to keep the same file name.
After 10 hours of careful editing, I was able to draw this masterpiece: (CLICK)
Here's the transformation:
(CLICK)
(If you're wondering how I took the dirt patches out of it, I actually just copied a texture that only had grass, while maintaining the filename of our placeholder image that we want to override)

6- With it complete you should have a directory with two folders inside it:
- the kmap folder (with 4 files inside that you shouldn't care about)
- the terrain folder (which you created and put your edited texture that you want to override)
Now what's left is pack that back into a map.
- Open HPI Pack
- In the "directory to pack" field, browse the directory you created (the folder with the kmap and terrain folder)
- In the "destination hpi file", browse for the destination, but name it with a ".kmp" extension, like in my picture:
(CLICK)
As you can see, I saved it to my maps folder with the name "tutorial.kmp"
Click pack and now let's see it in game.
By the way, if you open it in HPI View, this is how it should look like: (CLICK)
Now look for it in game and launch it: (CLICK)
And here's it in game: (CLICK)

Now you should see two issues here:
First- The color doesn't match the one I actually used. That's because I used a color that doesnt belong to that map's color pallete, I don't see any way to fix this but I don't think it's really important, just try to limit yourself to colors that don't stray away too much from the map's color range (some colors work fine, it's just hard to identify proper colors so just use whichever really)
Second- It still shows the old texture in  the thumbnail (both in the map select menu, and in the minimap). Thankfully this is easy to fix and is what we are going to do in the next step

7- (OPTIONAL) Fix the thumbnail / minimap
- Open cartographer again, this time load the map that we just created with HPI packer (the one you just packed)
- This is how it should look like inside cartographer: (CLICK)
- Don't change anything, simply press the save button to save it
- Now the minimap is fixed, and if you open it in game you'll see the updated minimap, however, when we save a map with cartographer, we will lose the terrain folder we created, which means that while the minimap is fixed, the actual map has the original texture again
- Create a second empty directory anywhere (I'll just call mine "tutorial_fixed" and create it on my desktop) (or override the old one, I'll just create a second one to make it easier to follow)
- Open HPI viewer again and extract the map after saving it on cartographer, extract it into the new directory we created ("tutorial_fixed").
- As you can see, we lost the terrain folder we had, that's because cartographer only saves the "kmap" folder, everything else is lost, but the minimap IS changed and that's what we wanted - change the minimap in the kmap.
- Go into the old folder ("tutorial" if you are following my names and copy the "terrain" folder into the newer folder "tutorial_fixed")
- Now we have the kmap folder with updated minimap, and the terrain folder that we made previously, finally everything is done, now just pack it back
- With HPI Packer do the same thing you did before, this time for the new folder ("tutorial_fixed") (CLICK)

And that's all, final result: (CLICK)

I actually find out how to do this a long time ago, but only now made a tutorial, since no one ever made a guide too.
Although i found this by myself it was actually known way before, but no one ever made a tutorial to document.
And as I said previously, you can override pretty much anything in the game, for example, here I made a map where I changed the mana texture by overriding the "anims" folder: (CLICK)
And the result: (CLICK)
In this map I changed the trebuchet's build pic and the brown aramon logo (look at the top in the score board): (CLICK)
I have also changed the units model before, by giving spyhawk wings to the gold dragon (dont have a pic now)
The possibilities are there, this is clearly not that useful and kinda pointless but kinda interesting regardless! Exclamation

And here's a map I did a long time ago for fun:
(CLICK) and (CLICK)
Back to top Go down
 
How to make maps with custom textures... or anything really
Back to top 
Page 1 of 1
 Similar topics
-
» How to Import Tak Textures Into 3do Builder
» How to Deal with Transparent Textures
» Custom 2v2 tournament
» Custom Campaign: Altered Ghost
» Maps

Permissions in this forum:You cannot reply to topics in this forum
TA: Kingdoms Forums :: GENERAL :: Tutorials :: Maps-
Jump to: