Construct 3 icon

Construct 3

Documentation

Dictionary editor

Published 17 Aug, 2017
314 words
~1-2 mins

Paid plans only The Dictionary editor allows editing a dictionary data file for the Dictionary object. The data you enter can be loaded at runtime by loading the project file in to the Dictionary object. It provides a visual way to set the initial data for a Dictionary. The Dictionary Editor appears when editing or adding an dictionary data file (in JSON format) in the Project Bar.

The Dictionary EditorThe Dictionary Editor

Opening the Dictionary Editor

To open the Dictionary Editor in a new project, start by adding a new Dictionary file in the Files folder of the Project Bar. For more information, see project files.

Editing dictionaries

Initially the dictionary has a single item, which means there is just one row available. Use the Size setting to change how many items are available. This determines how many rows appear in the editor, allowing you to enter more data. Each row represents a key in the dictionary (in the left column) and its associated value (in the right column).

Enter values in cells simply by typing in them. You can also navigate between cells using Tab or Ctrl + Arrow keys on the keyboard. Note that keys are always stored as strings, and the type of values are determined automatically: if you enter a number (e.g. 4.2), the value is set to a number type, otherwise it is saved as a text string.

Right-click a cell to open a context menu with options to clear, insert or delete rows.

De-duplicating rows

Dictionaries associate a value with a key. Due to the nature of dictionaries, there cannot be two identical keys, since there can only be one value per key. If you accidentally enter two identical keys, they will both highlight in red. You can click the Automatically deduplicate keys button to add numerical suffixes to any duplicated keys to automatically fix this problem.