Create clan  

  RSS
(@jaudatus)
New Member Registered

Hello there,

in my game I want to provide support for a clan/guild feature.

I need to be able to create a clan (id,name etc.).

 

Later on I'll let the user join the clan by setting a custom data field (clan id).

What is your suggested approach on creating the guild itself? It's kind of similar to the creation of a default account (isn't it?).

 

Thank you!

Quote
Posted : 20/05/2019 12:20 pm
Topic Tags
(@skaredcreations)
Honorable Member Admin

Hi,

I would probably use the User Group feature to handle your clans/guilds: https://www.skaredcreations.com/api/combu/v3/page_groups.html

Basically an account can create a User Group and by code you can Join or Leave groups, when localUser is authenticated.

User Group has also a customData property that is a Dictionary, just like an account, that you can use to store your wrapped custom data. There's also a feature in Messages to send a message to a User group: https://www.skaredcreations.com/api/combu/v3/page_mail.html#subsec_mail_sendgroup

FRANCESCO CROCETTI @ SKARED CREATIONS

ReplyQuote
Posted : 20/05/2019 6:22 pm
(@jaudatus)
New Member Registered

Hi,

thank you. That was really what I was looking for. One thing I'm not sure about: How can I see the user group in the combu web application? I can find the group in the sql db itself. Do I have to write a custom plugin?

 

Thank you!

ReplyQuote
Posted : 21/05/2019 10:09 am
(@skaredcreations)
Honorable Member Admin

Unfortunately there isn't such feature in Combu admin console at this very moment, but I've added this request to the TODO list for the next incoming update. I will create a new section in the menu to manage the User Groups and eventually add another tab in the Client Users detail page to list the groups that the user joined.

There weren't too many requests for groups feature till now, but I see some interest in the last times so maybe I will improve more their features in the future updates.

FRANCESCO CROCETTI @ SKARED CREATIONS

ReplyQuote
Posted : 21/05/2019 10:50 am
(@jaudatus)
New Member Registered

Thank you for your reply!

Is there a implemented way to list all groups maybe?

 

Greets

ReplyQuote
Posted : 30/05/2019 6:57 pm
(@skaredcreations)
Honorable Member Admin

Yes, you can use the following overload of UserGroup.Load (the first parameter would be the id of the group's owner, passing '0' loads all groups unfiltered):

UserGroup.Load(0, (UserGroup[] groups, string error) =>
{
    Debug.Log("Groups: " + groups.Length + " -- " + error);
});

Please notice that in order to be loaded with Load method, the group must have the property/field public as true ('1' in the database table).

This post was modified 4 weeks ago by Skared Creations

FRANCESCO CROCETTI @ SKARED CREATIONS

ReplyQuote
Posted : 30/05/2019 7:56 pm
Share: