Installing

Downloads, installs, and guides or asking questions
Post Reply
User avatar
hallsofvallhalla
Site Admin
Posts: 12031
Joined: Wed Apr 22, 2009 11:29 pm

Installing

Post by hallsofvallhalla »

This is all pulled from the original forums and will work through it to get it easier to read

Please Follow the Instructions!
It is very very important that you follow every single instruction mentioned here. If you must print this out and check off each step. Failure to follow even one single step can cause the kit to not work properly. Some common hang ups that people run into by failure to do this are as follows:

Not naming the SVN directories correctly (manually set in the kit)
Not extracting the kit to c:\tmmokit or extracting it to another drive (such as the d: drive) (again some manual settings).
Not installing some piece of the development environment (nothing works).
Forgetting to publish the game before making a client executable (does not work).
Use the downloads provided for the Development kit. Do not go and get the latest Python as it has not be verified to work and could cause issues. Everything you need will be downloaded from this website.
If this is your first time using the kit try to follow the directions and do not get creative. Once you are familiar with how everything works you can go back and start making changes.

Common Termanology
The kit - The Torque MMO Kit.
IDE - Intergrated Development Environment. It is a GUI tool used to perform some functions with the kit and compile the databases needed to run the kit from a GUI environment.
Client Executable/Packaged Client/Network Client - A client packaged into an exe made to run on player's computers. It does not require any of the installation tools to run and is to be used by players and testers of your MMO.
Test Client - Client ran from the IDE or manually through the scripts. It is compiled through Python and requires the Development Tools to run. Used for testing where no network environment is needed.
Offline Client/Local Client - Test or Network Client used to connect to a local game that is stored on the client's computer instead of a server. Can be used for testing or single player play for your players.
SVN - Subversion. It is the system used to keep track of packages and changes for Network Clients. There is a whole process listed later to update SVN for your MMO.

Required Downloads
You can find all of the downloads from this website at the following location:



You will need to download 2 things.

The latest version of the kit along with
The Development Tools (listed currently as tmmokit_dev_files.zip file
Save both of these files as they will both be used. Both of these files are zip files so make sure you can handle these files (if you are using Windows XP, Server 2003, or Vista zip files are handled by the Operating System with no issue)


Development Environment Install
In order to use the kit you will need to install 9 development tools that are available in the Development Tools install. Please follow these instructions and do them in order. If the instructions say "default options" just install the file and keep hitting next. Do not change any options, just use the default.

Instructions
Unzip the Development Tools to c:
All of the install files are located in that download. Unzip the files directly to the C: drive. It will create a level of folders with all of the installation tools needed.

Install Python 2.5
Python 2.5 is the follow file listed below. Install it with the default options.

c:\install\systemsoftware_development_environment\python-2.5.msi

Install Twisted 2.5
The install is listed below. Install it with the default options.

c:\install\systemsoftware_development_environment\Twisted_NoDocs-2.5.0.win32-py2.5.exe

Install Win32OpenSSL
The install is listed below. Install it with the default options.

c:\install\systemsoftware_development_environment\Win32OpenSSL-0_9_8e.exe

Install PyCrypto 2.0.1
The install is listed below. Install it with the default options.

c:\install\systemsoftware_development_environment\pycrypto-2.0.1.win32-py2.5.exe

Install PyOpenSSL 0.6
The install is listed below. Install it with the default options.

c:\install\systemsoftware_development_environment\pyOpenSSL-0.6.win32-py2.5.exe

Install Python Windows Extensions
The install is listed below. Install it with the default options.

c:\install\systemsoftware_development_environment\pywin32-210.win32-py2.5.exe

Install wxPython
The install is listed below. Install it with the default options.

c:\install\systemsoftware_development_environment\wxPython2.8-win32-unicode-2.8.4.2-py25.exe

Install MySQL-Python
The install is listed below. Install it with the default options.

c:\install\systemsoftware_development_environment\MySQL-python-1.2.2.win32-py2.5.exe

Install SQLObject
The install is listed below. NOTE: PLEASE READ INSTRUCTIONS BELOW

c:\install\systemsoftware_development_environment\sqlobject.zip

You will need to extract the contents of this file to the following location

c:\python25\lib\site-packages\

Once this is done you should now see a sqlobject folder in the site-packages folder. The path should look like this.

c:\python25\lib\site-packages\sqlobject

To confirm you have installed it correctly, open the sqlobject folder and you should see a bunch of folders and .py files. If not, you have made a mistake.




Network Environment Install
In order to use the kit in a networked environment where you have clients connecting to your server you will need to install these tools (Apache, Subversion, Nettalk IRC). Again it is important to follow the directions here and follow them in particular for the Subversion install otherwise you will run into issues. Also keep an eye on the Apache install and the information about other web servers such as IIS.

Where/When/Why?
You will need to have these tools running if you wish to publish a client out to your loyal players and have them connect up to your server and play. It controls this whole aspect from packaging a client, to installing updates to your client as they are published, to using IRC for the chat system in the kit.

Instructions
Quick Note about Local/LAN/WAN installs
If you plan on installing this in a WAN environment (see the definitions near the beginning of this document) you will want to put in your actual domain you will be using (such as mymmodomain.com) instead of the suggested somenet.com listed below. You can make these changes later, but you will need to know how to modify Apache configuration files.

Install Apache Web Server
A particular version of Apache is included for Windows in the Development Tools download. We will now be installing from a different directory. Let first start by running the installer for Apache. You will find it here

c:\install\systemsoftware_server_apache_svn_irc\apache_2.0.61-win32-x86-no_ssl.msi

Keep on clicking next using the default values. Soon you will be prompted in a setup called "Server Information". You will need to specify 3 values

Network Domain
Server Name
Administrator's Email Address
Use the suggested values if you are doing a local or LAN install for they will not matter. For a WAN install you will want to provide a valid value for all 3 of these using a real domain (such as mymmodomain.com). Once you complete this hit next a bunch of times and it will finish installer. Apache is ready to roll!

Install Subversion (SVN)
Another very quick install, just use the default options and keep hitting next. You can find the install here:

c:\install\systemsoftware_server_apache_svn_irc\svn-1.4.5-setup.exe

Configure Subversion
Please follow the directions followed to the exact letter. Failure to do so will cause issues

Once SVN is installed you will now need to setup the repository to store the updates and patches. This is used to push out patches and the content is also used to make the Packaged Client. Please follow these instructions using the command prompt. Make sure you are on the c: drive and only the c: drive. Using another drive will cause issues. If you wish you can simply copy and paste each of these commands in and it will do everything you need.

c:
cd c:\
mkdir svnrepo
cd svnrepo
svnadmin create patchfiles
"c:\program files\apache group\apache2\bin\htpasswd.exe" -bc htpasswd admin mypassword
"c:\program files\apache group\apache2\bin\htpasswd.exe" -b htpasswd starter mmo
This will create the repository needed to store the patches and creates some password information for Apache to work with Subversion.

Once this is done you need to open Notepad and paste the following into it:

[patchfiles:/]
admin = rw
starter = r
Save the file into this exact location.

c:\svnrepo\svnaccess.txt

Customize Subversion
If you are installing for the first time, you can safely skip this since it covers advanced instructions for production environments.

If you are wishing to customize your SVN for a production build you will want to change the passwords for both admin and starter in the command listed above. Also, the flags -bc will create the password file initially and -b will simply tack on another password. If you create new users for SVN make sure to use -b otherwise you will be overwriting all earlier work. You will find this password will need to be changed later in some more configuration changes. Some more examples of this will be shown in the creatin a new project section near the end.

Setup Apache to talk to SVN
You need to click on the start menu and navigate to the follow item

Program Files -> Apache HTTP Server -> Configure Apache Server -> Edit the Apache httpd.conf Configuration File

Once you do this a file will open. Paste the following into the very bottom of the document.

<Location /svn>
SetOutputFilter DEFLATE
SetInputFilter DEFLATE
DAV svn
SVNParentPath C:/svnrepo
# our access control policy
AuthzSVNAccessFile C:/svnrepo/svnaccess.txt
AuthType Basic
AuthName "My Game's Patch File Repository"
AuthUserFile C:/svnrepo/htpasswd
require valid-user
</Location>
Upon finishing this task save the file. You will need to restart the Apache server now. What you need to do is find this icon in your system tray (bottom right hand corner) Apache Icon. Left click on it and choose Apache2 from the list and then choose Restart. Once this is done you can continue.

Checkout the patchfiles directory
This will actually setup the patchfiles directory and get it ready to be published to. Type these following commands in the command prompt.

c:
cd c:\
mkdir mygame
cd c:\mygame
svn co http://127.0.0.1/svn/patchfiles patchfiles
You will need to authenticated with the admin account you specified a bit earlier (password was mypassword). Once done you should get a message with no errors and it is ready to go. The folder will be empty, but if it is there it is a good sign.

Install Nettalk IRCD
Find the Install here. Choose all the defaults. It is all in German, just keep hitting the next button.

C:\install\systemsoftware_server_apache_svn_irc\Setup-NettalkIRCD.exe

Install Tortoise SVN
This is really an optional install, but you will find it extremely useful if you deal with SVN a lot. It allows you to do everything from the GUI instead of the command prompt. You can install it from the following location and just use the default settings and keep hitting next.

c:\install\tools\TortoiseSVN-1.4.5.10425-win32-svn-1.4.5.msi

Once installed you should see your mygame directory now looks a little different in Windows Explorer (My Computer) and you have options to perform against it. You will not need this for any of the instructions provided, but it will be useful at a later time.

Final Notes
Once you are done you will have completed these tasks:

Apache will have been installed.
SVN configuration information will be stored in c:\svnrepo for your repositories.
Actual repository files will be published at c:\mygame.
A file has been created with access information for Apache to SVN and Apache will have been restarted.


Kit Network Configuration
By default the kit is setup to work locally using 127.0.0.1 (localhost IP). If you are going to not be setting up a LAN or WAN environment you can skip this. If you are going to setup a LAN or WAN environment you will need the following information.

IP of the server of you are using a LAN. You can get this information from the ipconfig command. An example is 192.168.1.50
Fully Qualified Doman Name (FQDN) for a WAN. This would be something like http://www.mygame.com or mygame.mydomain.com. Configuration of a WAN requires understanding how routing and DNS works. You also need to know if you are using a static domain name (like the ones mentioned before) or a dynamic name such as one offered through the DynDNS server.
Email information if you wish to use your own email server. An option to use gmail for email purposes will be available and is the common way to handle the email requirements.
Once you have this information you will need to provide it shortly. The instructions will ask for the "Network Information" for your project in the upcomming steps. This is reference to the IP for a LAN setup and the FQDN for a WAN setup. Make sure to have to plug this information in as needed.

Installation
Unpack the Torque MMO Kit
Like the installation tools and SVN, it is very important to unpack the kit and follow these steps.

Unpack the archive to the c: drive.
Rename the folder extracted to tmmokit if it is not already.
You should have a variety of folders and files inside of the tmmokit directory. If you do not you made a mistake.

Configuration of c:\tmmokit\main.cs
You will find the file you need to modify here.

c:\tmmokit\main.cs

Open the file up with your favorite editor and find the following variable:

$Py::MasterIP = "127.0.0.1";
Replace this with your Network Information. For an example, a LAN setup of 192.168.1.50 and WAN of server.mydomain.com will be shown here.

LAN Setup:

$Py::MasterIP = "192.168.1.50";
WAN Setup:

$Py::MasterIP = "server.mydomain.com";
Configuration of c:\tmmokit\mud\gamesettings.py (Network Settings)
Most of the configuration is done from this file now. You will need to specify the Network Information again. You will find the following line to change this inside gamesettings.py

MASTERIP = '127.0.0.1'
Replace the contents inside the ' ' with the IP or FQDN as you did before.

Next, you will need to choose what fixes need to be applied for a LAN and WAN environment. You will find these 3 values in gamesettings.py

DO_LAN_SERVER_FIX = 0
DO_WAN_SERVER_FIX = 0
GL_ANNOUNCE_IP = "www.somenet.com"
We need to change these depending on our LAN or WAN environment. Please follow this chart to determine what needs changed.

Setup DO_LAN_SERVER_FIX Value DO_WAN_SERVER_FIX Value Set GL_ANNOUNCE_IP
Local 0 0 No
LAN 1 0 No
WAN (Dynamic Domain Name) 1 1 Yes
WAN (Static Doman Name) 0 1 Yes
Depending on your environment you will need to change the values of DO_LAN_SERVER_FIX, DO_WAN_SERVER_FIX, and GL_ANNOUNCE_IP. If the chart says the value needs to be 1, change the 0 to a 1. If you need to set GL_ANNOUNCE_IP you need to replace the information inside the quotes with the FQDN you have specified in earlier steps.

Configuration of c:\tmmokit\mud\gamesettings.py (Email Settings)
If you are going to be an a LAN or WAN environment you will need to configure the email settings. These allow passwords to be emailed to the players. The easiest way to do this is to use a gmail account. You will find the following values in gamesettings.py

SERVER_EMAIL_ADDRESS = "me@mail.com"
SERVER_EMAIL_ACCOUNT = "myaccount"
SERVER_EMAIL_PASSWORD = "myemailpassword"
SERVER_EMAIL_SERVER = "myserver"
SERVER_EMAIL_PORT = 25
SERVER_EMAIL_USE_GMAIL = 0
In order to use gmail you will need a few things. First of course you will need to create an account. We are going to use a pretend account with the following information.

Email Address - mymmo@gmail.com
Username - mymmo
Password - mypassword
Using this information I make the following changes

SERVER_EMAIL_ADDRESS = "mymmo@gmail.com"
SERVER_EMAIL_ACCOUNT = "mymmo"
SERVER_EMAIL_PASSWORD = "mypassword"
SERVER_EMAIL_SERVER = "smtp.gmail.com"
SERVER_EMAIL_PORT = 587
SERVER_EMAIL_USE_GMAIL = 1
You will only need to change the first 3 items based on your email account information. Once this is set you will receive passwords via email.

Ports to forward in a WAN environment
If you wish for others to connect to your server you will need to open ports for them to connect. You will most likely use a technology called Port Forwarding on your firewall to accomplish this. If you cannot do this yourself you should notify your Network Administrator with the following information so the proper ports will be open and working for your game.

TCP Port 80
TCP Port 2006
TCP Port 2007
TCP Port 6667
TCP Port 7001
UDP Port 29000
Preparing content for a LAN and WAN environment
You will now need to complete 3 more steps for everything to work.

Publish the game data to SVN
Create a Packaged Client to use with your environment.
Start the Servers so you can connect.
Instructions
Publishing the game data
Open up a command prompt and type the following in

c:
cd c:\tmmokit\
publishpatch.bat testgame
If everything is installed properly it will start to compile and copy everything over to SVN. This can take a few minutes to 20 minutes depending on the server it is running on. Every time you make a change to the MMO you will need to return publishpatch to update the information for your clients so it is important to become familiar with this command. If everything worked fine your content is ready to go and now it is time to create a client.

Creating the Packaged Client
It is important to do this step after publishing the game data. No Game Data = No Packaged Client. Once your data is published it is time to create the packaged client. This is done by using a program called NSIS and luckily is very easy to do since it is all scripts for you. In My Computer navigate to the following folder.

C:\tmmokit\packaging\nsis

Inside you will find a file called mmogame_installer.nsi. Right click on it and choose the Option Compile NSIS Script. Sit back and wait as it compiled a client for you. This will take nearly as long as it took to publish the content to SVN. Once everything is done you will see at the very bottom of the information screen the Total size of the application and the Close button will no longer be greyed out. Close down the window and you will now have a file in the same directory called MMOGame.exe. This is the Packaged Client that you will give to your players so they can connect to your server. Once this is done you can install the client on your own machine or move on to starting up the servers.

Starting the Servers

Starting the servers is an easy process. Simply navigate to c:\tmmokit in My Computer or Windows Explorer and double click on the startup.bat file. This will start a wealth of windows. It should look like this picture below once all 8 or so windows are open.



It should take about a minute to open everything up and run it. Congratulations, you are to the point that you can now connect to your server and start testing.


Creating a new Project
At some point you will want to create your own project. The way the kit is setup it uses the starter.mmo folder to create a copy of the kit and shove it into a new project directory and create a new project file to use. A few modifications need to be made to get this working properly, but once you do you will have whatever project name you want instead of testgame.mmo

IDE Setup
First you need to open up the IDE and use the menu to create a new project. To do this you simply select New from the File Menu and then choose Project as the Document type.



Next per this example we are going to call this project NewGame and give it a Name, folder, and Filename. You may use anything you like here.



Next Step is now to create a zone. To do this simply go up to the World Menu and choose New Zone



In this example we create a zone called base and leave everything alone. You can make any changes you wish here.



Now, go up to the World Menu and Choose Compile World. This will update all of the databases. Lastly, you will want to go to the MMO menu and choose to Create the Master and Character DB (in effects resetting them).



Python Changes
The IDE will not make all of the changes needed and a few need to be made to a few python/torque files.

c:\tmmokit\main.cs
Open this file up and change the $defaultGame value to what was provided earlier for the folder name of the project. Per example we used newgame.mmo and here is an example of that change.

$defaultGame = "newgame.mmo";
c:\tmmokit\mud\gamesettings.py
A few changes are needed here.

GAMENAME = "NewGame"
GAMEROOT = "newgame.mmo"
DEFAULT_GAME_CONFIG = "newgame"
These reflect the Game Project values we set earlier. The Name of the Game, the folder, and then the project filename. A bit further down you will also need to change this value.

DEFAULT_GAMENAME = "NewGame"
Finally, we need to change a zone value in here.

CLUSTERNAMES = [
("base",),
]
c:\tmmokit\serverconfig\Premium_MMORPG.py
Change the following value in this file to this

STATICZONES = [
"base"
]
c:\tmmokit\newgame.mmo\packaging\content.py
Remember to replace newgame.mmo with whatever folder you just create.

FULL_ZONES = ["base"]
c:\tmmokit\mud\worldmanager\worldmanager.py
Following change

STATICZONES = [
"base"
]
New SVN for the project
A lot of tiems you will want a new SVN to be used for the project. Below are instructions on what is needed to make this happen.

Creating the repository
Type the following into a command line prompt

c:
cd c:\
cd svnrepo
svnadmin create newgame
This will create a new repository to hold the SVN changes. We are going to use the same username and password created earlier. See the section at the end on how to use a new username/password since it adds a bit of extra complication.

Setting up access
Open up c:\svnrepo\svnaccess.txt and add the following to the end of the file.

[newgame:/]
admin = rw
starter = r
Save the file and restart Apache (double click on the go icon in your tray and then choose Restart on the Service). This should make things good to go now.

Checkout the Folder
You can checkout via the GUI or the command line. Below is how to do it via the command line.

c:
cd c:\mygame
svn co http://127.0.0.1/svn/newgame newgame
This should check out an empty folder called newgame. If it asks you for the username/password you will need to use the one you created when you first initially setup the kit.

Changes to the configs
You need to make a change to c:\mmokit\mud\gamesettings.py

SERVER_WORLD_SVN = "patchfiles"
Also to c:\mmokit\publishpatch.bat

xcopy .\distrib\common c:\mygame\newgame\common /e /h /y /i
copy .\patchlist.txt c:\mygame\newgame\common\patchlist.txt /y
c:\mmokit\publishtosvn.bat

Change

cd \
cd mygame
cd patchfiles
To

cd \
cd mygame
cd newgame
Once this is done you can use publishpatch.bat to create a new repository for your game.

Publishing/Running the Server
Once all of these changes are made you are ready to publish and start the server. To publish simply run publishpatch.bat. You do not need any arguments as we changed the default profile in the config. This will publish to the new SVN and things will be ready to roll. After that you need to complete a few steps (this is assuming you have the LAN/WAN settings setup already)

1. Create a new client. New SVN requies a new client.

2. Run upgrade.bat to update the databases and the Character Server. Everytime you create a patch this is needed.

3. Run the server

Once that is ready you can connect and get rolling.

New user/password for SVN (optional)
If you want to use a new username and password for your SVN here are the additional steps.

Setting up the user/password
After you create the repository using the svnadmin step you will need to add new users. Type this in via the command line.

"c:\program files\apache group\apache2\bin\htpasswd.exe" -bc htpasswd newadmin mypassword
"c:\program files\apache group\apache2\bin\htpasswd.exe" -bc htpasswd newstarter newmmo
Once that is done in c:\svnrepo\svnaccess.txt you need to put this entry in instead of the one listed above

[newgame:/]
newadmin = rw
newstarter = r
Checkout
If prompted use the newadmin username and the password of mypassword listed above. If not you are probably using a cached credential and it is trying to pass the old one. If you are using TortoiseSVN click on any folder that has context values for SVN an in the TortoiseSVN menu choose Settings. In Saved Data clear the Authentication data to force it to reask. This will of course break anything else you have at the same URL (127.0.0.1) since it is now using this new username and password for those values.

Config Changes
Make all the changes listed above with these following changes too.

SERVER_WORLD_USERNAME = "newstarter"
SERVER_WORLD_PASSWORD = "newmmo"
In c:\tmmokit\startup.bat change this line

start "%CD%" start /b .\worlddaemon.py -worldname=Premium_MMORPG -publicname=starter -password=mmo gameconfig=%1.cfg
To

start "%CD%" start /b .\worlddaemon.py -worldname=Premium_MMORPG -publicname=newstarter -password=newmmo gameconfig=%1.cfg
Other Tools
Using the IDE
A bit more will be covered later in using the IDE to customize your project, but some basics will be presented here on how to get into the IDE and do some basic work with it. To start the IDE

c:
cd c:\tmmokit
mmoide.py
This will open the IDE. The IDE can be used to customize a project by creating a new project and folders for it. Also, it is a good starting IDE for editting the Python files and compiling the changes needed. You will find it has some basic formatting and works well with Python formatting. The basic use of the IDE will be as follows.

Clicking on the files from the Directory structure to make changes to the files.
Using the search capabilities to find information inside the project files.
Compiling the code to create new databases (also needs to be done to run the Test Client). You do this via World->Compile World.
Test or Edit zones. You can use World->Test Zone to test a zone and World->Edit Zone to open up the zone to be editted inside of Torque.
Starting the devlopment client
This will start the Development Client that runs purely from Python. This is useful for testing without packaging a client. It will use the local contents of the tmmokit directory for its source files. In order to do this simply type this into a command prompt.

c:
cd c:\tmmokit
client.pyw
It should start up and work very similiarly to the the Test Client in the IDE
User avatar
Jackolantern
Posts: 10893
Joined: Wed Jul 01, 2009 11:00 pm

Re: Installing

Post by Jackolantern »

Holy crap! Halls, do you think there could be some tool out there that could make this process a bit easier? I know on Mac there is Brew that allows you to manage downloads and configuration on your OS almost like how npm does for node. I can only imagine Windows has to have something similar.
The indelible lord of tl;dr
User avatar
hallsofvallhalla
Site Admin
Posts: 12031
Joined: Wed Apr 22, 2009 11:29 pm

Re: Installing

Post by hallsofvallhalla »

its honestly not as hard as it seems but it has been a while since I tried. I am going to try to get it running on a raspberry pi.
Post Reply

Return to “Help and Guides”