Info {{ currentPage ? currentPage.title : "" }}

SP8_GuildComponent

Option

Description

Default Role Names

The default Role Names, when a Guild was created (Can be changed from the Members with the Permission Edit Role).

Allow Applications

Players can not make an Application to a Guild if it’s disabled.

Guild Logging

Customize Logs

Example:

Key: Select LogType

Type: Can be left empty if not needed

SubType: Can be left empty if not needed (Sometimes it will be overwritten with different Values)

Message: What should be printed to the Chat Box.

OnlyOnDebug: If true, the Message will be only shown, if the “Guild Logging Debug” is set to true.

Guild Logging Debug

If set to true, every Log of the Guild Component will be shown in the Chat.

Function

Callable

Description

Default Use-Case

inviteOtherPlayer

Server & Client

Call to invite a other Player to your Guild.

Need the Invite Permission.

Invite a Player with their Name or as an edit Window.

getInvites

Server & Client

Get all Invites.

For displaying to the Player.

SetInvite

Server & Client

Accept or Deny Invites.

After getInvites the Player could choose a Invite and react to it.

SetAllowApplications

Server & Client

Edit if the Guild allows Applications.

Need the HandleApplications Permission.

Inside the Guild Settings.

ApplicateForGuild

Server & Client

Send a Application to a Guild.

In a Guild List or trying to applicate for Guild from a Player.

SetApplication

Server & Client

Accept or Deny Applications.

Need the HandlePlayerApplications Permission.

After getApplications the Player could choose an Application and react to it.

getApplications

Server & Client

Get all Applications of the own Guild.

For displaying to the Guild Members.

AddXP

Server & Client

Add XP to the Guild.

Read more!

Inside the Guild Settings.

getCurrentGuildName

Server & Client

Get the current Guild Name.

For displaying the Guild Name.

getCurrentGuild

Server & Client

Get current Guild.

For displaying all Guild Infos.

getCurrentRole

Server & Client

Get current Guild Role.

For displaying owning Guild Role.

removePlayerFromGuild

Server & Client

Remove a Player from the Guild.

Need the Kick Permission and the Player must have a lower Role.

Inside the Member List.

LeaveGuild

Server & Client

Leave the current Guild.

Leaders can not leave the Guild.

Inside the Guild Settings.

ChangeMemberRoleByOrder

Server & Client

Change the Role of a Member.

Need the Edit Role Permission and the Player must have a lower Role. Also the new Role must be lower then the own Role.

Inside the Member List.

ChangeMemberRoleByRoleKey

Client

Change the Role of a Member.

Need the Change Member Role Permission and the Player must have a lower Role. Also the new Role must be lower then the own Role.

Inside the Member List.

ChangeRolePermissionByOrder

Server & Client

Change the Permissions of a Role.

Need the Edit Role Permission and the Role must be lower then the own Role.

Inside the Guild Settings.

ChangeRolePermissionByRoleKey

Client

Change the Permissions of a Role.

Need the Edit Role Permission and the Role must be lower then the own Role.

Inside the Guild Settings.

ChangeRoleNameByOrder

Server & Client

Change the Name of a Role.

Need the Edit Role Permission and the Role must be lower then the own Role.

Inside the Guild Settings.

ChangeRoleNameByRoleKey

Client

Change the Name of a Role.

Need the Edit Role Permission and the Role must be lower then the own Role.

Inside the Guild Settings.

CreateGuild

Server & Client

Create a new Guild.

Read more!

At a NPC or inside a Panel.

RemoveGuild

Server & Client

Destroy the current Guild.

Only Leaders can use this Function.

Inside the Guild Settings.

getMaxXP

Server & Client

Get the needed XP for the next Level, if the XP would be 0.

For displaying the Guild XP.

getMaxRoleCount

Server & Client

Get the max Count of roles of the Guild.

For displaying inside the Guild Info.

getMaxMemberSize

Server & Client

Get the max Count of Members of the Guild.

For displaying inside the Guild Info.

CreateRole

Server & Client

Create a new Role.

Need the EditRole Permission.

Can not exceed the Max Role Count.

Inside the Guild Settings.

Initialize

Server

If you are using your own Save System, you can use this Function to set the Informations, which this Component needs.

Only if you do not call Load!

Save

Server

Load all variables

Should be called on start.

Load

Server

Save all variables

Dispatcher

Called

Description

Default Use-Case

Initialized

Server & Client

Called if all Variables are set and the Component can be used.

Initialize all Widgets and stop loading Screen if all Components are initialized.

GuildInfoChanged

Client

Level, XP or Allow Applications have changed.

Update the Guild Widget.

GuildRolesInfoChanged

Client

Role or Members have changed.

Update the Member List and Role List.

GuildRoleChanged

Client

Own Role has changed.

Update own Role Info and available Windows depending on the Permission which has changed.

GuildChanged

Server & Client

Own Guild has changed.

Setup the complete Guild Window.

GuildApplicationsChanged

Client

Applications for the Guild have changed.

Update all Applications.

InviteChanged

Client

Own Invites have changed.

Update all Invites.

SP8_GameState_GuildComponent

Option

Description

XP Curve

Set the XP needed for the next Level.

Max Member Size by Guild Level

Set the max Member Size per Level.

If you don’t want to change the Member Size you can add only one Value.

Key: Level - 1

Value: Max Member Size

Max Role Count by Guild Level

Set the max Role Count per Level.

If you don’t want to change the Role Count you can add only one Value.

Key: Level - 1

Value: Max Role Count

Max Visible Applications

If the Max Visible Applications exceed, the old Applications will get denied.

0 will not deny any Applications.

Informations about Variables:

  • RoleKey: Unique ID of a Role (<GuildName>_Order) - String

  • Order: The Order of the Role inside the Guild. The Leader Role has order 0, and the next Role will be 1, and so on…

Function

Callable

Description

Default Use-Case

getAllGuildNames

Server

Get all Guild Names.

getApplicationsFromPlayer

Server

Get all Applications of a Player.

getGuildInfo

Server

Get Level, XP and if Applications are allowed of a Guild.

getGuildRoles

Server

Get all Role Keys of a Guild.

getRoleInfo

Server

Get Name, Permissions and Order of a Role.

getRoleInfo_ByGuildName

Server

Same as getRoleInfo, but shows all Roles in a Map of a Guild.

Key: Role Key

Value: Name, Permission and Order of a Role

getRoleInfo_ByGuildNameAndOrder

Server

Same as getRoleInfo, but with Guild Name and Order.

getRoleInfo_ByGuildName_AsArray

Server

Same as getRoleInfo_ByGuildName, but it will return a Array with RoleKey, RoleName, Permissions, Order and Members.

getMembers

Server

Get all Members by a Role.

getMembers_ByGuildName

Server

Get all Members by a Guild.

Returns a Map.

Key: Role Key

Value: Array of Members

getMemberRole

Server

Get the Role of a Member in a Guild.

TryToAddPlayerToGuild

Server

Try to add a Player to a Guild.

TryToRemovePlayerFromGuild

Server

Try to remove a Player from a Guild

TyToRemovePlayerFromGuildWithRole

Server

Try to remove a Player from a Guild.

TryToInvitePlayerToGuild

Server

Try to invite a Player to the Guild.

TryToChangeMemberRole

Server

Try to change the Role of a Member inside a Guild.

Leave Owning Order as default.

TryToChangeRolePermissions

Server

Try to change the Permissions of a Role.

TryToChangeRoleName

Server

Try to change the Name of a Role.

TryToCreateGuild

Server

Try to create a new Guild.

TryToRemoveGuild

Server

Try to destroy a Guild.

TryToApplicateForGuild

Server

Try to applicate to a other Guild.

TryToSetAllowApplication

Server

Try to change, if Applications are allowed.

TryToSetApplication

Server

Try to set the Application status.

TryToAddXP

Server

Try to add XP to a Guild.

getMaxXP

Server

Get the needed XP for the next Level, if the XP would be 0.

getApplications

Server

Get all Applications of a Guild.

getMaxMemberSize

Server

Get the Max Member Size by Level.

getMaxRoleCount

Server

Get the Max Role Count by Level

TryToCreateRole

Server

Try to create a new Role for the Guild.

Initialize

Server

If you are using your own Save System, you can use this Function to set the Informations, which this Component needs.

Only if you do not call Load!

Load

Server

Load all variables

Should be called on start.

Save

Server

Save all variables

Dispatcher

Called

Description

Default Use-Case

Initialized

Server

Called if all Variables are set and the Component can be used.

Add Chat Channel for all Guilds.

GuildAdded

Server

Called when a new Guild was created.

Add Chat Channel for the Guild.

GuildRemoved

Server

Called when a Guild was removed.

Remove Chat Channel for the Guild.

SP8_BPI_Guild (Only if you are not using SP8_PlayerTemplate)

Function

Callable

Description

When is it called?

SP8_canCreateGuild

Server & Client

Checks if the Player can create a new Guild.

You should check if the Guild name is valid.

You could check if the Player has enough Money, if creating a new Guild does cost something.

On Create Guild.

SP8_isValidRoleName

Server & Client

Check if the new Role Name is valid.

On Create Role.

SP8_canAddXPToGuild

Server & Client

Check if the Player cann add XP to the Guild.

You could check if the Player has enough XP to reduce own XP and add it to the Guild.

On Add XP.

SP8_addXPToGuild

Server

Called on XP added to Guild.

You could reduce the own XP.

On Add XP.

Guild LogTypes

LogType

Description

Info_Initialized

Called on Initialized.

Info_CreateGuildWorked

A new Guild was created.

Overwrite SubType with Guild Name.

Info_GuildRemoved

Guild was removed.

Overwrite SubType with Guild Name.

Info_OwningPlayer_AddedToGuild

Own Player was added to a Guild.

Overwrite SubType with Guild Name.

Info_OwningPlayer_RemovedFromGuild

Own Player was removed from a Guild.

Overwrite SubType with old Guild Name.

Info_GuildInfoChanged

Level, XP or if Applications are allowed have changed.

Info_OwningPlayer_RoleChanged

Own Player got a new Role inside the Guild.

Overwrite SubType with Role Name.

Info_GuildRolesChanged

Roles of Guild have changed.

Info_NewInvite

Own Player got a new Invite from a Guild.

Overwrite SubType with Guild Name.

Info_InviteSend

A Invitation was send to a Player.

Overwrite SubType with User Key.

Info_InviteDenied

Own Player has denied a Invite of a Guild.

Overwrite SubType with Guild Name.

Info_RemoveWorked

Removed a Player from the Guild.

Overwrite SubType with User Key.

Info_ToggleApplicationsWorked

Succesfully changed the AllowApplications Boolean.

Overwrite SubType with new Value (Boolean).

Info_SetApplicationWorked_Accept

Accepted a Application.

Overwrite SubType with User Key.

Info_SetApplicationWorked_Denied

Denied a Application.

Overwrite SubType with User Key.

Info_ChangeMemberRoleWorked

Changed the Role of a Member.

Overwrite SubType with User Key.

Info_ChangeRolePermissionWorked

Change the Permissions of a Role.

Overwrite SubType with Role Name.

Info_ChangeRoleNameWorked

Change the Name of the Role.

Overwrite SubType with new Role Name.

Info_ApplicatedForGuild

Player has applicated for a Guild.

Overwrite SubType with Guild Name.

Info_OwnApplicationGotDenied

Own Application got denied.

Overwrite SubType with Guild Name.

