[Guide] How to add new mounts or skins.

Medyak

Member
Guide Author
1603929580194.png
Новый проект.png
1603930369530.png
It's time to show you how to add new mounts or skins.
But before u can smallow my guide, you need to know a few things.
  1. Even if you follow the guide, you have to figure out a lot on your own. I explain with an example of how I did it. If you have any suggestions on how to supplement the guide or correct it, write me a pm.
  2. This guide only applies to mount skins, but most likely applies to the mounts themselves as well, since I have not yet reached the point of adding the mounts themselves (like a wasp or a fox).
  3. You need to understand that for the correct display of the mount skin, we need to trace all the links to which the files point. If there are no files on the link, then use the 1 point described above.
  4. Each xdb file is a spoon or fork, and each bin file is soup or spaghetti. You have to decide what to sip from the plate in a particular case yourself.
  5. There is such a thing as compatibility, that is, taking the xdb file version 7.0 and the bin file version 11.0, there is a possibility that the xdb file for 11.0 has been rewritten. And old xdb loses bin file compatibility.
  6. You need to decide for yourself which files should be indexed and which shouldn't. As well as deciding what to write in xdb, which is absent on the server side, but must be indexed in both the client and the server.
  7. You need to be aware of which files are already in packbin and which ones need to be added or replaced.
  8. Following everything that I have described in these paragraphs, I do not advise anyone who not related to programming or not familiar with server-client architecture to spend their time trying to reinvent the wheel. This is a job for Dungeon Master's only, not slave's.
  9. I want to add to the previous point, before you waste someone else's time asking or spamming on discord, think with your head. And look for the answer in the early posts, maybe you will find it there.
All you need to follow the guide:
  • Text editor (I use notepad ++)
  • Unpacked xdb files 7.0 or 8.0
  • Bin files of new versions of the mounts
  • Workable repacker
  • Server and client (4.0)
  • Indexer (or you can get by with manual work)
  • ZipPacker
  • You must have some experience in sadomasochism

1603933876238.png
Новый проект.png

1603933759143.png
First step
Preparing all files

Let's get started, we need to add a new skin to some kind of mount that already exists in the game.
Let's take the lion 2ndGrade as an example, we need to find the MountResourse files responsible for it. Its location in the game is the same as on the server (I mean the internal path of the pak file).
Location on server = SERVER_AO\game\data\Packs\XDB_Mechanics.Server.pak\Mechanics\Mounts\2ndGrade\Mounts

Here we see 5 different lion mounts, let's take FireLion as an example.
1603935683916.png

If we open this file, we will see such lines:
XML:
<basicSkin href="/Mechanics/Mounts/Skins/Lions/FireLion.(MountSkin).xdb#xpointer(/gameMechanics.constructor.schemes.mount.MountSkin)" />
    <alternativeSkins>
        <Item href="/Mechanics/Mounts/Skins/Lions/BlackLion.(MountSkin).xdb#xpointer(/gameMechanics.constructor.schemes.mount.MountSkin)" />
        <Item href="/Mechanics/Mounts/Skins/Lions/WhiteLion.(MountSkin).xdb#xpointer(/gameMechanics.constructor.schemes.mount.MountSkin)" />
        <Item href="/Mechanics/Mounts/Skins/Lions/WinterLion.(MountSkin).xdb#xpointer(/gameMechanics.constructor.schemes.mount.MountSkin)" />
        <Item href="/Mechanics/Mounts/Skins/Lions/LionItemMall.(MountSkin).xdb#xpointer(/gameMechanics.constructor.schemes.mount.MountSkin)" />
        <Item href="/Mechanics/Mounts/Skins/TkaRika/TkaRikaLion.(MountSkin).xdb#xpointer(/gameMechanics.constructor.schemes.mount.MountSkin)" />
        <Item href="/Mechanics/Mounts/Skins/Demon/DemonLion.(MountSkin).xdb#xpointer(/gameMechanics.constructor.schemes.mount.MountSkin)" />
        <Item href="/Mechanics/Mounts/Skins/Hero/HeroLion.(MountSkin).xdb#xpointer(/gameMechanics.constructor.schemes.mount.MountSkin)" />
        <Item href="/Mechanics/Mounts/Skins/Golden/GoldenLion.(MountSkin).xdb#xpointer(/gameMechanics.constructor.schemes.mount.MountSkin)" />
    </alternativeSkins>

So, "basicScin" is responsible for the basic skin of the mount, which is issued after activating the item of the mount. And "alternativeSkins" are responsible for the skins we can get on our mount.
It is in "alternativeSkins" that we need to add our new skin.
Because in xdb files mountresource most often refers to SkinListResourse which doesn't work on version 4.0 (at least for me). We will have to find it in the folder with new xdb from version 7.0 or 8.0.
1603936795460.png

