Saifuddinazhar
started a topic on Thu, 20 August 2015 at 9:09 PM
I am an Unity Unity Programmer. I used to use parse db before and familiar with NoSQL database. At the current project I try to use playfab but I am still very confused about the structure of database in playfab. Basicly, I have two tables :
1) TableMonster
TableMonster contain all monsters including it basic atributes.
[
{
"id":"1",
"name":"Agnito",
"attack":"100",
"defense":"80"
},
{
"id":"2",
"name":"Pico",
"attack":"20",
"defense":"50"
}
]
2) TableUser
TableUser contains all users data. Every user has ownedMonsters which contains all monsters owned by user.
[
{
"name":"james",
"ownedMonsters":[
{
"id":"1",
"monsterId":"2",
"level":"10"
}
]
},
{
"name":"michael",
"ownedMonsters":[
{
"id":"1",
"monsterId":"2",
"level":"3"
}
]
}
]
ownedMonsters contain some jsonOwnedMonster which has 3 attributes :
id >> the id of ownedMonster
monsterId >> the id of monster related on TableMonster
level >> level of the monster. It's value must can be modified during gameplay
My Question :
- How to implement the database in playfab? Is it right if I write TableMonster at catalog?
- How to save ownedMonsters data in playfab? I try to use user inventory to save it but I didn't find playfab documentation about how to change 'level' attribute via PlayFabClientAPI. Are there another way to save it?