1. this is all I get, i have no idea where I can edit the values. =/

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

    using UnityEngine;

    namespace Oxide.Plugins
    {
    [Info("Stack Size Controller", "AnExiledGod", 1.4)]
    [Description("Allows you to set the max stack size of every item.")]
    public class StackSizeController : RustPlugin
    {
    public int PaperRequired { get { return Config.Get<int>("PaperRequired"); } }

    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()
    {
    var dirty = false;
    var itemList = SingletonComponent<ItemManager>.Instance.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) { return; }

    PrintWarning("Updating configuration file with new values.");
    SaveConfig();
    }
    }
    }
     
  2. Edit what values? The stack sizes? You need to edit the config, not the code...
     
  3. wheres that file??
    [DOUBLEPOST=1436585653][/DOUBLEPOST]
    ok i got it but it doesnt show in game. I set them to 5000000
     
  4. Hi is there a way to stack BP's?
    Regard
     
  5. As far as I know, no.
     
  6. Call me stupid, but i go into the config file for the plugin and their is nothing to edit.
     
  7. Make sure your using latest version.
     
  8. AnExiledGod updated Stack Size Controller with a new update entry:

    Added the ability to update stack sizes in-game


    [DOUBLEPOST=1437058437][/DOUBLEPOST]I forgot to say, you will need to give the "canChangeStackSize" permission to all non-admins that you want the commands given to.
     
  9. BaK

    BaK

    Getting a new error when I boot up the server,
    Code:
    [Oxide] 9:46 PM [Error] Failed to call hook 'OnServerInitialized' on plugin 'Crafting Controller' (NullReferenceException: Object reference not set to an instance of an object)
    [Oxide] 9:46 PM [Debug]   at Oxide.Plugins.CraftingController.OnServerInitialized () [0x00000] in <filename unknown>:0
      at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&)
      at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Glo
    [DOUBLEPOST=1437080149][/DOUBLEPOST]Nevermind, the oxide update fixed it. my bad for crying wolf so fast.
     
  10. That's also the Crafting Controller plugin, not Stack Size Controller.
     
  11. I edited the stack sizes in the config file, saved and restarted and none of it takes effect. I didn't set anything higher than 1000000.
     
  12. I cant get the /Stackall command get to work ?
    I need to be ingame but keep saying command isnt vailid.
     
  13. Everything works fine... Except for the stacks for wood when I typed the command /stack wood 250000 It says Did you mean one of these? Then it lists a bunch of items with the word wood in it. I really need help my players are getting upset because they can only have 1000 wood!!!!!
     
  14. Hey im new, where do i put the file?
    [DOUBLEPOST=1437432297][/DOUBLEPOST]Hi, im new... where do i put the file?
     
  15. I get a glitch where I cant set the stack size of wood it just comes up with a message that says Did you mean this? And lists a bunch of items with the name wood in it
     
  16. Doesn't work your plugin at all. Doesnt register commands either.
     
  17. Wulf

    Wulf Community Admin

    Could you provide any errors or logs?
     
  18. [7/23/2015 5:41:24 PM] [Oxide] 5:41 PM [Error] Error while compiling StackSizeController.cs(136,69): error CS0176: Static member `ItemManager.itemList' cannot be accessed with an instance reference, qualify it with a type name instead

    [DOUBLEPOST=1437671703][/DOUBLEPOST]
    Is there a fix?
     
  19. same here

    [Error] StackSizeController.cs(136,69): error CS0176: Static member `ItemManager.itemList' cannot be accessed with an instance reference, qualify it with a type name instead
     
  20. yup, same here, please fix! Thx