Currently the developers are putting their own money into JC2-MP to keep the servers online.

Please take a few seconds of your time and disable your AdBlock plugin for our website.

Ad revenue is not going to developers, it is used purely for covering our hosting costs.

 

You are also free to donate, which removes all ads from our website!

Patch 0.3 was just released! Full changelog here: https://t.co/4A50m6IKen

3 years ago

Advertisement
May 25, 2020, 11:17:03 pm

Author Topic: AWG Factions v0.03 - by Anzu  (Read 26017 times)

Anzu

  • Donator
  • Newbie
  • *****
  • Posts: 26
    • View Profile
AWG Factions v0.03 - by Anzu
« on: December 24, 2013, 11:35:03 am »
Hey guys :)

So, I was getting frustrated that there were multiple private factions mods out there yet no one seemed to want to release them for public use, so I decided to sit down today and code up something.  This script was inspired by the AWESOME original factions mod that was running on the beta test servers, written by Philpax (i think?).  This is a very early alpha version and I plan on adding a ton more features, but I wanted to get this out there for ppl to test and see if maybe anyone wants to help with it. :)

AWG Factions Module

Current Version: v0.03
Description: This is a reproduction of the original factions module that ran on the beta test servers.  I have done my best to make it just like the old one with some minor improvements.  Not all of the old features have been fully implemented yet.  It is very much a Work In Progress.

Features:
  • Ability to create public or private factions.
  • Communicate discretely with your comrades using faction chat.
  • Leaders can set a custom faction color.
  • Colored faction tags show over characters in-game
  • Leaders can set rank of other members and transfer leadership.
  • 3 ranks for faction members: Member, Officer, Leader.
  • Leaders can change their faction's password at will.
  • Kick players from your faction.
  • Ban players from your faction (They cannot rejoin until unbanned).
  • Ally with another faction.
  • Make another faction your enemy.
  • Earn $5,000 bonuses for killing enemy faction members.
  • Earn $10,000 bonuses for killing enemy faction leaders.
  • Allied faction members are unable to harm each other with guns.
  • View list of all online faction members.
  • View list of all server factions.
  • Notifies faction members when a member joins/leaves or is kicked/banned.
  • Uses SQLite (Creates 2 tables in default server.db file).
  • Faction passwords are stored as salted SHA256 hashes.
  • Global Faction Admins can delete factions.
  • More to come...

Commands:
  • Join/Create Faction (If it does not exist, it will be created. Password is optional.): /f join <faction> <password>
  • Leave Faction (If Leader leaves, faction is disbanded): /f leave
  • Use Faction Chat: /f <message here>
  • Set Faction Password (or change it): /f setpass <password>
  • Set Member's Rank (Rank expects a number, 1-3.  Set to 3 to transfer leadership):  /f setrank <ranknumber> <playername>
  • Kick Member from Faction: /f kick <playername>
  • Ban Member from Faction: /f ban <playername>
  • Set Faction Color (Press F5 in game to see color list): /f setcolor <colorname>
  • Teleport to Faction Member: /f goto <playername>
  • List Online Faction Members: /f players
  • List Server Factions (with number of members): /f list
  • Ally or un-ally with a faction: /f ally <faction>
  • Enemy or un-enemy a faction: /f enemy <faction>
  • Delete a faction (Only Admins can do this): /f del <faction>

Changelog:
v0.04 (In Progress, but available on GitHub)
  • Fixed bug where initial tables were not being created under certain circumstances
  • Added automated table column check using PRAGMA table_info()
  • Added ability for Global Faction Admins to delete factions

v0.03
  • Added ally command
  • Added enemy command
  • Added bonuses for killing enemy faction members (Extra bonus for killing leaders)
  • Fixed bug where factions could be enemies and allies simultaneously
  • Made allied faction members unable to harm each other with guns
  • Added colored tags for ally/enemy faction members

v0.02
  • Added setpass command
  • Added unban command
  • Added ban command
  • Added kick command
  • Added setrank command
  • Added colored faction chat and colored tags over characters in-game
  • Added setcolor command

v0.01
  • Added goto command
  • Added join command
  • Added leave command
  • Added faction chat
  • Added list command
  • Added players command
  • Added columns to awg_factions table
  • Coded basic functions and database tables

Todo List:
  • Ability to set faction bases and fight over them
  • Add ability for faction leaders to mark High Value Targets
  • Add ability for global faction admins to move players into factions
  • Add support for ZED Scoreboard
  • Set player's vehicle color to faction color by default
  • Set option for enabling faction skins

If anyone wants to help with adding new features or fixing bugs, please clone the repo on Github and have at it! :D
=======================================================

Github Repo:
https://github.com/smithb895/JC2-MP-AWGFactions

If you want to come test it out on my public server, feel free :)


Happy holidays! :)
« Last Edit: January 05, 2014, 04:08:26 am by Anzu »

misterff1

  • Donator
  • Hero Member
  • *****
  • Posts: 582
    • View Profile
Re: AWG Factions - by Anzu
« Reply #1 on: December 24, 2013, 11:37:09 am »
Man, you are the best! Keep up the good work!

[EgameStudio]Shepard

  • Donator
  • Newbie
  • *****
  • Posts: 48
    • View Profile
Re: AWG Factions - by Anzu
« Reply #2 on: December 24, 2013, 11:55:52 am »
I love you boy , very thank's for scripting , Mery Chritmas :)

Anzu

  • Donator
  • Newbie
  • *****
  • Posts: 26
    • View Profile
Re: AWG Factions - by Anzu
« Reply #3 on: December 24, 2013, 12:47:31 pm »
Thanks guys :)  Let me know if you get a chance to test it and find any bugs

WPK-Wolfseye

  • Full Member
  • ***
  • Posts: 209
    • View Profile
Re: AWG Factions - by Anzu
« Reply #4 on: December 24, 2013, 12:53:44 pm »
Quote
So, I was getting frustrated that there were multiple private factions mods out there yet no one seemed to want to release them for public use,

You are so right, but well...

Thanks for understanding that there can't only be things to have a private advantage over others. I am very glad some do understand it. ;) I appreciate that.

Cheers & merry Christmas

Wolfseye

RockyTV

  • Newbie
  • *
  • Posts: 31
    • View Profile
Re: AWG Factions - by Anzu
« Reply #5 on: December 24, 2013, 01:13:37 pm »
Nice, Anzu, only 8 (or more) hours working on this haha.

EDIT: you should add a command to set the faction's password and a command to create the faction, because I was trying to create the Panau Armed Forces faction and it said there were too many spaces

You could do like

/f create name - would create the faction and return an ID for you to set it's password
/f <factionid> setpassword <password> - sets the faction password
« Last Edit: December 24, 2013, 01:19:47 pm by RockyTV »

VinhiX

  • Newbie
  • *
  • Posts: 36
    • View Profile
Re: AWG Factions - by Anzu
« Reply #6 on: December 24, 2013, 01:58:58 pm »
I was trying to find any faction wars servers, but they dont exist, and thing is, it starts to be boring roam all the time, no objetives just random kill or random travel, quite cool at the begining but allways the same its quite anoying, I would really like to play in faction wars

Deddie94

  • Donator
  • Newbie
  • *****
  • Posts: 17
    • View Profile
Re: AWG Factions - by Anzu
« Reply #7 on: December 24, 2013, 02:27:30 pm »
I was trying to find any faction wars servers, but they dont exist, and thing is, it starts to be boring roam all the time, no objetives just random kill or random travel, quite cool at the begining but allways the same its quite anoying, I would really like to play in faction wars

There is one faction wars server, it's called "[Beta] Battle for Panau - 3 Way Faction war".

FoulPhil

  • Full Member
  • ***
  • Posts: 116
    • View Profile
Re: AWG Factions - by Anzu
« Reply #8 on: December 24, 2013, 04:39:04 pm »
Hey guys :)

So, I was getting frustrated that there were multiple private factions mods out there yet no one seemed to want to release them for public use, so I decided to sit down today and code up something.  This script was inspired by the AWESOME original factions mod that was running on the beta test servers, written by Philpax (i think?).  This is a very early alpha version and I plan on adding a ton more features, but I wanted to get this out there for ppl to test and see if maybe anyone wants to help with it. :)

Here's what I've tested so far and seems to be working
+Creating Factions
+Joining Factions
+Faction Chat
+Leaving Factions

Here's what I still want to add:
+Implement Ahrotahntee's very kool Command Manager script for correctly handling args (no, split by space is not good enuf :P)
+Goto command for teleporting to other faction members
+List command to see current members
+Notification to all members when member leaves/joins
+Setrank command to set ranks (Right now theres 3 ranks, Member, Officer, and Leader)
+Kick command, to kick member from faction
+Ban command, to prevent a player from joining (even for public factions)
+Ally command, to ally factions (also want to make them unable to hurt allies)
+Enemy command, to make other factions your enemy
+Render Faction name over members characters in game

If anyone wants to help with adding new features or fixing bugs, please clone the repo on Github and have at it! :D

*WARNING: The database schema is subject to change as I add new features.  When it does change, you will need to delete your existing factions database tables.  I will supply a function to do this for you in the next release :)

Here's the Github repo
https://github.com/smithb895/JC2-MP-AWGFactions

If you want to come test it out on my public server, feel free :)


Happy holidays! :)

You should check out the roadtrip script and try adding that to it as well :D

misterff1

  • Donator
  • Hero Member
  • *****
  • Posts: 582
    • View Profile
Re: AWG Factions - by Anzu
« Reply #9 on: December 24, 2013, 05:07:45 pm »
It works like a charm on my server sofar.

zoydbot

  • Donator
  • Jr. Member
  • *****
  • Posts: 56
    • View Profile
Re: AWG Factions - by Anzu
« Reply #10 on: December 24, 2013, 05:28:56 pm »
it's happening!!!! seriously man, good on you for releasing this, the community really appreciates this.

ZMax

  • Jr. Member
  • **
  • Posts: 88
    • View Profile
Re: AWG Factions - by Anzu
« Reply #11 on: December 24, 2013, 07:06:20 pm »
There's a problem.
What if Bob created a faction called Lol:somepassword, and Jake tried to create Lol:mypassword too? There's no error message for that. Or is it?

Anzu

  • Donator
  • Newbie
  • *****
  • Posts: 26
    • View Profile
Re: AWG Factions - by Anzu
« Reply #12 on: December 24, 2013, 07:48:32 pm »
Glad this will get some use :)  I hope to add faction-wars-type capabilities to it soon (like enemies/allies, etc).

Thanks for understanding that there can't only be things to have a private advantage over others. I am very glad some do understand it. ;) I appreciate that.

Cheers & merry Christmas

Wolfseye

I agree, this is a free mod that the Devs shared with the community for free.  To try to privatize and/or commercialize some user-made script for it is counter-productive to the mentality that created this mod in the first place, in my opinion.

I want players to come on my server as well, but I'm not going to hoard away my scripts to force ppl to come play on it just to enjoy them.  :)

Nice, Anzu, only 8 (or more) hours working on this haha.

EDIT: you should add a command to set the faction's password and a command to create the faction, because I was trying to create the Panau Armed Forces faction and it said there were too many spaces

You could do like

/f create name - would create the faction and return an ID for you to set it's password
/f <factionid> setpassword <password> - sets the faction password

That's a good idea, that would be one way to deal with names that contain spaces.  I was considering using Ahrotahntee's Command Manager script for that as well.  I do plan on adding a setpassword function as well for the Leader of the faction to set.

There's a problem.
What if Bob created a faction called Lol:somepassword, and Jake tried to create Lol:mypassword too? There's no error message for that. Or is it?

If a user tries to create a faction that already exists, it SHOULD either
1.) check to see if they provided the correct password, if there is one required or
2.) let them join if there's no password set

But as stated before, there may be some bugs.  If you can confirm a bug please post it here and I'll fix it :)


« Last Edit: December 24, 2013, 09:34:57 pm by Anzu »

SonnySalieri

  • Full Member
  • ***
  • Posts: 189
    • View Profile
Re: AWG Factions - by Anzu
« Reply #13 on: December 24, 2013, 10:35:29 pm »
Thanks for releasing this.
No-one should brag about this, since the one that was on the test server isnt released yet but it got leaked cuz it was already on many damn servers and none of those servers' admins wanted to tell where they get it, where to get it, and that "3 way faction war" script was also kinda kept secret by its creator.
I'm sure im not the only one who was looking for any kind of factiƶns script so halleluja here is one at last.

Some ideas:
Plz add a kinda /f list to list the factions and there also should be "faction tags" over or under the players' nametags.
Add faction-base  related cmds too like /base create basename, /base contest (to make a gangwar for a base), /base list, /base teleport

Thanks again for this and Merry Xmas to you too.
« Last Edit: December 24, 2013, 11:09:03 pm by SonnySalieri »

Anzu

  • Donator
  • Newbie
  • *****
  • Posts: 26
    • View Profile
Re: AWG Factions - by Anzu
« Reply #14 on: December 25, 2013, 02:06:11 am »
Thanks for releasing this.
No-one should brag about this, since the one that was on the test server isnt released yet but it got leaked cuz it was already on many damn servers and none of those servers' admins wanted to tell where they get it, where to get it, and that "3 way faction war" script was also kinda kept secret by its creator.
I'm sure im not the only one who was looking for any kind of factiƶns script so halleluja here is one at last.

Some ideas:
Plz add a kinda /f list to list the factions and there also should be "faction tags" over or under the players' nametags.
Add faction-base  related cmds too like /base create basename, /base contest (to make a gangwar for a base), /base list, /base teleport

Thanks again for this and Merry Xmas to you too.

I will try to add these things soon as I can.  The base war thing would be awesome but I am a little daunted by the task right now.  Going to get the rest of the basic commands and features added before tackling that one.  :)

UPDATE: Just pushed some updates.  Added a "/f players" command to get list of faction members.