This allows you to open downloaded .mdl files in model viewer (hlmv) by just double-clicking on them.
Compatibility:
- Windows
- L4D1 / L4D2 / Maybe, other games too if you correct all paths
Installation:
1. Download archive attached, unpack appropriate folder (l4d1 or l4d2).
2. Move unpacked folder to safe place on PC where you'll not touch/not delete it.
3. Right click on hlmv_loader.vbs => Edit => Change this line:
Code:
L4d = "D:\Steam2\steamapps\common\left 4 dead"
to the full path of your game. Then, File => Save.
4a. For Windows 7 only:
- Run As Admin (RMB -> Run as Administrator) the file Assoc_Installer_Win7.bat
4b. For Windows 8/10+ only:
- Run any .mdl file
- in "Open with..." window => (scroll to bottom) => More Apps => (scroll to bottom) => Look for another App => Browse to unpacked folder and select launcher_Win10.bat
- Run any .mdl file again, mark checkbox "Always use this app", select launcher_Win10.bat from the list => OK.
- If checkbox "Always use this app" doesn't exist, you shall go a long way:
Spoiler
- Run any .mdl file
- in "Open with..." window => More Apps => Select any application, Paint or Notepad (doesn't matter) => Press OK.
- Press Win + R, enter
Code:
ms-settings:defaultapps
Press OK.
- Press "Choose default apps by file type"
- Find .mdl => Press "plus" => Select notepad or anything.
- Repeat steps in Stage 4b (now, checkbox "Always use this app" should appear).
That's all. Good luck!
Dependency:
- Authoring Tools should be installed.
Details of what the script do:
Spoiler
Well, due to limitations of hlmv, it cannot open .mdl directly, which is located outside the game directory.
I'm using crowbar's method here, except it also doing this:
- Firstly, your game's "materials" folder will be overwritten with materials located next to provided .mdl file.
Next, the .mdl and companions get copied to models/- temp/ folder of your game.
.mdl file is patched to point to actual location.
Current directory is adjusted, and hlmv is get called with appropriate settings.
Note, that your game's "materials" and "models/- temp/" folders are not auto-clear from leftovers after this action.