How to create, import and export datas in a simple way?

Get help using Construct 2

Post » Sun Aug 10, 2014 12:51 am

Hey there!

Been searching through the forums a lot, and I still can't figure how to create, read, import, export and play with data files in Construct 2. I got that .ini files are not longer supported, but unfortunately that'd be quite what I am looking for.

Basically, I need a way to write datas (mostly somewhat long texts) in a file myself prior to importing it into the game (so, a format I can easily write into... .ini would have been great), then import that file into the game and retrieve datas from it.

But I'd also need to be able to write datas to files, and I'd like to know where those files are located.

Is there any plugin(s) that would allow all of this?

Thank you in advance!

- Kan
B
11
S
3
G
3
Posts: 206
Reputation: 2,379

Post » Sun Aug 10, 2014 1:04 am

It depends what you prefer. You can use built in XML or
plugin made by @Yann for JSON files (which I highly recomend) https://www.scirra.com/forum/plugin-json-import-export-generate-edit-inspect_t100042
and for saving/loading files you can use NodeWebkit actions.
ImageImageImageImage
B
157
S
66
G
41
Posts: 2,598
Reputation: 34,823

Post » Sun Aug 10, 2014 1:47 am

Thanks. I still can't figure how to save my data file (say, a JSON file) once I've added content to it.
The NodeWebkit object's "Save" action doesn't ask me what to save, and besides I thought NodeWebkit works only for games exported to Windows. If so, that's a bit limited...

Any idea?
B
11
S
3
G
3
Posts: 206
Reputation: 2,379

Post » Tue Aug 12, 2014 5:57 am

Still no ideas about how to make this possible? Anyone?
B
11
S
3
G
3
Posts: 206
Reputation: 2,379

Post » Tue Aug 12, 2014 11:32 am

There are many plugins for this if Ajax, webstorage and savegames are not what you want..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Tue Aug 12, 2014 6:50 pm

I could see that, but nowhere I can find a way to save datas (texts, values, etc, not saving the state of the game) to an external file. Especially considering I would like to know and decide where that file will be saved.
B
11
S
3
G
3
Posts: 206
Reputation: 2,379

Post » Tue Aug 12, 2014 8:10 pm

B
11
S
2
G
1
Posts: 202
Reputation: 1,580

Post » Tue Aug 12, 2014 11:42 pm

That looks interesting, thanks. But is there any way to save and then read several separated datas? Like in an .ini file or an array, I can pick a variable or a "cell" in which to store one given number or line of text?

It looks like NodeWebkit allows only to save or read an entire file rather than let you save and read one data out of many...
(Besides, is NodeWebkit limited to only Windows applications? Or does it work on web and mobile apps too?)
B
11
S
3
G
3
Posts: 206
Reputation: 2,379

Post » Sun Nov 16, 2014 11:31 am

bump any luck @kan ? i am asking because i have a similiar issue. and it must be something hyper-simple because the person who will do the data writing is not a programmer or anything.
B
28
S
8
G
7
Posts: 643
Reputation: 6,457

Post » Sun Nov 16, 2014 9:57 pm

Nope, no answer yet. This is just one of those topics no one seems to fully understand or to want to talk about like there is no way to do it...
B
11
S
3
G
3
Posts: 206
Reputation: 2,379


Return to How do I....?

Who is online

Users browsing this forum: inkfalcon, nahima and 7 guests