The DataBase View serves as the place to organize the libraries of game items. It contains access to the Entity library, the Particle Editor and Game Tokens database. You can access the different libraries by using the tabs at the top part of the DataBase View.
The following links describe, in detail, each library in the DataBase View:
Benefits of Using Libraries
The use of the library system for entities, prefabs, particles is to make variations on top of the standard default setting you find within the Entity list on the Create Object tool.
As an example, you can add an AI into a level via the Create Object tool and choosing Entity -> AI -> Characters -> Human.
This is the most basic reference of an AI entity (or any entity) in the engine. You can modify this AI's properties directly on the AI you just added via the Properties panel. Say you want to make variations of the AI via different weapon load-outs, e.g. rifle, rifle + pistol, shotgun etc. If you place down a large number of AI, you would have to individually configure each placed entity in the world.
Storing these AI variations into a library means you can configure a 'template' within the database, detailing his load-out, health, faction etc., and then populate your level via these 'Entity Archetypes'.
The benefit of using a library is that now you only have to configure the template once here in the database. Every instance of this Entity Archetype you placed inside your level will automatically inherit the settings defined within the database. To make changes to the configuration of the entity, you now modify the item in the database and all the instances you placed in the level will also automatically inherit these updates.
There are 2 ways libraries are stored:
A level-based library is local only to that level (hence the name). Another level in your game cannot view the contents of another levels based library.
A Library-based library, can be shared between levels (think of it as a global library). Since it's not tied down to any specific level, all levels may access the contents of a 'global' library. External libraries (global) are saved as *.xml files.
- Level-based databases are baked into the level files so there isn't a location for them.
- Library-based databases are stored within a specific area within your Game Folder:
All Libraries have two or three things in common:
- In the top you can find a toolbar with various tools to interact with an individual library.
- On the left is the items browser.
- On the right are their properties.
- Additionally, some libraries have a 3D Preview window.
The toolbar can be divided into two groups: buttons for library control and buttons for library item control.
|Load Library||Loads a library and adds it to the Library drop down List.|
|Save Modified Libraries||Saves the changes made to the active library.|
|Add Library||Adds a new, custom library.|
|Remove Library||Removes the selected library.|
|Library List||Drop-down list of libraries within the current tab.|
|Reload Library||Reloads the active library. All changes you made since the last save will be lost.|
|Add New Item|
Adds a new item to the active library. Depending on the Tab you are in, it will offer you different options.
|Clone Library Item||Makes an exact copy of the selected item and pastes it in the same group.|
|Remove Item||Deletes the selected item from the database.|
|Assign Item to Selected Objects||Select an item in the 3D Viewport and assign the highlighted item in the DB to your selection.|
|Get Properties From Selection||Select an item in the 3D Viewport and this will open up the corresponding DB and highlight the entry in the list.|
|Reload Item||Reloads the selected item.|
|Undo||Undoes your last action.|
|Redo||Redoes a previously undone action.|
|Copy Item||Copies the selected item.|
|Paste Item||Pastes the copied item.|
|Only available in the Particles Library|
|Reset Item to Default||Resets all the properties of the selected item to their default values.|
|Enable/Disable Item and All Children||This feature is used to enable / disable the hierarchy within the particle itself. Useful for debugging pfx where 1 child emitter is causing problems, but you don't know which one. |
By disabling the individual emitters within a pfx, (or all at once) you can track down which is the offending effect.
Adding Items to a Database
Adding new entries into a library is the same process for Prefabs, Particles and Game Tokens. The Entities are adding to libraries with 1 additional step. This is to define what 'type' of entity that it is, that you want to add into the database.
Either have an existing library open or just use the level library.
Add a new database item, and the first window to pop up allows you to select which class of entity you want to add.
In this example we are adding a new AI (human class) to the database:
Then once you have selected your 'class', the next window that opens is the Group and Name options. This is where you organize the structure of how the info is displayed back to yourself.
Use the Group to logically keep items within the same area, and use the Name to define what this Entity Archetype is going to be called. To continue on with the example, (adding an AI into the database) we will set the group to Enemy. This will place the new item into the Enemy folder that already exists in the Characters database.
Prefabs, Particles and Game Tokens
Prefabs, particles and game-tokens work in the same way as entities, but without the first step (selecting a 'class'). This is not required.
Add a new item and the pop-up will appear. use the Group to logically keep items within the same area, and use the Name to define what this prefab is going to be called.