Sign In Register

How can we help you today?

Start a new topic

Creating a Character Shell

Hi Team,


I've been doing some reading through the documentation and i think i may need a hand.


I've adjusted my game now to suit server side authorisation and i have the data and stats that i wish to save working correctly. However i'm stuck when it comes to creating my characters in the database.


My Scenario:

A user can have up to 4 characters in their party at one time, there are roughly 30 characters to choose from. I have them set up in unity fine but not in GameSparks.


I believe i need, for each character a reference to the following information:

classOwned

className

charActive

charPosition (an int between 1 and 4, not an actually pos)

charEXP

charStr, charInt, charDex, charLuk

charWeapon, charArmor, charHelmet, charShield

charMultipliers

charSkill1, charSkill2, charSkill3


essentially all i'm looking to do is have that set up for each character in game, then be able to fill this with data and reference / update this as users upgrade their stats.


when updating a stat i need to know, the character position, (1 - 4), the character's Class, and the stat that i'm updating.


What is the best way to go about this - i was told that i should look into Game Data, and i can see how it being somewhat related but the articles didn't make sense on how i would go about doing this.


Thanks, i appreciate your time

Ryan


Hi all, Just wondering if anyone has had a chance to read this. I did see something about using json in an event to create an array of items within an a single short code reference. Could someone explain how to do this /where i put this - for example is it just entered directly in the cloud code? If there are no issues with doing that i could create an event and have each piece of short code act as my ID, i know this would put it all in the playerData but at this point i havent been able to find another way to do this. Thanks, Ryan
Hey guys, Sorry to bump this again, its really the framework that everything else in my game relies on, can i please get someones input. Cheers, Ryan

Hi guys,


Figured out my problem, for those in future who don't understand how this data explorer stuff works here's how i implemented my version.


Went to configurator > Game Data


Created a new one for "CharClass", i clicked Add and put index on ID, then added sub indexes on Active, Owned, Position and Name. the paths for these 'sub indexes' are just ID.Active, ID.Owned etc.


From there i went into Data Explorer on the left hand tab.


my CharClasses 'Game Data' now shows up as a table below the system and runtime collection.


Click that > click Insert> i inserted all the values into there and hit insert, it allows me to build all my individual chars with different values.


How I actually update these values, i don't yet know but the answer for this question has been resolved.


for those as new as me, the JSON looks similar to this


{

  "ID": {

    "CLASS": "WARRIOR",

    "OWNED": 1,

    "ACTIVE": 1,

    "POSITION": 1,

    

    

    "STR_LV": 1,

    "INT_LV": 1,

    "DEX_LV": 1,

    "LUK_LV": 1,

    

    "WEAPON_LV": 1,

    "ARMOR_LV": 0,

    "HELMET_LV": 0,

    "SHIELD_LV": 0,

    

    "STR_MULTIPLIER": 4,

    "INT_MULTIPLIER": 2,

    "DEX_MULTIPLIER": 3,

    "LUK_MULTIPLIER": 2

  }

}



Hope this helps someone struggling a bit like me :)


There is a game data tutorial but the tutorial has a fair bit of assumed knowledge and the example screen shots also jump between multiple scenario's so it's a bit hard to follow start to finish.

Login to post a comment