Académique Documents
Professionnel Documents
Culture Documents
Table of Contents
Credits
Getting Started
Opening the project
Setting up the database
Launching for the first time
Exit menu fix
Full configuration
Using your own map
Transferring assets from another project
Customizing the player character
Mesh and animations
Setting up the inventory doll
Materials and highlight
Character sounds
Customizing the NPCs
Creating items and equipment
open in browser PRO version
pdfcrowd.com
Credits
I would love to thank and give credit to the following:
VaRest Plugin - Vladimir Alyamkin (Ufna)
The authors of the free assets that are used in the demo:
Sword Girl model (used only on the demo server, not distributed) - Bunt Games
Inventory icons - Ravenmore, Flare icons
Black & white icons for empty slots - game-icons.net
open in browser PRO version
pdfcrowd.com
Getting Started
Opening the project
You will need Visual Studio and a source-built version of UE4 to use MMO Starter Kit. If you dont have it yet, follow the
official instructions here: https://www.unrealengine.com/ue4-on-github
Download the release branch since its the most stable. This guide is for UE4 version 4.7.x
The editor will tell you that the project was built with another version, its normal, click Yes.
Note: If it fails to convert, right-click on the blue .uproject icon in the folder with the project and choose "Switch Unreal Engine
open in browser PRO version
pdfcrowd.com
version", choose your engine, then right-click again and choose "Generate Visual Studio project files".
pdfcrowd.com
NOTE: Most hosting providers use the same server for the database and the php so dont replace localhost until
you are sure it doesnt work with it.
3. Upload the scripts to your web server. Get this script and upload it to the same folder.
4. In your web browser, go to
http://yoursite/somefolder/myphpversion.php
If the reported version is 5.5+, proceed to the next step.
5. Now test the php scripts by going to
http://yoursite/somefolder/mmologin.php
If it says {"status":"Login information is incorrect. Check your username and
password."} this means the script is working fine, good job!
If it says Connection failed or Access denied, double-check the database connection info that you filled in
step 2
If instead it displays raw php code (with <? and such), this means that the php scripts don't execute properly on
your webserver.
6. In JSONRequests blueprint, set the Hostname variable's default value to the url path where you've put the
scripts, ending with a slash. For example: http://mysite.com/mmo/
pdfcrowd.com
pdfcrowd.com
Click Play.
pdfcrowd.com
Full configuration
If you want to concentrate on customization and gameplay first, you can skip this for now.
Follow the steps below if you want to configure the full MMO Starter Kit demo setup (launcher/patcher, dedicated server on
Softlayer or other VPS):
1. Run the standalone listen server + client, and check that everything works fine.
2. Build the dedicated server
3. Order and set up a virtual server
4. Configure the patch system and distribute the launcher to your users
pdfcrowd.com
3. Go to Settings > Project Settings > Maps & Modes and change Editor Startup Map and Server Default Map to
the map you migrated over in step 1. Dont change Game Default Map - the game should still start in the main menu.
.
4. If this is the map where new characters should start, in mmocreatecharacter.php set the correct starting
coordinates and rotation (yaw).
5. Make sure that there is a Player Start actor somewhere in the map since it will be used for the location where
players respawn after death.
6. If there are going to be NPCs with pathfinding on this map, make sure that you have a Nav Mesh Bounds Volume
for them to use.
7. If when you play in editor, your character (the one with id 0) falls through the ground, change the saved coordinates
in mysql characters table for that character to an appropriate location on this map.
pdfcrowd.com
pdfcrowd.com
2. Duplicate the GuyModularPC (if you want the player character to have modular equipment) or
GuyPlayerCharacter blueprint located in MMO/Blueprints and name it appropriately. You will work with this new
blueprint for the rest of the steps.
3. Find the GuyAnim animation blueprint (MMO/NewCharacter/). Right-click on it and choose Retarget Anim
Blueprints > Duplicate Anim Blueprints and retarget, then choose your characters skeleton. You will probably
have to uncheck Show only compatible skeletons.
4. Find the newly created animation blueprint - it should be in the same folder as your new characters skeleton and it
has a dark orange line on the bottom of its icon. Open its Anim Graph and click on the first node (State Machine).
In the state machine open the Idle/Run state, choose the central Blendspace node (it will be named like
IdleRun_TPP_Copy) and double-click on it to open the Blendspace.
5. Drag and drop your run, walk and idle animations to the three circles, top to bottom.
pdfcrowd.com
pdfcrowd.com
1. Open the ModularDoll blueprint (MMO/Blueprints) and change the skeletal mesh for components attached to the
Body (Legs, Head, Hands).
2. In the Event graph of the same blueprint find the node Set Skeletal Mesh and set the mesh for the chest there
3. If youve added additional body parts to the ModularPlayerCharacter, plug in the the new body parts to the Set
Master Pose Component node in the Event graph
Character sounds
1. For character sound navigate to the character blueprint that youve created in Mesh and animation tutorial
2. In the Defaults tab under the category Sounds you can find three arrays: Pain, Attack and Death sounds. Each of
them can have as many sounds as you wish - they are chosen at random.
Chance Of Sound variable determines how often the pain and attack sounds will be played (death sound is always played).
pdfcrowd.com
pdfcrowd.com
2. If you open an item and its details are not visible, click on Window menu and put a check next to Details.
pdfcrowd.com
Note: The current method of storing the items in the mysql database is not optimal for shipping (though its easy to use for
internal testing). It stores the full path to the item in your Unreal folder - this results in long strings that take time to transfer,
but allows the developer not to worry about ids or where they store their item assets. To optimize the network load you could
either implement some id system, or at least store only the name of the item in the db and let Unreal add the path to the
folder (and make sure you place the items in one folder).
pdfcrowd.com
After that you will be able to create a Book asset with 1 additional string field.
pdfcrowd.com
Visual Studio
2. Add or remove the item quality tiers.
pdfcrowd.com
2. In the resulting window, you can select a single asset and edit its properties (to the right).
3. To edit multiple assets at once, select all the assets that you want to modify with shift and modify the properties
that you want just like you would to with a single item.
Note: in property matrix you can sort the assets by any property by pinning the property so it shows up in the table and
clicking on the column name.
pdfcrowd.com
pdfcrowd.com
pdfcrowd.com
pdfcrowd.com
14. Set all Offsets to 0. The widget should take all the available space now.
15. Go to the Graph view. In the beginning of Event Construct, set the Owner variable on your new window to Self,
just like it's done for Inventory/Equipment windows:
16. At the end of Event Construct, add a pin to the Make Array node and add connect your new window there.
17. (skip this if your window doesnt need use a hotkey to open it) Now we need to assign some key to toggle our
new window on and off. Open the MMOPlayerController in MMO/Blueprints and find the yellow comment block "C
key: toggle equipment". Make a similar one with the key of your choice.
Q: Why do we have a Canvas panel as the root for the draggable window widget and not the window itself?
A: This way the window can have popups that exceed the windows own borders.
pdfcrowd.com
Listen Server
A listen server acts both as a server and as a client. Since the focus of this kit is to create a MMO running on a dedicated
server, the listen server doesnt fully act as a regular client (it doesnt have UI, etc). However, it is very useful for testing
standalone builds since there often are differences between Play in Editor and standalone. It is highly recommended to test
your builds with Listen Server + Client combination before packaging.
1. In your MMO project folder, there are two shortcuts: UE4Editor.exe - Client and UE4Editor.exe - Listen Server.
Right-click on one of them and edit the Target field so it corresponds to your Unreal Engine folder (first path) and
MMO project folder (second path). The -local parameter is specific to MMO Starter Kit and tells the client it needs to
connect to local game and chat servers. If you want other people to connect to your server, remove the -local
pdfcrowd.com
2. Run the Listen Server. When your map has appeared, run one or more clients.
Note: the listen server wont have any UI, its normal, the kit is supposed to be running a console server anyways. I run the
listen server + client combo only to ensure that the standalone is working before packaging.
Tip: you can run those shortcuts even when you have the editor open.
Dedicated Server
A console dedicated server is needed in order to run your game on a virtual/bare metal server (for example, Softlayer or
Amazon) which normally have no video cards and to maximize performance.
1. Make sure that everything works fine when you run a Listen Server + Client, it can save you hours of packaging.
2. Open VS (File > Open Visual Studio), choose Development Server configuration. If you dont have this option,
pdfcrowd.com
4. Depending on your machine, this can take from 30 minutes to about 2 hours. You will only have to do it once per
the version of Unreal or until you modify something in the engine or game code.
5. After its done, switch the configuration from Development Server back to Development and close the Visual
Studio.
6. Now its time to package your game since a dedicated server only works with a packaged game. First, go into File
> Package Project > Packaging settings and check Full Rebuild. Next time you package the game, you can
uncheck this setting and the packaging will be much faster - around 2 minutes. But each time you modify the source
code of either the engine or the game, you will have to do a Full Rebuild again.
7. Make sure Use Pak file is unchecked:
pdfcrowd.com
8. Go to File > Package Project and choose the target hardware and an empty folder for the packaged game. The
pdfcrowd.com
pdfcrowd.com
pdfcrowd.com
If you have PayPal, you can pay with it instead of a credit card, then your order will be processed instantly. Credit card
orders can take longer or even fail if for example you live in Europe and your bank requires a special verification. The website
says your order will be processed within 15 minutes. If you don't receive an email from Softlayer in 15-30 minutes, you can
contact their live chat directly - they answer immediately 24/7 and are very helpful!
3. Once your order has been approved, you'll receive your login and a temporary password, log in and change the password
to a permanent one.
4. Wait until you get the email saying the server has been provisioned and is ready to use.
5. In Windows, Run > Remote Desktop Connection. You might want to pin it for ease of access in the future. In Softlayer
control panel, go to Devices, double click on your server and use the ip address, username and password from there for
the remote connection.
6. On your server, open up Internet Explorer and go to the cloud where youve uploaded the files in step 1. Download all the
files that you've put there.
7. On your new server, install the prerequisites located in your packaged games folder Engine\Extras\Redist\en-us. Start
your dedicated server and chat server. Copy the ip of your server from the Devices page to 'mmologin.php' script. Try to run
the game as a client (using the .exe from your packaged game folder) and see if it connects to your new server.
If everything is ok, go to your Softlayer control panel, click Devices, click on your server's name to open a Device Details
page then Actions > Create image from device. This will allow you to create new servers that are exactly like the one
you've setup (with Unreal already there and dependencies already installed) without going through all the steps again. Making
an image can take more time than is estimated, give it around 30 minutes.
pdfcrowd.com
doesnt require installation, is only 2.5MB and has everything I need including a log file.
pdfcrowd.com
Debugging PHP
Q: One of my PHP scripts is not working, how do I find the error?
A: After each VaREST request the response is written to the UE4s Output Log (Window - Developer tools - Output log).
A) If the response code is 200, this means the php script is working fine:
B) If the response code is not 200, it will usually also list your php version. If the php version is lower than 5.5, you need to
upgrade your php server.
C) If the response code is not 200 and the php version is 5.5+, you have to look for your php server logs - the location
of these can vary depending on your hosting, some of the hosting providers allow you to access those from the control
panel, others allow ftp access.
If youve written the new php script yourself, you can also use the online php checker to check it for syntax errors.
pdfcrowd.com
Other issues
Q: I cant connect to my remote dedicated server. The IP address in mmologin.php is correct. If I run a local
dedicated server and use -local parameter on the client, I can connect just fine.
A: Check your firewall settings on your local machine and on the dedicated server machine. Check that the 7777 and 7778
ports and the client and server UE4 applications are not blocked.
If youre hosting the dedicated server yourself, check the ip in the server console. If the ip is private (starts with 192.168. ),
open in browser PRO version
pdfcrowd.com
pdfcrowd.com
pdfcrowd.com
Q: When testing things in editor, I cant seem to block the controller movement/mouse look in the starting map
with the menu. SetIgnoreMouseInput and SetIgnoreMovementInput dont work.
A: Make sure you are running the starting map with Dedicated server turned off and 1 player.
pdfcrowd.com