Some folk can’t find a tutorial/workflow for how to convert 2d sprite to AOE2, so I make this tutorial, hope it can help some in need.
Tools need:
SLX STUDIO: SLX Studio - A new SLP and DRS mod tool. - Age of Kings Heaven Forums
SMX WORKSHOP: Age of Kings Heaven - The Blacksmith :: SMX Workshop Beta 1.9.1
I’m gonna use a sprite sheet extracted from CIV3 for this tutorial:
Let’s say we wanna convert this: “running animation unit’s sprite” in to smx file.
Firstly, you will need to cut the sheet in to frames. You can do this by using slx studio’s tool > sprite sheet spliter or any program that you find suitable for you.
Focus on width, height and row/column. For me, I take the size of the whole sheet and divide them for number of frames in column/row.
exp: the sheet is 1777x1185, and the unit has 8 angle, 16 frames per angle.
so 1777/16 = 111px and 1185/8 = 148px
Click save as, choose folder for it to be saved, and you got a result like this:
If zoom in, the result still has some black line pad at the top and left like this:
So I use a bulk image editor to cut them out, For me I use a program called: “imBatch” to crop out those pad.
If your images don’t have those, skip that step.
Now we use SLX studio to turn the frames that we cut into smx file.
Open SLX studio, Drag the .slx text file that create by Sprite sheet spliter in to the program.
(Or you can drag the images in)
Don’t forget to adjust the anchor: select all the Image, select View > selection ring,
Now, we will create a data graphic. Click on Tool tab, select generate data graphic.
Here’re my setting, you could check out this tutorial https://www.youtube.com/watch?v=Imcnovcj1Xs&t=833s&ab_channel=Tevious to understand more what we need to do.
Click apply to all, then save, export to smx.
note: you don’t need to worry about the size, angle of the smx file, we will edit them in the final step using SMX work.
Open SMX work, drag the smx file that you’ve just exported into the program.
click at the image to play, you will see that his angle is moving counter clockwise and the frist angle is facing at 8 o’clock, which is wrong for AOE2 standard, We will fix that.
Click on tools > adjust angle sequence. you’ll see something like this:
*NOTE: if your unit only have 5 angle, before this step, you need to go to TOOL > Complete mirror image. to make them has atleast 8 angle.
I will explain what these 2 clocks mean:
The right clock is the accurate of how AOE2 will read, so don’t touch them.
The left clock is the current angle the unit is facing and the way it’s turning, we need to turn the left clock into the current angle and turning face of our unit: which something like this:
left click on the point out side to select the angle, RIGHT click on the INNER CIRCLE to switch the turning face. click OK, now check your unit if they’re turning at the right angle, and save the file.
*Depend on your unit, you must adjust the left clock to be accurate.
To here, your smx file is complete, if your unit appear small or big in the game, adjust their size by using this method: In SMX workshop: select all the frame, EDIT > SCALE.
Have fun modding.