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. Contents: 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. http://www.rarlab.com/rar/wrar36b7.exe Tortoise SVN Windows XP/Windows Server 2003 http://prdownloads.sourceforge.net/tortoisesvn/TortoiseSVN-1.3.5.6804-svn-1.3.2.msi?download Windows XP x64 http://prdownloads.sourceforge.net/tortoisesvn/TortoiseSVN-1.3.5.6831-x64-svn-1.3.2.msi?download Visual Studio Express Edition ISO (Free, CD format) http://go.microsoft.com/fwlink/?linkid=57034 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) http://daemon.alphabravo.org/daemon403-x86.exe Windows XP x64 http://daemon.alphabravo.org/daemon403-x64.exe Windows XP and Windows Server 2003 (Pick a mirror - they are all the same file) ftp://ftp.is.co.za/mirrors/mysql/Downloads/MySQL-5.0/mysql-5.0.22-win32.zip Windows XP x64 (Pick a mirror - they are all the same file) ftp://ftp.fu-berlin.de/unix/databases/mysql/Downloads/MySQL-5.0/mysql-noinstall-5.0.21-winx64.zip Windows Server 2003 x64 http://mysql.oss.eznetsols.org/Downloads/MySQL-5.0/mysql-5.0.21-winx64.zip 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 http://www.emukettemoor.com/swgemu_client.zip 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: http://forums.station.sony.com/swg/posts/list.m?start=15&topic_id=254140#2901905 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) http://www.yourfilehost.com/media.php?cat=other&file=InsideSWG.zip http://www.swgemu.com/swgarchiverpack.tar.gz 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 Next: 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
their uses: @findItem <string> This command will return item numbers for the item you search for. SAMPLE USES 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. SAMPLE USES Would give the user a Rank 3 Light Jedi Robe. @setType <int> This command will set your "type". Values range from 0 to 30. SAMPLE USES 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. SAMPLE USES @myTitle <string> This command will set your title to what you have chosen. SAMPLE USES Would change you title to "Dark Jedi Overlord" @setFirstName <string> This command will change the first
name of your character. 8: Error FAQ and Tips NOTE
(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
your 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. Step-by-step guide: 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. |