Difference between revisions of "CWE:Getting Started"

(Added server.ini instructions.)
(Redirect old instruction to the GitHub Plasma site)
 
(21 intermediate revisions by 7 users not shown)
Line 1: Line 1:
 
{{Tutorial}}
 
{{Tutorial}}
This tutorial will help you compile your very own [[CyanWorlds.com Engine|CWE]] client.
+
These instructions will help you compile your very own [[CyanWorlds.com Engine|CWE]] client.
  
If you need an Internal client to connect to MO:ULa, you can use the GoW-provided [http://www.guildofwriters.org/cwe/cwe_906.zip CWE Testing Build bundle]. Simply run the <code>plclient_moula.vbs</code> script after copying the <code>dat</code> and <code>sfx</code> files from your Uru Live installation.
+
<big>Please see the [https://h-uru.github.io/Plasma/building.html Plasma build instructions on GitHub].</big>
  
== Prerequisites ==
 
You'll need the following software to successfully build CWE:
 
* [http://code.google.com/p/msysgit/downloads/list?can=3 Git] for fetching the source code. If you're not familiar with Git, you might want to read up on it thanks to some of [http://help.github.com/ Github's excellent articles].
 
* [http://cmake.org CMake]. When you install, make sure you tell the installer to add CMake to the system PATH.
 
* PhysX 2.6.4. This is available from NVIDIA's [http://www.nvidia.com/object/physx_archives.html#SDK PhysX Archives]. Please use 2.6.4. ''Newer versions will not work correctly.''
 
* [http://connect.creativelabs.com/openal/Downloads/OpenAL11CoreSDK.zip Creative Labs' OpenAL SDK 1.1]
 
* The June 2010 [http://www.microsoft.com/downloads/en/details.aspx?FamilyID=3021d52b-514e-41d3-ad02-438a3ba730ba DirectX SDK]
 
* Microsoft Visual Studio 2010
 
** '''Students''': Download the full version from [https://www.dreamspark.com/default.aspx Microsoft DreamSpark] for free.
 
** '''Everyone Else''': [http://www.microsoft.com/visualstudio/en-us/products/2010-editions/visual-cpp-express Visual C++ 2010 Express Edition] can be downloaded for free.
 
* The [http://guildofwriters.org/tools/devlibs.zip CWE development libraries bundle]
 
 
Also, do not forget to update your client's build ID to match the build ID of the server (e.g. as of this writing, MO:ULa's build ID is 906). This number is set in <code>Sources/Plasma/NucleusLib/pnProduct/Private/pnPrBuildId.cpp</code> under "#define BUILD_ID XXX" where XXX is the actual build ID.
 
 
== Building an Internal Client ==
 
If you want to build only a client useful for testing, for example, you might want to build the Internal Client.
 
 
=== Compiling ===
 
The first step is to compile the source code:
 
# '''Start Cmake'''
 
# '''Set''' the ''Where is the source code'' option to the location where you cloned the repository.
 
# '''Set''' the ''Where to build the binaries'' option to a subfolder of the aforementioned location called ''build''.
 
# '''Check''' the ''Grouped'' and ''Advanced'' options.
 
# '''Press ''Configure'''''. Select ''Visual Studio 10 2010'' as the generator.
 
# '''Set''' the ''CMAKE_INSTALL_PREFIX'' option under ''Cmake'' to the ''cwe-prefix'' folder that you extracted from the [http://guildofwriters.com/tools/devlibs.zip ''development libraries bundle''].
 
# '''Press ''Configure''''' again.
 
# '''Set''' the OpenAL include and library path options under ''OpenAL''.
 
#* '''Default Include Path''': <code>C:\Program Files\OpenAL 1.1 SDK\include</code>
 
#* '''Default Library Path''': <code>C:\Program Files\OpenAL 1.1 SDK\lib\win32\OpenAL32.lib</code>
 
# '''Press ''Configure''''' again.
 
# '''Set''' the ''PHYSX_SDK_PATH'' option under ''PHYSX''. The default value is <code>C:\Program Files\AGEIA Technologies\AGEIA PhysX SDK\v2.6.4\SDKs</code>.
 
# '''Press ''Configure...''''' For the last time!
 
# '''Press ''Generate.''''' You will now have a Visual Studio solution file (<code>.sln</code>) in the folder that you specified to build the binaries in under the name <code>Plasma.sln</code>.
 
# '''Open the solution''' in Visual Studio. You can compile CyanWorlds.com Engine by pressing ''Build'' -> ''Build Solution''. This will take some time. Choose "Release" as build-type (there's a drop-down menu at the top of the window) to make dll hell slightly less worse.
 
You now have a fully functional client under <code>''BUILD FOLDER''\bin\Release</code>. '''<code>plClient.exe</code>''' is the actual game client whereas '''<code>plUruLauncher.exe</code>''' is the patcher for your shard and '''<code>plCrashHandler.exe</code>''' is the executable used to handle crashes by outputting to a <code>crash.dmp</code> file.
 
 
=== Setting Up ===
 
Once you have your three executables, you'll need to setup a directory from which you can actually use it:
 
# Create a folder on your computer (e.g. "Documents\Internal") and copy into this folder all three executables (if you're only going to use the client in "-LocalData" mode, you just need to copy <code>plClient.exe</code> and <code>plCrashHandler.exe</code>).
 
# Copy from your Uru Live installation the <code>dat</code> and <code>sfx</code> folders.
 
# Copy the <code>dat</code>, <code>Python</code> and <code>SDL</code> folders from the [https://github.com/H-uru/moul-scripts moul-scripts repository] (clone it as you did for the client).
 
# Copy the <code>server.ini</code> file for the shard you are trying to connect to into your client's folder.
 
# Obtain and copy the following files into your client's folder (you can copy them from the [http://www.guildofwriters.org/cwe/cwe_906.zip CWE Testing Build bundle] if links aren't provided):
 
#* <code>NxCharacter.dll</code>,
 
#* <code>PhysXLoader.dll</code>,
 
#* <code>python27.dll</code>,
 
#* <code>[http://www.guildofwriters.org/tools/resource.dat resource.dat]</code>.
 
You can now start your client by starting <code>plUruLauncher.exe</code>, which will connect to the appropriate server and download the latest files; to use only the data files available on your local computer (which is useful if you don't want the server to overwrite your own files when you connect to it), start <code>plClient.exe</code> instead with the option "-LocalData".
 
 
As an additional note, if you have a <code>TOS.txt</code> file in your client's folder, the client, after having succesfully logged in the user, will display the contents of this file.
 
 
== Building an External Client ==
 
The steps required to build such a client are more or less the same as for an Internal client.
 
 
=== Compiling ===
 
Compiling follows the exact same procedure, except that you'll need to check under CMake the option ''PLASMA_EXTERNAL_RELEASE'' under ''PLASMA''. Also note that the three files you'll obtain in the end are '''<code>UruExplorer.exe</code>''', '''<code>UruLauncher.exe</code>''' and '''<code>UruCrashHandler.exe</code>'''.
 
 
=== Setting Up ===
 
The process for setting up your External client is the same as for an Internal client. The only difference is in the execution: you cannot run an External client in "-LocalData" mode, and starting <code>UruExplorer.exe</code> (<code>plClient.exe</code>'s equivalent) will force you to use <code>UruLauncher.exe</code>. The External client will thus always use the latest files as provided by the server.
 
 
== Editing <code>server.ini</code> ==
 
For your client to be able to connect to your own Shard, you'll need to provide it with a <code>server.ini</code> file. The options are entered in the following form:
 
Server.''Option'' ''Value''
 
This file will need to contain the following options:
 
* <code>Server.Auth.N</code>, <code>Server.Auth.X</code>, <code>Server.Game.N</code>, <code>Server.Game.X</code>, <code>Server.Gate.N</code> and <code>Server.Gate.X</code>: if you followed [[DIRTSAND:Getting Started|these]] instructions, you'll have to use the keys provided by the <code>keygen new</code> command.
 
* <code>Server.Auth.Host</code> and <code>Server.Gate.Host</code>: your Shard's IP address or domain name.
 
* <code>Server.DispName</code> ''(optional)'': the name of the client displayed to the user.
 
* <code>Server.Status</code> ''(optional)'': a URL for the status message of your Shard.
 
* <code>Server.Signup</code> ''(optional)'': a URL for a signup page to your Shard, linked to by the appropriately-named button.
 
  
 
[[Category:CWE]]
 
[[Category:CWE]]

Latest revision as of 21:38, 29 April 2023

Disambig gray.png

This is a tutorial page.
 

These instructions will help you compile your very own CWE client.

Please see the Plasma build instructions on GitHub.