Introduction
Entity Sets are files that enable you to manipulate and put objects in a map for a 3-D game such as Half-Life using your favorite level editor "Qoole".
I will try to make this as easy as possible, and be as informative as I can be. Creating Entity Sets can be a very time consuming task. I lost track
of the endless hours that it took to make the bulk of the Half-Life Entity Set, and I haven't the slightest idea of how long it took
Aaron "The Relentless" Bellante to sort through all my numerous mistakes and add the entities that I missed.
This tutorial will go over:
What is contained in an Entity Set
How to create an Entity Set
Where to obatain the information to create this entity set
Things Needed:
Notepad (or other simple text editor)
Qoole 99 (this will be to test to make sure your entity set will work)
Time
Common Sense (will be acquired after this tutorial)
Getting Started
Well, first thing is first... If you haven't already, Install Qoole 99 and get something to open the Qoole99.pak. Extract the Half-Life Entity Set.
Locate the entity set (.ent) and move it to your desktop. Open notepad, or your other basic text editor, and size the screen so that you can just
drag the icon of halflife.ent on top of the notepad window. The Half-Life entity set should be open in notepad. Open Qoole and create a new Half-Life map.
(It is possible, however to see what Im talking about using a different game selection in Qoole)
The Basic Structure
What you see when you first open the entity set at the very top are comments.
// Half-Life Entity Set for Qoole,
// By Tim Barry (Ishkish)and Aaron "The Relentless" Bellante
Comments are seen throughout the file. They commonly show different sections of the entity set, or special instructions on how to use that
specific entity or specific entities.
Next, you see:
class "Ammo"
class "Env"
class "Func"
These are what you see in the Entity Menus of Qoole.
Click on the [Object] Menu.
Mouse over the |Add Entities >| Sub menu.
As you can see, there are also Ammo and Env sub menus. (Along with the rest of the "class" variables with the exception of "Func")
Notice that Func is not in the |Add Entities >| Sub Menu. That is because all of the Func entities in this entity set are Applied Entities.
Right Click in the editing winow, and choose |Add Brush >| Cube (small)
Now you shoul have a small cube in your map.
Right Click on that cube, and Mouse over |Apply Entity >|
Notice that the "Func" Sub menu displays a load of entities that require a brush to work. (Breakable windows, Train cars, and Elevator Lifts
are examples of applied entities)
Next in the Entity set, you will see:
strdef "str_skyname"
{
2desert "2Desert"
alien1 "Alien1"
alien2 "Alien2"
alien3 "Alien3"
black "Black"
cliff "Cliff"
desert "Desert"
dusk "Dusk"
morning "Morning"
neb1 "Neb1"
neb6 "Neb2"
neb7 "Neb3"
night "Night"
xen9 "Xen9"
}
This is a String Definition. This was added to Qoole so that specific string values that Valve specified could be used without having to search
around for the available words. When we look at the worldspawn entity, I'll show you what the string definition actually does for the user.
The First Line:
strdef "str_skyname"
The first line is the Defining line of a String Definition.
The word 'strdef' tells Qoole to treat the data between the brackets as a string (str) type of field for a Variable that calls the String Definition.
The set of quotes with "str_skyname" is the name for this String Definition.
The Second and Last Lines:
{
}
All the information between these brackets are what make up a string definition (strdef).
The Guts:
Since the data here is not constant in all strdefs, I won't say what the data is, but I will say the format of the data.
The first column is the string data that is sent to the game. If the data that is sent to the game is more than one word, then make sure to
"enclose the phrase in quotes." The second column is the Alias for the string in the left column. You should always put this in quotes.
Next in the Entity set, you will see:
typedef "type_newunit"
{
0 "No, Keep Current"
1 "Yes, Clear Previous Levels"
}
This is a Type Definition. This is for when there are specific numbers for a given Variable in an entity. It makes it easier for the user to
Choose a setting by not making the user look up an integer number for the desired effect. In quake, I believe it's used, for example, on health
cubes to give the user a choice between small, medium, and large health cubes (that way you just choose medium, and dont have to remember 25 as the number)
The First Line:
typedef "type_newunit"
The word 'typedef' tells Qoole to treat the data between the brackets as a type which is an integer (int) type of field for a variable that calls the
Type Definition.
The set of quotes with "type_newunit" is the name for this Type Definition.
The Second and Last Lines:
{
}
All the information between these brackets are what make up a type definition (typedef).
***Note, I think twice is enough for explaining the brackets... If common sense doesn't kick in after this, then you have no hope!***
The Guts:
The data in the first column are all integers. No string values go here. The integers do not always start a 0 or 1 that is Variable Specific.
The data in the second column is the Alias/Description of the integer being applied.
Next in the Entity set, you will see:
entity "worldspawn" "Null->Worldspawn" ""
{
"message" str "Select message to display on HUD whe starting level"
"skyname" str_skyname "takes the name of the environment map to use for the sky"
"light" int (0) "sets the default light amount of the level"
"sounds" int "cd track to play when entering the level"
"WaveHeight" int "default wave height"
"MaxRange" int (4096) "max viewable distance"
"chaptertitle" str "chapter title message"
"startdark" int (0) "level fade-in"
"gametitle" str "display the game title"
"newunit" type_newunit (0)
model
}
The above is a complete entity. That's basically all there is to it...
The First Line:
entity "worldspawn" "Null->Worldspawn" ""
The first Line is the Defining Line of an Entity.
The word 'entity' tells Qoole that all the data between the folowing Brackets { } is an entity of some sort.
The word within the first set of quotes (worldspawn) is the name of the entity.
The data within the second set of quotes is the Sub menu (Null->) and the alias (Worldspawn) that the entity is displayed under.
Because Null-> is the sub menu, this entity is not displayed under a menu. To view the worldspawn, Goto the top of the "Tree View"
and right click on Lev "LevelName" Select Properties. This is the worldspawn. When here click in the value field for skyname. You will get a drop down
box with the Aliases in the str_skyname Definition.
The only menus that you specify in the entity defining line are what were specified by the 'class "SubMenuName"' lines.
The next set of quotes is the tip section that gives the user more information on a mouse over of the entity.
(in this case, there is no mouse over tip)
The Guts:
I'm not going to go into what all the data is between the brackets because most of it is entity specific.
I will tell you what the 3 columns are though.
The First column is the Variable Name.
"name" (replace "name" with the name of the variable)
model (this tells qoole that this entity is applied to a brush, or a set of brushes - in the case of worldspawn, it applies to all
brushes in your map)
The Second column is the type of value that the Variable can have.
str (string - letters, numbers)
int (integers)
specified_names (Definitions specified prior to the entity that it's called in -- str_skyname , type_newunit)
notuser (used so that the user doesnt specify coordinates)
Some of the type values have a (0) or (4096). If you haven't guessed, those are the default values that are entered for that variable.
The Third Column is the tip section that gives the user more information on a mouse over of the Variable.
Now, notice the two variables, "skyname" and "newunit". See that they dont have the standard str, or int? Their types have the names of str_skyname
and type_newunit (0). This is where you call on the Definitions. Any definition that is called in an entity must be put somewhere before the entity
that uses that Definition.
Next in the Entity set, you will see:
typedef "angles"
{
90 "North"
0 "East"
270 "South"
180 "West"
-1 "Up"
-2 "Down"
}
This is another Type Definition. You can get a better idea of what is in the typedef with this one. This type def is used for movement directions.
(Door entities call on this definition)
Next, scroll down a page or so until you see the ammo entity for the 357.
The entity looks like this:
entity "ammo_357" "Ammo->357 Magnum" ""
{
"origin" notuser
"angle" notuser
"target" str
"killtarget" str "Object to kill when ammo is picked up"
"delay" int "Delay before trigger"
}
As you can see, the name of this entity is "ammo_357". It is in the |Ammo >| sub menu and accessed by the Alias of "357 Magnum". There are no comments.
This is the basic build of an entity.
The variables:
"origin"
"angle"
"target"
"killtarget"
"delay"
Are in all basic entities.
Origin and Angle should have a type of 'notuser' That is because the user does not manually enter the coordinates for the entity. 'notuser' Leaves that upto
Qoole to figure out, so that the user may rotate the entity in any direction that they wish.
Now, scroll down past the ammo, and head to the Environment Variables (you'll see // ================================= // ================= // Environment)
The first thing in the Environment that you should see is:
flagdef "flags_beam"
{
1 "Start On"
2 "Random Strike"
8 "Ring"
16 "Start Spark"
32 "End Sparks"
64 "Decal End"
128 "Shade Start"
256 "Shade End"
}
This is a Flag Definition. This is for when there is the ability for a combination of choices that are allowed to happen to an entity. The numbers ARE
based on multiples of 2. When selected, the numbers add up to create a uniqe number. It makes it easier for the user to choose multiple settings by not
making the user look up integer numbers and add them together for the desired effect.
***Note - Common sense should kick in and tell you what the structure is ***
Now... In notepad that contains the halflife.ent, hit [Ctrl] [F] to do a find. type in: func_breakable
Perform the search... you should come up with:
entity "func_breakable" "Func->Breakable"
{
"targetname" str "Its name"
"target" str "What to target on break"
"globalname" str "A name for this object that flows through each level"
"renderfx" type_renderfx
"rendermode" type_rendermode
"renderamt" int "Changes how much the rendering effects are applied, or how strong they are used (1-255)"
"rendercolor" color "This is to apply a color to a rendering effect. 3 numbers are entered seperated by a space. Red Green Blue (1 25 125)"
"health" int "Strength"
"material" type_material "What it's made from"
"explosion" type_explosion "Direction the explosion goes"
"delay" int "Delay of breakage in seconds (decimals are allowed)"
"spawnobjects" type_spawnobjects "What appears when box is broken"
"gibmodel" str "Name of the model that you want to use for gibs when object is broken"
"explodemagnitude" int (0) "Explosion Magnitude (0 = None)"
"spawnflags" flags_breakable
model
}
By looking at this entity, you can tell that it is in a Sub menu of |Func >| with the name of "Breakable". You can also tell that this is an entity which
is applied to a brush. How can you tell?
The last line within the brackets:
model
}
Any entity that has 'model' as a variable without quotes at the end of an entity, that specifies that it's applied to a brush, or group of brushes.
That is the structure and contensts of an Entity set.
How to create the entity set.
Well, how do you make an entity set? The main thing to think of is what game is this entity set for and what mod is it for?
If you're making it for a new game that is supported by Qoole (I don't think that there is much room for this reason at this time) you'll need to get a list
of entities from the maker of the game (valve put most all the entities in a help file - which is where i got them from).
Then you do it all by hand... Like I said before, I have lost total track of the time it took me to make the entity set.
If you're making an entity set for a mod, like DoD, you need to get the entity list and their variables from the mod maker.
When you have the information for the mod specific entities, then you basically only add your comments and entities. Unless you're going to make new sub
menus, then you wont need to add class "SubMenuName". To save yourself a lot of time, and make the mod entity set easier to read, only put the Mod specific
entities in the file. Then to get the entity set to include the main game entities, you just put an 'include' statement in at the top of your entity set.\
It would look like this:
// This is my MOD Entity Set
// By ME , 10/19.2002
// Half-Life
include "halflife.ent"
// =================================
// Mod Specific Entities
entity .....
By putting 'include "halflife.ent"' in the file, you dont need to copy and paste all of the original Game Entity set. We split the half-life entity set up
into sections. That way you only include the entities that you need. (For TFC, you dont need weapons or ammo because each class is designated their weapon
-- so you wouldnt use halflife.ent, hlammo.ent, or hlweapon.ent)
For an entity set, you might only want to include the basic half-life engine/environment entities plus your own. In this case, you would want to
'include "hlbasic.ent"' So, your entity set would look like this:
// This is my MOD Entity Set with Basic Half-Life entities (No weapons, ammo, monsters)
// By ME, 10/19/2002
// Half-Life
include "hlbasic.ent"
// =======================
// Mod specific entities
If you wanted to put all of your mod entities under a sub menu, just add it...
// This is my MOD Entity Set with Basic Half-Life entities (No weapons, ammo, monsters)
// By ME, 10/19/2002
// Half-Life
include "hlbasic.ent"
class "MyNewSubMenu"
// =======================
// Mod specific entities
entity "mods_entity" "MyNewSubMenu->Mod entity" "this is an example, not a real entity!"
....
once again... there is a thing called common sense, it should kick in now, so i'm not going to go further into this not so complex process.
Where to Obtain Entity Information:
Now that you think you know how to do this extremely complex entity set deal... where do you find the data for your favorite game or mod? (Note, I think the
game entity sets are set for now...) Well, you find your mod entity info from the people that created your new favorite modification. Probably a good
person to ask would be the lead programmer, or lead level design artist. Another way to get the information you need is to disect a .fgd file that is
already made for your mod. I'm not a good one to ask about fgd files, but I believe there are tutorials for them... so you can learn their structure.
Good Luck!
Credits:
Person Doing the Dirty Work (Note to VolVe - Change this description if you want.)
VolVe
Tutorial Creator
Tim Barry Jr. (Ishkish) ishkish@yahoo.com
Created On -=- 10/20/02
Revised On -=- Never
Special Thanks:
Thanks goto WhiteFang, Hsup, Volve, TheRelentless, ^Fishman, and Qoole People! (Oh, Mercinary, or whatever, heres help from someone! Thanks for Giving me a reason to do this! :) )
Apologies:
Sorry TheRelentless, I said that I was going to do this like three years ago, or whenever qpop was in the middle of it's life, BUT I at least got it done finally!
Sorry to anyone, and everyone who was not able to pull apart the extremely, horrific, poor, (insert some more words here) code in the entitiy sets so that you might
be able to create some. Hopefully this will help enlighten you! Instead of waiting for me or someone else to make an entity set for you... This is a Do-It-Yourself deal...
               (
geocities.com/timessquare/arena)                   (
geocities.com/timessquare)