https://www.youtube.com/watch?v=6_IOCF5e_Xc
Write a little Editor to add unvisible objects (imposters) which cast shadows to the most important bones - save those settings (Arrays) via script to a file named Shadow.txt inside the folder where the model is located.
Load the shadow.txt files at start of the game inside the if iInitializing() block and initialize the shadows (imposters - find bone position, set position, rotation, scale) for each skinmesh.
That's all.
Unfortunately you have to edit the shadows of every model by hand - add, turn and scale until it fits to the model.
It works best, if the models are not frame scaled, but vertices and bone positions represent the positions in meters already. If scaling is done on the fly while the animation runs (visible inside the .x-file animation keys), the chances are high, that not all shadows are displayed at the right positions on the ground.
As higher the angle of the sun as better the effect.
Don't forget to add the shadow files to the compiled program inside the right folders after compilation. The compiler does not know about them. You must do that yourself. Or if you are a programmer you can write a tool which checks if there are Shadow.txt files inside your original Folders and copies them to the compiled program if the skinmesh is inside your compiled program.