Server/Minigame - Client Controlled Clans/Teams

Author Topic: Server/Minigame - Client Controlled Clans/Teams  (Read 1444 times)

I don't have a single clue of how to word this when searching, so don't kick my ass if some form of this already exists.

Firstly the idea isn't super complicated, but I have no understanding of torque to know if this is even possible due to the way clients communicate with the server.

What I'm looking for is a server sided addon that allows clients (specifically non-admins) to have the ability to create clans/teams on the server or in a minigame. The utility of being able to do this would give the players ultimate control of joining a clan, creating a clan, who can join, user defined clan names, and clan filtered events.

No UI is necessary imo, chat commands should be sufficient.

Example Commands (or whatever this is all being thought up on the spot let alone the fact that I have no idea how this works).

Clients
/clanList                               - Shows a list of all current clans on the server (hopefully includes number of clan members in each clan).
/clanJoin {clan name}      - Joins clan or sends join request to clan owner. Limits the player to one clan. (i have no clue how a clan owner should be able to lock a clan. Ideas 100% welcome).
/clanLeave                           - Leave current clan.
/clanCreate {clan name} - Creates a clan. Limits the player to one clan. Maybe have /clanCreate "{clan name}" "{o/c}" (o=open c=closed) if possible.

Clan Owners
/clanRequestList                 - Shows a list of all requests to join a closed clan. List shows both IGN and BL_ID (due to odd charters in name or name lengths).
/clanDecline {BL_ID}        - Declines client request to join your clan.
/clanAccept {BL_ID}         - Accepts client request to join your clan.

Admins
/clanDelete {clan name}  - Deletes a specific clan. Used for moderating offensive clan names and removing empty clans.

Events

Giving a player the ability to generate an input based on being in a specific clan. Similar to Output Event checkTeam and Input Event onTeamCheckTrue

Misc.

How should clan owners of locked clans be notified of join requests?
How should clan owners be able to block requests from specific BL_IDs?
Should clans be deleted when the clan owner disconnects?
Should clan owners maintain ownership upon reconnect (if clan still exists); and if so, how? (player persistence?)
Should admins/clan owners be able to limit maximum members per clan?
More ideas welcome.

Please excuse my limited knowledge of all of this. I never spent the 20 minutes to learn Torque, and have been busy in other game engines.
In the event that this doesn't exist in the way i'm imagining: I can see really interesting ways this addon could be used. Having a clan-based deathmatch or fortwar are two examples of that.
« Last Edit: September 26, 2018, 01:38:16 AM by UnRegistered »

Isn't really much of a team where players cant kill each other on the same team (i think) but guilds are something similar

so basically gangs from base raiders

Teams/clans need to work with persistence.

How should clan owners of locked clans be notified of join requests?
      Chat message and a sound.  There is probably a default sound that can be used.  Maybe MsgUploadStart?
How should clan owners be able to block requests from specific BL_IDs?
      /clanblock [blid]
Should clans be deleted when the clan owner disconnects?
      No.  Connection errors, crashes, etc.
Should clan owners maintain ownership upon reconnect (if clan still exists); and if so, how? (player persistence?)
      Yes.  Again, connection errors, life outside of the clan, etc.
      Not player persistence.  Just run a 5 minute schedule on the clan simGroup for saving:
Code: [Select]
function clanSaveTick()
{
  if(!isObject(clanGroup))
    return;
  cancel(clanGroup.saveTickSched);
  clanGroup.save("config/server/clanGroup.cs");
  clanGroup.saveTickSched = schedule(300000,clanGroup,"clanSaveTick");
}
Should admins/clan owners be able to limit maximum members per clan?
      I have no reason to desire this.


I would like to make this.  I could use it for my server.  But I have some more questions:

Should clans persistent between server restarts?
     You may desire to have /saveClans [filename] and /loadClans [filename]
Should a client be able to be in multiple clans at once?
Should a clan have an officer rank which can accept requests to join?
« Last Edit: September 28, 2018, 04:13:24 AM by Tendon »

