Data Collections[edit | edit source]
Description[edit | edit source]
A data collection is a new type of catalog that allows users to declare and group a set of data elements in a collection. A collection can be thought of like any other single piece of data such as a unit, ability, or upgrade.
When copying, renaming, or deleting a data collection, the editor will intelligently apply the same action for all data elements in the collection. For example, when copying a data collection, users will be prompted to provide a name for the new collection. The editor will then duplicate every data entry within the collection and name them accordingly. The editor will also set all linked fields such that the new data entries all point to their new counterparts.
- Deleting a data collection will delete all data entries in the collection.
- Changing the id of a data collection will also change the ids of all data entries in the collection.
- The data entries of a data collection can either be set manually or be auto-populated.
- Data collections make use of a new key character, “@”, in naming child data entries. The data collection system can automatically search the entire catalog to find any data entry whose id starts with the id of the data collection followed by the character, “@”. It will then automatically add them into the collection.
- Because of this linked functionality, whenever the effect tree of an ability is changed, the corresponding data collection and its data entries will automatically be updated.
- Menu: Data Collection -> Auto Fill Data Collection will automatically search the entire catalog and find any data entry with an id that starts with the data collection id followed by the character “@”. It will then automatically add them into the corresponding collection.
- Menu: Data Collection -> Auto Name Data Collection will rename the data entries of the data collection based on the name of the data collection.
- Data collections also allow us to add extra relationship information between data entries. For example, with data collections, the game can now understand information such as “what is the main actor for this unit?”.
- Many other features in this update are dependent on this data collection feature. Data collections expect certain coding conventions or guidelines to expose their full potential:
- All data collection should be as self-contained as possible.
- For example, an “Ability collection” should always work whenever you add it to a unit, and an ability should never be hardcoded to only work on specific units or units with specific weapons. As a cautionary example, in the old SC2 database, there was a Void Ray passive that increased damage after attacking for a long duration. This passive was actually fake, and the functionality was hardcoded into the weapon of the Void Ray itself. In this new era with data collections, we heavily discourage this misuse of data. As such, many new features described below were created to help achieve this goal.