001 Game Creator Guide

A short introduction to Tables for 001 Game Creator

A short introduction to Tables

Overview

An introduction to Tables and their Events and Use Values.

What are Tables?

Tables are essential if your project contains a lot of data, such as a quest log and actor states. They are essentially a spreadsheet within 001 Game Creator, from which you can edit and get values on a specific axis, like in Google Docs or Excel. The Table can also be resized at runtime. This guide assumes you’re familiar with Use Values in 001 Game Creator scripting.

Table Events

You will notice that for the Axis parameter of the events, I’m using 1, 2, 3 as values instead of X, Y, Z. In 001 Game Creator 1 represents X, 2 represents Y and 3 represents Z axises.

Clear Table

This event resets all values inside the Table to 0.

Delete Table Row

This event removes a table row/column inside your Table. Using the same principle as before, Axis is 1 = X, 2 = Y, 3 = Z. The Value parameter is which row/column will be deleted.

In this event, the X1 row will be deleted. When this event is used what used to be X2 is now X1 and so on..

Edit Element of Table

This event allows you to change what a value is inside of a table, at a specific axis.

These input values will set the value of X1, Y1, Z1 of the table to 5.

Fill Table

This event fills the Table with the Value parameter, starting at XYZ and ending at another position. Every value inside these values will be changed to the Value parameter.

Reset Table

This event clears the entire Table and sets the size to 0,0,0 which makes it unusable in scripting. To use the Table again after using this event, use the Resize Table event to give it a valid size.

Resize Table

This event resizes the Table to a new size. You also have the option to Clear it, which will reset all values inside the table to 0. You can see that the X value has a dark grey background. This means that it’s using a value as a parameter. Using the formula below, it will increase the X size of the Table by 1.

The same can also be used for Y and Z. To get the Y size, you must write Table.Size(My_Table, 2) + 1 instead. See that the number after My_Table is now 2 instead of 1. This means it’s getting the Y size instead of X. To get the Z size, write 3.

Sort Table Row

This event comes in handy if you need to sort for example an inventory, a bunch of Actor names or the value of an item. Order and Type decides how the Table should be sorted. X Y Z is the starting position of the sorting.

Table Axis Loop

This event is used when you want to go through every element inside a specific Table Axis. You see there’s a new kind of parameter this time, found in all Loop related events; the Variable. This variable will have it’s value set to whatever is inside the current cell of the loop. This can for example be used to spawn elements inside an Interface or actors to a Map, to name a few.

Table Loop

This event works similar to Table Axis Loop, but instead of looping a specific axis inside the Table, it loops through every single cell and stores the X Y Z position of the cell to the X Y Z variables.

Use Values

Now that you’re familiar with how to edit a Table at runtime, let’s get into how you can read data from a Table and getting other properties from it such as the Size.

From the Use Value button, the Table menu gives you three options, Size, Find in Table Axis and Find in Table. Table Size is only visible while the Include All checkbox is checked.

If you Scroll back to the top, there’s one more Use Value, and arguably the one you’ll use the most; Element in Table. This returns the value inside a Table at the given Axis.

The Use Value to type in without having to open the window are written inside the [ ] in this guide.

Size [Table.Size(Table Name, Axis)]

Returns the Size of the Table on the given Axis.

Find in Table Axis [Table.Find(Table Name,search axis,Value, x start, y start, z start)]

This Use Value returns a number based on the axis what your searched for is on.

Find in Table [Table.FindAny(Table Name,Value,X Start, Y Start, Z Start)]

Returns the X, Y, Z coordinates of a cell as a collection.

SteamSolo.com