Go to Page... |
Thread Tools | Display Modes |
01/05/24, 08:57 AM | #1 |
|
LazyCraftingCertification / my first addon
Posting here for a bit of feedback/advice. I finally made an add-on. It has two major issues I think:
* I'm not supposed to use LLC_Global but I'm not sure what to use in it's stead * LCCGetCurrentPlayerRacialPatternId() probably won't work for Imperials since I doubt the raceId aligns with the patternId for it but I don't have Imperial race on my acct Any other feedback/commentary. As a sysadmin with over 20 years experience I'm a degenerate programmer who writes mediocre code and would love a once-over from someone experienced before I publish the addon. https://github.com/robertlabrie/Lazy...gCertification Cheers, Robert |
01/05/24, 11:15 AM | #2 |
You could store the racialPatternId in a variable, because you never switch characters once the AddOn is loaded.
Something like this: Lua Code:
Regarding LLC, don't know but looks like you have to register your AddOn with LibLazyCrafting and then you get a function table that you can use. Something like: Lua Code:
Careful, didn't test it. |
|
01/05/24, 01:54 PM | #3 |
Hi and welcome to ESO addon development.
Never worked with LLC in depth so I cannot help you with that. I onlw know it provides callbacks that fire as something was done, e.g. after it did craft anything etc. where you can register to and run a callback function in your addon then. But a good advice: In your txt file please add the library's most current version as check via >= behind the library name if you create new addons so players do not enable any very outdated old version and your addon loads, but errors then -> Self protection against wrong bug reports Current: Code:
## DependsOn: LibLazyCrafting Code:
## DependsOn: LibLazyCrafting>=3086 Described here at the Wiki: https://wiki.esoui.com/Libraries |
|
01/05/24, 09:08 PM | #4 | ||
But anyway, what you'll want to do is to call local interactionTable = LibLazyCrafting:AddRequestingAddon(String addonName, boolean autoCraft, function callbackFunction, string optionalDebugAuthor, table optionalStyleTable) Then replace any instances of LLC_Global with interactionTable. You can even add a callback function, and LLC will spit back a table containing the location of the newly crafted item. So you don't need to worry about that weird tristat epic iron dagger that someone made. Notably, you might be interested in the optionalStyleTable. This lets you specify 'allowed' styles (for example, all base racial styles, and maybe some cheap stuff like barbaric), and then you can just pass LLC_FREE_STYLE_CHOICE as the style ID. Then LLC will choose whatever you have the most of, (and can use) in that allowed style list. This is admittedly, not documented iirc bc it was a later addition. |
|||
01/05/24, 09:30 PM | #5 |
LazyCraftingCertification.name = "Lazy Crafting Certification"
IIRC this should generally match the folder name of your addon, as if it's used in function LazyCraftingCertification.OnAddOnLoaded(event, addonName) if addonName == LazyCraftingCertification.name then then the addonName passed to that callback function is the folder name. Not 100% sure. You're not doing anything in the onAddonLoaded function so you wouldn't see any issues from that, but it might cause headaches if you do try to do stuff there (like say, register with LLC) https://github.com/robertlabrie/Lazy...cation.lua#L22 Personally, I would suggest using the item ID (GetItemId . Also, assuming recipes don't share item ids) rather than the item link, but it doesn't make a big difference. I also highly suggest making a helper function to find the certification quests. It'll make it a little easier, especially if you ever plan to localize, and you won't need as many for loops either. https://github.com/robertlabrie/Lazy...ua#L63C8-L63C8 You can do local _,_,_, thingICareAbout,_,_,_,otherThingICareAbout = functionWithTonsOfReturns() Makes the code a little more readable. If someone accepts provisioning quest, realizes they don't have the addon on, then turns it on, the addon won't auto learn the recipe and will get stymied when it tries to craft. Probably won't happen too much but something to consider. (also you have empty function local function LCCScratch() end) There's a nifty function DoesItemLinkFulfillJournalQuestCondition that you can use for the craft steps. Just save an example iron dagger item link and ask if that item link fills the quest condition. Also makes it easier for localization. But I doubt it'll work for the deconstruction step. |
|
01/09/24, 07:59 PM | #6 |
|
Big thanks to everyone who responded and Dolgubon thanks for the tip on the addon name that saved me hours of head scratching. Im pretty happy with it now (still some improvements to make if it gets > 1 download or any requests I'll handle). Last question on this thread is when doing the initial addon upload if I plan to link to github later, should I keep the .git directory in LazyCraftingCertificiation1.0.0.zip or remove it?
Thanks again Robert |
01/10/24, 02:36 AM | #7 | |
Personally, I use the Package utility to package the files. It makes it very easy to make the .zip files. Then just put the link to the github in the addon description, and those who care will be able to get the git repo Also side note, but I updated the documentation for LLC and moved it to a Readme, partly in response to this Last edited by Dolgubon : 01/10/24 at 03:10 AM. |
||
01/10/24, 04:04 AM | #8 | |
Yes please, do not add any hidden files like .git or .idea or .vs(_code) or thumbs.db or whatever in your zip files as they will show in teh addon verfification tools and would have to be checked each time too. Beside that antivirus and other protective tools sometimes spitout false positives about hidden files. As those ONLY belong to the addon development process, or windows explorer cached image files (thumbs.db), please do not add those into the zip files. |
||
ESOUI » Developer Discussions » General Authoring Discussion » LazyCraftingCertification / my first addon |
«
Previous Thread
|
Next Thread
»
|
Display Modes |
Linear Mode |
Switch to Hybrid Mode |
Switch to Threaded Mode |
|
|