cRPG > Guides

How to set up a c-RPG-Server [+cRPG-server 0.271 ]

(1/11) > >>

Blaint:

--- Quote from: Meow ---Maybe someone feels like writing a complete guide on setting up a server on our guides forum.

--- End quote ---


So here is a guide to set up a c-RPG-Server
if things are incorrect notice me about it.


Requirements:
- a server/vserver, that can host a warband server with players >= 20.
- some knowledge of ftp/telnet
- knowlege of unrar/unzip
- knowlege of .bat files

If you have a linux server:
- general knowlege of linux (navigating for example)
- knowlege of .sh files
- knowlege about "screen/s"

I uploaded a "default" cRPG dedicated server.
If you have problems with the orginal dedi. server or are just too lazy, use it and skip Chapter 1-2.
(you only have to add the latest cRPG module folder (cRPG -> %/Default cRPG dedicated-server\Modules))
Download (cRPG 0.271 - outdated) :mbrepository   M&B-Nexus     uppit


Chapter 1: Download
The first thing you need are the offical dedicated server-files.
You can get them from the Taleworldswebsite->downloads (or simply here http://download.taleworlds.com/mb_warband_dedicated_1143.zip)
Now unzip the file where you want (on your server)
You should now have a folder "<your path>\Mount&Blade Warband Dedicated"
In this folder you can see some .bat files.
The .bat (you have to create sh files for linux) run the server with your configs.
if you open "Sample_Battle_start.bat" with a editor you can:

--- Code: ---mb_warband_dedicated.exe -r Sample_Battle.txt -m Native
--- End code ---
But what is the meaning of these parameter ?


--- Code: ----r Sample_Battle.txt
--- End code ---
This starts the server with the configs from Sample_Battle.txt


--- Code: ----m Native
--- End code ---
This loads the module "Native". (See instructions below how to integrate crpg)


Chapter 2: Integrate c-RPG
Now download/upload the last version of c-RPG  to your server and unzip it in the folder "Modules"
After that create a new .txt and name it what you want(where you have your Sample_Battle_start.bat ).
Copy the content of "Sample_Battle.txt" or "Sample_Siege.txt" in this .txt file (and save)
The next steps are different, if you use linux or windows.
(click to show/hide)Now create a new .bat  on your server(where you have your Sample_Battle_start.bat )
(click to show/hide)1. create a new textfile
2. rename the file to <yourconfigname>.bat (instead of .txt)
You can choose you own name for this (i choose "cstart.bat")
Open this file with a texteditor and past the following:

--- Code: ---mb_warband_dedicated.exe -r <your config file>.txt -m cRPG
--- End code ---
now replace <your config file>.txt with the name of your config.txt (and save) (click to show/hide)1. create a new .txt files
2. Open it
3. Paste  (click to show/hide)#!/bin/sh
mbdir="/whatever/warband/"
process=`ps auxw | grep mb_warband_dedicated.exe | grep -v grep | awk '{print $11}'`
touch /tmp/mb-server-check
if [ -z "$process" ]; then
  touch /tmp/mb-server-check-error
  echo "MountBlade Server seems to be offline, restarting it..."
  cd "$mbdir"
  screen -d -m  wineconsole --backend=curses mb_warband_dedicated.exe -m cRPG -r <your config file>

fi4.  Change
--- Code: --- mbdir="/whatever/warband/"
--- End code ---
to you Server-file directory  (the part after
--- Code: ---mbdir=
--- End code ---
)
5. Replace
--- Code: ----r <your config file>
--- End code ---
with the name of your config file (the part between "<>"
6. Save
7.Rename the .txt file to <nameofyourchoice>.sh

Chapter 2.1: Warband Script Enhancer Integration
The WSE should come with the crpg module folder.
To integrate the WSE do these 2 steps:

1. copy the content of the WSE folder (in the crpg module) to your server's main folder (where your mb_warband_dedicated.exe is)
 
2. edit your startfile (.bat or .sh) like can see below:


--- Code: ---mb_warband_dedicated.exe -r <your config file>.txt -m cRPG
--- End code ---

to (for ex.)


--- Code: ---WSELoader.exe -r <your config file>.txt -m cRPG
--- End code ---

done


Chapter 3: Configuration
You now have to edit your config file , after you wishes.
The most of them are self-explanatory but here are some important(you should change them before start):

--- Code: ---set_pass_admin
--- End code ---
sets the server-admin-password to ones of your choice (check Chapter: Administration for more infos)


--- Code: ---set_server_name
--- End code ---
sets the servername to ones of your choice (e.x "set_server_name EU_cRPG_42)


--- Code: ---set_welcome_message
--- End code ---
set the welcome message   to ones of your choice


--- Code: ---set_enable_valve_anti_cheat
--- End code ---
enable(1) or disable(0) VAC (not realy supported by M&B, so you can set it to 0)


--- Code: ---set_map <map_id/map_name>
--- End code ---
Sets the start map to the one of your choice (maybe i will add a Chapter: How to add maps)


--- Code: ---set_mission
--- End code ---
set the start Gamemode of you server.
(click to show/hide)multiplayer_bt – Battle
multiplayer_cf – Capture the Flag
multiplayer_hq – Conquest
multiplayer_sd – Search & Destroy
multiplayer_duel – Duell
multiplayer_dm – Deathmatch
multiplayer_tdm – Teamdeathmatch
(multiplayer_dtv - Defend the village ?)


--- Code: ---set_control_block_direction 1
--- End code ---
set the block typ to auto(0) or manual (1)
Use manual !!!


--- Code: ---set_friendly_fire_damage_friend_ratio 50
--- End code ---
half  damage to friends


--- Code: ---set_melee_friendly_fire 1
--- End code ---
melee FF (1 = on; 0 = off)
Use 1 !!!


--- Code: ---set_friendly_fire_damage_self_ratio 0
--- End code ---
no damage to yourself on teamhit


--- Code: ---start 
--- End code ---
starts the server
DON'T TOUCH IT

List of  all options : here

Some hints for configuration:
* you can not change the value of money/exp granted this way
* some functions are locked (by crpg/gamemode)
* use a cfg like the offical server ( and/or nothing which gives advantage)
* you can find all these configuration options in a readme comming with the serverfiles, too

Chapter 4: Start-Server

(click to show/hide)just start the specific .bat file (i used as example "c-RPG_start.bat")
Now the server ist started.
(click to show/hide)1. Connect to you server using the terminal/telnet(putty)
2. navigate to the dircetory of yor .sh start file
3. execute the command:
--- Code: ---sh <yourstartscript>.sh
--- End code ---
4. The Server should now be running
(5. Special features of the sh script in this guide = autocrashrestart;autodetach)



Chapter 5: Maps & Mapcycle
In this Chapter, i will try to explain wehere you can find maps and how to add them to the Mapcycle.
There are different ways how to add maps, i will try to explain the methode we are using on our server atm.

Chapter 5.1: Where you can find maps

Way One:
Search for maps at the Scene-editing forum
Just download the map and read Chapter 5.2

Way Two:
Get the maps, you have downloaded from other servers.
You can find them at:
C:\Users\<user>\Documents\Mount&Blade Warband\SceneObj.

Chapter 5.2: Add Maps
Normaly you should have/see two different files scn.<yourmapname>.txt and scn.<yourmapname>.sco.
Copy the scn.<yourmapname>.sco to your server's scene folder (Mount&Blade Warband Dedicated/Modules/cRPG/SceneObj).
Now navigate to "Mount&Blade Warband Dedicated/Modules/cRPG" and open the file scenes.txt.
Overwrite one of the scn_blank_"x" with the content of  scn.<yourmapname>.txt
(click to show/hide)
--- Code: ---scn_blank_1 blank_1 256 none none 0.000000 0.000000 100.000000 100.000000 -100.000000 0x00000001394018dd000649920004406900002920000056d7
  0
  0
 outer_terrain_plain
--- End code ---
to

--- Code: ---scn_multiair_kirthaen_ats multiair_kirthaen_ats 256 none none 0.000000 0.000000 100.000000 100.000000 -100.000000 0x00000003300428a6000338ca000049520000119b00002292
0
0
outer_terrain_plain

--- End code ---

If you now choose the map Blank_"x" on the server, your new map will be loaded.
Maybe this is not the easiest way...

Chapter 5.3: Map/Scene - cycle
Open you serverconfig and search for the lines with "add_map ... "
There you can see your map-rotation.
Now you can simply edit/remove/add this lines to add/remove new maps to the scene-cycle
using the format :
add_map <mapname>
Note: You have to restart the server after you have done your changes.


Chapter 5.4: Scene Strings/ingame scene names
After you have added the scenes to your server/-cycle you still have the problem that they were shown ingame as Blank X or the name of the map, which got overwritten with the another/new scene.
To let the right names shop up IG you have to edit the strings.txt (<yourserver/modules/cRPG)
When you open the strings.txt you can see the lines are in the format:

--- Code: ---str_<string> <Displayname>
--- End code ---
You can now simply add/replace the blanks with your new maps using the format:

--- Code: ---str_<mapname> <displayedmapname
--- End code ---
Here an example:
-you want to add the Heisenberg map (scn_Heisenberg.sco)

--- Code: ---str_Heisenberg Heisenberg
--- End code ---
the map would be shown ingame as Heisenberg.
After you have edited the file save it.
You may have to restart the server before the changes take effect.

note: Since patch 2.32 many  scene_strings were already added

Chapter 6: Administration
Before you connect to your server, enter your choosen Admin password in the Server-Password field.
After that connect to your server.
When you press ESC you can see that you now have a button "Administrator Panel".
If you click it, you can see several changeable options.
Here you can edit the most of the options of the config file.
But attention: They won't get saved (after restart).
You also have now the ability to kick/ban players without a vote

(click to show/hide)- Bans are permanent, to remove a ban open the banlist (in the server dir.) and remove the line of the ban)
- Votebans last 1h and can't be removed
- change the name of the server,while the server is connected to the database (gold/exp) will stop gold/exp gain
  rename the server to old name and gold/exp gain will start again

FAQ (Frequently Asked Questions)

These questions were not frequently asked in this threat, why have they been added to the list ?
- In the FAQ you can find answeres to some Questions/problems you still may have.

Isn't there a easier way to add new maps ?
- yes, i think look here  (but for me this methode is easier).

I don't get any XP/Money on the server?
- Take a look at :  here .

What mean the part with "<>" (ex. <yourconfig>.txt)
- That means that you can choose you own name for this file (it's like a variable)

How can you set the number of slots > 64 ?
- old:  Take a look here
  new: with the WSE implented you should be able to set the slotlimit >64 i think


Iam the server owner but i cannot find the button for admin-ranks/permission ?
- Your server is probably not connected to the Database.
  First take a look at that, before you contact a admin/dev

Why aren't there more FAQs ?
- dunno, ask! :D

Credits:
 The D-O-N-K-E-Y crew/devs :arrow: for this awsome mod and the chance for everyone to create a server
 Inquisitor_Renegade :arrow:  who  published the linux start script.
 cmpxchg8b  :arrow: for the WSE(Warband Script Enhancer).






I hope this is a guide was useful for you to create a crpg server or just for informativ reading

good luck
 Blaint
 

Blaint:
You need help? Something is too hard to understand? You have n idea for a new Chapter? 

===>> post it in this thread

this will help me improve the guide

// placeholder

Espu:
Thought I'd share some scripts from my Linux-hosted dev server. Use them if you want. I use them in combination with Vincenzo's guide
with awesome success. Used on Ubuntu server 10.04.

First script just starts server under wine following Vincenzo's instructions.

run_server.sh

--- Code: ---wineconsole --backend=curses /path/to/server/mb_warband_dedicated.exe -r config.txt -m cRPG

--- End code ---

That one isn't much good however, as you want the server to run in screen so you can disconnect the ssh session. This executes the above script with screen in detached mode. You won't see anything in the console, use screen -r after this to access the server.

server_start.sh

--- Code: ---screen -d -m sh server/run_server.sh

--- End code ---

server_start.sh and run_server.sh should obviously be in one script in most cases. I have them separated for dev server reasons.

Final magic script: find the running server from process list and kill it. This could probably be done in a better way, but I'm no guru and this works. I use it in conjunction with server_start.sh to restart server when needed. No idea what would happen if it was used with multiple servers running, probably kills them all.

server_kill.sh

--- Code: ---ps auxw | grep mb_warband_dedicated.exe | grep -v grep | grep -v wineconsole.exe | awk '{print $2}' | xargs kill -9

--- End code ---

Espu:
Before I forget, seems like a good base for a guide. Probably needs some tweaking based on input from people trying to use it, but a good start. I'll sticky it in the server section once we figure out how the server stuff is going to be organized here.

I would either ask Vincenzo's permission to take parts from his guide or just make link to his thread more visible. It's a great guide, I set the server up based just on that. http://forums.taleworlds.com/index.php/topic,113653.0.html

Blaint:
yes, the guide maybe needs some tweaking.
I planned to extend and optimise the guide  based on the responds from people trying to use it (which is so far 0 responds )
I linked you linux sh script with Chapter 2 ( i will move it, this is only for now)
Maybe some parts are a litte bit too hard to understand (because english is not my native language)
Another thing:
 We need some information how to create a server with more slots than normal supported (e.x. 200 slots)
 Meow said something about Hex editing...


--- Quote from: Vargas ---I would either ask Vincenzo's permission to take parts from his guide or just make link to his thread more visible. It's a great guide, I set the server up based just on that. http://forums.taleworlds.com/index.php/topic,113653.0.html
--- End quote ---
I don't copied anything of his guide, i tried to make a guide special for crpg. (maybe, if i had copied some parts the guide would be bether :) )

Navigation

[0] Message Index

[#] Next page

Go to full version