Sytner's complete guide to compiling, setting up and running SWGEmu :

Greetings, this guide is designed for anyone trying to compile and set up SWGEmu, I've included the smallest of details so this guide can be used by anyone.

Please drop me a PM on the SWGEmu forums if you spot any gaps or errors in this guide.

If you have any problems during this guide, try referring to the FAQ section at the bottom of the page.


1) Preparation

2) Installation of software

3) Preparing to compile

4) Setting up MySQL

5) Setting up your server

6) Launching Star Wars Galaxies

7) In game commands

8) Error FAQ and Tips

1: Preparation

A large number of downloads follow, these are all required to sucessfully compile and run the server so be patient. I also recommend saving them all to a single folder to make life easier:

Ok, first off download (and install while your at it) WinRar.

Tortoise SVN

Windows XP/Windows Server 2003

Windows XP x64

Visual Studio Express Edition ISO (Free, CD format)

Daemon Tools

Windows XP/Windows Server 2003 (I recommend finding an older 3.xx version for 2003, I had some issues with the latest ones)

Windows XP x64

Windows XP and Windows Server 2003 (Pick a mirror - they are all the same file)

Windows XP x64 (Pick a mirror - they are all the same file)

Windows Server 2003 x64

Microsoft Windows Platform SDK

Too many different versions for me to give direct links to so go here and pick one that suits you:

SWGEmu client files

SWG Standard client files (You need to re-activate your subscription or download from the SOE patch site to get these. Please only do so if you own a legal copy of SWG:AED)

Sonys patches can be found on their website here:

You need to also get the .dll and other files, there are links to these all over support section.

Optional extra (SWG .tre editors)

2: Installation of software

First you need to install daemon tools, this will allow you to use the image of Visual Studio that you have just downloaded. After installing daemon you need to restart so the program can load upon your next startup.

Once you've restarted you'll notice a new icon in your system tray, rightclick and select "virtual CD/DVD ROM" then choose number of drives and pick 1. This will make a "fake" CD/DVD drive on your system.

Once Daemon has set up the new drive, you need to mount the Visual Studio image by selecting: Device 0>Mount image. Choose "vc.iso" from your download location.

You have now successfully mounted the Visual Studio image. If you are not using Windows XP SP2, then follow the below instructions to work around installing Visual Studio, if you have updated to Service Pack 2 then you may ignore the next steps.

1) Go to run on your start menu
2) Type in "regedit"
3) Hit enter
4) Then "Current Control Set", then "Control" and finally "Windows".
5) Right click in this location, select New>DWORD
6) Call it CSDVersion
7) Double click it once you have named it and put in "512" as the value


Make a shortcut to setup.exe

For the target add on "/no_bsln_check"

Ok, now proceed to install Visual Studio by executing setup.exe (or use the shortcut if you need to take the above steps)

Then Tortoise SVN. If in doubt about what specifically to install, then choosing the complete option where applicable is recommended. If any issue should arise then it would be best to visit the authors website for support

Last on the install list is MySQL, the install process is again simple, be sure to install the developer tools and set the install path to C:\MySQL (by selecting "change" in the custom install window), or you will be unable to compile the server:

Set the path by hitting "change".

After this install process you will be prompted to set up your MySQL server. If you don't know what your doing choose:

1) Standard configuration

2) Install As Windows Server

3) Enter a password and remember it

4) Hit execute

You should now have all the tools required to start compiling:

  • Visual C++ 2005 (Express or other)

  • Windows Platform SDK

  • MySQL

  • Tortoise SVN

  • WinRar

Finally we need to prepare your SWG Client directory.

After having downloaded or organised all the correct client files listed above. Use WinRar to open up the you downloaded earlier. Drag and drop the files into your main SWG client folder.

3: Preparing to compile

Ok, firstly we need to create a folder for the SWGEmu source code to be placed in. Open up explorer in C:\ (Start>Run>"explorer C:") and create a folder called SWGEmu (Right Click>New>Folder).

