-
Notifications
You must be signed in to change notification settings - Fork 52
Instruction for use
Take Windows as an example, Linux can refer to #64.
The server has only been tested on Windows 10
& Windows 11
platform. Logically speaking, it can be run on any platform with the sufficient permissions and the ability to run python
code.
Installation and environment variable configuration of Python 3 are omitted here.
The program runs successfully in Python 3.7.
The version of Python should be greater than or equal to 3.6.
Use pip
provided by Python for installation.
pip install -r requirements.txt
- Put the folder anywhere in the computer. Then refer to
config.example.py
and Config document to write aconfig.py
file and put it in the same folder withmain.py
. Set HOST to the local IP address and PORT to the open port (80 or 81 or 8080 is recommended). Be careful of port conflicts. If you choose to use Charles, please configure it correctly.- Click
run.bat
to run. Please do not click on the interface, in order to avoid the server stuck because of entering the selected state. (Press Enter to cancel the selection)
It is no need to care about other information in the CMD window. If there is Running on ...... (Press CTRL+C to quit)
, the server runs successfully.
The above is the simplest way to run the server code. If you need a deployment scheme, please refer to the official document of Flask.
If you don't need to run it stand-alone, just ensure that the ports are correct.
When both linkplay_server
folder and run_linkplay_server.py
file exist, the Link Play server(hereinafter referred to as "sub service") is able to be run stand-alone. At this time, pay attention to the communication settings of the two servers.
-
The main server setting file is
setting.py
. Please make sure that the settings are correct, including the address(LINKPLAY_HOST
), the TCP port and the communication authentication(LINKPLAY_AUTHENTICATION
) of the sub server based on the main server, the UDP port and the address(LINKPLAY_DISPLAY_HOST
) open to the public at the sub server. -
The sub server setting file is
linkplay_server/config.py
, where two ports and communication authentication(AUTHENTICATION
) should be consistent with the settings of the main server.
In the database folder, you can find a py file, which is the database initialization program. If you need to delete all user data, you can delete arcaea_database.db and then run database_initialize.py.
The arcsong.db in database folder is the song database, and you can change it via a sqlite operating software like sqlite3. You also can use other softwares which have GUI.
The sqlite3.exe is in the tools folder.
Since v2.9
, the song database arcsong.db
will merge into arcaea_database.db
, and the initial data is no longer provided. You can use update_song.py
under the tools
folder to do data migration or import.
At present, both old and new version of arcsong.db
are supported.
In v1.2 and later version, you can use the administration webpage to update and change it.
-
Make the exe file in the database folder, and run it.
-
Use
.open arcaea_database.db
to open the database at first. -
Use
insert into chart(song_id,name,rating_pst,rating_prs,rating_ftr,rating_byn) values('goodtek','GOODTEK (Arcaea Edit)',40,65,93,98);
to add the song which is not in the database. (GOODTEK is already in the database, you know.)song_id means the unique name to show what the song is. (Use '' or "" to show it is a text value.)
rating_(pst/prs/ftr/byn) means the define number(chart const) of the song. (pst=past prs=present ftr=future byn=beyond)
The value is ten times of the chart const. (For example, 98 means it is 9.8 and if the song doesn't have a beyond chart, the value should be -1.)name is not important and you can fill it at random. (Use '' or "" to show it is a text value.)
Only the define number(chart const) and
song_id
of the song is neccessary. You don't need to add other information.(The song database is from another github repository, so it has many things the server doesn't care.) -
If you want to do other things with the datebase, you can refer to any websites or books which teach you sql language.
Here is some useful command.
Delete one:delete from chart where song_id='goodtek';
Change one:update chart set rating_byn=100 where song_id='goodtek';
Find one:select * from chart where song_id='goodtek';
Find all (It's better not to use it.):select * from chart;
Since v1.3, world mode will be available. Here is the way to customize maps.
The map data is in database/map
, saving in json format. You can modify them with a text editor, but pay attention to the format.
Since v1.4, you can download songs.
For those songs that need to be downloaded, you can provide files from the local server. Of course, you can add fanmade charts and other songs.
Put the required files into the folder named song song_id, and then put it into the database/songs
folder. There is a reference file in the folder, which is a short chart of the past difficulty of the song dement.
Arcaea will only download the files which are missing.
Optionally, you can put songlist
in the database/songs
folder, in order to allow the client to download only some files. The songs which are not mentioned will not be limited.
It must be *.aff
. The number in the front represents difficulty. 0 to 3 represent Past to Beyond; 4 represents Eternal.
It much be base.ogg
. Remember to convert your file format.
Only and only 3.ogg
, video.mp4
, video_audio.ogg
are available.
- You can use the sub repo Arcaea-Bundler to generate content bundles and metadata files, or directly use official data.
- The data directory is located in
database/bundle
, allowing for the creation of subdirectories for easy manual management. - Paired bundles and metadata file names need to be the same and in the same directory, with suffixes of
. cb
and. json
, respectively. This also means that they are binary files and JSON files, respectively. - The server will limit the client version applicable to this content bundle based on the
applicationVersionNumber
in the metadata, and sort it in ascending order according to theversionNumber
, providing data to the client as needed. - Please note that when there is a higher version of the content bundle that is compatible with the client, users will be forced to update it.
- When modifying the content bundle related data during the runtime of the server, it is necessary to restart the server or refresh the data in the web background to obtain the latest data.
Tips:
- The document may be out of date.
- The web page based on back-end rendering may not be updated any more, and some data can be directly modified in the database instead.
V1.2 version adds a management web page, you can carry out some auxiliary operations. The web address is http:// IP : PORT /web
(For example, the server port is 80 and the IP address is 192.168.1.2, so the webpage is http://192.168.1.2:80/web
.)
The default account is admin and the password is admin.
Enter Username or Usercode to find all the best scores of the player.
Enter Username or Usercode to find the player information, including best30 and recent30 data.
Here you can directly see the basic information of all players.
Here you can directly see the song_ids and English names of all songs, as well as the chart const for each difficulty.
Here you can see the ID, name, skills, and values of all the characters directly.
Here you can see the ID, type, availability of all items.
Here you can see the name, price, original price, discount period and items of all purchases.
Here you can directly see the ID, expiration time, description and items of all presents.
Here you can directly see redeem codes, items and users who use the redeem code.
After entering the partial song_id of the song and selecting the difficulty, you can query the leaderboard indistinctly. (For example, the song_id of BADTEK is badtek, and if you enter bad, you can find it.)
-
Here you can synchronize the old version of the database to the new version of the database and refresh the list of full characters owned by players.
Uploadable files: arcaea_database.db
Data that does not exist in the new database will be added and the existing duplicate data will also be changed.
Updated tables include best_score, friend, recent30, user, user_world, item, user_item, purchase, purchase_item, user_save, login, present, user_present, present_item, redeem, user_redeem, redeem_item, role, user_role, power, power_role, api_auth, user_char, character.If you register first, recent30 will add a new user. Now if you update the database, recent30 of this user will not be synchronized.
-
Here you can refresh the hash values of all the files stored in the chart folder in the database. The purpose is to deal with the updating of songs' files.
-
Here you can refresh the cache of content bundles with metadata.
-
Here you can refresh the ratings of all scores in the database. The purpose is to deal with the updating of songs' chart consts.
Here you can modify the user's password. Note that the password length is 8 to 20 digits, and there is no background check. If you enter a password that cannot be entered by the client, you may not be able to log in.
Here you can ban specific users, or delete all the scores of a user, including best_score and recent30, as well as recentdata, but not cloud saves.
Changing the user's password can unseal the user.
Here you can clear the scores. For example, clear all the scores of a user, clear all the scores of a chart...
Here you can synchronize the game cloud saves to best_score table. Please remember that it is an overlay action, so scores will not be compared.
Here you can add or delete the song which you give a specified song_id to the database. The chart const is a floating point number, such as 9.8. If there is no certain chart of some difficulty, please fill in -1 instead.
Here you can modify the character skills to the database, and update the characters owned by users.
Here you can add or delete items.
Here, you can modify the purchases to the database. For a single song, the discount is invalid; for a song pack, the availability is invalid.
Here you can add or delete items to the purchase.
Here you can change user's memories.
Here you can modify the whole purchase information of users.
Here you can add or delete the present.
The ID is the unique identification of the present; the description is the information displayed in the login interface, which should not be too long; the expiration time will limit the distribution of the present, and the expired reward will not be distributed.
Here you can deliver a present to the player individually or in batches. The present can be received only once when the players log in.
Redeem codes can be added or deleted here. There are two types of redeem codes, which can only be used once or each user can use once.
When the redeem codes are randomly generated, the length is fixed at 10 bits, and the specified generation length is 10-20 bits.
The amount of random generation should not be too many, otherwise the background query interface is likely to get stuck.