JC-MP

Scripting => Releases => Topic started by: Anzu on December 24, 2013, 11:35:03 am

Title: AWG Factions v0.03 - by Anzu
Post 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:

Commands:

Changelog:
v0.04 (In Progress, but available on GitHub)

v0.03

v0.02

v0.01

Todo List:

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 :)
(http://cache.www.gametracker.com/server_info/199.229.249.53:7777/b_560_95_1.png) (http://www.gametracker.com/server_info/199.229.249.53:7777/)

Happy holidays! :)
Title: Re: AWG Factions - by Anzu
Post by: misterff1 on December 24, 2013, 11:37:09 am
Man, you are the best! Keep up the good work!
Title: Re: AWG Factions - by Anzu
Post by: [EgameStudio]Shepard on December 24, 2013, 11:55:52 am
I love you boy , very thank's for scripting , Mery Chritmas :)
Title: Re: AWG Factions - by Anzu
Post by: Anzu 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
Title: Re: AWG Factions - by Anzu
Post by: WPK-Wolfseye 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
Title: Re: AWG Factions - by Anzu
Post by: RockyTV 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
Title: Re: AWG Factions - by Anzu
Post by: VinhiX 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
Title: Re: AWG Factions - by Anzu
Post by: Deddie94 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".
Title: Re: AWG Factions - by Anzu
Post by: FoulPhil 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 (http://www.jc-mp.com/forums/index.php?topic=3364.0) 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 :)
(http://cache.www.gametracker.com/server_info/199.229.249.53:7777/b_560_95_1.png) (http://www.gametracker.com/server_info/199.229.249.53:7777/)

Happy holidays! :)

You should check out the roadtrip script and try adding that to it as well :D
Title: Re: AWG Factions - by Anzu
Post by: misterff1 on December 24, 2013, 05:07:45 pm
It works like a charm on my server sofar.
Title: Re: AWG Factions - by Anzu
Post by: zoydbot on December 24, 2013, 05:28:56 pm
it's happening!!!! seriously man, good on you for releasing this, the community really appreciates this.
Title: Re: AWG Factions - by Anzu
Post by: ZMax 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?
Title: Re: AWG Factions - by Anzu
Post by: Anzu 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 :)


Title: Re: AWG Factions - by Anzu
Post by: SonnySalieri 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.
Title: Re: AWG Factions - by Anzu
Post by: Anzu 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.
Title: Re: AWG Factions - by Anzu
Post by: [EgameStudio]Shepard on December 25, 2013, 11:02:11 am
Possible ?

Quote
/f addrank ( for officers only ) : "1-2"  and /f addrank ( for Leader ) "1-2-3"

"Faction X : (( Mike is Promote to Officer on faction by Sam ! ) //

/f derank ( for Officers only ) : 1-2 and /f derank ( for leader only ) "1-2-3"

"Faction X : (( Mike as demote to officer by Sam ! ) "

and command : for Leader Only ! ( /f kick Nickname ) so >> " Mike as been kicked a faction by Sam ! )

Sry my language :p im fr

PS : 1 : Member
PS : 2 : Officers
PS : 3 : LeaderShip

The officer should not be able to touch her ​​a leader.
Leader empowered
Members not no moderator capabilities faction
Title: Re: AWG Factions - by Anzu
Post by: WPK-Wolfseye on December 25, 2013, 11:37:48 am
Quote
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.

You and a few others made me keep my hope that at least some people seem to understand that as well. ;) Thanks m8, I wish you a merry christmas andthanks for all your effort and that attitude of yours !

Cheers

Wolfseye
Title: Re: AWG Factions - by Anzu
Post by: rAv3nzZ on December 25, 2013, 11:49:37 am
Awesome work you're doing there buddy, i will wait until the semifinal release to rate it fully up :)
Title: Re: AWG Factions - by Anzu
Post by: Anzu on December 27, 2013, 01:11:54 am
Thanks guys, really glad people are enjoying the mod and appreciate it :)

UPDATE: I just added some new features, including:

"/f setcolor <colorname>" command for setting faction color
Faction chat is now in your faction's color!
Faction tags now appear over players in game, in their factions color!
Plus I fixed and optimized some of the code.

Let me know how it works for you guys or any other suggestions!  I'm still working on adding new things!
Title: Re: AWG Factions - by Anzu
Post by: Castillo on December 27, 2013, 01:39:23 am
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.

Imagine if the scripters released all their scripts to public, that would ruin every single server, as they could all use the same things, so nothing would be unique of a single server.

I'm not trying to start a discussion, but that's my opinion.
Title: Re: AWG Factions - by Anzu
Post by: zoydbot on December 27, 2013, 02:12:43 am
thanks for the update. regarding the database schema changes during updates, it seems detrimental to delete the users data for every update, have you thought about ways in the future so that players dont have to recreate all their stuff everytime theres an update? can we export certain data and re-import it?

xbmc(xbmc.org) for instance, can use a shared mysql server to sync start, stop, pause, watched status, etc between computers. when they release a new update, the db just updates with the new changes, all old data still remains intact and useable. old versions of the software cant read the new db, which is fine by me
Title: Re: AWG Factions - by Anzu
Post by: Anzu on December 27, 2013, 02:18:09 am
thanks for the update. regarding the database schema changes during updates, it seems detrimental to delete the users data for every update, have you thought about ways in the future so that players dont have to recreate all their stuff everytime theres an update? can we export certain data and re-import it?

xbmc(xbmc.org) for instance, can use a shared mysql server to sync start, stop, pause, watched status, etc between computers. when they release a new update, the db just updates with the new changes, all old data still remains intact and useable. old versions of the software cant read the new db, which is fine by me

You're welcome :)  I've only changed the database schema once since the initial release, and I'm going to do my best to avoid changing it again unless I really have to.  If I do end up changing it again, I will try to include a way to alter the existing tables instead of dropping them and losing any existing faction data.  If you already have a big database you can't afford to clear, and you're having trouble updating it, PM me and I would gladly help you out in altering those tables.

UPDATE: I've add some SQL to the first post that will update your database tables properly, without deleting anything. :)

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.

Imagine if the scripters released all their scripts to public, that would ruin every single server, as they could all use the same things, so nothing would be unique of a single server.

I'm not trying to start a discussion, but that's my opinion.

I understand what you're saying, but I strongly disagree.  You are under the assumption that every server owner would want to load the exact same scripts as everyone else.  You are also assuming that every player enjoys playing the exact same way, doing the exact same things.  People are different and they enjoy different things.  Some people like Role Play servers with lots of rules and stuph, other's like racing servers, others like faction wars and just all-out mayhem.  That's the wonderful thing about JC2-MP is there's something for everyone :)

Hosting a good server requires more than simply having good scripts and original content (albeit those things are important), and players recognize this.
Title: Re: AWG Factions - by Anzu
Post by: ZMax on December 27, 2013, 02:59:51 am
Loved the new update, Anzu! Full of new features! I'll be sure to report any bugs if I found them. Not worm holes or any flies tho. im so fucking funny

Suggestion: Put the version on the thread's title pls

EDIT: So I got a massive error... http://pastebin.com/nyD5nhk4 (http://pastebin.com/nyD5nhk4) I didn't edit anything . _. Could it be because it's mixing up with the old data form the .db? Should I delete the old Factions data from the SQL .db?
Title: Re: AWG Factions - by Anzu
Post by: Anzu on December 27, 2013, 03:18:48 am
Loved the new update, Anzu! Full of new features! I'll be sure to report any bugs if I found them. Not worm holes or any flies tho. im so fucking funny

Suggestion: Put the version on the thread's title pls

EDIT: So I got a massive error... http://pastebin.com/nyD5nhk4 (http://pastebin.com/nyD5nhk4) I didn't edit anything . _. Could it be because it's mixing up with the old data form the .db? Should I delete the old Factions data from the SQL .db?

Thanks! I'll be sure to add that version to the title.  Regarding your error, yeah it looks like it's due to not having those additional columns (specifically the awg_factions.color column).  If you feel comfortable running SQL queries manually, you can try the ALTER TABLE statements I recently added to the first post.  I tested them and confirmed they do work to update the tables properly.  However, I would be careful with editing the server.db file while the server is running with players in it (and other modules reading/writing to the same DB).  I had it freeze up on me a few times while trying to modify tables while it was running.

If you really don't care about losing your existing faction data, you can just type this straight into your server console (after you've loaded AWGFactions module, assuming you named the folder "AWGFactions"):
Code: [Select]
lua awgfactions AWGFactions:WipeDB()Hit enter, then type:
Code: [Select]
reload awgfactionsAnd hit enter again.  This will delete and re-create the new tables.

If those SQL statements don't fix it or you're not sure what to do, feel free to add me on Steam and I can help you through it.
Title: Re: AWG Factions v0.01 - by Anzu
Post by: ZMax on December 27, 2013, 03:36:23 am
Loved the new update, Anzu! Full of new features! I'll be sure to report any bugs if I found them. Not worm holes or any flies tho. im so fucking funny

Suggestion: Put the version on the thread's title pls

EDIT: So I got a massive error... http://pastebin.com/nyD5nhk4 (http://pastebin.com/nyD5nhk4) I didn't edit anything . _. Could it be because it's mixing up with the old data form the .db? Should I delete the old Factions data from the SQL .db?

Thanks! I'll be sure to add that version to the title.  Regarding your error, yeah it looks like it's due to not having those additional columns (specifically the awg_factions.color column).  If you feel comfortable running SQL queries manually, you can try the ALTER TABLE statements I recently added to the first post.  I tested them and confirmed they do work to update the tables properly.  However, I would be careful with editing the server.db file while the server is running with players in it (and other modules reading/writing to the same DB).  I had it freeze up on me a few times while trying to modify tables while it was running.

If you really don't care about losing your existing faction data, you can just type this straight into your server console (after you've loaded AWGFactions module, assuming you named the folder "AWGFactions"):
Code: [Select]
lua awgfactions AWGFactions:WipeDB()Hit enter, then type:
Code: [Select]
reload awgfactionsAnd hit enter again.  This will delete and re-create the new tables.

If those SQL statements don't fix it or you're not sure what to do, feel free to add me on Steam and I can help you through it.

Thank you! I just deleted the faction tables. Problem solved! I'll just add an announcement for players to recreate their factions. Only, tho, I wont do that next update. I'll contact you if that happens again not to delete all the data again.
Title: Re: AWG Factions v0.01 - by Anzu
Post by: Anzu on December 27, 2013, 03:49:56 am
No problem! Glad you got it fixed! :D
Title: Re: AWG Factions v0.02 - by Anzu
Post by: Jman100 on December 29, 2013, 07:56:22 pm
Now that it has kick/ban, I'm gonna use yours on my server :P Thanks!

(http://cache.www.gametracker.com/server_info/162.243.46.228:7777/b_560_95_1.png)
Title: Re: AWG Factions v0.02 - by Anzu
Post by: FoulPhil on December 29, 2013, 08:20:35 pm
How do you get version 2.0? I downloaded it from the OP and it says v.1 and I'm not sure if it just wasn't updated or what. I would like to try it out and see how it's werkin :p
Title: Re: AWG Factions v0.02 - by Anzu
Post by: zoydbot on December 29, 2013, 08:29:58 pm
How do you get version 2.0? I downloaded it from the OP and it says v.1 and I'm not sure if it just wasn't updated or what. I would like to try it out and see how it's werkin :p

if you just pulled it from github it should be the latest. you can also tell by, if you see "Set faction color" in the help, and your server.db contains color varchar under awg_factions(view with http://sourceforge.net/projects/sqlitebrowser/), its at 0.02, anzu may have forgotten to update the version # in the code.
Title: Re: AWG Factions v0.02 - by Anzu
Post by: FoulPhil on December 29, 2013, 08:41:33 pm
Oh ok thanks :D
Title: Re: AWG Factions v0.02 - by Anzu
Post by: Jman100 on December 29, 2013, 08:58:54 pm
Anyone else having issues with /f goto not working? it wont work at all on mine, says no online player found.

Also, not sure i like how it keeps factions after people leave, its gonna cause a huge list of unoccupied factions. :/

EDIT: goto command only worked with the exact name, case sensitive. modified the code so it works with any case and the space at the end, because tab completion puts a space.

I'd recommend adding a server setting to keep or destroy empty factions. Also, looking forward to the addition of faction only chat (/f chat) and waypoints :D keep up the great work!
Title: Re: AWG Factions v0.02 - by Anzu
Post by: ZMax on December 30, 2013, 05:36:47 pm
Oh man.. This script is just amazing. I've been following the development since the start and I have to say this is the best script public or not to appear on JC2-MP.

Now a request:
So you may know that IZED's admin script's got a scoreboard. Well, I added a little column for factions but I have no idea about programming. It would be great if you could make a little separate module for displaying the player's faction name in the scoreboard. It would be awesome and a great addition to the scoreboard for PvP servers!
Title: Re: AWG Factions v0.02 - by Anzu
Post by: Anzu on December 30, 2013, 08:02:26 pm
How do you get version 2.0? I downloaded it from the OP and it says v.1 and I'm not sure if it just wasn't updated or what. I would like to try it out and see how it's werkin :p

if you just pulled it from github it should be the latest. you can also tell by, if you see "Set faction color" in the help, and your server.db contains color varchar under awg_factions(view with http://sourceforge.net/projects/sqlitebrowser/), its at 0.02, anzu may have forgotten to update the version # in the code.

Yeah I forgot to change the version number in the script files xD Thanks for letting me know! It's all updated now :)

Anyone else having issues with /f goto not working? it wont work at all on mine, says no online player found.

Also, not sure i like how it keeps factions after people leave, its gonna cause a huge list of unoccupied factions. :/

EDIT: goto command only worked with the exact name, case sensitive. modified the code so it works with any case and the space at the end, because tab completion puts a space.

I'd recommend adding a server setting to keep or destroy empty factions. Also, looking forward to the addition of faction only chat (/f chat) and waypoints :D keep up the great work!

Hmm, strange.  I tested the "/f goto" command several times and it seemed to work flawlessly.  It does require a 100% match on the name though, but you can use Tab to auto-complete the spelling of the name if you just type the first few characters.  I may add an ability to specify a player ID instead, as an extra option like "/f goto id ##" or something.  If people would like that feature?

Also, I added the feature you requested for deleting factions.  You can specify global faction admins in the "server\awgFactions.lua" file, look for the lines like this:
Code: Lua
  1.     --==== Global Faction Admins ====--
  2.     -- Add SteamIDs (STEAM_0:0* format) to this table to give certain players ability to delete factions
  3.     self.globalAdmins = {"STEAM_0:1:4264226"}
  4.  
Just change out the SteamID there with the players you want to be able to delete factions.  :D

Oh man.. This script is just amazing. I've been following the development since the start and I have to say this is the best script public or not to appear on JC2-MP.

Now a request:
So you may know that IZED's admin script's got a scoreboard. Well, I added a little column for factions but I have no idea about programming. It would be great if you could make a little separate module for displaying the player's faction name in the scoreboard. It would be awesome and a great addition to the scoreboard for PvP servers!

Thanks for your kind words. :)  Yeah, IZED's scoreboard is very nice and so is Dx Scoreboard by Flaker.  I will see about adding some code to check and see if those modules are loaded, and if they are, then add a column to them.  I'm not sure how this will work though, since not everyone runs those, but I will look into it. :)


UPDATE: I just added new features "/f ally" and "/f enemy" for making other factions your ally/enemy.  Right now this doesn't really do anything except put the data in the database, but in the next release I will make it so allies/enemies have colored tags over their chars, allies will be unable to shoot other allies, and members will get cash bonuses for killing enemy faction members (extra bonus for enemy leaders).  I'm also considering adding a "/f hvt" command that faction leaders can mark an individual player as a "High Value Target", which their members will get an added cash bonus for killing. However this will probably require me adding another column to the awg_factions table, so I'll try to make that update as painless as possible.

Title: Re: AWG Factions v0.02 - by Anzu
Post by: Jman100 on December 30, 2013, 10:24:31 pm

Hmm, strange.  I tested the "/f goto" command several times and it seemed to work flawlessly.  It does require a 100% match on the name though, but you can use Tab to auto-complete the spelling of the name if you just type the first few characters.  I may add an ability to specify a player ID instead, as an extra option like "/f goto id ##" or something.  If people would like that feature?

Also, I added the feature you requested for deleting factions.  You can specify global faction admins in the "server\awgFactions.lua" file, look for the lines like this:
Code: Lua
  1.     --==== Global Faction Admins ====--
  2.     -- Add SteamIDs (STEAM_0:0* format) to this table to give certain players ability to delete factions
  3.     self.globalAdmins = {"STEAM_0:1:4264226"}
  4.  
Just change out the SteamID there with the players you want to be able to delete factions.  :D


Yeah, I modified it a tad to support any case, so people can type the faction name lowercase, etc. Right now i'm sticking with the original factions script until waypoint is added, seems thats a highly requested feature in factions :P

Looking forward to next update!
Title: Re: AWG Factions v0.03 - by Anzu
Post by: Anzu on January 01, 2014, 07:56:17 am
v0.03 released.  Need some more ideas for features, if anyone has some please post.  Besides the base wars thing, I'm already planning on doing that but it's going to take more time. :)

