Skip to content

Raw template for making wow addons including packager support. & .gitignore

License

Notifications You must be signed in to change notification settings

N6REJ/wowAddonTemplate

Repository files navigation

wowAddonTemplate image Build Curse Release image

Raw template for making wow addons including packager support.

Based on my AdiBags Shadowlands Blacksmithing addon as an example addon.

File structure

  1. The .gitignore file is very important. It helps facilitate things used only during development from being included in builds.
  2. The README.md should be changed to describe your project.
  3. LICENSE should be modified to any kind of license you wish. Currently, it's MIT and will auto-populate with copyright and Author name @ build time.
  4. packager folder is for local testing before creating an automatic release
  5. .release folder is the resulting folder from running the packager showing what it would look like to curse.
  6. Every extension must have a .toc file that matches your extension name and must include each file needed for your extension
  7. .pkgmeta is needed for the packager ( Change filename in header to match .toc)
  8. core.lua is the main program file, but you can name yours anything just change the name inside the .toc
  9. database.lua is an import file that is used for tables and other "data" that your addon might need.
  10. wowaddontemplate.toc This is the actual name of your addon. It's name MUST match the folder name for your addon including capitalization.

My suggestion would be to clone to the folder you want your repo to exist at then the set the following values in the .toc

  • ## Interface: 90105 Replace the 90105 with the value needed for your version of the game. This can be found by putting /run print((select(4, GetBuildInfo()))) in the chat window and then copying the value printed in chat.

  • ## Title: - Title to display/use in curse for your addon

  • ## Version: @project-version@ - DO NOT CHANGE THIS! It is used by the packager to automatically use your "tag" as the release name/number

  • ## Author: Bearesquishy - Your name goes here. If you put @project-author@ instead of the name it will use your github user name instead

  • ## X-License: MIT - Your license name/type

  • ## X-Curse-Project-ID: - The ID # from your curseforge project page image

  • ## DefaultState: enabled - Whether your addon should be enabled when added to the game the first time. ( set to disabled if you don't want it automatically "on" )

  • ## Dependencies: AdiBags - Any dependencies you have

  • ## X-Curse-Project-ID: - This would be the value found in your project on Curseforge that identifies your unique project.

Required tools

  • You must have git in order to use the packager locally. It's also mandatory for using github repos.

  • You need some kind of code/text editor or IDE.

    • Visual Studio Code has extensions built for it specifically for wow addon development & lua
    • Notepad++ is a very good "text" editor
    • phpstorm - One of the top IDE's on the market. Extremely powerful but knows nothing about wow
    • Visual Studio - Another powerful, and FREE IDE but like phpstorm it doesn't know wow

Recommended VS Code extensions

Useful links

Tips

If you're new to developing wow addons like I am take the time to read what you can and start with very simple addons. My most recent one is AutoSwap which simply types a message in chat whenever you change zones.

Watch for typo's and Capitalization. Lua is very unforgiving about it. You'd be amazed at the hours you can lose looking for the missing comma

Don't just copy someone else's code! Not only is it rude it might just be a copyright violation, ergo breaking the law, that will land you on the wrong side of the dev world. It's fine to use snippets, and look at how someone else did something, especially when learning, but there "might" be a better way.

Don't code in your main repo! That is for finished work. Create a branch and code there, then commit and push. Once your totally done and you think its ready then create a pr and merge it into your main code. Then deleted your local branch you just finished with, checkout the main branch and pull to get your local copy up-to-date with what's in github

Don't be afraid to ask questions, but at the same time, be willing to take constructive criticism.

Yuyuli recently said to me "Your extensions are at what I would consider a beginner level...", which at first stung, I realized he was right and was trying to honestly guide me w/o holding my hand to my mouth.

Triple check your code. I can't tell you have many release's I've done that I had dumb bugs.

Make a character on the PTR server and develop there! That way your dev work doesn't break your retail character!! lol took me months to figure this out! Once there use wowup to add extensions you might need to that server, just like you do with retail. Simply select Retail PTR image from the drop down on the top left of wowup interface and then click the magnifying glass to search for addons you need/want.

put comments EVERYWHERE!!!! Seriously, there is no such thing as "too many comments" aka rems. Their purpose is to tell the person reading the code what that part does. You'll see them alot in my code and in a year when I need to update it and I can't remember what it did I'll be glad I did. Don't say to yourself "Oh, I won't forget". I'd almost bet money you will. Especially in a large block of code.

Be very careful with "global" variable names. anything simple/short is almost guaranteed to conflict with someone else's addon.

I hope you find this information useful. Good luck on your endeavor to create wow addons. if your ever a member of The Øld Gods feel free to look me up. Or even better hop on discord and say Howdy

Badges

the .badges file contains sample badges for your git repo & curse page. Be sure to adjust to your needs.

Bear's Curseforge

How to publish a release To publish assign tag and push to repo, release will be automatically generated per the action.yml and sent to curseforge. To test the release type .packager/release.sh the local copy will be placed in the ".release" folder

About

Raw template for making wow addons including packager support. & .gitignore

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published