User Tag List

Results 1 to 3 of 3

Thread: Is there an easy way to put a bunch of data in an array?

  1. #1
    No Products Registered

    Join Date
    Jan 2017
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Is there an easy way to put a bunch of data in an array?

    I want to use an array to store all of the numerical data for my game (basically, each game level has different difficulty values, about 10 or so, and I want to store them).

    Is there a way just to edit the array contents in the editor? Or do I REALLY have to put in an event for writing in every single array element, one at a time, potentially 50 or even more?

    I'm not talking about loading from a file. I tried that, but the files being in binary format means that I can't edit them (I assumed they'd be a CSV, seems weird they're not, or at least the option doesn't exist).

    I just want to put values in an array so I can read them mid-game.

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,159
    Mentioned
    28 Post(s)
    Tagged
    1 Thread(s)
    I would suggest making a little application to suit your needs,
    i.e. I made this some time ago for my own purposes,
    in case you could find it useful:

    CSV_to_array.mfa

    it's very rough...
    you can edit your arrays in excel and save as csv
    then simply place this mfa in the same folder where your csvs are and run it
    will prompt the csv he finds in the same directory
    pick one, choose the delimiter, and then you can save to number array or text array
    (will output filename.csv as >>> filename.arr)

    can't remember if it handled headers or not, in case just skip first line when populating the array

    btw > if you want to read them in-game, you can use the debugger (very awkward)
    and also consider the "datagrid object", which is basically like an excel-editor inside Fusion which can edit arrays, but is developer only

  3. #3
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Aug 2020
    Location
    Canada
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I know this is ancient but your MFA is simple but perfect. Much appreciated.

    I was messing around doing this using dynamic array object but it just crashes.

    Thanks again. Saving me so much time here

    Quote Originally Posted by schrodinger View Post
    I would suggest making a little application to suit your needs,
    i.e. I made this some time ago for my own purposes,
    in case you could find it useful:

    CSV_to_array.mfa

    it's very rough...
    you can edit your arrays in excel and save as csv
    then simply place this mfa in the same folder where your csvs are and run it
    will prompt the csv he finds in the same directory
    pick one, choose the delimiter, and then you can save to number array or text array
    (will output filename.csv as >>> filename.arr)

    can't remember if it handled headers or not, in case just skip first line when populating the array

    btw > if you want to read them in-game, you can use the debugger (very awkward)
    and also consider the "datagrid object", which is basically like an excel-editor inside Fusion which can edit arrays, but is developer only

Similar Threads

  1. Save Real Numbers with an INI EASY no array, no floats
    By Sparckman in forum Guides, Tutorials, Examples, Widgets
    Replies: 0
    Last Post: 12th March 2015, 08:36 PM
  2. Array or INI for IAP data
    By Muldoon in forum Android Export Module 2.5
    Replies: 3
    Last Post: 31st May 2014, 06:41 AM
  3. Replies: 10
    Last Post: 22nd November 2013, 04:21 AM
  4. Rotating Data Encryption - made easy!
    By workshop2 in forum File Archive
    Replies: 5
    Last Post: 31st May 2007, 09:31 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •