Macro File: How to Load Macros from a Text File


Grumble

 

Posted

To make a "macro file":

Create a text file somewhere on your computer. If you put it in the "Data" folder of your CoH installation folder, you should not need to know anything other than the file name. Using the "macroslot" command will overwrite and replace any other macro or power that is currently in that position, as opposed to using "macro" which will put the macro into the very first open slot, starting from slot one of tray one.

The text of the macro shoud be in this format:

$$macroslot # "name" "$$powexecname powername$$powexectoggleON powername"

Where "powername" is the name of the power exactly as it is displayed in the small, pop-up power window (not the enhancement screen), and # is the number of the slot where you want the macro to be; slot one (the first slot) is "0", slot ten (the last slot on the tray) is "9". So, to make a macro for an Invulnerability Tanker's armors in the last slot of the tray:

$$macroslot 9 "Tog" "$$powexecname Sprint$$powexectoggleON Invincibility$$powexectoggleON Temp Invulnerability$$powexectoggleON Unyielding$$powexectoggleON Combat Jumping"

When using powers like this, they end up being activated in the reverse order as they are listed in the macro. In this example, all powers are activated in order from right to left with each additional press of the macro, and then Sprint will be toggled on and off with each press of the macro once all powers are active.

To load the macro file, use the "bindloadfile" command in your chat window using the name you used for your file. If it is in the "Data" folder, all you need is the file name. You can create a new folder in your "Data" folder like "Keybinds"; then you need to enter the relative path from "Data", like "Keybinds\macros.txt". If you use a folder other than one inside the "Data" folder, you need to enter the full path, like "c:\Binds\Tanker\macros.txt". All of these should be entered without the quotation marks unless there are spaces in any of the folder names. (I strongly advise avoiding using spaces.)

Here are some common examples:

/bindloadfile macros.txt
/bindloadfile "c:\Binds\Tanker\macros.txt"
/bindloadfile \Keys\Macros\macros.txt

Want more macros? Just put in more lines for the macros that you want to use. Do not put blank lines anywhere in your file as that can cause problems.

To put macros in different trays, use "$$gototray #" where you want to use a different tray (the first tray is "1", the last tray is "9", just as they are labeled on-screen). Note that the "macroslot" line must come after the "gototray" command for the tray where you want the macro to be, but, other than that, the order of the lines does not matter for anything else:

$$gototray 5
$$macroslot 8 "SS" "$$powexecname Super Speed$$powexectoggleON Sprint"
$$macroslot 0 "Dan" "$$e drumdance"
$$gototray 2
$$macroslot 9 "H" "$$powexecAUTO Hasten"

Want to make it even easier to load these? Bind your preferred key using your favorite keybind file, like:

CTRL+F12 "$$bindloadfile c:\Binds\Tanker\macros.txt"



(Note: Some people use "macroslot" with numbers like "21" to put the macro in the third tray in the second slot, but that seems to use the tray that is relative to your currently active tray. So, if you currently have the first tray as the active tray, using "$$macroslot 21" will put the macro into the third tray in the second slot. If you use that same command from the second tray, it puts it into the fourth tray. Also, you do not need the quotation marks around the name of the macro unless you use spaces, but you should use them to surround the commands if you use more than one command for your macro; I include them all here for clarity.)

Keep in mind that the text that is visible on the macro might be limited (depends on your graphics settings) so using short labels is advised.



| Issue 9 Fly poses | IO's and ED
| Cycling the Combat Monitor | Load Macros from a Text File |

 

Posted

[ QUOTE ]
To load the macro file, type into your chat window the name of the file. If it is in the "Data" folder, all you need is the file name. You can create a new folder in your "Data" folder like "Keybinds"; then you need to enter the relative path from "Data", like "Keybinds\macros.txt". If you use a folder other than one inside the "Data" folder, you need to enter the full path, like "c:\Binds\Tanker\macros.txt" (all of these should be entered without the quotation marks).


[/ QUOTE ]

Don't you mean to load the file with the /bindloadfile command? Or are you saying that if a file, such as macros.txt is in the Data folder, all I have to do is type "macros.txt" and it automatically loads?


Speeding Through New DA Repeatables || Spreadsheet o' Enhancements || Zombie Skins: better skins for these forums || Guide to Guides

 

Posted

[ QUOTE ]
[ QUOTE ]
To load the macro file, type into your chat window the name of the file. If it is in the "Data" folder, all you need is the file name. You can create a new folder in your "Data" folder like "Keybinds"; then you need to enter the relative path from "Data", like "Keybinds\macros.txt". If you use a folder other than one inside the "Data" folder, you need to enter the full path, like "c:\Binds\Tanker\macros.txt" (all of these should be entered without the quotation marks).


[/ QUOTE ]

Don't you mean to load the file with the /bindloadfile command? Or are you saying that if a file, such as macros.txt is in the Data folder, all I have to do is type "macros.txt" and it automatically loads?

[/ QUOTE ]

You are completely correct. I missed that. And edited it.



| Issue 9 Fly poses | IO's and ED
| Cycling the Combat Monitor | Load Macros from a Text File |

 

Posted

I would advise against that as that would load the macros every time the keybind file was loaded, which could be problematic if you end up moving them or making new ones later and they get overwritten. Perhaps, at the most inopportune moment.

Just make a keybind to load the macro file.

Although, I do have a command to set the turn speed when loading the keybind file. And a bunch of files for loading window settings, changing the combat monitor and other things.



| Issue 9 Fly poses | IO's and ED
| Cycling the Combat Monitor | Load Macros from a Text File |

 

Posted

[ QUOTE ]
Although, I do have a command to set the turn speed when loading the keybind file. And a bunch of files for loading window settings, changing the combat monitor and other things.

[/ QUOTE ]

I would love to take a look at those file, especially the ones for changing the combat monitor