[PLUGIN] CSV, CSV2Array, CSV2Dictionary

Post your completed addons to share with the community

Post » Sat Jun 04, 2016 3:29 pm

This sounds like an amazing plug-in.

I am using the multiplayer plug in to make a series of educational games. I want to be able to separate the educational content from the games themselves by having the game load the educational content from external CSV files. For the time being, I can assume that the files will be on the host's computer, and I can know where they are located. However, I need to be able to add to this list without requiring the user to redownload the whole game, so the CSV tiles cannot be in the compile.

Can I do that with this plug-in? If so, and if anyone can post an example that shows me how to accomplish this, I promise to do the same for others after I have learned more of the program. :cry:
B
7
S
1
Posts: 2
Reputation: 431

Post » Sun Jun 05, 2016 1:52 am

@Joshua Crisp

CSV plugin needs a string to load, so you might try to pass that content between machines. Transfer data is not the feature of CSV plugin.
B
97
S
22
G
176
Posts: 4,108
Reputation: 103,019

Post » Sat Jun 11, 2016 11:54 pm

Hi @rexrainbow, great plugins btw! and thanks!!

I got a small question:
Is there a possibility of comparing if the value of an instance variable of an object equals one within a col or row?
exemple. I have a door and in an instance var I store the value of its ID. can I compare its ID by doing a lookup in a col within a csv table?

Thanks in advance!
B
35
S
8
G
11
Posts: 398
Reputation: 8,290

Post » Sun Jun 12, 2016 3:17 am

Update
rex_csv plugin: add "Condition:Has col", "Condition:Has row".


Test if row or column exists
"Condition:Entry is valid" will return true if both row and column exist, i.e. CSV.At( col , row ) is valid. Or test the column or row exists by "Condition:Has col", "Condition:Has row".


@FraktalZero
These conditions might help you.
B
97
S
22
G
176
Posts: 4,108
Reputation: 103,019

Post » Sun Jun 12, 2016 4:46 am

rexrainbow wrote:Update
rex_csv plugin: add "Condition:Has col", "Condition:Has row".



awesome great work....!
B
51
S
13
G
7
Posts: 929
Reputation: 8,405

Post » Sun Jun 12, 2016 10:58 am

@rexraindow, wow, you are awesome! Thanks!!
B
35
S
8
G
11
Posts: 398
Reputation: 8,290

Post » Sun Jun 12, 2016 3:50 pm

@rexraindow, I'm really sorry to ask again.
I'm trying to understand how it works (really new to me).

Basically, I'm trying to compare if the name of a doorObj is located in the csv table. If true then load the corresponding values to that object such as xPos and yPos.
so then I can populate the instance variables of the doorObj.

For now I'm trying to go like this:

CSV Data doorObj.dooID in col ''d'' --> ( if true here I would add the info from the same row but here is where I block)

Sorry and thanks in advance
B
35
S
8
G
11
Posts: 398
Reputation: 8,290

Post » Mon Jun 13, 2016 1:14 am

@FraktalZero

I don't know what is the data structure in your case.
You might create 2 csv tables, one is logical position to object name, for example: (0,3) is "door".
The other table is object name to properties, for example ( "door", "x" ) = 0
B
97
S
22
G
176
Posts: 4,108
Reputation: 103,019

Post » Tue Jun 14, 2016 12:43 am

ah thanks @rexrainbow
B
35
S
8
G
11
Posts: 398
Reputation: 8,290

Post » Tue Jun 14, 2016 3:49 am

Just wanted to say thank you for this - my project wouldn't be possible without it!

EDIT: Recently I've noticed that CSV2Array and CSV2Dictionary doesn't store in the last column. I've had to add in a dummy column of zeroes at the end of my CSVs, to trick the plugin into storing the last column of data. Might be me doing something wrong, but thought I'd mention it.
B
8
S
1
Posts: 38
Reputation: 563

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 6 guests