• 0

    posted a message on Experimental: AceOptions
    A while back there was a thread that discussed how we compared to other add on collections like Cosmos and CTMod. One of the areas that we seem to lose on is the usability aspect and the lack of a central options configuration add on.

    The closest thing that we have is AceCommander which doesn't compare in my opinion. AceCommander is a great tool to use to explore the command line options of mods but it cannot distinguish between settings and functions - it just allows you to execute them all. Some mods have settings (like TargetTracker) and other mods execute functions (like Lunchbox)

    As I believe that we could greatly benefit from such a system and I like to do UI programming I decided to experiment a bit.

    One thing I don't like about Cosmos and CTMod is that they base their user interface options mods on the spell book. I much prefer the look of the AceGUI interface and so I used that.

    This is how it looks:


    To get this working I had to add some code to TargetTracker to configure the options. The code that I added looks like this (slightly abbreviated variable names and reformatted to fit on the page better):

    TargetTrackerLocals.lua
    TARGETTRACKER_SETTINGS = {
    { setting="Add target on mouse over", type="check", tooltip=TT_CMD_SET_MOUSEOVER, get="getMouseOver", set="setMouseOver" },
    { setting="Keep target positions", type="check", tooltip=TT_CMD_SET_KEEPPOSITIONS, get="getKeepPositions", set="setKeepPositions" },
    { setting="Show guild tag", type="check", tooltip=TT_CMD_SET_SHOWGUILD, get="getShowGuild", set="setShowGuild" },
    { setting="Show health bar", type="check", tooltip=TT_CMD_SET_SHOWHEALTH, get="getShowHealth", set="setShowHealth" },
    { setting="Tracker mode", type="check", tooltip=TT_CMD_SET_TRACKER, get="getTracker", set="setTracker" },
    { setting="Ignore NPCs", type="check", tooltip=TT_CMD_SET_IGNORE_NPCS, get="getIgnoreNPCs", set="setIgnoreNPCs" },
    { setting="Ignore Players", type="check", tooltip=TT_CMD_SET_IGNORE_PLAYERS, get="getIgnorePlayers", set="setIgnorePlayers" },
    { setting="Ignore Friendlies", type="check", tooltip=TT_CMD_SET_IGNORE_FRIENDLY, get="getIgnoreFriendly", set="setIgnoreFriendly" },
    }
    


    TargetTracker.lua
    TargetTracker = AceAddon:new ({
    	name          = "Target Tracker",
    	description   = TARGETTRACKER_DESC,
    	releaseDate   = TARGETTRACKER_RELEASEDATE,
    	version       = "1.3",
    	aceCompatible = "102",
    	author        = "Steve Kaye",
    	db            = AceDbClass:new("TargetTrackerDB"),
    	defaults      = TargetTrackerDefaults,
    	cmd           = AceChatCmd:new(TARGETTRACKER_COMMANDS, TARGETTRACKER_CMD_OPTIONS),
    	category      = "combat",
    	settings	  = TARGETTRACKER_SETTINGS
    })
    


    The important bit there is the last line which adds the settings table to the addon which AceOptions later reads.

    Also in TargetTracker.lua are the functions to get and set the values:
    function TargetTracker:getMouseOver()
    	return self:Get("mouseover")
    end
    
    function TargetTracker:setMouseOver()
    	return self:Toggle("mouseover")
    end


    I opted to have the set function return the new value in case the user tries to set invalid values then a default can be used. For example if the user tries to set a width to 10 and the minimum valid value is 100 then the addon would use 100 and return 100 to AceOptions so it would show the correct value.

    At this point I would really like some feedback to make sure that what I am doing seems like a good idea so please download the addons and have a look.

    AceOptions only supports boolean values at the moment and it doesn't pass the new value to the set function - as you can see above it just expects the addon to toggle and return the new value. Also, I have commented out the code which only lists compatible addons so that you can see how it would look if all Ace Addons supported this functionality. Looking at my setup I think it could be improved by standardising the catagories - there are some in "interface" and some in "Interface Enhancements" for example. Target Tracker is in "combat".

    For those that want to have a look:

    AceOptions is here.
    The modified TargetTracker is here.

    Looking forward to any comments.

    Steve
    Posted in: Addon Ideas
  • 0

    posted a message on Looking for a mentor...
    Quote from "Codex" »
    The addon in question is called Kreacher, and what it does it, using the keybinding (which doesnt seem to want to show in the keybinds menu) targets the nearest critter (i added support for every critter in the game; rabbits, rats etc) and shoots it, using a different spell for each class. However, I keep getting an "invalid target" message.


    If you do something like this:
    TargetByName("rabbit")
    shoot
    TargetByName("squirrel")
    shoot
    TargetByName("another critter")
    shoot


    and there is no rabbit then you will fail to target the rabbit and either target nothing or target something with a similar name. If you target nothing or target something not attackable then you will get the invalid target message when you do the shoot.

    The way to get around this is to check that the target function worked and got the correct target:
    TargetByName("rabbit")
    if UnitExists("target") and UnitName("target") == "rabbit" then
        shoot
    end


    Steve
    Posted in: General Chat
  • 0

    posted a message on A Reagent Tracker ( of sorts )
    Quote from "Ulti" »
    Hmm.. don't think KCET will do that if you don't have the profession, but you could always use KCI to look at the recipe and that way get the reagents.


    I don't think that would work very well. Most of the recipes are not buyable so you would only get the ingredients by talking to the trainer and they won't talk to you unless you have the profession.

    Steve
    Posted in: Addon Ideas
  • 0

    posted a message on self:db:set("spell", 1, "Heal")
    Quote from "blankStare3" »
    what am I doing wrong?

    I have two statments (if memory serves):
    self:db:set("spell", 1, "Heal")
    self:db:set("spell", 2, "Regrowth")

    I do 2 /console reloadui to make sure it gets out to the savedvariables. What I see in the saved var file is just "spell" and a 2, with no text.


    What are you trying to do here? If you are trying to create this:

    your_db = {
        ["spell"] = {
            [1] = "Heal",
            [2] = "Regrowth",
            },
        }


    Then the syntax that I think you want is this:

    self:db:set({"spell"}, 1, "Heal")
    self:db:set({"spell"}, 2, "Regrowth")
    


    This is because self:db:set() can be called in two ways:

    1) set(key, value)
    2) set(path, key, value)


    If the first parameter is a table then the second form is used otherwise the first form is used and your third parameter is ignored.

    (Disclaimer: I got this from looking at the code for AceDatabase:set() and I am new to LUA so I could be wrong - just try it and see 8) )

    Steve
    Posted in: Lua Code Discussion
  • 0

    posted a message on Recap Ace'd
    Quote from "Hellraiser" »
    Steve, if your still around, just wondering how the Ace'd version of Recap is going, or if it is going.


    I'm still around and it is still on my list although I haven't done anything for a while. I put all development on hold over Christmas because I have much less WoW time in the holidays and I like to use it to play the game rather than code for it. Since the holidays I got distracted by Target Tracker which is a mod I've wanted for a while. I'll probably start back on AceRecap next week.

    The next bit for me to do is to learn how to do modules so that I can put the GUI part into a seperate module.

    Steve
    Posted in: Addon Ideas
  • 0

    posted a message on 1.9 Scaling
    Ooops.... double post after I thought it hadn't worked. Sorry.

    Steve
    Posted in: General Chat
  • 0

    posted a message on 1.9 Scaling
    Quote from "Lewzephyr" »
    Quote from "Steve" »
    I noticed that my FlexBar buttons are too small and so are my bag buttons (scaled by Visor). Everything else seems ok and as I don't actually press those buttons with the mouse (not in time-critical situations anyway) I'm just going to leave them until a fix for FlexBar comes out (otherwise I could fix them, download a new FlexBar and have them all broken again).

    I'll probably be able to fix the bag buttons if I spend 5 minutes with Visor.


    There is a patch for flexbar to fix the scaling issues.

    http://www.flexbarforums.com/viewtopic.php?t=3193


    Yeah, I found that thanks and it fixed the problem.

    Steve
    Posted in: General Chat
  • 0

    posted a message on Heads-up time again.
    Quote from "Rowne" »
    Thus, the last lingering strands of my sanity are saved.

    Yay sanity!


    Um..... are you quite sure about that Rowne? :) Have you re-read some of your Visor documentation recently? (I think it may be the tips and tricks guide that you wrote - along with a few other of your personalities :lol: )

    Steve
    Posted in: General Chat
  • 0

    posted a message on 1.9 Scaling
    I noticed that my FlexBar buttons are too small and so are my bag buttons (scaled by Visor). Everything else seems ok and as I don't actually press those buttons with the mouse (not in time-critical situations anyway) I'm just going to leave them until a fix for FlexBar comes out (otherwise I could fix them, download a new FlexBar and have them all broken again).

    I'll probably be able to fix the bag buttons if I spend 5 minutes with Visor.
    Posted in: General Chat
  • 0

    posted a message on Heads-up time again.
    I'm a new member to this community (the Ace forums) but I will still be sorry to see you go Rowne.

    Have fun with whatever you replace WoW with.

    Steve
    Posted in: General Chat
  • 0

    posted a message on good dps tracking addon
    Quote from "Greywind" »
    Well my brother wants me to find him a good dps addon, i dont use any so i really dont know what im looking for. Oh one thing i know is he plays a hunter and a warlock so it needs to track pets, other than that im not sure what he wants *shrugs*.


    It depends upon what he wants from it:

    A lot of people like Recap - in my opinion it is very good if all you want to do is monitor your own DPS. I've heard that there are problems with this add-on to do with the later versions of WoW and the fact that Recap isn't maintained anymore. I haven't seen any problems with it though

    If he raids and wants to monitor his DPS compared to others then he will probably want Damage Meters. I've heard that it has some sort of sync feature that enables you to get other people's DPS more acurately (if they have it too).

    Neither of these are Aced but I have it on my work in progress list to Ace Recap.

    Steve
    Posted in: General Chat
  • 0

    posted a message on Recap Ace'd
    Quote from "Industrial" »
    Quote from "Steve" »
    when I have split all the UI code into a seperate add-on


    AceGUI.


    I was specifically refering to AceRecap here. I plan to make two add-ons - AceRecap and AceRecapUI.

    AceRecap will do nothing but gather data for other mods to show.

    AceRecapUI will be a UI that is the same as Recap is now but gathers its data from AceRecap. I may use AceGUI to do this mod although it would be easier to just rip the code directly from Recap.

    This will allow other people to write mods to display the data they want in the way that they want. Some people may like DamageMeters and others may like Recap. It would allow the interface to be configurable without the bloat of an add on that includes the options to do everything you may (or may not) want to do.

    For me, I would like a much more plain UI than Recap offers and I may also code and release that option too.

    I haven't looked into the sync feature of DamageMeters but I think that this seperation of code would allow someone to write an add on that uses AceRecap and implements the sync feature. This probably wouldn't want to include a reporting UI as AceRecapUI (or some other alternative) would do that bit.
    Posted in: Addon Ideas
  • 0

    posted a message on Recap Ace'd
    Sorry, I missed your last post until now Orione. I have completed stage 2 on my plan and it works alongside Recap and provides the same numbers in my tests. I am now looking at an extra stage of making it class based rather than procedural.

    After that I'll either move onto the database structure (stage 3) or go to the UI seperation (stage 4) and do that first. I think it may be easier to look at the database structure when I have split all the UI code into a seperate add-on.

    I'm not going to have much time to do this over the next week as I am out at Christmas parties and such (and going to see Black Eyed Peas in concert tonight :D )
    Posted in: Addon Ideas
  • 0

    posted a message on Recap Ace'd
    I started converting Recap by starting with Rowne's template from the dev kit and pulling in each part of Recap in stages. I got a bit (or even a lot) overwhelmed at the amount of stuff I didn't know how to do and I nearly dropped the project.

    I stopped and had a bit more of a think about it and came up with a plan (what do the people who have done this before think about it?):

    1. Shoe-horn Recap into Rowne's template. This will result in an Add-On that is techically Ace'd but doesn't follow the spirit of Ace and only does the bare minimum of code required to be considered an Ace add-on.

    2. Convert the event handling to Ace.

    3. Convert the data handling to Ace.

    4. Split the UI from the data handling to create two add-ons which will enable other UI designers to design their own look and feel without the need to worry about the data.

    5. Streamline the code where possible - this is last so that I will have a better understanding of LUA and I'll be in a better position to ask for and understand advice on the topic.

    I have almost got to the end of stage 1. I currently have an add-on that looks, feels and works like Recap. I haven't been able to check the data with Recap as they won't work together - they obviously use a global variable that they both share and one is clobbering the other's data.

    Any comments about the plan? Does it seem like a good way to go about it?

    Steve
    Posted in: Addon Ideas
  • To post a comment, please or register a new account.