Jump to content
Sign in to follow this  
Shadow72

[Tutorial] Data Sets

Recommended Posts

    So what do data sets do? Data sets allow you to import spreadsheets into Ylands. They are perfect for keeping the mess down when working with large amounts of data and are actually quite easy to use. To use them you will need a program to create and edit a spreadsheet(I use google sheets). Lets get started!

    The very top row of your spreadsheet is where you set the names of all the columns. The first column must be named Id(at least I think, i'm still not too sure). You need to increment the id column for each row you add starting at 0. The rest of the columns you can name whatever you want. I named one Text. Be aware that you cannot have any empty cells in a row with data in it. If you do you will have errors when importing it into Ylands. You also cannot have any formatting. 

ed9da2665522efb64ec15c69f2ccc7b2.thumb.png.73116621ce8717d73e5ccabf6b99e7bd.png

 

    Once you have created your spreadsheet it is time to download it. For google sheets you go to file > download > comma-separated values(.csv). For excel you want to go to Save As, and for the Save as select "CSV (Comma Delimited)"(Thank you @Valour4Eva).

image.thumb.png.c7a012036b5609b35a757eae0fbd0248.png.624b4fea4bad32550bc17825c2e499ca.png

Now it is time to import it into Ylands. Place down a Data Set game logic in your world and click on the folder in the properties window.

3826986d0a685220e785363dedb08ab1.thumb.png.c026cfe01e839bdf21d6061dcabeb454.png

It will bring up a folder on your computer and you want to copy your .csv file into it. After copying your file you want to go back to Ylands and close the properties window for the dataset and reopen it. Under the file drop down you will now be able to select the file you just made. Click the import button and now you are ready to start using the data set!

2cafd432b35d0fd2abc338a01b43c0f0.thumb.png.b7fc340b018d7946dfa1a9984fbe7585.png

Here is an example of getting data from a dataset.

5e78815d0c048a853ce8d2c68c121d62.thumb.png.1e3167e5dffab965cd4d0f51febfc4c2.png

And here is an example of looping through a data set.

2021894890_6b13117be380faa752891c5cd876eb77(1).thumb.png.57e73b8a8de55dd02a3fa16cb6cf19ae.png

 

If you run into any issues or have any questions feel free to ask me for help. Ill try and respond as soon as possible.

Edited by Shadow72
Added how to save spreadsheet in excel
  • Like 2
  • Thanks 1
  • Upvote 2

Share this post


Link to post
Share on other sites

uh, i got "cannot load file" error. 
Maybe i had different delimiters on csv file and ylands options
I will try it again. 

Thanks a lot for this ?

Share this post


Link to post
Share on other sites
2 minutes ago, jchob said:

uh, i got "cannot load file" error. 
Maybe i had different delimiters on csv file and ylands options
 I will try it again. 

Thanks a lot for this ?

If you want you can send me a pic of your spreadsheet and I can see if I can spot the issue.

Share this post


Link to post
Share on other sites

Nice tutorial shadow! As far as how to do that with excel, you just save the dataset you want to incorporate into ylands as a CSV shown below:
image.thumb.png.c7a012036b5609b35a757eae0fbd0248.png

Edited by Valour4Eva
  • Thanks 1

Share this post


Link to post
Share on other sites
On 10/28/2020 at 3:16 PM, Shadow72 said:

The first column must be named Id(at least I think, i'm still not too sure).

Just wanted to mention I tested this real quick by naming it "Row" and it works, so It doesn't need to be named ID.

  • Thanks 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×