SWGEMU: How to Compile and Run A Server!





Part 1: Getting the Goods

1.) Download all of these files:

http://tortoisesvn.sourceforge.net/downloads
http://msdn.microsoft.com/vstudio/express/visualc/download/
http://www.microsoft.com/downloads/details.aspx?FamilyId=A55B6B43-E24F-4EA3-A93E-40C0EC4F68E5&displaylang=en
http://dev.mysql.com/downloads/mysql/5.0.html
http://www.navicat.com/
http://www.emukettemoor.com/swgemu_client.zip

Code:
NOTE! YOU ONLY NEED THESE IF YOU DON’T HAVE THIS IN YOUR ROOT SWG DIRECTORY!http://patch.starwarsgalaxies.com:7040/patch/swg/main/patch_00.tre
http://patch.starwarsgalaxies.com:7040/patch/swg/main/patch_01.tre
http://patch.starwarsgalaxies.com:7040/patch/swg/main/patch_02.tre
http://patch.starwarsgalaxies.com:7040/patch/swg/main/patch_03.tre
http://patch.starwarsgalaxies.com:7040/patch/swg/main/patch_04.tre
http://patch.starwarsgalaxies.com:7040/patch/swg/main/patch_05.tre
http://patch.starwarsgalaxies.com:7040/patch/swg/main/patch_06.tre
http://patch.starwarsgalaxies.com:7040/patch/swg/main/patch_07.tre
http://patch.starwarsgalaxies.com:7040/patch/swg/main/patch_08.tre
http://patch.starwarsgalaxies.com:7040/patch/swg/main/patch_09.tre
http://patch.starwarsgalaxies.com:7040/patch/swg/main/patch_10.tre
http://patch.starwarsgalaxies.com:7040/patch/swg/main/patch_11_00.tre
http://patch.starwarsgalaxies.com:7040/patch/swg/main/patch_11_01.tre
http://patch.starwarsgalaxies.com:7040/patch/swg/main/patch_11_02.tre
http://patch.starwarsgalaxies.com:7040/patch/swg/main/patch_11_03.tre
http://patch.starwarsgalaxies.com:7040/patch/swg/main/patch_12_00.tre
http://patch.starwarsgalaxies.com:7040/patch/swg/main/patch_13_00.tre

(You must have Windows SP 2 to install the SDK!)

2.) After downloading all of the files, install them in this order (RECOMMENDED):

Service Pack 2
Windows® Server 2003 Platform SDK Web Install
Tortoise SVN
VStudio 2005
MySQL We will be running this from the auto install! We will also be installing it into the C:\MySQL folder. Don’t forget when installing to choose customize, and install EVERYTHING. That way there cannot be any missing folders. This step is probably vital to not getting any errors.
Navicat

Part 2: Compiling the Core

1.) Create a new folder on your desktop. The name doesn’t matter, but I named mine SWGEmu.

2.) Right click that folder, and press SVN Checkout. When a window comes up, for the “URL of repository box”, paste in: http://opensvn.csie.org/SWGEmuPub/ Next, for revision, make sure head is selected.

3.) After the files are done downloading, run VStudio Compiler. It’s located under Start->All Programs->Visual C++ 2005 Express Edition.

4.) When it opens, go to Tools->Options->Projects and Solutions-> VC++ Directories. Open the dropdown menu under Show Directories for, and select include files.

5.) Under $(VCInstallDir)include add a new line by clicking the folder or pressing Ctrl + Insert. In that line, type C:\MySQL\include

6.) Next, select Library Files from the same dropdown menu, and for the new line, add in C:\MySQL\lib\opt

7.) Go back to the main Visual C++ screen. Go to file -> open -> project / solution.

8.) Browse to the SWGEmu root directory (The folder you Tortoise SVN-d) and then go to Win32. Open up swgemu-vc8.sln

9.) Press F7 or go to the Build menu, then build solution.

10.) If there are ANY errors, here are the solutions (Thanks ramsey and users!)

Q) fatal error LNK1104: cannot open file ‘libmysql.lib’
A) Tools -> Options -> Projects and Solutions -> VC++ Directorys
Then at the top right, click on library files
Add a path to the library which should be here: C:\MySQL\MySQL Server 5.0\lib\opt
If you installed it in the default path, it should be here:
C:\Program Files\MySQL\MySQL Server 5.0\lib\opt

~~~~~~~~~~~~

Q) mysql.h couldnt be found.
A) Tools -> Options -> Projects and Solutions -> VC++ Directorys
Then at the top right, click on include files
Add a path to the library which should be here: C:\MySQL\MySQL Server 5.0\include
If you installed it in the default path, it should be here:
C:\Program Files\MySQL\MySQL Server 5.0\include

Still getting the error? Go to Database_Mysql.h. Find: #include
Replace with: #include

~~~~~~~~~~~~

Q) winsock2.h missing
A) Make sure you install the platform sdk which can be found here:
http://forums.swgemu.com/viewtopic.php?t=2701

~~~~~~~~~~~~

Q) libmysql.dll is missing when i try to run the server.
A) \MySQL\MySQL Server 5.0\lib\opt
There should be a libmysql.dll. Drag that to your C:\WINDOWS\system folder. NOT system32. system.

~~~~~~~~~~~~

Part 3: MySQL and you!

1.) The first thing you want to do, is take note of the password you entered in when you were installing MySQL. If you didn’t enter one that’s fine, but if you did you WILL have to use that.

2.) Okay, you’re server should be up, since the MySQL should be the autoinstaller version.

3.) Open up Navicat, which is in the Premiumsoft folder in All Programs.

4.) Click the connections button in the semi-top left hand part of the screen. The connection name doesn’t matter too much, but I set mine as SWGEmu. Leave the hostname to localhost and the port to default (3306). The username will be root, (Unless you entered in a username for your mysql, which I’m not sure is possible since I can’t remember Smile ) and the password will be blank or the password you entered in whilst installing MySQL. Press test connection. If it doesn’t connect, you either have a firewall messing stuff up, or you typed the username and password wrong.

5.) A new server should show up! Yay! Now, right click on it and press new database. You’ll want to name it swgemu (I believe it’s case-sensitive) and leave the character set to default.

6.) On the new database, you want to right click, then press execute batch file. Select swgemu.sql from MySQL in your SWGEmu folder.

7.) Go do debug, then config in your SWGEmu folder, edit config and enter in the information listed. If you’re running on your home PC you probably only need to change the password that you entered in when you installed MySQL.

8.) With the unused zip, currently named as swgemu_client.zip you have sitting on your computer, it is now time to finally get into the game! Open up that zip and copy it into your LEGIT (I hope Smile ) SWG directory. Mine is C:\Program Files\StarWarsGalaxies. Copy all the files located in that zip to your directory. Now, if you are up to date on the patches, or have at least patch 13 installed, you’ll be set. If you don’t have any patches or something under 13, you’ll have to get them off the SWG website. If you’re OVER, take out ANY file with the prefix patch. Don’t delete them if you plan on going back into NGE. (If you even wanted to Smile ). It’s pretty sad that a game that only has the function of walking around the environment is more compelling to play than the NGE.

9.) If you’ve played the NGE or any other version of SWG lately, you can just take out anything but the files patch_00.tre – patch_13_00.tre. Take all the other patch files out.

10.) Make a shortcut of SWGEmu.exe somewhere. Right click it, then choose properties. After that, add this to the target field.

Code:
— -s Station subscriptionFeatures=1 gameFeatures=255

11.) Run SWGEmu_Setup.exe to set up your screen resolution, etc. After you’re done, press okay and get out of that. Now, run the SWGEmu.exe in your emu folder under debug. Then, open the SWGEmu shortcut you modified the target of. Wait till the login screen shows, then log in under test. The password will be test. You can now run around. Yay! Or in a better looking phrase

YOU CAN NOW PLAY PRE-CU SWG! Yay! Oh…and just incase you didn’t notice…YOU CAN ALSO STOP SPAMMING “I NEED HELP ZOMG!!1” IN THE IRC. thx.

Have fun, please, read this before you ask any questions.

Troubleshooting:

Compiling Errors:
If you are getting errors such as winsock.h/windows.h and have reinstalled the SDK, follow the steps on this link:

http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/

Ignore step 5.

Next, You need to copy the files in the SDK’s include folder into VC’s include folder and copy the files in SDK’s lib folder into VC’s lib-folder.

The SDK’s director is C:\Program Files\Microsoft Platform SDK\

-------------------------------------------------------------------------
SWGEmu - Setting up and running the Publish 12.1/13 Client. By Ultyma.
(c)2006 SWGEmu Team. www.swgemu.com
-------------------------------------------------------------------------

1) Download the client from somewhere....

SWG TRES IF YOU NEED THEM
-------------------------
http://forums.station.sony.com/swg/board/message?board.id=Techsupport&message.id=295177

2) Extract the archive to your SWG directory. (Usually c:program filesStarWarsGalaxies)

3) Open up swgemu_login.cfg in notepad, and change the loginServerAddress0 IP address
to the server address that you would like to play on. (Or leave it at 127.0.0.1 for local).

4) Right click swgemu.exe and create a shortcut to it.

5) Right click the newly created shortcut, and change the Target field to the following:
"C:Program FilesStarWarsGalaxiesSWGEmu.exe" -- -s Station  subscriptionFeatures=1 gameFeatures=255

Note: If your SWG directory is different just modify that to the correct path. Leave the quotes on!

6) To run the game, just double click the shortcut. Voila. That simple. Login, and have fun.

NOTE:
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 ui_skill.inc from /ui to /ui in your
StarWarsGalaxies directory.

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

CRASHES
--------------
ERROR: unknown location : FATAL 82674e4e: unsupported SlotIdManager file format [0004]
CAUSE: You dont have all of the patches.
SOLUTION: Patch your SWG installation to AT LEAST publish 13.

-------------------------------------------------------------------------------------------------------
www.swgemu.com
Bookmark and 
Share

45 Responses to “SWGEMU: How to Compile and Run A Server!”

  1. dzgruntld1 says:

    After Part 3 #11 in your instructions, you say “YOU CAN NOW PLAY PRE-CU SWG! “. Is this the full game version of SWG Pre-CU? or is it just a look around version like you said here, “It’s pretty sad that a game that only has the function of walking around the environment is more compelling to play than the NGE.”. I will admit I don’t know anything about programing and running computer systems. Having said that thought here is another question, will I need two computers to do this? One to play and one to act as the sever? Thank you for any information and for trying to get SWG back to the public.

  2. Nathey15 says:

    Im getting that error “winsock2.h” I have the microsoft platform installed… its installed into program files.. is that right?

  3. elaid says:

    yes nathey15 thats ok. do the following to solve the iseu ( you probaly miss 2 files (get 2 file erors)

    do a searts for the file on you pc. write down the path you find to the file
    ex : C:/XXX/XXX/winsock2.h

    the do the same as this

    4.) When it opens, go to Tools->Options->Projects and Solutions-> VC++ Directories. Open the dropdown menu under Show Directories for, and select include files.

    5.) Under $(VCInstallDir)include add a new line by clicking the folder or pressing Ctrl + Insert. In that line, type C:\MySQL\include

    ony instead of C:\MySQL\include you add the path to the winsock2.h file

    same goos for the XX.lib only only for this path you select libary files in the dropdown munu and add the path there, instead of putting it in the include menu.

    hope this help, im bad in writing faq’s/explaing stuff 😛

  4. Mellkor says:

    “Still getting the error? Go to Database_Mysql.h. Find: #include
    Replace with: #include”

    I dont really understand this step could you explain this to me?

  5. Pa´lao from Sunrunner says:

    I’m keep getting an error when I tried to start the game local:

    automated crash dump from SWGEmu.exe stage.111212

    SWGEmu.exe: stage.111212
    unknown location : FATAL 4d962776: appearance/defaultappearance.apt could not be found. Are your paths set up correctly?

    Ram: 1023mb
    Os1: 5.1.2600
    Os2: Windows XP Service Pack 2
    NumProc: 1
    GameFeatureBits: 0
    SubscriptionFeatureBits: 0

    I followed all the steps described above.
    Can anyone help me?
    I’ve already set everything up twice, still keep getting this error

  6. Luis says:

    I can´t find Windows® Server 2003 Platform SDK Web Install. Microsoft`s page say that dons exist this download

  7. Luis says:

    Visual C said:
    c:\Documents and Settings\Luisgp82\Escritorio\SWGEMU\src\PDL\Sockets.h(26) : fatal error C1083: Cannot open include file: ‘winsock2.h’: No such file or directory

    c:\documents and settings\luisgp82\escritorio\swgemu\dep\src\zthread\win32/ThreadOps.h(27) : fatal error C1083: Cannot open include file: ‘windows.h’: No such file or directory

    But all are instaled

  8. Fred Europe says:

    HOW DO I DEBUG!? i have no idea what to do and when i put the code in to the Target it wont let me apply it comes up with an error

  9. Eric V says:

    I keep getting this error and I cant seem to find a solution

    SWGEmu.exe: stage.111212
    unknown location : FATAL 6bf12b18: open ‘datatables/questtask/spacequest/recovery/rori_station_reb_storyquest_01_b.iff’ not found

    Ram: 1023mb
    Os1: 5.1.2600
    Os2: Windows XP Service Pack 2
    NumProc: 1
    GameFeatureBits: 11111111
    SubscriptionFeatureBits: 1
    DiscardDynamicBuffersAtBeginningOfFrame: 0
    VideoMemory: 368
    GameResolution: 1024 768
    VideoAdapter: -1/1
    D3dDevice: 0x1002 0x5960
    D3dDriver: 6.14.0010.6614
    ShaderCapability: 1.4
    ObjectTemplate_Constructor: object/tangible/ship/crafted/booster/shared_booster_mk3.iff
    ObjectTemplate_Iff: object/tangible/ship/crafted/booster/shared_booster_mk3.iff
    AppearanceTemplate: appearance/mesh/ui_select.msh
    ShaderTemplate_Iff: shader/ui_select_hmc17.sht
    Terrain: none
    Player: none
    BytesAllocated: -1 -1 -1 -1 -1
    MainLoop: -1
    UpTime: -1

    I have up to patch_13_00.tre installed and have gone threw each step about 10 times, if u can give any insight into this problem it will be most appreciated. Thank you for your time.

  10. Chris says:

    Still getting the error? Go to Database_Mysql.h. Find: #include
    Replace with: #include
    I am still confused about this

  11. Lugana Selacious says:

    I tried downloading the code for SWGEmu folder, through http://opensvn.csie.org/SWGEmuPub/ and when I do it asks me for a username and password. I’ve tried ways around it and there is no way I can find.

  12. Asmen Acai says:

    I am trying to put together a server to run for my son and I to play on, and possibly a few old friends. I too am running into issue of login/password. Where can a new server start-up get a copy of the code to start?

  13. John says:

    I also have this problem

    does anyone know the p/word and user??

  14. Henk-Jan says:

    Thank you so much, it finally works for me:)

  15. RiL says:

    I cant do the step where you download something from http://opensvn.csie.org/SWGEmuPub/
    because it asks me dor a username and password!

  16. Nivirx says:

    I am sure the user name and password on on the SWGemu homepage and for everyone geting a SWGEmustage.exe >Numbers here

  17. tss says:

    ALEXCELI

  18. SpyderLich says:

    Unfortunately, it asks for a username/password now because SWGEmu decided to close off the open source due to abuse. So we have to wait for them to open the source back up or somehow get it from somewhere else.

  19. Tss says:

    ALEXCELI fucking noobs

  20. Mandaloe says:

    well is ALEXCELI the user name or password and none the less it seems like it was removed.

  21. Amadei says:

    Yeah i’m having the same problem with the login and password and ALEXCELI isn’t working..

  22. Matthew says:

    to get the scorce code
    use
    http://opensvn.csie.org/SWGEmuRevZ/
    I am having a problem with the ping server. it is crashing every time i run it.

  23. Shabba says:

    why u guys not use any SWGEmu-LaunchPad ;

    its work for all u probs …..

    look link down below………….

    http://launchpad.thewildclan.com/LPESetup.exe

  24. Marinelowca says:

    How do I get it to work with the new Launch Pad Enhanced?

  25. blade says:

    i cant find swgemu.sql

  26. Devon Sean McCullough says:

    Thank you! 7th on Google [ fatal error C1083: Cannot open include file: ‘winsock2.h’: No such file or directory ] and should have been 1st. All those oafs saying “set include path” well D-UH but not how and where to.

    Visual C++ 2005 Express Edition -> Tools -> Options -> Projects and Solutions -> VC++ Directories
    Show Directories for: Include Files
    double click on blank line, click on […] button and browse to, e.g.,
    C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include
    which the Platform SDK installer should have done for you,
    especially as it was downloaded and run by MSVC itself!

    …compiles, still doesn’t link…
    Show Directories for: LibraryFiles
    C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Lib

    …I might yet have to read the manual if I can find one.
    Thanks again for getting me started!

  27. Devon Sean McCullough says:

    All the answers were at

    http://msdn2.microsoft.com/en-us/express/aa700755.aspx
    Using Visual C++ 2005 Express Edition with the Microsoft Platform SDK

  28. Andrew says:

    when trying to run the MySQLInstanceConfig.exe app i get one of 2 errors

    1. This file does not have a program associated with it for performing this action. Creat an association in the Set Associations control panel.

    2. the application has failed to start because its side-by-side configuration is incorrect. please see the application event log for more detail.

    ok so im running vista on my pc and the compiling seemed to go without error. i have reinstaled mySQL many times and tryed differant vertions all with the same effect. if you have any idea your help will be much thanked

  29. mike says:

    i rly need help i can find the SWG directory
    do u know were that is?

  30. mike says:

    were is the SWG directory plz help

  31. SWGFAN says:

    can somebody send me full swgemupub files with skype to me?

    my skype nick fenikss_xxx

  32. Junkrocka says:

    I can’t find swgemu.sql – Please help!

  33. ABM says:

    I was looking fuc**ing everywhere for where to set include paths cause stupid damn idiots wouldnt ever say how, and finally found it here. I could not say thank you enough times to express my true appreciation.

  34. Walt says:

    I too would like the username and password for http://opensvn.csie.org/SWGEmuPub/

    Someone please email it to me? walt@wzydhek.com

  35. SamOnes says:

    Did you hear? Russian agressor attacks USA…
    More info here: hotusanewx.blogspot.com

    SHOKED!!

  36. tony says:

    what is the user name and pssword i cant find it on the emu site

  37. Gungjuilio says:

    I cannot get the source files to work that are posted here. ALEXCELI does not work at all. Please may I have the User Name and Password.

  38. tony says:

    how do you spawn deeds in core 1

  39. andrew L says:

    need the password and user plz

    blink1892@gmail.com

  40. Scoot12109 says:

    I also need the username and password. can someone please email it to me if they know it?

    email is scoot12109@gmail.com

  41. josh says:

    can i pla on someones server plz.

  42. Uberox says:

    hey im trying to do the first part using the SVN checkout with the address http://opensvn.csie.org/SWGEmuPub/ and the website seems to no longer be there. I tried some of the others that people posted in the thread but no luck either. anyone help me out or that can give me the files i need i would be so greatful

  43. Jbachtell1 says:

    hey uberox, i have that same problem. http://opensvn.csie.org/SWGEmuPub/ doesn’t exist. when i click on it i get a 404 error url not found on server. have you found the solution?

  44. Moone Shadow says:

    Is this still at all possible?

Leave a Reply