Jump to content

[Aisen Tutorial] Guild System


AisenArvalis

Recommended Posts

Intersect Engine Guild System V.1.1

Made by AisenArvalis

 

Description: 

A complex guild system made with Intersect events. A player will be able to create a guild and manage it using /commands. This can be manipulated into using different functions such as items (Guild Scroll) to create the guild and use a Guild Journal to check and manage guild. 

  

Requirements: 

Intersect Dev Build 6.1+ 

  

Video: 

Spoiler
 

  

Process: 

Allows players to create and manage guilds, as well as join guilds open to be joinable. 

  

Issues: 

Can create a guild with no name - Fix/solution on the way

Can join a guild that doesn't exist by using /gjoin Unnamed - Fix/solution on the way

  

Addon: 

Ainz Ooal Gowns Journal System:

 

Commands: 

/gclaim = claim a guild you a part of if the leader has left the guild (any member can claim the guild if no leader is assigned)
/gcreate "Guild Name" = Allows a player to create a guild if they are not part of one already. Example: /gcreate Heroes Of Ascention
/gjoin "Guild Name" = Allows a player to join a guild. Example: /gjoin Heroes Of Ascention
/gleave = Allows a player to leave the guild they are currently a member of.
/gsettings = Allows the guild member to make changes to the guild, currently only allows to change if the guild is joinable or not but more settings can be setup easily. 

/gcheck = Allows a player (or admin if you set a condition for power level) to check all guilds in game. 

  

Build:  

1. We need to create the variables to be used. This system uses both "Player" and "Global" variables with a set "Text Id: \pv" to be called upon during the events. 

  

First we will create the Player Variables: 

Spoiler

95f4dfb4f8a49a40796a7c8a0e0f4163.png

 

fd3125b20a2afcd64482837a8c7cf7d8.png

  

Next the Global Variables: 
 

Spoiler

Here is an overview of all the global variables. As you can see we need to set up these variables for as many guilds we want to have available in game 

 d88381f4783478da83bc8f690ffc8598.png

Now each Global Variable for Guild 1:

b3eb61dc1ca66dc9723a2494cf9174cb.png

6297a32602ce3b5a96548f80ca101029.png

22fafbd733d62866fcdaa7b04c5918d1.png

b4fcdcd212c98ebb3e4f30f8ab32befe.png

 

Replicate the Guild1 variables with Guild2-3-4 etc to have more guilds in your game.

  

2. Now we have the variables created we need to build the "Common Events". These are core to how the system works, and you will understand when you look through the system to how it works and how you can change things to best suit your game: 

 

Spoiler

Event that checks and runs on player login: 

  5d54b82432f83b651fdde841f5bc0f05.png

Event for creating the guild based on command "/gcreate #guildname#" 

cca37822e607d956c73a6901f3895643.png

Spoiler


@>Conditional Branch: [Player Variable: Guild is equal to None]
      @>Conditional Branch: [Global Variable: Guild1Name is equal to Unnamed]
            @>Set Global Variable Guild1Name (Set to \param)
            @>Set Global Variable Guild1MemberCount (Add 1)
            @>Set Global Variable Guild1Leader (Set to \pn)
            @>Set Player Variable Guild (Set to \param)
            @>Change Player Label to \param
            @>Show Chatbox Text [Channel: Global, Color: White] - \pn just created the \param Guild!
            @>
         : Else
            @>Label: Check Guild 2
            @>
         : End Branch
      @>
   : Else
   @>
   : End Branch
@>

 

Event to amend guild settings (only one option at moment to set if the guild is joinable or not) this can be expanded to allow different functions: 

 aeb361cd72648fd5ed0b24031c10f2ca.png

Spoiler


@>Conditional Branch: [Player Variable: Guild is equal to None]
      @>Show Chatbox Text [Channel: Player, Color: White] - You don't belong to a Guild.
      @>
   : Else
      @>Conditional Branch: [Global Variable: Guild1Name is equal to \pv{guild}]
         @>Conditional Branch: [Global Variable: Guild1Leader is equal to \pn]
            @Show Options: What Settings would you like to change?
               : When [Joinable]
                  @>Show Options: Joinable? True: People can join this guild False: People cannot join this guild.
                     : When [True]
                        @>Set Global Variable Guild1Joinable (Set to True)
                        @>
                     : When [False]
                        @>Set Global Variable Guild1Joinable (Set to False)
                        @>
                     : End Options
                  @>
               : End Options
               @>
            : Else
               @>Show Chatbox Text [Channel: Player, Color: White] - You're not the leader of this Guild.
               @>
            : End Branch
         @>
      : Else
         @>Label: Check Guild2
         @>
      : End Branch
   @>
   : End Branch
