01/19/24, 07:07 AM | #1 |
Please read: Before you release a new/update your addons
Here are a few points that you should/could check before you release your new addon, or any update to existing ones:
Dependencies If you add "non optional" dependencies (-> "DependsOn") please ALWAYS add those dependencies clearly to your addon description, at top at best, so users know what to download to make your addon run, and can see that even at Minion (the addon manager) properly. Example how your non-optional dependencies look like Code:
## DependsOn: LibAddonMenu-2.0>=35 LibMapPins>=10039 Please, if you create new addons, use the >= version check for the library/oher addon dependencies so you make sure ppl do NOT use very outdated versions of the libraries/addons to run your addon, and then come back to you telling it's broken or whatever. So this exists to protect yourself and make addons more compatible -> It replaces LibStub version control which is outdated since Summerset chapter was released. Read here about the manifest txt files https://wiki.esoui.com/Addon_manifest_(.txt)_format Especially: https://wiki.esoui.com/Addon_manifes...ionalDependsOn -> Allthough here is written OptionalDependsOn this counts for DependsOn too https://wiki.esoui.com/Libraries -> tag ## AddOnVersion: https://wiki.esoui.com/Libraries#.23...ned_integer.3E Example: In your case you want to make sure ppl use LibAddonMenu-2.0 with the most up2date version, and not any old version where the global reference variable LibAddonMenu2, or any API function is missing. So check the txt file of the library, LibAddonMenu-2.0.txt, read the ## AddOnVersion: tag and use the version from there in your txt manifest like this: Code:
## DependsOn: LibAddonMenu-2.0>=35 Checking for global leaking variables Many new addons pollute the global table _G with variables that should have been local, e.g. function names that were defined with function doSomething() where it should have been local function doSomething(). If not explicitly defined with the word "local" up in front variables/functions/... will be global and pollute the global _G table! This means: if your variable name is a common one like i and you do not define it as local i, your global i (= _G["i"]) will overwrite all other local i variables having the same name! This will break other addons or even ZOs lua code of ESOUI -> So do NOT make everythign global unless really needed. So either define variables local or define 1 global table for your addon, e.g. myAddon = {} and then add all functions and variables that need to be global to that table. You can define a local speed up reference like local ma = myAddon and add functions variables to ma then. If you feel the need to split up your addon into multiple lua files define 1 global table for your addon (see the hint above) and just add 1 line to the start/most top of each lua file: myAddon = myAddon or {} This will check if myAddon is not == nil and reuse myAddon then, else it will create a new empty table myAddon Please also read this for best practice during addon coding/creation: https://www.esoui.com/forums/showthread.php?t=9867 There exist tools too to help you find those globally leaking variables: https://www.esoui.com/downloads/info...pollution.html SavedVariables Attention: Changing the SV structure or version will reset those for the users so do think about this before releasing your addons or shortly after! Else ppl will loose their SV saved if you do not manually code some kind of "migration routines" from "non server" to "server saved" Read here too: https://wiki.esoui.com/Storing_data_and_accessing_files Before releasing an addon you should think about, if your addon uses SavedVariables, if you want to save them server dependent (as you can play on EU, NA and PTS) differently. So if there might be the reason to save the data diffrently on NA and EU servers for the same account: e.g. add GetWorldName() as 3rd parameter (where currently often nil is used for the profile) in ZO_SavedVariables:New* function calls Or use the 2nd last parameter for the GetWorldName() Code:
--used as 3rd param ZO_SavedVars:NewAccountWide("CirconianStaminaBarVars", CirconianStaminaBar.variableVersion, GetWorldName(), CirconianStaminaBar.Default, GetWorldName()) --used as 2nd last param ZO_SavedVars:NewAccountWide("CirconianStaminaBarVars", CirconianStaminaBar.variableVersion, nil, CirconianStaminaBar.Default, nil) Depening on if you use the 3rd param or the 2nd last the location of that subtable will be further up (3rd param) or down (2nd last param) in the saved SV table structures! AddOn name Please refrain from using swear words or similar, even abbreviated, colloquial or similar! If you release patches for existing addons: Make sure the name contains the original addon name as something like "Updated" will only shows as "Updated" in Minion!!! So name it e.g. "AddonName1 - Updated for Necrom" so it's clear where it belongs too. Uploading your addon Please follow the Upload rules: https://www.esoui.com/forums/showthread.php?t=11 Or your addon might not be acknowledged, or even removed again. AddOn description Please describe your addon properly, what it does, and what dependencies it got. If possible: Describe it in English pelase. You can use online translators to add a generated English translation like e.g. https://translate.google.de/. If you did spy code or ideas from others addons, properly name the other addon sources and author names and provide credit in your addon description! This is fair and should be always done to show respect and owners of intellectual property. AddOn changelog Upon maintaining your addon,while updating, put the changed info to the "Changelog" tab, and not to teh description tab! At best with the newest changes at the top and oldest at the bottom. AddOn patches - Allow or disallow You can allow or disallow additional patches or addons to your addon, change it here: If you choose "Yes" here other ppl can craete patches/other addons via using the "Other files" tab at your addon: These patches/addons will show as "below" (hirarchy) in your addon then so ppl can find it more easily. e.g. plguns for any addon that allows plugins (AdvancedFilters -> Filter dropdown box plugins) / but also just a patch like "AdvancedFilters - Fix whatever bug version") So if this option should not exist disable it please in your addon maintenance view. Last edited by Baertram : 02/21/24 at 09:49 AM. |
|
ESOUI » AddOns » Released AddOns » Please read: Before you release a new/update your addons |
«
Previous Thread
|
Next Thread
»
|
Display Modes |
Linear Mode |
Switch to Hybrid Mode |
Switch to Threaded Mode |
|
|