Kerbal Space Program 2 Wiki:Manual of Style/Data: Difference between revisions
More actions
(Added layout for parts data) Tag: 2017 source edit |
(Added some important notes) Tag: 2017 source edit |
||
Line 9: | Line 9: | ||
== Layout == | == Layout == | ||
=== Parts === | === Parts === | ||
The proper | The proper JSON-formatted layout can be found at [[Data:Example]]. Take note of the following: | ||
* Comments are not supported by JSON formatting. A dummy <code>_comment </code>parameter can be added if necessary but should not contain any information that would need to be passed or handled outside of the data page. | |||
* Any numerical parameters are only to be given numerical values. Units are handled separately. For <code>mass</code>, <code>max_temp</code>, and <code>imp_tol </code>the units are implicitly <code>t</code>, <code>K</code>, and <code>m/s</code>, respectively. Units for values in part type and part module parameters are implicitly handled as present in-game unless a <code>units </code>param exists which is then used instead. | |||
* All parameters are to be implemented as strings except for where a boolean is appropriate. Numerical data should be implemented as a string, not as a number, since the data page is used for primarily presenting text and not performing calculations. | |||
Latest revision as of 18:52, 8 October 2024
The following are guidelines for various aspects of writing data pages in the Data: namespace, established by consensus among KSP 2 Wiki editors. Please discuss them on the talk page if you have ideas or questions. Editors should also be familiar with the main Manual of Style.
Function[edit source]
Data pages contain JSON-formatted information on particular entities. The Page content model
in the Basic information
section of the page's Page information
display must be set to JSON
, which is enabled by default for the Data: namespace.
Naming conventions[edit source]
Data articles are to be titled explicitly per their respective subject, e.g. Data:IX-6315 "Dawn", Data:PPD-20 "Wayfarer", Data:Kerbin, Data:Laythe, et cetera.
Layout[edit source]
Parts[edit source]
The proper JSON-formatted layout can be found at Data:Example. Take note of the following:
- Comments are not supported by JSON formatting. A dummy
_comment
parameter can be added if necessary but should not contain any information that would need to be passed or handled outside of the data page. - Any numerical parameters are only to be given numerical values. Units are handled separately. For
mass
,max_temp
, andimp_tol
the units are implicitlyt
,K
, andm/s
, respectively. Units for values in part type and part module parameters are implicitly handled as present in-game unless aunits
param exists which is then used instead. - All parameters are to be implemented as strings except for where a boolean is appropriate. Numerical data should be implemented as a string, not as a number, since the data page is used for primarily presenting text and not performing calculations.