1. Because Who knows, Bug and longtimenoupdate.

    Now, what I did, was installed this:
    Auto Commands for Rust | Oxide
    Which is not updated for over 1.5 years, but still works.

    And my config to that looks like this:
    Code:
    {
      "Messages": {
        "AlreadyAdded": "{command} is already on the auto command list!",
        "ChatHelp": "Use /autocmd add|remove command to add or remove an auto command",
        "CommandAdded": "{command} has been added to the auto command list!",
        "CommandRemoved": "{command} has been removed from the auto command list!",
        "ConsoleHelp": "Use auto.command add|remove command to add or remove an auto command",
        "NoPermission": "You do not have permission to use this command!",
        "NotListed": "{command} is not on the auto command list!",
        "UnknownAction": "Unknown command action! Use add or remove"
      },
      "Settings": {
        "AuthLevel": 2,
        "ChatCommand": "autocmd",
        "ChatName": "SERVER",
        "ChatNameHelp": "HELP",
        "Commands": [
          "server.globalchat true",
          "server.stability false",
          "stack wood 10000",
          "stack stones 10000",
          "stack sulfur.ore 10000",
          "stack sulfur 10000",
          "stack gunpowder 10000",
          "stack cctv.camera 10",
          "stack mushroom 10000",
          "stack bearmeat 1000",
          "stack bearmeat.cooked 1000",
          "stack wolfmeat.cooked 1000",
          "stack wolfmeat.raw 1000",
          "stack chicken.raw 1000",
          "stack chicken.cooked 1000",
          "stack meat.boar 1000",
          "stack meat.pork.cooked 1000",
          "stack ammo.rifle 500",
          "stack ammo.pistol 1000"
        ],
        "ConsoleCommand": "auto.command"
      }
    }
    
    Everything that did not change its stacksize with the .cfg i added here, because it keeps resetting the stacksizes with every restart and I restart every 6 hours.
     
  2. i tried doing that still doesnt work
     
  3. question how do i make things like doors stackable? they are not in the config.
     
  4. It can't stack doors.
     
  5. I just got a rust server again, last one was for legacy a couple of years ago. I have added this plug in, but it does not show in myserver/serveridentity/oxide/config.
    So I am not sure where to go to edit the file to my liking any help would be appreciated

    Never mind, I uninstalled and reinstalled and it is there now
     
    Last edited by a moderator: Sep 1, 2016
  6. It also is incapable of stacking:
    - corn
    - pumpkins
    - cactus meat?

    Is anyone able to update this useful plugin, unless the God gets unexiled? <3
     
  7. Would be great if someone could shed some light on how to install this plugin. I have uploaded it into my oxide plugins folder and it is still not working. The commands used to stack things doesn't work anyways tells me unknown command. I am the server admin so there is no trouble there. Could really use some help here!
     
  8. Every plugin has a overview read it
     
  9. Added in config amount researching blueprint.
    P.S This my test fix.
    P.S Sorry my bad english.
     

    Attached Files:

    Last edited by a moderator: Sep 3, 2016
  10. Where is this overview you speak of?
    [DOUBLEPOST=1472954849][/DOUBLEPOST]
    Found that! However, none of the commands work in the console that is what I'm needing help with.
     
  11. Commands
    • /stack item_short_name stacksize (EX: /stack ammo_rocket_hv 64)
    • /stackall 65000 (Sets the stack size to 65000)
    • Console command "stack" and "stackall" also work same way as the above.
    Permissions
    • stacksizecontroller.canChangeStackSize
    Did you grant the admin group the permission yet
    oxide.grant group admin stacksizecontroller.canChangeStackSize

    upload the config you have
     
  12. Is this what you are looking for?

    using System.Collections.Generic;
    using System.Linq;
    using System;

    using UnityEngine;

    namespace Oxide.Plugins
    {
    [Info("Stack Size Controller", "Waizujin", 1.9, ResourceId = 1185)]
    [Description("Allows you to set the max stack size of every item.")]
    public class StackSizeController : RustPlugin
    {
    protected override void LoadDefaultConfig()
    {
    PrintWarning("Creating a new configuration file.");

    var gameObjectArray = FileSystem.LoadAll<GameObject>("Assets/", ".item");
    var itemList = gameObjectArray.Select(x => x.GetComponent<ItemDefinition>()).Where(x => x != null).ToList();

    foreach (var item in itemList)
    {
    if (item.condition.enabled && item.condition.max > 0) { continue; }

    Config[item.displayName.english] = item.stackable;
    }
    }

    void OnServerInitialized()
    {
    permission.RegisterPermission("stacksizecontroller.canChangeStackSize", this);

    var dirty = false;
    var itemList = ItemManager.itemList;

    foreach (var item in itemList)
    {
    if (item.condition.enabled && item.condition.max > 0) { continue; }

    if (Config[item.displayName.english] == null)
    {
    Config[item.displayName.english] = item.stackable;
    dirty = true;
    }

    item.stackable = (int)Config[item.displayName.english];
    }

    if (dirty == false) { return; }

    PrintWarning("Updating configuration file with new values.");
    SaveConfig();
    }

    [ChatCommand("stack")]
    private void StackCommand(BasePlayer player, string command, string[] args)
    {
    int stackAmount = 0;

    if (!hasPermission(player, "stacksizecontroller.canChangeStackSize"))
    {
    SendReply(player, "You don't have permission to use this command.");

    return;
    }

    if (args.Length <= 1)
    {
    SendReply(player, "Syntax Error: Requires 2 arguments. Syntax Example: /stack ammo_rocket_hv 64 (Use shortname)");

    return;
    }

    if (int.TryParse(args[1], out stackAmount) == false)
    {
    SendReply(player, "Syntax Error: Stack Amount is not a number. Syntax Example: /stack ammo_rocket_hv 64 (Use shortname)");

    return;
    }

    List<ItemDefinition> items = ItemManager.itemList.FindAll(x => x.shortname.Equals(args[0]));

    if (items[0].shortname == args[0])
    {
    if (items[0].condition.enabled && items[0].condition.max > 0) { return; }

    Config[items[0].displayName.english] = Convert.ToInt32(stackAmount);
    items[0].stackable = Convert.ToInt32(stackAmount);

    SaveConfig();

    SendReply(player, "Updated Stack Size for " + items[0].displayName.english + " (" + items[0].shortname + ") to " + stackAmount + ".");
    }
    else
    {
    SendReply(player, "That is an incorrect item name. Please use a valid shortname.");
    }
    }

    [ChatCommand("stackall")]
    private void StackAllCommand(BasePlayer player, string command, string[] args)
    {
    if (!hasPermission(player, "stacksizecontroller.canChangeStackSize"))
    {
    SendReply(player, "You don't have permission to use this command.");

    return;
    }

    if (args.Length == 0)
    {
    SendReply(player, "Syntax Error: Requires 1 argument. Syntax Example: /stackall 65000");

    return;
    }

    var itemList = ItemManager.itemList;

    foreach (var item in itemList)
    {
    if (item.displayName.english.ToString() == "Salt Water" ||
    item.displayName.english.ToString() == "Water") { continue; }

    Config[item.displayName.english] = Convert.ToInt32(args[0]);
    item.stackable = Convert.ToInt32(args[0]);
    }

    SaveConfig();

    SendReply(player, "The Stack Size of all stackable items has been set to " + args[0]);
    }

    [ConsoleCommand("stack")]
    private void StackConsoleCommand(ConsoleSystem.Arg arg)
    {
    int stackAmount = 0;

    if(arg.isAdmin != true) { return; }

    if (arg.Args.Length <= 1)
    {
    Puts("Syntax Error: Requires 2 arguments. Syntax Example: stack ammo_rocket_hv 64 (Use shortname)");

    return;
    }

    if (int.TryParse(arg.Args[1], out stackAmount) == false)
    {
    Puts("Syntax Error: Stack Amount is not a number. Syntax Example: stack ammo_rocket_hv 64 (Use shortname)");

    return;
    }

    List<ItemDefinition> items = ItemManager.itemList.FindAll(x => x.shortname.Equals(arg.Args[0]));

    if (items[0].shortname == arg.Args[0])
    {
    if (items[0].condition.enabled && items[0].condition.max > 0) { return; }

    Config[items[0].displayName.english] = Convert.ToInt32(stackAmount);
    items[0].stackable = Convert.ToInt32(stackAmount);

    SaveConfig();

    Puts("Updated Stack Size for " + items[0].displayName.english + " (" + items[0].shortname + ") to " + stackAmount + ".");
    }
    else
    {
    Puts("That is an incorrect item name. Please use a valid shortname.");
    }
    }

    [ConsoleCommand("stackall")]
    private void StackAllConsoleCommand(ConsoleSystem.Arg arg)
    {
    if(arg.isAdmin != true) { return; }

    if (arg.Args.Length == 0)
    {
    Puts("Syntax Error: Requires 1 argument. Syntax Example: stackall 65000");

    return;
    }

    var itemList = ItemManager.itemList;

    foreach (var item in itemList)
    {
    if (item.displayName.english.ToString() == "Salt Water" ||
    item.displayName.english.ToString() == "Water") { continue; }

    Config[item.displayName.english] = Convert.ToInt32(arg.Args[0]);
    item.stackable = Convert.ToInt32(arg.Args[0]);
    }

    SaveConfig();

    Puts("The Stack Size of all stackable items has been set to " + arg.Args[0]);
    }

    bool hasPermission(BasePlayer player, string perm)
    {
    if (player.net.connection.authLevel > 1)
    {
    return true;
    }

    return permission.UserHasPermission(player.userID.ToString(), perm);
    }
    }
    }
     
  13. Thats not your config thats the plugin
     
  14. GG on that. XD
     
  15. Where is the config file? I'm new to this.
     
  16. Next to the plugins folder you can see a config folder... if not, you are doing things wrong and might want to invest some time into googling for tutorials on how to setup a rust server. ;)
     
  17. I don't seem to have a server config file. I am getting my server through gameservers.com
     
  18. Seems busted

    (20:34:10) | [Oxide] 12:34 [Error] Failed to call hook 'StackConsoleCommand' on plugin 'StackSizeController v1.9.0' (NullReferenceException: Object reference not set to an instance of an object)

    (20:34:10) | [Oxide] 12:34 [Debug] at Oxide.Plugins.StackSizeController.StackConsoleCommand (.Arg arg) [0x00000] in <filename unknown>:0

    at Oxide.Plugins.StackSizeController.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
     
  19. Figured it out! Thanks for what help I did get from the people that were not being rude and unfriendly.
     
  20. Ok the latest Oxide update seems to have fixed the problem I was having