Factions

A Faction system with Leaders, Taxes, Trades, Ranks, Kill Rewards, and MORE!

Total Downloads: 2,749 - First Release: May 20, 2016 - Last Update: Oct 27, 2017

5/5, 24 likes
  1. yes delete the old config, old data and old file in lang folder too, but get this error again
     
  2. I'm trying to figure it out.

    Can anyone confirm they have loaded the newest version?
     
  3. I just deleted everything, downloaded the version I posted, and loaded it. No issues. I don't know why you are getting that error....
     
  4. i try it on another server and get this error again....
     
  5. Im really sorry to hear but I just deleted everything a second time and once again loaded a freshly downloaded copy without issue.

    I just don't know how to help you.

    Sorry khodhalnima!
     
  6. 1. Open Factions Window /faction
    2. Press Tab button

    Or if Factions button is enabled:
    1. Press Tab button
    2. Press Factions button

    See screen for more details.
     

    Attached Files:

  7. Are you commenting on that the Player Menu stays open with the Factions Menu? I'd need to research if there is a way to auto-close TAB or vice-versa. Since TAB is a system menu I don't know if I can alter it. Similar to how I cant add custom spawn buttons to the spawn screen; instead it requires you to respawn then click the custom spawn button.

    If that isnt what you are mentioning please elaborate : )
     
  8. Yeap, Player Menu stays open
    if
    {
    "color": "1.0 0.55 0.0 1.0",
    "Use_Button": true,
    "xMax": 0.66,
    "xMin": 0.63,
    "yMax": 0.08,
    "yMin": 0.05
    }
    1. Press Tab button
    2. Press on Factions button

    if

    {
    "color": "1.0 0.55 0.0 1.0",
    "Use_Button": false,
    "xMax": 0.66,
    "xMin": 0.63,
    "yMax": 0.08,
    "yMin": 0.05
    }
    1. Open Factions Window. Type: /faction in chat
    2. Press Tab button


    And another one issue: lots of words are in cs file, not in lang file. It's really difficult to translate it
     
  9. The Use_Button should only modify if the "FACTIONS" button shows up near the Player's Tool Belt. Is that what you are seeing?

    As mentioned the Player Menu (inventory, stats, etc.) stays open by default. Even GUI Shop works that way; I'd guess Server Rewards (/s) works the same way as well.

    I'll see about translating Config Entries.
     
  10. I've got several questions
    1. how to change Ranks names?
    2. hot to change buttons and words in menu easy ? (I want to do GUI like in Quest plug)
    3. If some value in config is wrong - cs file not compiled

    Code:
    [Oxide] 21:00 [Warning] [Factions] Use_ChallengerBecomesLeader will not work without Use_FactionLeaderByAdmin. Unloading Factions as it will not work properly.
    [Oxide] 21:00 [Error] Failed to call hook 'Unload' on plugin 'Factions v2.0.0' (KeyNotFoundException: The given key was not present in the dictionary.)
    [Oxide] 21:00 [Debug]   at System.Collections.Generic.Dictionary`2[System.UInt64,Oxide.Plugins.Factions+FactionPlayerData].get_Item (UInt64 key) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.Factions.DestroyPlayer (.BasePlayer player) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.Factions.Unload () [0x00000] in <filename unknown>:0
      at Oxide.Plugins.Factions.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.CSharpPlugin.InvokeMethod (HookMethod method, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Core.Plugins.Plugin.CallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0
    [Oxide] 21:00 [Info] Unloaded plugin Factions v2.0.0 by K1lly0u & Absolut
     
  11. Neither would be easy to implement at the moment. I'll look into it
     
  12. Code:
    (01:21:35) | [Oxide] 22:52 [Debug]   at System.Collections.Generic.Dictionary`2[System.UInt64,Oxide.Plugins.Factions+FactionPlayerData].get_Item (UInt64 key) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.Factions.DestroyPlayer (.BasePlayer player) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.Factions.Unload () [0x00000] in <filename unknown>:0
      at Oxide.Plugins.Factions.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.CSharpPlugin.InvokeMethod (HookMethod method, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Core.Plugins.Plugin.CallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0
    (01:21:35) | [Oxide] 22:52 [Info] Unloaded plugin Factions v2.0.0 by K1lly0u & Absolut
    (01:21:35) | [Oxide] 22:52 [Info] Loaded plugin Factions v2.0.0 by K1lly0u & Absolut
    (01:21:35) | [Oxide] 22:52 [Error] Failed to call hook 'OnServerInitialized' on plugin 'Factions v2.0.0' (StackOverflowException: The requested operation caused a stack overflow.)
    (01:21:41) | [Oxide] 22:52 [Debug]   at Oxide.Plugins.Factions.SavePlayerFactionTime () [0x00000] in <filename unknown>:0
      at Oxide.Plugins.Factions.SaveData () [0x00000] in <filename unknown>:0
      at Oxide.Plugins.Factions.SavePlayerFactionTime () [0x00000] in <filename unknown>:0
      at Oxide.Plugins.Factions.SaveData () [0x00000] in <filename unknown>:0
      at Oxide.Plugins.Factions.SavePlayerFactionTime () [0x00000] in <filename unknown>:0
      at Oxide.Plugins.Factions.SaveData () [0x00000] in <filename unknown>:0
      at Oxide.Plugins.Factions.SavePlayerFactionTime () [0x00000] in <filename unknown>:0
    this is my config file and i get the above error when reloading the plugin
    Code:
    {
      "AllowedFactionDifference": 5,
      "BroadcastDeath": true,
      "BuildingProtectionEnabled": false,
      "CheckLeader_Interval": 60,
      "DefaultFaction_Rebels": true,
      "FactionA_Chat_Color": "<color=#CC3232>",
      "FactionA_GUI_Color": "0.9 0.1 0.2 1.0",
      "FactionA_Kit": "FactionAKit",
      "FactionA_Name": "Faction A",
      "FactionAGroupName": "FactionA",
      "FactionB_Chat_Color": "<color=#33adff>",
      "FactionB_GUI_Color": "0.2 0.67 1.0 1.0",
      "FactionB_Kit": "FactionBKit",
      "FactionB_Name": "Faction B",
      "FactionBGroupName": "FactionB",
      "FactionC_Chat_Color": "<color=#458B00>",
      "FactionC_GUI_Color": "0.2 0.6 0.2 1.0",
      "FactionC_Kit": "FactionCKit",
      "FactionC_Name": "Faction C",
      "FactionCGroupName": "FactionC",
      "FactionInfoFrequency": 15,
      "FactionKillsRewardEconomics": 500,
      "FactionKillsRewardServerRewards": 50,
      "FactionKillsRewardTokens": 50,
      "FactionNone_Chat_Color": "<color=#ffeb33>",
      "FactionNone_GUI_Color": "1.0 0.92 .20 1.0",
      "FactionNone_Kit": "FactionNoneKit",
      "FactionNone_Name": "Rebels",
      "FactionRadius": 100.0,
      "FF_DamageScale": 0.0,
      "FFDisabled": true,
      "KillAmountEconomics": 100,
      "KillAmountServerRewards": 10,
      "KillAmountTokens": 10,
      "KillLimit": 200,
      "KillTickerResetTimer": 5,
      "LevelBonus": 10.0,
      "LevelRequirement": 5000,
      "MaxLevel": 20,
      "MSG_Color": "<color=#A9A9A9>",
      "MSG_MainColor": "<color=orange>",
      "RankBonus": 25.0,
      "RankRequirement": 1,
      "Save_Interval": 15,
      "StarterKit": "StarterKit",
      "TradeLimit": 2,
      "Use_ChallengerBecomesLeader": false,
      "Use_EconomicsReward": false,
      "Use_FactionBalancing": false,
      "Use_FactionChatControl": true,
      "Use_FactionGear": true,
      "Use_FactionKillIncentives": false,
      "Use_FactionLeaderByAdmin": false,
      "Use_FactionLeaderByRank": false,
      "Use_FactionLeaderByTime": true,
      "Use_FactionsByInvite": false,
      "Use_FactionsInfo": true,
      "Use_FactionSpawns": false,
      "Use_FactionWeapons": false,
      "Use_Groups": false,
      "Use_Kits": false,
      "Use_RallySpawns": false,
      "Use_Ranks": false,
      "Use_RevoltChallenge": false,
      "Use_ServerRewardsReward": false,
      "Use_Taxes": true,
      "Use_TokensReward": false,
      "Use_Trades": false,
      "z_Faction_Button": [
        {
          "color": "1.0 0.55 0.0 1.0",
          "Use_Button": true,
          "xMax": 0.66,
          "xMin": 0.63,
          "yMax": 0.08,
          "yMin": 0.05
        }
      ],
      "z_FactionA_Gear": [
        {
          "amount": 1,
          "container": "wear",
          "name": "T-Shirt",
          "shortname": "tshirt",
          "skin": 101
        },
        {
          "amount": 1,
          "container": "wear",
          "name": "Pants",
          "shortname": "pants",
          "skin": 10021
        },
        {
          "amount": 1,
          "container": "wear",
          "name": "Boots",
          "shortname": "shoes.boots",
          "skin": 10023
        }
      ],
      "z_FactionA_Weapons": [
        {
          "ammo": 120,
          "ammoType": "ammo.rifle.hv",
          "amount": 1,
          "container": "belt",
          "contents": [
            "weapon.mod.holosight"
          ],
          "name": "AssaultRifle",
          "shortname": "rifle.ak",
          "skin": 0
        },
        {
          "ammo": 120,
          "ammoType": "arrow.wooden",
          "amount": 1,
          "container": "belt",
          "contents": null,
          "name": "Hunting Bow",
          "shortname": "bow.hunting",
          "skin": 0
        }
      ],
      "z_FactionB_Gear": [
        {
          "amount": 1,
          "container": "wear",
          "name": "T-Shirt",
          "shortname": "tshirt",
          "skin": 14177
        },
        {
          "amount": 1,
          "container": "wear",
          "name": "Pants",
          "shortname": "pants",
          "skin": 10021
        },
        {
          "amount": 1,
          "container": "wear",
          "name": "Boots",
          "shortname": "shoes.boots",
          "skin": 10023
        }
      ],
      "z_FactionB_Weapons": [
        {
          "ammo": 120,
          "ammoType": "ammo.rifle.hv",
          "amount": 1,
          "container": "belt",
          "contents": [
            "weapon.mod.holosight"
          ],
          "name": "AssaultRifle",
          "shortname": "rifle.ak",
          "skin": 0
        },
        {
          "ammo": 120,
          "ammoType": "arrow.wooden",
          "amount": 1,
          "container": "belt",
          "contents": null,
          "name": "Hunting Bow",
          "shortname": "bow.hunting",
          "skin": 0
        }
      ],
      "z_FactionC_Gear": [
        {
          "amount": 1,
          "container": "wear",
          "name": "T-Shirt",
          "shortname": "tshirt",
          "skin": 14181
        },
        {
          "amount": 1,
          "container": "wear",
          "name": "Pants",
          "shortname": "pants",
          "skin": 10021
        },
        {
          "amount": 1,
          "container": "wear",
          "name": "Boots",
          "shortname": "shoes.boots",
          "skin": 10023
        }
      ],
      "z_FactionC_Weapons": [
        {
          "ammo": 120,
          "ammoType": "ammo.rifle.hv",
          "amount": 1,
          "container": "belt",
          "contents": [
            "weapon.mod.holosight"
          ],
          "name": "AssaultRifle",
          "shortname": "rifle.ak",
          "skin": 0
        },
        {
          "ammo": 120,
          "ammoType": "arrow.wooden",
          "amount": 1,
          "container": "belt",
          "contents": null,
          "name": "Hunting Bow",
          "shortname": "bow.hunting",
          "skin": 0
        }
      ]
    }
     
    Last edited by a moderator: Jun 18, 2016
  13. Try changing The Leader Selection Mode from Time to Rank or by Admin. Let me know the result so I can figure it out. I think it doesnt like something to do with time.

    "Use_FactionLeaderByRank": true,

    "Use_FactionLeaderByTime": false,
     
  14. "Use_ChallengerBecomesLeader": true,
    If you put the above to true it will only work if you also put
    "Use_FactionLeaderByAdmin": true,
    Can you explain what this setting does
     
  15. I clarified it a bit more on the Description so thanks for asking!

    Faction Leaders By Admin: This setting makes it so the Leader is selected by the Admin. This mode allows the use of Use_ChallengerBecomesLeader which merely means if Use_RevoltChallenge is enabled and the Challenger wins he or she becomes the new Leader.

    The reason this setting is only attached to Faction Leaders By Admin is because the other modes have dependencies (time and rank) which may suggest someone else in the Faction should become the new Leader. I didn't want to strip the Leader of Rank as it gives much more then just Leadership (damage mod). As per with Time, the Leaders time on Challenge loss goes back to "0" so the next highest Time becomes the Leader instead of the Challenger.

    Does this make sense?
     
  16. i changed "Use_FactionLeaderByRank": true, but get this error this time
    Code:
    (01:44:06) | [Oxide] 23:14 [Debug] at System.Collections.Generic.Dictionary`2[System.UInt64,Oxide.Plugins.Factions+FactionPlayerData].get_Item (UInt64 key) [0x00000] in <filename unknown>:0at Oxide.Plugins.Factions.DestroyPlayer (.BasePlayer player) [0x00000] in <filename unknown>:0at Oxide.Plugins.Factions.Unload () [0x00000] in <filename unknown>:0at Oxide.Plugins.Factions.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0at Oxide.Plugins.CSharpPlugin.InvokeMethod (HookMethod method, System.Object[] args) [0x00000] in <filename unknown>:0at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0at Oxide.Core.Plugins.Plugin.CallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0(01:44:11) | [Oxide] 23:14 [Info] Unloaded plugin Factions v2.0.0 by K1lly0u & Absolut(01:44:11) | [Oxide] 23:14 [Info] Loaded plugin Factions v2.0.0 by K1lly0u & Absolut
     
    Last edited by a moderator: Jun 18, 2016
  17. If you unload again do you get the same error? It was probably unloading and trying to save Time as that was your last known setting before reloading the plugin.

    This error still might be related to Time. It looks like it loaded fine with the Rank setting.
     
  18. Already looked at the overview and read it all before you posted this and understood it, that's why I deleted that post, but another thing the config changes when server is running so if server is offline config is default and its completely different when server is running is this the way you wanted it to be
    [DOUBLEPOST=1466198544][/DOUBLEPOST]
    Make sure you have set Use_FactionKillIncentives to true
     
  19. Good question and I was trying to decide how to vocalize the config settings changes. In the past I had it so you could modify and reload the config with success. However, there was no data protection. Instead what it does is on unload check for a config and if one isn't present it saves last known good settings as a file. This protects you from losing your settings on accident; it also is a pain in the ass sometimes. This was also necessary to implement the CONFIG buttons I put in the Faction Menu.

    The best thing to do is unload the plugin, make changes, load the plugin. Once the big ones are set (names, colors, gear, weapons, etc.) the small stuff like Using Trades, Kills, etc. can be done from within the game using the Options Buttons.

    I plan to expand on the in game config settings as well as making more chat commands obsolete (setting taxes, invite players, etc.)
    [DOUBLEPOST=1466199468][/DOUBLEPOST]
    I add this to the description: (AGAIN thanks for mentioning it!)

    IMPORTANT REGARDING CHANGING THE CONFIG:

    To protect against data loss and to enable saving of configuration options within the game (using the Options Menu) this plugin requires config changes made directly to the file to be done with the plugin UNLOADED. If you attempt to make manual changes to the config file with the plugin loaded it will override them with the last known good configuration on RELOAD. Instead, UNLOAD, make changes, LOAD.
     
  20. i set Use_FactionKillIncentives to true but get this error too
    Code:
    (23:08:49) | [RCON][5.239.29.69:55138] reload Factions
    (23:08:49) | [Oxide] 20:39 [Error] Failed to call hook 'Unload' on plugin 'Factions v2.0.0' (KeyNotFoundException: The given key was not present in the dictionary.)
    (23:08:49) | [Oxide] 20:39 [Debug] at System.Collections.Generic.Dictionary`2[System.UInt64,Oxide.Plugins.Factions+FactionPlayerData].get_Item (UInt64 key) [0x00000] in <filename unknown>:0
    at Oxide.Plugins.Factions.DestroyPlayer (.BasePlayer player) [0x00000] in <filename unknown>:0
    at Oxide.Plugins.Factions.Unload () [0x00000] in <filename unknown>:0
    at Oxide.Plugins.Factions.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0
    at Oxide.Plugins.CSharpPlugin.InvokeMethod (HookMethod method, System.Object[] args) [0x00000] in <filename unknown>:0
    at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0
    at Oxide.Core.Plugins.Plugin.CallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0
    (23:08:49) | [Oxide] 20:39 [Info] Unloaded plugin Factions v2.0.0 by K1lly0u & Absolut
    (23:08:49) | [Oxide] 20:39 [Info] Loaded plugin Factions v2.0.0 by K1lly0u & Absolut
    (23:08:49) | [Oxide] 20:39 [Error] Failed to call hook 'OnServerInitialized' on plugin 'Factions v2.0.0' (StackOverflowException: The requested operation caused a stack overflow.)
    (23:08:57) | [Oxide] 20:39 [Debug] at Oxide.Plugins.Factions.SavePlayerFactionTime () [0x00000] in <filename unknown>:0
    at Oxide.Plugins.Factions.SaveData () [0x00000] in <filename unknown>:0
    at Oxide.Plugins.Factions.SavePlayerFactionTime () [0x00000] in <filename unknown>:0
    at Oxide.Plugins.Factions.SaveData () [0x00000] in <filename unknown>:0
    at Oxide.Plugins.Factions.SavePlayerFactionTime () [0x00000] in <filename unknown>:0
    at Oxide.Plugins.Factions.SaveData () [0x00000] in <filename unknown>:0
    at Oxide.Plugins.Factions.SavePlayerFactionTime () [0x00000] in <filename unknown>:0
     
    Last edited by a moderator: Jun 18, 2016