@>

 

Event to allow players to join a guild (if the guild leader has set "Guild joinable = True" in guild settings: 

 dc291354be5d98ce26564b142a9282a6.png

Spoiler


@>Conditional Branch: [Player Variable: Guild is equal to None]
      @>Conditional Branch: [Global Variable: Guild1Name is equal to \param]
            @>Conditional Branch: [Global Variable: Guild1Joinable is equal to True]
                  @>Set Global Variable Guild1MemberCount (Add 1)
                  @>Set Player Variable Guild (Set to \param)
                  @>Change Player Level to \param
                  @>
               : Else
                  @>Show Chatbox Text [Channel: Player, Color: White] - This Guild isn't accepting new members.
                  @>
               : End Branch
            @>
         : Else
            @>Label: Check Guild 2
            @>
         : End Branch
      @>
   : Else
      @>Show Chatbox Text [Channel: Player, Color: White] - You already belong to a Guild.
      @>
   : End Branch
@>

 

Event to allow any member of the guild claim the guild and become leader IF the guild leader left and no leader is currently assigned: 

b5825013b037dac4de4ca3b3efbfbe38.png

Spoiler


@>Conditional Branch: [Player Variable: Guild is equal to None]
      @>Show Chatbox Text [Channel: Player, Color: White] - You don't belong to a Guild.
      @>
   : Else
      @> Conditional Branch: [Global Variable: Guild1Name is equal to \pv{guild}]
            @>Conditional Branch: [Global Variable: Guild1Leader is equal to None]
                  @>Show Chatbox Text [Channel: Player, Color: White] - You're now the leader of this Guild.
                  @>Set Global Variable Guild1Leader (Set to \pn)
                  @>
               : Else
                  @>Show Chatbox Text [Channel: Player, Color: White] - This Guild already has a Leader.
                  @>
               : End Branch
            @>
         : Else
            @>Label: Check Guild 2
            @>
         : End Branch
      @>
   : End Branch
@>

 

Event that allows a player to leave the guild, they will be prompted to make sure they do want to leave if they are the leader: 

 a515934b5c470814f161f722292c08ed.png

Spoiler


@>Conditional Branch: [Player Variable: Guild is equal to None]
      @>Show Chatbox Text [Channel: Player, Color: White] - You don't belong to a Guild.
      @>
   : Else
      @>Conditional Branch: [Global Variable: Guild1Name is equal to \pv{guild}]
            @>Conditional Branch: [Global Variable: Guild1Leader is equal to \pn]
                  @Show Options: You are the Guild Leader, if you leave anyone can claim the Guild.
                     : When [Yes]
                        @>Set Player Variable Guild (Set to None)
                        @>Set Global Variable Guild1MemberCount (Subtract 1)
                        @>Set Global Variable Guild1Leader (Set to None)
                        @>Change Player Label to
                        @>
                     : When [No]
                        @>
                     : End Options
                  @>
               : Else
                  @>Set Player Variable Guild (Set to None)
                  @>Set Global Variable Guild1MemberCount (Subtract 1)
                  @>Change Player Label to
                  @>
               : End Branch
            @>Conditional Branch: [Global Variable Guild1MemberCount is equal to 0]
                  @>Set Global Variable Guild1Name (Set to Unnamed)
                  @>Set Global Variable Guild1Leader (Set to None)
                  @>Change Player Label to
                  @>
               : Else
                  @>
               : End Branch
            @>
         : Else
            @>Label: Check Guild 2
            @>
         : End Branch
      @>
   : End Branch
@>

 

OPTIONAL EVENT or ADMIN EVENT - This event is to check guild info (Guild name, Leader, Member count) 

Event just runs a text box to show info: 

4d189dadfd66f577670e9bea69a6248a.png

  

Done! You should have a working guild system for your game :)

  

Enjoy 

 

If you have any questions or suggestions, leave a comment down below and I'll get back to you asap.

 

Credits:
@AisenArvalis - Creator of the System.

@Ainz Ooal Gown - Fixing up the Tutorial to look good and easy to read and being the inspiration to create the system to begin with.

Link to comment
Share on other sites

Just now, Minamoto Yoshitsune said:

when trying to join the guild with the / gjoin command, does a confirmation screen appear or will the character be automatically applied to guild x?

 

How is the question of being able to expel members of the guild and etc, is there any way?

 

