Left 4 Dead 2

Left 4 Dead 2

89 ratings
Mod a Mod (Modders Guide)
By Ellie
This Guide aims to explain to Modders the Mod a Mod technique so they can implement it and use it for their addons.
   
Award
Favorite
Favorited
Unfavorite
[General Information]
Difficulty :

Short description : Allows Modders to set up a mod they are releasing so that other modders can later release skin addons or other VMT modifications for it.

Time to implement : 10 seconds to allow other modders to use the technique. No additional time to release a skin pack for a mod set up using that technique.
Required before starting
  1. To allow the use: A mod that replaces a 3D model you are currently working on
  2. To release a skin pack: A mod that was set up using that technique (voluntarily or involuntarily).
Needed skills :
  • [To allow the use] Knowing how to make a survivor mod and what $cdmaterials is
  • [To release a skin pack] Knowing how to make a skin mod (knowledge of a graphics software, and what a VMT and a VTF are)
What is Mod a Mod ?
Mod a Mod is a way to set up a mod so that other modders can later release skin packs for it.
Originally posted by you:
Yeah... fine, but you know, it's already possible to release skin packs for mods. You just download the mod, modify the texture, and reupload it, and boom that's it...
To that quote above, I answer fine, this is true. However, maybe the original author is planning on changing his mod in the future, to update it, or modify certain things. So why not make it so each time the original mod author updates his mod, your mod with only a reskin will be up to date ?

Besides that, that technique is useful because it allows you to release different reskins for each part (VMT) of the model. So for example, using that technique, a modder could release a new skin for the shoes of your character, and another modder could release a skin mod for the shirt of your character, provided that these two are in different VMTs.
In other words, you could create a true wardrobe for your character, if each different piece of clothing is in a separate VMT. And your subscribers could choose what ones they want.

Also, it allows you to release a reskin mod for every version of a character all at once, if the original author did multiple versions of the mod for multiple characters, since you do not need to worry about the models.

Moreover, it's so simple to implement that you could literally have done it by the time you finish reading this sentence. So why not try it, it costs nothing !

How to allow users to mod your mods ?
It's easy. You know, in the QC file you use to compile your mod, there is a parameter called $cdmaterials, that defines where the model has to look to find textures. You usually have to change the path to link to the folder where your textures are in your mod. If you didn’t know about that, you can actually specify multiple ones like this.

Here's an example:
$cdmaterials "models\survivors\lis\" $cdmaterials "models\survivors\" $cdmaterials ""

Now the ONLY thing you need to do is to add a new $cdmaterials at the top or them, that will link to a unused (yet) folder, for example :
$cdmaterials "models\survivors\lis\reskins\" $cdmaterials "models\survivors\lis\" $cdmaterials "models\survivors\" $cdmaterials ""

And boom, that's it. Compile your mod and do not forget to tell your subscribers on your mod description page what the unused folder is, so that people can start to do reskins. If you don't tell them that, people will need to decompile your mod to see what the folder is, which is kind of bad?

