Info
The configuration file of the main server is config.py
, and the import method is module import. Therefore, you need to provide a Config
class, such as:
class Config:
HOST = '0.0.0.0'
PORT = 80
Key | Type | Default | Description |
---|
HOST | str | '0.0.0.0' | Host address |
PORT | int | 80 | Listening port |
Key | Type | Default | Description |
---|
DEPLOY_MODE | str | 'flask_multithread' | Deployment mode, optional values: {"waitress", "gevent", "flask_multithread"} |
USE_PROXY_FIX | bool | False | ProxyFix |
USE_CORS | bool | False | CORS in server side Flask-CORS |
Key | Type | Default | Description |
---|
LINKPLAY_HOST | str | '0.0.0.0' | The sub server address based on the main server |
LINKPLAY_UDP_PORT | int | 10900 | UDP port open to clients |
LINKPLAY_TCP_PORT | int | 10901 | TCP port open to the main server |
LINKPLAY_AUTHENTICATION | str | 'my_link_play_server' | TCP communication verification |
LINKPLAY_DISPLAY_HOST | str | '' | The sub server address based on clients |
LINKPLAY_TCP_SECRET_KEY | str | '1145141919810' | AES key for TCP communication |
LINKPLAY_HOST
can be left blank, and then the Link Play feature will be disabled.LINKPLAY_DISPLAY_HOST
can be left blank, and then this address will be automatically obtained.LINKPLAY_TCP_SECRET_KEY
only takes the first 16 characters.
Key | Type | Default | Description |
---|
SSL_CERT | str | '' | The file path of the SSL certificate |
SSL_KEY | str | '' | The file path of the SSL certificate private key |
SSL_CERT
can be left blank, in which case HTTP will be used.
Warning
It is not recommended to use HTTPS in this way. It is better to use SSL provided by middleware, CDN, etc.
Key | Type | Default | Description |
---|
DOWNLOAD_LINK_PREFIX | str | '' | Song data's download link prefix |
BUNDLE_DOWNLOAD_LINK_PREFIX | str | '' | Content bundle's download link prefix |
DOWNLOAD_USE_NGINX_X_ACCEL_REDIRECT | bool | False | Whether to use NGINX's X-Accel-Redirect |
NGINX_X_ACCEL_REDIRECT_PREFIX | str | '/nginx_download/' | Prefix path of X-Accel-Redirect |
BUNDLE_NGINX_X_ACCEL_REDIRECT_PREFIX | str | '/nginx_bundle_download/' | Prefix path of X-Accel-Redirect for bundle downloading |
BUNDLE_STRICT_MODE | bool | True | Whether to strictly limit the corresponding client version for downloading content bundles |
DOWNLOAD_LINK_PREFIX
and BUNDLE_DOWNLOAD_LINK_PREFIX
can be left blank, and then they will be automatically obtained. When there are forwarding, reverse proxy, middleware or other services, it may be impossible to obtain the correct address. This prefix includes the host address and protocol name, for example: http(s)://host(:port)/download/
.- When
DOWNLOAD_USE_NGINX_X_ACCEL_REDIRECT
enabled, the downloaded content will return empty and be handed over to NGINX for processing. - To get more details about
BUNDLE_STRICT_MODE
, please refer to TODO.
Key | Type | Default | Description |
---|
SONG_FILE_HASH_PRE_CALCULATE | bool | True | Is song data cache calculation performed at startup |
SET_LINKPLAY_SERVER_AS_SUB_PROCESS | bool | True | Whether to run the Link Play sub server with the main server locally at the same time |
Key | Type | Default | Description |
---|
GAME_API_PREFIX | str | list[str] | '/<some_word>/<int>' | Game API's URL prefixes |
OLD_GAME_API_PREFIX | list[str] | [] | Old game API's URL prefixes |
ALLOW_APPVERSION | list[str] | [] | Allowed game version |
GAME_API_PREFIX
can be filled with multiple values, such as ['/hello/5', '/nihao/6']
, which will work simultaneously.- The default value of
GAME_API_PREFIX
may change frequently, but this document may not be updated in a timely manner, so the true value is not provided here. For example, the actual default value is as follows: '/hanami/29'
. OLD_GAME_API_PREFIX
is used to notify users of updates. If not provided, the old version client will get an unknown error when needing to be updated.ALLOW_APPVERSION
can be left blank, and the server will not check the client version.
Key | Type | Default | Description |
---|
ALLOW_INFO_LOG | bool | False | Whether to record detailed server info logs |
ALLOW_WARNING_LOG | bool | False | Whether to record detailed server warning logs |
ALLOW_WARNING_LOG
will additionally display and record some custom exceptions.
Key | Type | Default | Description |
---|
UPDATE_WITH_NEW_CHARACTER_DATA | bool | True | Whether to use the latest character data when updating database |
- After
UPDATE_WITH_NEW_CHARACTER_DATA
is enabled, when updating the database, the old partner data will be lost, and the latest official data will prevail. On the contrary, the old partner data will be retained and will not be updated to the latest official data.
Key | Type | Default | Description |
---|
IS_APRILFOOLS | bool | True | Switch of April Fool's Day |
WORLD_RANK_MAX | int | 200 | The largest number of global rank |
AVAILABLE_MAP | list[str] | [] | Current available event maps in World Mode |
DEFAULT_MEMORIES | int | 0 | The default amount of memories at the time of user registration |
ALLOW_SCORE_WITH_NO_SONG | bool | True | Whether to accept the scores with the song unranked |
CHARACTER_FULL_UNLOCK | bool | True | Whether to unlock all partners |
WORLD_SONG_FULL_UNLOCK | bool | True | Whether to unlock all world songs |
WORLD_SCENERY_FULL_UNLOCK | bool | True | Whether to unlock all world sceneries |
SAVE_FULL_UNLOCK | bool | False | Whether to force using full unlocked cloud save |
BEST30_WEIGHT | float | 0.025 | Weight of Best 30 potential |
RECENT10_WEIGHT | float | 0.025 | Weight of Recent Top 10 potential |
INVASION_START_WEIGHT | float | 0.1 | The possibility weight of "Invasion Start" |
INVASION_HARD_WEIGHT | float | 0.1 | The possibility weight of "Invasion Hard" |
MAX_FRIEND_COUNT | int | 50 | Maximum number of one user's friends |
NOTIFICATION_EXPIRE_TIME | int | 180000 | Expire time of Link Play invitation, unit: seconds |
IS_APRILFOOLS
is only valid for April Fool's Day version clients.- The world ranking of
WORLD_RANK_MAX
is the number next to the avatar. - The unranked score refers to the chart const corresponding to this score, which is not recorded in the server database or has a negative value.
- After
SAVE_FULL_UNLOCK
is enabled, users' cloud save will require manual selection of download or upload. It mainly targets the plot and song unlocking, and the final challenge state will be fixed before Testify unlocking. INVASION_START_WEIGHT
and INVASION_HARD_WEIGHT
adjust the triggering probability weights of skill_intruder
, corresponding to the probability weights of being invaded at the beginning and when the hard mode health bar returns to zero, respectively. Note that the weight that do not trigger the skill is 1 - INVASION_START_WEIGHT - INVASION_HARD_WEIGHT
, and the three weights will be normalized to the true probabilities.
Key | Type | Default | Description |
---|
USERNAME | str | 'admin' | Username of web background management page |
PASSWORD | str | 'admin' | Password of web background management page |
SECRET_KEY | str | 1145141919810 | Session key of web background management page |
Key | Type | Default | Description |
---|
API_TOKEN | str | '' | API Token of system power |
API_LOGIN_RATE_LIMIT | str | '10/5 minutes' | API login rate limit |
API_TOKEN
can be left blank to indicate that it is not being used.
Key | Type | Default | Description |
---|
LOGIN_DEVICE_NUMBER_LIMIT | int | 1 | Maximum number of devices that can be logged in |
ALLOW_LOGIN_SAME_DEVICE | bool | False | Whether logging in from multiple applications on the same device is allowed |
ALLOW_BAN_MULTIDEVICE_USER_AUTO | bool | True | Whether to enable automatic banning for too many devices |
GAME_LOGIN_RATE_LIMIT | str | '30/5 minutes' | Game login rate limit |
GAME_REGISTER_IP_RATE_LIMIT | str | '10/1 day' | Game register IP rate limit |
GAME_REGISTER_DEVICE_RATE_LIMIT | str | '3/1 day' | Game register device rate limit |
- After
ALLOW_LOGIN_SAME_DEVICE
is enabled, ALLOW_BAN_MULTIDEVICE_USER_AUTO
automatically becomes invalid. - The excessive number of devices in
ALLOW_BAN_MULTIDEVICE_USER_AUTO
refers to the value of LOGIN_DEVICE_NUMBER_LIMIT
. GAME_REGISTER_IP_RATE_LIMIT
will not ban IP '127.0.0.1'
.
Key | Type | Default | Description |
---|
DOWNLOAD_TIMES_LIMIT | int | 3000 | Player's song download limit times in 24 hours |
DOWNLOAD_TIME_GAP_LIMIT | int | 1000 | Expire time of song download link, unit: seconds |
DOWNLOAD_FORBID_WHEN_NO_ITEM | bool | False | Whether to restrict users from downloading data for songs they have not purchased |
BUNDLE_DOWNLOAD_TIMES_LIMIT | str | '100/60 minutes' | Player's content bundle download limit rate |
BUNDLE_DOWNLOAD_TIME_GAP_LIMIT | int | 3000 | Expire time of content bundle download link, unit: seconds |
- After
DOWNLOAD_FORBID_WHEN_NO_ITEM
is enabled, the server also needs to place the database/songs/songlist
file. - For all download frequency restrictions here, every file downloaded by the user is counted as one time.
Key | Type | Default | Description |
---|
WORLD_MAP_FOLDER_PATH | str | './database/map/' | Data folder of world maps |
SONG_FILE_FOLDER_PATH | str | './database/songs/' | Data folder of song data |
SONGLIST_FILE_PATH | str | './database/songs/songlist' | Path of the songlist file |
CONTENT_BUNDLE_FOLDER_PATH | str | './database/bundle/' | Data folder of content bundles with metadata |
SQLITE_DATABASE_PATH | str | './database/arcaea_database.db' | Path of the main database |
SQLITE_DATABASE_BACKUP_FOLDER_PATH | str | './database/backup/' | Old database backup folder |
DATABASE_INIT_PATH | str | './database/init/' | Initial data folder of database |
SQLITE_LOG_DATABASE_PATH | str | './database/arcaea_log.db' | Path of the record database |
SQLITE_DATABASE_DELETED_PATH | str | './database/arcaea_database_deleted.db' | Path of the database which contains deleted data |