Minion Beta! - Help us test our new AddOn updater. Get it now!
Download
(18 Kb)
Download
Updated: 01-15-08 05:58 PM
Pictures
File Info
Updated:01-15-08 05:58 PM
Created:unknown
Downloads:19,319
Favorites:31
MD5:

CogsBar - R.I.P.  Popular! (More than 5000 hits)

Version: 1.10.1
by: Cogwheel [More]

I hereby release all versions of CogsBar to the public domain. The core functionality depended on a system that was deprecated in 2.1. Now with 3.0, even the endorsed method has been replaced. The changes demand a thorough rewrite that I simply don't have the time to accomplish. Feel free to take it for what it's worth.

CogsBar

By Cogwheel — v1.10.1

CogsBar allows you to create a number of movable action bars of various configurations. Each bar can remap its actions based on certain types of states.

Please visit Cogwheel’s Workshop for updates, bug reports, feature requests, etc.

Guide

This started out as a simple example of the use of state headers (see v1.0) and as a replacement for my personal FlexBar setup. After the initial version I added a few tweaks here and there to let me create different setups for my different characters. You can now create an arbitrary number of bars (even single buttons) that can respond to state changes.

Note that CogsBar’s job is only to create action buttons. It does not modify the default UI in any way. If you would like to hide, break up, or move the main menu bar, I highly recommend CT BottomBar. It is very customizable and intuitive to use. Other alternatives are MoveAnything, Bongos, and various others I have not used myself.

Creating bars

The bars are created using the /cogsbar (/cb) slash command. Running this command with no arguments shows you a list of subcommands (create, clear, list, remove, status, bind). The simplest form for creating a bar is:

/cogsbar create 6x4

This creates a bar that is 6 buttons wide by 4 buttons high and uses action ids 1-24. Note: if you do not see any buttons, it means you don’t have any abilities configured in the first 24 action slots. If you drag a spell out of your spellbook, the buttons will appear. You will also see the control box near the lower-middle of the screen which you can use to move the bar.

Notice: the current implementation uses Blizzard’s layout-cache.txt to save its position. This means that if you log into the game with CogsBar disabled, you will have to reposition your frames the next time you log in. I will try to address this in a future version.

CogsBar “consumes” action ids, so the next bar created would start with action id 25. In other words, if you now ran the command:

/cogsbar create 9x4

you would have another 9 by 4 bar using actions 25-60.

Getting information

To see your bar configuration, use the list command:

/cogsbar list
CogsBar: List of bars:
1: 6x4
2: 9x4

You can also see some generic information with the status command:

/cogsbar status
CogsBar Status:
Number of bars: 2
Number of buttons: 60
Available actions: 60

Removing bars

If you would like to remove one of your bars, use the remove command, passing it the number shown in the output from list:

/cogsbar remove 1
CogsBar: Bar 1 removed. Please reload your UI for changes to take effect.

Due to some limitations in the current implementation, you must reload your UI after removing a bar (you can type /console reloadui or log out and back in). Note also that bar 2 will now use actions 1-36 instead of 25-60. Here’s the output of status at this point:

CogsBar Status:
Number of bars: 1
Number of buttons: 36
Available actions: 84

You can also use clear to remove all the bars bars as if you had manually run the remove command (UI reload is required).

State mapping

As mentioned, CogsBar bars can be driven by state changes. Any sort of state the SecureStateDriverTemplate supports can be used with CogsBar. The general syntax is:

/cogsbar <width>x<height> [state] [state] [...]

where each optional state has the syntax:

<state-type>[:[<first>-]<last>]

state-type can be one of stance, stealth, actionbar, shift, ctrl, or alt at the time of this writing (CogsBar is structured in such a way that future additions to SecureStateDriverTemplate will be automatically supported). Here’s a simple example:

/cogsbar create 6x4 stance

If you run this command as a warrior, it will create a 6x4 button bar that maps to actions 1-24 in Battle Stance, 25-48 in Berserker Stance, and 49-72 in Defensive Stance.

Sanity checks

Because certain state types are only relevant under certain circumstances, CogsBar performs a few sanity checks. The stealth type can only be used with Rogues, Druids, Mages, and Night Elves. Stance can only be used with Warriors, Druids, Rogues, Shaman, and Priests.

first and last

The first and last parameters tell CogsBar which states of the given type to “pay attention to.” Each known state type has certain default values for them (see Reference). These defaults allow you to omit the first and last parameters under most circumstances. For instance, the example above is equivalent to:

/cogsbar create 6x4 stance:1-3

You can also omit just the first parameter and the command will use the default value. E.g.:

/cogsbar create 6x4 stance:3

This is useful for conserving action slots when you know you don’t care about certain states. Normally for a Druid the default values are 0-6. This gives you mappings for every possible shapeshift form. However, if you have neither Tree of Life nor Moonkin form and you don’t have the Burning Crusade (hence flight form), you can use the command:

/cogsbar create 12x1 stance:4

which will provide you with mappings for caster, aquatic, bear, travel, & cat forms.

The other key benefit to manual input of first and last is if Blizzard adds more state types to SecureStateDriverTemplate.

Warnings

With flexibility comes responsibility. As such, there are a few caveats to watch out for. First, because you are allowed to specify a state that CogsBar doesn't know about inherently, you must take care not to misspell your state types. For instance, if you issued the command:

/cogsbar create 12x2 satnce

CogsBar would still create the bar and use up 48 actions (the default first and last values for unknown state types are 0-1). It does display a warning about unknown state type in case you did make such a mistake. If you see this warning, you should remove the newly created bar and try again.

Also, behavior is undefined if you specify a range smaller than what might actually occur. For example, if you have a bar created like:

/cogsbar create 12x1 actionbar:1-2

and you switch to action bar page 3, I’m not exactly sure what will happen... )

A similar issue is the expansion of the state type. For instance, if you have a bar created with:

/cogsbar create 6x2 actionbar

while you have two available action bar pages (because the default UI’s “extra” action bars use up pages from the main action bar), it will create two mappings. Now you get all your actions set up just how you want them and for some reason decide to disable all the built-in extra action bars. When you log into the game again, CogsBar will create the bar to take advantage of all six action bar pages, effectively “eating up” the actions from any bars created after it.

Key binding

Finally, we have the bind command which displays the bindings UI. When you open the bindings interface, you can click any CogsBar button to set its bindings. Simply click a button and press a key to set the binding. If you click a button and decide not to bind something to it, click Cancel. If you click Cancel again, it will reload your previous bindings and close the bindings UI. Otherwise, click Save to save your changes and close the bindings interface. Note: only one key can be bound to a CogsBar button at a time.

Reference

All commands begin with /cogsbar which can be abreviated as /cb.

create

Syntax: /cogsbar create <width>x<height> [<state>] [<state>] [...]

Example: /cogsbar create 6x4 stance

Creates a CogsBar

There must be enough available actions (as shown via the list command) in order to create the bar.

States

Syntax: <state type>[:[<first>-]<last>]

Examples: stance:1-3 stealth actionbar:2

States allow remapping based on certain conditions. The use of states multiplies the number of actions used by the bar by the state range. I.e. a 12-button bar will use 36 action slots if stance:1-3 is used.

first and last define the range of states of that type to pay attention to. Each state type defines its own range depending on its characteristics. The default values are listed under each state type below.

Possible state types at the time of this writing:

stance

Changes mapping based on the character’s stance. Only applicable to classes with stances (Warriors, Druids, Rogues, Priests, and Shaman).

Default ranges:

  • Warriors: 1-3
  • Druids: 0-7
  • Rogues & Priests: 0-1
stealth

Changes mapping based on stealth. Only applicable to characters with stealth (Rogues, prowling Druids, shadowmelding Night Elves, invisible Mages).

Default range: 0-1

actionbar

Changes mapping based on the current action bar page.

Default range: 1-n

where n is the number of action bar pages are available. Each “Extra action bar” you enable in the default UI reduces the number of action bar pages available.

shift/ctrl/alt

Changes mapping based on whether the given key is depressed.

Default range: 0-1

defaultui

Creates a mapping similar to the default UI that combines action bar pages with stances.

Default ranges:
  • Rogues & Priests: 0-6
  • Warriors: 0-7
  • Druids: 0-8
  • Others: 0-5
Notes: The last 5 mappings in the range are used for action bar pages 2-6. If you want fewer than 6 total pages, subtract however many you want to remove from the end of the range. For instance, if you have a warrior and want one page for your stances and only one extra page, the command would look like:

/cogsbar create 12x1 defaultui:0-3

or more simply:

/cogsbar create 12x1 defaultui:3

Mapping 0 would correspond to page 1, battle stance; mapping 1 would be page 1, defensive stance; mapping 2 would be page 1, berserker stance; and mapping 3 would be page 2, any stance.

list

Syntax: /cogsbar list

Prints a list of existing CogsBars and their configurations. Example output:

CogsBar: List of Bars:
1: 6x4 stance
2: 9x4

status

Syntax: /cogsbar status

Prints general information about the state of CogsBar. Example output:

CogsBar Status:
Number of bars: 2
Number of buttons: 60
Available actions: 24

remove

Syntax: /cogsbar remove <index>

Removes the bar specified by <index>. The <index> can be determined by the list command.

Note: you must perform a UI reload in order for this change to take effect.

clear

Syntax: /cogsbar clear

Removes all existing bars.

Note: you must perform a UI reload in order for this change to take effect.

bind

Syntax: /cogsbar bind

Displays the binding interface.

lock

Syntax: /cogsbar lock

Locks your bars in place. The control boxes will be hidden.

Bugs/Improvements

There is a bug in Blizzard’s templates that may cause a binding to show on a button even after it has been removed. Hopefully this will be fixed in patch 2.1. If not, I will try to find a workaround.

As always, please visit Cogwheel’s Workshop for bug reports, feature requests, etc.

Changes

v1.10.1
  • No longer reports locked status on login.
  • Updated for 2.3.2.
v1.10
  • Added defaultui state mapping.
  • Reloading the UI will now load the correct action bar page instead of defaulting to page 1.
v1.9.2
  • Fixed button updating for 2.2
v1.9.1
  • Fixed a bug that was preventing use of specified ranges (e.g. stance:1-5)
v1.9
  • ZOMG REAL BINDINGS!!!1
v1.8.3
  • No longer attempts to apply bindings when zoning.
  • No longer wipes out existing bindings when logging in and zoning if you are not using CogsBar’s bindings.
v1.8.2
  • Bars will now remain locked across reloads
v1.8.1
  • Fixed a bug where /cogsbar lock would hide bars driven by states
v1.8
  • Added /cogsbar lock
v1.7
  • Updated for 2.0.3
  • Fixed international treatment of sanity checks for race/class
v1.6.1
  • Made QWERTY the default binding layout (I really need to start remembering this when I update :P )
v1.6
  • Added support for multiple states on the same bar.
  • States can now be supplied without ranges which will apply default values.
  • Added sanity checks for state types (e.g. Warriors cannot use the stealth state).
v1.5
  • First generally usable release. Added all the slash commands and configuration options.
v1.1
  • Finished one of the comments I had forgotten about.
  • Made QWERTY the default binding layout.
v1.0
  • Initial release. This version only created one 6x4 bar that responded to stance changes and was meant as a simple (and well-commented) example of the use of state headers.

Post A Reply Comment Options
Unread 10-22-08, 02:45 AM  
oddtoddy
A Murloc Raider

Forum posts: 4
File comments: 146
Uploads: 0
This was one of the best mods ever too. I guess all good things must come to an end!
oddtoddy is offline Report comment to moderator  
Reply With Quote
Unread 10-21-08, 11:52 PM  
Cogwheel
Sans Poisson
 
Cogwheel's Avatar
AddOn Author - Click to view AddOns

Forum posts: 237
File comments: 137
Uploads: 24
Re: Buhbye

I hereby release all versions of CogsBar to the public domain. The core functionality depended on a system that was deprecated in 2.1. Now with 3.0, even the endorsed method has been replaced. The changes demand a thorough rewrite that I simply don't have the time to accomplish. Feel free to take it for what it's worth.
Last edited by Cogwheel : 10-21-08 at 11:55 PM.
Cogwheel is offline Report comment to moderator  
Reply With Quote
Unread 10-17-08, 11:47 AM  
Cogwheel
Sans Poisson
 
Cogwheel's Avatar
AddOn Author - Click to view AddOns

Forum posts: 237
File comments: 137
Uploads: 24
Buhbye

Cogwheel is offline Report comment to moderator  
Reply With Quote
Unread 05-31-08, 03:55 PM  
Crissa
A Flamescale Wyrmkin
 
Crissa's Avatar

Forum posts: 136
File comments: 16
Uploads: 0
Bug: Not enough action ids?

4:44 PM> Interface\AddOns\CogsBar\CogsBar.lua:79: Not enough action slots available
I don't seem to be able to do 12x6 or 6x12. Why not?

Also, once I get this error, I can no longer create bars (or even press enter on the command!), even if there are no bars in the list.

-Crissa
Crissa is offline Report comment to moderator  
Reply With Quote
Unread 04-09-08, 08:58 AM  
Valdeck
A Defias Bandit

Forum posts: 2
File comments: 42
Uploads: 0
Hey Catofong,

The short answer is not really. Cogs bar is mean more to be a replacment of the blizzard bars rather than used in conjuction with. Most bar mods are written that way (trinity, bartender, bongos, flexbar, infinitbar to name a few) and you would be hard pressed to find one that dosnt share button id's with the default bars.

One suggestion I can throw out there is try Infinibars2, I think it might work on its own system but like I said they are usually written to replace not work with. Hopefully cogs will get back to you he is usually very prompt on answering questions and maybe I am wrong

oh and to remove a bar its remove not clean /cogsbar remove bar 1

check the main page it has that listed near the top of the explination he puts up for you.

Originally posted by catofong
I just got a Belkin Nostromo n52 Tournament Edition and want to map my spells to a 7x3 grid to match the layout of my new gamepad plus a few more.
I did the /cogsbar create 7x3 and got the bar, but it appears that the spells in the new 7x3 bar are directly linked to my bar 1 on the bottom of the screen (the one provided by blizzard).
I then tried /cogsbar create 7x3 bar 2 and it appeared that the bar now is directly related to my right action bar 2.

What I want is a mod that is completely independent of any other bars that is built into WOW. Is Cogsbar able to do this? Sorta frustrated by this right now because I already have my other action bars filled with spells that I use when I am not using my own computer and my downloaded set of addons.

Any help on this?

Also, when I hit /cogsbar clear bar 1 it says "All bars have been removed" which is not what i wanted, I just wanted to get rid of the 7x3 that I created for bar 1 (which is linked to my Action Bar 1, the one provided by blizzard).

Help!
Valdeck is offline Report comment to moderator  
Reply With Quote
Unread 03-18-08, 04:43 PM  
catofong
A Kobold Labourer
 
catofong's Avatar

Forum posts: 0
File comments: 1
Uploads: 0
I just got a Belkin Nostromo n52 Tournament Edition and want to map my spells to a 7x3 grid to match the layout of my new gamepad plus a few more.
I did the /cogsbar create 7x3 and got the bar, but it appears that the spells in the new 7x3 bar are directly linked to my bar 1 on the bottom of the screen (the one provided by blizzard).
I then tried /cogsbar create 7x3 bar 2 and it appeared that the bar now is directly related to my right action bar 2.

What I want is a mod that is completely independent of any other bars that is built into WOW. Is Cogsbar able to do this? Sorta frustrated by this right now because I already have my other action bars filled with spells that I use when I am not using my own computer and my downloaded set of addons.

Any help on this?

Also, when I hit /cogsbar clear bar 1 it says "All bars have been removed" which is not what i wanted, I just wanted to get rid of the 7x3 that I created for bar 1 (which is linked to my Action Bar 1, the one provided by blizzard).

Help!
catofong is offline Report comment to moderator  
Reply With Quote
Unread 11-21-07, 10:31 PM  
tareon
A Kobold Labourer
 
tareon's Avatar

Forum posts: 0
File comments: 22
Uploads: 0
show/hide command request

Great!

Exactly what I was looking for. But I'm missing keybindings or a /slash-command to show/hide Cogsbars. Adding this feature would make my day.
tareon is offline Report comment to moderator  
Reply With Quote
Unread 10-11-07, 12:39 PM  
Cogwheel
Sans Poisson
 