I've yet to check into adding support for the scoreboards, but will see about that for the next update.
Title: Re: AWG Factions v0.03 - by Anzu
Post by: misterff1 on January 01, 2014, 08:35:02 pm
newest release gives me errors about broadcast and tables and stuff.. now it is totally ruined somehow and it wont work
Title: Re: AWG Factions v0.03 - by Anzu
Post by: Anzu on January 01, 2014, 09:17:25 pm
Post your errors.  I'll double check the code...

UPDATE: I just downloaded the version from GitHub and tested it on a fresh server (with other scripts and without any other scripts).  I didn't get a single error.  So, I've no idea what the issue is you're experiencing.  Please post your error logs and I will try to help you resolve it.

You will see the following output in consoles when loading the mod (These are normal, not errors):
Server Console:
Code: [Select]
12:22:04 | [info ] | [awgFactions] Initializing serverside awgFactions.lua...
12:22:04 | [info ] | Module awgFactions loaded successfully
12:22:08 | [info ] | [awgFactions] Broadcasting faction tables after initial delay.

Client Console:
Code: [Select]
15:21:10 | [info ] | [awgFactions] Initializing AWGFactions clientside factionTags.lua...
Make sure you've got the latest, full version.  If any doubt just download this (https://github.com/smithb895/JC2-MP-AWGFactions/archive/master.zip)
Title: Re: AWG Factions v0.03 - by Anzu
Post by: misterff1 on January 01, 2014, 09:34:39 pm
Post your errors.  I'll double check the code...

UPDATE: I just downloaded the version from GitHub and tested it on a fresh server (with other scripts and without any other scripts).  I didn't get a single error.  So, I've no idea what the issue is you're experiencing.  Please post your error logs and I will try to help you resolve it.

You will see the following output in consoles when loading the mod (These are normal, not errors):
Server Console:
Code: [Select]
12:22:04 | [info ] | [awgFactions] Initializing serverside awgFactions.lua...
12:22:04 | [info ] | Module awgFactions loaded successfully
12:22:08 | [info ] | [awgFactions] Broadcasting faction tables after initial delay.

Client Console:
Code: [Select]
15:21:10 | [info ] | [awgFactions] Initializing AWGFactions clientside factionTags.lua...
Make sure you've got the latest, full version.  If any doubt just download this (https://github.com/smithb895/JC2-MP-AWGFactions/archive/master.zip)

its an error on line 1220 in awgfactions.lua of the server map. it gives someting like c function -1 in query
(sorry i am running on digitalocean, so i cant copy paste)
Title: Re: AWG Factions v0.03 - by Anzu
Post by: Jman100 on January 01, 2014, 09:44:28 pm
v0.03 released.  Need some more ideas for features, if anyone has some please post.  Besides the base wars thing, I'm already planning on doing that but it's going to take more time. :)

I've yet to check into adding support for the scoreboards, but will see about that for the next update.

This is great man, all it needs is ability for faction leader to set waypoint for entire faction. Then it'll be perfect! By the way, when you do that, make it so that if a person joins the faction after a waypoint has been set, it sets the waypoint for them too without the leader having to type /f waypoint again. Was an issue on the original factions. Thanks!
Title: Re: AWG Factions v0.03 - by Anzu
Post by: Anzu on January 01, 2014, 10:29:45 pm
Post your errors.  I'll double check the code...

UPDATE: I just downloaded the version from GitHub and tested it on a fresh server (with other scripts and without any other scripts).  I didn't get a single error.  So, I've no idea what the issue is you're experiencing.  Please post your error logs and I will try to help you resolve it.

You will see the following output in consoles when loading the mod (These are normal, not errors):
Server Console:
Code: [Select]
12:22:04 | [info ] | [awgFactions] Initializing serverside awgFactions.lua...
12:22:04 | [info ] | Module awgFactions loaded successfully
12:22:08 | [info ] | [awgFactions] Broadcasting faction tables after initial delay.

Client Console:
Code: [Select]
15:21:10 | [info ] | [awgFactions] Initializing AWGFactions clientside factionTags.lua...
Make sure you've got the latest, full version.  If any doubt just download this (https://github.com/smithb895/JC2-MP-AWGFactions/archive/master.zip)

its an error on line 1220 in awgfactions.lua of the server map. it gives someting like c function -1 in query
(sorry i am running on digitalocean, so i cant copy paste)

Ahh I think I found the cause of the error.  I've pushed an update to the GitHub repo, it's just 2 lines that needed uncommenting xD  Anyways, let me know if it works after that! :)
Title: Re: AWG Factions v0.03 - by Anzu
Post by: misterff1 on January 01, 2014, 11:28:28 pm
Post your errors.  I'll double check the code...

UPDATE: I just downloaded the version from GitHub and tested it on a fresh server (with other scripts and without any other scripts).  I didn't get a single error.  So, I've no idea what the issue is you're experiencing.  Please post your error logs and I will try to help you resolve it.

You will see the following output in consoles when loading the mod (These are normal, not errors):
Server Console:
Code: [Select]
12:22:04 | [info ] | [awgFactions] Initializing serverside awgFactions.lua...
12:22:04 | [info ] | Module awgFactions loaded successfully
12:22:08 | [info ] | [awgFactions] Broadcasting faction tables after initial delay.

Client Console:
Code: [Select]
15:21:10 | [info ] | [awgFactions] Initializing AWGFactions clientside factionTags.lua...
Make sure you've got the latest, full version.  If any doubt just download this (https://github.com/smithb895/JC2-MP-AWGFactions/archive/master.zip)

its an error on line 1220 in awgfactions.lua of the server map. it gives someting like c function -1 in query
(sorry i am running on digitalocean, so i cant copy paste)

Ahh I think I found the cause of the error.  I've pushed an update to the GitHub repo, it's just 2 lines that needed uncommenting xD  Anyways, let me know if it works after that! :)

its not working.. same error
Title: Re: AWG Factions v0.03 - by Anzu
Post by: Anzu on January 03, 2014, 08:43:53 pm
I worked with THGM on IRC who was having this exact same error on his server and it turned out to be caused by having the old, outdated table layout (missing "color" and other columns in table `awg_factions`).  This can be resolved by manually altering your SQLite table as specified in the first post, or by wiping the tables, which is also explained in the first post.  After doing this, the problem was resolved for him.

If you have trouble doing these things, you'll need to contact me on Steam or something to help because without seeing exactly what's going on, I can't help much.  I have tested and re-tested the current version of the module and there is no error as long as your tables are updated properly as described in the first post.

I am trying to find a way I can test for the existence of these columns, and automate the ALTER TABLE process, but I've yet to find an efficient way of doing this.  If anyone has an idea as to how I might achieve this, let me know! :)
Title: Re: AWG Factions v0.03 - by Anzu
Post by: misterff1 on January 03, 2014, 09:10:26 pm
I worked with THGM on IRC who was having this exact same error on his server and it turned out to be caused by having the old, outdated table layout (missing "color" and other columns in table `awg_factions`).  This can be resolved by manually altering your SQLite table as specified in the first post, or by wiping the tables, which is also explained in the first post.  After doing this, the problem was resolved for him.

If you have trouble doing these things, you'll need to contact me on Steam or something to help because without seeing exactly what's going on, I can't help much.  I have tested and re-tested the current version of the module and there is no error as long as your tables are updated properly as described in the first post.

I am trying to find a way I can test for the existence of these columns, and automate the ALTER TABLE process, but I've yet to find an efficient way of doing this.  If anyone has an idea as to how I might achieve this, let me know! :)

Yes that was an error too. I will try that thing with the tables if I can find out how it works :D
Title: Re: AWG Factions v0.03 - by Anzu
Post by: Cygnes on January 03, 2014, 10:23:38 pm
are we able to take towns yet ?

when will that be available ?
Title: Re: AWG Factions v0.03 - by Anzu
Post by: zoydbot on January 03, 2014, 11:33:36 pm
I am trying to find a way I can test for the existence of these columns, and automate the ALTER TABLE process, but I've yet to find an efficient way of doing this.  If anyone has an idea as to how I might achieve this, let me know! :)

http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/indexb23a.html

is this of any help?

Title: Re: AWG Factions v0.03 - by Anzu
Post by: FoulPhil on January 04, 2014, 06:57:37 pm
Is there a way to add a Factions admin for servers. So, if people make offensive factions you can remove them and also remove people from misspelled factions and put them in the correctly spelled factions? lol
Title: Re: AWG Factions v0.03 - by Anzu
Post by: ROODAY on January 04, 2014, 07:09:07 pm
Anzu, can you add in support for the ZED scoreboard?

Code: [Select]
Events:Subscribe("ZEDScoreboardUpdate", function()
 local tbl = {}
 for player in Server:GetPlayers() do
  tbl[player:GetId()] = <Factionname of player>
 end
 Events:Fire("ZEDUpdateScoreboard", {Columns={Faction=tbl}, Extra={}})
end)
Title: Re: AWG Factions v0.03 - by Anzu
Post by: Anzu on January 04, 2014, 11:08:31 pm
Finally found a way to automate the table updates using PRAGMA.  It's more of a quick-fix at this point, I will probably add a version field to one of the tables at some point (something I should've done from the beginning, but oh well).

Download the latest master from https://github.com/smithb895/JC2-MP-AWGFactions/archive/master.zip

are we able to take towns yet ?

when will that be available ?
No, it's not available.  That will be available when it's available. :P

I am trying to find a way I can test for the existence of these columns, and automate the ALTER TABLE process, but I've yet to find an efficient way of doing this.  If anyone has an idea as to how I might achieve this, let me know! :)

http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/indexb23a.html

is this of any help?
From what I could tell this looked like GMOD-specific, and only testing for the existence of a whole table.  But thanks anyways :)

Is there a way to add a Factions admin for servers. So, if people make offensive factions you can remove them and also remove people from misspelled factions and put them in the correctly spelled factions? lol
Yes there is already a Global Factions Admins array in the awgFactions.lua file, if you add admins' STEAMIDs to that, they will be able to delete factions using "/f del <faction>".  However, the other part is a great idea! I will try to add ability for admins to move players into a faction in a future update. :)

Anzu, can you add in support for the ZED scoreboard?

Code: [Select]
Events:Subscribe("ZEDScoreboardUpdate", function()
 local tbl = {}
 for player in Server:GetPlayers() do
  tbl[player:GetId()] = <Factionname of player>
 end
 Events:Fire("ZEDUpdateScoreboard", {Columns={Faction=tbl}, Extra={}})
end)

I've not yet worked on this, been busy with some other coding projects, but I will try to work it into the next update. :)

Thanks for the feedback and suggestions guys!  Please test out the newest version and let me know if it solves any errors you were getting! :)
Title: Re: AWG Factions v0.03 - by Anzu
Post by: ROODAY on January 04, 2014, 11:39:14 pm
alright, keep up the good work man!
Title: Re: AWG Factions v0.03 - by Anzu
Post by: FoulPhil on January 05, 2014, 12:48:57 am
Sounds great :D

Another thing that would be cool is making it so you can use special characters in the faction names like "* @ #" etc. Would be cool.
Title: Re: AWG Factions v0.03 - by Anzu
Post by: Anzu on January 05, 2014, 03:32:45 am
Sounds great :D

Another thing that would be cool is making it so you can use special characters in the faction names like "* @ #" etc. Would be cool.
I've purposely limited faction names and faction passwords to only be alphanumeric characters.  Allowing special characters poses more problems than it's worth (escaping, code injection, etc).  I just kept it simple for simplicity's sake. :)

Any chance to set a faction's vehicle color from something like default(military vehicles get their default green camo or whatever the vehicles default color is) black, white, etc..., etc...

Yeah, I was thinking about doing something like this, where if a player bought a vehicle, it would by default be in their faction's color.  But I'm trying to work out how to do this without conflicting with or having to edit the Buymenu Module.  This would be very kool to include and I'll try to add it in at some point. :)
Title: Re: AWG Factions v0.03 - by Anzu
Post by: ROODAY on January 05, 2014, 05:01:46 am
Any chance to set a faction's vehicle color from something like default(military vehicles get their default green camo or whatever the vehicles default color is) black, white, etc..., etc...

Yeah, I was thinking about doing something like this, where if a player bought a vehicle, it would by default be in their faction's color.  But I'm trying to work out how to do this without conflicting with or having to edit the Buymenu Module.  This would be very kool to include and I'll try to add it in at some point. :)

It's actually pretty easy to do! A simple workaround could just be changing the vehicles color after buying it. I did so with vehcolor in my Commands+ Plugin for ZED. The commands uses Donkie's Simple Timer script, and what the command does is it saves the players location, then sets the cars colors to the specified RGB values, and then it respawns the car. Then it uses the Simple Timer script to wait 200 milleseconds, and then it sets the car back where it should be. (Respawning puts the location back where it spawned.) Finally, it puts the player back as driver. The only thing you'd need here is instead of making it a command, make the argument for running it be that whenever the player enters a vehicle, it checks if the player is in a faction, then calls the factions colors, and then sets the two tones of the vehicles color to the faction color. This (http://pastebin.com/ct72hk6p) is the vehcolor command, and this (http://pastebin.com/tJCqdqAM) is the Simple Timers script. Both are serverside.

Oh and also, the simple timers script should be in it's own file, and then called in another.
Title: Re: AWG Factions v0.03 - by Anzu
Post by: darkpuma on January 05, 2014, 06:34:02 pm
Nice work.
Title: Re: AWG Factions v0.03 - by Anzu
Post by: SonnySalieri on January 06, 2014, 04:34:06 pm
Does the script allow faction names to have spaces or "underlines" (_) in them now (for example
"Salieri Mafia" or "Salieri_Mafia") or will it allow it maybe in a future update? I' don't mean other special characters that were mentioned by someone before, just these 2 things.
Title: Re: AWG Factions v0.03 - by Anzu
Post by: misterff1 on January 06, 2014, 08:04:41 pm
since the new update this scripts works like a charm again :D
One question though: is there a way to make this work with ZED enabled?
Title: Re: AWG Factions v0.03 - by Anzu
Post by: ROODAY on January 06, 2014, 08:08:10 pm
It does work with ZED, I use them both on my server. It just doesn't currently have scoreboard support, so your team won't show in the scoreboard for now.
Title: Re: AWG Factions v0.03 - by Anzu
Post by: FoulPhil on January 06, 2014, 09:27:10 pm
Is there a list of faction admin functions? or is it just /f del (faction)

