Debian Codegraph @

qtfred/help-src/doc/dialogs/CustomDataDialog.html

raw symbols SCIP
1 <!DOCTYPE html>
2 <html lang="en">
3 <head>
4 <meta charset="UTF-8"/>
5 <title>Custom Data - QtFRED Help</title>
6 <link rel="stylesheet" type="text/css" href="../css/help.css"/>
7 </head>
8 <body>
9 <nav class="breadcrumb"><a href="../index.html">QtFRED Help</a> &rsaquo; Custom Data</nav>
10 <h1>Custom Data</h1>
11 <p>Accessed via <strong>Custom Data</strong> in the
12 <a href="MissionSpecsDialog.html">Mission Specs</a> dialog or the
13 <a href="CampaignEditorDialog.html">Campaign Editor</a>.</p>
14 <p>Attaches arbitrary key-value string pairs to a mission or campaign. Custom data
15 has no built-in effect on gameplay; it is intended to be read by Lua scripts that
16 know to look for specific keys.</p>
17
18 <h2>Pre-defined keys</h2>
19 <p>Lua scripts can register expected custom data keys by calling
20 <code>mn.addDefaultCustomData(key, defaultValue, description)</code>. When a
21 mission is opened in FRED, any registered key that is not already present in the
22 mission is automatically added with its default value. This ensures the expected
23 entries exist without the mission designer having to create them by hand.</p>
24 <p>The <strong>Description</strong> box on the left of the dialog shows the
25 description the script author provided for whichever entry is currently selected.
26 If the selected key is not one registered by a script, the box reads
27 <em>No help text provided</em>.</p>
28
29 <h2>Adding an entry</h2>
30 <p>Fill in the <strong>Key</strong> and <strong>Value</strong> fields and click
31 <strong>Add</strong> to create a new entry.</p>
32
33 <h2>Editing an entry</h2>
34 <p>Select an entry in the list to load it into the Key and Value fields. Modify the
35 fields as needed and click <strong>Update</strong> to apply the changes.</p>
36
37 <h2>Removing an entry</h2>
38 <p>Select an entry in the list and click <strong>Remove</strong> to delete it.</p>
39 </body>
40 </html>