Post tutorial Report RSS Milkshape tutorial

This tutorials explains you, how to handle Max Payne files with MilkShape 3D or better.

Posted by on - Intermediate Players Modelling

Tutorial written by Mete Ciragan, chUmbaLum sOft

Mirrored here for archival purposes

Max Payne KF2, KFS, SKD import/export

written by Mete Ciragan, chUmbaLum sOft

Purpose

This tutorials explains you, how to handle Max Payne files with MilkShape 3D or better. Max Payne model files have the extension KF2, KFS and SKD. The KFS files contain the materials with textures and meshes. SKD files contain the skin data, which is used to connect the meshes with the skeleton. Then finally, the KF2 files contain animations, poses and other stuff, which we don't use at the moment.

The Max Payne support in MilkShape 3D is capable of importing and exporting KF2, KFS, and SKD files. This means you can import/export meshes, poses and animations.

You will need the following stuff to continue:

  • Max Payne
  • Max­FX Tools, Rasmaker
  • MilkShape 3D 1.5.8 or better

Extracting the Max Payne Files

In Max Payne all data is packed into a big archive. The model files are in the x_data.ras, which is in your "./Max Payne" directory. Extract all data from that archive. See the documentation of RasMaker.exe to know how it works.

Importing Max Payne Files

After you've extracted the data from the x_data.ras, you are ready to import some models. Basically, there are 4 steps to import a Max Payne model with 1 animation. Note, that all 4 steps need to be done in the right order, so don't skip one step. After that, it should look like that (be sure your joint size is about 0.025!):

7

Open MilkShape 3D and import for example Mr. Payne. It's

  • ".\Data\database\skins\max_payne\Payne_Max_L0.KFS". You can do this with the menu command "File­ >Import­>Max Payne KF2/KFS/SKD...". You will notice, that you can choose *.kf2, *.kfs and *.skd file types.
  • In a second step you will need to import the according SKD file, which will add the vertex­>bone assignments and bone names. For Mr. Payne this is ".\Data\database\skins\max_payne\Payne_Max_L0.SKD".
  • Then you will notice, that all joints (bones) are placed at the origin. This is because all joints have no hierarchy and no positions yet. We can avoid this by importing a default pose. For Mr. Payne we then import ".\Data\database\skeletons\default_skeleton\anim\Widepose.kf2". Now you should see the skeleton.
  • After that it is time to import an animation. For example ".\Data\database\skeletons\default_skeleton\anim\2_DodgeBackwardLeft.kf2".

Ok, that's it. You have noticed, that all model files are in the ".\Data\database\skins" directory and all animations are in the ".\Data\database\skeletons\default_skeleton\anim" directory. If you want to import weapons, then you will find them in the ".\Data\database\weapons" directory. Always import the lod0 or levelitem files.

Exporting Max Payne Files

You can export with the menu command "File­>Export­>Max Payne KF2/KFS+SKD...". After you choose the export filename, the following dialog appears:

8

You can choose, what you want to export. KFS/SKD is used for player models or other models and KF2 is used for poses or animations or models like weapons, projectiles, etc... MilkShape 3D will warn you, if there are invalid material assignments or invalid vertex ­ bone assignments.

Creating a Custom Player Model

As we already know, we should use KFS for player models. Since Max Payne somehow shares the skeletons and animations, we just need to create a custom mesh and textures. This will be ok for models with a human shape, because it will save a lot of memory.

First create a new directory under the ".\Data\database\skins" directory, for example ".\Test".

Then import an existing model as descriped above. Remove the meshes and save the skeleton as a "skeleton.ms3d". You can reuse this skeleton for future models. At the end of this tutorial you will find a ZIP archive, which includes some testmodels from that tutorial.

Create your mesh or import it from somewhere else and assign it to the skeleton. The Max Payne units seem to be in centimeter, so you probably need to scale the model down. You have to make sure, that all vertices are assigned to a bone and all groups have a material assigned.

Now export it as described in the section above. I'm not sure if this is important, but the model files always have the same format: "%s_lod0.kfs", where you replace the %s with the directory name. So we should export our model to "Test_lod0.kfs".

In the ".\Data\database\skins directory you will find a lot .txt files. These files are scripts or something. Just copy a small .txt file, for example "punchinello_lisa.txt" and rename it to "Test.txt". Then replace the *.KFS and *.SKD files with your new ones.

You can have a look at other .txt files and then you will see, what's possible. You can add weapons to the model and so on...but this is not covered in that small tutorial.

Final Words

The last step is, that you simple recreate your x_data.ras (be sure to make a backup first), or even better: create a new .mpm (Max Payne Mod) file, which is just a renamed .ras file. Later in the game you can switch your player models with PGDN, PGUP, if you are in developer mode.

Ok, I hope this small tutorial helps you to start! If you have other questions, then check one of the many fan sites. Finally I want to thank Remedy Entertainment for their support and their cool game! ­ Mete

Post comment Comments
NeoDistinct
NeoDistinct - - 36 comments

One more tip:

In later versions of Milkshape3D while exporting KFS skins for Max Payne 1 you have to do next steps in export dialog:

- Click "KF2 (Weapons/Projectiles/Skyboxes)"
- Check "Max Payne 2"
= Uncheck "Max Payne 2"
- Click "KFS/SKD (player models/skins)"

Only by doing those steps the skin for Max Payne 1 will export correctly.

Reply Good karma Bad karma+2 votes
kisaraist2
kisaraist2 - - 1 comments

Ive been trying to import the skd for maxpayne2 but it always saids "this SDK has a different number of bones"... do u have any ideas to solve this issue??

Reply Good karma Bad karma+1 vote
LithTechGuru Author
LithTechGuru - - 408 comments

try an older version of Milkshape

Reply Good karma+1 vote
UGLIES
UGLIES - - 248 comments

Which version?

Reply Good karma Bad karma+1 vote
DoguIhtiyar
DoguIhtiyar - - 1 comments

I have a error can u help me?

First, i add Payne_Max_L0.KFS

Second,i add PAYNE_MAX_L0.SKD

but its look like this

Prntscr.com

And after i try to add SKD again and milkshape just crash

help me pls

Reply Good karma Bad karma+1 vote
LithTechGuru Author
LithTechGuru - - 408 comments

Try using an older version of Milkshape

Reply Good karma+1 vote
Guest
Guest - - 690,522 comments

How do you make weapons using it?

Reply Good karma Bad karma0 votes
LithTechGuru Author
LithTechGuru - - 408 comments

Weapons are also kf2/kfs's same as player models.

Reply Good karma+1 vote
Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: