Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 26

Thread: MultiCAB - Show an extra Combat Action Bar

  1. #1

    Default MultiCAB - Show an extra Combat Action Bar

    I've been finding 12 Combat Action Bar buttons isn't quite enough to fit in all the skills I regularly use in combat. So I've made a fight.ash override that adds an extra row of buttons to the CAB.


    Now I have easy access to all the skills and items I will require to defeat this terrible foe.

    The extra bar shows the contents of the action bar directly below your current bar. If you are using action bar 1, it will show action bar 2, and so on.

    Everything works as normal for the extra buttons, you can drop actions there from the skill/item dropdowns, and drag buttons between the bars.

    You can install it by entering this line into the CLI:
    Code:
    svn checkout svn://svn.code.sf.net/p/multicab/code
    This script overrides fight.php and it is possible you already have a fight.ash relay override!
    If this is the case you will get a warning about overwriting files when you install, and be asked if you want to overwrite the old fight.ash
    If you don't get that warning then you can ignore everything below this line.
    If you want to keep the function of multiple fight.ash scripts you need to manually edit your copy of fight.ash to contain and call the relevant functions from both scripts.
    So you would need to copy the addMultiCAB() function into your fight.ash, and your main function would look something like:
    Code:
    void main() {
         buffer page = visit_url();
         // Other scripts functions that modify the page can go here.
         page = page.addMultiCAB();
         // Other scripts functions that modify the page can go here too.
         page.write();
    }

  2. #2
    Minion Bale's Avatar
    Join Date
    Jun 2008
    Posts
    13,287

    Default

    The extra bar shows the contents of the action bar directly below your current bar. If you are using action bar 1, it will show action bar 2, and so on.
    Originally Posted by darkcodelagsniper View Post
    That's interesting, but not exactly how I would want to use this. Would it be possible to have a single action bar that I use for my second? To explain my logic: I have separate action bars for each class. For instance, bar 1 is my Seal Clubber bar, 2 is Turtle Tamers, and so on. With this set-up there are some skills/items that I want access to regardless of class, such as saucy salve, rock band flyers, book of insults...

    My point is that I would like to designate bar 12 as the place I put all my cross-class stuff so it is available for each class, freeing up the space on the other bar. If I do this your way, I'd need to use all 12 bars for 6 classes and need to set up 6 nearly identical secondary bars for each and every class.

    Could you help me write a version of multicab.js that fulfills my needs? From looking at it I suspect it might be a simple change, but I'm not sure and I don't want to risk screwing up my CAB.
    If people like my scripts, please send me stuffed Hodgmen.
    Universal Recovery, OCD Inventory Control, CounterChecker, newLife, ChIT.


  3. #3

    Default

    That was an approach I looked at. It would be possible, but it would involve storing arbitrary data in your CAB configuration (specifically the bar id for the second action bar), and it would be a fair bit more complicated. This seems to me the only obvious way to remember the setting for your secondary bar without reloading the page whenever you switch it up/down.

    Storing arbitrary data in the CAB is technically a thing that is sort of intended/supported by KoL (Kolproxy apparently uses this to store some serverside data), but I find it kinda icky as a concept (CAB data has a size limit, and there's no obvious way for users to remove cruft from their CAB data without nuking the entire thing) so I went by a simpler route.

  4. #4

    Default

    I don't want to risk screwing up my CAB.
    Originally Posted by Bale View Post
    Double-posting to say that the chances of this are relatively high! CAB data is pretty fussy about format, and if it isn't happy then it will just destroy itself and make you start from scratch. I destroyed quite a few of my multi's CAB configurations to get this into a working state

  5. #5
    Minion Bale's Avatar
    Join Date
    Jun 2008
    Posts
    13,287

    Default

    When the CAB came out, there was some discussion about using it's extra data storage to hold KoLmafia settings. The conclusion was that it was dangerous to the CAB if anything went wrong.

    Anyway, I'd be happy if I didn't have the ability to change the secondary CAB to anything except for 12. No need to store any info in it, just hardcode that.

  6. #6

    Default

    Anyway, I'd be happy if I didn't have the ability to change the secondary CAB to anything except for 12. No need to store any info in it, just hardcode that.
    Originally Posted by Bale View Post
    OK! Here's a hack that makes the second bar always show page 12. In multicab.js change lines 4 and 36 ( the declarations of var modpage ) to:
    Code:
      var modpage = ( buttonraw < 13 ) ? top.buttoncache.whichpage : 11; //NEW LINE (SPECIAL BALE PAGE12 HAX)

  7. #7
    Minion Bale's Avatar
    Join Date
    Jun 2008
    Posts
    13,287

    Default

    Wow! This is amazing! I just put my lovebug skills and some other stuff on the lower bar and it stays there while I switch the upper bar.

    I just have one criticism and I think that it is valid for your intended usage as well. When I click on the buttons for items or skills, it covers up a portion of the lower bar. That means I cannot easily add new stuff to the right or left slots on the bar if it is a new skill or item, respectively. Have you thought about moving the script, skills and items buttons down a level so that their drop-downs do not cover anything?

  8. #8

    Default

    Moving them to the bottom row sounds like a good idea. I've implemented it now, so feel free to svn update

  9. #9
    Minion Bale's Avatar
    Join Date
    Jun 2008
    Posts
    13,287

    Default

    Better! Thanks.

    Could you move the "script" button down a line also, just to protect the aesthetics of the CAB? Or is that another issue altogether?

  10. #10

    Default

    I don't want to move the script button, because its position should be consistent with the other places that the script button appears ( such as noncombats ).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •