EQ2Interface.com
Search Downloads


Go Back   EQ2Interface > Developer Discussion > UI Developer Discussion

Reply
Thread Tools Search this Thread Display Modes
  #1  
Unread 07-03-2005, 07:54 PM
dischordio dischordio is offline
A Young Mystail Rat
 
Join Date: Apr 2005
Server: Antonia Bayle
Posts: 5
Default expanded info on macros

I was going around replying to various threads, when I realized it would be simpler to just make one post that answered several macro related questions. I'll try to avoid any redundancy of well know tecniques. ie. the in-game macro system is well documented by SOE, and the ' ; ' trick to chain commands is common knowledge. However, I look at in-game macros as being 1 part of a three part macroing system, which, when used together, can be very powerful.

The first part is of course in-game macros. Not going to beat that dead horse.


The second part is Aliases. I'm just going to crosspost what I posted on the sony boards:
Quote:
For those of you who played SWG, no further explaination is needed- its implemented in the same way as that game, so enjoy.

For the rest: An alias allows you to create 'custom' game commands. They function essential like in-game macros, with the difference being that rather than binding them to a hot key, you activate them by using the custom command you set them to.


The syntax:
/alias [new command name]:[existing command]
so, for example,
/alias ?:sit
creates a new command: /? which, when executed, causes you to sit.
Ok, no big deal, right? well, you can chain commands using the space-semicolon-space syntax you should already be familiar with. So, lets create an actual useful alias.
/alias !:yell ; toggleautoattack ; doability Sprint
Now, without taking up a valuable hotkey spot, you've created a new command /! which, when used, does the following: breaks an encounter, stops autoattack (I have to put this in because I leave autoface on- I can't tell you how many times I've died because I was trying to run away from a mob, but kept getting turned around to run back to the mob because I failed to stop attacking after I broke the encounter) and starts sprinting. Pretty handy.

Or heres another: your a priest. You can summon food water. But if your like me, you don't keep that spell on any hotbar thats handy- if sombody asks for summoned food/drink, I have to open my book, change pages to my spells, and then click the spell. screw that.
/alias food:doability Summon Food and Water

bada bing. next time sombody asks for food- I just target them and type /food. How cool is that?
One (major) caveate: aliases are not saved- so they have to be recreated every session (they do persist if you change characters- they only get lost if you actualy close the client completely). .

Part three is file commands. I touched on this in another thread, but heres the jist of it: the syntax: /do_file_commands [path to file]

create a new file. On each line, put a seperate command, just as you would in game, with 1 exception: do NOT put a '/' at the begining of the command. So "/gu hello" becomes simply "gu hello". You may use up to 16 commands per file. Save it- file format nor location matters, so long as you can remember them. For simplicity, I save them as *.txt files, and drop them directly in my root folder (so, for example, the path would be C:/test.txt). You can now execute them right away from in game using the afore mentioned command (/do_file_commands C:/test.txt).

Now, lets make things a little more complex. I mentioned in the aliases part that aliases dont persist across sessions. But we can circumvent this by loading them from a file. We can assign that one file to a hot key in game, use aliases to adress other files. OK, so:

1: in-game, create a macro. 1 liner: /do_file_commands c:/aliases.txt
2: now we need to create that file. Open a new file in your text editor, and each line create an alias, up to a max of 16. Each alias will, in turn, execute a file where the meat of our marcos will reside. So, for example:
alias <:do_file_commands c:/one.txt
alias >:do_file_commands c:/two.txt
alias ?:do_file_commands c:/three.txt
alias z:do_file_commands c:/four.txt
alias x:do_file_commands c:/five.txt

etc etc. Save it as c:/aliases.txt.

3: for each of the aliases you set up, create a file (again, max of 16 commands) with the actual macro you want to run. I'll post more on getting the most out of using '/' commands (as opposed to mouse clicking, which I personaly hate). But, for the sake of discussion, lets make a little harvest macro:
target_nearest_NPC
useablility Foresting
useability Gathering
useability Mining
useability Trapping
useability Fishing
useability Collecting

save the file as c:/one.txt
This counts as one of your 16 avalible macros. If 16 isnt enough, go back to step one, and repeat using a seperate set of files.
4: Now, based on the above example, you could hit your hotkey you've linked to the in-game macro (the one that executes /do_file_commands c:/aliases.txt) when you first log on (only has to be done once- you can switch characters without having to reload aliases), and then all you have to do is get next to a node and hit /< to harvest it (all incorrect commands will fail until it gets to one it can do).
Be creative. command files can be loaded from eachother, but the 16 commands limit still holds true. So 15 commands, followed by a 16th that loads another set won't allow you to execute 32 commands in a row (but can you think of 32 commands, without any pauses, you would want or be able to load anyhow?) Also, save yourself the headache of trying to create a recursive loop- it will instantly lock up the client. So creating 2 files, the first that does somthing and then loads the second file, which does somthing else and then loads the first file, will simply force you to do a hard reset to your computer.

In case its not obvious: links, etc. can be used in command files. I've noticed an issue with copying from the command line and pasting out of game (might just be my system, however), but you can always use your log to obtain item links. link the item you want to reference to a channel in game while you have your log on (/log). Then open the log, find the link, and copy/paste everything from \a...to \/a, inclusive in your command file- ie.

1 WTS \a 123456 Sword of Uberness:Sword of Uberness \/a 2pp PST

another side note: I explained in the aliases section that you could use semicolons to chain commands onto a single line- while this can still be done, it considers a semicolon the same way it does a linebreak. The only thing this affects is the fact that you can't create multi command aliases from a file. Thats why we're doing the extra step of having the alias execute the file, rather than executing the commands directly- unless your alias is only going to be one line long anyhow, in which you can skip the do_file and just link the alias directly to the command.

Yes, thats probably a bit confusing, I know I tend to jump around alot, but hopefuly you get the general ideas.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 10:13 AM.


Our Network
EQInterface | EQ2Interface | WoWInterface | LoTROInterface | ESOUI | MMOUI