We've moved! Join us as we continue development on our new site at umod.org!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Crafting Controller

Allows you to modify the time spend crafting and which items can be crafted

Total Downloads: 51,524 - First Release: Oct 29, 2014 - Last Update: Apr 19, 2018

5/5, 72 likes
  1. Mughisi submitted a new resource:

    Crafting Speed Modifier - This plugin allows you to decrease the crafting time of items on your server.

    Read more about this resource...
     
  2. thanks alot Mughisi
     
  3. Hahha î had that since à lot of time on my server, Forgot to make the plugin!
    Î have one suggestion for you:
    When you launch the plugin, maybe like detect all blueprints, get the défault craft time in à table, and then when admins do /craft XX, it changes the time dépendîng on the table that you Got initially.
    Why that? Because every week we Will have new items, it's probably better if the list auto générates instead of having to set it yourself.
     
  4. It's a bit risky to get them on the init, if the plugin is reloaded it will fuck it up because the values could be modified already, or I have to save them to a file and compare them on startup or something. I'll see what I do with it later, just whipped this up in a few minutes as Karolinen requested it.
     
  5. Hi, Wulf has directed me to make a request here. Currently Owner/Moderators are insta crafting items and also if out of resources still able to craft items. So asking if possible to add or consider any options that could help remove this *feature* :)

    Many thanks
     
  6. I've just looked into this but I'm afraid this is not possible to do with just a plugin. The code that deals with crafting basically checks if the player is able to craft it and if the player is an admin and will thus always results in admins being able to craft the items without the need of having all the resources as you can see it the code below.
    Code:
    public bool CraftItem(ItemBlueprint bp, BasePlayer owner, Item ownerItem = null)
    
        {
            if (!this.CanCraft(bp, 1) && !owner.IsAdmin())
            {
                return false;
            }
            this.taskUID++;
            ItemCraftTask item = new ItemCraftTask {
                blueprint = bp
            };
            this.CollectIngredients(bp, item.ingredients);
            item.endTime = 0f;
            item.taskUID = this.taskUID;
            item.owner = owner;
            item.ownerItem = 0;
            if (ownerItem != null)
            {
                item.ownerItem = ownerItem.uid;
                if (ownerItem.ownerUid != 0)
                {
                    item.ownerItem = ownerItem.ownerUid;
                }
            }
            this.queue.Enqueue(item);
            if (item.owner != null)
            {
                item.owner.Command(string.Concat(new object[] { "note.craft_add ", item.taskUID, " ", item.blueprint.targetItem.itemid, " ", item.blueprint.id }));
            }
            return true;
        }
     
  7. LuaScriptException: [string "m-CraftingRate.lua"]:129: attempt to perform arithmetic on field '?' (a nil value)
    StringPool.GetNumber - no number for string fx/weapons/vm_revolver/attack
    Rcon Exception
    since update.
     
  8. I still get this spamming in console. is it related? the craftingrate does work.
    Code:
    LuaScriptException: [string "m-CraftingRate.lua"]:129: attempt to perform arithmetic on field '?' (a nil value)
    Rcon Exception
    LuaScriptException: [string "m-CraftingRate.lua"]:129: attempt to perform arithmetic on field '?' (a nil value)
    Rcon Exception
    LuaScriptException: [string "m-CraftingRate.lua"]:129: attempt to perform arithmetic on field '?' (a nil value)
    StringPool.GetNumber - no number for string fx/weapons/vm_revolver/attack
    Rcon Exception
    LuaScriptException: [string "m-CraftingRate.lua"]:129: attempt to perform arithmetic on field '?' (a nil value)
    Rcon Exception
     
  9. I am still seeing this as well...making it almost impossible to debug other issues :p

    Anybody know if oxide.unload actually works or not?

    Busy night!
     
  10. After updating you'll most likely have to restart the server. Because of the lack of a OnServerInitialized hook I worked around it by using a timer on the plugin Init(). But when an error occurs in a timer the timer will just start over which results in this spam until the server is restarted.
     
  11. Wulf

    Wulf Community Admin

    You should actually have the timers set to nil in Unload(). ;)
     
  12. Ssssst, I rushed myself a bit on this one :p
     
  13. Hi Mughisi, how do i log as an admin? after i logged as an admin i just need to type /craft 0 in game? or i need to go to the conf. of the game servers page? i want it to be permament.

    thanks man :)
     
  14. You need to flag yourself as an admin on your server, you do this by using the console command "ownerid <your steam id>", you have to do this in either the server console or when connecting to your server with a rcon tool. Using this in the in-game console won't work. Once you've done that you'll have to reconnect to your server if you were already connected (in-game) and next time you connect it should show "Auth level 2" when you connect in the server console/rcon tool.
     
  15. New update throwing this exception...

    Rcon Exception
    LuaScriptException: [string "m-CraftingRate.lua"]:132: attempt to perform arithmetic on field '?' (a nil value)
     
  16. I'll be looking into this as soon as I can, will most likely be tomorrow afternoon as I'm about to go sleep.
     
  17. Fix:
    Add , at the end of line 70
    insert ['Tool Cupboard'] = 120 at line 71

    thats it!
     
  18. Cant get this to work with the new update and made the change above.