(22 Kb)
Updated: 12/22/17 11:29 AM
Clockwork City (3.2)
Updated:12/22/17 11:29 AM
Created:02/05/17 10:02 PM
Monthly downloads:136
Total downloads:3,092
Version: 1.9
by: Dolgubon [More]
Crafting for addons anywhere!NOT a standalone addon. This is a meant ONLY for addon developers.

Addons utilizing this Library:

Dolgubon's Lazy Writ Crafter
Dolgubon's Lazy Set Crafter
Writ Worthy

With this library, an addon can call a crafting function, and the library will craft it once the player gets to a station where it can be crafted. Various options for craft functions are available, to make it easier, but there is also an option to call the functions in the library in the exact same manner as for the game's API.

For example, for smithing you can have the library craft by levcl (instead of using material index and quantity) and you can request any quality. You can also request a certain set. For Alchemy and Provisioning, Multicraft functionality is also an optional parameter.

Enchanting and Smithing are complete, and heavily tested in both the Writ Crafter (Enchantig Master writs and Smithing ones) as well as the Set Crafter. (Smithing only)
ALL CRAFTING PROFESSIONS ARE NOW SUPPORTED! Enchanting and Smithing have been tested in the Writ Crafter (Enchanting and Smithing) and the Set Crafter (Smithing) as well as Writ Worthy (All profressions)

Usage: (To be completed later)

Since the usage section is not complete at this point in time, if you would like to use this library in your addon, please let me know and I can help you out with the usage.

There is a global table which can be used to craft called LLC_Global, which has all the available functions, and can be used for testing. As it is available to all addons, I do not suggest using it in your own addon.

CraftSmithingItem, CraftAlchemyItem, CraftEnchantingItem, CraftProvisionerItem can all be called as LLC_Global:functionName() with the exact same parameters as listed in the API on esoui wiki. Note that for Alchemy and Enchanting, the addon will take the itemId of the mat at the specified bag and slot location, and will later craft based on that. This is to prevent miscrafts when a player or addon moves items around.

function LLC_Global:CraftSmithingItem(patternIndex, materialIndex, materialQuantity, styleIndex, traitIndex, useUniversalStyleItem, stationOverride, setIndex, quality, autocraft)

function LLC_Global:CraftSmithingItemByLevel(patternIndex, isCP , level, styleIndex, traitIndex, useUniversalStyleItem, stationOverride, setIndex, quality, autocraft)

Examples that can be used in chat:

/script LLC_Global:CraftSmithingItemByLevel(3, true, 150,3 ,1 ,false, CRAFTING_TYPE_CLOTHIER, 0, 3,true) -- crafts a blue CP150 shoes
/script for i= 2, 25 do LLC_Global:CraftSmithingItemByLevel(3, false, i*2,3 ,1 ,false, CRAFTING_TYPE_CLOTHIER, 0, 3,true) end -- Crafts lvl 4,6, 8, 10, etc. up to lvl 50. The items will be blue shoes.

/script LLC_Global:CraftEnchantingItemId(45830, 45838, 45851) -- Crafts a Monumental Glyph of Flame Resist

Widget Versions:
Smithing: 1.3

Enchanting: 1.2
Provisioning: 1.3
Alchemy: 1.3
Version 1.9: (Release #2 - Smithing update)

Moved smithing timestamps to a unique identifier. The identifiers are integers, and incremented each time an item is added to the queue.
Fixed issues with backwards compatibility - if an old version was loaded before a newer version, an event handler would not be properly overridden. The old version would then change a local variable in the old version, but not a local variable in the new version which should have been changed.

Version 1.9:

Uses of sortCraftQueue have been removed, in favour of sticking solely with table.remove and table.insert. table.sort is unstable, which caused a rare double crafting issue when multiple items were added at the exact same timestamp while at a crafting station.
Fixed a bug where incorrect material requirements (light materials) would be returned for medium armour.

Version 1.8:

Created a new function to throw events to clean up some code.
LLC_NO_FURTHER_CRAFT_POSSIBLE: Thrown when no more items can be made at the current station
LLC_INITIAL_CRAFT_SUCCESS: Thrown when the white item is created, but must be further improved before being complete.
Fixed a bug where creating multiple items with green or higher quality would cause some white items to be made too many times.
The EndInteraction function was previously removed from the main LLC.lua file, and has been added back in.
Added a check to determine if a CP and level combination is valid.
Added the return of the requestTable to more craft event places.
Fixed a bug where the wrong improvement mat requirements would be given.
Fixed a bug where sometimes the wrong ability would be checked when determining the improvement skill level.

Version 1.7:

Added Material totals for Smithing.
Changed the interaction tables to be slightly more OOP by taking in self.
Removed double crafting bugs. (Pretty confident about this one!)
Fixed an off by one error in smithing
Added a return of the request table to the smithing functions.

Version 1.6:

Possibly fixed a double crafting issue.
Added LibLazyCrafting:IsPerformingCraftProcess()

Version 1.5:

Fixed a bug in provisioning and alchemy whereby the library would fail to recognize an item was crafted if it created a new stack. - fix by ziggr

Version 1.4:

Added the Clockwork City sets.

Version 1.3:

Fixed various typos in the Alchemy file.
Went back to GetTimeStamp() in the smithing file (as it should have been. Sorry!)
Added back timesToMake as an optional parameter in the Alchemy file.
Replaced the body of the crafting complete function with the stackableCraftingComplete function in the alchemy file.
Removed the FindIncreasedSlotIndex from the Alchemy file, as it was already contained in the main LLC file.

Version 1.2:

Fixed a LUA error that would appear when using Provisioning functions.

Version 1.1:

Now supports all types of crafting! (Minus furniture) - Thank you to Ziggr for creating the functions required to support it!
Updating current version. Probably has various bugfixes. The library has been updated over time as needed with various bugfixes and changes, and has just not been updated here on esoui.

Version 1:

Various changes, bugfixes, and improvements, mostly based on what I needed. Not a comprehensive list.
- Added an option reference when you create a craft request
- Added the ability to cancel craft requests based on position in queue or by reference
- Fixed an error where the craft queue was not updating properly
Optional Files (0)

Archived Files (11)
File Name
12/15/17 10:39 AM
12/14/17 11:54 AM
12/13/17 10:44 AM
12/10/17 10:47 AM
11/04/17 01:13 PM
10/22/17 12:10 AM
08/27/17 07:10 AM
08/24/17 01:53 PM
08/14/17 03:27 AM
05/20/17 05:24 PM
02/05/17 10:02 PM

Post A Reply Comment Options
Unread 12/13/17, 11:01 AM  
AddOn Author - Click to view AddOns

Forum posts: 249
File comments: 383
Uploads: 10
Re: Anchanting.lua??

Originally Posted by tomtomhotep
In your LLC.txt you have a file listed which is not in the zip file:


You also have instructions on how to use the missing file:
Hey sorry I never saw this. Didn't really think anyone would comment on this It was a typo and should have been Enchanting.lua, and has been fixed. Thanks!
Report comment to moderator  
Reply With Quote
Unread 11/05/17, 09:40 AM  
tomtomhotep's Avatar
AddOn Author - Click to view AddOns

Forum posts: 20
File comments: 92
Uploads: 5
Question Anchanting.lua??

In your LLC.txt you have a file listed which is not in the zip file:


You also have instructions on how to use the missing file:

;As consumables are much simpler than smithing, Enchanting is just another way to craft the items. You can call the functions as you normally would,
;with bag and slot IDs, or additionally you can call it by passing itemIds.
Report comment to moderator  
Reply With Quote
Post A Reply

Category Jump: