Entity Editing Tutorial - Understanding Models* [Intermediate]


His everyone,
In this tutorial I will try to explain how models work, This is a bit more complicated than basic map editing, to go over how to place Entities in a map go Here.

There are two main reasons you want to use Models over instances:
The first would be, the flexibility and control it gives you over the objects generated (making breakable objects, moving objects, etc...)
The second reason would be for map stability, the game has a built-in entity limit of 256, lets say you make a map and have a tons of instances (misc_bsp for example) instead of models, once you exceed the 256 entity limit, the map will just crash, if you use objects however, they will just not render, the map will be playble though.

To start off, I am referring to the attribute of an entity called "Model", the game assigns each entity type a model number, for example, the first entity type in a map would be assigned the model *0, the second entity would be *1 etc...

Maps comes with pre-assigned models, every entity you add afterwards would be assigned the next model number available, to see the model list of a map, you can type in game console (~) the command /modellist, what you want to look for are the assigned numbers, you can ignore the rest pretty much, what you are looking for would look something like this (use Page-Up/Page-Down to scroll the console):
you can see the last model index is *3 (4 models in total), in this example, I am using the map inf.
If you extracted the entities from the .bsp file, you could also look in there for the latest model number.

now lets add a box instance (npc_jump1) to the map somewhere we cannot see it (0 -999 0):
If you go into the map now, and go to position 0 -999 0 you will see that box inside a wall or floating in the void.
Now that we generated the box, the game automatically assigned it the model number *4, because our last index was *3.
Lets try to make a static model out of this box now, once we know the model number of the box entity we can use it in different ways, models are duplicate objects of the original entity, but you can assign different attributes to them, in this example lets make a static object:
"classname" "func_static"
"model" "*4"
"origin" "99 -978 609"
Now lets break it down, we have the entity's classname, which will define what it is (static object in our case).
Then the model number (the one the game generated after we placed the instance itself) which in our case is *4.
That is pretty much all you need to generate a model, I added an origin so we can actually see it in-game, if I wanted to rotate it I would add the "angles" attribute.
Now in-game view would be:
If you try to interact with this object, you will see it is indeed static and doesnt do much right now.
Lets try to simply change the classname to func_glass, this will turn this object into a breakble one instead of a static one.
I changed the line "classname" "func_static" into "classname" "func_glass":
If you try to shoot or slice the box, it will now break like a window would.
That is a simple modification of a model, there are plenty of other classnames to mess around with, I will not go into depth in this tutorial, however, if you want to see some examples, you can apply the knowledge you aquired here and move or change attributes of other's examples you can find in the Editing Tutorials forums.

I think this would be enough for most people to understand and apply to other classnames with the examples found in the forum.
If you still struggle to understand how to apply what I showed here to other types of classnames, let me know if you would like a more comprehensive guide about the different types of entities and their attributes, although I think it is not neccessary if enough people cant figure it out I will try to explain it better.
Last edited: