How to configure a nice server ! [Added to Wiki]

For any problems with Dawn of Light website or game server, please direct questions and problems here.

Moderator: Support Team

How to configure a nice server ! [Added to Wiki]

Postby Graveen » Sat Oct 20, 2007 10:13 am

I M P O R T A N T: with DoL Setup, you no longer need to to the database import step !

Hello,

I'd like to help before asking something. All this comes from my own recent experience.

From my job, I know the complexity of comprehension between users and developpers, i hope this topic will help.

1) DOL for dummies

DOL is a server. This means there is no graphical part to DOL, except future 3rd party tools; DOL is intercepting what your DAOC client - the program you normally run - is asking and answers it accordingly. DoL runs in a 'console', the black box filled of text lines appearing when you run it; you can consider the server functional if the last line of the console do not contains an error message saying the server is stopped. When fully loaded, the server will state it is ready, announcing it is 'open for connections'.

DOL is only the means to answer the requests of DAoC clients. DOL 'speaks' the same language, handle answers, execute actions and reply. Some answers are searched into the MySQL database (or XML files if you prefer them). DOLServer determines facts (positions, etc...), triggers events, handles various things such as AI or actions, and database is storing data-side items: mob description, abilities description, characters description, items created...
For external actions, there are scripts. Scripts are part of code easily modifiable compiled at DOLServer execution. It allows you to extend DOLServer features in implementing various way of working, statics pnjs, quests. Scirpts are not in the database, and are loaded at DOL's start by itself.

So actually, you need these things at the start:
- the DOL server software
- a database for objects - objects are generic: they are mobs, items, spells, npc... (or XML files which do the same things, but with longer load times - MySQL is highly recommended. It seems XML is dead as DOL won't release & support it. Even a blank DB is allowed for testing purposes.

The goal of DOLServer is to emulate Mythic's DAoC servers. The package, far to be complete, allows numerous actions & DB items. You could help us to improve this in either populating databases sections, coding non-implemented features, or even doing bug reports.

2) Ok I understand but... what do I do now, precisely?

Precisely... you have just to download from this page the DoL server (and the dumped database ALTHOUGH we'll not use it in this chapter). Install DOLServer, launch DOLServer.exe - you should have the config dialog if this is the first time you run it - choose XML in database settings, save these settings, and double click DOLserver.exe. You can again change the settings by running DOLConfig.exe

Now, let's try to reach this server with a standard DAoC client. For this, download DAOC Portal, a simple means to connect to private servers without editing your client files (it also allows you to connect to some free shards on the net), then run it; choose DAoC the client directory, select the tab 'custom' shard, File-> add custom, accept parameters*, put username and password and select new added custom, then press play.

*for your own machine, try the I.P. 127.0.0.1 and port 10300 as default. If connection trouble persists, it may be your firewall blocking DoLserver, or windows firewalls.

Eventually deal with your own firewall.... and....

Miracle! It WORKS!
Your client connects to the wonderful startup land of DOLtopia!

Note : by default there is auto-account creation, and the first created account will have admin rights.

And YES, because everything is user defined, you can make a warrior+warlock+with pets and plate+dual weapons+ defender's rage growth rate on taunt style with champion's debuffs! This is the strength and the complexity of the product ;)

But for obvious reasons, servers try to reproduces classes as on EA/Mythic's DAOC.

With your default server pack:
Normal commands are working: /quit, etc...
Gm commands are working (select yourself, type /speed 2000, and move... wahow!). Try /player level 50 !
There are also admin commands which allow Admins to grant privilege (gm/admin) to other's accounts.

Guys, it is working fine, you now have to configure your OWN world....
Last edited by Graveen on Sun Oct 21, 2007 10:20 am, edited 9 times in total.
User avatar
Graveen
Project Leader
 
Posts: 12661
Joined: Fri Oct 19, 2007 9:22 pm
Location: France

Postby Graveen » Sat Oct 20, 2007 10:14 am

3/ working with the database

Databases ('DBs') concepts are certainly very conceptual for those who are not working with them. Simply remember that this DB permits the server to access quickly and easily all objetcs used by DOLServer.

It keeps track of user created objects, such as Spells effects, Classes description, Accounts, Mobs, Items, Housing.
For example, a simple mob is described with a loot of parameters.
Obviously, there is model used, level, damage type, location. But also, you could find pathing, respawn, drop list... In fact a lot of parameters.

And a mob drop litst ok but... what items does it drops ?
...there is also an item database ;)

You do not want to reconfigure mobs / pnjs / items / spells / classes / each time you run the server, i guess ? That's WHY you need to use this way to save objects. And, as said above, there could be thousands of objects, so a powerful access mode is needed - our DB.

