Jump to content

Cant do multiple permissions per weapon

Fixed 1.0.0 1.0.2

Matnat
Matnat

Posted

Is there any way to set more then one mag size permission per weapon like you could on the free Firearm Modifier mod on umod,

For example I tried this but it did not work.

{
      "weaponName": "rocket.launcher",
      "capacity": 3,
      "defaultCapacity": 1,
      "permission": "xmagazinecapacity.rocketlauncher3"
    },
    {
      "weaponName": "rocket.launcher.dragon",
      "capacity": 6,
      "defaultCapacity": 1,
      "permission": "xmagazinecapacity.rocketlauncher6"
    }

Matnat

Posted

Also finding the mod randomly stops working but is still loaded oxide logs are not reporting any errors so i have had to add a reload command in my server panel to reload it every hour 

xNullPointer95

Posted

Hi @Matnat

thank you - I will test this if theres an issue or something.

I cant imagine that the plugin is randomly stopping, since other users would've already reported it.

But as i said i will check and it will reply here again.

xNullPointer95

Posted (edited)

Hi @Matnat,

i retested your described issue and i didn't end with any faulty behavior.

I used same config as you shared:

Do you have the "Weapons": text in your config?

Screenshot-2025-11-29-142217.png

 

Here is also a Video to prove it is working - You are doing something wrong, did you reload the plugin when you changed the config? Its working as expected, your issues must come from somewhere else.

 

 

Edited by xNullPointer95
Matnat

Posted

sorry i gave you a bad example try using muti perms on the same type of weapon i.e. just use weapon "rocket.launcher" for both perms
{
      "weaponName": "rocket.launcher",
      "capacity": 3,
      "defaultCapacity": 1,
      "permission": "xmagazinecapacity.rocketlauncher3"
    },
    {
      "weaponName": "rocket.launcher",
      "capacity": 6,
      "defaultCapacity": 1,
      "permission": "xmagazinecapacity.rocketlauncher6"
    }

xNullPointer95

Posted (edited)

9 minutes ago, Matnat said:

sorry i gave you a bad example try using muti perms on the same type of weapon i.e. just use weapon "rocket.launcher" for both perms
{
      "weaponName": "rocket.launcher",
      "capacity": 3,
      "defaultCapacity": 1,
      "permission": "xmagazinecapacity.rocketlauncher3"
    },
    {
      "weaponName": "rocket.launcher",
      "capacity": 6,
      "defaultCapacity": 1,
      "permission": "xmagazinecapacity.rocketlauncher6"
    }

Edit: I get what you mean now, your provided example before was really bad since it was a normal config...

The reason for it is, it checks weaponName not permission - It will be fixed on next version. 🙂
Thanks for reporting it.

Edited by xNullPointer95
Matnat

Posted

no i am wanting to use it with skill tree by imthenewguy so as players increase the skill it is associated with it will remove the current perm and apply the next one so they can go
default 1 shot with 0 skill,
2 shot mag with level 1,
3 shots with level 2,
4 shots with level 3,
etc etc 

 

i currently do this with other mods like "retain on death" and "movement speed "

Matnat

Posted (edited)

this is how it is applied in skill tree with movement speed I tried the same with your mod but it would not work 

"permissions": {
            "description": "Upgrade the speed of your shoes and run faster",
            "perms": {
              "1": {
                "perms_list": {
                  "MovementSpeed.run.1.2": "Run at 40% Faster"
                }
              },
              "2": {
                "perms_list": {
                  "MovementSpeed.run.1.4": "Run at 80% Faster"
                }
              },
              "3": {
                "perms_list": {
                  "MovementSpeed.run.1.6": "Run at 120% Faster"
                }
              },
              "4": {
                "perms_list": {
                  "MovementSpeed.run.1.8": "Run at 160% Faster"
                }
              },
              "5": {
                "perms_list": {
                  "MovementSpeed.run.2.0": "Run at 200% Faster"
                }

 

this is an example of how i had it your mod in skill tree

"perms": {
              "1": {
                "perms_list": {
                  "xmagazinecapacity.rocketlauncher": "3 shot  mag rocketlauncher",
                  "xmagazinecapacity.drocketlauncher": "3 shot mag dragon rocketlauncher",
                  "xmagazinecapacity.rocketrpglauncher": "3 shot mag rpg launcher"
                }
              },
              "2": {
                "perms_list": {
                  "xmagazinecapacity.rocketlauncher2": "6 shot mag rocketlauncher",
                  "xmagazinecapacity.drocketlauncher2": "6 shot  mag dragon rocketlauncher",
                  "xmagazinecapacity.rocketrpglauncher2": "6 shot  mag rpg launcher"
                }
              }
            }

 

Edited by Matnat
xNullPointer95

Posted

@Matnat

I edited my previous message 15minutes ago, but i think you didn't see yet and only saw the text before i edited it 🙂

xNullPointer95

Posted

9 minutes ago, Matnat said:

this is how it is applied in skill tree with movement speed I tried the same with your mod but it would not work 

"permissions": {
            "description": "Upgrade the speed of your shoes and run faster",
            "perms": {
              "1": {
                "perms_list": {
                  "MovementSpeed.run.1.2": "Run at 40% Faster"
                }
              },
              "2": {
                "perms_list": {
                  "MovementSpeed.run.1.4": "Run at 80% Faster"
                }
              },
              "3": {
                "perms_list": {
                  "MovementSpeed.run.1.6": "Run at 120% Faster"
                }
              },
              "4": {
                "perms_list": {
                  "MovementSpeed.run.1.8": "Run at 160% Faster"
                }
              },
              "5": {
                "perms_list": {
                  "MovementSpeed.run.2.0": "Run at 200% Faster"
                }

 

this is an example of how i had it your mod in skill tree

"perms": {
              "1": {
                "perms_list": {
                  "xmagazinecapacity.rocketlauncher": "3 shot  mag rocketlauncher",
                  "xmagazinecapacity.drocketlauncher": "3 shot mag dragon rocketlauncher",
                  "xmagazinecapacity.rocketrpglauncher": "3 shot mag rpg launcher"
                }
              },
              "2": {
                "perms_list": {
                  "xmagazinecapacity.rocketlauncher2": "6 shot mag rocketlauncher",
                  "xmagazinecapacity.drocketlauncher2": "6 shot  mag dragon rocketlauncher",
                  "xmagazinecapacity.rocketrpglauncher2": "6 shot  mag rpg launcher"
                }
              }
            }

 

@Matnat

I edited my previous message 15minutes ago, but i think you didn't see yet and only saw the text before i edited it 🙂

Matnat

Posted

ok no problem thanks 

  • Like 1
xNullPointer95

Posted

2 minutes ago, Matnat said:

ok no problem thanks 

I think it makes sense if you have multiple permissions for same weaponname, the weapon capacity with most capacity will be taken

 

Example:

If we have this config

      "weaponName": "rocket.launcher",
      "capacity": 3,
      "defaultCapacity": 1,
      "permission": "xmagazinecapacity.rocketlauncher3"
    },
    {
      "weaponName": "rocket.launcher",
      "capacity": 6,
      "defaultCapacity": 1,
      "permission": "xmagazinecapacity.rocketlauncher6"
    },
    {
      "weaponName": "rocket.launcher",
      "capacity": 9,
      "defaultCapacity": 1,
      "permission": "xmagazinecapacity.rocketlauncher9"
    }

If we have all 3 permissions, rocketlauncher9 should be taken since its the permission which grants most capacity.

Does that sound good?

Matnat

Posted

that's the way I did the config originally but found that even just apply the perms one at a time manually it would not work 

xNullPointer95

Posted

19 minutes ago, Matnat said:

that's the way I did the config originally but found that even just apply the perms one at a time manually it would not work 

It was just a suggested behavior for the next update 🙂

xNullPointer95

Posted

Changed Status from Not a Bug to Fixed

Changed Fixed In to 1.0.2

2.1m

Downloads

Total number of downloads.

9.8k

Customers

Total customers served.

141.7k

Files Sold

Total number of files sold.

3m

Payments Processed

Total payments processed.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.