Opening it and comparing it with the original, we will find the skins we need.
XML:
<skins>
        <Item href="/Mechanics/Mounts/Skins/Lions/BlackLion.(MountSkin).xdb#xpointer(/gameMechanics.constructor.schemes.mount.MountSkin)"/>
        <Item href="/Mechanics/Mounts/Skins/Lions/FireLion.(MountSkin).xdb#xpointer(/gameMechanics.constructor.schemes.mount.MountSkin)"/>
        <Item href="/Mechanics/Mounts/Skins/Lions/WhiteLion.(MountSkin).xdb#xpointer(/gameMechanics.constructor.schemes.mount.MountSkin)"/>
        <Item href="/Mechanics/Mounts/Skins/Lions/WinterLion.(MountSkin).xdb#xpointer(/gameMechanics.constructor.schemes.mount.MountSkin)"/>
        <Item href="/Mechanics/Mounts/Skins/Lions/LionItemMall.(MountSkin).xdb#xpointer(/gameMechanics.constructor.schemes.mount.MountSkin)"/>
        <Item href="/Mechanics/Mounts/Skins/TkaRika/TkaRikaLion.(MountSkin).xdb#xpointer(/gameMechanics.constructor.schemes.mount.MountSkin)"/>
        <Item href="/Mechanics/Mounts/Skins/Demon/DemonLion.(MountSkin).xdb#xpointer(/gameMechanics.constructor.schemes.mount.MountSkin)"/>
        <Item href="/Mechanics/Mounts/Skins/Hero/HeroLion.(MountSkin).xdb#xpointer(/gameMechanics.constructor.schemes.mount.MountSkin)"/>
        <Item href="/Mechanics/Mounts/Skins/Golden/GoldenLion.(MountSkin).xdb#xpointer(/gameMechanics.constructor.schemes.mount.MountSkin)"/>
        <Item href="/Mechanics/Mounts/Skins/Lions/AnniversaryLion.(MountSkin).xdb#xpointer(/gameMechanics.constructor.schemes.mount.MountSkin)"/>
        <Item href="/Mechanics/Mounts/Skins/Lions/LionDead.(MountSkin).xdb#xpointer(/gameMechanics.constructor.schemes.mount.MountSkin)"/>
</skins>

The last two lines are exactly what we need. We add them to the server and client parts of MounResource and in the end we get something like this.
XML:
<alternativeSkins>
        <Item href="/Mechanics/Mounts/Skins/Lions/BlackLion.(MountSkin).xdb#xpointer(/gameMechanics.constructor.schemes.mount.MountSkin)" />
        <Item href="/Mechanics/Mounts/Skins/Lions/WhiteLion.(MountSkin).xdb#xpointer(/gameMechanics.constructor.schemes.mount.MountSkin)" />
        <Item href="/Mechanics/Mounts/Skins/Lions/WinterLion.(MountSkin).xdb#xpointer(/gameMechanics.constructor.schemes.mount.MountSkin)" />
        <Item href="/Mechanics/Mounts/Skins/Lions/LionItemMall.(MountSkin).xdb#xpointer(/gameMechanics.constructor.schemes.mount.MountSkin)" />
        <Item href="/Mechanics/Mounts/Skins/TkaRika/TkaRikaLion.(MountSkin).xdb#xpointer(/gameMechanics.constructor.schemes.mount.MountSkin)" />
        <Item href="/Mechanics/Mounts/Skins/Demon/DemonLion.(MountSkin).xdb#xpointer(/gameMechanics.constructor.schemes.mount.MountSkin)" />
        <Item href="/Mechanics/Mounts/Skins/Hero/HeroLion.(MountSkin).xdb#xpointer(/gameMechanics.constructor.schemes.mount.MountSkin)" />
        <Item href="/Mechanics/Mounts/Skins/Golden/GoldenLion.(MountSkin).xdb#xpointer(/gameMechanics.constructor.schemes.mount.MountSkin)" />
        <Item href="/Mechanics/Mounts/Skins/Lions/AnniversaryLion.(MountSkin).xdb#xpointer(/gameMechanics.constructor.schemes.mount.MountSkin)" />
        <Item href="/Mechanics/Mounts/Skins/Lions/LionDead.(MountSkin).xdb#xpointer(/gameMechanics.constructor.schemes.mount.MountSkin)" />
</alternativeSkins>


*continue in the next post as there is a limitation on images*








 
Last edited:
OP
Medyak

Medyak

Member
Guide Author
Following the links, you need to add the files themselves responsible for the skins, which are located in the skins directory.
1603938988158.png

As you can see, in addition to the skin files themselves, there are also txt files, but I will not mention them in this guide.

If we open MountSkin, we will see that further we refer to the files located in the Client directory. But earlier we will need to duplicate these files on the server in the same folder, along the same path.
If you don't know how to duplicate files, open the same file on the server and try to compare the files that are already in the client and on the server and create your own according to the pattern.
BTW, the MountResource file is created on the server in the same way. And all other missing files will be created the same.

Links to our files in MountSkin
XML:
<image href="/Interface/Icons/Mounts/JubileeMountLion.(UISingleTexture).xdb#xpointer(/client.Widgets.UISingleTexture)" />
<visualMount href="/Client/VisualMounts/Horses/ElfJubilee.(VisualMount).xdb#xpointer(/client.VisualConstructor.VisualMount)" />

(VisualMount) .xdb file can not be duplicated since I did not notice the difference. Let's write it only to the client. If you know the difference write me a pm.