This works because the model will always search for textures (VMT) in the first $cdmaterials that was defined, then in the second and so on. If the textures (VMT) of your mod are in the folder defined in the second $cdmaterials, it lets other modders use the folder in the first defined $cdmaterials to create VMTs that will take priority over your base mod, as long as these VMTs are in the correct, unused specified folder.
How to make a mod for another mod ?
This sections aims to provide a quick tutorial on how to set up a reskin mod for a base mod that uses the Mod a Mod technique. As a practical example, I will show you how to make a reskin for this mod :
https://steamproxy.net/sharedfiles/filedetails/?id=467436858
STEP 1 : Identify the folder for the reskins
You first need to identify where the mod creator want you to put the reskins. You could decompile the model using Crowbar to see what the folder is (that's what I did here), or just look at the mod description or the mod update log like I didn't do :
Originally posted by XDShot:
Update: 5 Mar, 2018 @ 5:28pm
-- Reskins support added without original replacement to avoid conflicts. Put materials and textures into "models/survivors/lis/reskins"

STEP 2 : Download the mod and set aside the files to modify
You then need to download the mod you want to reskin, and go grab it in the addons folder Steam\SteamLibrary\steamapps\common\Left 4 Dead 2\left4dead2\addons\workshop.

Decompile the mod with vpk.exe, and look for the textures you want to modify (VTF and the VMT that goes with tem), then delete everything else from the mod.


We'll only need these three files, so I'm about to delete everything else, folders and subfolders

STEP 3 : Put the remaining files in the reskin folder
The next step is to put the VMT (at least) and the VTF in the folder we identified at STEP 1. Of course, this folder does not exist yet, so we will have to create it.

Once the folder is created, just drag and drop all the VMTs and VTF in it.


I'm about to drag and drop everything in the new VMT that correspond to the path identified at STEP 1

At this point, you're done with the technical part. The files are in the correct folder identified at STEP 1, and they will take priority over the ones in the base mod.


Of course, in your case, the folder will maybe not have this path and will not be named reskins

STEP 4 : Change the $basetexture path
There's one more step that you need to do, and that is easy to forget. Now that you put your VMT in a new folder, the path to the $basetexture is wrong (it still links to the one in the original folder in the base mod).

Open your VMTs, and change the $basetexture path to link to the new reskin folder.
Note that you do not need to change the path to the $bumpmap (for example) since it will still use the one in the base mod and that doesn't exist in your reskin mod.


STEP 5 : Create your reskin !
Now you can modify the VTF and the VMT as you like. You could even add RNG or other cool stuff in it. Everything you put in that reskin folder will take priority over the base mod, without any conflicting files.

It's even possible to make reskins for multiple mods at once. For example, here, I did a reskin for both the Zoey and Rochelle version of Chloe Piece by XDShot's in one single mod, something that would be problematic without Mod a Mod because I would need to include both Rochelle and Zoey models, and people probably do not want to play with Chloe Piece on both these characters.
https://steamproxy.net/sharedfiles/filedetails/?id=2232402042
STEP 6 : Tell your subscriber to download the base mod.

The last step, once you publish your mod, is to tell the future subscribers of your mod to actually download the original mod if they haven't done so already.

You're probably intelligent enough to know that you can ask them to do so in the description of your mod, but you can do better and force a message to appear when they subscribe to your mod, telling them to also download the base mod

Open the Steam page of your mod you just published. Do you see this option Add/Remove Required items ?

Click on it, open the tab "Subscribed items", look for the base mod you just released your skin for and click on the big ✚. Then click on Save & Continue in the bottom right corner, and refresh your mod page by clicking on the F5 key on your keyboard. If you did it right, a Required item table should have appeared like in the screenshot on the left (note that the name of the mod will of course not be The last of us - Ellie [zoey] like in this example).

Once you've done that, you are good to go and you're finally over !

Help... I have a problem !

It doesn't do anything when I have both mods active!
Can be caused by ▶ Forgetting to change the $basetexture path

Solution ▶ Check the path you specified in your $basetexture. It must be the new VTF in the new folder.


The texture is purple and black squares!
Can be caused by ▶ Making a typo while changing the $basetexture path
Can be caused by ▶ Changing something in the VMT that didn't need a change (like the path for a $bumpmap)
Can be caused by ▶ Putting the VTF in the wrong folder

Solution ▶ Check every path in your VMT ($basetexture, $bumpmap etc.), and make sure they correspond to an existing file in an existing folder, in either the base mod or your new mod.


I have another problem!
Can be caused by ▶ A lot of different things actually.

Solution ▶ Ask your question in this Guide, I'll be happy to respond !
13 Comments
Pwnage Peanut 5 Aug @ 12:20pm 
Extremely useful
Zetnus 28 Sep, 2020 @ 4:30am 
It's one of those things you just find out by chance while trying to debug the wrong texture showing up.
xdshot 27 Sep, 2020 @ 9:17pm 
Surprised people discovered this only after several years :)
Majka Back xd 26 Sep, 2020 @ 1:56am 
:cozybethesda:
JI06CT3P 25 Sep, 2020 @ 10:33pm 
Thanks :leon:
Cass 23 Sep, 2020 @ 7:38am 
:luv:
Mordecai 20 Sep, 2020 @ 11:59pm 
@Ellie : Modception?
Ellie  [author] 20 Sep, 2020 @ 11:40pm 
@Mordecai : has it ever occured to you that your username is almost half m o d ? x)
This is a Guide though not a mod :giraffe:. Also the stupider the name the more it will be spread out xD
Mordecai 20 Sep, 2020 @ 6:52pm 
Make a mod about this mod explaining the mod for modders to mod and or possibly modifty
tony raccaroni 20 Sep, 2020 @ 3:48pm 
mod a mod a modders mod