.MAT file (CS:CZDS)

From Valve Developer Community
Revision as of 03:08, 6 June 2021 by Shon (talk | contribs)
Jump to navigation Jump to search

Template:WIP So, you want to make a cool particle effect when you shoot a wall in CS:CZDS? Well, lets take a look at what a .MAT how it all connects to the workings of CS:CZDS.

Important

I do recommend making a backup of your CS:CZDS directory, just incase something goes wrong and ends up doing something we don't want. This is standard practice and should always be done when modifying files in the main directory.

What is a .MAT file

A .MAT file is what CS:CZDS uses for it's uniquely built particle system that is specific to the textures in the game. It covers everything that you might imagine a particle effect could do. For example, when a concrete wall is shot in game, one would expect that things like a bullet decal, gray smoke would be emitted, chips of concrete would fall out of the wall, Among other things such as the gravity, fade speed, color and what sprite the chips of concrete use. The .MAT format is highly customizable and very easy to work with once the terms and formatting are explained. But there are limits to what we can do in CS:CZDS because of the mostly hardcoded nature of the game itself.

File structure

The file structure is important. There are two directories that .MATs should be. One for defining the .MATs for levels, and one for creating material .MATs to be used.

Directory for defining .MATs for a level:

Steam\steamapps\common\Half-Life\YOUR_CZDS_MOD\materials
  • Files in this directory define the .MAT file for your levels, and can also be the area where a global czero.MAT is stored for loading when the game is started. The format for these is generally YOURMAP.mat, with the exception of the global czero.mat.

Directory for defining the material .MATs:

Steam\steamapps\common\Half-Life\YOUR_CZDS_MOD\materials\defaults 
  • Files in this directory define the materials used within the above mentioned directory. Basic materials such as dirt and grass are stored and referenced from here.

These two directories are linked in a way. So you should always place the correct file in the correct directory, otherwise they may not work as intended. The next section is going to explain how to create and link a texture to a Level.MAT using


The limits

Now lets take a look at the limitations of the .MATs on CS:CZDS.

  1. Limit on material .MATs. You'd initially think that you could just make a new material (for example, Blood.mat) and chuck it in the 'default' directory and assign it to a texture in the level. Unfortunatly, that's not possible. For some reason, the materials have a hard coded limit in the game. This means that you can only replace the .MATs in the 'default' directory.
  2. Unclear Properties. Now, this one is difficult to explain. None of the settings for the materials have explanations fpr there settings. So I don't fully know what some of the settings do.


Todo: Finish the tutorial.