Wikia

SWG Wiki

Crafting macros

Talk0
9,574pages on
this wiki

A good set of crafting macros can make creating a set of identical items much less tedious. This is wonderful for grinding XP or for making lots of a component that requires no experimentation.

What follows is the commonly reproduced macro and a variation on it. Another variation on the same basic macro can be found in the general artical on macros.

Basic Grinding MacroEdit

This is from How to macro craft without "/selectDraftSchematic".

the Grind Craft MacroEdit

This macro has a section for each crafting tool you will use and assumes you have your crafting tools in slots 1, 2, ... N. You need to have a section beginning "/ui action toolbarSlot0x" for each crafting station (x is the slot number - 1, so 00 for slot 1). Most people recommend at least three tools as a low level artisan and up to eight tools for a high level crafter.

You need to create the following macro (called grindCraft in this example).

/ui action toolbarSlot00;          <-- Selects your crafting tool in the F1 slot 
/pause 1;                          <-- Wait for it to load (increase this based on lag) 
/ui action defaultButton;          <-- Automatically press the "Next" button 
/pause 10;                          <-- Wait for you to load the resources (increase this based on # of resources) 
/nextcraftingstage;                <-- Finish the item and close the tool 
/nextcraftingstage; 
/nextcraftingstage;                <-- This third stage is only needed when standing near a crafting station.  
/createprototype practice noitem; 
/createprototype practice noitem; 
/pause 1;                          <-- Pause just a second before continuing
/ui action toolbarSlot01;          <-- Select your crafting tool in the F2 slot 
/pause 1; 
/ui action defaultButton; 
.....                              <-- Use as many iterations as you have tools

The last line of the macro should be

/macro grindCraft;

this puts the macro in a loop and it will continue until you use the /dump command to end it.

using the macroEdit

To use the macro, you open your crafting tool and select the schematic for the item you wish to make and exit without making it. You then run the following macro as "/macro grindCraft". It will open the first crafting tool, wait 10 seconds at the Item Assembly Screen for you to load the resources (the "/pause 10"), and then complete the practice crafting session.

non-practice versionEdit

If you want to actually produce the items, replace the lines

/createprototype practice noitem;
/createprototype practice noitem;

with

/createprototype;
/createprototype;

Alias VariationEdit

You can use aliases to make this macro a bit easier to manage. Instead of having to adjust pauses in each section of the macro, each pause only appears once.

nextToolEdit

This alias and it's series of macros automatically selects the next crafting tool to use and cycles through them. You create the initial alias as:

/alias nextTool /macro useTool1

You then create a series of macros, one for each tool (in this example 4 tools in slots 1 through 4 of tool bar 3:

/macro useTool1

/ui action toolbarPane02;          <-- switch to crafting toolbar
/ui action toolbarSlot00;          <-- open the tool
/alias nextTool /macro useTool2;   <-- prepare for the next tool in cycle

/macro useTool2

/ui action toolbarPane02;
/ui action toolbarSlot01;
/alias nextTool /macro useTool3;

/macro useTool3

/ui action toolbarPane02;
/ui action toolbarSlot02;
/alias nextTool /macro useTool4;

/macro useTool4

/ui action toolbarPane02;
/ui action toolbarSlot03;
/alias nextTool /macro useTool1;

practice Edit

This alias replaces the basic macro. It is basicly the same, but uses the nextTool alias to avoid repeating all the lines for each tool.

/alias practice /macro doGrindCraft

/macro doGrindCraft

/nextTool;                         <-- Selects the next crafting tool in the cycle
/pause 1;                          <-- Wait for it to load (increase this based on lag)
/ui action defaultButton;          <-- Automatically press the "Next" button
/pause 10;                          <-- Wait for you to load the resources (increase this based on # of resources)
/nextcraftingstage;                <-- Finish the item and close the tool
/nextcraftingstage;
/nextcraftingstage;
/createprototype practice noitem;
/createprototype practice noitem;
/pause 1;                          <-- Pause just a second before continuing
/doGrind;

Modular MacroEdit

Please note that all Crafting Macro's require the use of a Crafting Station or possibly Crafting Droid. The Crafting Macro provided below is for the most part identical to the Macro's provided above. A key notable difference is that mine is more module based, similar to Object Oriented programming. The macro consists of two parts, the Crafting Macro, and a Tool selection Macro. It is the tool selection Macro which separates mine from some others.

So let us see the Macro's:

(Requires the Creation of a Single product to be made prior to Running)

Work MacroEdit

Work Macro: (named: GrindCraft_01)

/pause 1;
/ui action defaultButton;  
/pause 4;
/nextCraftingStage;
/nextCraftingStage;
/nextCraftingStage;
/pause 1;               <--possibly not needed but I keep it to allow for lag
/createprototype;       <--practice noitem; can be added for grinding levels
/createprototype;       <--practice noitem; can be added for grinding levels

Tool MacroEdit

Tool Macro (named: Tool_01)

/ui action toobarSlot00;    <--Tool Selection
/macro GrindCraft_01;       <--Work Macro called
/pause 7;                   <--delay to allow Work Macro to complete
/macro Tool_02;             <--call 2nd Tool Macro to operate and use 2nd Tool.


Simply increment the Slot## and create additional Tool_## macro's based upon the number of tools used. The last Tool Macro *must* call the first Macro otherwise the loop ends with the last tool.

Ex. (named: Tool_04) <--4 tools being used

/ui action toolbarSlot03;
/macro GrindCraft_01;
/pause 7;
/macro Tool_01;

The main benefit of a modular Macro such as this one is that you can create numerous Work Macro's for the various tasks you need that require a lot of repetition. Then to use the new Work Macro's you simple edit the Work Macro name and the Delay in each Tool Macro. Now you don't need to type 4 separate copies of what can be lengthy code.

The Ultimate Crafting MacroEdit

Part IEdit

Using the Macro

Step 1: Preparation

1) Place 5 crafting tools in the first 5 slots of your toolbar. CrafterToolbar

2) Open your Game Options. Options1

3) Under the "Controls" section, turn ON the one that says "Actions can be fired from toolbar." Options2

