[GUIDE] Implementing new custom mounts (transformations)

Blitzkrieg

Знающий
Участник
Сообщения
57
Розыгрыши
0
Решения
2
Репутация
38
Реакции
79
Баллы
403
This guide is about implementing new mounts via transformations. The example that follows is based on GF client.


Assuming you succesfully created your custom ukx, it's time to edit dat files.


Transformdata.dat follows this format:

id; gender; npc id; weapon id; entrance effect; exit effect; unk1; unk2; unk3; unk4

An important value is unk1. If set to 0, only the npc will appear (for example anakim transformation). If set to 2, the character will also appear and will try to mount the npc.


For transformations that have the value set to 2, you need to also edit ridedata.dat.

This file follows the format of: ride_type; npc id (in hex form); bone; bunch of data ;

Bunch of data includes 3 float numbers for translation and 3 for rotation for each character (MFighter, Ffighter, Mmagic, Fmagic, etc), based on the coordinate system of the bone that was specified before.

bone-name.jpg


The last numbers of Bunch of data refer to the name offset of the rider.


Ride_type is important also because it affects the animation of the rider.

If set to 1, strider_MFighter animation will be used.

If set to 2, wyvern_MFighter animation will be used.

If set to 3, pet_MFighter animation will be used.

ride-type.png


Needless to say, custom npc has to be added to npcgrp, as well as create its own class (if needed) and its own animations file (for example lineagemonster.int).



Some notes:

1) Npc class is responsible for the proper simulation of the cloak, so that it does not get inside the mount. My assumption is that it creates collision spheres or cylinders by referencing bone indices, but haven't delved into it any deeper.

2) By the same instructions you can create a flying transformation. However I haven't found a solution to make the character appear as well. If unk1 is set to 2, the whole navigation system and skillbar that should appear with flying transformation are getting messed up. However if unk is set to 0 everything becomes functional.

3) Make sure you implement everyting correctly on the server side as well. Don't forget that there is limitation about flying around gracia continent only.

 

Update about cloak collision:

Class script
SimulationCollisionObjects.length = 2;
SimulationCollisionObjects [0] = new class'SimulationCylinderCollision ';
SimulationCylinderCollision (SimulationCollisionObjects [0]) .BoneIndexA = 5;
SimulationCylinderCollision (SimulationCollisionObjects [0]) .BoneIndexB = 6;
SimulationCylinderCollision (SimulationCollisionObjects [0]). Radius = 35;
SimulationCylinderCollision (SimulationCollisionObjects [0]) .SphereA = true;
SimulationCylinderCollision (SimulationCollisionObjects [0]) .SphereB = false;

SimulationCollisionObjects [1] = new class'SimulationCylinderCollision ';
SimulationCylinderCollision (SimulationCollisionObjects [1]) .BoneIndexA = 5;
SimulationCylinderCollision (SimulationCollisionObjects [1]) .BoneIndexB = 4;
SimulationCylinderCollision (SimulationCollisionObjects [1]). Radius = 28;
SimulationCylinderCollision (SimulationCollisionObjects [1]) .SphereA = false;
SimulationCylinderCollision (SimulationCollisionObjects [1]) .SphereB = false;



Result
collision.png
 
Назад
Сверху Снизу