You must be logged in to post messages.
Please login or register

The University

Hop to:    
loginhomeregisterhelprules
Bottom
Topic Subject: A beginners' guide to adding graphics to the game (Approved, Addition Pending)
posted 10-18-15 04:29 PM CT (US)   
Let's imagine you are lurking in the Blacksmith, and you stumble upon this badass knight. You find it so cool you desperately want to have it, you press the download button and... you get files you have no idea what to do with. It's sad isn't it ? Well get ready for I am here to explain you how to add these graphics and all the graphics you will ever want to your game.



Add graphics to the game


Contents-
Section 1 – Preparation
Section 2 – Adding SLP to DRS
Section 3 – Editing the data


Section 1 – Preparation

Now I will assume you have read Sarn's beautiful guide on creating new units so you are a bit familiar with Advanced Genie Editor (AGE).

You will need:
AGE3 (Available here)
Turtle Pack (Available here)

Now we're going to familiarize withe type of files we will encounter :
-SLP files : they contain graphics of a certain animation (attacking, standing, walking, dying, decaying) for a unit.
-DRS files : they are files that contain all the SLPs of the game
-Data files : pretty self explanatory, they contain all the units stats and game data.

First of all things, BACKUP YOUR FILES ! I can't stress enough how important this is, if you follow the steps carefully nothing should go wrong but you don't wanna take any risks. The files you want to backup are found in a different folder depending on your game version :

- AoC : Age of Empires 2\DATA
gamedata_x1_p1
empires2_x1_p1

- AoFE (mod) : Age of Empires 2\Games\Forgotten Empires\Data
gamedata_x1_p1
empires2_x1_p1

- AoK:HD : Steam\steamapps\common\Age2HD\resources\_common
empires2_x1_p1 in the dat folder
gamedata_x1 in the drs folder

- AoF/AoAK : Steam\steamapps\common\Age2HD\resources\_common
empires2_x2_p1 in the dat folder
gamedata_x2 in the drs folder




Section 2 – Adding SLP to DRS

Ok so you have downloaded the Indian knight, what to do with the files you have ?

Note : AoK:HD doesn't use DRS files, you have to directly put the slps in the gamedata_x1 or gamedata_x2 folder and renaming your slp the last number there is +1

Open your gamedata_x1_p1 file using Turtle Pack, and click on the little green cross to add a file, and select the five SLP you have downloaded ("attack" "decay" "die" "stand" "walk"). In the window that pops up choose "slp".



You should get something like this :



Now you can just save (but don't quit Turtle Pack, you will still need it.


Section 3 – Editing the data

You're not done yet, if you launch the game now you will see that nothing has changed. There are still a few things to do.

Now open AGE3, you'll have a large window and a smaller pop-up window in front of it. In order for AGE to edit your data files, it needs to know where they are. At the top of the window, you'll see a number of buttons. If you installed your copy of AoK in the default location (C:\Program Files\Microsoft Games\Age of Empires II), then you just need to click the “TC Defaults” button. If you installed it somewhere else, you'll need to change the path in the boxes to go to your alternate installation location. Once you've finished this, just click "Ok".

When I'm editing the data, my motto is : never create from scratch, always copy something that already exists and modify it so you have what you wanted. In this case, we want a knight type of unit, so we are going to look at the knight unit, use its graphics as a template to add ours.

Go in the Unit tab and in the search box, type "knight", and select knight in the list below. It is the knight unit from the game, and we want to take a look at his graphics : you will notice that his graphics are all called "KNGHT_..."



Now go to the Graphics tab, and in the search box type "knght". On the list below select the graphics called "KNGHT_AN", "KNGHT_DN", "KNGHT_FN", "KNGHT_SN" and "KNGHT_WN" and press the copy button.



Now delete what you have in the search box and click on the add button five times. You will see that you have created five graphics called "New Graphic". Select them and click on "paste".



You will see this :



Now you will want to rename your graphics for the sake of clarity :
Just select the one called "KNGHT_AN" and in the box at the top called "Name", replace the "KNGHT" part by whatever you want, let's say "INDIAN". Do it for all the five graphics.

Now you don't want these graphics to be the exact replica of the knight's right ? In the box called "SLP" of your "INDIAN_AN" graphic, replace the number it's there by the number the number of the attack graphic of the indian knight in the DRS. If you have done it right, the second box of AGE should now display the attck graphic of the indian knight.



There is one thing you must check : the frame number. One SLP contain the frames for one action (attack, stand, walk, die, decay) for five rotations : South, South-West, West, North-West, and North for units (ships have more rotations). You want to make sure that the number frame per angle in AGE is correct. In Turtle Pack, there is a little number under the graphics preview, 50 in this case. It is the total number of frame of the SLP. As it has 5 rotations, it makes 10 frames per rotation : it matches what's in the box in AGE so we are good to go. If it was'nt the case then you would juste have to put the correct number of frames per angle in the box.



Now just do the same for the other graphics.

We're almost done, go back to the unit tab, create a new unit copying the knight (don't forget its dead unit, ID 111 FYI).