4) If you have not done so already, you will need to enable Cut/Copy/Paste within the game. There is an excellent guide on how to do it here: http://forums.station.sony.com/swg/posts/list.m?start=0&topic_id=286050#3220810 (Updated link for new SWG forums)

Step 2: The Macro

1) Open the Command Browser Options1

2) Select the "Macro" tab and create a "New Macro." Commands2

3) Enter the information about your new macro. A) The name of your macro. For this example call it: MegaCraft B) Pick an icon. Any icon is fine. C) Paste the macro listed in the next step into this area. Commands3

4) Paste this macro into the box ("C") and click OK when you're done:

/ui action toolbarSlot00; /pause 1; /ui action defaultButton; /pause 5; /nextCraftingStage; /nextCraftingStage; /nextCraftingStage; /nextCraftingStage; /createPrototype Practice noitem; /createPrototype Practice noitem; /pause 1; /ui action toolbarSlot01; /pause 1; /ui action defaultButton; /pause 5; /nextCraftingStage; /nextCraftingStage; /nextCraftingStage; /nextCraftingStage; /createPrototype Practice noitem; /createPrototype Practice noitem; /pause 1; /ui action toolbarSlot02; /pause 1; /ui action defaultButton; /pause 5; /nextCraftingStage; /nextCraftingStage; /nextCraftingStage; /nextCraftingStage; /createPrototype Practice noitem; /createPrototype Practice noitem; /pause 1; /ui action toolbarSlot03; /pause 1; /ui action defaultButton; /pause 5; /nextCraftingStage; /nextCraftingStage; /nextCraftingStage; /nextCraftingStage; /createPrototype Practice noitem; /createPrototype Practice noitem; /pause 1; /ui action toolbarSlot04; /pause 1; /ui action defaultButton; /pause 5; /nextCraftingStage; /nextCraftingStage; /nextCraftingStage; /nextCraftingStage; /createPrototype Practice noitem; /createPrototype Practice noitem; /pause 1; /macro MegaCraft;

Step 3: Prepare the crafting session.

BUG ALERT: This macro exceeds the character limit for macros. See "Part III: How to Modify the Macro" for more information.

The bug that prevented you from launching a macro before typing in the chat box was hotfixed on 12 Sep 06. It is no longer necessary to type something before starting the macro.

Before you begin, it is necessary to "prime" your crafting tool so the macro will function. If you don't do this, the macro will not work.

1) Launch a crafting tool (it doesn't matter which) by clicking it's icon in the toolbar. CrafterToolbar

2) Select the item you want to grind with from the list and then click "Next." In this example, we will be doing Chemical Survey Devices. Crafting1

3) At this point it is not necessary to actually create an item. Do not add resources, simply click the "X" in the upper right to close the window. Crafting2

Step 4: Launch the macro. Craftertool2

1) Go back to your command browser, find the icon for the macro you created and drag it into your toolbar. I placed it in the far right slot.


2) Close any windows you may have open and activate the macro.

3) The macro will activate the first crafting tool and select the Chemical Survey Device.

4) The macro will advance to the resource input screen. YOU MUST MANUALLY PUT THE RESOURCES IN.