Next, add our folder with VisualMount to the repacker.
1603940199398.png

Then everything is according to the old scheme, open the file, see where it refers to, add this folder to repacker.
XML:
<visualMountClass href="/Client/VisualMountClasses/Horse.(VisualMountClass).xdb#xpointer(/client.VisualConstructor.VisualMountClass)"/>
<mount href="/Creatures/MountElf/MountElfJubilee.(VisualMob).xdb#xpointer(/client.VisualConstructor.VisualMob)"/>

Because we are adding a skin to an already existing mount, we do not need to add a file from the first line, we are only interested in the second line.
Add the entire folder with a specific mount from Creatures, even if you add only one skin, in order to avoid problems. Since one file can be linked to another, and I have no idea how this works in the repaсker.

We will get such a folder in the repacker.
1603940690830.png

Following everything that I described above, on the server we will get something like this folder.
1603940818291.png

*continue in the next post*
 
OP
Medyak

Medyak

Member
Guide Author
1603941417525.png
Second step
Indexing all files

Remember, everything that is indexed in the client is also indexed on the server. If you don't know what to index, find a similar file. And type it into search in a text editor by opening the index.srv file in the systems folder. Index.srv on the client = index.srv on the server.

Let's list which files I indexed
  • /Mechanics/Mounts/Skins/Lions/AnniversaryLion.(MountSkin).xdb
  • /Mechanics/Mounts/Skins/Lions/AnniversaryLion.(UnlockResource).xdb
  • /Mechanics/Mounts/Skins/Lions/LionDead.(MountSkin).xdb
  • /Mechanics/Mounts/Skins/Lions/LionDead.(UnlockResource).xdb
  • /Creatures/MountElf/MountElfJubilee.(VisCharacterTemplate).xdb
  • /Creatures/MountElf/MountElfNecro.(VisCharacterTemplate).xdb
Since in the future we will replace the MountResource files, it is necessary to copy the id from the server file to the client.

The indexed file looks something like this.
1603941931445.png

It can be indexed by hand, or using Indexer. It does not work correctly for me, so I do everything by hand.
Indexes must have a unique value, i.e. not have the same index value

My index.srv looks like this. It is important that the index in the file matches the real index.
1603942250397.png

*continue in the next post*
 
OP
Medyak

Medyak

Member
Guide Author
1603942723047.png
The third step
Prepare to repack

Since we are adding skins to the existing mount, we need to replace the existing ones in packbin xdb mountresource with our files.

Add this line to replacer.txt in the repacker folder:
Mechanics/Mounts/2ndGrade/Mounts/FireLion.(MountResource).xdb

Next, we need to add bin files to the data/packs of our repacker that our new xdb.
We can do this in several ways:
  1. Run the repaker, and in error.txt it will show us what files are missing, after which we will add them.
  2. Add entire folder creatures, mechanics, etc. from newer version's. Or in parts.
  3. Try to mix some files from other client's.
Personally, I use the first method. Because if you throw everything indiscriminately, you can either run into an error when packing, or you will break the whole game.
And so, having found all the files from error.txt, we create a folder anywhere with the path that we need, then using ZipPacker we create our .Pak.

The pack with the creature should look like this, even if you add only 1 file by error.txt. This only applies to Creatures.
1603943781065.png

Having created your .pak, you can drop it into the data/packs/ repacker.


1603944078498.png
Step four
Repack and run
  1. Run aogame with the -buildBinaries -1 parameter or BuildBinaries.bat. and wait for the repaker to finish
  2. Start the server and the client, enter the game and write in console create_item ID the mount to which you added the new skin. You can find out his ID in the IMMaster program, or on the server in itemresource.
  3. In the game console, write down the unlock ID of the unlock skin mount.
  4. Call your mount, choose the desired skin, and here it is a success.
1603944780267.png
Not quite that mount, maybe in time I will start the server and make a screen, but for now let it remain so.

1603945070507.png
Новый проект.png

@From the Dungeon Master with love.​
 

Adrish

Administrator
Staff member
Admin
Content Creator
Anyone will be happy to read what you wrote. Congratulations Medyak Medyak ,See you soon for further updates (y).
Сорок два Сорок два you will have to see if all those who have the status « guide author » can break the limit of characters and images in the same post thx.

Сорок два Сорок два's edit : After a quick look into admin panel, it doesn't seems that we are able to increase image limit depending a role. So I just updated the image limit from 10 to 25 (this guide using 19 images)
 
Last edited by a moderator:

Paulus

Administrator
Staff member
Admin
Content Creator
Guide Author
Nice guide ! Very good job !
For adding new mounts I will be kind of the same process but you'll need to be carefull about adding character animation on the mount.
 

timon49

Active member
Спасибо за работу!
Вот только непонятно:
1) Где следует хранить оригинальные файлы клиента 4.0 (чтобы репакер их изменил упаковке)
2) Где следует хранить файлы клиента 7-8v и как их распаковать(чтобы была папка Bin)?
3) Можно ли использовать уже модифицированный клиент 4.0?
4)Ссылку на BATники Репакера или сам рабочий репакер пожалуйста скиньте...
 

Top Bottom