[PLUGIN] CSV, CSV2Array, CSV2Dictionary

Post your completed addons to share with the community

Post » Thu Jun 07, 2012 9:54 pm

I'm trying to use this with the new internal files, so I request the file test.csv with AJAX, which return this (AJAX.LastData):

;dmg;range
item;1;2

How do I import this to the CSV plugin? I tried load from json string AJAX.LastData but it doesn't work
B
83
S
21
G
15
Posts: 1,039
Reputation: 15,134

Post » Fri Jun 08, 2012 12:14 am

@7Soul

[code];dmg;range
item;1;2[/code]

Sorry, CSV plugin uses "," to split items, I will try to add action to change this setting.
Or you could replace ";" to ",". It should work.
B
97
S
22
G
176
Posts: 4,108
Reputation: 103,019

Post » Fri Jun 08, 2012 12:38 am

Update:

Add "Delimiter" setting at properties table, and add "action:set delimiter". This could change delimiter from "," to other character.


@7Soul

Try to set Delimiter = ";" at properties table by latest CSV plugin, it could parse
[code];dmg;range
item;1;2[/code]
now.
B
97
S
22
G
176
Posts: 4,108
Reputation: 103,019

Post » Fri Jun 08, 2012 9:01 pm

Thx, that worked ^^
Also, I was using "Load from JSON string" because I didn't see the "Load table" action
B
83
S
21
G
15
Posts: 1,039
Reputation: 15,134

Post » Fri Jun 22, 2012 10:11 am

Update:

Fix bugs in "condition: for each row in col", "for each col in row"
B
97
S
22
G
176
Posts: 4,108
Reputation: 103,019

Post » Mon Jul 02, 2012 6:08 am

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!
B
19
S
6
G
1
Posts: 116
Reputation: 2,730

Post » Mon Jul 02, 2012 7:02 am

@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"). rexrainbow2012-07-02 07:42:32
B
97
S
22
G
176
Posts: 4,108
Reputation: 103,019

Post » Thu Aug 16, 2012 5:04 pm

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

B
5
Posts: 6
Reputation: 362

Post » Fri Aug 17, 2012 10:38 am

@Rodnix

Try RandomArray for random number generator.
B
97
S
22
G
176
Posts: 4,108
Reputation: 103,019

Post » Fri Aug 17, 2012 11:11 am

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
B
5
Posts: 6
Reputation: 362

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: neverk, Psychokiller1888 and 2 guests