CurseForge and Overwolf are joining forces!
Awesome More Information
  • 0

    posted a message on Maintaining/packaging a modular addon
    Quote from Adirelle
    3) Use some kind of symbolic links (IIRC they are called "junctions" with Windows). This is a piece of cake with Linux and this is possible with XP/Vista and Seven but might require some additionals tools :.

    Thanks!

    Junctions were exactly what I was looking for. I was thinking of symlinks the whole time but I assumed that NTFS didn't support them.

    One last question:
    Are externals (as defined in the .pkgmeta) resolved before or after folders are moved by the packager?

    I've got it figured out -- It grabs the external libs, then moves the folders, so the destination paths are the same as the repo layout.
    Posted in: AddOn HELP!
  • 0

    posted a message on Maintaining/packaging a modular addon

    Well that solves half the problem, but I still need to figure out how to get git to cooperate. Is there some way to take my original repo, which was just the contents of that one folder, move that stuff to a (non-root) directory and add the new addon directories?
    Posted in: AddOn HELP!
  • 0

    posted a message on Maintaining/packaging a modular addon
    Hey,
    I've recently broken up my huge monolithic addon into a few smaller addons, but I'd still like to maintain and package them as a single project. I'm using curseforge and git to do revision control and packaging. I need everything to install to the right place on the user's computer and I need to be able to develop without jumping through hoops (can't be copying from the git local repo to the addons folder every time I make a change). I don't have the disk space to dedicate a second copy of WoW to addon dev., so making the entire AddOns folder the local repo isn't an option.
    I know this must be a common task, so I'm wondering how it's generally handled. Any help is appreciated.
    Posted in: AddOn HELP!
  • 0

    posted a message on Where does WoW cache addon info?
    Quote from Farmbuyer
    After you start the client and log in to a toon (who has that addon enabled for him/her), heck the Logs\FrameXML.log file and see if anything's recorded there.

    edit: actually, try moving the entire WoW installation somewhere outside of Program Files. Later versions of Windows do retarded things involving permissions and visibility with that whole tree.

    Ok, so I moved the entire WoW folder to my desktop, and the contents of the TOC files changed to really old versions :\.
    I'm guessing that there were two 'copies' of the files stored in the filesystem -- one that my editor was using when I opened them for editing, and another that WoW was loading up.

    Thanks a bunch, I never would have thought to try that.
    Posted in: AddOn HELP!
  • 0

    posted a message on Where does WoW cache addon info?
    Quote from gamemaster128
    Any modification of TOC files or folder names won't be picked up until you completely close and then reopen the game client.

    You can observe any Lua/XML changes in game by simply reloading the UI. A client restart is unnecessary in this situation.

    I restart after each change to the TOC. I know that WoW only reads the TOCs at startup.
    Quote from Farmbuyer
    Nope, it doesn't. The correct conclusion would be that you're doing something wrong. :-p

    You mention that you're deleting the AddOns folder. What, exactly, does the structure of your Interface folder look like?

    C:\Program Files\World of Warcraft\Interface\AddOns\<my addon>\<my addon>.toc
    The addon folder has the same name as the toc file. It contains no spaces or punctuation, only letters. Even the capitalization is the same.

    And I only moved the AddOns folder temporarily. I moved it, deleted the cache and WTF folders, started the game to verify that everything was cleared (there were no addons listed), then moved it back.
    Posted in: AddOn HELP!
  • 0

    posted a message on Where does WoW cache addon info?
    Quote from Seerah
    Did you fully restart the game? WoW only reads the TOC file once.

    After each and every change.
    Posted in: AddOn HELP!
  • 0

    posted a message on Where does WoW cache addon info?
    I've altered my addon's toc file and WoW does not want to recognize the changes. I've already removed the Addons folder, the entire contents of WoW/Cache and WoW/WTF, and nothing seems to make a difference.
    The only conclusion I can draw is that WoW caches this information somewhere obscure and absolutely refuses to change addon names or descriptions (or even interface version numbers). Can someone tell me where I should be looking?
    Posted in: AddOn HELP!
  • 0

    posted a message on Action buttons display incorrect icons
    I think I may have found the problem. I thought it was safe to assume that ADDON_LOADED would fire just once, as the add-on was loaded. In fact, it fires repeatedly -- even long after the add-on has finished loading. My add-on created the two panels dozens of times. This caused the graphical bugs (bright highlights, opaque regions which should be transparent) because many buttons were occupying the same region of screen space. It also caused various performance issues.

    Fixing this also seems to have fixed the icons, though further testing is required before I can be sure.
    Posted in: Lua Code Discussion
  • 0

    posted a message on Action buttons display incorrect icons
    I am having a problem with my add-on. It creates a bunch of Action Buttons (using ActionBarButtonTemplate) and arranges them into a keyboard layout. Initially, it works great, but after some time (I don't know exactly what triggers it, so it's been very difficult for me to debug) every action button changes their icon to the icon of the action in slot 1. This is entirely a cosmetic issue -- the buttons still function normally, casting the appropriate spells when clicked or when I press the corresponding key. Some of them even change their icons back eventually.

    Button highlights are also abnormally bright, but I'm really not as concerned about that.

    Here are the functions to create a "MultiButton" and to split the individual Action Buttons into halves/quarters:
    function MultiButton:New(name, parent, num_buttons, id_offset)
      multibutton = {}
      setmetatable(multibutton, MultiButton_metatable)
      
      multibutton.frame = CreateFrame("Frame", name, parent)
      multibutton.frame.owner = multibutton
      multibutton.frame:SetWidth(self.width)
      multibutton.frame:SetHeight(self.height)
      multibutton.frame:SetFrameStrata("LOW")
      multibutton.frame:RegisterEvent("MODIFIER_STATE_CHANGED")
      multibutton.frame:SetScript("OnEvent", function(self, event, ...)
        MultiButton_OnEvent(self, event, ...)
      end)
      
      multibutton.buttons = {}
      for i=1,num_buttons do
        local id = id_offset + i
        local button = CreateFrame("CheckButton", name .. "Button" .. i, multibutton.frame, "ActionBarButtonTemplate")
        button:SetID(0)
        button:SetAttribute("type", "action")
        button:SetAttribute("action", id)
        button:SetAttribute("showgrid", 1)
        button:SetFrameStrata("BACKGROUND")
        button:Show()
        
        multibutton.buttons[i] = button
      end
      
      multibutton.label = multibutton.frame:CreateFontString(name .. "Label", "OVERLAY")
      multibutton.label:SetJustifyH("CENTER")
      multibutton.label:SetJustifyV("MIDDLE")
      multibutton.label:SetPoint("CENTER")
      
      multibutton:UpdateLabel()
      multibutton:UpdateBinds()
      
      return multibutton
    end

    function MultiButton:SplitButton(index, vertical, horizontal)
      local button = self.buttons[index]
      local basename = button:GetName()
      local icon   = _G[basename .. "Icon"]
      local hotkey = _G[basename .. "HotKey"]
      local count  = _G[basename .. "Count"]
      local name   = _G[basename .. "Name"]
      local border = _G[basename .. "Border"]
      local cool   = _G[basename .. "Cooldown"]
      local textures = {
        normal    = button:GetNormalTexture(),
        highlight = button:GetHighlightTexture(),
        pushed    = button:GetPushedTexture(),
        checked   = button:GetCheckedTexture()
      }
      
      local texcoords = {0.0, 1.0, 0.0, 1.0}
      local size      = {36, 36}
      
      if horizontal == "LEFT" then
        texcoords[2] = 0.5
        size[1]      = size[1] / 2
      elseif horizontal == "RIGHT" then
        texcoords[1] = 0.5
        size[1]      = size[1] / 2
      end
      
      if vertical == "TOP" then
        texcoords[4] = 0.5
        size[2]      = size[2] / 2
      elseif vertical == "BOTTOM" then
        texcoords[3] = 0.5
        size[2]      = size[2] / 2
      end
      
      local point = "CENTER" 
      if vertical == "TOP" then 
        if horizontal == "LEFT" then
          point = "BOTTOMRIGHT"
        elseif horizontal == "RIGHT" then
          point = "BOTTOMLEFT"
        else
          point = "BOTTOM"
        end
      elseif vertical == "BOTTOM" then
        if horizontal == "LEFT" then
          point = "TOPRIGHT"
        elseif horizontal == "RIGHT" then
          point = "TOPLEFT"
        else
          point = "TOP"
        end
      else
        if horizontal == "LEFT" then
          point = "RIGHT"
        elseif horizontal == "RIGHT" then
          point = "LEFT"
        end
      end
        
      button:SetWidth(size[1])
      button:SetHeight(size[2])
    
      icon:SetTexCoord(unpack(texcoords))
      
      hotkey:SetTextColor(0.0, 0.0, 0.0, 0.0)
      
      local font, _, flags = count:GetFont()
      count:SetFont(font, 10, flags)
      count:ClearAllPoints()
      local countpoint = ""
      if vertical then
        countpoint = countpoint .. vertical
      else
        countpoint = countpoint .. "BOTTOM"
      end
      if horizontal then
        countpoint = countpoint .. horizontal
      else
        countpoint = countpoint .. "RIGHT"
      end
      count:SetPoint(countpoint)
      count:SetPoint(countpoint)
      
      name:SetTextColor(0.0, 0.0, 0.0, 0.0)
      
      if horizontal then
        border:SetWidth(31)
      else
        border:SetWidth(62)
      end
      if vertical then
        border:SetHeight(31)
      else
        border:SetHeight(62)
      end
      border:ClearAllPoints()
      border:SetTexCoord(unpack(texcoords))
      border:SetPoint(point)
      
      cool:SetWidth(size[1])
      cool:SetHeight(size[2])
      for key, texture in pairs(textures) do
        if key == "normal" then
          texture:SetWidth(size[1]  * 66 / self.width)
          texture:SetHeight(size[2] * 66 / self.height)
        else
          texture:SetWidth(size[1])
          texture:SetHeight(size[2])
        end
        texture:ClearAllPoints()
        texture:SetTexCoord(unpack(texcoords))
        texture:SetPoint(point)
      end
    end


    Tell me if you would like me to post the full contents of this source file, or if you would like me to post an archive containing my current development version of the full mod.
    Posted in: Lua Code Discussion
  • To post a comment, please or register a new account.