Jump to content

Introducing... Text Macros!


BlackSpectre

Recommended Posts

A while back I ran across a post were someone mentioned that the slash command MACROSLOT allowed them to create macros that created other macros. I haven't had a use for that personally, but it stuck in my head anyway. I wondered, if a macro could create another macro, then maybe there is a way for a macro to replace itself?! Guess what? I did it. Introducing... Text Macros! 

 

Text Macros are macros that replace themselves with a different macro when you click them. These macros can toggle back and forth between 2 macros or cycle through many different macros using the same button in the same power tray slot. This technique utilizes a previous discovery of mine that laid out how to store and load multiple macros from a text file. Similar to text binds, Text Macros use text files to load different commands onto a button in the same power tray slot. This allows us to click on a single button multiple times and have it do a different thing on each click. You can even change the name of the macro button when clicked. Simply put, it brings the versatility of text binds to macro buttons.  

 

There are many, many uses for Text Macros. In the example below, I use a Text Macro to make a single button change my costume and activate Fly on the first click, and then on the second click change my costume back and turn off Fly. 

 

The basic syntax and commands used to accomplish this are:

$$MACROSLOT <macro-slot#> "<macro name>" "<command(s)>$$BINDLOADFILE <file path><text file name>"

 

If you haven't used the MACROSLOT command before, the macro-slot # is determined by counting in sequence from 0 starting on slot 1 of power tray 1, to 89 for slot 10 of power tray 9. For example, slot 10 of tray 1 is macro-slot # 9, slot 1 of tray 2 is macro-slot # 10, and slot 1 of tray 3 is macro-slot # 20.

 

STEP #1 - CREATE YOUR TEXT FILES

STEP #2 - CREATE THE MACRO USING THE COMMANDS FOUND IN THE FIRST TEXT FILE

 

 

STEP #1

The following example lists the file name and then the commands found within that text file.

 

mFlyCC0.txt

$$macroslot 20 "FlyON" "cc 1$$Powexec_Toggle_On Fly$$Bind_Load_File /binds/mFlyCC1.txt"

 

mFlyCC1.txt

$$macroslot 20 "FlyOFF" "cc 0$$Powexec_Toggle_Off Fly$$Bind_Load_File /binds/mFlyCC0.txt"

 

 

 

STEP #2

In game, type the commands inside the first text file into the chat box with a slash "/" at the beginning. Then press the Enter key to create the macro button.

/$$macroslot 20 "FlyON" "cc 1$$Powexec_Toggle_On Fly$$Bind_Load_File /binds/mFlyCC1.txt"

 

 

Done! You should now have a macro button named FlyON in slot 1 of power tray 3. Click it to change to costume 1 and turn on Fly. Click it again to change to costume 0 and turn off Fly. 

 

CAUTION: The MACROSLOT command will replace any power icon that is already in the designated macro-slot #. Make sure the power tray slot is empty before you create your Text Macro. This command will destroy any macro that you have in that macro-slot #. However, for powers it only deletes the power icon... not the actual power. You can always drag another power icon from the powers window and place it in a different power tray slot.

 

Edited by BlackSpectre
simplified the syntax by removing the first macro command so that the string now begins with $$
  • Like 1
  • Thumbs Up 2
Link to comment
Share on other sites

  • BlackSpectre changed the title to Introducing... Text Macros!
  • 4 weeks later
  • 3 weeks later
On 5/15/2022 at 5:21 PM, Dombloo said:

Interesting implementation! One thing, do you know if there's a way to both give a macro an image and put it in a specific slot when using this type of implementation? 

Huh. I guess not. I had read that the Macroslot and Macro_image commands could be used together, but I never tested it. Both commands appear to be used to create macros rather than be used as arguments, and I guess are not meant to be used together.  I did test out many different ways of ordering the two commands and their arguments, but wasn't able to figure out how to use them together for the same macro. Bummer. I had in my mind some cool text macros that would have been neat if the icons could have changed. 😞

 

I'll edit my post above and delete the Macro_image info.

  • Like 1
Link to comment
Share on other sites

As I started to say in a prior thread— I greatly admire the innovative thought and effort here, as I do for all posts that add technical knowledge and techniques to the game and gameplay. But I can't see much here that isn't just a slight variation on the 'rolling bind' techniques that have been used since the game's earliest days. I think there's a little too much effort forcing this into a "macros for macros' sake" model when it actually uses rolling (serially loaded) bindfiles to execute the macro changes.

 

My preference and approach has always been binds, activated by keys, and I regard macros as a somewhat less efficient and more limited option for powers control. But I know many players prefer clicks to keys, and I've tried to include general macro info as an alternative in the Guide.

 

So my suggestion here is this: rather than trying too hard to make this process work as "macros only," when it's already using bind files as a key element, take the gist of the idea—macro activation rather than keys—and combine it with the much more flexible rolling-bind techniques to get the best of both worlds. That is, take all the great stuff that can be done with binds and serially-loaded bind definitions, but hook it to a single macro for activation and changing functions, instead of a key. That would allow so much more flexibility, including the ability to define/redefine the macro icon with each change—which is something I've never explored. One of the problems with rolling binds is that you don't always know what phase the command series is in; if the macro icon is changed as an indicator, that problem is solved.

 

Very much... carry on!

UPDATED: v4.15 Technical Guide (post 27p7)... 154 pages of comprehensive and validated info on on the nuts and bolts!
ALSO:  GABS Bindfile  ·  WindowScaler  ·  Teleport Guide  ·  and City of Zeroes  all at  www.Shenanigunner.com

 
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...