Game logic - Data set – Ylands

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "{{DEFAULTSORT:{{#sub:{{PAGENAME}}|19}}}}" to "{{DEFAULTSORT:{{#sub:{{PAGENAME}}|13}}}}")
 
(2 intermediate revisions by the same user not shown)
Line 2: Line 2:
Data set allows to store spreadsheet data in a form of a game logic. Data can be imported from an external CSV file.  
Data set allows to store spreadsheet data in a form of a game logic. Data can be imported from an external CSV file.  


=Properties=
= Properties =
[[File:Ylands-Editor-GL-Dataset-Properties.png|thumb|250px|right|Dataset properties after file import]]
[[File:Ylands-Editor-GL-Dataset-Properties.png|thumb|250px|right|Dataset properties after file import]]
==File==
== File ==
* '''Star icon''' - creates a template .csv file with item property format examples
* '''Star icon''' - creates a template .csv file with item property format examples
* '''Folder icon''' - select a file for import
* '''Folder icon''' - select a file for import
Line 10: Line 10:
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.
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==
== Delimiter ==
Select the column delimiter symbol from the drop down menu.  
Select the column delimiter symbol from the drop down menu.  
You can choose from comma, semicolon or space, but make sure the data format reflects your choice. To set a delimiter of the .csv file, please consult your spreadsheet application of choice documentation.
You can choose from comma, semicolon or space, but make sure the data format reflects your choice. To set a delimiter of the .csv file, please consult your spreadsheet application of choice documentation.


==Number of rows==
== Number of rows ==
'''Read only''' - displays the row count of the imported data
'''Read only''' - displays the row count of the imported data


==Columns==
== Columns ==
'''Read only''' - lists the name, data type and index 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.
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.


Line 30: Line 30:
[[File:Ylands-Editor-GL-DataSet-1strowcol.png|frame|center]]
[[File:Ylands-Editor-GL-DataSet-1strowcol.png|frame|center]]


=Related instructions=
= Related instructions =
* Get Row Count
* Get Row Count
* Get Column Count
* Get Column Count
Line 37: Line 37:
----
----
{{Navbox/Ylands}}
{{Navbox/Ylands}}
{{DEFAULTSORT:{{#sub:{{PAGENAME}}|19}}}}
{{DEFAULTSORT:{{#sub:{{PAGENAME}}|13}}}}


[[Category: Game Logic]]
[[Category: Game Logic]]
[[Category: Ylands 1.4]]
[[Category: Ylands 1.4]]

Latest revision as of 14:21, 24 November 2023

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

Dataset properties after file import

File

  • Star icon - creates a template .csv file with item property format examples
  • Folder icon - select a 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. You can choose from comma, semicolon or space, but make sure the data format reflects your choice. To set a delimiter of the .csv file, please consult your spreadsheet application of choice documentation.

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.


Ylands-Editor-GL-DataSet-example.png


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.

Ylands-Editor-GL-DataSet-1strowcol.png

Related instructions

  • Get Row Count
  • Get Column Count
  • Get/Set Value