Is there any way to make it where capitalization doesn't matter. One problem I've had is people joining my faction and making a new faction just because the first letter is capitalized. Is there anyway so they will join the same group name if a letter is capitalized or not?
Title: Re: AWG Factions v0.03 - by Anzu
Post by: Anzu on January 06, 2014, 11:59:09 pm
Another neat thing to be able to do is to set your faction character(s?) e.g. maybe members and officers are the 2 soldier models(model 66 and i forgot the other one) and the leader is the President Panay model

Same could be done with Ular, Roaches, etc...
That would be neat, especially for RP-type servers.  I may set this as an optional config value, so server hosts can choose whether they want to force faction skins or not.  :)

Any chance to set a faction's vehicle color from something like default(military vehicles get their default green camo or whatever the vehicles default color is) black, white, etc..., etc...

Yeah, I was thinking about doing something like this, where if a player bought a vehicle, it would by default be in their faction's color.  But I'm trying to work out how to do this without conflicting with or having to edit the Buymenu Module.  This would be very kool to include and I'll try to add it in at some point. :)

It's actually pretty easy to do! A simple workaround could just be changing the vehicles color after buying it. I did so with vehcolor in my Commands+ Plugin for ZED. The commands uses Donkie's Simple Timer script, and what the command does is it saves the players location, then sets the cars colors to the specified RGB values, and then it respawns the car. Then it uses the Simple Timer script to wait 200 milleseconds, and then it sets the car back where it should be. (Respawning puts the location back where it spawned.) Finally, it puts the player back as driver. The only thing you'd need here is instead of making it a command, make the argument for running it be that whenever the player enters a vehicle, it checks if the player is in a faction, then calls the factions colors, and then sets the two tones of the vehicles color to the faction color. This (http://pastebin.com/ct72hk6p) is the vehcolor command, and this (http://pastebin.com/tJCqdqAM) is the Simple Timers script. Both are serverside.

Oh and also, the simple timers script should be in it's own file, and then called in another.

Sweet! :) Thanks for the tips!  I was thinking of something similar along the lines of using a timer to just change the color after they get the vehicle, or when they get in it.  I will check out those scripts you posted and try to work this into a future update!

Nice work.
Thanks! :D

Does the script allow faction names to have spaces or "underlines" (_) in them now (for example
"Salieri Mafia" or "Salieri_Mafia") or will it allow it maybe in a future update? I' don't mean other special characters that were mentioned by someone before, just these 2 things.
I could probably do that, however it's kinda low on my priority list right now.  I guess there's no harm in allowing spaces and underscores. :)

since the new update this scripts works like a charm again :D
One question though: is there a way to make this work with ZED enabled?
Awesome news!  I've not tested it with the latest version of ZED, but I don't see any reason off-hand why it would not be compatible.  If you find any conflicts, please post your errors and we'll take a look! :)

Is there a list of faction admin functions? or is it just /f del (faction)

Is there any way to make it where capitalization doesn't matter. One problem I've had is people joining my faction and making a new faction just because the first letter is capitalized. Is there anyway so they will join the same group name if a letter is capitalized or not?
Not yet, there is only "/f del" for now.  I will add something like this in a future update.
Yeah there's a way to do that, just need to change a few lines in the code.  Perhaps I will change this in the next update, because this seems to be a common issue.  I guess Windows has convinced too many users that capitalization doesn't ever matter! xD

Title: Re: AWG Factions v0.03 - by Anzu
Post by: Oh_Man on January 18, 2014, 04:15:40 pm
Faction leaders should be able to send messages to members which are in big text across their screen - sort of like how I have seen server admins type.

This is like how a Raid leader would type in WoW - gets the members' attention, let's them know what orders the leader has.
Title: Re: AWG Factions v0.03 - by Anzu
Post by: GandalfGreyhame on January 19, 2014, 06:43:49 pm
i have to commend you. i have run into the issue where those that can script keep them for themselves. kind of selfish, but ok. your script is awesome, but i was wondering if you plan to implement a way for a faction to claim/take over a base. i think that would be a really cool and fun feature. also, just a question, is there any way to get the auto turrets working again, for faction bases, or just panau wide. anyway, great work, and looking forward to future stuff from you.
Title: Re: AWG Factions v0.03 - by Anzu
Post by: SonnySalieri on February 10, 2014, 04:13:34 pm
New ideas about bases and vehicles:
When a faction takes over a base the faction leader should have the ability to spawn/remove some vehicles for his faction there (like some APC-s or tanks for defense) BUT when this faction loses the base to another faction then the vehs would be removed so the next owner will have the ability to spawn any vehicle at base for them with a /f vspawn vehicleID command or similar, so it wouldnt be an automated vehicle change like on the Battle For Panau server and this way all members would have this as one more thing to do in the faction besides their own ideas of activities so this would make the faction kinda more active. The faction vehs should be only usable by the faction that owns them
I know some would say the faction members can get their own vehicles from the buymenu but i think the members wont just stay at the base all day to defend it and the faction vehicles which would be spawned by the leader could be used by any member at any time he wishes to use it and the faction vehs should cost no cash to spawn.
Faction vehs should be spawnable/removable outside of the base by the leader too if needed and would be fully removed automaticly if the faction gets deleted or disbanded but the faction vehs in the zone of the base would be automaticly removed when the base gets taken over by other faction.
Title: Re: AWG Factions v0.03 - by Anzu
Post by: misterff1 on February 10, 2014, 06:23:59 pm
Is there a way you can make colors used multiple times? Since I have a busy server all colors are used and the others are just white now.
Title: Re: AWG Factions v0.03 - by Anzu
Post by: SonnySalieri on February 10, 2014, 08:44:49 pm
Is there a way you can make colors used multiple times? Since I have a busy server all colors are used and the others are just white now.

