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

2 years ago

Advertisement
August 24, 2019, 12:18:26 am

Author Topic: [BETA] FactionsPlus 1.0 (AWGFactions Revamp)  (Read 21461 times)

JasonMRC

  • Donator
  • Hero Member
  • *****
  • Posts: 601
    • View Profile
Re: [BETA] FactionsPlus 0.1 (AWGFactions Revamp)
« Reply #45 on: March 07, 2014, 08:02:51 am »
Heyyyyy! Just remembered while was reading JC2 wiki.

What's about child-factions? You know, there are some factions like Panau Military Forces, Panau Secret Service, etc.
So, I've decided to make it similar, here goes the relationship table (made this as an example):

Quote
|--Panau Military Forces
  |---Secret Service
     |----Internal Intellignece Agency
  |---Military Police
  |---National Guard
  |---Anti-Gang Task Forces
     |---Anti-Gang Mercenary Forces
|--Panau Police Departament
  |---Drug Enforcement Administration
  |---Special Task Forces (something like SWAT or GSG9 or Berkut)
|--Drug Dealers
  |---Meth cookers (why not? :D)
  |---LSD makers
  |---Delivery mercenaries
     |----Delivery security
So, there is something like it.
Three base factions, that have their subfactions. As people join secondary (|---), they have both tags: parent and child:

Quote
[Panau Military Forces]
[Secret Service]

Probably not the best idea, but this may become handy if there is a kind of roleplay server. I know, there are also faction relationships, but this may be used in Police -|- Drug Dealers and DD's/Police's child factions.

Parent and child factions must be unable to become anyhow relationshiped. Instead of "Ally" or "Enemy" there will be displayed whatever variable will be set to parent faction (let's just think it will be "Co-Worker" for now).

A lot of work, but it is worth it. Besides, variant of this system was previously released in DarkRP as I remember.

Whad do you think?

EDIT:

What about respawns at faction base? Clientsided settings of this would be nice because base might be far away from current AOO so default respawn may be better for players.
Are you saying that players can't join Panau Military Forces, but they could join the Secret service?
I get the tied relationship thing, who would control enemies/allies though?

Or are you saying there would be some in Panau Military forces, and then others in Secret Service, all 'under the same roof' and 'on the same side' but yet different factions? Connected, but separate? Different bases but the same allies?

Already have faction base respawn:
Quote from: First Post
Spawn/Respawn at Faction's Base
If a player's faction has a Base set they will always Spawn there on join and respawn there on death. Currently bases cannot be deleted except by setting a new one and you cannot independently turn respawn off, so you will always spawn at base unless you leave the faction.
TBH, Random spawn is no better than base respawn. And also there is Rally points or warping to a faction member to return to battle. The Rally point is designed to be at the front lines where people can regroup or teleport into action.

On another note, here's the changelog of the day:
Quote from: Changelog
3-6-14
-Added Base Heal. Players now heal 1% per member in their faction. This is on a configurable time rate which is currently set at 1 second(so 1% per member per second). The amount healed can be scaled by the Admin. This also heals vehicles. The distance is controlled by the FactionBaseRelativeSize config setting which controls whether or not base sizes are set by the admin or relative to the faction's member count. This makes Faction bases easier to defend, but not impossible to take over.
-Added Permissions for each command to help file. The Help menu entry now says what rank(Both title and number) can do what.
-Added Full Rank List to help. The help file now shows all 10 ranks, both title and number, so people know what ranks are available. The 10 ranks are: Recruit, Member, Private, Guerilla, Ranger, Colonel, Captain, Commander, Co-Leader, and Leader.
-Added permissions for each faction command. Admins can set a minimum required rank for teleport to the Faction base, rally point or other members, and the ability to view the faction's diplomacy list and member list.

VampiricPadraig

  • Donator
  • Newbie
  • *****
  • Posts: 20
    • View Profile
Re: [BETA] FactionsPlus 0.1 (AWGFactions Revamp)
« Reply #46 on: March 12, 2014, 08:05:45 pm »
I have mearly skim read the thread and I am very impressed on what you are doing. Can't wait to try this out when it is available.

JasonMRC

  • Donator
  • Hero Member
  • *****
  • Posts: 601
    • View Profile
Re: [BETA] FactionsPlus 0.1 (AWGFactions Revamp)
« Reply #47 on: March 12, 2014, 09:01:04 pm »
Hey y'all.

I know I haven't posted in almost a week, but that's because I've been busy. FactionsPlus is not abandoned nor will it be.

I did a major recode to how information is handled. FactionsPlus now broadcasts all member info and faction info in these two events:
Code: [Select]
    Events:Fire("PluginFactionsPlusFactionMembers", FactionsPlusAllMemberInfo)
    Events:Fire("PluginFactionsPlusFactionInformation", FactionsPlusAllFactionInfo)
This means any module can pick up and use FactionsPlus information without having to change any code in FactionsPlus. Just add these lines to your init and the variable received by that function will be a table with all the information.
Code: [Select]
Events:Subscribe("PluginFactionsPlusFactionMembers", self, self.FactionsPlusPluginListenToBroadcastAllMembers)
Events:Subscribe("PluginFactionsPlusFactionInformation", self, self.FactionsPlusPluginListenToBroadcastAllFactionInfo)
Pre-fab functions will come with FactionsPlus so literally all you need to do is cut and paste them into your server file and you have access to ALL FactionsPlus data.

Everytime the data changes the information is rebroadcast and subsequently re-received, so you're never using old data. FactionsPlus also re-broadcasts on player join/leave and on ModulesLoad so that information is always up to date.

I am currently using this system in 3 Independent modules and it's working like a charm. Easy to use and efficient.

This is part of a new community wide system I intend to start, a Plugin Co-Operative of sorts. More details about that when I post about it.

Faction Base healing had a bug that caused a crash due to it pulling all information from the DB every tick(inefficient to the max, I know). That was fixed by having some of FactionsPlus' internal functions now run off of the same table it is broadcasting. This means it's only running off of a local variable instead of a DB pull each time.

I added the ability for FactionsPlus to handle objects near Faction Bases. This will automatically move objects inside faction bases when the faction moves their base. This feature can be disabled in the config to prevent random objects being moved.

SonnySalieri

  • Full Member
  • ***
  • Posts: 189
    • View Profile
Re: [BETA] FactionsPlus 0.1 (AWGFactions Revamp)
« Reply #48 on: March 19, 2014, 12:56:57 pm »
Is a feature possible to add to factions+ that factiontypes would spawn with different type of weapons? For example like gangs with sawnoff and shotgun, military with smg and machine gun etc, and if the leader wants different weps for his faction then he can set it over to the desired ones? this would make a kinda community work in factions since members hafta talk about what weps they want, ofcourse the members' chance of buying different weps other than the factions' default would be simply possible through the buymenu for themselves.

GandalfGreyhame

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: [BETA] FactionsPlus 0.9 (AWGFactions Revamp)
« Reply #49 on: April 17, 2014, 10:14:47 am »
if you do end up releasing this, will there be a way to import existing faction info from anzu's original script? would hate losing the factions already in place.. great job by the way.

JasonMRC

  • Donator
  • Hero Member
  • *****
  • Posts: 601
    • View Profile
Re: [BETA] FactionsPlus 0.9 (AWGFactions Revamp)
« Reply #50 on: April 17, 2014, 05:21:36 pm »
if you do end up releasing this, will there be a way to import existing faction info from anzu's original script? would hate losing the factions already in place.. great job by the way.
Yes, that feature already exists. It is ran by an ingame admin command which is Case-Sensitive. It also requires the toggling of a boolean variable in the server file which is the only thing in the server file that should ever be changed unless you know what you're doing and plan to add features. All config options are in the shared Config file.

For reference, transferring a large server(over 1k factions) takes about a minute. A small server of only ~200 takes about 15 seconds. Minimum member requirements can be set so that 1 and 0 member factions are not transferred. Great way to do cleanup simultaneously.

I do still plan to release this, but had run into some issues where I had to redesign part of it for optimization.

Darwood37

  • Donator
  • Hero Member
  • *****
  • Posts: 690
    • View Profile
Re: [BETA] FactionsPlus 0.9 (AWGFactions Revamp)
« Reply #51 on: April 18, 2014, 01:09:57 am »
I have seen this on your server Jas, you have done some amazing things with it. The original was great, had a few bugs which you helped me fix, thanks.

I have been tinkering with the original over the last few days. some things i changed was:
A better rank system, Pvt, Cpl., Capt., Col. and Gen. all with their own proper badges, that are shown above the faction tag.

Toggle friendly fire between faction members, sometimes a few people wanted to go off and have a good old shootout but they had to leave the faction first, now they dont have to leave they can just toggle friendly fire. This is also visible via the color of the rank tag.

A few of the player tables were not getting updated properly after certain routines, fixed. Also i updated the tables to hold all the information available.

Used the same routines from the nametags script to fix the showing of the factions tag and scaled it up a bit, scaled down the rank tag. all looks uniform now.

Updated the factions and players list to show more information.

I have it running on my test server and hopefully after this weekend i will go live. It is no where as complex and feature rich as yours but it does what i want for now.


JasonMRC

  • Donator
  • Hero Member
  • *****
  • Posts: 601
    • View Profile
Re: [BETA] FactionsPlus 0.9 (AWGFactions Revamp)
« Reply #52 on: April 18, 2014, 02:13:19 am »
I have seen this on your server Jas, you have done some amazing things with it. The original was great, had a few bugs which you helped me fix, thanks.

I have been tinkering with the original over the last few days. some things i changed was:
A better rank system, Pvt, Cpl., Capt., Col. and Gen. all with their own proper badges, that are shown above the faction tag.

Toggle friendly fire between faction members, sometimes a few people wanted to go off and have a good old shootout but they had to leave the faction first, now they dont have to leave they can just toggle friendly fire. This is also visible via the color of the rank tag.

A few of the player tables were not getting updated properly after certain routines, fixed. Also i updated the tables to hold all the information available.

Used the same routines from the nametags script to fix the showing of the factions tag and scaled it up a bit, scaled down the rank tag. all looks uniform now.

Updated the factions and players list to show more information.

I have it running on my test server and hopefully after this weekend i will go live. It is no where as complex and feature rich as yours but it does what i want for now.
Yea, I have a 10 rank system. They don't show on the faction tag though. Would be easy to add just didn't think it was necessary.

How does your friendly fire function? Player A must toggle it for Player B to be able to hurt him?

I recently rebuilt tags as well. Now rendering them in 2d space so scaling and distance isn't really an issue anymore(Probably the same as you did).

Yea, the DB tables are nearly unrecognizable from the originals due to how comprehensive they are now.

I'm interested to know what info you have showing in the player and factions list now.

Darwood37

  • Donator
  • Hero Member
  • *****
  • Posts: 690
    • View Profile
Re: [BETA] FactionsPlus 0.9 (AWGFactions Revamp)
« Reply #53 on: April 19, 2014, 02:51:39 am »

How does your friendly fire function? Player A must toggle it for Player B to be able to hurt him?

I'm interested to know what info you have showing in the player and factions list now.

Friendly fire works by a toggle which just changes the return true in the hitdamage function to return false.
Yes Player A (me) must toggle it to allow myself to (sound like Austin Powers here) accept damage from explosion, shot or pulse from player B.

Player lists i changed to /f members, it shows the name of the faction, the name of the player, the last time they were on or their current location if online and if they are in a vehicle or not. (still working on some trouble shooting on that).
Factions list shows all the factions with player names and last online or current position (may change that could be considered spying).  Currently working on moving it from chat to a nice display like dxscoreboard with tabs for scoreboard, All Factions, My Faction(members).

Have to work on a few bugs, fix it so you have to leave a faction before joining another, make sure you can only join one faction at a time.

Also have revamped player bounties as well over the last couple of days. Shows a tag over the players head now, fixed the limit to one bounty per player, but that's another post later. Bounties is live on my server. jc-mp.gaveroid.com:7777


« Last Edit: April 19, 2014, 02:53:18 am by Darwood37 »

JasonMRC

  • Donator
  • Hero Member
  • *****
  • Posts: 601
    • View Profile
Re: [BETA] FactionsPlus 0.9 (AWGFactions Revamp)
« Reply #54 on: April 19, 2014, 03:45:26 am »
Sounds like you're doing/plan to do a lot of the stuff I've already done. I should send you a Development copy of FactionsPlus so that you aren't building what's already been built.

Darwood37

  • Donator
  • Hero Member
  • *****
  • Posts: 690
    • View Profile
Re: [BETA] FactionsPlus 0.9 (AWGFactions Revamp)
« Reply #55 on: April 19, 2014, 04:46:49 am »
Sounds like you're doing/plan to do a lot of the stuff I've already done. I should send you a Development copy of FactionsPlus so that you aren't building what's already been built.

I appreciate the offer, you have gotten a lot more done than i ever intend to, I just want to keep it interesting, neat and organized but simple to use. to much for my tiny brain to comprehend as it is :)

