Jump to content

Alias Guide


eqsanctum
 Share

Recommended Posts

  • Administrators
eqsanctum

Table of Contents


Introduction

Terms

Usage

Slash Command Shortcuts

Chaining macros and recursion

Character Login

Useful commands [updated as need arises]


Introduction


When the player database is wiped – all of us will have to start over. In the interest of lessening the pain I offer the following guide on /alias commands – which will make character rebirth much easier.


Alias commands are often thought of as a form of macro commands in SWG. While this is not precisely true knowledge of macro commands is essential in understanding much of what is possible with aliases.


There are many posts on macros and lists of all the slash commands that I will not repeat that content. In the guide section there is a fairly complete introduction of macros and commands . My presumption is that you are familiar with how to create a macro and what a macro does – alias and macro commands go hand in hand – and there will be more than a few macro references in this guide.


CAUTION! Before working with macros do yourself a favor and create a simple macro that contains the /dump command and place it on your toolbar. That way if a macro gets away from you – you can “kill” it without too much trouble… otherwise you may need to log out to fix a runaway macro.


Terms


Script – For our purposes a script can be either an alias or macro.


Macro – (originally the full name was 'macro expansion') a series of commands – in SWG these are ‘slash’ commands – used in order to automate a task or tasks.


Alias – a user defined command. In their simple usage an alias is the renaming of a slash command. These are usually shorthand versions of lengthy commands or alternate names that a player remembers more easily than the existing command. Because you can rename commands in SWG it is possible to alter the name or an existing command in favor of an alias – since alias commands are not saved between play sessions - if you accidentally rename something relogging will fix the problem.


Delimiter – in computer coding and data storage a character or series of characters that indicate the beginning or end of a command or data field. In SWG commands the slash, colon, semi-colon, and space are delimiters.


Recursion – the ability of a command to call itself. For SWG purposes this is most often a chain event where the player wishes to restart the sequence (aka looping). Players can accidentally cause a cascade of macro calls which can crash or hang the game client. It is essential to have a function key dedicated to a 'dump' macro (the SWG slash command is literally /dump) to quickly abort such a macro. If you set up an alias which attempts to start too many macros (or aliases) an error message will advise you that the “recursive limit has been exceeded” and the alias or macro will be aborted. Note that an alias cannot loop - that is you cannot name the alias command at the end in order to start the alias over again. However, an alias can call a macro.


Usage


If you type /alias and nothing else the program will return a list of alias commands that are currently running. Since you have none functioning at the moment you will see "alias:" with nothing following. There are two ways to create an alias in SWG. The format is -


: ;;...


For example -


/alias hent /target ;/tenddamage;


Thus you can simply type /hent and fire off a heal at a specific entertainer – it is important to note that this is not meant to be recursive (i.e. you do not set up a loop in the alias command) you are simply providing a name to a sequence. Most people choose names that make remembering the command easier, but nothing stops you from making the command as long or longer than the command you are aliasing.


The second way to define an alias is to create a plain text file and use the /load command to 'call' it into memory. I had many alias commands and the first thing I did when I logged in was execute a macro that was nothing more than a series of /load commands for that characters aliases.


This command looks like this:


/load .txt ** where is the file name of the alias command you are loading **


This is perhaps the most valuable aspect of using alias commands - The ability to construct them outside of the game and input them into the game environment.


There is an /unalias command which removes the named alias.


How macros and alias commands are stored.


There is a /save command which stores aliases created in game. However, I never use this method and the following will explain why.


Formatting – macro and alias files are plain text (extension .txt) files. Word processing files contain all sorts of data that is not displayed (margins, alignment, bold or italics, etc.). This is why you have to convert one word processing format to another. The easiest and safest way to edit text files is to open them in notepad – which will not add any special characters when you save changes. If you wish you can use your favorite word processor – just make sure you save the file as plain text.