Should clans persistent between server restarts?
     You may desire to have /saveClans [filename] and /loadClans [filename]
          Excellent question, that would be extremely useful to choose what clan file is loaded. This would definitely come in handy in the event of changing the servers theme (e.g. from Deathmatch to Freebuild).
Should a client be able to be in multiple clans at once?
          This one I'm honestly not sure about. I thought I had good reason for limiting one clan per client, but as of right now I don't remember, and I can't really see anything wrong with it atm. I would suggest a limit on clan creation though.
Should a clan have an officer rank which can accept requests to join?
          This would be a great addition, possibly able to have multiple officers? In the event of a 24/7 server and different clan members want to recruit throughout the day.

Thank you Tendon for taking the time to look over this. I really appreciate it. I hope that this would be able to give a hint of originality to gameplay in some servers and maybe draw a small crowd for a while.
« Last Edit: September 28, 2018, 08:03:28 PM by UnRegistered »

Possibly also consiter the ability to ally between clans

The following list of things have been created but have not been tested:

/clanList - Shows a list of clans w/the number of members in each
/clanJoin [18 words] - request to join a clan by name
/clanLeave [confirm bool] - leave or disband a clan, enter a 1 after the command to confirm.
/clanCreate [18 words] - create a clan
/clanRequestList - Get a list of applicants for your clan
/clanDecline [blid] - Deny an applicant
/clanBlock [blid] - Deny and then block an applicant from every applying again.
   !Doesnt block them yet, woops!
/clanAccept [blid] - Accept an applicant into your clan.
/clanDelete [18 words] - Admin only.  Delete a clan.

OnLoad hook
OnJoin hook
Save Ticks
/loadClans [one word filename] - load clans from file
/saveClans [one word filename] - save clans to file
/clan - list users in your current clan
/clanHelp - n/a
/clanPromote [blid] - promote a user from "Member" to "Officer"
/clanDemote [blid] - demote a user from "Officer" to "Member"

The applicant list is reordered when the list is requested.
The user list is reordered when a new user is added to the clan.


I haven't done the events yet.  It sounds like dinner is ready so I am going to go eat.

Don’t think a confirmation is necessary when you type ten characters to leave.

The mod is finished.  Here are the contents of the /clanHelp command.
Quote
=== Clan Help ===
- Admin Commands -
/clanDelete [name(18 word max)] - Delete a clan.
/saveClans [name(1 word max)] - Save a clan to a file. The autosaver will now point towards this file.
/loadClans [name(1 word max)] - Load a clan from a file. The autosaver will now point towards this file.
- Owner Commands -
/clanPromote [blid] - Promote a member to officer.
/clanDemote [blid] - Demote an officer to member.
- Officer Commands -
/clanRequestList - See a list of people requesting to join your clan.
/clanAccept [blid] - Accept a user into your clan, or unblock a blocked user.
/clanDecline [blid] - Decline an application.
/clanBlock [blid] - Block a user from joining your clan.
/clanKick [blid] - Kick a user from your clan.
- User Commands -
/clanCreate [name(18 word max)] - Create a clan of your own.
/clanList - See a list of clans. [ownerblid] [clan name] - (member count)
/clanJoin [name(18 word max)] - Join a clan.
/clanLeave [confirm(bool)] - Leave a clan or, (if you're the owner) disband a clan.
/clan - See a list of people in your clan.
/clanHelp - See this help file.
- Events -
checkClan [clan owner's blid] - Check if the triggering user is in a clan run by [blid].
onCheckClanTrue - Triggered when a clan check succeeds.
onCheckClanFalse - Triggered when a clan check fails.

Download: https://leopard.hosting/dl/pmeux/Server_Clans.zip

Please let me know if it breaks horribly.  I did as much testing as I could, but uh- 20k characters over 724 lines.  I may have missed something.

The mod is finished.  Here are the contents of the /clanHelp command.
Download: https://leopard.hosting/dl/pmeux/Server_Clans.zip

Please let me know if it breaks horribly.  I did as much testing as I could, but uh- 20k characters over 724 lines.  I may have missed something.

Thank you so much, I cannot express how appreciative I am of your hard work. I've been rather busy as of recent but I'll let you know what I find; if I find anything that is.