Carefully read Supgee topic even if you are not understanding entire thread. It deals with aspect you 'll soon be familiar with.

Precision:
a) Visual C# is for compiling core DOL, you have already downloaded core, skip it.
b) TortoiseSVN is to get the source code of DOL for compiling with a), skip it if you have core binairies
c) MySQL is a database engine, it creates and run an engine for reading.writing datas in a DB. Get it, in version 5
d) Navicat is a front-end for any MySQL DB. Get Navicat lite, which is free, to perform easy maintenance

c) and d) can be found in a package called Uniform Server which contains MySQL DB engine and phpMyAdmin - which replaces Navicat. Thus, no need to install something. Others WAMP software exists like Vertrigo (google it).

The only important thing is to have a functionnal and running MySQL DB. A tool for filling the DB is useful, but you can do it with mysql command line tool.

Look at this page which is graphically explained: nice guide

For me, the import methode with command line generate less errors than with Navicat or with phpMyAdmin import fonction.

With cmd line, the user on the tutorial above create DOL DB and fill it with downloadable SQL files. Of course, do not use tortoise or VC# parts, you already have compiled binaries.

So, all right, create the DB called DOL - without tables and fields, they 'll be auto created at DOLServer start.

Now, time to say DOL that we WANT to work with a DB. Open DOLConfig.exe, choose Database Type = MySQL

From previous read, i guess the parameters are clearly for you:
1/ Place where database is hosted, for us on our computer:
Host = localhost
2/ Name of the DB that the server will use:
Database = DOL
3/ Because the DB need credentials, let's give it the only we choose: root
Login=root
Passwd=root passwd you choose.

Launch the server - it 'll create missing tables
Shutdown it

Now import .sql file downloaded above.

With 1.902 server and 1.902 DB, you shouldn't have errors.

If you have error, read carefully the error and...hu...try to fix it. Try continue and pray, perhaps if was NOT an important table (such as abilities or spells :p).

Finally, launch DOLServer.exe again. It now takes more times to be operationnal.

4/ bah Shit, i got errors !!

unique answer: eeeeeerf ! :D

Q) OMG ! Navicat make a lot of errors ! and phpmyadmin limits the size of the .sql file to import !
A) ok. first, mySQL .sql file are a batch of SQL commands. Only. SQL commands are a way to create DB, create Tables, create Fields into table and fill tables. They are human readable. So, you can cut in 3 littles files the big one spell.sql

Q) Ok but you did not answer my question
A) Sure. i don't know why Navicat Lite is making some types of errors. But i know it works fine with ysql Gui Tools or phpMyAdmin, and better with cmd line. For me Navicat is damn slow and you have to insert .sql file one by one , while cmd line is quick and batched. In case of errors, just read what is the error, and fix it. there is errors because some fields have typed data not of the same type, or do not allow for example and empty field.

Q) So please explain me yours errors and how you fixed it
A) Ok. but we are above the aim of this tutorial. I mainly found 3 errors.
* i got a message "Not null allowed". It means a field in DB must not be empty, and the data field we are importing is empty.
Clean solution: in .sql file, fix all the value which do not match, but you have to know the format of the field ( '0' for text, 0 for integer,etc...)
Dirty solution: change field null value to true (null allowed)
And try again.
* i got a message "Header (or field) not existing". it means DB evoluate and necessary fields were added later.
Clean & Dirty solution: create the field. And try again
* on server launch it crashes with "DateTime from mysql can not be converted to System.DateTime". There is invalid date in DB (0000-00-00 00:00:00)
Clean & Dirty solution: make SQL request to update datetime to a valid value (i used 'now').

Q) now we are in Q&A, damn, why everybody spoke about SVN source repository and .NET compiler if it is not needed ?
A) Because DOL is actually under development. You need to periodically compile core to get features, or to tune code in case of personnal server. But, unlike you are familiar with C# and DOL arch, do not use source and compiler. Prefer for now compiled version
Last edited by Graveen on Tue Oct 23, 2007 2:02 pm, edited 12 times in total.
User avatar
Graveen
Project Leader
 
Posts: 12661
Joined: Fri Oct 19, 2007 9:22 pm
Location: France

Postby Graveen » Sat Oct 20, 2007 10:15 am

5/ Database and Scripts

Remember, the important part of this tutorial is that you fill your DB with useful items, mobs, classes spec, abilities to have a nice set of features available. This is the reason to be of this DOL database.

But DOL without DB is not a dumb world. Ok, your characters does not have abilities or spells (yes yes they are in DB) but with DOL source are supplyed core and scripts.

Remember,
DB contains world description.
Scripts contains external part of code. A talking NPC is a script. A world manager is a script.
DOLServer core is all that is not scripts or database entries.