Info_MaxMemberCountExceeded

The Player could not be added to the Guild because the Guild has to many Members already.

Info_MaxLevelReached

The Max Level of the Guild already reached.

Info_XPAdded

XP was added to the Guild.

Overwrite SubType with Added XP.

Info_CanAddXpToGuildBPI_ReturnedFalse

Interface Function CanAddXPToGuild returned false.

If using the PlayerTemplate: Sp8_Override_canAddXPToGuild.

Info_RoleCreated

A new Role was created succesfully.

Overwrite SubType with Role Name.

Error_Unknown

Unknown.

Error_MissingGameStateGuildComponent

The Guild Component is not working, because the Game State does not contain the SP8_GameState_GuildComponent

Error_RoleNotFound

Role could not be found.

Overwrite SubType with Role Key.

Error_MaxMemberSizeNotSet

Set the Array MaxMemberSizeByGuildLevel on GameState Component

Error_CanNotSetGuildToTheSame

Try to set the Guild to the same as it was.

Makes no sense…

Error_CanNotOverwriteCurrentGuild

Player should first leave their guild and after enter a new one.

Error_CouldNotFindGuild

Guild could not be found.

Error_MaxRoleCountByGuildLevelIsEmpty

Set the Array MaxRoleCountByGuildLevel on GameState Component.

Error_CanOnlySetGuildOnServer

A Function which can only be called on Server was called on Client.

Error_CreateGuildFailed_ToManyRoles

Guild could not be created, because the Guild has more Roles then MaxRoleCount allows.

Error_CreateGuildFailed_NameAlreadyExists

Guild could not be created, because the Guild Name already exists.

Error_CreateGuildFailed_AlreadyInGuild

Guild could not be created, because the Player is already in a Guild.

Error_CreateGuildFailed_NameIsEmpty

Guild could not be created, because the Guild Name is empty.

Error_CreateGuildFailed_BPIReturnsFalse

Interface Function canCreateGuild returned false.

If using the PlayerTemplate: Sp8_Override_canCreateGuild.

Error_CreateGuildFailed_NotEnoughRoles

Guild could not be created, because you have submitted not enough Roles.

Error_CanNotSetOwnerRole

You can not change the Leader Role.

Error_ChangeMemberRoleFailed_CanNotSetToOwner

Can not set a Member to the Leader Role.

Error_LeaveGuildFailed_OwnerCantLeaveGuild

The Leader can not leave the Guild.

Info_InviteFailed_AlreadyInvited

Player could not be invited, because he is already invited.

Error_OwningPlayer_NotInGuild

Player is not in a Guild.

Error_OwningPlayer_NoPermission

Player has no Permission to submit this Action.

Error_OwningPlayer_IsAlreadyInGuild

Player is already in a Guild.

Error_OwningPlayer_NotInvited

Player can not react to a Invite, which he didn’t got.

Overwrite SubType with Guild Name.

Error_OwningPlayer_PermissionToLow

Player has Permissions to perform the Action, but he can only change a Role / Member which is lower then him.

Includes changing a lower Member to the same or higher Role as his own Role.

Error_OtherPlayer_NotOnline

Player is not online.

Error_OtherPlayer_NotFound

Player could not be found.

Error_OtherPlayer_IsAlreadyInGuild

Player is already in a Guild.

Error_ApplicateForGuildFailed_AlreadyApplicated

Can not send multiple Applications to the same Guild.

Error_ApplicationsAreTurnedOff

Can not send a Application, because Applications are turned off.

Error_ApplicationNotFound

Application could not be found.

Error_Application_NewNeedToBeSetOnHold

New Applications need to be set on Hold.

Error_isValidRoleName_BPIReturnedFalse

Interface Function isValidRoleName returned false.

If using the PlayerTemplate: Sp8_Override_isValidRoleName.

Error_RoleCountToHigh

The Guild has to many Roles.

{{{ content }}}