Left 4 Dead 2 – Modify XDR & Addons

Left 4 Dead 2 – Modify XDR & Addons 1 - steamlists.com
Left 4 Dead 2 – Modify XDR & Addons 1 - steamlists.com

Instead of begging authors to make separate edits, you can modify xdR animation addons for your personal needs. This guide lists what is possible to do with regular Hex Editors and Files Browsers.
 
 

What tools needed

You need hex edtor of your choice and .vpk archive tool to extract and pack it back: vpk.exe, Crowbar – [steamcommunity.com]  or GCFScape – [steamcommunity.com]  (only extraction)
 
 
 

Addon extract

First, find and extract addon .vpk archive. All workshop addons are stored in Left 4 Dead 2/left4dead2/addons/workshop/ and non-workshop addons are stored in Left 4 Dead 2/left4dead2/addons/. Preview images are stored along with vpks, use them to identify needed addon. Also, the addons named after their assigned workshop id, you can see it in address bar when open it’s page like indicated below:
 
 
Left 4 Dead 2 - Modify XDR & Addons - Addon extract - D0F57AC
 
 
xdR anims are stored in /models/xdreanims/.
 
 
 

Disable character specific anims set

Simply remove character’s anims .mdl and .ani files.
 
 
 

Move to different slot

You might have two anim mods that replace same sequences. One with currently lowest slot will play anims that both addons replace. You can move another addon to any lower slot to play it’s anims instead (or higher slot to allow other addon play it’s anims).
 
 

  1. Rename .mdl and .ani (if exists) files so they have different slot indicated in their name. For ex. if we want to move Coach animations occupying slot 47 to slot 11. rename files to coach_slot_011.mdl and coach_slot_011.ani
  2. Open renamed .mdl file in hex editor
  3. Edit it so it references to new .mdl path at beginning
     
     
     
     
     
    Left 4 Dead 2 - Modify XDR & Addons - Move to different slot - D8CF7A1
  4. Near end of file, point to new .ani path
     
     
     
     
     
    Left 4 Dead 2 - Modify XDR & Addons - Move to different slot - 93CCEDB
  5. Save file

 
 
 

Disable specific sequence

Say you don’t want specific sequence to be played in game. For ex., to disable Idle_Standing_Pistol sequence, do this:
 
 
Open .mdl file in hex editor. Search for Idle_Standing_Pistol text.
 
It may find text prefixed with a_ like a_Idle_Standing_Pistol. Don’t touch it, it’s $animation. Keep it, search next.
 
 
Left 4 Dead 2 - Modify XDR & Addons - Disable specific sequence - 5EDAB14
 
 
Needed sequence looks like this. If it has Activity id assigned to it, it usually comes after and has ACT_ prefix.
 
 
To disable it, change it’s name and act like this:
 
 
Left 4 Dead 2 - Modify XDR & Addons - Disable specific sequence - 6CA9B92
 
 
I advise changing only one letter in name and act. Name and act length must be same.
 
 
Technically, this sequence is still inside model, but it should no longer be triggered in game.
 
 
 

Move animation set to different character

It’s technically possible but not advised as different character have different proportions or different skeletal structure. For ex. if we move anim from Coach to Zoey, it will be stretched in game. Moving from survivor to special infected won’t work.
 
 
Rename .mdl to needed character and slot.
 
 
Original .ani must be renamed so it has same length. Simply replace some letters.
 
 
Open .mdl file in hex editor.
 
 
Left 4 Dead 2 - Modify XDR & Addons - Move animation set to different character - D720854
 
 
Edit so it has new path reference. Path field is 64 bytes long like selection above shows, after .mdl there is padding filled with hex zeroes 00. You must not exceed it.
 
 
Left 4 Dead 2 - Modify XDR & Addons - Move animation set to different character - FB3A5D8
 
 
Near end of file, point to new .ani path
 
 
Left 4 Dead 2 - Modify XDR & Addons - Move animation set to different character - 8980A1C
 
 
Left 4 Dead 2 - Modify XDR & Addons - Move animation set to different character - 8BFAE14
 
 
 

Convert non-xdR anim mod to xdR

There are anim mods that do not utilize xdReanimsBase. It is possible to port them to xdR so it can be combined with other xdR anims. Since these replace all sequences, it’s best idea to assign them to highest possible slot. For ex., animation mod for Charger is converted like this:
 
 
Move .mdl file to xdreanims folder and rename to assigned character and slot:
 
models/infected/anim_charger.mdl —> models/xdreanims/charger_slot_047.mdl
 
 
.ani file must be located at same folder and must have same name length. Rename it by changing only some letters.
 
 
Edit .mdl file in hex editor so it has new path reference. Path field is 64 bytes long like selection below shows, after .mdl there is padding filled with hex zeroes 00. You must not exceed it.
 
 
Left 4 Dead 2 - Modify XDR & Addons - Convert non-xdR anim mod to xdR - A6E43D0
 
 
Left 4 Dead 2 - Modify XDR & Addons - Convert non-xdR anim mod to xdR - 20DE8D7
 
 
Near end of file, point to new .ani path
 
 
Left 4 Dead 2 - Modify XDR & Addons - Convert non-xdR anim mod to xdR - EFCA96C
 
 
Left 4 Dead 2 - Modify XDR & Addons - Convert non-xdR anim mod to xdR - B32A142
 
 
Save file.
 
 
 

Advanced editing

If you familiar to modding, you may try to decompile anim using Crowbar, do changes, compile back.
 

 
I won’t cover the process, that’s beyond of scope of this guide. I can say though that decompiler can’t produce source files perfectly suitable for editing unless it only has some simple animations. Delta sequences will be complete garbage. Best thing you can do is to create another extension that contains your edited sequences.
 
 
 

After edits

Open addoninfo.txt in text editor and change addon name for your convenience.
 
 
Pack edited addon into .vpk by using vpk.exe or Crowbar.
 
 
 

Conclusion

Your addon is ready. Place it in Left 4 Dead 2/left4dead2/addons/. I strongly advise against uploading it without original author’s acknowledgement.
 
 

Written by xdshot

 
 
I hope you enjoy the Guide we share about Left 4 Dead 2 – Modify XDR & Addons; if you think we forget to add or we should add more information, please let us know via commenting below! See you soon!
 
 


Be the first to comment

Leave a Reply

Your email address will not be published.


*