Scripts included with DOL stand in /scripts folder. Scripts folder is read and compiled at server startup. A bad script can cause DOLServer not to launch. To add a script to your server, simply copy the script file in your script folder (DOLpath\scripts). You can create sub-dir, it does not matter.

To understand difference between DB and code, look at this simple example:
- you use a command to create and set up a mob, but all the parameters of this mob are saved in DB
- you use a command to create an item and this item is saved in the db, for future use
- you use a command to attribute our item at our mob in loot table, and this association (mob with theses droppables items) are saved in the DB.

Also
In DB there is possibles abilities or spell of your classes, because they are listed.
In DB there is your classes, with rattached abilities and spells.

But even without filled DB (or just newly created), you can create and fill some parts of DB from ingame: mobs, items, etc... Try it at the very beginning, create blank DB, run DOLServer (it 'll create all tables) and read further.

Now, let's understand script handling.

As i said previously, all scripts are under scripts directory, with extension .cs (c# file). To read, just open it with notepad.

Browse this dir, look in playercommands. a loot of common commands don't you think ?

-> In gmcommands you have the necessary tools to create objectslike items, mobs, game objects.

-> a namespace is a librarie. It could be assimilated to a path.

!!!!NAMESPACE ARE CASE SENSITIVES : DOL.GS.Scripts.TownCrier is not the same as dol.gs.scripts.towncrier !!!!

first exemple: this scripts:
Code: Select all
using System;
using DOL.GS.PacketHandler;

namespace DOL.GS.Scripts
{
[CmdAttribute(
"&time",
(...)
it says:
namespace DOL.GS.Scripts is the 'path' of the script.
"&time" mean /time: this is the name of the script - here a command
you invoke it in typing, from ingame and with an admin/gm account:
/time

this one:
Code: Select all
using DOL.Database;
using DOL.Database.Attributes;
using DOL.GS.PacketHandler;

namespace DOL.GS.Scripts
{
public class TownCrier : GameNPC
{
(...)
it says:
namespace DOL.GS.Scripts
TownCrier : GameNPC is the 'type of the script, and inform us how to use (each type got its own way of work)

you can see you do not have an &XXXX for command /XXXX. Instead there is GameNPC class, a script which permits you to 'summon' tuned NPC.

GameNPC is a type, the type of NPC.
TownCrier is derivate from GameNPC, thus you have to call it like a GameNPC object.

GameNPC are called by the /mob script, a script implementing a command which is instancing new class.
in this case: /mob create ObjectName
ObjectName is replaced by the path of the script (DOL.GS.Scripts and name of class).
You invoke it in typing, from ingame and with an admin/GM account:
/mob create DOL.GS.Scripts.TownCrier

After, type /mob for basic help, select New Mob and play:
/mob Name Test
/mob model 123
etc...

Feel free to explore all scripts, remember given scripts commands are in playercommand, npc scripts are into custompc.

Create mob and npc with /mob, merchant with /merchant, items with /item .... Test it !
Download new scripts on these forums, experiment.

Important: you must have at least GM Privilege to do this. Use the first created account or chainge this in DB -> table account -> field PrivLevel (set it to 1 or 2)

Results of mobs/items/objects/merchants creation are stored in DB, so they'll be available if you reboot server.

Once you DB is nice, you can export all table to a solid archive, so called a dump. In case of problems, you could recreate blank DB and import a dump. this is a way to backup and restore DB. Once you consider your DB is stable, dump it.

Bored of creating items and quest ? there is 2 utilities, ItemCreator and QuestCreator, which creates items and save them in DB, idem for quests.

Hard part, isn't it ?. Be strong: you potentially know all that is necessary to be a wonderful GM !!
And last but not least,do not forget to share your implementations with DOL team !
Feel free to post on this forum if any questions ;)

gl & hf,
Last edited by Graveen on Mon Oct 22, 2007 10:28 am, edited 7 times in total.
User avatar
Graveen
Project Leader
 
Posts: 12661
Joined: Fri Oct 19, 2007 9:22 pm
Location: France

Postby Dinberg » Sat Oct 20, 2007 1:26 pm

I very much like this as an explanation of what an emulator actually does. What language do you speak graveen? I was thinking french due to 'equilibre' This is a highly comendable piece and I'd love it if you would allow us to tidy up a few errors so that it can be understood more easily.

Thank you very much!
The Marvelous Contraption begins to stir...
User avatar
Dinberg
Inactive Staff Member
 
Posts: 4695
Joined: Sat Mar 10, 2007 9:47 am
Yahoo Messenger: dinberg_darktouch
Location: Jordheim

Postby stealth215 » Sat Oct 20, 2007 1:31 pm

i vote sticky?
Image
Batlas: ...180982168721657816182761875612765127652176512762576576576^17867
Stealth215: i believe the proper term for that is a kajillion
Batlas: Thread winnar!
Stealth215 yay me!
User avatar
stealth215
Inactive Staff Member
 
Posts: 1113
Joined: Mon Nov 06, 2006 3:29 pm
Location: Milwaukee, Wisconsin

Postby Dinberg » Sat Oct 20, 2007 1:33 pm

As do I ;)
The Marvelous Contraption begins to stir...
User avatar
Dinberg
Inactive Staff Member
 
Posts: 4695
Joined: Sat Mar 10, 2007 9:47 am
Yahoo Messenger: dinberg_darktouch
Location: Jordheim

Postby Graveen » Sat Oct 20, 2007 1:34 pm

I very much like this as an explanation of what an emulator actually does. What language do you speak graveen? I was thinking french due to 'equilibre' This is a highly comendable piece and I'd love it if you would allow us to tidy up a few errors so that it can be understood more easily.

Thank you very much!

I'm french ;) edit it if you have right, or perhaps i could put it in wiki mode ?? ;)
User avatar
Graveen
Project Leader
 
Posts: 12661
Joined: Fri Oct 19, 2007 9:22 pm
Location: France

Postby Dinberg » Sat Oct 20, 2007 1:39 pm

The wiki is open for everyone to use, you only need to register - and dont worry about mucking it up, we can revert to older versions ;).

But this article is something that wouldn't do too bad in the support section aswell ;)
The Marvelous Contraption begins to stir...
User avatar
Dinberg
Inactive Staff Member
 
Posts: 4695
Joined: Sat Mar 10, 2007 9:47 am
Yahoo Messenger: dinberg_darktouch
Location: Jordheim

Postby stealth215 » Sat Oct 20, 2007 1:42 pm

stickied :)

and we'd love to have you continue to post it in the support section, but you're more then welcome to add it to the wiki as well
Image
Batlas: ...180982168721657816182761875612765127652176512762576576576^17867
Stealth215: i believe the proper term for that is a kajillion
Batlas: Thread winnar!
Stealth215 yay me!
User avatar
stealth215
Inactive Staff Member
 
Posts: 1113
Joined: Mon Nov 06, 2006 3:29 pm
Location: Milwaukee, Wisconsin

Postby Graveen » Sun Oct 21, 2007 8:31 pm

bump, if somebody can read me and say me if there is mistakes ;)
User avatar
Graveen
Project Leader
 
Posts: 12661
Joined: Fri Oct 19, 2007 9:22 pm
Location: France

Postby Dinberg » Sun Oct 21, 2007 8:54 pm

I shall go and check it now ;)

EDIT: First two checked up, I'll have to do three to 5 later when my headache has cleared off.
The Marvelous Contraption begins to stir...
User avatar
Dinberg
Inactive Staff Member
 
Posts: 4695
Joined: Sat Mar 10, 2007 9:47 am
Yahoo Messenger: dinberg_darktouch
Location: Jordheim

Postby Graveen » Sun Oct 21, 2007 9:25 pm

thx a lot. i hope it isn't my english that gives you headache ;)
User avatar
Graveen
Project Leader
 
Posts: 12661
Joined: Fri Oct 19, 2007 9:22 pm
Location: France

Postby Dinberg » Sun Oct 21, 2007 9:26 pm

Nope, just been unwell alot this week heh. Thanks again Graveen ;)
The Marvelous Contraption begins to stir...
User avatar
Dinberg
Inactive Staff Member
 
Posts: 4695
Joined: Sat Mar 10, 2007 9:47 am
Yahoo Messenger: dinberg_darktouch
Location: Jordheim

Re: How to configure a nice server !

Postby Xlite » Mon Nov 05, 2007 9:32 am

Okay, so i read everything and followed the visual guide, but i still end up with one annoying error.

Everytime i open DOLServer.exe i get red text with the following:
Attachments
error.jpg
error.jpg (146.01 KiB) Viewed 31965 times
Xlite
DOL Guest
 
Posts: 3
Joined: Mon Nov 05, 2007 9:23 am

Re: How to configure a nice server !

Postby Etaew » Mon Nov 05, 2007 11:10 am

the server your hosting on, does not have permission to access the mysql server
Retired DOL Enthusiast | Blog
User avatar
Etaew
Inactive Staff Member
 
Posts: 7602
Joined: Mon Oct 13, 2003 5:04 pm
Website: http://etaew.net
Location: England


Return to “%s” Support

Who is online

Users browsing this forum: No registered users and 0 guests