[PLUGIN] CSV, CSV2Array, CSV2Dictionary

  • rexrainbow, I bow to your hard work on this fabulous plugin, along with all the others that you have shared on Construct 2. I was going to use the built in XML feature but the data I create is so simple that CSV is just much quicker to handle (XML would be better for tree-structure data, I only need to use simple spreadsheet-style data).

    Once again, thank you!

  • rosareven

    Thanks.

    Actually, csv plugin could be used to create a fsm(finite-state machine). For example, using row for current state, col for input, and value is next state/command (co-work with function plugin, function plugin has an action named "run command").

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi, I was searching for the web to find a way to make a cross platform game, and i stumbled across construct 2.

    This is a marvelous SDK.

    And your addon plugin is wonderful. I will be using your plugin to make my game.

    I do have a doubt, while trying to run the file..

    Say i a '15 x 1 x 1' File with different random numbers,

    I want to load it into the game and pull put these numbers in sequence. 'FIFO'

    I am not up to the top game designers, i'm kind of new to this. I would appreciate a small, "how to add" the csv plugin to pull numbers instead of string, as well as adding an external .csv file to be loaded through ajax.

    Thanks again

    Rodnix

  • Rodnix

    Try RandomArray for random number generator.

  • Hi,

    Thanks a lot for replying.

    I was not clear with what i asked. My bad.

    This is what i want to do.

    I have to take a list of "numbers" from a database (excel/csv, 1D), And import it into Construct 2.

    After that, i want to Randomly select 1 number at a time and display. (Case 1)

    And Sequentially select from the top (FIFO). (Case 2)

    My difficulty is importing the data, is there a "how to" or anything similar that you can point me to?

    Thanks again.

    Rodnix

  • Rodnix

    The csv format of this csv plugin is -

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

    You might need to list your csv format, it might not be suitable for this csv plugin.

    I could make another plugin to parse csv string then save into array object for your requirement.

  • Hi,

    You are being too kind. Thanks a lot.

    I will clarify what i am working with,

    I want to extract a list of data (numbers) from an external file, xxxx.csv is fine as well.

    After importing the data from the csv, i will manipulate the data to suit the needs of the game.

    I hope you can understand

    Regards

    Rodnix

  • CSV2Array

    Transfer csv string into array object

    Capx

    @Rodnix

    Here it is.

  • Thanks a lot, let me work on it right away!

    Thanks.

    Rodnix

  • Hi there Rex, can you tell me what i'm doing wrong here?

    Here

    When i add the extra piece in the CSV pre created it works, but when i add it in the one i made.. It does not add.

    Rodnix

  • Oh, i got it to work... You have to add the object text inside the layout... i guess thats a basic error. Thanks for all the help Rex

  • Hi rexrainbow , is there a way to delete a whole row according to a value in a columm... I mean something like this:

    if columm WARRIOR has a value "5", delete that row... and if there are several "5" values, delete all those rows?

    thanks

  • Update

    Add "condition: data in col", "condition: data in row" to check if data in a col or a row.

    Sample capx

    @danuyos

    You could use "condition:for each row" or "condition:for each col" to go through cols or rows, then use "condition: data in col", "condition: data in row" to check if data is in the col or row. Finally, using "action:remove a col" or "action:remove a row" to remove matched col or row.

  • thanks very much, I'll try it

  • Hey, THanks 4 the plugin. I don't understand one thing - does it loads the table from the csv file or not?

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