[PLUGIN] CSV, CSV2Array, CSV2Dictionary

From the Asset Store
The I18N (Translation) is a Construct plugin created to translate text in game.
  • broprog

    Try to use Hash table plugin

  • Update

    I try to add a table watch and table editor in the debugger.

    The test capx.

    The csv table

    ",a,b
    c,0,0
    d,0,0"

    And the value will be changed at event sheet.

    Debugger of csv object:

    <img src="http://i1081.photobucket.com/albums/j352/rexrainbow1/csvdebugger_zpscaa53bbd.png" border="0">

    At debugger, user could

    • Change the page name by editing the entry "Page"
    • Change the col name by editing entry "Col"
    • The rows and the values will be shown if the "Page" and "Col" is valid.
    • Change the csv table by editing the entry of "row-xxx".
  • Update:

    Add property "Eval mode".

    If the property "Eval mode" set to "No", all data will be treat to be string.

    If the property "Eval mode" set to "Yes", the data will be eval, so

    • number: 10
    • string: 'hi'
    • javascript function: Math.random()

    capx: eval mode = Yes

  • CSV2Array, CSV2Dictionary

    Parsing csv string, then put them into an array object or dictionary object.

    Capx: CSV2Array

    100
    200
    300
    A,10
    B,20

    See the data with debugger.

    Also, these 2 plugins had property "Eval mode" just like csv plugin. So that user could pass number or string type data.

  • So am I correct in thinking this plugin basically just uses excel as an input area, then saves as a .csv for formatting, from which you copy and paste into Construct 2 in the LOAD table action? And from then on you no longer need excel to edit?

    How much data can be stored? How many rows, columns? What's the advantage?

    If I copy and paste a bunch eventually I can no longer click 'done'

    Suggestion: maybe adding a scroll bar to the Parameters for CSV: Load table

  • Centra

    This csv plugin did not limit the col and row count.

    The plugin could not create a scroll bar, it need to be supported by C2 editor (but I had suggested this request before). A possible solution is, putting the csv string into a external text file and using AJAX to read this file to be a string input.

    The advantage of using csv is, user could create/edit the 2d data in excel/google doc, it's visualize, more readable and easy to edit.

  • rexrainbow

    Hello sir ^^ I'm quite new to Construct2 and just downloaded your plugins and it's really helping. However I have to ask.

    Do you have an example or an explanation as to put a column of values into an array so that the values in the array can be used across the project. I tried using the CSV2Array plugin but I dont think I'm familiar with it yet enough to know what to do with it exactly.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • rexrainbow

    Thank you for this great plugin. I need to use a lot of comas in my spreadsheet. So i use delimiter property. But it needs a lot of hand corrections. So i need an easy converter. Your excel2csv tool works great. (But if i try to do the same thing in Excel --> Save as cvs it didn't work). It's possible to add a parameter for using different character than comma. For example

    excel2csv test.xlsx "@"

  • mrcgkh

    Do you mean that you want to transfer the excel to csv with other delimiter (for example "@")?

    But why you need it? I thought you might use delimiter "," and read them in csv plugin with delimiter ",".

  • rexrainbow

    Yes. I use long sentences in excel that have some commas (,) in it. So i prefer another delimiter like After every conversion with excel2csv tool i make extra hand corrections in csv file.

  • rexrainbow

    First thank you for this plug-in, I find it to be much more intuitive than C2 array function. I am however experiencing one bug that I cant seem to nail down its cause and am hoping you could point me in the right direction.

    At start of layout I load a csv string

    "NULL,NAME,RANK,TAC,SCI,ENG

    1,Ted,Admiral,10,30,10

    2,Sue,Captain,16,4,0

    3,Bob,Ensign,0,6,0"

    and I can call it just fine such as CSV.At("NAME", str(1)) and I am expecting it to return "Ted" but for some resin the col will always move one to the right so instead it will return "Admiral". What am I doing wrong?

  • CrazyVulcan

    Try to fix "NULL,NAME,RANK,TAC,SCI,ENG" to ",NAME,RANK,TAC,SCI,ENG" (remove NULL at first cell). It would be OK.

  • CrazyVulcan

    Try to fix "NULL,NAME,RANK,TAC,SCI,ENG" to ",NAME,RANK,TAC,SCI,ENG" (remove NULL at first cell). It would be OK.

    That did the trick, thank you for your time.

  • Hello rexrainbow

    I have the following problem:

    https://www.scirra.com/forum/how-do-i-store-a-list-of-objects-for-quot-connect-the-dots-quot_t99625

    After searching a little, I've found your CSV Plugin. Could you please give me some advice how should I implement/use it in my game ?

    Thank you

  • hi rexrainbow can you make a example with ajax, to read a external file, for example a excel file or a csv file,

    in this case I think we can edit the table in the external file, and dont edit in the eventsheet on construct 2

    thank great pluggin =)

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