First, let’s create a table.
Now, let’s Edit the table.
You’ll see each column in your table has a drop-down menu where you can select an attribute type. To change the type of column, select the drop down arrow and click on the type of attribute you’d like. If you start with one type of data and change it later, GameSalad will attempt to convert all of the cells in that column to the new attribute data type.
To add information to a cell, make sure you’ve selected a column / attribute type, as well as set a number of rows you would like to utilize. Simply click on the cell and begin typing.
Please Note: You CANNOT type in a row/column if its location exceeds your max number of rows or columns.
To Import a .csv file into GameSalad, navigate to the table you would like to import information to, and open it. Click the “Import CSV” button at the top right corner. Select the CSV you would like to import, and click “Open”.
Select the type of information you’re importing and click “Import”.
Using the Data in your Table
To utilize your newly added table data:
Navigate to the actor you would like to reference the data, and give it a behavior or rule that utilizes the expression editor.
Click on the “e” to open the expression editor.
Click the “Insert Function” drop down menu.
Click the “TableCellValue” function
Within the function tableCellValue(table,row,col) you can now enter the information accordingly. Navigate to the Game Attributes Browser and specify which of your Tables to use in the first “table” coordinate. Specify the row and column coordinates. Please note that these can be modified and randomized by using additional functions and attribute references.
Additional Table Functions
There are two additional table functions that can be used to gather table information.
- “TableColCount” is used to get the maximum number of columns in the specified “table” field
- “TableRowCount” is used to get the maximum number of rows in the specified “table” field