How do I work with spreadsheet data?

0 favourites
  • 4 posts
From the Asset Store
Data+ is the best Data Management solution for Construct 3. It contains 4 Addons (Plugin & Behavior).
  • Hi,

    I recorded a video on youtube, linked here that walks through my project and my question. youtu.be/aGWzG_T1wYc

    Essentially, I have an rpg game where I have 100 items that a player could make. Within that is up to 5 different raw materials and individual costs. Currently, I am using AJAX to pull a text file for EACH array I have. In other words, I have 12 arrays just for one item that can be made at the crafting table. Each array feeds from a unique text file. So I have 12 text files.

    Name

    Frame # from my loot sprite object

    Raw Mat 1...to 5....if there are 5.

    Raw Mat Cost for each Raw Mat for a max of 5.

    This all functions however it is very tedious because I have many, many text files. I'd rather use one massive Microsoft Excel sheet to house the data and save it as something that I can upload into my Construct 3 project and feed off that. However, I have struggled to learn XML and JSON and I cannot wrap my head around it so now I am throwing up my white flag of surrender and asking for help.

    I see there's a new CSV plugin but it seems to have limited functionality. I don't see a way to have each row be a different item# and the columns be the attributes. I'd love it if there was a way for it to work for my problem since I can make .csv files from Excel sheets.

    Thanks!

  • You don't need CSV, you can simply copy-paste data from Excel directly into C3 array editor. Just create an array with enough empty cells and press Ctrl-V

    You can make 2D and even 3D arrays. For example, in our game we have ShopsStock array with multiple sheets. Each sheet is a different shop. On Y axis there are items, on X axis - properties like item cost, materials etc.

    Check out this comment:

    construct.net/en/forum/construct-3/how-do-i-8/trying-plan-code-game-start-179514

    I also suggest learning JSON, it can make your task much easier. I actually prefer using JSON now where possible.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Thanks. That's a nice idea. I was thinking of converting(redesigning) my arrays to multidimensional. I've been doing one-way arrays for so long, it's time for me to grow, pun unintended.

  • I got it working! That is so sweet and simpler to do than having 12 different text files,for loops, requests, etc..., just need one! Boom!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)