Cogwheel's Avatar
AddOn Author - Click to view AddOns

Forum posts: 237
File comments: 137
Uploads: 24
Re: Decided to use CogsBar Fulltime

Originally posted by lachlin
[b]One thing that was bothering me was that the default Blizzard Bars were still visible. One simple modification of the Cogsbar.lua file took care of this:
Thanks for the input. I actually intentionally left out any sort of main bar hiding for simplicity's sake. In order to effectively do away with the main menu bar I would need to do one of two things:
1. Reproduce all of the other features of the action bar: menu buttons, bag buttons, xp bar, latency meter, class bar (stance/form/stealth) and pet bar.
2. Recommend any number of mods to replace such features.

In essence, I went with #2 but without the intermediary step of actually hiding the bar. The second paragraph of the readme file (which I just noticed is not included in the description above) recommends the use of CT BottomBar in conjunction with CogsBar for best results. I'm adding this note to the description now...

That being said, I wouldn't be entirely opposed to adding it as an option. Maybe a new command like: /cb hideblizz or something. I'm not sure when (or really if) i'll get around to it but your comment will help anyone else who might want a similar solution.
Cogwheel is offline Report comment to moderator  
Reply With Quote
Unread 10-11-07, 12:25 PM  
lachlin
A Kobold Labourer

Forum posts: 0
File comments: 1
Uploads: 0
Decided to use CogsBar Fulltime

One thing that was bothering me was that the default Blizzard Bars were still visible. One simple modification of the Cogsbar.lua file took care of this:

Original (at line 221):
Code:
--[[
This sets up a frame that creates bars and sets the bindings depending on saved
variables
]]
local cbLoader = CreateFrame("Frame")
cbLoader:SetScript("OnEvent", function(self, event, ...)
	if event == "VARIABLES_LOADED" then
		for _, v in ipairs(CogsBarSV.savedBars) do
			commandHandlers[v.command](v.parameters)
		end
		cb:LockBars(CogsBarSV.lockBars)
	end
end)
cbLoader:RegisterEvent("VARIABLES_LOADED")
Modified:
Code:
--[[
This sets up a frame that creates bars and sets the bindings depending on saved
variables
]]
local cbLoader = CreateFrame("Frame")
cbLoader:SetScript("OnEvent", function(self, event, ...)
	if event == "VARIABLES_LOADED" then
		for _, v in ipairs(CogsBarSV.savedBars) do
			commandHandlers[v.command](v.parameters)
		end
		if # CogsBarSV.savedBars > 0 then
			MainMenuBar:Hide()
		end
		cb:LockBars(CogsBarSV.lockBars)
	end
end)
cbLoader:RegisterEvent("VARIABLES_LOADED")
Note that this change only hide the MainMenuBar if there are any Cogbars configured for that character. If there are no CogBars set, the Main menu bar will be visible on login. This also does not modify the extra bars that Blizzard provides on the advanced tab of the interface dialog. I left these alone as there already is an interface to enable/disable them in the current blizzard client ui.
Last edited by lachlin : 10-11-07 at 12:33 PM.
lachlin is offline Report comment to moderator  
Reply With Quote
Unread 10-03-07, 07:49 AM  
Cogwheel
Sans Poisson
 
Cogwheel's Avatar
AddOn Author - Click to view AddOns

Forum posts: 237
File comments: 137
Uploads: 24
Re: 2 questions

Originally posted by Nannus
Hi, ty for this great addon, i have 2 questions :

1. It's possible to configure ids for any created bar?
Not right now. This is a planned for a future version but I wouldn't expect to see any significant new features on any of my mods until at least the end of the year.

2. There is some problem binding combos like ctrl+shift+q
This may have to do with the new 2.3 modifier system. I'll look into a fix.

My druid have the 3 standard bar (blizz ui) configured for cast, bear form and cat form and i have a g15 logitech keyb. that i want to use with cogsbar. I created a 3x6 bar (the same configuration of the action buttons in my keyb) but when i switch between forms the button ids of my bear bar and my cat bar don't follow the default action bars
See my most recent comment below
Cogwheel is offline Report comment to moderator  
Reply With Quote
Unread 10-03-07, 01:42 AM  
Nannus
A Kobold Labourer

