1

Topic: [HELP] Changing the .cfg Dir

I'm wondering because I want to host this game at school but I cant edit the '.cfg' File or the Server information, I'm wondering if it is possible to dhance the server info directory so as that I can edit the data and current map.

2

Re: [HELP] Changing the .cfg Dir

You can place your map in the local folder /data/maps, this will work too.
Which .cfg are you talking about ? The settings.cfg or the cfg for the server ?

Not Luck, Just Magic.

3 (edited by Lanta 2010-06-04 15:10:43)

Re: [HELP] Changing the .cfg Dir

He wants to host, he's speaking about the server config.
Yes, you can specify the path of the cfg file running the teeworlds_srv executable from the prompt/shell.

If you are under windows:
- download and unzip teeworlds
- create (where you want) a text file called myconfig.cfg and write in it your configuration for the server
- open CMD (start -> run -> "cmd" -> return) and then write the following line, followed by a return
/path_of_your_teeworlds_folder/teeworlds_srv -f /path_of_your_config/myconfig.cfg
For example, my Teeworlds it's in C:/Program Files/Teeworlds/ and my config in C:/Documents and Settings/Lanta/Documents/. I will run the foillowing string:
C:/Program Files/Teeworlds/teeworlds_srv -f C:/Documents and Settings/Lanta/Documents/myconfig.cfg

If you are under linux it's exactly the same on the shell, with some little tweaks (the correct path, for example).

Support Staff - ESL.eu Teeworlds Admin

4

Re: [HELP] Changing the .cfg Dir

Lanta wrote:

If you are under linux it's exactly the same on the shell, with backslashes instead of slashes.

Windows uses backslashes (\), Linux normal slashes (/).

aka cheesy

5 (edited by Kottizen 2010-06-04 14:56:10)

Re: [HELP] Changing the .cfg Dir

Lanta wrote:

If you are under linux it's exactly the same on the shell, with backslashes instead of slashes.

Linux doesn't use C:\, or any character at all to define hard drives/partitions.

EDIT: Fixed some grammar.

6

Re: [HELP] Changing the .cfg Dir

grummi wrote:
Lanta wrote:

If you are under linux it's exactly the same on the shell, with backslashes instead of slashes.

Windows uses backslashes (\), Linux normal slashes (/).

Kottizen wrote:
Lanta wrote:

If you are under linux it's exactly the same on the shell, with backslashes instead of slashes.

Linux doesn't use C:\, or any character at all to define hard drives/partitions.
EDIT: Fixed some grammar.

Yeah, ok. Some little mistake on Linux cuz I wrote it fast big_smile

Support Staff - ESL.eu Teeworlds Admin

7

Re: [HELP] Changing the .cfg Dir

Lanta wrote:

- create (where you want) a text file called myconfig.cfg and write in it your configuration for the server

Now then, with the config for the server, What would I type in?

8

Re: [HELP] Changing the .cfg Dir

http://www.teeworlds.com/?page=docs& … gUpAServer

Not Luck, Just Magic.

9 (edited by Snazzy 2010-06-09 08:09:24)

Re: [HELP] Changing the .cfg Dir

Eonfuzz wrote:
Lanta wrote:

- create (where you want) a text file called myconfig.cfg and write in it your configuration for the server

Now then, with the config for the server, What would I type in?

the configuration of your server. if you want to set up a normal dm server:

Credits go to this page tongue How to set up a server

Set up a server
•Configure firewall/nat/router to let though 8303 (or the port you want). The master server will warn if players can't connect. Check http://portforward.com for help on setting up your router. 
•Create a configuration for your server. Add the settings you want (each line in the config represents a setting). 
•Start the server by running "teeworlds_srv -f my_server_config.cfg" 
FAQ
Q: How do I setup a LAN server?
Set sv_register to 0. This will make sure that it doesn't show up on the internet tab. 

Q: Why doesn't my server show up in the server browser?
You have probably not setup your router correctly. See http://portforward.com for help. 

Q: Why doesn't my 0.x.x-config work in 0.4.x?
The configuration file syntax has changed. Try replaceing all the = with space, and read this documentation. 

Example configurations
Sample DM config
sv_name Teeworlds sample dm
sv_map dm1
sv_scorelimit 20
sv_timelimit 10
sv_gametype dm
sv_rcon_password remember
sv_motd Teeworlds sample dm configuration
sv_max_clients 12
sv_spectator_slots 10
Sample TDM config
sv_name Teeworlds sample tdm
sv_map dm6
sv_scorelimit 50
sv_gametype tdm
sv_rcon_password remember
sv_motd Teeworlds sample tdm configuration
Sample CTF config
sv_name Teeworlds sample ctf
sv_map ctf2
sv_scorelimit 400
sv_gametype ctf
sv_rcon_password remember
sv_motd Teeworlds sample ctf configuration
Server Settings Reference
Syntax: setting value 

sv_name
This is the name of the server which will show up in the server browser. (default: unnamed server) 

sv_map
The map that is chosen when starting the server. (default: dm1) 

sv_maprotation
Used to specify multiple maps which rotates after the time or score limit is reached. (default: ) 

sv_warmup
Warmup time in seconds before the game starts. If it is set to 1 it will start immideatly. (default: 1) 

sv_scorelimit
What score that should be reached to end the game. Don't forget to set this to zero if you want a timebased limit. (default: 20) 

sv_timelimit
The time in minutes before the game ends. (default: 0) 

sv_gametype
What gametype, could be dm, tdm or ctf. (default: dm) 

sv_port
The server's binding port. (default: 8303) 

sv_rounds_per_map
Set number of rounds. Map will be changed after last round ends. (default: 1) 

sv_register
Whether the server should register on the masterserver or not (if on, it will show up in the server list). (default: 1) 

sv_rcon_password
Password to access the remote control (rcon). (default: ) 

sv_motd
Message of the day, shows when joining the server and under the server info-tab. (default: ) 

sv_max_clients
Number of clients which can be on the server. This can't be changed without restart. (default: 12) 

sv_spectator_slots
Number of all the slots that should be spectators. (default: 0) 

sv_teambalance_time
The time in minutes after the teams are uneven to use auto balance. (default: 1) 

sv_spamprotection
Turning on/off spam filter. (default: 1) 

password
Password to join the server. (default: ) 

sv_tournament_mode
If this is on, player automatically join spectators when entering a server. (default: 0) 

sv_teamdamage
If teammates will hurt each other or not. (default: 0) 

sv_powerups
If this is off ninja is disabled. (default: 1) 

sv_bindaddr
Address to bind to. (default: ) 

sv_external_port
What port the server reports to the master servers in cases of firewall rename/redirection rules. (default: 0) 

sv_high_bandwidth
Doubles the snap rate, the game gets a bit more responsive but it requires more than doubled bandwidth. Only recommended for LAN-servers. (default: 0) 

Server commands reference
kick
Syntax: kick id
Kicks the user with the specified id out of the server. 

status
Syntax: status
Shows client stats and ids. 

restart
Syntax: restart value
Null the score and starting warmup timer (depends on the value). If no value, then new round begins instantly.

Credits go to this page tongue How to set up a server