What are .def files?
The.def files are entity definition files. They are located in the pak000.pk4 PAK file in the /def sub-folder. They contain tons of definitions for other things like models, animations, etc. But for the purpose of this, I'll stick with the definitions of entities you can place in maps. Information about the entities, description (usage) and the possible key/value pairs in the .def files are displayed in the top part of the entity window in DoomEdit. This is determined by the following parameters:
Code:
"editor_usage" "description text on first line of usage window"
"editor_usage2" "description text on second line of usage window"
"editor_usage3" "description text on second line of usage window"
etc...
"editor_var keyname1" "description text of key value"
"editor_var keyname2" "description text of key value"
etc...
For example, take a look at the
weapon_chaingun entity definition in the
weapon_chaingun.def file (note that I omitted most of the parameters for the sake of clarity):
Code:
entityDef weapon_chaingun {
.......
.......
"editor_usage" "Chaingun"
"editor_var triggersize" "set this to expand the size of the pickup trigger volume"
"editor_var triggerFirst" "If set to 1, weapon cannot be picked up until triggered"
"editor_var no_touch" "If set to 1, weapon cannot be picked up and must be triggered to give to player"
.......
.......
}
This is what is displayed in the entity window as a result:
NOTE: the above example includes extra "editor_var" parameters not found in the original files. I added those.
So thanks to this feature, the designer should have access all the relevant information on all the entities at a glance. And there is quite a lot of useful information in the .def files already. Unfortunately, much of that information is disorganized (either missing, outdated or innacurate and sometimes cryptic).
For the past few weeks, I have endeavoured to fix that. I'm currently working on improving/re-organizing those descriptions. My goal is to make available to the map designer as much information as possible directly in the editor interface without him having to open and browse the .def files (although that's always a good way to learn in detail how some entities work).
I'm also commenting out all the invalid entities (things like test_ , ss_ , for eg). Although the amount of those is far less than for the texture materials, it will help in 2 ways:
1. The editor should load a bit faster since there's less entities to parse
2. The entity right-click menu in the 2D view view will be shorter and a lot of scrolling up and down will be eliminated.
I still have a lot of work to do since there's a LOT of entities in Doom3 but things are going steadily. Once it's ready, I will release it in the form of a pk4 file.
EDIT, Nov 15 1:19 AM EST:
Well, it's done. Finally
It comes in the form of a pk4 file of course and is about 300KB in size.
As always, I did my utmost to make this as complete and error-free as possible. Should you spot any errors, don't hesitate to let me know.
Enjoy
EDIT-bis, Nov 16 9:08 PM EST:
I know this is quite early after the release of Version 1 but I had no choice. The sound shaders for the Sentry reside in the char_sentry.def file (unlike all the other sound shaders) and some of them were broken and thus commented out. Since I'm releasing my Clean sound shaders PAK in a few minutes. I felt that this update had to be posted first. Sorry for the inconvenience.
EDIT, Dec 14:
This is the latest version. Version 3 includes cleanup of the sentry model related materials since those resided in sentry.def. It also and more importantly includes improvements to the model based entities editor bounding box, particularly when it comes to the env_ragdoll entities.
Oh, and about the env_ ragdoll entities, now they do show up in render mode, they didn't before
I have also posted an updated Clean shaders PAK V5 which I recommend everybody to download (please check the sticky posts for the the thread).
Clean Def files Version 3