When you create a macro you 'name' it so that the system will recognize that as a macro command. These sets of commands are stored in a file named macros.txt in your character profile folder.


For example C:/SWGEMU/PROFILES/ZATT/macros.txt


Because macros are in the profile no matter what server you play on your macros are available. Play on a different account or on a different computer and those macros will not appear. Please note I am not speaking about policy (as in whether or not you are 'allowed' to have multiple accounts on a system) but rather how the system treats macro files. Note that the naming convention is precisely macros.txt … naming the file anything else will mean the program will not be able to find your macro file.


Alias files, however, differ in several ways. First, they are stored in the main program directory and therefore are not account specific. Second, you are not bound to a specific filename (which means you can have as many or as few alias files as you wish). Lastly, alias commands are NOT active upon logon – you MUST load them for them to function.


According to Talon alias commands do persist between session on Liberator. I have checked on Nova and aliases need to be reloaded. Since this guide is intended for use primarily during the Alpha test I will assume reloading will be required until I discover otherwise. My thanks to Talon for pointing this out.


What the alias command does is create a User Defined Command (or UDC). You are in a very real sense creating your own slash command – the limitation is that you can only use the existing commands in the game. Why would you do this? Well take exploration for example – you want to go get the POI badges for a particular planet. You know that not every POI in the planetary map tab grants a badge – and the waypoints provided are not to the badge location –


You could type in /waypoint commands – tabbing back and forth to the website or reading them off a printed list...


The command is easy enough /waypoint


Ideally you would create one text file with all these UDCs in it – but you could just as easily put each of them into their own separate file.


So open notepad and cut and paste the following into it (you can type it all if you insist) – then save that file to your SWGEMU directory. Again - plain text! I called mine POI.txt...


In game you type /load POI.txt and the system tells you “Aliases loaded from: poi.txt” ... if it doesn't you will receive the message “failed to LOAD aliases from: poi.txt”. I have assumed you know about macros – so I shouldn't have to tell you how important it is to get the syntax exact… right? If you feel the need to look at the list of POIs try http://www.swgemu.com/forums/showthread.php?t=362


Here is the text file – see below for specific instructions on how to import this:


cor-wp:/way 5175 1644 Rogue CorSec Base;/way -5418 -6248 Grand Theater of Vreni Island;/way 6760 -5617 Crystal Fountain of Bela Vistal;/way 1084 4176 Agrilat Swamp;/way -6530 5967 Rebel Hideout;


dan-wp:/way -3862 -5706 Dantari Village;/way -7156 -883 Dantari Rock Village;/way -6836 5520 Abandoned Rebel Base;/way 4195 5203 Jedi Temple Ruins;


dat-wp: /way -6304 753 Imperial Prison;/way 668 -4835 Dathomir Tarpits;/way -2101 3165 Lesser Sarlacc of Dathomir;/way -4437 574 Dathomir Abandoned Escape Pod;/way 3558 1554 Lesser Misty Falls;/way 5727 1923 Downed Ship;/way 3021 1289 Greater Misty Falls;


end-wp:/way 4596 -2423 Ewok Tree Village;/way 6051 -2477 Dulok Village;/way -650 -5076 Ewok Lake Village;/way -4628 -2273 Marauder's Stronghold;


lok-wp:/way -1814 -3086 Imperial Outpost;/way 3091 -4638 Mount Chaolt;/way 4562 -1156 Great Kinogilla Skeleton;


nab-wp:/way -4628 4207 Theed Waterfall;/way 5157 -1646 Dee'ja Peak Waterfall;/way -5828 -93 Amidala's Beach;/way -2066 -5423 Gungan Sacred Place;


ror-wp:/way -1130 4544 Imperial Hyperdrive Facility;/way -5633 -5661 Imperial Encampment;/way 3664 -6501 Rebel Outpost;/way 7371 169 Kobola Spice Mine;


tal-wp:/way 4133 962 Lost Village of Durbin;/way -2184 2405 Imperial Outpost;/way -2452 3846 Imperial vs. Rebel Battle;/way -4425 -1414 Lost Aqualish War Partys Cave;


tat-wp:/way -2579 -5500 Lars Homestead;/way -4512 -2270 Ben Kenobi's Hut;/way -6176 -3372 Great Pit of Carkoon;/way -3931 -4397 Escape Pod;/way -4632 -4346 Ancient Krayt Skull;/way 7396 4478 Krayt Graveyard;/way -3966 6267 Fort Tusken;


yav-wp:/way 5076 5537 Temple of Exar K'un;/way -875 -2047 Temple of the Blueleaf;/way 519 -646 Woolamander Palace;


Specific instructions:


1. Copy the entire section and paste it into notepad.

2. Make sure the first characters are “cor-wp:/” and the last are “Woolamander Palace;”

3. Save the file as poi.txt in your SWGEMU directory.

4. In game type /load poi.txt


What this has done is segregate all the POI waypoints into planet specific commands, which you have now loaded. So you now have 10 ‘new’ slash commands to use whenever you like. Now let’s say you are on corellia and you want the five POI waypoints. Enter /cor-wp and what you should see is:


“Executing alias cor-wp: -> ‘:/way 5175 1644 Rogue CorSec Base;/way -5418 -6248 Grand Theater of Vreni Island;/way 6760 -5617 Crystal Fountain of Bela Vistal;/way 1084 4176 Agrilat Swamp;/way -6530 5967 Rebel Hideout;’ …”


If you have your client set up to display all those newly created waypoints they will all appear on your screen – otherwise open your datapad and admire them there.


Warning! Computers do what you TELL them to do and not what you WANT them to do! In this example the waypoint command does not include the planet which means if you were to type /nab-wp you will get a lovely bunch of new waypoints on the WRONG PLANET! So, know the limitations of your commands. IF you do this despite this warning you will have to clean out those waypoints manually – which is a bit annoying.


This doesn’t have to be only POI waypoints – when recreating waypoints after a wipe you may have a favorite spot that you want to build a city – or you may wish to create a waypoint set for profession trainers.


In total there were 579 trainers pre-CU – and that is a bit much. Even removing basic trainers only drops the list to 342 – fully spelled out with city name labels that is 15000 characters.


Slash Command Shortcuts


Many commands are too long to type conveniently – or you have common commands that you use over and over in macros – I tend to shorten them with a few strategic aliases – a short example below.


Commands.txt ** I put these here for identification – do NOT include these names in your files! And do not include my comments which I precede with *

pm: /pause .1;

pt: /pause 4;

p1: /pause 1;

p2: /pause 2;

p3: /pause 3;

p4: /pause 4;

p5: /pause 5;

p6: /pause 6;

p7: /pause 7;

tfm: /nextCraftingStage;/nextCraftingStage;/nextCraftingStage;/createPrototype item;/createPrototype item;

tfp: /nextCraftingStage;/nextCraftingStage;/nextCraftingStage;/createPrototype practice notitem;/createPrototype practice notitem;

u00: /ui action toolbarSlot00;

u01: /ui action toolbarSlot01;

u02: /ui action toolbarSlot02;

u03: /ui action toolbarSlot03;

u04: /ui action toolbarSlot04;

u05: /ui action toolbarSlot05;

u06: /ui action toolbarSlot06;

u07: /ui action toolbarSlot07;

u08: /ui action toolbarSlot08;

u09: /ui action toolbarSlot09;

u10: /ui action toolbarSlot10;

u11: /ui action toolbarSlot11;

u12: /ui action toolbarSlot12;

u13: /ui action toolbarSlot13;

u14: /ui action toolbarSlot14;

u15: /ui action toolbarSlot15;

u16: /ui action toolbarSlot16;

u17: /ui action toolbarSlot17;

u18: /ui action toolbarSlot18;

