User Tools

Site Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
mapping:cawe:dialogs:entityinspector [2008-02-18 16:57]
Joern created
mapping:cawe:dialogs:entityinspector [2013-01-07 12:07] (current)
Line 1: Line 1:
 ====== The Entity Inspector Dialog ====== ====== The Entity Inspector Dialog ======
  
-This dialog is opened by selecting **Entity Inspector** from [[mapping:​cawe:​menureference:​edit]].+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 ​contains 3 tabs that are used to find/select entities in the map, to edit the entities properties and to create/edit map scripts.+The dialog ​is opened by selecting ​the **Entity Inspector** item from the [[mapping:​cawe:​menureference:​edit|Edit]] menu.
  
 +The following text describes the three "​tabs"​ that implement the main features of the dialog.
  
-===== List =====+ 
 +===== Entity Report ​=====
  
 {{:​mapping:​cawe:​dialogs:​dialog_entity_inspector_page1.png }} {{:​mapping:​cawe:​dialogs:​dialog_entity_inspector_page1.png }}
  
-This tab contains ​a list of all entities in this map, that is filterable with different filter options.+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.
  
-  * **Entity list**: A list of all entities ​in this map, filtered ​by the given filter options belowClicking on an entry marks this entity (by holding down the ''​CTRL''​-key you can mark more than one entity)+The entities ​are listed ​by the name of their entity class and their instance name, if one has given, e.g. "''​static_detail_model (TreasureChest)''​"
-  * **Select**: Selects ​the entity/entities, that are currently marked ​in the list in the same way as if they were selected in a 2D or 3D view+Clicking on a list entry selects ​the related ​entity in the 2D and 3D views of the map as well
-  * **Go to**: Centers ​the views onto the selected entity from the list+You can select multiple entities at the same time by holding ​the ''​CTRL''​ or ''​SHIFT''​ key while clicking on an entry: 
-  * **Delete**: Deletes the selected entity from the list and the map. +this works just like in Windows Explorer
-  * **Properties**:​ Opens the [[mapping:​cawe:​dialogs:​objectprops|Properties Dialog]] for this entity.+The presented ​list is sorted in alphabetical order and can be filtered by several options as described below.
  
-  * **Filter** +  ​* **Go to**: Centers the 2D views on the selected entities. 
-    * **Brush Entities**: ​Show brush entities in list. +  * **Delete**: Deletes the selected entities (both from the list and from the map). 
-    * **Point Entities**: ​Show point entities in list. + 
-    * **Include hidden Entities**: ​Show hidden ​entities in list+  ​* **Filter**: The controls in the filter box determine which entities are included in the list above. 
-    * **By Key/​Value**: ​Filter ​the list by a specific ​key/value pattern ​in the entity properties+    * **Brush Entities**: ​When checked, the brush-based ​entities ​are included ​in the list. 
-    * **Exact**: Toggles if the key/value pattern has to be exact the same or if partial match counts. +    * **Point Entities**: ​When checked, the point-based ​entities ​are included ​in the list. 
-    * **By Entity Class**: ​Filters ​the list by entities from a specific ​entity class.+    * **Include hidden Entities**: ​When checked, ​entities ​are included even though they are normally hidden (as part of a VisGroup) ​in the 2D and 3D views
 +    * **By Key/​Value**: ​You can reduce ​the list of entities to those whose properties match the given key/value pattern. 
 +    * **Exact**: Toggles if the key/value pattern has to be an exact match, ​or if partial match counts ​as well
 +    * **By Entity Class**: ​If checked, only entities of the specified ​entity class are shown.
  
  
Line 31: Line 39:
 {{:​mapping:​cawe:​dialogs:​dialog_entity_inspector_page2.png }} {{:​mapping:​cawe:​dialogs:​dialog_entity_inspector_page2.png }}
  
-This tab show the properties ​of the currently selected entity/entities in a grid. +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 top-left button switches between a categoric and alphabetical viewThere are 3 different categories:+
  
-  * **Class Keys** Keys that are defined by an entities class and therefore mandatory for this entity. +The properties ​are presented in tabular form as pairs of //keys// (on the left) and their related //values// (on the right): 
-  * **Undefined Keys** Keys that are not defined by the entities class and added to the entity ​manually+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
-  * **Mixed Keys** Keys that are only used by a subset of the currently selected entities or have different types for different ​entity classes. ​Keys in this category can not be edited.+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 gameUpdating ​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.
  
-The background color of each property identifies ​the state of its value. ​There are 4 different states ​a value can have:+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, key/value pair), also the variables //type// is known to CaWE, which is uses to assist you entering correct values: 
 +  * keys that only accept integer values do not accept commas, periods or letters, 
 +  * keys that accept boolean values or a choice from an enumeration act accordingly,​ 
 +  * keys that expect colors will provide you a color chooser and an automatic preview, 
 +  * keys whose values are multi-line strings come with an appropriate editor, 
 +  * keys that expect file names (e.g. for sounds, models, etc.) will provide you with a three-dots "​..."​ browse button (which is //very helpful// :!:), 
 +  * and so on. 
 +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.
  
-  * The property'​s ​value matches ​the default value defined by the entities ​class and only used by one entity. +Note that at the top of the dialog, there is a summary about the number of selected entities and their classes. 
-  ​* ​The property'​s ​value is a custom value defined ​by the user and only used by one entity. +At the bottom of the dialog, a short help text for the currently selected key is provided. 
-  ​* ​The property'​s value matches ​the default ​value defined by the entities class and only used by more than one entity. +Help is also available in form of tool-tips for the key the mouse pointer is currently over. 
-  * The property'​s value is a custom value defined by the user and only used by more than one entity.+ 
 + 
 +==== Classname ==== 
 + 
 +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. 
 + 
 + 
 +==== Undefined Properties ==== 
 + 
 +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 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
 + 
 + 
 +==== Background Colors ==== 
 + 
 +The property ​grid employs several background colors in order to indicate certain conditions of the values: 
 +  * <color #​000000/#​FFFFFF>​White background</​color>​ indicates that this is just a normal value. 
 +  * <color #​000000/#​CCDDFF>​Light blue background</​color>​ also indicates a normal value that also happens to be the entity class'​s ​default ​value for this variable. 
 +  * <color #​000000/#​FFDDCC>​Light orange background</​color>​ is used whenever multiple entities are selected that have //​different//​ values for the //same// key. You can still enter a new value for such keys: The key of each selected entity will then be set to the same new value and the background color will change back to white accordingly. 
 +  * <color #​000000/#​FF9797>​Light red background</​color>​ is currently ​used at only one occasion: When you set a ''​model''​ key and have not yet specified a value for a ''​collisionModel'',​ the ''​collisionModel''​ variable is temporarily highlighted with this color in order to remind you to also set a collision model. 
 + 
 + 
 +==== Working with multiple entities ==== 
 + 
 +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 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.
  
-The tab ends with a help text containing the currently selected property'​s name, description and property type. 
  
 ===== Map Script ===== ===== Map Script =====
  
-FIXME This section ​will be created ​later.+In the Map Script tab, you can view and edit the source code of the maps current script. 
 + 
 +FIXME 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. ;-) 
mapping/cawe/dialogs/entityinspector.1203350245.txt.gz · Last modified: 2013-01-07 12:07 (external edit)