Right click this folder, the option "SVN Checkout" will appear if you have successfully installed tortoise SVN, select it.

In "URL of repository" enter "" and hit "OK". This will update your SWGEmu folder with the latest version of the source code.

Once the update has completed, enter the SWGEmu folder, then the Win32 folder. Double click "swgemu-vc8.sln" to open up the SWGEmu source code in the Visual Studio Environment.

Now navigate through: Tools>Options>Projects and Solutions>VC++ Directories.

At the top, change the "Show directories for:" to "Include files".

Click the folder icon to create a new entry, and enter "C:\MySQL\include". This tells VC++ to look for header files etc. in this directory.

Now change the "Show directories for:" to library files and add "C:\MySQL\lib\opt".

Finally go to run, copy and paste in "explorer C:\MySQL\lib\opt" and hit enter. Right click the "libmysql.dll" file and select copy (or press ctrl+c). Now go to run again and copy and paste in "explorer C:\Windows\System" and hit enter. Paste the file you have just copied in this location.

You should now be able to successfully compile the source code! Navigate "Build>Rebuild solution" (or hit ctrl+alt+f7) and wait a minute or so. You will probably see a couple of warnings, don't worry about this, so long as there are no errors everything will be ok.

4: Setting up MySQL

There are a few ways this can be achieved, I'm going to use the quickest method, if you wish to learn more about the other ways I suggest you download a GUI interface for MySQL such as navicat later on.

Now this is set up you are ready to make the database live.

Go to Start>Program files>MySQL>MySQL Server>MySQL Command Line Client. You will be prompted to enter the password you chose earlier.

Now enter (without the speechmarks) "# mysql -p root -u swgemu" and press enter. It will appear nothing has happened but don't worry.

On the next line enter "source C:\SWGEmu\MySQL\swgemu.sql" and press enter. If you did this correctly you should get a load of fly text going down the screen, that will look something like this:

If you don't see this, then you have gone wrong somewhere. Try again from the start.

5: Setting up your server

Nearly there! Ok you need to open up "C:\SWGEmu\debug\swgemu.conf" in notepad. Change the value of DBPass to whatever password you picked in the MySQL setup process. Save and exit.

Newer revisions of SWGEmu will have more options here, such as MOTD etc. These are pretty self explanatory, if you don't know what they mean then the chances are you don't need to touch them!

With a small amount of luck - you should now be able to launch your server. Go to run, put in "C:\SWGEmu\debug\swgemu.exe" and hit enter. If it loads correctly it should look something along the lines of this:

6: Launching SWG

The last step, open up your SWG client directory. Find the SWGEmu.exe you copied over earlier, rightclick it, and hit "Create shortcut".

Now rightclick the shortcut and go into properties, then the shortcut tab. In the target box, you need to add on:

 -- -s Station  subscriptionFeatures=1 gameFeatures=255

In order to launch the client successfully without Sony's Launchpad software.

Now double click the shortcut, SWG should execute without any errors. You will be prompted with a login screen, use the Username and Password you entered in the swgemu.sql file. If you chose not to change this, it will be account1 and password1.

Then select your character and enter the game. That's it! You should now be "playing" SWG on the SWGEmu server.

7: In game commands

(Taken partlyfrom Anzels post on the SWGEmu forums)

Below you will find a list of commands and their uses:

PLEASE NOTE: The @ commands are no longer case sensative

@findItem <string>

This command will return item numbers for the item you search for.


@findItem robe

Will return a list of all the robes in the game.

@giveItem <int>

This command will give you an item, depending on the number used.


@giveItem 989

Would give the user a Rank 3 Light Jedi Robe.

@setType <int>

This command will set your "type". Values range from 0 to 30.


@setType 1

Would make you appear as an NPC with a yellow name. Other types would include being TEFed etc.

@setFaction <string>

This command will set your faction to what you have chosen.


@setFaction imp

@myTitle <string>

