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:19:15 pm

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

Jman100

  • Sr. Member
  • ****
  • Posts: 325
    • View Profile
Re: AWG Factions v0.02 - by Anzu
« Reply #30 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!
« Last Edit: December 29, 2013, 11:28:45 pm by Jman100 »

ZMax

  • Jr. Member
  • **
  • Posts: 88
    • View Profile
Re: AWG Factions v0.02 - by Anzu
« Reply #31 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!

Anzu

  • Donator
  • Newbie
  • *****
  • Posts: 26
    • View Profile
Re: AWG Factions v0.02 - by Anzu
« Reply #32 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.


Jman100

  • Sr. Member
  • ****
  • Posts: 325
    • View Profile
Re: AWG Factions v0.02 - by Anzu
« Reply #33 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!

Anzu

  • Donator
  • Newbie
  • *****
  • Posts: 26
    • View Profile
Re: AWG Factions v0.03 - by Anzu
« Reply #34 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.

misterff1

  • Donator
  • Hero Member
  • *****
  • Posts: 582
    • View Profile
Re: AWG Factions v0.03 - by Anzu
« Reply #35 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

Anzu

  • Donator
  • Newbie
  • *****
  • Posts: 26
    • View Profile
Re: AWG Factions v0.03 - by Anzu
« Reply #36 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
« Last Edit: January 01, 2014, 09:29:54 pm by Anzu »

misterff1

  • Donator
  • Hero Member
  • *****
  • Posts: 582
    • View Profile
Re: AWG Factions v0.03 - by Anzu
« Reply #37 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

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)

Jman100

  • Sr. Member
  • ****
  • Posts: 325
    • View Profile
Re: AWG Factions v0.03 - by Anzu
« Reply #38 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!

Anzu

  • Donator
  • Newbie
  • *****
  • Posts: 26
    • View Profile
Re: AWG Factions v0.03 - by Anzu
« Reply #39 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

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! :)

misterff1

  • Donator
  • Hero Member
  • *****
  • Posts: 582
    • View Profile
Re: AWG Factions v0.03 - by Anzu
« Reply #40 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

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
« Last Edit: January 02, 2014, 01:52:56 pm by misterff1 »

Anzu

  • Donator
  • Newbie
  • *****
  • Posts: 26
    • View Profile
Re: AWG Factions v0.03 - by Anzu
« Reply #41 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! :)
« Last Edit: January 03, 2014, 08:50:13 pm by Anzu »

misterff1

  • Donator
  • Hero Member
  • *****
  • Posts: 582
    • View Profile
Re: AWG Factions v0.03 - by Anzu
« Reply #42 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

Cygnes

  • Newbie
  • *
  • Posts: 42
    • View Profile
Re: AWG Factions v0.03 - by Anzu
« Reply #43 on: January 03, 2014, 10:23:38 pm »
are we able to take towns yet ?

when will that be available ?

zoydbot

  • Donator
  • Jr. Member
  • *****
  • Posts: 56
    • View Profile
Re: AWG Factions v0.03 - by Anzu
« Reply #44 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?