5) The macro will close the crafting window with a system message that says: "The crafting session has ended!"

6) You will see the timer on the first crafting tool start counting down and the macro will launch the next crafting tool.

7) The process will repeat forever.

8) Type /dump to stop the macro.

Part IIEdit

What the macro does /ui action toolbarSlot00; Launches the first crafting tool. Crafting Tool #1 /pause 1; Wait 1 second to allow for lag. /ui action defaultButton; Select the grinding item. /pause 5; Wait 5 seconds for resource input. /nextCraftingStage; /nextCraftingStage; /nextCraftingStage; /nextCraftingStage; Advance through all the other crafting screens. (You will not see it do this) /createPrototype Practice noitem; /createPrototype Practice noitem; Create an item in practice mode and close the crafting window. /pause 1; Wait 1 second before launching the next tool. /ui action toolbarSlot01; Launches the second crafting tool. Crafting Tool #2 /pause 1; Wait 1 second to allow for lag. /ui action defaultButton; Select the grinding item. /pause 5; Wait 5 seconds for resource input. /nextCraftingStage; /nextCraftingStage; /nextCraftingStage; /nextCraftingStage; Advance through all the other crafting screens. /createPrototype Practice noitem; /createPrototype Practice noitem; Create an item in practice mode and close the crafting window. /pause 1; Wait 1 second before launching the next tool. /ui action toolbarSlot02; Launches the third crafting tool. Crafting Tool #3 /pause 1; Wait 1 second to allow for lag. /ui action defaultButton; Select the grinding item. /pause 5; Wait 5 seconds for resource input. /nextCraftingStage; /nextCraftingStage; /nextCraftingStage; /nextCraftingStage; Advance through all the other crafting screens. /createPrototype Practice noitem; /createPrototype Practice noitem; Create an item in practice mode and close the crafting window. /pause 1; Wait 1 second before launching the next tool. /ui action toolbarSlot03; Launches the fourth crafting tool. Crafting Tool #4 /pause 1; Wait 1 second to allow for lag. /ui action defaultButton; Select the grinding item. /pause 5; Wait 5 seconds for resource input. /nextCraftingStage; /nextCraftingStage; /nextCraftingStage; /nextCraftingStage; Advance through all the other crafting screens. /createPrototype Practice noitem; /createPrototype Practice noitem; Create an item in practice mode and close the crafting window. /pause 1; Wait 1 second before launching the next tool. /ui action toolbarSlot04; Launches the fifth crafting tool. Crafting Tool #5 /pause 1; Wait 1 second to allow for lag. /ui action defaultButton; Select the grinding item. /pause 5; Wait 5 seconds for resource input. /nextCraftingStage; /nextCraftingStage; /nextCraftingStage; /nextCraftingStage; Advance through all the other crafting screens. /createPrototype Practice noitem; /createPrototype Practice noitem; Create an item in practice mode and close the crafting window. /pause 1; Wait 1 second before launching the next tool. /macro MegaCraft; Start the macro over from the beginning.

The name you use here must be the exact name you gave to the macro. Loop

Part IIIEdit

How to modify the macro

Want to grind a different item? You will need to prime the crafting tool again. Go back to Step 3 and select a different item. Then launch the macro again.

Lag causing your crafting tools to mis-fire? Increase the delay time on the /pause 1; lines. Each number represents a second. Try increasing to 1.5 or 2. The longer the pause, the slower you will grind, but you have to go slow enough for the client and the server to sync up. It is for this reason that you shouldn't grind in laggy areas.

Need more time to input resources? Increase the delay time on the /pause 5; lines. The larger this number, the longer the macro will wait for you to put in the resources.

Want to actually create an item instead of merely practice? This is actually useful if you're going to make a lot of something to sell but don't want to bother with a factory run. Remove the words "Practice noitem" from both lines so that they read "/createPrototype;" Note that you will not get to experiment on or give the item a custom name.

Want to use more than 5 crafting tools? Just copy paste the part of the macro that represents a full run of a single crafting tool and change the Slot #. So the next tool would be toolbarSlot05. The /macro line must be the last line of the macro so paste it in above it. Note that there is a character limit for macros and anything longer may cause issues.

Why are the last few lines of the macro missing when I log on? The macro exceeds the character limit allowed by the game. When you log in, the game will simply remove these excess characters and cause your macro to stop functioning. There are two workarounds but neither is optimal: 1) Copy/Paste the macro back into the game every time you want to use it. It will work fine until you relog. 2) Remove the "Crafting Tool #5" section. This will get you under the character limit but you may not have enough crafting tools running to allow you to grind non-stop.

Around Wikia's network

Random Wiki