Thanks to dexyfex amazing work we are finally able to edit .ycd 
Here i will explain how to create custom animated objects (for now two types of animation - vertical and horizontal rotation). In time i will update this section with new types of animations.
ANIMATED OBJECTS
1.Preparation of custom object that will be animated.
2.Set up metafiles (ycd and ytyp)
3.Adding extension to animated part of object.
4.Combine animations
ANIMATED TEXTURES
1. Simple scrolling texture animation

1. Preparation of custom object

(skeleton creation)

First you need to split your object into two parts.
One part will be static, second one will be animated. Its important, otherway whole object will be rotate.
For example i will use windmill, separate two parts - main building that will be static and fan that will be rotated.
As second step create model:
Next step - create bone TWO times (two bones):
It will looks like this:
Now next step is important - its hierarchy and start of skeleton creation.
You need to drag (move) bone1 under model and bone2 move under bone1
It will looks like this:
Now select model and check checkbox Include bones
Now select bone1 and check checkboxes x,y,z for Rotation and Movement.
Now select second bone (this will be animation bone) and check checkboxes x,y,z for Rotation and Movement.
!And important thing!
Set ID to 1 and Mirror bone id to 1



First bone under model is root bone and its always id.0 other bones under bone id.0 are animated ones that have ids from 1to upper. (dont give same ids to different bones!)

So in this example we have static root bone id.0 and animated bone id.1
From now i will refer to bone ids.
Now create collision
It will be collision for main building so it will be static then drag it under root bone (bone id.0 - first under model) It will be looks like this:
Now select bone id.1 and move it to place of mesh that will be animated.
(this bone will be centre of rotation so where you place that bone will affect how mesh will be rotated)
Now using allign set pivot of mesh that will be animated to pivot of bone id.1
Now move mesh that will be animated under bone id.1 and mesh that will be static under bone id.0
Create collision mesh and set flags for it (check here if you dont remember which flags) then move it under composite parent:
Now select all static parts (model, static mesh, collision with its parent and root bone id.0) and set them pivots to 0,0,0
Now renaming files - im naming like this - model name = (bone id.0, collision parent) Bone id1 different name
(this is like i use - doesnt mean you MUST the same way but like i saw on vanilla files root bone id.0 got same name like model)
As optional you can add lights to your model. (if you place them under bone id.0 then light will be static but if you place it under bone id.1 light will be attatched to animated mesh and will be rotated with it)

BACK TO TOP

------------------------------------------------------------------------------------------------------------------------------------------------------------

2. Metafiles set up

(xml version of ycd and ytyp)

You can choose two files for now (i will update more later in free time)
One for vertical rotation:
Copy values from pastebin into notepad remove all comments and save file in xml format with name as you choose (this will be name of ycd) and save in format name.ycd.xml
Now select name use ctr+h and change to name of your ydr (created before)
Now scroll down to:
<Item>
  <Channels>
    <Item>
       <Type value="StaticVector3" />
       <Value x="0" y="0" z="0" />
     </Item>
   </Channels>
</Item>
This is coords of root bone id.0 - its always at 0,0,0

Go to next one:
<Item>
  <Channels>
     <Item>
        <Type value="StaticVector3" />
        <Value x="-0.165" y="-1.66" z="12.733" />
      </Item>
   </Channels>
</Item>
This is refer to bone id.1 (logical next one shoulde be for bone id2, next for bone id.3 ect but in this file are only bone id0 and id1)
You need to change this values - it must be exact like position of your bone id1 in max:
Now you can adjust speed by change two values - Duration and EndTime (both shoulld be same value - if StartTime is 0)
Higher value is slower rotation, lower value is faster rotation.
When you make all changes save file and import it into rpf where your ydr is located.
Now open ytyp and change flag for your ydr file to:
<flags value="537395712"/>
and add clip dictionary (name of your created ycd):
<clipDictionary>ycd_name_here</clipDictionary>

BACK TO TOP

------------------------------------------------------------------------------------------------------------------------------------------------------------

3. Extensions

(in animated part of mesh)

Explanation how works with extensions:
If you want to add extension to static part of object do as on video, but if you want add (attatch) extension to animated part of object you need two things different then on video.

1. Coords are different - offset is not from 0,0,0 but from centre of animated bone (bone id.1 in this example).
So in max first select bone id.1 then move it to 0,0,0 and then select mesh in vertex selection take coords or vertex:
2. Second thing is add animated bone id into boneTag in extension:
<boneTag value="1"/>


And result:

BACK TO TOP

------------------------------------------------------------------------------------------------------------------------------------------------------------

3. Combine of animations

(different animations in one object)

this i will update later

Simple scrolling texture animation


Heres template for dictionary >LINK<
Copy it to notepad, select ydr_name ctr+h and rename it to your custom ydr for example tv_screen
Now you need find hash for your ydr name
Put that hash into calculator:
Now change to DEC and add 1 (+1) into this value:
Received result is 2517C183 place it into notepad:
Save file and import xml into CodeWalker by RPF Explorer.


Explanation:
Adding number to hash name of ydr defines which material will be animated.
+1 to hash means id1 material will be animated
+2 to hash means id2 material will be animated
+3 to hash means id3 material will be animated
and so on
With this way you can define many texture animations in one file for separate materials.

BACK TO TOP

------------------------------------------------------------------------------------------------------------------------------------------------------------