u19: /ui action toolbarSlot19;

u20: /ui action toolbarSlot20;

u21: /ui action toolbarSlot21;

u22: /ui action toolbarSlot22;

u23: /ui action toolbarSlot23;

ret: /ui action defaultButton;

tz1000:/tip Zatt 1000; ** (call your commands whatever you like for your alts/mains)

tzb1000:/tip Zatt 1000 bank; *** (remember 5% surcharge)



Once I have these loaded I can use these in building any macro I wish. This is valuable to do for several reasons.


1. The “/pt” command is a shorthand for the pause that allows materials to be selected for crafting. As you craft different items that pause may need to be altered. Since many people use multiple tools and they would need to adjust 4 or 5 pause statements. If you put /pt in place of the standard pause – you can adjust ALL your tools to the new pause of 6 seconds with the command /alias pt:/pause 6;

2. Since macros are the same for all characters I need to switch between grinding on one and making walls on my architect. If you have not been an architect let me explain – a wall requires 10 structure modules, and I will often craft a few walls while waiting (e.g. shuttles). So it is repetitive and there is NO experimentation for a wall. With 6 tools I can put together a macro that reads -


Tool1

/pm;

/u16;

/p1;

/ret; ** (See below)

/p5;

/macro ToolFinish; *** (See below)

/p2;

/macro Tool2;


ToolFinish

/pm;

/tfm; ** (can be switched to /tfp)


** notice I use the /ui action defaultButton method here rather than 'selectDraftSchematic' – this means I do not need to paw through my datapad searching for schematic numbers … but it also means you have to craft the first object manually. The last crafted object will be saved – so hitting return (/defaultButton) will craft the same object again.


*** I call a finishing macro (ToolFinish) that is identical for all tools – so once again to switch from grinding to crafting all I have to do is change ONE character in ONE macro. I edit ToolFinish and change /tfm to /tfp (the full command alias is listed above in my commands.txt file).


3. Macros have a character limit in SWG. By substituting aliases it is possible to put more commands into a single macro. (SWG WIKI says a 1112 character macro exceeds that limit… need to test)


Chaining macros and recursion


Issuing a macro command is known as a ‘call.’ When a macro calls itself this is called “recursion.” Common slang refers to this as ‘looping’ which is an apt description. Often game design prevents recursion by disallowing a macro to call itself. In the above example you notice two calls are made. This first is the macro ToolFinish and the second is the macro Tool2.


Tool2 crafts with the tool in slot 17, then calls Tool3 (slot 18), then Tool4 (19), then Tool5 (20), and then Tool6 (21). Tool6 then calls Tool1 creating a loop.


Notice I use the LOWER row for tools. Over each tool I place the corresponding macro. In this way if recursion or this form of looping is prohibited I can simply remove the call to the next tool and press the ‘F’ key (F5-F10). This adds button presses – but can actually speed up craft time since automated pauses are usually longer than they need to be.


When you make a macro call remember that BOTH macros run concurrently (side-by-side). In the above example the intent is to run Tool1 then call ToolFinish and AFTER ToolFinish is complete call Tool2. This is why there is a 2 second pause after ToolFinish is called… this ensures the craft tool closes before we try to open the next one. If you forget this you can create all sorts of havoc as your macro multiplies itself until you lock up the game client.


Character Login


Alias commands are not saved between sessions - I have also noted that loading the same alias file on a second client can cause an unload of the alias commands on the first client [disconnecting and reconnecting will not kill your aliases]. It is therefore important to create a macro that you run each time you log in. I prefer to do my alias command files in sections rather than have 1 giant alias file with every command in it… This way a crafter doesn’t load combat alias commands and a fighter doesn’t bother with crafter stuff.


My macro looks something like this:


Macro ZattStartup

/load common.txt;

/load emotes.txt;

/load Zattcraft.txt;

/load trainers.txt;


