Page 1 of 2 1 2 LastLast
Results 1 to 10 of 12

Thread: Macro Menu Bars

  1. #1
    Player
    Almagnus1's Avatar
    Join Date
    Mar 2015
    Location
    Ul'Dah
    Posts
    941
    Character
    Maley Oakensage
    World
    Behemoth
    Main Class
    White Mage Lv 90

    Macro Menu Bars

    So I'm looking into making a hotbar and i've gotten it largely working, but I'm looking to make it a bit more bulletproof and also work in a few nicer features.

    Are there any if/then/else structures in the macro language?

    Can I copy a macro, (like the one in spot 3 for example) to a specific hotbar spot?
    (0)

  2. #2
    Player
    Rongway's Avatar
    Join Date
    Aug 2013
    Posts
    4,141
    Character
    Cyrillo Rongway
    World
    Hyperion
    Main Class
    Black Mage Lv 100
    There are no control structures and you can't use a slash command to assign a macro to a hotbar slot. But here are some things you can do:

    • Copy entire hotbars with the /hotbar copy (normal hotbars) and /chotbar copy (cross hotbars) commands.
    • Use "current" as a source job or destination job argument when using the /(c)hotbar copy commands.
    • Use "share" as a source job or destination job argument ...
    • Use a base combat class as a source job or destination job argument ...
    • Use "share" as an argument even if the bar number in question is not shared.
    • Use a specific class or job as an argument even if the bar number in question is shared.

    Shared bars are their own barset separate from the barset for each job. The base combat classes each also have their own barset separate from their upgrade jobs' barsets. All shared bars, class bars, and job bars exist, regardless of Share settings and job unlock states.

    To read the help file for a command, use the /? command:
    Code:
    /? hotbar
    For example:


    This example requires bars 8 and 10 to be Shared bars.
    Each role category is just a macro that copies hotbar 10 from some job in the role to my shared "job menu" hotbar:

    Code:
    Casters: /hotbar copy blm 10 share 8
    Healers: /hotbar copy whm 10 share 8
    Tanks:   /hotbar copy pld 10 share 8
    Rangers: /hotbar copy brd 10 share 8
    Meleers: /hotbar copy mnk 10 share 8
    For each role, set up the share 8 bar to have all the gearsets for that role, and all the macros to change role categories. As you set up each version of the bar, you can reverse the command to save share 8 to the chosen job for each role:
    Code:
    /hotbar copy share 8 JOB 10
    Once all five roles' bars are saved, click any of the role categories to change share 8 to the job menu for that role category. This works because I have bars 8 and 10 set to Shared. When I save one of the bars to blm 10, it saves the bar to blm 10, which still exists even though it is invisible due to being overshadowed by Share 10.

    If you want to have one category be a default or home, you can set the macros to wait and restore the default or home bar. For example, to revert automatically to the Caster role menu, make all the other role switchers do:

    Code:
    /hotbar copy JOB 10 share 8 <wait.15>
    /hotbar copy blm 10 share 8


    Conversely, you can hide things in the share bars where the bars are not Shared. For example, using share 1 as a swap buffer while changing a job's bars.
    Code:
    /mlock
    /hotbar copy current 1 share 1
    /hotbar copy current 7 current 1
    /hotbar copy share 1 current 7
    
    /hotbar copy current 2 share 1
    /hotbar copy current 8 current 2
    /hotbar copy share 1 current 8
    
    /hotbar copy current 3 share 1
    /hotbar copy current 9 current 3
    /hotbar copy share 1 current 9
    This example requires bars 1,2,3 to be job-specific and bars 7,8,9 to be Shared.
    This macro swaps out the current job's 1,2,3 bars for 7,8,9 bars that have been hidden under share 7,8,9, using share 1 as a swap buffer. After activating this macro, the original 1,2,3 bars will be stored in the current job's specific 7,8,9. Activating the macro again will swap back to the original bars.

    The /mlock in the first line forces the macro to execute all the way to the end, so you don't somehow interrupt the macro and end up with half your bars from the wrong set.
    (1)
    Last edited by Rongway; 07-28-2021 at 10:40 PM.
    Error 3102 Club, Order of the 52nd Hour

  3. #3
    Player
    ItMe's Avatar
    Join Date
    Jun 2020
    Location
    Lumsa Lomsa
    Posts
    4,178
    Character
    Iiiiiiiiiiit's Meeeee
    World
    Sargatanas
    Main Class
    Arcanist Lv 90
    Quote Originally Posted by Rongway View Post
    There are no control structures and [...]
    Wow that's a lot of useful info. Nice gifs too.
    10/10 post, thanks for making it.
    (0)

  4. #4
    Player
    Almagnus1's Avatar
    Join Date
    Mar 2015
    Location
    Ul'Dah
    Posts
    941
    Character
    Maley Oakensage
    World
    Behemoth
    Main Class
    White Mage Lv 90
    I'm doing something similar, but it's using a lot of macros with the ones that open the bars being:

    Code:
    /hotbar copy THM 1 share 9
    /hotbar display 10 off
    /hotbar display 9 on
    and the actual job switch looking like:

    Code:
    /micon "Soul of the Paladin" item
    /gearset change 1
    /hotbar display 9 off
    Main thing I'm looking to do is wipe and repopulate the hotbar (in this case shared 9 and 10) so I am not reliant upon using THM 1-7 as the "storage" for the bars. It's working now basically doing what you've described, but I'm looking to do something for the role icons more like:
    Code:
    if(shared 9 visible){hide shared 9}
    else{
        populate shared 9
        show shared 9
    }
    Edit:
    Now that I think a bit through the conditions to check for, the if statement would need to be a bit more complicated than just checking if the bar was visible... and it's wandering into needing global variables of some kind. Either way, I'd still be interested to know if there's a way to populate a hotbar without doing a copy.
    (0)
    Last edited by Almagnus1; 07-29-2021 at 01:58 AM.

  5. #5
    Player
    Rongway's Avatar
    Join Date
    Aug 2013
    Posts
    4,141
    Character
    Cyrillo Rongway
    World
    Hyperion
    Main Class
    Black Mage Lv 100
    Quote Originally Posted by Almagnus1 View Post
    Main thing I'm looking to do is wipe and repopulate the hotbar (in this case shared 9 and 10) so I am not reliant upon using THM 1-7 as the "storage" for the bars. It's working now basically doing what you've described, but I'm looking to do something for the role icons more like:
    Code:
    if(shared 9 visible){hide shared 9}
    else{
        populate shared 9
        show shared 9
    }
    There are two ways to hide a bar. A bar's Display setting can be set or toggled with /hotbar display. A bar's Sharing state can be set or toggled with /hotbar share. If there is nothing in current 9, turning Sharing off for 9 will show the blank current 9 bar; or if nothing in share 9, turning Sharing on for 9 will show the blank share 9 bar. The direct method is preferred if all you need to do is hide the bar, but the second method is useful for setups that do things like using a bar for job actions during combat but using the same bar for only-out-of-combat actions (e.g., mounts) when out of combat.

    The quoted conditional structure can be refactored thus:
    Code:
    populate share9
    if (share9.visible)
        hide share9
    else
        show share9
    which of course could be further refactored:
    Code:
    populate share9
    toggle share9

    In game commands, that would look like this:
    Code:
    /mlock
    /hotbar copy thm 1 share 9
    /hotbar display 9
    (0)
    Last edited by Rongway; 07-29-2021 at 10:18 AM.
    Error 3102 Club, Order of the 52nd Hour

  6. #6
    Player
    Rongway's Avatar
    Join Date
    Aug 2013
    Posts
    4,141
    Character
    Cyrillo Rongway
    World
    Hyperion
    Main Class
    Black Mage Lv 100
    Quote Originally Posted by Almagnus1 View Post
    Edit:
    Now that I think a bit through the conditions to check for, the if statement would need to be a bit more complicated than just checking if the bar was visible... and it's wandering into needing global variables of some kind. Either way, I'd still be interested to know if there's a way to populate a hotbar without doing a copy.
    You'll probably only be able to do what you want if you can refactor in some way that doesn't use control structures at all. Besides copying whole bars and toggling Display or Sharing states, there aren't really any other workarounds at your disposal.

    Based just on what you've said so far, I suspect that what you want to do is something like this:

    Click caster role button: caster jobs appear on jobBar
    Click caster role button: job bar disappears
    Click healer role button: healer jobs appear on jobBar
    Click caster role button: caster jobs appear on jobBar

    The pseudocode for that being
    Code:
    //  Caster role category button
    if (jobBar.currentRole == caster)
        hide jobBar
    else
        jobBar.currentRole <= caster
        show jobBar
    
    //  Healer role category button
    if (jobBar.currentRole == healer)
        hide jobBar
    else
        jobBar.currentRole <= healer
        show jobBar
    which is deceptively different from the above example! This one can't be refactored in the same way. If this is in fact what you want to do, you won't be happy with the macro translation above because it leads to this:

    Click caster role button: caster jobs appear on jobBar
    Click caster role button: job bar disappears
    Click healer role button: healer jobs appear on jobBar
    Click caster role button: job bar disappears

    So if what you want is to be able to hide the job bar when you're not using it, you should just use a wait timer to hide the bar automatically after a few seconds.

    Code:
    //  Caster role category button
    /hotbar copy thm 1 share 9
    /hotbar display 9 on <wait.15>
    /hotbar display 9 off
    
    //  Healer role category button
    /hotbar copy thm 2 share 9
    /hotbar display 9 on <wait.15>
    /hotbar display 9 off
    (0)
    Last edited by Rongway; 07-29-2021 at 01:11 PM.
    Error 3102 Club, Order of the 52nd Hour

  7. #7
    Player
    Almagnus1's Avatar
    Join Date
    Mar 2015
    Location
    Ul'Dah
    Posts
    941
    Character
    Maley Oakensage
    World
    Behemoth
    Main Class
    White Mage Lv 90
    I think it may make more sense for me to show a (really bad) gif of what I've got working ingame:



    I'm basically trying to solve two things:
    1) Be able to click the role icon to get the menu to close as it will hang open on whatever the last role clicked was

    2) Be able to use populate the bars with the appropriate class/job macros using the role icon macros
    (0)

  8. #8
    Player
    Rongway's Avatar
    Join Date
    Aug 2013
    Posts
    4,141
    Character
    Cyrillo Rongway
    World
    Hyperion
    Main Class
    Black Mage Lv 100
    Quote Originally Posted by Almagnus1 View Post
    I'm basically trying to solve two things:
    1) Be able to click the role icon to get the menu to close as it will hang open on whatever the last role clicked was

    2) Be able to use populate the bars with the appropriate class/job macros using the role icon macros
    Oh, that much is easy.

    2) Make the buttons that change bar 9 just always turn on bar 9 and turn off bar 10; and vice versa.
    1) Set a wait to disappear the bar after a few seconds

    Code:
    // Tank
    /hotbar copy JOB # share 9
    /hotbar display 9 on
    /hotbar display 10 off <wait.15>
    /hotbar display 9 off
    
    //  Rangers
    /hotbar copy JOB # share 10
    /hotbar display 9 off
    /hotbar display 10 on <wait.15>
    /hotbar display 10 off
    I might also add the waits with display off into your job buttons to refresh the timer, so if you pick DRK but you meant PLD, it doesn't close on you as you're about to click PLD.
    (0)
    Last edited by Rongway; 07-29-2021 at 01:44 PM.
    Error 3102 Club, Order of the 52nd Hour

  9. #9
    Player
    Almagnus1's Avatar
    Join Date
    Mar 2015
    Location
    Ul'Dah
    Posts
    941
    Character
    Maley Oakensage
    World
    Behemoth
    Main Class
    White Mage Lv 90
    Is there a way to do that without the wait timer?

    I can see myself getting bit by that potentially, and really don't want to have to deal with waiting out the timer if I happen to get indecisive.

    Also, is there any way to populate the hotbar shared 9 (or 10) without doing a bar copy?
    (0)

  10. #10
    Player
    Rongway's Avatar
    Join Date
    Aug 2013
    Posts
    4,141
    Character
    Cyrillo Rongway
    World
    Hyperion
    Main Class
    Black Mage Lv 100
    Quote Originally Posted by Almagnus1 View Post
    Is there a way to do that without the wait timer?

    I can see myself getting bit by that potentially, and really don't want to have to deal with waiting out the timer if I happen to get indecisive.
    Only insofar as you're willing to press an extra button if you change your mind about which role you want, as in
    Code:
    //  Tank
    /hotbar copy JOB # share 9
    /hotbar display 9                        // toggle bar 9 display
    /hotbar display 10 off
    
    //  Healer
    /hotbar copy JOB # share 9
    /hotbar display 9
    /hotbar display 10 off
    Which would let you open the tank job bar and close it again with the tank role button. Downside, if you press the tank role button to open the tank bar, but decide you want to play healer instead, you have to press tank again then healer; or press healer twice. This sounds to me less convenient than just letting the timer close the bar after a few seconds.


    Edit: Or you could put the timer on just the job macros. That way you have a few seconds to change your mind before the bar closes but it won't close automatically until after you've selected a job.



    Also, is there any way to populate the hotbar shared 9 (or 10) without doing a bar copy?
    You can build a hotbar one action or item at a time using the /hotbar command but it doesn't allow gearsets or macros to be placed individually. So your only choices for what you want to do are using /hotbar copy to copy a whole bar or using /hotbar share to hide or unhide a bar hidden by Sharing settings.



    Sorry for frequent edits. The macro system is intentionally limited to prevent us from automating combat; and sometimes making it do fancy things (even things that are not frowned upon) takes a lot of workarounds, not all of which are immediately apparent.
    (0)
    Last edited by Rongway; 07-29-2021 at 02:22 PM.
    Error 3102 Club, Order of the 52nd Hour

Page 1 of 2 1 2 LastLast