Check this color list (its from the Vehicle Manager), maybe its useful for chat colors or faction colors too if you mean faction colors or chat colors:
Code: [Select]
[ "lightpink" ] = Color(255, 182, 193),
[ "pink" ] = Color(255, 192, 203),
[ "crimson" ] = Color(220, 20, 60),
[ "lavenderblush" ] = Color(255, 240, 245),
[ "palevioletred" ] = Color(219, 112, 147),
[ "hotpink" ] = Color(255, 105, 180),
[ "deeppink" ] = Color(255, 20, 147),
[ "mediumvioletred" ] = Color(199, 21, 133),
[ "orchid" ] = Color(218, 112, 214),
[ "thistle" ] = Color(216, 191, 216),
[ "plum" ] = Color(221, 160, 221),
[ "violet" ] = Color(238, 130, 238),
[ "fuchsia" ] = Color(255, 0, 255),
[ "fuchsia" ] = Color(255, 0, 255),
[ "darkmagenta" ] = Color(139, 0, 139),
[ "purple" ] = Color(128, 0, 128),
[ "mediumorchid" ] = Color(186, 85, 211),
[ "darkviolet" ] = Color(148, 0, 211),
[ "darkorchid" ] = Color(153, 50, 204),
[ "indigo" ] = Color(75, 0, 130),
[ "blueviolet" ] = Color(138, 43, 226),
[ "mediumpurple" ] = Color(147, 112, 219),
[ "mediumslateblue" ] = Color(123, 104, 238),
[ "slateblue" ] = Color(106, 90, 205),
[ "darkslateblue" ] = Color(72, 61, 139),
[ "ghostwhite" ] = Color(248, 248, 255),
[ "lavender" ] = Color(230, 230, 250),
[ "blue" ] = Color(0, 0, 255),
[ "mediumblue" ] = Color(0, 0, 205),
[ "darkblue" ] = Color(0, 0, 139),
[ "navy" ] = Color(0, 0, 128),
[ "midnightblue" ] = Color(25, 25, 112),
[ "royalblue" ] = Color(65, 105, 225),
[ "cornflowerblue" ] = Color(100, 149, 237),
[ "lightsteelblue" ] = Color(176, 196, 222),
[ "lightslategray" ] = Color(119, 136, 153),
[ "slategray" ] = Color(112, 128, 144),
[ "dodgerblue" ] = Color(30, 144, 255),
[ "aliceblue" ] = Color(240, 248, 255),
[ "steelblue" ] = Color(70, 130, 180),
[ "lightskyblue" ] = Color(135, 206, 250),
[ "skyblue" ] = Color(135, 206, 235),
[ "deepskyblue" ] = Color(0, 191, 255),
[ "lightblue" ] = Color(173, 216, 230),
[ "powderblue" ] = Color(176, 224, 230),
[ "cadetblue" ] = Color(95, 158, 160),
[ "darkturquoise" ] = Color(0, 206, 209),
[ "azure" ] = Color(240, 255, 255),
[ "lightcyan" ] = Color(224, 255, 255),
[ "paleturquoise" ] = Color(175, 238, 238),
[ "aqua" ] = Color(0, 255, 255),
[ "aqua" ] = Color(0, 255, 255),
[ "darkcyan" ] = Color(0, 139, 139),
[ "teal" ] = Color(0, 128, 128),
[ "darkslategray" ] = Color(47, 79, 79),
[ "mediumturquoise" ] = Color(72, 209, 204),
[ "lightseagreen" ] = Color(32, 178, 170),
[ "turquoise" ] = Color(64, 224, 208),
[ "aquamarine" ] = Color(127, 255, 212),
[ "mediumaquamarine" ] = Color(102, 205, 170),
[ "mediumspringgreen" ] = Color(0, 250, 154),
[ "mintcream" ] = Color(245, 255, 250),
[ "springgreen" ] = Color(0, 255, 127),
[ "mediumseagreen" ] = Color(60, 179, 113),
[ "seagreen" ] = Color(46, 139, 87),
[ "honeydew" ] = Color(240, 255, 240),
[ "darkseagreen" ] = Color(143, 188, 143),
[ "palegreen" ] = Color(152, 251, 152),
[ "lightgreen" ] = Color(144, 238, 144),
[ "limegreen" ] = Color(50, 205, 50),
[ "lime" ] = Color(0, 255, 0),
[ "forestgreen" ] = Color(34, 139, 34),
[ "green" ] = Color(0, 128, 0),
[ "darkgreen" ] = Color(0, 100, 0),
[ "lawngreen" ] = Color(124, 252, 0),
[ "chartreuse" ] = Color(127, 255, 0),
[ "greenyellow" ] = Color(173, 255, 47),
[ "darkolivegreen" ] = Color(85, 107, 47),
[ "yellowgreen" ] = Color(154, 205, 50),
[ "olivedrab" ] = Color(107, 142, 35),
[ "ivory" ] = Color(255, 255, 240),
[ "beige" ] = Color(245, 245, 220),
[ "lightyellow" ] = Color(255, 255, 224),
[ "lightgoldenrodyellow" ] = Color(250, 250, 210),
[ "yellow" ] = Color(255, 255, 0),
[ "olive" ] = Color(128, 128, 0),
[ "darkkhaki" ] = Color(189, 183, 107),
[ "palegoldenrod" ] = Color(238, 232, 170),
[ "lemonchiffon" ] = Color(255, 250, 205),
[ "khaki" ] = Color(240, 230, 140),
[ "gold" ] = Color(255, 215, 0),
[ "cornsilk" ] = Color(255, 248, 220),
[ "goldenrod" ] = Color(218, 165, 32),
[ "darkgoldenrod" ] = Color(184, 134, 11),
[ "floralwhite" ] = Color(255, 250, 240),
[ "oldlace" ] = Color(253, 245, 230),
[ "wheat" ] = Color(245, 222, 179),
[ "orange" ] = Color(255, 165, 0),
[ "moccasin" ] = Color(255, 228, 181),
[ "papayawhip" ] = Color(255, 239, 213),
[ "blanchedalmond" ] = Color(255, 235, 205),
[ "navajowhite" ] = Color(255, 222, 173),
[ "antiquewhite" ] = Color(250, 235, 215),
[ "tan" ] = Color(210, 180, 140),
[ "burlywood" ] = Color(222, 184, 135),
[ "darkorange" ] = Color(255, 140, 0),
[ "bisque" ] = Color(255, 228, 196),
[ "linen" ] = Color(250, 240, 230),
[ "peru" ] = Color(205, 133, 63),
[ "peachpuff" ] = Color(255, 218, 185),
[ "sandybrown" ] = Color(244, 164, 96),
[ "chocolate" ] = Color(210, 105, 30),
[ "saddlebrown" ] = Color(139, 69, 19),
[ "seashell" ] = Color(255, 245, 238),
[ "sienna" ] = Color(160, 82, 45),
[ "lightsalmon" ] = Color(255, 160, 122),
[ "coral" ] = Color(255, 127, 80),
[ "orangered" ] = Color(255, 69, 0),
[ "darksalmon" ] = Color(233, 150, 122),
[ "tomato" ] = Color(255, 99, 71),
[ "salmon" ] = Color(250, 128, 114),
[ "mistyrose" ] = Color(255, 228, 225),
[ "lightcoral" ] = Color(240, 128, 128),
[ "snow" ] = Color(255, 250, 250),
[ "rosybrown" ] = Color(188, 143, 143),
[ "indianred" ] = Color(205, 92, 92),
[ "red" ] = Color(255, 0, 0),
[ "brown" ] = Color(165, 42, 42),
[ "firebrick" ] = Color(178, 34, 34),
[ "darkred" ] = Color(139, 0, 0),
[ "maroon" ] = Color(128, 0, 0),
[ "white" ] = Color(255, 255, 255),
[ "whitesmoke" ] = Color(245, 245, 245),
[ "gainsboro" ] = Color(220, 220, 220),
[ "lightgrey" ] = Color(211, 211, 211),
[ "silver" ] = Color(192, 192, 192),
[ "darkgray" ] = Color(169, 169, 169),
[ "gray" ] = Color(128, 128, 128),
[ "dimgray" ] = Color(105, 105, 105),
[ "black" ] = Color(0, 0, 0)

Are you sure you used up all colors?
Title: Re: AWG Factions v0.03 - by Anzu
Post by: misterff1 on February 10, 2014, 10:31:22 pm
Is there a way you can make colors used multiple times? Since I have a busy server all colors are used and the others are just white now.

