McRun - Official thread
This thread is for discussion of my McRun framework and any of my McRun addons.
I'm happy to answer any questions from people trying to write McRun addons, or users trying to figure out how to use them. I'm also open to any feedback on the framework itself (especially proposed additions to McLib). And yes, I'm nuts! :D The McRun page linked above has a list of McRun addons (the ones that I know about, anyway... Post here if you want yours added) |
I think I just swallowed my own tongue.
Wow. |
Quote:
|
I would LOVE to see how addons actually work with this.
It looks amazing. |
Would someone like to explain to me what this does to someone who knows nothing about addon coding?
:( |
Quote:
After the McRun framework (~5 macro slots), what you see there took 3 macro slots (really, just over 2) for the addon plus one character-specific macro for configuration. Once I get the state-based paging finished it'll be ready for its close-up! Quote:
|
Quote:
|
Quote:
|
Small update: CogsBar McRun is finished, and I'm throwing together some documentation as we "speak" :banana:
Edit: et voilą: http://cogwheel.info/wow/CogsBarMcRun.html |
Nifty, Cloud addons.
Although why not seperate McRun into a separate addon and allow for better addon-> macro compression? |
Quote:
|
Quote:
|
With a little bit of trial and error, I've figured out a bit of how the bars you create relate to the real bars for documentation purposes.
The first 12 buttons you create uses Bar 1, the next 12, uses bar 2, and so on until you hit bar 10 (120 total global buttons). While you can create additional bars past that, it they will not be assignable as they are reserved for various things such as the totem bar. It does not matter how you actually split the bars, but the assignment is in order of whatever you create the bars in the config. Looking at your example, Code:
bars={ V= Pixels from bottom H= Pixels from Center, positive going right. W = Number of buttons per row (rows are generated based on [b]uttons/[W]idth) S = Switching based on the model form:1 => bar 1 N= ??? I have no idea K= Key binding, ordered by the order of bars from left to right, top row to bottom, placed in a single dimension array. So...what's N? I couldn't figure that out at all as the code is of course obfuscated for compactness. FYI: I'm Pallyana on the "other" forum thread. |
lua Code:
Ok heres an autojunk seller, 237 characters (it's not tested but it's pretty much identical to tekjunkseller). |
Quote:
There's also an unused option, P for "Point", which sets the anchor point of the bar relative to UIParent (usually equal to the screen edges). It defaults to "BOTTOM", hence the descriptions of H and V. You can use any of the anchor points used by SetPoint. |
Oo..thanks. That's what I figured it was for, but wasn't sure.
Also, in case anyone else was trying to figure it out. The configurations go in a macro called "CBConfig1" (or CBConfig<n> as many configuration files as you need.) |
Quote:
|
Quote:
CogsBar was my main motivation for creating McRun since my action bar needs are so specific. |
Since I'm at work and can't try it here maybe someone can answer me a small question ;)
Is it possible to switch buttons/bars when you switch your talents to the second spec ? |
Quote:
I was hesitant to bump CogsBar's macro slot use up to 4 just for state-based visibility, but dual spec support would certainly be worth it. In the meantime, you can work around it by keeping two separate CConfig macros and change the names when you switch specs. |
Thanks.. I think that this whole addon in a macro thing is a great idea .. I don't use many macros yet and look forward to play around with that stuff ;)
|
I just played around with it.. and at least the buttons are changing when I switch the talents.. that's all a wanted to know for now ;)
Changing the layout on switching talents would be even better ;) Hmm.. I think there is some more important stuff missing... a petbar / vehicleui comes to my mind :) |
Quote:
Vehicle support might be a bit too complex to handle elegantly within the space limitations. At the very least I can make sure the built-in one shows up. There might be a way to hack it in the current version with clever use of state paging though... To be continued... |
It needs some work, but here's McBag
Commands: /mb - Toggle window. 1: Code:
local F,CNS,Mt,C,g=CF('Button','McBag',UIParent),GetContainerNumSlots,setmetatable,ceil,{0,1,2,3,4,5}local B,H=function(i,b)b=F.b[i]b.size=CNS(i)return b end,function(i)for k,v in pairs(g)do if v==i then return k end end end Ij(F,{b=Mt({},{__index= Code:
function(t,k,f)f=CF('Frame',F:GetName()..'B'..k,F)f:SetID(k)t[k]=f f.i=Mt({},{__index=function(t,i,s)s=CF('Button',f:GetName()..'Item'..i,f,'ContainerFrameItemButtonTemplate')s:SetID(i)t[i]=s return s end})return f end}),lo=function(c,p,i,z,t)i,z=1,36+p Code:
for _,b in ipairs(g)do for _,v in pairs(B(b).i)do F.H(v)end for s=1,CNS(b)do t=B(b).i[s]t:ClearAllPoints()F.SP(t,'TOPLEFT',F,'TOPLEFT',(i-1)%c*z+8,-(C(i/c)-1)*z-24)F.S(t)i=i+1 end F.up(b)end F:SS(z*min(c,i)-p+16,z*(C(i/c)-1)-p+32)end,up=function(i)if H(i) Code:
then ContainerFrame_Update(B(i))end end,ul=function(i,s)if H(i)and s then ContainerFrame_UpdateLockedItem(B(i),s)end end})F:SetBackdrop{bgFile=[[Interface\ChatFrame\ChatFrameBackground]],edgeFile=[[Interface\Tooltips\UI-Tooltip-Border]],edgeSize=16,tile=1 Code:
,tileSize=16,insets={left=4,right=4,top=4,bottom=4}}F:SetBackdropColor(0,0,0,.5)F:SSc('OnEvent',function(s,e,...)s[e](...)end)F.RE=function(e,m)F:R(e)F[e]=F[m]end F.RE('BAG_UPDATE','up')F.RE('ITEM_LOCK_CHANGED','ul')F:MM()F.lo(8,2)F:SP('RIGHT',-48,0)F:H() Code:
SL(function()if F:IsShown()then F:H()else F:S()end end,'/mb') Code:
local F,CNS,Mt,C,g=CF('Button','McBag',UIParent),GetContainerNumSlots,setmetatable,ceil,{0,1,2,3,4,5} |
:eek:
I luff you! :banana: |
I think it might be a nice addition to the McRun macro if we were able to separate the McRun mods using <> this would allow the naming of each snippet by having name<code>, it would also make it substantially easier for an external addon created to manage snippets to differentiate between different snippets.
something like this lua Code:
Also the current Mc<addons> are making pretty quick progress :) |
McCC
Here's a CooldownCount (this code is basically taken from evl's BlizzardTweaks and then stuffed through a meat grinder).
1: Code:
local h,c,t,b,x,U=hooksecurefunc,"CENTER"U=function(f,e)if f.x and f.a then t=ceil(f.s+f.d-GetTime())if f.e>0 and t>0 then f.x:T(t)else f.x:T""f.a=false end end end h("ActionButton_OnUpdate",U)h("CooldownFrame_SetTimer",function(f,s,d,e)b=Ij(f:GetParent( Code:
))if s>0 and d>3 and e>0 then if not b.x then t=CF("Frame",b:N().."C",f)t:SzPt(32,32,c,b,c)x=Ij(t:CF(nil,"ARTWORK"))x:SetFont(NAMEPLATE_FONT,20)x:SetTextColor(1,.9,.2)x:SAP(t)x:SetJustifyH(c)b.x=x else b.x:T""end b.a,b.s,b.d,b.e=true,s,d,e U(f,1)end end) Code:
local h,c,t,b,x,U=hooksecurefunc,"CENTER" Edit: With McRun 1.3 and a lot of finessing, I was able to get this down to 2 macros. I removed the stipulation that it only shows for abilities with less than one minute cooldowns, mostly to save space (so an ability with a 2-minute cooldown might show up as "1..." for a while until it gets below 100 seconds). |
Quote:
;) Put another way, any additions to the "syntax" of McRun scripts would either interfere with the lua syntax or require too much code to accomplish robustly (special comments, for instance would consume a lot of characters). Plus, I don't think you'd gain more characters than you would save by tighter packing (or at least not enough to make the extra library weight worth it). That or I'm just being stubborn. I don't want to make any changes to McRun's fundamental architecture at this point. :o <edit> As far as McRun management addons, I think using the names of the macros will suffice. </edit> Quote:
le squee :banana: |
V1.3
New version posted. See the link in the OP for details.
Thanks to everyone's enthusiasm, I've been able to identify several methods that are worth the additional macro slot for McLib: :N (GetName) :SAP (SetAllPoints) :CAP (ClearAllPoints) :T (SetText) :FT (SetFormattedText) :CF (CreateFontString) :HS (HookScript) I've also added a couple more code shortening tips. |
Holy crap. This is like bringing Twiiter to WoW. :D
To bad I need textures. |
So now that the NDA is lifted, I might as well mention the reason i made this... Addons were disabled through most of the Cataclysm Alpha and i NEED my bar mods!
|
And here I thought you had a completely unrelated mental disorder...:D
|
Would anyone be able to make a script that would allow me to add keybinds to Main Action Bar 2? I was trying to do it hacking away at CogsBar but wasn't having any luck :( It's the bar under keys 1,2,3 etc etc (uses ActionID 13-24)
or if someone could help me make a CogsBar config that creates 1 12button bar with keybinds and sets the bar offscreen trying to cheat but not working out too well :( Code:
bars={ |
Quote:
|
Quote:
I agree it would be nice to have more direct control over the action slots used, but there are too many "would be nice"s to fit inside just a few macro slots. (I can think of a few I'd like as well). |
Quote:
This kind of performance impact is actually inevitable for any auto-junk selling addon. The API calls involved generate a lot of information (read: memory usage). There's also the effect of all the "sell item" calls which depends on your latency. This is simply the side effect of sending several (dozens?) of server requests. The only way to get around these is to sell items asynchronously, but that requires a lot of extra code overhead (and if you walk away from the vendor during the process, not everything will be sold). |
You really are a coding genius Cog.
|
McLoad Script-noob question.
I love the idea of this, but I am no code writer. I see that all these are required to be included in a "McLoad script" but I have not seen an example of the mcload script. Did I miss something obvious? Thanks for the help!
|
Quote:
I'm also working on a more beginner-friendly walkthrough that should be done in the not-too-distant future. |
Quote:
|
Quote:
Code:
bars={ |
Quote:
for example i changed the first 4 keybinds to Code:
bars={ |
Hmm, it appears I read/remembered the lua documents wrong. It wouldn't really help number-of-characters wise to specify each one, so the nils may be more clear.
Sorry for the noise. :o |
Quote:
Also instead of using nil, because the settings are kept out of global scope you can just use a nil variable i.e. lua Code:
would become lua Code:
|
Yea i suppose its not too big a deal unless i was to run out of macro space.. thanks guys
|
Casting Bar Latency
Okay, I have a version that I believe to be working that is a mashup of relevant bits from both Quartz and thekCastbar, going to do some more testing then I'll post that here. I also took out some bits from SquidFrame and added the color-changing effect to the health bars. I also had written some code borrowed from SquidFrame that replaced the unit frame portraits with the 3d face models, but it was buggy on the target and target's target frames, and took 7 macro slots, so I just called it a proof of concept and moved on. I'll post those macro sets up here in a little while.
|
All times are GMT -6. The time now is 01:34 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI