Skip to content

Configuration

idooo edited this page Sep 28, 2014 · 1 revision

Most of the game and balance settings you can find in system/settings.py file. You would need to restart Tweeria Server application after any change there.

Tweeria also have separate config files with low-level settings to load in different environments. You can find these file in conf directory. Please note that config file must be valid CherryPy configuration file. Here is the explanation of some of these settings:

[global] section

This section describes server config. Almost all parameters here are standard for CherryPy so description for them you can easily find in its official documentation: https://cherrypy.readthedocs.org/en/3.2.6/concepts/config.html

tweenk.host = "<domain_name>"

This parameter describes the Tweeria host and will be used during the link creation inside the application. Usually in dev environments the value for this parameter equals to the server.socket_host value in the same config section but in production Tweeria works behind the nginx reverse proxy so the configuration looks like:

server.socket_host = "127.0.0.1"
server.socket_port = 8080
tweenk.host = "tweeria.com"

[database] section

In this section you must specify MongoDB access settings for Tweeria. Please note that Tweeria requires auth connection, so you must create a database user with read/write role.

[parser] section

This section settings is about Twitter API credentials. Read more about it here

[debug] section

In this optional section you can set Tweeria's inner debug parameters which is useful for development or testing.

mobile_debug = True

Force Tweeria to use mobile templates if they are available

always_monster = True

Parser debug parameter. Set monster meet chance to 100% during tweet parsing and executing game mechanics

always_boss = True

Parser debug parameter. Set boss meet chance to 100% during tweet parsing and executing game mechanics

always_drop = True

Parser debug parameter. Set items drop chance to 100% during tweet parsing and executing game mechanics

load_deprecated_tweets = True

Parser debug parameter. Tweeria will not mark already parsed tweets as parsed and the parser will process them every time you execute it

invites = True

Restrict registration only by invites

pickup_all_items = True

Parser debug parameter. Heroes will pickup all the items and equip them without comparing with the currently equipped items

2x_rate = True

Parser debug parameter. Increase experience and gold gaining by heroes twice

ignore_radius = True

Parser debug parameter. Ignore max attack radius during the fight mechanic

create_by_invite = True

Enable content creation only for approved authors. This option is enabled in Tweeria.com

user.login = True and user.name = ""

Auto login EACH USER as a without any auth. Very useful for development, do not use in production

[/] section

This is standard CherryPy config section to describe static root folders settings. Here you should specify your full path for the Tweeria application.

[/]
tools.staticdir.root = "/var/www/tweeria"
tools.encode.encoding = 'utf8'

[/style], [/js], [/data] sections

This is standard CherryPy config section to describe static folder settings. Usually you will not need to change these settings at all.

tools.staticdir.on = True
tools.staticdir.dir = "./templates/style/"