Game logic - Data set – Ylands
Lou Montana (talk | contribs) m (Text replacement - "{{Ylands editor navbox}}" to "{{Navbox/Ylands}}") |
No edit summary |
||
Line 1: | Line 1: | ||
=Description= | =Description= | ||
Data set | Data set allows to store spreadsheet data in a form of a game logic. Data can be imported from an external CSV file. | ||
=Properties= | |||
==File== | |||
* '''Star icon''' - creates a template .csv file with item property format examples | |||
* '''Folder icon''' - opens a selected file for import | |||
= | Once an external file is selected, it's name can be found written next to icons. To load the contents of the file, use the IMPORT button on the bottom of the properties window. | ||
==Delimiter== | |||
Select the column delimiter symbol from the drop down menu. | |||
==Number of rows== | |||
'''Read only''' - displays the row count of the imported data | |||
==Columns== | |||
'''Read only''' - lists the name, data type and index of the imported data columns | |||
=CSV format= | =CSV format= | ||
Regardless of the intended use of the data, some rules apply in creating the .csv file. First row of the table is reserved for the column names and the first column of the table for the row names. | |||
[[File:Ylands-Editor-GL-DataSet-example.png|frame|center]] | |||
To visualize the effect on the imported data, we can use the example DATA_SET.csv created by the star icon in the properties and compare it to how it is structured in a text editor or spreadsheet application. Note that related instructions now list these names in their Row and Column drop-down menus. | |||
[[File:Ylands-Editor-GL-DataSet-1strowcol.png|frame|center]] | |||
Finally, you need to decide on column delimiter. Comma, semicolon and space are all options, as long as the data format reflects your choice. To set a delimiter of the .csv file, please consult your spreadsheet application of choice documentation. | |||
=Related instructions= | |||
* Get Row Count | |||
* Get Column Count | |||
* Get/Set Value | |||
---- | ---- |
Revision as of 14:14, 10 May 2021
Description
Data set allows to store spreadsheet data in a form of a game logic. Data can be imported from an external CSV file.
Properties
File
- Star icon - creates a template .csv file with item property format examples
- Folder icon - opens a selected file for import
Once an external file is selected, it's name can be found written next to icons. To load the contents of the file, use the IMPORT button on the bottom of the properties window.
Delimiter
Select the column delimiter symbol from the drop down menu.
Number of rows
Read only - displays the row count of the imported data
Columns
Read only - lists the name, data type and index of the imported data columns
CSV format
Regardless of the intended use of the data, some rules apply in creating the .csv file. First row of the table is reserved for the column names and the first column of the table for the row names.
To visualize the effect on the imported data, we can use the example DATA_SET.csv created by the star icon in the properties and compare it to how it is structured in a text editor or spreadsheet application. Note that related instructions now list these names in their Row and Column drop-down menus.
Finally, you need to decide on column delimiter. Comma, semicolon and space are all options, as long as the data format reflects your choice. To set a delimiter of the .csv file, please consult your spreadsheet application of choice documentation.
Related instructions
- Get Row Count
- Get Column Count
- Get/Set Value