Check this color list (its from the Vehicle Manager), maybe its useful for chat colors or faction colors too if you mean faction colors or chat colors:
Code: [Select]
[ "lightpink" ] = Color(255, 182, 193),
[ "pink" ] = Color(255, 192, 203),
[ "crimson" ] = Color(220, 20, 60),
[ "lavenderblush" ] = Color(255, 240, 245),
[ "palevioletred" ] = Color(219, 112, 147),
[ "hotpink" ] = Color(255, 105, 180),
[ "deeppink" ] = Color(255, 20, 147),
[ "mediumvioletred" ] = Color(199, 21, 133),
[ "orchid" ] = Color(218, 112, 214),
[ "thistle" ] = Color(216, 191, 216),
[ "plum" ] = Color(221, 160, 221),
[ "violet" ] = Color(238, 130, 238),
[ "fuchsia" ] = Color(255, 0, 255),
[ "fuchsia" ] = Color(255, 0, 255),
[ "darkmagenta" ] = Color(139, 0, 139),
[ "purple" ] = Color(128, 0, 128),
[ "mediumorchid" ] = Color(186, 85, 211),
[ "darkviolet" ] = Color(148, 0, 211),
[ "darkorchid" ] = Color(153, 50, 204),
[ "indigo" ] = Color(75, 0, 130),
[ "blueviolet" ] = Color(138, 43, 226),
[ "mediumpurple" ] = Color(147, 112, 219),
[ "mediumslateblue" ] = Color(123, 104, 238),
[ "slateblue" ] = Color(106, 90, 205),
[ "darkslateblue" ] = Color(72, 61, 139),
[ "ghostwhite" ] = Color(248, 248, 255),
[ "lavender" ] = Color(230, 230, 250),
[ "blue" ] = Color(0, 0, 255),
[ "mediumblue" ] = Color(0, 0, 205),
[ "darkblue" ] = Color(0, 0, 139),
[ "navy" ] = Color(0, 0, 128),
[ "midnightblue" ] = Color(25, 25, 112),
[ "royalblue" ] = Color(65, 105, 225),
[ "cornflowerblue" ] = Color(100, 149, 237),
[ "lightsteelblue" ] = Color(176, 196, 222),
[ "lightslategray" ] = Color(119, 136, 153),
[ "slategray" ] = Color(112, 128, 144),
[ "dodgerblue" ] = Color(30, 144, 255),
[ "aliceblue" ] = Color(240, 248, 255),
[ "steelblue" ] = Color(70, 130, 180),
[ "lightskyblue" ] = Color(135, 206, 250),
[ "skyblue" ] = Color(135, 206, 235),
[ "deepskyblue" ] = Color(0, 191, 255),
[ "lightblue" ] = Color(173, 216, 230),
[ "powderblue" ] = Color(176, 224, 230),
[ "cadetblue" ] = Color(95, 158, 160),
[ "darkturquoise" ] = Color(0, 206, 209),
[ "azure" ] = Color(240, 255, 255),
[ "lightcyan" ] = Color(224, 255, 255),
[ "paleturquoise" ] = Color(175, 238, 238),
[ "aqua" ] = Color(0, 255, 255),
[ "aqua" ] = Color(0, 255, 255),
[ "darkcyan" ] = Color(0, 139, 139),
[ "teal" ] = Color(0, 128, 128),
[ "darkslategray" ] = Color(47, 79, 79),
[ "mediumturquoise" ] = Color(72, 209, 204),
[ "lightseagreen" ] = Color(32, 178, 170),
[ "turquoise" ] = Color(64, 224, 208),
[ "aquamarine" ] = Color(127, 255, 212),
[ "mediumaquamarine" ] = Color(102, 205, 170),
[ "mediumspringgreen" ] = Color(0, 250, 154),
[ "mintcream" ] = Color(245, 255, 250),
[ "springgreen" ] = Color(0, 255, 127),
[ "mediumseagreen" ] = Color(60, 179, 113),
[ "seagreen" ] = Color(46, 139, 87),
[ "honeydew" ] = Color(240, 255, 240),
[ "darkseagreen" ] = Color(143, 188, 143),
[ "palegreen" ] = Color(152, 251, 152),
[ "lightgreen" ] = Color(144, 238, 144),
[ "limegreen" ] = Color(50, 205, 50),
[ "lime" ] = Color(0, 255, 0),
[ "forestgreen" ] = Color(34, 139, 34),
[ "green" ] = Color(0, 128, 0),
[ "darkgreen" ] = Color(0, 100, 0),
[ "lawngreen" ] = Color(124, 252, 0),
[ "chartreuse" ] = Color(127, 255, 0),
[ "greenyellow" ] = Color(173, 255, 47),
[ "darkolivegreen" ] = Color(85, 107, 47),
[ "yellowgreen" ] = Color(154, 205, 50),
[ "olivedrab" ] = Color(107, 142, 35),
[ "ivory" ] = Color(255, 255, 240),
[ "beige" ] = Color(245, 245, 220),
[ "lightyellow" ] = Color(255, 255, 224),
[ "lightgoldenrodyellow" ] = Color(250, 250, 210),
[ "yellow" ] = Color(255, 255, 0),
[ "olive" ] = Color(128, 128, 0),
[ "darkkhaki" ] = Color(189, 183, 107),
[ "palegoldenrod" ] = Color(238, 232, 170),
[ "lemonchiffon" ] = Color(255, 250, 205),
[ "khaki" ] = Color(240, 230, 140),
[ "gold" ] = Color(255, 215, 0),
[ "cornsilk" ] = Color(255, 248, 220),
[ "goldenrod" ] = Color(218, 165, 32),
[ "darkgoldenrod" ] = Color(184, 134, 11),
[ "floralwhite" ] = Color(255, 250, 240),
[ "oldlace" ] = Color(253, 245, 230),
[ "wheat" ] = Color(245, 222, 179),
[ "orange" ] = Color(255, 165, 0),
[ "moccasin" ] = Color(255, 228, 181),
[ "papayawhip" ] = Color(255, 239, 213),
[ "blanchedalmond" ] = Color(255, 235, 205),
[ "navajowhite" ] = Color(255, 222, 173),
[ "antiquewhite" ] = Color(250, 235, 215),
[ "tan" ] = Color(210, 180, 140),
[ "burlywood" ] = Color(222, 184, 135),
[ "darkorange" ] = Color(255, 140, 0),
[ "bisque" ] = Color(255, 228, 196),
[ "linen" ] = Color(250, 240, 230),
[ "peru" ] = Color(205, 133, 63),
[ "peachpuff" ] = Color(255, 218, 185),
[ "sandybrown" ] = Color(244, 164, 96),
[ "chocolate" ] = Color(210, 105, 30),
[ "saddlebrown" ] = Color(139, 69, 19),
[ "seashell" ] = Color(255, 245, 238),
[ "sienna" ] = Color(160, 82, 45),
[ "lightsalmon" ] = Color(255, 160, 122),
[ "coral" ] = Color(255, 127, 80),
[ "orangered" ] = Color(255, 69, 0),
[ "darksalmon" ] = Color(233, 150, 122),
[ "tomato" ] = Color(255, 99, 71),
[ "salmon" ] = Color(250, 128, 114),
[ "mistyrose" ] = Color(255, 228, 225),
[ "lightcoral" ] = Color(240, 128, 128),
[ "snow" ] = Color(255, 250, 250),
[ "rosybrown" ] = Color(188, 143, 143),
[ "indianred" ] = Color(205, 92, 92),
[ "red" ] = Color(255, 0, 0),
[ "brown" ] = Color(165, 42, 42),
[ "firebrick" ] = Color(178, 34, 34),
[ "darkred" ] = Color(139, 0, 0),
[ "maroon" ] = Color(128, 0, 0),
[ "white" ] = Color(255, 255, 255),
[ "whitesmoke" ] = Color(245, 245, 245),
[ "gainsboro" ] = Color(220, 220, 220),
[ "lightgrey" ] = Color(211, 211, 211),
[ "silver" ] = Color(192, 192, 192),
[ "darkgray" ] = Color(169, 169, 169),
[ "gray" ] = Color(128, 128, 128),
[ "dimgray" ] = Color(105, 105, 105),
[ "black" ] = Color(0, 0, 0)

Are you sure you used up all colors?

No i mean is there a way to disable the check for other factions having the same color as you.

And yeah, when you have 80-100 players everyday they will all be used pretty soon :)
Title: Re: AWG Factions v0.03 - by Anzu
Post by: JasonMRC on February 10, 2014, 10:45:04 pm
I imagine you can just comment the check IF out, I believe it's in the server file.

Or you can add more colors.

Or you can delete factions with less than X players. You don't need 500 factions with one person each.

If you have any of the real factions(from the Factions forum) on your server then I'm sure they would appreciate no one else using their color.

On another note, it seems AWG factions is no longer supported by the scripter :/
Title: Re: AWG Factions v0.03 - by Anzu
Post by: SonnySalieri on February 11, 2014, 09:48:55 am
I imagine you can just comment the check IF out, I believe it's in the server file.

Or you can add more colors.

Or you can delete factions with less than X players. You don't need 500 factions with one person each.

If you have any of the real factions(from the Factions forum) on your server then I'm sure they would appreciate no one else using their color.

On another note, it seems AWG factions is no longer supported by the scripter :/

Yea the script should be modified so that it should have some default factions like CEF, PanauAir, EliteSquad, LaAirtrip, Roadtrip with the colors they use (like CEF used to be red etc.) and the rest of the colors should be left for the player created factions but then it might kinda lose the main purpose to let players create their own factions with whatever they want i mean like with whatever colors they want to use.

Yea you could sometimes check the factionlist and delete the less used ones i mean like the ones that have less than 3 members maybe.