And so when I log in the FIRST thing I do is run my alias loads. It is important that I do this because LOTS of my macros use alias commands and they will all error without it.


Notice I have taken things a step further with an individualized start up file – one for each of my characters. This allows me to tailor certain macros to each of my alt’s. For example take a common structure admin macro, here is a simple one that you run after targeting a harvester:


Macro NewHarv

/pay 12500; ** I ran 8 days minimum – and I used medium harvesters

/addp 9600;

/setPermission admin Risso;

/setPermission admin Jiblits;

/setPermission admin Scorpio;

/pause 5;

/stru; ** I always check to see that the command took, this takes longer but it is worth it to be certain.


I wanted to run the same macro regardless of which toon I was playing so I included in my alias set in Zattcraft.txt this line:


setAdmin: /setPermission admin Risso; /setPermission admin Jiblits; /setPermission admin Scorpio;


Now instead of running all the setpermission statements the macro NewHarv runs /setAdmin. I didn’t have hopper permissions – but you could just as easily set up an alias /setHopper.


Perhaps the MOST useful aspect of this start up is the /denyservice command. As entertainers have long lamented the /deny list does NOT save between play sessions. Well, enter the alias command to the rescue.


Now some players are worthy of a temporary denial – others you may wish to permanently ban. In this case add them to your Alias denyservicelist.txt file – then add that file to your start up macro.


For example:

Denyservicelist.txt

DsA:/deny ;/deny … et cetera

DsB:


DsZ:


This keeps things organized – but it does mean you have to run 26 aliases at start up…


In your start up macro (the one that has a series of /load commands append your 26 /DsA thru DsZ series… If you have a small list or want fewer commands you can always combine letters … perhaps /DsABCDE;/DsFGHIJ;/DsKLMNO;/DsPQRST;/DsUVWXYZ; might meet your needs. There is a limit to how long a command string can be - /alias commands entered in game must be a single line of text. The longest string I have above in the waypoint commands is 236 characters, and I know that works. My suspicion is the maximum command length will be 256 characters (including spaces). As I have said elsewhere - you can nest aliases to shorten things - so a little creativity will allow you to get your name list under control. Whether or not aliases save between sessions - we know the /denyservice list doesn't so you will have to run your /deny macro whenever you list disappears.


Useful commands


Want to get to the macro command quickly try this one:

/ui action newMacro (opens the new macro window)


A great testing feature is the /echo command which displays a message no one else sees – this way you can mark macro progress – or even give yourself reminders as a macro runs, for example:


/echo Now targeting %TT


Changing clothes –


Note: /ui action toolbarPanexx (where xx is 00 to 05) changes your toolbar pane to the one you choose.


The commands below assume that you have your armor on toolbar 6, slots F2-F6 and your clothing on toolbar 6, slots shift F2 - shift F6 (The Mabari set in this example has fewer pieces add as needed)


arm: /ui action toolbarPane05;/u01;/u02;/u03;/u04;/u05;/ui action toolbarPanexx; (combat pane)

style: /ui action toolbarPane05;/u13;/u14;/u15;/u16;/u17;/ui action toolbarPanexx; (regular pane)


typing /arm will change to toolbar pane 6; equip all the armor and change to the combat toolbar

typing /style does the same thing, equipping clothing instead then puts you on your ‘normal’ toolbar


Reusable waypoint –


fz: /findFriend Zatt -- Say Zatt is sitting on an 80% spawn, but thinks there might be a 90% over the next hill, he types /findFriend Zatt (yes, himself) and goes off to survey. Find nothing better? Go back to the first spot again. You can do this as many times as necessary without cluttering up the datapad.

Adding reminder alarms –


entalarm: /pause 3600; /echo Time is up for the 1 hour Dancer/Musician buff

docalarm2: /pause 7200; /echo Time is up for the 2 hour Doc buff


Partial commands -


Aliases are not confined to complete commands - they execute just like their slash command counterparts. For example, you have someone with a TRULY annoying name which is a PAIN to type... I recall one from years ago where the guy had xxxxxxxxx before his name. So I created /alias XTell /tell xxxxxxxxxNameIwantedThatwasUsed. Then when I wanted to talk to him I typed my short-cut like I would type any other command.


/XTell what's up?


Commands for easier travel - [edited from the work of others long ago]


There are two commands you can use to travel between ports faster:

/boardshuttle

/purchaseticket


/boardshuttle


This can be used by selecting the ticket droid or by adding in the name of the shuttle to bring up the ticket selection screen without having to use the ticket collector droid. The command has a range of 25m outside but can be used from anywhere within the Starport building. If you’ve ever seen someone vanish in front of the travel terminal, this is what they are doing.


This eliminates the need to select the droid by directly naming the shuttle you wish to board.

In both cases, this will bring up the usual ticket selection window. There are some instances where the command will work at a seemingly greater range than 25m, such as in the square outside the Theed Starport. Note: This command cannot be used while running (many people run for the transport and then click multiple times on the droid, as is takes a few seconds for the sever to recognize they have stopped running).


Another method to avoid having to target the ticket droid is to click on the ticket. This isn’t as convenient for people who hold multiple tickets in their inventory. As a crafter I never have the inventory space to do that – so this method is easy for me. For those that carry multiple tickets the following macro works:


Place the specific ticket you wish to use on your toolbar then create a macro to execute that key every 20 seconds. For example:


/ui action toolbarSlot00;

/pause 20;

/macro Useticket;



/purchaseticket


This allows you to buy a ticket for a valid route from anywhere in the Galaxy. The command is used as follows:


/purchaseticket {departure planet} {departure_Port} {destination planet} {destination_Port} (single|oneway);


With this command you must state the planet and Port you want to leave from and the planet and Port you wish to travel to, and whether or not it will be a round trip or just one way. The command is set to a round trip as default, so you must tell it if you only want one ticket by using the single or oneway optional argument.


The names used must be exactly as those shown in the travel terminal pull-down menus. The names are case sensitive and any spaces must be filled in by an underscore ‘_’. Here is a list of all the starports/spaceports/outposts capable of intergalactic travel.


corellia Tyrena_Starport

corellia Coronet_Starport

corellia Kor_Vella_Starport

corellia Doaba_Guerfel_Starport

dantooine Dantooine_Mining_Outpost

datonnine Dantooine_Agro_Outpost

dantooine Dantooine_Imperial_Outpost

dathomir Dathomir_Outpost

dathomir Science_Outpost

endor Smuggler_Outpost

endor Research_Outpost

lok Nym's_Stronghold

naboo Theed_Spaceport

naboo Keren_Starport

naboo Kaadara_Starport

naboo Moenia

rori Restuss_Starport

rori Narmle_Starport

rori Rebel_Outpost

talus Talus_Imperial_Outpost

talus Dearic_Starport

talus Nashal_Starport

tatooine Mos_Entha_Spaceport

tatooine Mos_Espa_Starport

tatooine Mos_Eisley_Starport

tatooine Bestine_Starport

yavin4 Yavin_IV_Mining_Outpost

yavin4 Yavin_IV_Labor_Outpost


The same can be done with shuttleports, however, all shuttles do not follow the same naming scheme, and of course Player City shuttles alter the list.


One way to use this command, say if you make a daily trip to the same locations would be to set up a simple macro. For example


/

/purchaseticket talus Avian_City talus Dearic_Starport single;

/purchaseticket talus Dearic_Starport corellia Coronet_Starport single;


And of course you can alias them which is why I include them here:


/alias c2t /purchaseticket corellia Coronet_Starport naboo Theed_Spaceport single

/alias t2c /purchaseticket naboo Theed_Spaceport corellia Coronet_Starport single

Link to comment
Share on other sites

 Share

×
×
  • Create New...