[Request] MySQL and INI Plugins?

For developers using the Construct 2 Javascript SDK

Post » Wed Apr 10, 2013 9:17 pm

Is it possible to have the INI function that was once in Construct Classic in Construct 2?

I'm not much of a networking php whiz. also. Would it be possible to do
Set (INT/STRING/ETC) data types to a remote database using a plugin?


Reason I'm asking this is because I run a Neverwinter Nights 2 Persistent World. Using the power of NWNX which extends the game client to use external plugins (mainly INI files or MySQL database) I would want to interface my persistent world with Construct 2. Affecting the world with external triggers from the HTML5 website.

I wouldn't mind paying someone to come up with these plugins.
B
3
G
1
Posts: 2
Reputation: 754

Post » Wed Apr 10, 2013 10:48 pm

What you should look at is the AJAX built-in plugin which is the way to communicate from the HTML5 client to a server.

You would need server-side scripting on your server that would modify the .ini and mysql datas. And this script would get called by the AJAX.

Check the how do I FAQ and the manual for more informations on how to use AJAX.
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 7,000
Reputation: 57,805

Post » Wed Apr 10, 2013 11:26 pm

The existing Dictionary object is a good substitute for the INI object. INI is an ancient format from Windows 3.1, obsoleted in Windows 95, and has some ridiculous limits built in to it. It really needs to die. Dictionary can store data in a very similar way, without limits, in a modern standardised format that is easily interoperable with other services.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,630

Post » Thu Apr 11, 2013 4:30 am

Thanks you two. I appreciate all the help! I'll look at your tutorial and see what I can come up with.

I agree with INI being outdated. I dont know MySQL commands deeply to use the DB portion of it. so INI it is for now.


Example in the code:
[code]

[Hurokis]
Name = Wilian Jora
Strength = 12
Charisma = 12
Constitution = 14
Dexterity = 16
Intelligence = 14
Wisdom = 10
Current Health = 10
Maximum Health = 12
Character Title = Rithia Security Guard
Job Start Time = 6
Job End Time = 16


[DmHobGoblin]
Current Health = 29
Maximum Health = 29
Name = Logan Trian
Strength = 16
Charisma = 10
Constitution = 12
Dexterity = 15
Intelligence = 12
Wisdom = 12
Character Title = Maultarian Military Guardsman
Job Start Time = 4
Job End Time = 20


[AusGre]
Current Health = 6
Maximum Health = 6
Name = Gerald Faulcher
Strength = 10
Charisma = 12
Constitution = 13
Dexterity = 16
Intelligence = 16
Wisdom = 12
Character Title = Rithia Power Processor Worker
Job Start Time = 6
Job End Time = 16

[/code]
B
3
G
1
Posts: 2
Reputation: 754

Post » Fri Apr 12, 2013 12:05 am

I saw a post sometime ago about INI vs XML vs JSON...
The guy did run some test on a server side script and found out the response was much faster with INI
INI is kinda old but the structure is very simple...I guess that helps sometimes
B
20
S
5
G
8
Posts: 325
Reputation: 6,473

Post » Mon Aug 22, 2016 5:57 pm

Ashley wrote:The existing Dictionary object is a good substitute for the INI object. INI is an ancient format from Windows 3.1, obsoleted in Windows 95, and has some ridiculous limits built in to it. It really needs to die. Dictionary can store data in a very similar way, without limits, in a modern standardised format that is easily interoperable with other services.


But in ini you can make groups and values for each group, in Dictionary I guess we can't
B
30
S
6
G
5
Posts: 433
Reputation: 6,061

Post » Mon Aug 22, 2016 8:39 pm

Just make your keys "group/item"
B
79
S
24
G
55
Posts: 4,755
Reputation: 41,273

Post » Sun Sep 11, 2016 1:08 pm

Would Hash plugin from rexrainbow do the job?

plugin-hash-table_t65765
B
12
S
7
G
7
Posts: 446
Reputation: 4,268

Post » Thu Oct 20, 2016 3:33 am

@Guif0DA

Add [url=http://c2rexplugins.weebly.com/rex_ini.htmlrex_ini[/url] to get JSON from INI string.
B
97
S
22
G
179
Posts: 4,126
Reputation: 104,559


Return to Javascript SDK

Who is online

Users browsing this forum: Sekigatsu and 0 guests