Forum posts: 0
File comments: 2
Uploads: 0
2 questions

Hi, ty for this great addon, i have 2 questions :

1. It's possible to configure ids for any created bar?
2. There is some problem binding combos like ctrl+shift+q

My druid have the 3 standard bar (blizz ui) configured for cast, bear form and cat form and i have a g15 logitech keyb. that i want to use with cogsbar. I created a 3x6 bar (the same configuration of the action buttons in my keyb) but when i switch between forms the button ids of my bear bar and my cat bar don't follow the default action bars and when i try to bind any of my G15 keyb. button the cogsbar bind window say that the combo "CTRL+Q" is binded to bar 0, dunno why. Can anyone help me? Ty in advance and sorry for my bad english.
Last edited by Nannus : 10-03-07 at 01:44 AM.
Nannus is offline Report comment to moderator  
Reply With Quote
Unread 09-27-07, 10:00 PM  
Valdeck
A Defias Bandit

Forum posts: 2
File comments: 42
Uploads: 0
Re: Cogsbar problem with my druid

Hey fighter, the first thing I can tell you to check is find out when you got what forms. Depending on if you got the out of order (ie if you waited to get sea lion form) then your numbers will be off some.

Also what you need to do is do the command line to set it up for your stances then switch to each stance and set your buttons up. once you do it should be saved and work fine.

Originally posted by Fighter
I have a level 34 feral druid and am trying to use cogsbar with it.

I have tried many commands to create the bar, but have never gotten any of them to load the right bar per stance I am in.

/cb create 6x4 stance:0-4

This one gives the correct bar for when I am in elf form, and correct bar for when I am in feral cat form. However, when I am in bear form it has all the buttons in the bar from the two right side action bars. When I am in traveling cat form, it has the buttons from the bear.

Any help?
Fighter
Valdeck is offline Report comment to moderator  
Reply With Quote
Unread 09-26-07, 10:09 PM  
Cogwheel
Sans Poisson
 
Cogwheel's Avatar
AddOn Author - Click to view AddOns

Forum posts: 237
File comments: 137
Uploads: 24
Re: Cogsbar problem with my druid

When you say "correct bar" are you comparing it to the default UI? CogsBar makes no attempt to match the action slots used to the ones that would be used by the default UI. As explained in the readme, it starts with action slot 1 and uses each slot consecutively as it builds the bars until it runs out (120 max). Unfortunately, the default UI arranges its action slots in a very convoluted manner, even moreso for druids.

All I can guarantee is that the behavior will be as documented. The slots themselves will not match.

Do you mind telling me what your ultimate goal is? I might be able to suggest something to help you...
Cogwheel is offline Report comment to moderator  
Reply With Quote
Unread 09-26-07, 09:43 PM  
Fighter
A Kobold Labourer

Forum posts: 0
File comments: 1
Uploads: 0
Cogsbar problem with my druid

I have a level 34 feral druid and am trying to use cogsbar with it.

I have tried many commands to create the bar, but have never gotten any of them to load the right bar per stance I am in.

/cb create 6x4 stance:0-4

This one gives the correct bar for when I am in elf form, and correct bar for when I am in feral cat form. However, when I am in bear form it has all the buttons in the bar from the two right side action bars. When I am in traveling cat form, it has the buttons from the bear.

Any help?
Fighter
Fighter is offline Report comment to moderator  
Reply With Quote
Unread 05-09-07, 06:12 PM  
Valdeck
A Defias Bandit

Forum posts: 2
File comments: 42
Uploads: 0
Doh

and the author of Dr.Dmg got it to show the spell dmg or most of it.... I am assuming what show key bindings is maybe the UI? (kinda of new at the whole addon codeign thing).

Originally posted by Cogwheel
Guess what controls the display of bindings...


:P
Valdeck is offline Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump:

Support AddOn Development!

You have just downloaded by the author . If you like this AddOn why not consider supporting the author? This author has set up a donation account. Donations ensure that authors can continue to develop useful tools for everyone.