Forum BigDB Anyone know of any tools around for editing BigDB?

Discussion and help relating to the PlayerIO database solution, BigDB.

Anyone know of any tools around for editing BigDB?

Postby MrBiscuits » December 24th, 2011, 10:29 am

Bit of a long shot, but I was wondering if anyone knew about any tools for entering data that could be used in conjunction with BigDB.

The ability to create a template and load/save the data locally as well as export to BigDB would be nice.

I'll probably have to make my own, but thought it might be worth a try in case someone has done something similar already.
MrBiscuits
 
Posts: 26
Joined: May 15th, 2011, 8:09 pm

Re: Anyone know of any tools around for editing BigDB?

Postby MrBiscuits » January 4th, 2012, 2:56 pm

Thought it was a bit of a long shot.

I'm not really sure of the best way to add and change data in BigDB easily. I want the server to hold data on around 150 monster types, each with values for around 40 fields. The user interface for BigDB doesn't seem to be designed for this sort of thing, but rather holding a large number of objects with far fewer fields that are generated by code.

Can I load in data from an XML file into BigDB somehow? Or can you create a text file that stores the data in the BigDB format which you can hand edit and then upload again?

I guess I could load in an XML file into a C# program which then writes the results to BigDB, although this seems quite unwieldy and more likely to cause bugs etc.

Any help would be appreciated.
MrBiscuits
 
Posts: 26
Joined: May 15th, 2011, 8:09 pm

Re: Anyone know of any tools around for editing BigDB?

Postby Henrik » January 4th, 2012, 3:41 pm

I think the easiest way is to write a short program using the .Net client to put all your items into BigDB. Just hardcode everything into your program, don't bother with parsing some other format. Once all items are in, It should be pretty easy to edit them using the existing BigDB interface.

If you ever need to do massive changes to all of them, well, re-run the short program again with your changes.
Henrik
.IO
 
Posts: 1880
Joined: January 4th, 2010, 1:53 pm

Re: Anyone know of any tools around for editing BigDB?

Postby MrBiscuits » January 24th, 2012, 4:45 pm

That works pretty well thanks.

Is there a way of calling the function that makes the BigDB changes somewhere other than in the GameCode class where it gets called as soon as the program starts?

It's currently in GameStarted() which is obviously not ideal.
MrBiscuits
 
Posts: 26
Joined: May 15th, 2011, 8:09 pm

Re: Anyone know of any tools around for editing BigDB?

Postby Henrik » January 24th, 2012, 6:45 pm

No, use the .Net client, not the .Net serverside code. That way you make a program which runs when you run it from your local computer, and you don't have to upload anything or trigger it with a Flash client or anything like that.

There should be an example in the Devpack that you can start from.
Henrik
.IO
 
Posts: 1880
Joined: January 4th, 2010, 1:53 pm

Re: Anyone know of any tools around for editing BigDB?

Postby MrBiscuits » March 5th, 2012, 10:56 am

I'm a bit confused as to how to create a program on the .net client to do this. I'm also not quite sure what the difference is between the .net client and the .net serverside code. When do you use each one?

The only example I can find is the Player.IO_Client_Example in which you log in as a normal user. Is logging on as a user necessary? Do you need to create an admin user that is allowed to edit the database? Also what is to stop someone else writing another program on the .net client and updating bigDB themselves?

Also to use the PlayerIO.BigDB methods you need to add the library PlayerIO.GameLibrary. But this causes an error if you also have the PlayerIOClient library loaded too:

Error 15 'DatabaseArray' is an ambiguous reference between 'PlayerIOClient.DatabaseArray' and 'PlayerIO.GameLibrary.DatabaseArray' C:\Work\Card Battler Database Editor\Player.IO Client Example\Program.cs 163 17 Player.IO Client Example.VS2010
MrBiscuits
 
Posts: 26
Joined: May 15th, 2011, 8:09 pm

Re: Anyone know of any tools around for editing BigDB?

Postby Sumizome » March 5th, 2012, 11:26 am

The way I'd go about it is just create a new (admin) connection (which requires authentication) with full creator rights for the table you want to edit.

Also, there's no need for the GameLibrary as far as I know. The client can also modify the database (in case it has the rights to do so).
client.BigDB.whateveryouwanttodo worked fine for me (where client = PlayerIO.Connect...)

Edit: What do you mean by what the difference between the client and the server is?
The problem with the server is that it's fairly instanced (if that's the correct term). Modifying the database (or pretty much anything) from the serverside code is generally a bad idea since you'll usually have a couple of rooms running the same code (unless you define a new room type and try to assure that only one instance of the room gets created).
Also, you'd have to upload a new dll every time you want to edit your database.
Sumizome
 
Posts: 10
Joined: February 22nd, 2012, 10:10 pm

Re: Anyone know of any tools around for editing BigDB?

Postby Henrik » March 5th, 2012, 11:42 am

MrBiscuits wrote:I'm a bit confused as to how to create a program on the .net client to do this. I'm also not quite sure what the difference is between the .net client and the .net serverside code. When do you use each one?

The serverside code you upload in the admin panel so that when clients connect to rooms, that is the code that runs on the game server. The .Net client is just like the Flash client, you run it from any device, connect as a user, etc.

MrBiscuits wrote:The only example I can find is the Player.IO_Client_Example in which you log in as a normal user. Is logging on as a user necessary? Do you need to create an admin user that is allowed to edit the database? Also what is to stop someone else writing another program on the .net client and updating bigDB themselves?

What you do is that you create an admin connection where you require authentication. Since only you know the auth secret, only you can connect through that, but what username you use doesn't matter. You don't specify access control on a per-user basis, you do it on a per-connection basis, so for your admin connection you should typically allow all reads and writes to all BigDB tables, that way you can manipulate BigDB through code any way you want.

MrBiscuits wrote:Also to use the PlayerIO.BigDB methods you need to add the library PlayerIO.GameLibrary. But this causes an error if you also have the PlayerIOClient library loaded too:

No, the GameLibrary dll is the serverside framework, don't use that, since you're not writing serverside code.

You should only use the .Net client, and make a standalone console application or form application if you want a windows GUI on it. Then you start by calling connect:
http://playerio.com/documentation/refer ... io#Connect

That gives you a Client:
http://playerio.com/documentation/refer ... ent.client

And then you can call the BigDB methods on that:
http://playerio.com/documentation/refer ... ient.bigdb
Henrik
.IO
 
Posts: 1880
Joined: January 4th, 2010, 1:53 pm

Re: Anyone know of any tools around for editing BigDB?

Postby MrBiscuits » March 5th, 2012, 2:40 pm

Great thanks for the replies, I've got it up and running now.

The only problem I have now is that if I specify an auth key and copy it into the auth key field in the connection it comes up with the error:

"The auth given is invalid or malformatted"

Do I need a particular field for the user ID? It says you can use anything, although I don't quite understand why you need to specify it if it doesn't matter what it is.

Here's my code:

var _client = PlayerIO.Connect
(
GameID,
"admin",
"anyOldString",
"5td7v9g7f9a",
null
);
MrBiscuits
 
Posts: 26
Joined: May 15th, 2011, 8:09 pm

Re: Anyone know of any tools around for editing BigDB?

Postby Henrik » March 5th, 2012, 3:09 pm

You need to calculate the auth for that userid, not just pass in the shared secret:

http://playerio.com/documentation/refer ... o#CalcAuth

Code: Select all
var client = PlayerIO.Connect(GameID,
    "admin",
    "anyOldString",
    PlayerIO.CalcAuth("anyOldString", "5td7v9g7f9a"),
    null);
Henrik
.IO
 
Posts: 1880
Joined: January 4th, 2010, 1:53 pm

Re: Anyone know of any tools around for editing BigDB?

Postby rluck » March 13th, 2013, 4:44 pm

Is there an equivalent of this in As3? Trying to write a tool to allow easier item management for my game, obviously don't need server side, but I'd like the extra layer of security on this connection.
rluck
 
Posts: 10
Joined: February 1st, 2013, 5:17 am

Re: Anyone know of any tools around for editing BigDB?

Postby Henrik » March 13th, 2013, 5:01 pm

rluck wrote:Is there an equivalent of this in As3? Trying to write a tool to allow easier item management for my game, obviously don't need server side, but I'd like the extra layer of security on this connection.

Easier solution: Just name your connection something really long and random, that's about as safe as requiring authentication on an admin connection.
Henrik
.IO
 
Posts: 1880
Joined: January 4th, 2010, 1:53 pm


Return to BigDB