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.
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
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.
Windows XP/Windows Server 2003
Windows XP x64
Visual Studio Express Edition ISO (Free, CD format)
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 SWGEmu.com 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.
Go to run on your start menu
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:
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 swgemu_client.zip 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 "http://opensvn.csie.org/SWGEmuPub/" 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
This command will return item numbers for the item you search for.
Will return a list of all the robes in the game.
This command will give you an item, depending on the number used.
Would give the user a Rank 3 Light Jedi Robe.
This command will set your "type". Values range from 0 to 30.
Would make you appear as an NPC with a yellow name. Other types would include being TEFed etc.
This command will set your faction to what you have chosen.
This command will set your title to what you have chosen.
Would change you title to "Dark Jedi Overlord"
This command will change the first
name of your character.
8: Error FAQ and Tips
(thanks to Ultyma):
If you have SWG Explorer, open up the
patch_12_00.tre. And extra ui_skill.inc from /ui to /ui in
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 127.0.0.1 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.
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.