This dialog presents detailed information about your map and its entities. It shows you the hierarchically structured list of entities that your map is composed of, allows you to inspect the properties of each entity, and provides a built-in source code editor for the map script.
The dialog is opened by selecting the Entity Inspector item from the Edit menu.
The following text describes the three “tabs” that implement the main features of the dialog.
The Entity Report keeps a list of all entities that exist in the map. It is used to easily manage, find and select individual entities, and thus provides a convenient alternative to locating entities in your map manually.
The entities are listed by the name of their entity class and their instance name, if one has given, e.g. “
Clicking on a list entry selects the related entity in the 2D and 3D views of the map as well.
You can select multiple entities at the same time by holding the
SHIFT key while clicking on an entry:
this works just like in Windows Explorer.
The presented list is sorted in alphabetical order and can be filtered by several options as described below.
The Properties tab is one of the most important dialogs in CaWE, because it allows you to inspect, set and modify all of the advanced attributes of the currently selected entity.
The properties are presented in tabular form as pairs of keys (on the left) and their related values (on the right):
The set of keys that are available for an entity is defined by the entity's class. It can therefore not be changed directly within CaWE.
Adding, removing or renaming keys is only possible via the game's
EntityClassDefs.lua script, which contains the definitions of all entity classes for a game. Updating this script possibly affects all maps of a game, and is consequently normally never done for an individual map,
but in the early planning stages of a MOD.
Changing the values however is the daily bread and butter of a mapper. Therefore, doing so is not only easy, but it has also been made as convenient as possible. In most cases, you just click into the desired value field and enter a new value directly. For each variable (that is, a key/value pair), also the variables type is known to CaWE, which is uses to assist you entering correct values:
We're currently working on improving this feature further, e.g. with “Play” buttons for listening to sound files, a preview facility also for model files, etc.
Note that at the top of the dialog, there is a summary about the number of selected entities and their classes. At the bottom of the dialog, a short help text for the currently selected key is provided. Help is also available in form of tool-tips for the key the mouse pointer is currently over.
Changing the class of an entity is a special action, because it corresponds to deleting the entity and re-instantiating it under a different class but with the same properties. Nonetheless, you can use the special
classname property to change an entity's class like any other property:
You're provided with a choice box that contains all possible new classes for that entity, and just making the selection reincarnates the entity as an object of the new class.
Please note that currently there is a restriction that brush-based (solid) entities can only be converted into entity's of classes that are brush-based, too. Similarly, entities that are point-based can only be converted into entity's that are point-based, too.
Sometimes entities come with key/value pairs that have no corresponding definition in their entity class.
Such key/value pairs can occur occasionally e.g. when an entity was converted to a different class (see below), an entity class got a variable definition removed after a map has already been made with it, or when an entity has been imported from an entirely different game.
The entity might then bring in a key named e.g.
light_pulse_frq that is utterly unknown in the context of the current games entity definitions.
Another but similar case occurs when the entity's class name is unknown among all entity classes of the current game. This typically happens when you try to import for example an entity of class “stuffed_animal” of a children's game into a game about aliens or robots, or in any other case when the current game just knows nothing about the imported entity class.
In these cases, there is no corresponding definition for such keys in the game definition. CaWE therefore collects such occurrences separately and keeps them under the special category “Undefined Properties”.
Because undefined properties are not dealt with by the game in any way, you're free to change and modify them at will. You can even right-click them to open a context menu that allows you to rename them, to add new ones or to delete them.
In most practical cases, you'll want to get rid of undefined keys though, which can be achieved by renaming them to something meaningful, by deleting them, by changing the entire entity class to something else, or a combination thereof.
The property grid employs several background colors in order to indicate certain conditions of the values:
modelkey and have not yet specified a value for a
collisionModelvariable is temporarily highlighted with this color in order to remind you to also set a collision model.
The Properties tab works also very well when more than a single entity is selected, or in fact, any number of them is selected at the same time. In order to present you the properties of multiple entities, CaWE “overlays” them for you, so that even great amounts of simultaneously selected entities remain easy to understand and manage.
In order to achieve this, CaWE makes sure that properties that are candidates for layering, but otherwise incompatible with each other for any reason (e.g. because the property is known only to some but not all of the entities, or defined multiply with different types), are treated specially as “mixed” properties. A property that is marked as “mixed” has attributes in one entity that are non-existent or different in another, which generally makes them incompatible to each other.
Such mixed properties are therefore listed in another separate category, and they are protected from editing (“read-only”). This makes sure that you can see such affected properties, but not inadvertently get nonsensical values written into lots of entities. Note that this is not a restriction, because it's just another way of saying: “Stop! If you assign a value to this property, there is at least one entity affected for which doing this makes no sense at all.”
If you still want to edit a property that is listed as “mixed”, there is an easy way to overcome the problem: Just select fewer entities until the entity that was the reason for the property being listed as “mixed” is gone. When no conflicts remain, the property gets re-listed among the normal properties, and you can edit it freely.
In the Map Script tab, you can view and edit the source code of the maps current script.
This feature is not yet implemented – I'm very sorry. Both the functionality and the documentation will be provided later. However, please note that the game code and the Cafu engine already fully implement and support map scripting! Use any text editor of your choice in order to program your map scripts independently and outside of CaWE. In fact, all the example scripts that come with the Cafu releases have been written that way.