No limitations as of now and there's no confirmation window, using /gjoin GuildName you'll be joining the guild automatically if it exists.

As for kicking members, there's no Guild Master system just yet so there's no way to expel members, YET (Working on this)

Link to comment
Share on other sites

@AisenArvalis Been thinking about it for a few days now, but couldn't you set a player variable to Guild Master, default should be [false] but when a players create a guild it should change to [true] for whoever created the guild.

You could then also make an item to transfer leadership
Item01: Orb of Transference 
> If Guild Master is true
>>Are you sure you would like to transfer guild leadership?
- Yes: Guild Master set false
-> Give Player: Orb of Ascendance 
- No: Ends Event

> Else: You do not have permission to change guild leadership. 

Item02: Orb of Ascendance
> If Guild Master is False
>> Are you sure you would like to become Guild Leader?
- Yes: Guild Master set true
-> Item consumed

- No: Ends Event

If this wouldn't work feel free to say so. I am not 100% familiar with the engine. 


 

Link to comment
Share on other sites

1 hour ago, Guite Emortal said:

@AisenArvalis Been thinking about it for a few days now, but couldn't you set a player variable to Guild Master, default should be [false] but when a players create a guild it should change to [true] for whoever created the guild.

You could then also make an item to transfer leadership
Item01: Orb of Transference 
> If Guild Master is true
>>Are you sure you would like to transfer guild leadership?
- Yes: Guild Master set false
-> Give Player: Orb of Ascendance 
- No: Ends Event

> Else: You do not have permission to change guild leadership. 

Item02: Orb of Ascendance
> If Guild Master is False
>> Are you sure you would like to become Guild Leader?
- Yes: Guild Master set true
-> Item consumed

- No: Ends Event

If this wouldn't work feel free to say so. I am not 100% familiar with the engine. 


 

 

I already have a system in the works for this :) Don't worry about it

Link to comment
Share on other sites

12 hours ago, AisenArvalis said:

 

Set the label on login. In the else case of the conditional branch

It breaks the color of the guild for me, it would be all black in the next login. even after I set the label color

 

Edit:

oops didn't see I make a new reply, sorry for necroing >.>

Link to comment
Share on other sites

4 hours ago, Miharukun said:

It breaks the color of the guild for me, it would be all black in the next login. even after I set the label color

 

Edit:

oops didn't see I make a new reply, sorry for necroing >.>

 

Label color turning black seems to be a bug, it has happened a few times. @jcsnider care to add input on this?

Link to comment
Share on other sites

45 minutes ago, Xiphoid said:

i think this = maybe gcreate should be with a npc. we need create event for this. how i do that?

 

 

Create a new Player Variable and call it Input with the id input.

Make an NPC on the map with the following Event in it:

Spoiler

@>Show Options: Would you like to create a Guild?
   : When [Yes]
      @>Start Common Event: Create
      @>
   : When [No]
      @>Exit Event Processing
      @>
   : End Options
@>

 

Then Modify the Create Common Event to look like the following:

Spoiler

@>Conditional Branch: [Player Variable: Guild is equal to None]
      @>Conditional Branch: [Global Variable: Guild1Name is equal to Unnamed]
            @>Input Variable: What's the new Guild's name?
                  @>Set Global Variable Guild1Name (Set to \pv{input})
                  @>Set Global Variable Guild1MemberCount (Add 1)
                  @>Set Global Variable Guild1Leader (Set to \pn)
                  @>Set Player Variable Guild (Set to \pv{input})
                  @>Change Player Label to \param
                  @>Show Chatbox Text [Channel: Global, Color: White] - \pn just created the \pv{input} Guild!
                  @>
         : Else
            @>Label: Check Guild 2
            @>
         : End Branch
      @>
   : Else
   @>
   : End Branch
@>

 

I also updated the Login System to help alleviate a problem I saw with the Set Label. For some unknown reason, whenever the server is restarted it looses track of player labels, by adding this into the Login System it'll refresh it on every login.

Link to comment
Share on other sites

Hail guys!! sorry to bother you guys... my english is kind a rusty, but i will try to do my best.

 When i started the tutorial -> all get ok, the script run. i can create the first guild, and manager it... but when i started to create the second one, all the buttons gettins unusefull and don't do nothing, besides the "Leave command" and the "Manager Guild Command" who both return the message -> you don't have a guild. 

(Just to try to explain, when i use /gcreate nothing happends)
(I'm creating a vip system if you guys want me to post it)... Just say it.

and i've created the GV Guild 2 and put the Label: Check Guild 2

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...