ULTIMA ONLINE SERVER ON LINUX 1.INTRODUCTION This document provides necessary information for installation of an Ultima Online shard under linux, using Mono 1.1.7 and SunUO 0.1.8. It is protected under GPL. Updated 10/06 Main Softwares: Mono-1.1.7: http://www.mono-project.org/ http://go-mono.com/sources/ SunUO-0.1.8: http://max.kellermann.name/projects/sunuo RunUO-1.0.0 Binary Distribution: http://www.runuo.com/downloads/files/runuo-releases/RunUO-1.0.0.zip Libgdiplus-1.1.7 http://go-mono.com/sources/libgdiplus-1.1/libgdiplus-1.1.7.tar.gz If you want to create packages from your fresh compiled programs, you can use checkinstall: http://asic-linux.com.mx/~izto/checkinstall/ 1. INSTALLATION Download the sources. The newer sources are required, since earlier Mono are buggy and unstable to handle SunUO. SunUO creator Max Kellerman recommends Mono 1.1.7 till the end of this documentation. NOTE: Although server stills crash with gdiplus exceptions (explained later), this document will show how to compile and install libgdiplus for future analisys. Let's begin installing libgdiplus. # wget http://go-mono.com/sources/libgdiplus-1.1/libgdiplus-1.1.7.tar.gz # tar -zxf libgdiplus-1.1.7.tar.gz Check if you met required libs to compile libgdiplus. Some libs and dependences (the name could be different and varies from Linux Distros): libpixman-dev libcairo-dev libfontconfig-dev libfreetype6-dev libpixman-dev libxrender-dev libjpeg-dev libungif-dev libtiff-dev libpng12-dev # ./configure Check if: cairo will be compiled with the following surface backends: Xlib: yes Quartz: no XCB: no (requires XCB http://freedesktop.org/software/xcb) PostScript: yes PDF: no PNG: yes glitz: no (requires glitz http://freedesktop.org/software/glitz) and the following font backends: freetype: yes atsui: no * Installation prefix = /usr/local * Codecs supported: - TIFF: yes - JPEG: yes - GIF: yes - PNG: yes Ok, next step: # make # make install or # checkinstall -(initial letter of your distro...checkinstall -help for instructions) # wget http://go-mono.com/sources/mono-1.1/mono-1.1.7.tar.gz # tar -zxf mono-1.1.7.tar.gz Mono Compilation requires: * gcc 3.3 or newer * GNU make * glib 2.0 (developing libglib2.0-dev) * wget If you are a Debian user: # apt-get install gcc make libglib2.0-dev wget # ./configure or # ./configure -with-libgdiplus=/usr/local/lib/ mcs source: $(top_srcdir)/mcs GC: included Globalization: TLS: pthread SIGALTSTACK: no Engine: Building and using the JIT 2.0 Alpha: yes JNI support: IKVM Native libgdiplus: assumed to be installed or libgdiplus: /usr/local/lib/ NOTE: Mono compilation can take a while to finish # make # make install or # checkinstall -(initial letter of your distro...or checkinstall -help for instructions) If no error was reported, your mono installation was completed successfully. 2. CONFIGURATION Now, you'll need some of your client files and the RunUO binary package. If you have a fresh copy of your UOSE or AOS client in your windows box (for example), you can use all files with extension .mul and save them in the server directory (explained later). You don't need all your client installation, so, with this setup you'll save 400mb of disk space ;) The files are listed bellow: anim2.mul lightidx.mul multi.mul stadifi0.mul statics3.mul anim3.mul light.mul palette.mul stadifi1.mul statics4.mul anim4.mul map0.mul radarcol.mul stadifi2.mul texidx.mul animdata.mul map2.mul sjis2uni.mul stadifl0.mul texmaps.mul animinfo.mul map3.mul skillgrp.mul stadifl1.mul tiledata.mul anim.mul map4.mul skills.mul stadifl2.mul unifont1.mul artidx.mul mapdif0.mul soundidx.mul staidx0.mul unifont2.mul art.mul mapdif1.mul sound.mul staidx2.mul unifont.mul fonts.mul mapdif2.mul speech.mul staidx3.mul gumpart.mul mapdifl0.mul stadif0.mul staidx4.mul gumpidx.mul mapdifl1.mul stadif1.mul statics0.mul hues.mul mapdifl2.mul stadif2.mul statics2.mul It's good if you backup them and burn them into a CD. # tar -zcf muls.tar.gz *.mul Download and unzip RunUO package to a directory of your choice: # unzip RunUO-1.0.0.zip # mv RunUO\ 1.0 /var/runuo File created. I copied the files into this directory: /var/runuo/muls If not created, create a sunuo.xml file inside runuo directory e.g.: # mkdir /var/runuo/etc # vim /var/runuo/etc/sunuo.xml This file is the shard xml configuration file. It's a great feature added by Max to avoid scripting rewriting: /var/runuo/muls/ The server is ready. Let's start the server by typing: # mono SunUO.exe From your RunUO directory. Ouput is showed bellow: SunUO Version 0.1.8 http://max.kellermann.name/projects/sunuo/ on Unix 2.4.27.0, runtime 1.1.4322.573 Compiling scripts: legacy. Verifying scripts: core[4 items, 0 mobiles] legacy[1654 items, 435 mobiles] - done (1658 items, 435 mobiles) Enter the Ultima Online directory: > /var/runuo/muls/ (He will ask you this if you didn't put the correct data-path at etc/sunuo.xml, or if the files are missing) World: Loading...done (87789 items, 2350 mobiles) (6,0 seconds) This server has no accounts. Do you want to create an administrator account now? (y/n) y (Here you will create administrator account and password. Attention to these step!) Username: admin Password: anypassword Account created, continuing Regions: Loading...done Address: 127.0.0.1:2593 Address: 172.16.129.25:2593 World: Saving...done in 1,1 seconds. Testing client connection (client UOSE patch 4.0.10b) Client: 172.16.128.45: Connected. [1 Online] Login: 172.16.128.45: Valid credentials for 'admin' Client: 172.16.128.45: Disconnected. [1 Online] [admin] Client: 172.16.128.45: Connected. [1 Online] Login: 172.16.128.45: Account 'admin' at character list Login: 172.16.128.45: New character being created (account=admin) - Character: Jimmy Cliff (serial=0x00000930) - Started: Britain (1496, 1628, 10) in Trammel Warning: data file mapdif3.mul not found Warning: data file mapdifl3.mul not found Warning: data file stadif3.mul not found Warning: data file stadifl3.mul not found Warning: data file stadifi3Client: 172.16.128.45: Disconnected. [1 Online] [admin] NOTE: You can desconsider this warning messages. 3. TROUBLESHOOTING Some errors can be detected and corrected at the beggining: 3.1 Scripts compilation are too low If you have low RAM and low processor be patient...compilation can take hours. In a PIII-800mhz with 128 RAM the compilation took about 1hour. In a PIII-1.2ghz with 1GB RAM, the compilation took 30s :) Don't panic (as I did) if you get stuck here: # mono SunUO.exe SunUO Version 0.1.8 http://max.kellermann.name/projects/sunuo/ on Unix 2.4.22.0, runtime 1.1.4322.573 Please make sure you have Mono 1.1.7 or newer! (mono -V) Compiling scripts: legacy[C#,2040 NOTE: Any change bellow Scripts directory will result in a new compilation when you start SunUO. So, if you have a slow machine just think twice before you do any scripts change. 3.2. World: Loading...failed to load item: System.TypeInitializationException: An exception was thrown by the type initializer for Server.TileData ---> System.ArgumentException: empty path If you don't specify any directory on server initialization, and sunuo.xml doesn't have any data-path, the server will crash with this error. NOTE: There's a SunUO minor bug that doesn't allow \ characters at sunuo.xml data-path. E.g.: If you installed UOSE client with wine, you'll have something like this: /home/usuario/.wine/fake_windows/Program\ Files/EA\ GAMES... The server will throw an exception and will crash. 3.3. Gdiplus.dll If you don't compiled libgdiplus, probably your server will crash with gdiplus.dll system exception. Crash reports will then be generated, like this one: Server Crash Report =================== RunUO Version 0.1.0, Build 8 Operating System: Unix 2.4.22.0 .NET Framework: 1.1.4322.573 Time: 30/5/2005 12:00:12 Mobiles: 2351 Items: 87791 Clients: - Count: 0 Exception: System.DllNotFoundException: gdiplus.dll in (wrapper managed-to-native) System.Drawing.GDIPlus: GdipGetGenericFontFamilySansSerif (intptr&) You can add: (not tested yet) at sunuo.xml or you can remove all Reports directory. Another way is compilling libgdiplus correctly. 3.4. O client couldn't "ATTACH" to server Your server is returning a wrong IP address to the client. You can see this through server inicialization: Verifying scripts: core[4 items, 0 mobiles] legacy[1654 items, 435 mobiles] - done (1658 items, 435 mobiles) World: Loading...done (87790 items, 2351 mobiles) (14,0 seconds) Regions: Loading...done Address: 127.0.0.1:2593 This example above only listens at localhost:2593. NOTE: Remember that, if you are running a shard under a firewall, you'll have to do correct network address translation (NAT) and edit the following script: # vim Scripts/Misc/ServerList.cs Change var: /* Null lets script to find the address*/ public const string Address = null; /* Case it doesn't work, write down your public IP*/ public const string Address = "200.5.4.3"; /* Or, your domain*/ public const string Address = "login.dominio.com"; The correct address will be shown on shard load: World: Loading...done (87789 items, 2350 mobiles) (6,0 seconds) Regions: Loading...done Address: 127.0.0.1:2593 Address: 192.168.1.1:2593 Server is UP and listening at 192.168.1.1:2593 -- Documentation by Rodrigo Fraga rodrigo.fraga@gmail.com