JasonMRC

  • Donator
  • Hero Member
  • *****
  • Posts: 601
    • View Profile
Re: [BETA] FactionsPlus 1.0 (AWGFactions Revamp)
« Reply #56 on: May 06, 2014, 10:09:21 pm »
FactionsPlus is currently being stress tested on Misterff's Freeroam Fun Server, IP: 37.187.177.140

misterff1

  • Donator
  • Hero Member
  • *****
  • Posts: 582
    • View Profile
Re: [BETA] FactionsPlus 1.0 (AWGFactions Revamp)
« Reply #57 on: May 07, 2014, 08:18:46 am »
There is one thing I notice so far when testing: the faction base circle is larger than the base itself. Not sure if it was intended to be the same size, but if it is, that might need some tweaking

JasonMRC

  • Donator
  • Hero Member
  • *****
  • Posts: 601
    • View Profile
Re: [BETA] FactionsPlus 1.0 (AWGFactions Revamp)
« Reply #58 on: May 07, 2014, 09:14:48 am »
I assume you are referring to the minimap size versus the ingame size? This is due to the sizes rendering differently due to 3d space versus 2d space. The ingame one is the correct size.

The minimap has to use a separate scale, this can be found in the config, the variable 'FactionBaseMinimapRadius' You can try changing this to make it more accurate, but as the two are not exactly linked you may find it is accurate on small bases but not larger ones, etc.

misterff1

  • Donator
  • Hero Member
  • *****
  • Posts: 582
    • View Profile
Re: [BETA] FactionsPlus 1.0 (AWGFactions Revamp)
« Reply #59 on: May 07, 2014, 11:28:27 am »
Yeah already figured that would be the reason. It is not an issue anyway

Edit: found a real issue this time, when you remove someone from a faction as admin, the player cannot join a faction because it claims he is in one. then when the player tries /f leave it claims he is not in a faction! the problem is solved once the player rejoins though.

Also that spawn issue is only when you do /kill in the base. dying due to other causes will not trigger it.
« Last Edit: May 07, 2014, 02:20:40 pm by misterff1 »