Eutectic@Posted: Sun Nov 07, 2004 4:47 pm :
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:

"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"

"editor_var keyname1"   "description text of key value"
"editor_var keyname2"   "description text of key value"

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):

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 8)

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

MBolus@Posted: Sun Nov 07, 2004 5:27 pm :
Sounds good. The editor usage notes have been inadequate, so of course most of us have just been studying the files and testing different keys and values, or asking those who have done so.

MaxiM@Posted: Sun Nov 07, 2004 5:36 pm :
Good luck man! I sure hope you'll succeed. You would help us all fellows mappers a lot. 8)

Eutectic@Posted: Sun Nov 07, 2004 7:39 pm :
MBolus wrote:
The editor usage notes have been inadequate, so of course most of us have just been studying the files and testing different keys and values, or asking those who have done so.

Granted, but I think this will be useful even for seasoned designers who've already learned how most, if not all of the entities work. Here's one example (among others): Zombies

There's roughly 25 different "Id standard" zombie monsters you can put in a map (excluding the Commandos, Sawyer and ZSec's). The difference between each is mostly cosmetic but let's say you want to use that specific one which is bald, wears a 2-piece green suit and walks with a limp?... Often, the name of the entity doesn't give an accurate description of what it looks like or how it behaves. To make matters worse, some of those are rendered without a head in the Cam view.

If you look at the 'Usage' field for zombies right now, it's either empty or incorrect. So this pretty much forces you to place a certain number of them in your map, compile and load the map in the game to see exactly what it will look like.

With an accurate description for monster_zombie_maint_fast in the entity window's 'Usage' field:

   "editor_usage"         "Zombie monster"
   "editor_usage2"         "Description: Short grey hair, bloody mouth and hands, green suit with open jacket."
   "editor_usage3"         "Note: same as zombie_maint but walks with a limp."

... The designer just avoided a lot of guesswork and saved time. If you relied on the entity name only, how would you know this is the one you want?

Plus, keep in mind that "memory is a faculty that forgets". Let's say you have to leave town for a couple of weeks, either for work or on vacation. When you get back, you might find yourself wondering: "... Now what was the name of that key again?..."

With complete descriptions, the information is available right in front of you at a glance. The point is you don't have to search for stuff.

Exitus@Posted: Sun Nov 07, 2004 10:28 pm :
I would love to help! Shoot me an email @
AIM me: smartidiot91
I would prefer is you aimed me

MBolus@Posted: Mon Nov 08, 2004 5:44 am :
I look forward to it!

Eutectic@Posted: Mon Nov 08, 2004 8:40 am :
Exitus wrote:
I would love to help!

Thanks for the offer, I appreciate it. But like I said above, I've been working on this for several weeks already and I'm almost done. In fact, that's why I decided to post about it at this time :)

iceheart@Posted: Mon Nov 08, 2004 1:46 pm :
I got this idea a month or so ago and I just took one look at the def files and stepped back in horror, I salute your perseverance and stubbornnes :)!

Exitus@Posted: Sat Nov 13, 2004 3:00 am :
almost done?
Sorry for reserecting this thread, but i wanna know if it is done or not

obsidian@Posted: Sat Nov 13, 2004 5:44 am :
Good job, Eutectic!

Would you mind e-mailing the .def files to me when you're done? I'd like to set up a unified download area for various editor related fixes and updates. Sort of an one stop shop to stay up to date with the latest files.

Eutectic@Posted: Sat Nov 13, 2004 5:57 am :
iceheart wrote:
I got this idea a month or so ago and I just took one look at the def files and stepped back in horror, I salute your perseverance and stubbornnes :)!

Thanks iceheart. Actually, the def files aren't half as bad as the mtr files were. :)

Don't worry, it's coming. Real life issues have disrupted my work for a few days. When it's done I wil post a download link in this thread. In the mean time, please be patient.

Thanks. As I mentionned above, I will post a link (pcgamemods). When it's up, you can DL it from there and redistribute it from your web site at your convenience.

Eutectic@Posted: Mon Nov 15, 2004 6:20 am :
The clean def files PAK is ready. It was a SOB of a job at times but I saw it though. The download link is at the bottom of my first post in this thread. Enjoy 8)

iceheart@Posted: Mon Nov 15, 2004 9:27 am :
Very nice! Good job! This should be quite helpful.

(Note that I'm speaking from the priviledged position of not actually having tried it yet, so I'm just assuming here :))

hellstorm27@Posted: Mon Nov 15, 2004 12:20 pm :
Eutastic- you are one of the forum's most useful contributors at the moment.

Unfortunately, there appears to be a bug, unless it's something I did wrong. The additional keys for what parameters can be typed for the entities are all there, but the "Usage" section is blank in the entity window for almost every type of monster, including the zombie_maint_fast mentioned above.

Also, the "health" key for monsters, which appears to have been taken out, worked the last time I tried it (eg giving a zombie 1 health)

This isn't trying to be picky or undermine the long period of work, more showing the problems I have found and being constructive- I wouldn't want the work to be in vain because of some minor bug.

Eutectic@Posted: Tue Nov 16, 2004 10:02 pm :
Thanks and sorry for not replying earlier. I've been extremely busy on my current project (clean sound shaders) for the past 2 days.

About the "health" key for monsters:
AFAIK, there was no "editor_var health" statement in Id's original monster_ default entity class from which all the monster entities inherit. So I fail to understand how the health key could have been in the list in the entity window originally. Also, I neither added nor commented out (I never remove anything) any such statement. So this can't possibly have anything to do with my def files pak.

In any case, the presence of the "health" key in the list is a mere convenience. Nothing prevents you from typing it in manually and setting it.

About the "usage" key for monsters:
I checked again and everything works fine here. The description is usually very brief except in the case of zombies (because there are so many flavours of them). I have no idea what could be the cause of your problem.

Only the presence of custom pak file (other than mine) or having extracted game assets in the /base folder might come in conflict with my pak... Or my pak file wasn't extracted to the base folder or you extracted the contents of the pak file itself instead of keeping it intact. I hope my mentionning this doesn't insult you but it's the only possibilities I can see.

hellstorm27@Posted: Tue Nov 16, 2004 10:48 pm :
Doesn't seem to be the problem, for the Usage part is blank but every other part seems to have updated according to the def patch... strange.

However, most of it being improved is better than none!

Eutectic@Posted: Wed Nov 17, 2004 1:28 am :
Here's proof of what I put forth. I took a screenshot within the editor to show you what I see when I select "monster_zombie_maint_fast" in the entity window:


I was thinking though... The "editor_var ..." statements did cause me some grief because their functioning is somewhat finicky. I noticed that if I had too much text in a given description, the field would sometimes be "cut off" abruptly as a result. Perhaps this is resolution dependent also?

I run my desktop and editor at 1280 x 1024. What resolution are you running at?

iceheart@Posted: Wed Nov 17, 2004 1:32 am :
"Eutastic"? I'll remember that one :).

MaxiM@Posted: Wed Nov 17, 2004 2:16 am :
Thanks Eutectic, it works pretty much fine for now and it's grat! Kudos.

Brain Trepaning@Posted: Wed Nov 17, 2004 2:43 am :
Pretty friggin' sweet. Sitting in my base next to Eutectic's CleanMats and working fine. Res 1024x768 and zom_maint can be read no problem.