Maybe the AWG's scripter has some RL issues to attend to and maybe he'll continue to upgrade it later since he wrote many things on the ToDo list and since this is only a game and everyone has their own lives to live beside it.
Title: Re: AWG Factions v0.03 - by Anzu
Post by: JasonMRC on February 11, 2014, 08:18:30 pm
I imagine you can just comment the check IF out, I believe it's in the server file.

Or you can add more colors.

Or you can delete factions with less than X players. You don't need 500 factions with one person each.

If you have any of the real factions(from the Factions forum) on your server then I'm sure they would appreciate no one else using their color.

On another note, it seems AWG factions is no longer supported by the scripter :/

Yea the script should be modified so that it should have some default factions like CEF, PanauAir, EliteSquad, LaAirtrip, Roadtrip with the colors they use (like CEF used to be red etc.) and the rest of the colors should be left for the player created factions but then it might kinda lose the main purpose to let players create their own factions with whatever they want i mean like with whatever colors they want to use.

Yea you could sometimes check the factionlist and delete the less used ones i mean like the ones that have less than 3 members maybe.

Maybe the AWG's scripter has some RL issues to attend to and maybe he'll continue to upgrade it later since he wrote many things on the ToDo list and since this is only a game and everyone has their own lives to live beside it.
It's not possible to have factions pre-setup and besides, it would be pointless to have factions already assigned to those in the factions forum for each server that uses this MOD. If a server is the home of one of those Factions they can contact the owner, tell them their Unique Faction color in RGB and the owner can make an entry in the colors list for "CEFRed" for example. The Faction leader then immidiately changes their color to that and no one else can use it.

I would be willing to do this for any Factions that chose my server as their home. Though I imagine most Owners would be willing to do this.

Yea, Anzu probably got busy with life or bored with JC2MP. Either way, for the time being this script only has community support.
Title: Re: AWG Factions v0.03 - by Anzu
Post by: SonnySalieri on February 14, 2014, 05:20:45 pm
Jason i think if Anzu wont be back to continue this then maybe you or Rooday or misterff1 should add the things on Anzu's ToDo list to a new "project" to work on after you finished the current ones you work on now to make this faction script complete
Title: Re: AWG Factions v0.03 - by Anzu
Post by: misterff1 on February 14, 2014, 05:31:44 pm
Jason i think if Anzu wont be back to continue this then maybe you or Rooday or misterff1 should add the things on Anzu's ToDo list to a new "project" to work on after you finished the current ones you work on now to make this faction script complete

Since Anzu has the same view on sharing scripts as us(this script proves it) I think he might do this himself.
And since he is indeed not on at this time I think ot would be polite to wait until he says he actually is planning to add it and otherwise if he likes one or more of us to help.

I really appreciate this script, first breakthrough on script sharing, so I absolutely don't want to interfere with the master :D
Title: Re: AWG Factions v0.03 - by Anzu
Post by: SonnySalieri on February 14, 2014, 08:18:38 pm
I didnt mean to interfere with Anzu i only meant if he wont continue this or wont post whether he will or will not continue this then i think u guys could continue the script on this topic not a new one.
Title: Re: AWG Factions v0.03 - by Anzu
Post by: JasonMRC on February 14, 2014, 08:49:34 pm
I imagine Anzu will be back, and since he wrote the script he knows it better than any of us could. I don't really feel this is a project I could do to its expected level.

For now we'll answer questions and help as much as possible.
Title: Re: AWG Factions v0.03 - by Anzu
Post by: misterff1 on February 14, 2014, 09:07:26 pm
I imagine Anzu will be back, and since he wrote the script he knows it better than any of us could. I don't really feel this is a project I could do to its expected level.

For now we'll answer questions and help as much as possible.

This ^
Title: Re: AWG Factions v0.03 - by Anzu
Post by: Box-O-Aces on February 20, 2014, 05:40:04 pm
Where's the thanks button?!  Nice, thanks and awesome!
Title: Re: AWG Factions v0.03 - by Anzu
Post by: Anzu on February 20, 2014, 09:29:29 pm
Hey guys, I apologize for the long absence and failure to update this for the last couple months.  Unfortunately, I've been really busy with other projects and not had the time I wanted to work on this.  Due to low population on the JC2MP server and increase in workload from my other gaming projects (ArmA 3 mainly), I've sorta lost motivation to keep scripting on this as heavily as I was.

I encourage anyone who wants to, to go ahead and fork it and contribute what they think would be good features.  I posted it on Github so that everyone can share the code, so feel free to do what you want with it :)

I will try to make some updates here and there and fix bugs, add features and stuph when I have the time and motivation, but it probably won't be as often as before.  Sorry for the disappointment to any of you guys that were expecting more updates lately.  If I get some free time I will try to update this when I can, but can't make any promises as to when that is.

If you have suggestions for features or bug fixes, the best thing to do would be to post them as Issues on Github.  That way it's easier to see what needs to be done in a neat list that can be checked off, instead of on the thread here.

Thanks for all the good feedback guys glad some of you have fun with this mod :)
Title: Re: AWG Factions v0.03 - by Anzu
Post by: misterff1 on February 20, 2014, 09:54:27 pm
Thanks for the reply Anzu! We will alter some stuff later(at least our scripting group, don't know about others) once we finished some things with a higher priority. It is understandable that you are less motivated and I like to thank you for all the hard work on it so far.

Would be appreciated if you fix bugs when they occur, we wi help with the features :)

Title: Re: AWG Factions v0.03 - by Anzu
Post by: SonnySalieri on February 21, 2014, 12:08:13 am
Yea i can second that, and i know how it is to work on more than one projects at once,
i've done it when i was scripting things in SA:MP. And yea thanks for this great script again.

The next section of my current post might be looked at by some as a kinda double post since i think i might already written these ideas but i dont want the following ideas to be "forgotten" so look at it as a bump.

-----------------------------------------------------------------------------------------

1., The script should allow spaces and underscores ( _ ) in Faction names

2., Ideas about faction bases:
Creating bases and/or turfs: with a white or a "faction-colored" big "checkpoint circle"
(like where the jobs start int the Panau Drivers script) which's radius is the borders either of a
military base or a stronghold (single player stronghold) or a village, or a mansion, depending on
what the faction leader wants to make for a base.

3., Military airports should be made for takeable bases but not the Panau Intl Airport, cuz of according to the Battle For Panau server and freeroam servers the PIA is allways a clusterfuck area that becomes either boring to take over or annoying to players.

4., Add faction-base  related cmds like /base create basename, /base contest
(to make a gangwar for a base), /base list, /base teleport

5., Relating factions with vehicles:
The script should be able to add vehicles to factions (or maybe only just IF the vehicle Manager
wont be upgraded with this feature to add vehs to factions/jobs/companies etc.)

6., Relating faction vehs with bases:
When a faction takes over a base the faction leader should have the ability to spawn/remove
some vehicles for his faction there (like some APC-s or tanks for defense) BUT when this
faction loses the base to another faction then the vehs would be removed so the next owner will
have the ability to spawn any vehicle at base for them with a /f vspawn vehicleID command
or similar, so it wouldnt be an automated vehicle change like on the Battle For Panau server
and this way all members would have this as one more thing to do in the faction besides their own
ideas of activities so this would make the faction kinda more active. The faction vehs should
be only usable by the faction that owns them. I know some would say the faction members can
get their own vehicles from the buymenu but i think the members wont just stay at the base
all day to defend it and the faction vehicles which would be spawned by the leader could be used
by any member at any time he wishes to use it and the faction vehs should cost no cash to spawn.
Faction vehs should be spawnable/removable outside of the base by the leader too if needed and
would be fully removed automaticly if the faction gets deleted or disbanded but the faction vehs
in the zone of the base would be automaticly removed when the base gets taken over by other faction.

7., Decision about whether only 1 base can be made or more than one
Maybe add a possibility to take over more places for base or as turf, like its on RLRP, that a faction has one base but can take over more places (villages/military bases, city districts etc.) for turf, so there could be not only a war for a base but for turf too. And if the base (for example a stronghold) got taken over by a rival faction then a place from the turf (a village, military base etc.) still owned could become the "next base".