[PLUGIN] CSV, CSV2Array, CSV2Dictionary

  • Sorry I did not get "whitch col this name is lodged". Do you want to get an number or ?

  • Update

    rex_csv plugin:

    Sort column or row

    Sample capx

    Call "Action:Sort items in col" or "Action:Sort items in row" will sort table by values in a column or row.

    Uses rex_taffydb plugin to sort table with multiple columns.

  • rexrainbow oops, yeah I expressed myself very poor plus my misspelling (whitch -> which) was not helpful neither. I was trying to find out, how to get the "coordinates" of a value which is stored somewhere in the array. For ex.:

    ,s1,s2,s3

    name, tom,jim,john

    And if I type in "jim" a text-object will let me know where jim is stored, like: "(1,2)" or something

    I'm trying to achieve some kind of a search system.

  • If you really want to get row and column name from the value of cell, you might need to retrieve all cells by these conditions

    + "Condition:For each col",

    + "Condition:For each row in col"

    rex_CSV plugin is designed to get a cell value by ( column name , row name ).

  • rexrainbow

    thank you I solved it. Actually it was really simple. The txt-object always displayed me the total number of rows, when I used the For each condition. But only because, I did not tell him when to stop so I added (to the condition for each loop) - data in col:name = "jim" and it worked fine! Because the for each condition had to stop at the moment it "found" the name "jim"

    pretty simple and logic actually!

  • rexrainbow

    I wanted to say thank you so much for all your awesome plugins and behaviors you created for CS2! They have saved my life.

    In terms of the CSV for arrays plugin you created, i believe to have discovered a bug in which certain elements are not getting read into the CS2 array properly.

    I found, that if you have multiple .csv files that are being phased into a CS2 array into different z locations using your plugin, some data is shaved off based on the smallest excel doc (not all my excel .csv docs contain the same number of x values)

    What would you suggest i do to insure all the data is correcting inputted into the array from the various excel docs.

    Example of my problem:

    doc1.csv (10 x elements)

    doc2.csv (4 x elements)

    doc3.csv (20 x elements)

    When phased into the array, only 4 elements of doc1.csv are retained. The full amount (20) elements are in fact retained from the last document.

  • Salvo776

    Do you use CSV2Array plugin in that case? You might put 3 arrays for each csv if the array size is not the same.

  • rexrainbow

    Yes I did. The game was set up to read data from only one array. So, I suppose a workaround to this error would be to fill up each CSV file with equal elements, even though some of them may be filled with just zeros.

  • rexrainbow

    Hi. Thanks for the great plugin!

    I'd like to know if there are another way to use a different separator to determine the cells. I need this because I'm using comma in my texts.

  • kossglobal

    Set separator in prpoerty "Delimiter", or set by "Action:Set delimiter".

  • kossglobal

    Set separator in prpoerty "Delimiter", or set by "Action:Set delimiter".

    Thanks!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hey Rex i am using your plug in but i have a bit of problem i think the value i am using for stats and such are being treated like texts is that intentional cause that just mess up my whole plan to use it.

    This would explain why i cannot use the values with a math operation.

  • Gearworkdragon

    Yes, the default type is string. You can

    • transfer string to number by system expression: float or int , or
    • set "Eval mode" to "Yes" could parse value by "eval" function of javascrpt. See the document for more detail.
  • The "TableToCSV" expression in the CSV plugin functions incorrectly.

    If I use "TableToCSV" expression to store table A in a variable, change some values on table A as B, then use the "TableToCSV" expression again to store table B, the expression will return 2 stacks of table A instead of table B.

  • JuicyImmortal

    Fixed, thanks for this bug report.

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