Update coming?Not An Issue

I keep getting "That auto turret has no weapon" if I try to make a loadout (yes it has a weapon in it and ammo), or "Loadout ak47 not found" if I try to use a default loadout. 

The really weird part is there are no errors in the log files!

Seems to be working for me.

Please share your config, your personal data file, and which permissions you have assigned yourself.

If I recall correctly. The permissions enabled can be tricky and cause issues if you just turn them all on. 

Config:

{
  "LockAutoFilledTurrets": false,
  "MaxLoadoutsPerPlayer": 10,
  "DefaultLoadouts": [
    {
      "Weapon": "rifle.ak",
      "Skin": 885146172,
      "Attachments": [
        "weapon.mod.flashlight",
        "weapon.mod.extendedmags"
      ],
      "Ammo": {
        "Name": "ammo.rifle.hv",
        "Amount": 10000
      },
      "ReserveAmmo": [
        {
          "Name": "ammo.rifle.incendiary",
          "Amount": 10000
        },
        {
          "Name": "ammo.rifle.explosive",
          "Amount": 10000
        }
      ],
      "Name": "ak47"
    },
    {
      "Weapon": "lmg.m249",
      "Skin": 1831294069,
      "Attachments": [
        "weapon.mod.lasersight",
        "weapon.mod.silencer"
      ],
      "Ammo": {
        "Name": "ammo.rifle.explosive",
        "Amount": 100
      },
      "ReserveAmmo": [
        {
          "Name": "ammo.rifle.incendiary",
          "Amount": 128
        },
        {
          "Name": "ammo.rifle.hv",
          "Amount": 128
        }
      ],
      "Name": "m249"
    }
  ],
  "LoadoutRulesets": [
    {
      "AllowedWeapons": [
        "pistol.eoka",
        "pistol.m92",
        "pistol.nailgun",
        "pistol.python",
        "pistol.revolver",
        "pistol.semiauto",
        "pistol.water",
        "rifle.ak",
        "rifle.bolt",
        "rifle.l96",
        "rifle.lr300",
        "rifle.m39",
        "rifle.semiauto",
        "lmg.m249"
      ],
      "AllowedAmmo": {
        "ammo.pistol": 10000,
        "ammo.pistol.hv": 10000,
        "ammo.pistol.fire": 10000,
        "ammo.rifle.hv": 10000,
        "ammo.rifle.incendiary": 10000,
        "ammo.rifle.explosive": 10000

      },
      "Name": "onlypistols"
    },
    {
      "DisallowedWeapons": [
      ],
      "Name": "norifles"
    },
    {
      "Name": "unlimited"
    }
  ],
  "DefaultSamSiteLoadouts": [
    {
      "ReserveAmmo": [
        {
          "Name": "ammo.rocket.sam",
          "Amount": 128
        },
        {
          "Name": "ammo.rocket.sam",
          "Amount": 128
        },
        {
          "Name": "ammo.rocket.sam",
          "Amount": 128
        },
        {
          "Name": "ammo.rocket.sam",
          "Amount": 128
        },
        {
          "Name": "ammo.rocket.sam",
          "Amount": 128
        },
        {
          "Name": "ammo.rocket.sam",
          "Amount": 128
        }
      ],
      "Name": "fullammo"
    }
  ],
  "DefaultFlameTurretLoadouts": [
    {
      "ReserveAmmo": [
        {
          "Name": "lowgradefuel",
          "Amount": 500
        }
      ],
      "Name": "fullammo"
    }
  ],
  "DefaultShotgunTrapLoadouts": [
    {
      "ReserveAmmo": [
        {
          "Name": "ammo.handmade.shell",
          "Amount": 128
        },
        {
          "Name": "ammo.handmade.shell",
          "Amount": 128
        },
        {
          "Name": "ammo.handmade.shell",
          "Amount": 128
        },
        {
          "Name": "ammo.handmade.shell",
          "Amount": 128
        },
        {
          "Name": "ammo.handmade.shell",
          "Amount": 128
        },
        {
          "Name": "ammo.handmade.shell",
          "Amount": 128
        }
      ],
      "Name": "fullammo"
    }
  ]
}

Permissions:

oxide.grant group admin turretloadouts.autoauth
oxide.grant group admin turretloadouts.manage 
oxide.grant group admin turretloadouts.manage.custom
server.writecfg

Sorry, but I have no idea where or what my "personal data file" is. 

8SecSleeper

If I recall correctly. The permissions enabled can be tricky and cause issues if you just turn them all on. 

I just stayed to the three needed (see above). I already have the other mod, Powerless Turrets, doing that part. 

I wonder, mod conflict? OMW to test...

EDIT: Removed Powerless Turrets, tested, same result.

LEYhmuZlx8aNaX3.jpg GallorumRex

Sorry, but I have no idea where or what my "personal data file" is. 

Each player has their own data file which stores their preferences and custom loadouts: oxide/data/TurretLoadouts/<steamid>.json.

Above, you only granted manage and manage.custom permissions, which is insufficient. You will have to grant a ruleset permission to define which items the player can save. Otherwise, you will always see "Error: Weapon not allowed: <weapon>".

The reason you cannot select the ak47 default loadout, is that you have not granted the permission to access that default loadout.

My memory served correct. Is there no way to output that to console or something when the plugin knows it won't be able to work. Or make the current error more clear.

Yes, it can be improved. This is one of my earlier plugins, so it didn't include many of the usability improvements that I have learned to include over the past couple years.

This is covered in the docs, but not until pretty far down.

You must grant players a ruleset permission to allow them to save custom loadouts, in addition to granting the turretloadouts.manage.custom permission.

Thank you! I get it now, it is player based, not group based, on the perms. 

Also, nothing worked until I made a "TurretLoadouts" folder in Oxide/Data. I don't know why it didn't auto create that folder (even after numerous reloads and even pulling the .cs out and putting it back in to the plugins folder).

Once again thank you!

LEYhmuZlx8aNaX3.jpg GallorumRex

Thank you! I get it now, it is player based, not group based, on the perms. 

Also, nothing worked until I made a "TurretLoadouts" folder in Oxide/Data. I don't know why it didn't auto create that folder (even after numerous reloads and even pulling the .cs out and putting it back in to the plugins folder).

Once again thank you!

The permissions can be assigned to players or groups, but customizations that each player makes are specific to that player.

The oxide/data/TurretLoadouts folder should be auto created the first time a player customizes their loadout settings. It shouldn't need to be created in advance.

 

Locked automatically