Make sure you have the "including graphics" box checked ! (you'll notice that I forgot to check it when I took those screenshots so I had to start again )

Change its name to Indian knight, and change its standing graphics to the one you have created : INDIAN_FN (the second window should now display the indian knight standing graphics).



Same goes for the others graphics, including the standing graphics of the dead unit you have copied that should be changed to "INDIAN_SN".
In your Indian knight unit, scroll down until you find a box called "dead unit", it should display "111", change it to your newly created dead unit.

You can now change your new unit's stats as you desire, save and launch the game when you are ready. You will see that you can place your unit in the scenario editor, with its badass graphics !



Now you can head over Felix's article to make your unit trainable !

Fluctuat nec mergitur.

[This message has been edited by TriRem (edited 08-09-2016 @ 11:41 AM).]

Replies:
posted 10-18-15 04:31 PM CT (US)     1 / 22  
Please correct me if you find any mispell/grammatical error as they are likely to happen when I write more than two sentences in English

Fluctuat nec mergitur.
posted 10-18-15 04:52 PM CT (US)     2 / 22  
Nice article! Sorely needed, too.

One minor point, you don't need to hit add five times. If you paste multiple items to a single slot, it will automatically add more (or overwrite the ones below the first).

AoK: Realms
Adds Armenians, Balts, Bamars, Bohemians, Bulgars, Burgundians, Chimus, Dutch, Helvetians, Jurchens, Khmers, Malays, Mandinkas, Moors, Muisca, Tamils, Tufans, Turcomans, and Viets

Proteus and Genie Converter - AKX installers for modern times
posted 10-18-15 05:05 PM CT (US)     3 / 22  
Yeah it's the article I wish I could have read a few years ago when I first started modding, it would have saved me a few weeks of experimentations xD
I am planning to make a few more of these, just so we can cover all the basics aspects of modding that would be helpful.

It used to work like that with older versions of AGE, but in the new ones the number of items you paste must be the same as the number of slots, otherwise you get an error message.

You know what ? I just noticed there is a new paste tool that enable/disables sequential paste.

Fluctuat nec mergitur.

[This message has been edited by TriRem (edited 10-18-2015 @ 05:09 PM).]

posted 10-19-15 02:01 PM CT (US)     4 / 22  
Very nice and well-explained! Great work

~ Forgotten Empires ~

Storm on the Steppe | Galderton Hill RP | Proud member of Stormwind Studios

"Deyr fé, deyja frændr, deyr sjálfr it sama; ek veit einn at aldri deyr, dómr um dauðan hvern." - Hávamál 77.
posted 10-21-15 02:09 AM CT (US)     5 / 22  
I guess AoAK will get the subfolder like this:

Steam\steamapps\common\Age2HD\resources-dlc2\_common\dat\
Steam\steamapps\common\Age2HD\resources-dlc2\_common\drs

but beside that, good guide ! In the Steam forum Workshop section i also saw many times that people asked for a guide like that, maybe you want to link it also there
posted 10-21-15 04:23 AM CT (US)     6 / 22  
For AoAK you're maybe right but not sure, I asked Cysion a few time ago about the new data file structure and he said it would be a unified data file, with the exe enabling/disabling features depending of which dlc you own. But maybe things have changed, if someone from the AoF team could confirm it.

Fluctuat nec mergitur.
posted 10-21-15 05:20 AM CT (US)     7 / 22  
Indeed, a unified data file and only a single directory with all resources. So no resources-dlc2.
posted 10-21-15 06:46 AM CT (US)     8 / 22  
ok sorry, i just saw the lines in the advanced genie editor 3 because im sure you guys also work with that tool.
Or did microsoft handle out the original tools that the ensemble guys work with ?
posted 10-22-15 06:51 PM CT (US)     9 / 22  
This is a very high-quality article. I will try to add it to the university in due course.

Member of BlackForest Studios
Co-creator of Silent Evil (4.6) Voted Best Multiplayer Scenario of 2009 (Most Fave'd Multiplayer Scenario)
and The Seas of Egressa (4.8) Voted Best Multiplayer Scenario of 2010
"Popey just hates everywhere." - Chocolate Jesus, on my fear of Romanian organ-traffickers
"Hooray for Dear Leader-Comrade-Generalissimo-Presidente-Lord Protector Popey!" - Lord Sipia, on my benevolent, iron-fisted rule
"You're not Popeychops; you don't get to physics." - Moff, in response to a clumsy muon simile
posted 07-31-16 07:31 AM CT (US)     10 / 22  
Hi TriRem,

Thanks for this indepth article. I have one question about editing graphics with Turtle Pack: When I add/replace a frame with new graphics, often times there is an "outline" of the background color around the graphics. For example: I want to add a new house graphics, and the house bitmap file had a purple background. When I add it in Turtle Pack the purple background is removed, however an outline of it remains on some parts outside the house. Do you know how to resolve it?
posted 07-31-16 10:25 AM CT (US)     11 / 22  
It happened for me when i resized a picture on the programm "Irfanview", it creates a new purple color diferent from the original one, so turtlepack recognize one, remove it and the other surrouding the unit remains.
In this same program if i disable the option "Use resample funtion" the problem is over.
I'm not sure if you're using the same programm, but the problem seem the same.

Edit: Aditionally you can use "Irfanview" and maybe other programms to remove all purple colors of some image, it may do the trick for you too.

Good luck.

[This message has been edited by marotinho (edited 07-31-2016 @ 10:27 AM).]

posted 08-01-16 05:12 PM CT (US)     12 / 22  
@marotinho: I use photoshop to edit and to convert the final image file to AOE2 color palette. But thanks for letting me know, I will check out the software you mentioned.
posted 09-17-16 00:32 AM CT (US)     13 / 22  
Hi...Nice tutorial.. Pls can you exlplain the dead unit in detail as I am not able to understand and my inserted character is not being shown in the game although the name is there.
posted 09-17-16 00:46 AM CT (US)     14 / 22  
When a unit is killed, its dying graphics are shown. When the dying graphics are completed (about 2 seconds), an unselectable dead unit is placed on the map that shows the decaying graphics for that unit for about one minute. Once the unit has finished decaying, the dead unit is removed from the map.

Is the name of the character in the unit list in the scenario editor? It's just invisible when you try to place it? If so, my first guess is that you might not have set the graphics properly in AGE, but it's hard to know the reason without more info.

~`o´~|\  Join the fresh and exciting AI Ladder for its fourth season!
´ `  |_\
       |    Learn the joy of AI scripting in my guide: The World of AI Scripting
______|______
 \        /
   .....Hinga Dinga Durgen! - SpongeBob
  `-=<.__.>=-´
posted 10-06-16 12:19 PM CT (US)     15 / 22  
AoK:HD doesn't use DRS files, you have to directly put the slps in the gamedata_x1 or gamedata_x2 folder and renaming your slp the last number there is +1

what do you mean by this? i dont think i have a gamedata_x1 or gamedata:x2 folder. I only have gamedata.drs, gamedata_x1.drs and gamedata_x1_d2.drs inside data folder.

(Whenever i try to change the slp graphic in AGE3 to the indianknight.flp(5221) the animation dissapears) the animation works in DRS editor)

Thanks
posted 10-06-16 07:31 PM CT (US)     16 / 22  
Look inside the drs folder instead of the data folder. I believe if you navigate to the drs folder (C:\Program Files (x86)\Steam\SteamApps\common\Age2HD\resources\_common\drs), you should be able to find the folders you're looking for.

~`o´~|\  Join the fresh and exciting AI Ladder for its fourth season!
´ `  |_\
       |    Learn the joy of AI scripting in my guide: The World of AI Scripting
______|______
 \        /
   .....Hinga Dinga Durgen! - SpongeBob
  `-=<.__.>=-´
posted 10-07-16 04:03 AM CT (US)     17 / 22  
Where do i find my newly added unit/building in the scenario editor? player 1, gaya, faction? it doesent seem to appear in the building list.

Troubleling chaning the name, when i have copied the building to new unit, maybe thats why.

Other than that good tut

[This message has been edited by benneykid2 (edited 10-09-2016 @ 04:38 AM).]

posted 10-12-16 02:09 PM CT (US)     18 / 22  
Have you checked to see if Hide in Editor is unchecked?

~`o´~|\  Join the fresh and exciting AI Ladder for its fourth season!
´ `  |_\
       |    Learn the joy of AI scripting in my guide: The World of AI Scripting
______|______
 \        /
   .....Hinga Dinga Durgen! - SpongeBob
  `-=<.__.>=-´
posted 10-12-16 08:05 PM CT (US)     19 / 22  
By default the game uses the language file name which is in the .dll, so ingame your unit will still be called "castle". To have the game use the internal name you have to set the language file name box to 0. This should do the trick.

Fluctuat nec mergitur.
posted 11-01-16 03:34 AM CT (US)     20 / 22  
I have successfully edited the knight so it looks like Indian knight but when trying to add a graphic to my own unit I have created it doesn't work. The graphic is showing up on the SLP viewer on the small window but when in game it looks like a throwing axeman(the unit it edited from)
posted 06-19-19 04:53 PM CT (US)     21 / 22  
Hi everyone i need help i would like to add more units (not change) in the game like Teutonic Knight mod With the Ritterbruder and the Halbbruder you can see the mod here: http://aok.heavengames.com/blacksmith/showfile.php?fileid=10267&ci=fc41ec077b89654537aef7cebcd63af5YToxOntpOjA7YToyOntpOjA7czoxNDoiU2VhcmNoIFJlc3VsdHMiO2k6MTtzOjQ2OiJsaXN0ZXIucGhwP3N0YXJ0PTAmYW1wO3NlYXJjaD1UZXV0b25pYyBLbmlnaHRzIjt9fQ==

AoK:HD
I use AOE2 HD with his two betas african and raja my destination files of dat and drs is C:\Program Files\Steam\steamapps\common\Age2HD\resources\_common

and i like more clear explanation like when you said "AoK:HD doesn't use DRS files, you have to directly put the slps in the gamedata_x1 or gamedata_x2 folder and renaming your slp the last number there is +1????????"

or

"Open your gamedata_x1_p1 file using Turtle Pack, and click on the little green cross to add a file, and select the five SLP you have downloaded ("attack" "decay" "die" "stand" "walk"). In the window that pops up choose "slp"."
because i need more details and if you can make a video please think you

[This message has been edited by TheRavenWolf (edited 06-19-2019 @ 04:55 PM).]

posted 03-26-21 07:04 AM CT (US)     22 / 22  
can someone help me about this?
how to import custom icon for the unit?
and if its first needed to be converted to slp from blp idon't know how because it says max 256 color and when i convert in 256 after importing the image is to chaotic.


i solved it i used (slx editor) to import bmp without need to be 256 color

[This message has been edited by Kerubin (edited 03-28-2021 @ 05:08 AM).]

Age of Kings Heaven » Forums » The University » A beginners' guide to adding graphics to the game (Approved, Addition Pending)
Top
You must be logged in to post messages.
Please login or register
Hop to:    
Age of Kings Heaven | HeavenGames