This command will set your title to what you have chosen.


@myTitle force_rank_dark_master

Would change you title to "Dark Jedi Overlord"

@setFirstName <string>

This command will change the first name of your character.


@setFirstName Darth

@setLastName <string>

This command will change the last name of your character.


@setLastName Anzel

@setHeight <float>

This command will change the scale or height our your character. We have modified the database to include a scale column in the characters table so we can keep track of what characters are of what height. This value is set to 1.0 by default but can be changed with the @myScale command.


@setHeight 0.5
@setHeight 1.0
@setHeight 1.5
@setHeight 2.0

Using a value of 0.5 will make your character smaller than the vet reward toys while using a value of 2.0 will make your larger than the largest character in SWG. Beware that values too big or too small will yield unwanted or unexpected results.

@warp <x> <y>
This command will relocate or 'warp' your character to the specified coordinates on the current map.


@warp 2342 -3342
@warp -344 -2342

Please make sure to have a good idea of WHERE you are warping! You don't want to end up off the edge of the map and you certainly don't want to warp into the side of a building, etc. Also, the client will auto-magically (eventually) adjust your z axis should you be too high above or too far below the terrain.

@shuttle <destination>
This command will change your current location within the galaxy to a pre-defined destination such as theed or kaadara. If your destination is on the current planet you will simply 'warp'. Otherwise you will shuttle there.


@shuttle theed_starport
@shuttle bestine_starport

Special Thanks to Shaitan and Cyberdyn for adding destinations...

@setSpecies <int>
This command will change the current species of your character.


@setSpecies 0

Special Thanks to Jothac for Testing the Values Below

0 - Human Male
1 - Trandshodian Male
2 - Twilck Male
3 - Bothan Male
4 - Zabrack Male
5 - Rodian Male
6 - Mon Calamari Male
7 - Wookie Male
8 - Sullustan Male
9 - Ithorian Male
10 - Human Female
11 - Transhodian Female
12 - Twilck Female
13 - Bothan Female
14 - Zabrack Female
15 - Rodian Female
16 - Mon cal Female
17 - Wookiee Female
18 - Sullistan Female
19 - Ithorian Female

@map <mapID>
Check SQL file(Table Planets) for mapID

These commands are currently under development and may or may not be in the public release of the code. Once they are tested and verified by the dev team they will be pushed out to svn. Also, please be aware that entering invalid parameters my result in unexpected or unwanted behaviour such as crashing the client or even the server.

8: Error FAQ and Tips

NOTE (thanks to Ultyma):
If you are having problems getting the skill/emote/mood list to show up, its because its an error
between publish 12.1 and publish 13.

If you have SWG Explorer, open up the patch_12_00.tre. And extra from /ui to /ui in your
StarWarsGalaxies directory.

That SHOULD fix the skills/emotes not showing up in the command browser.

Tip: Playing on someone elses server

In your SWG client folder open up swgemu_login.cfg in notepad, and change the loginServerAddress0 IP address to the server address that you would like to play on. (change it back to for local play).

Hosting a server for others to join (thanks to JagerPanzer on the SWGEmu forums)

If you cant follow/understand these steps - I don't recommend trying.

Step-by-step guide:

1. Make sure ports 44463, 44462, and 44453 are open.
1.A. Start>Control Panel>Network Connections>Properties>Advanced>Add>(each port; name 'em whatever you like...just open the ports). If you have a router, deal with it accordingly.
2. Download the latest revision.
3. Modify debug>conf>config.conf to reflect the server's IP. (this is your external IP address - to find out if you don't know how otherwise)
4. Modify conf>config.conf to reflect the server's IP.
4. Compile.
5. Create accounts and characters for subsequent users (may not be necessary for current/future revisions).

Compile errors

Any errors referring to winsock2.h cannot be found or similar can be solved by installing the Platform SDK (see downloads section.

If these errors persist try re-installing the SDK and then getting help from Microsoft's website.