Team Fortress 2 Icon TF2 Tutorial

Recompiling TF2 Models

Hey, you! We are one of the oldest mod sites on the Interwebs. Sign up and maximize your browsing experience.

  • Subscribe: Get notified of new submissions like this.
  • Say Thanks: Show your appreciation by sending modderfreak points.
  • Post: Give modderfreak your thoughts on this Tutorial.
  • Vote: Help modderfreak win the Monthly Awards.
  • Rate: Give this Tutorial a rating out of 10.
  • Flag: Alert moderators and warn members of a problem with this Tutorial.
  • Watch: Get notified when this Tutorial is updated.
Mascot

Stop Lurking!

Join GameBanana

Already a Bananite? Login

Recompile TeamFortress2 playerview models, using a trick to fix the broken animations.

This tutorial will cover how to recompile default TeamFortress2 playerview models, using a trick to fix the broken animations.

Required

Programs:
  • A Source Model Decompiler
  • GUI Studio MDL (recompiling)
  • Other:
  • Source-SDK with Half-Life Model Viewer
  • A working, updated installation of TF2
  • Recompiling

    Preparing
    • Locate the original (non-Hexed) .mdl file of the model you want to decompile. For this tutorial, I will recompile the Sniper Rifle. Therefore, I need the v\_sniperrifle\_sniper.mdl file.
    • Rename the .mdl file to anything you want. -We will use this file for the animation sequences, therefore it would be useful if you label it somewhat similar to its original name. -I will call my sniper rifle .mdl v\_sniper.mdl.
    • Save the new .mdl file to your models\weapons\v\_models folder.
    • Next, we need to decompile the default model we want to use. -If you don't know how to decompile TF2 models, have a look at this tutorial.
    .qc Editing
    • Open the mdldecompiler.qc of the freshly decompiled model. You can use Notepad or any similar text editor for this.
    • After the second line, instert a new one linking to the renamed .mdl file we created, using the $includemodel command. In my case, the matching .qc code will look like this:
      $includemodel "weapons\v\_models\v\_sniper.mdl"
    • With the previous step, we adviced the compiler to use the animation sequences of the original .mdl. This way, we don't need to use the broken decompiled animation sequences. Since any animation sequence line in the .qc will override this though, we need to remove them. Refer to screenshot A for an example of what your edited .qc could look like.
    • This step is case-specific: if your .qc has a $texturegroup modifier, it will probably be broken. For this case, the Valve Wiki will help you getting the code proper; basically all '{' need to have spaces after them.
    Compiling
    • Once these steps are done, you are free to modify your reference model, for example replacing the old sniper rifle with a new model.
    • Finally, we need to recompile our model using GUI Studio MDL. -Make sure to use the latest version of this compiling program, otherwise it'll probably not work! Load your .qc, select the Orange Box SDK Version, select TF2 as target game, hit "Compile" and you're done ;) Refer to screenshot B for an example of what your GUI Studio MDL with all settings applied could look like.
    • Now remember to put the freshly compiled files into a new custom folder. Go to your common\team fortress 2\tf\custom folder and make a new folder, inside that goes the models folder, then the weapons folder and so on, just remember to keep the directory structure.

    Posts

    • 1
    • 2
    • 7y
      Anonymous
      Do you think you could put some download links in because I not sure I'm downloading the right things!
    • 8y
      Ian avatar
      Ian Offline
      Member Joined 8y
      Hey, I'm having an error with my playermodel compiling, could you please help? Thread: http://www.fpsbanana.com/threads/163280?2

      Please add me on MSN if you can, or simply respond the thread.
      Bananite
    • 8y
      Klawneed avatar
      Klawneed Offline
      Member Joined 9y
      7,979 points Ranked 541st
      Posted by modderfreak

      Posted by Klawneed

      If i compile say, the smg for the needlegun, will it have sniper hands? Or is it fully working? Also, is this tut only for custom models or can i use Valve default models?
      Thanks in advance.

      No, you'll have to exchange the hand models manually.
      It does not make a difference if you're recompiling a default or custom model.


      How do i do that?
      I still have an uPic avatar
      Mantra
      I still have an uPic
    • 8y
      modderfreak avatar
      Member Joined 12y
      232,539 points Ranked 13th
      3 medals 1 rare
      • Reached 50 subscribers Medal icon
      • Received thanks 5 times Medal icon
      • Reached 10 subscribers Medal icon
      Posted by Klawneed

      If i compile say, the smg for the needlegun, will it have sniper hands? Or is it fully working? Also, is this tut only for custom models or can i use Valve default models?
      Thanks in advance.

      No, you'll have to exchange the hand models manually.
      It does not make a difference if you're recompiling a default or custom model.
      Respect is everything. avatar
      Mantra
      Respect is everything.
    • 8y
      Klawneed avatar
      Klawneed Offline
      Member Joined 9y
      7,979 points Ranked 541st
      If i compile say, the smg for the needlegun, will it have sniper hands? Or is it fully working? Also, is this tut only for custom models or can i use Valve default models?
      Thanks in advance.
      I still have an uPic avatar
      Mantra
      I still have an uPic
    • 8y
      Tex-DstZ avatar
      Tex-DstZ Offline
      Member Joined 10y
      1,239 points Ranked 3756th
      Ok i seem to have found the source of the error.....

      i had it decompiling from and to the desktop.

      i moved the folder to C:\ and it worked perfectly...

      it seems the directory was too long...... i dunno hope that helps somebody out there
      Bananite
    • 8y
      modderfreak avatar
      Member Joined 12y
      232,539 points Ranked 13th
      3 medals 1 rare
      • Reached 50 subscribers Medal icon
      • Received thanks 5 times Medal icon
      • Reached 10 subscribers Medal icon
      I guess your decompiler crashed? If so, simply try it again and again until it works (actually that's what I'm always doing).
      Respect is everything. avatar
      Mantra
      Respect is everything.
    • 8y
      Tex-DstZ avatar
      Tex-DstZ Offline
      Member Joined 10y
      1,239 points Ranked 3756th
      I have everything ready for recompile.. except.. my qc file was generated incorrectly. it is completly blank (which is no use to me at all) any ideas on how to fix?
      Bananite
    • 8y
      mrkit4423 avatar
      mrkit4423 Offline
      Member Joined 9y
      6,576 points Ranked 670th
      Nice tutorial, but can anyone try to decompile any tf2 view weapon and see if u get the qc file please? i tried decompile 7 view weapons, all of them missed the qc file.

      idk wts wrong
      Bananite
    • 9y
      .eXe avatar
      .eXe Offline
      Member Joined 9y
      Thanks a lot !I finally made it !This is the most helpful tutorial i've ever seen !
      THANKS !
      10/10
    • 1
    • 2

    Share

    Shareable Image:
    Share banner
    HTML embed code:
    BB embed code:
    Markdown embed code:

    More embeddable images

    Bookmark and Share

    Credits

    Key Authors
    modderfreak
    Unknown

    Submitter

    modderfreak avatar
    Member Joined 12y
    232,539 points Ranked 13th
    3 medals 1 rare
    • Reached 50 subscribers Medal icon
    • Received thanks 5 times Medal icon
    • Reached 10 subscribers Medal icon

    modderfreak
    Creator
    Send a Private Message to the submitter

    Category

    Details

    Difficulty Level
    Intermediate Difficulty

    Stats

    Posts
    18
    Views
    23,618
    Date Added
    9y
    Date Modified
    4y

    Rating

    10/10 by 2 raters

    WiPs by Submitter

    More from Studio

    WiPs by Studio

    bcp.crwdcntrl.net tracking pixel