Skip to content

Commit

Permalink
doc: update readme and usage
Browse files Browse the repository at this point in the history
  • Loading branch information
WisteFinch committed Sep 30, 2024
1 parent cb77e19 commit 4d90d2d
Show file tree
Hide file tree
Showing 6 changed files with 202 additions and 51 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,7 @@ cargo run
1. Android Studio is required.
2. Import `./call-for-stratagems` to Android Studio.
3. Click `Run` button to compile.

### Links

- Stratagem database [HD2CFS-Database](https://github.com/WisteFinch/Helldivers2CallForStratagemsOnPhone)
4 changes: 4 additions & 0 deletions README_zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,7 @@ cargo run
1. 需要安装Android Studio。
2.`./call-for-stratagems`导入Android Studio。
3. 点击`Run`按钮开始编译。

### 相关链接

- 战略配备数据库 [HD2CFS-Database](https://github.com/WisteFinch/Helldivers2CallForStratagemsOnPhone)
26 changes: 13 additions & 13 deletions call-for-stratagems/app/src/main/res/values-zh/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,17 @@
<!-- Fragment View Group -->
<string name="viewGroup_play_FAB">开始</string>

<!-- Fragment Play -->
<string name="play_banner_desc">横幅</string>
<string name="play_exit">退出</string>
<string name="play_mode">输入模式</string>
<string name="play_freeInput">自由输入</string>
<string name="play_upward">上</string>
<string name="play_downward">下</string>
<string name="play_backward">左</string>
<string name="play_forward">右</string>
<string name="play_network_status">连接状态</string>

<!-- Preference Titles -->
<string name="connection_header">连接</string>
<string name="sync_header">同步</string>
Expand Down Expand Up @@ -97,17 +108,6 @@
<string name="viewGroup_menu_edit_title">编辑</string>
<string name="viewGroup_menu_delete_title">删除</string>

<!-- Fragment Play -->
<string name="play_banner_desc">横幅</string>
<string name="play_exit">退出</string>
<string name="play_mode">输入模式</string>
<string name="play_freeInput">自由输入</string>
<string name="play_upward">上</string>
<string name="play_downward">下</string>
<string name="play_backward">左</string>
<string name="play_forward">右</string>
<string name="play_network_status">连接状态</string>

<!-- Network -->
<string name="network_connecting">连接中…</string>
<string name="network_retry">连接中… (重试 %1$d/%2$d)</string>
Expand All @@ -133,9 +133,9 @@

<!-- Hints -->
<string name="hint_db_incomplete">数据库不完整</string>
<string name="hint_db_incomplete_desc">数据库不完整,请前往“设置-信息”更新数据库</string>
<string name="hint_db_incomplete_desc">数据库不完整,请前往“设置>信息”更新数据库</string>
<string name="hint_welcome">欢迎使用 v%1$s</string>
<string name="hint_welcome_usage">用法</string>
<string name="hint_welcome_desc">本次更新重新设计了战备数据库,如果您在更新后看到了报错、战备(图标)缺失等异常情况,只需前往“设置-信息”并更新数据库即可解决!</string>
<string name="hint_welcome_desc">本次更新重新设计了战备数据库,如果您在更新后看到了报错、战备(图标)缺失等异常情况,只需前往“设置>信息”并更新数据库即可解决!</string>

</resources>
64 changes: 32 additions & 32 deletions call-for-stratagems/app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,33 +11,45 @@

<!-- Fragment Title -->
<string name="fragment_root">CallForStratagems</string>
<string name="fragment_editGroup">Edit stratagems group</string>
<string name="fragment_editGroup">Edit Stratagems Group</string>
<string name="fragment_settings">Settings</string>
<string name="fragment_viewGroup">Stratagems group</string>
<string name="fragment_viewGroup">Browse Stratagems Group</string>
<string name="fragment_play">Play</string>

<!-- Fragment Root -->
<string name="root_new_group_FAB">New stratagems group</string>
<string name="root_new_group_FAB">New Stratagems Group</string>
<string name="root_no_group">The Galactic War awaits</string>
<string name="root_no_group_img">No stratagems group</string>

<!-- Fragment Edit Group -->
<string name="editGroup_title">New stratagems group</string>
<string name="editGroup_title_hint">Stratagems group Name</string>
<string name="editGroup_title">New Stratagems Group</string>
<string name="editGroup_title_hint">Stratagems Group Name</string>

<!-- Fragment View Group -->
<string name="viewGroup_play_FAB">Play</string>

<!-- Fragment Play -->
<string name="play_blank" translatable="false">PERSONAL HELLPAD\nSYSTEM</string>
<string name="play_banner_desc">Banner</string>
<string name="play_exit">Exit</string>
<string name="play_mode">Input mode</string>
<string name="play_freeInput">FREE INPUT</string>
<string name="play_upward">Upward</string>
<string name="play_downward">Downward</string>
<string name="play_backward">Backward</string>
<string name="play_forward">Forward</string>
<string name="play_network_status">Connect status</string>

<!-- Preference Titles -->
<string name="connection_header">Connection</string>
<string name="sync_header">Sync</string>
<string name="control_header">Control</string>
<string name="info_header">Info</string>

<!-- Connection Preferences -->
<string name="tcp_add_title">Server address</string>
<string name="tcp_port_title">Server port</string>
<string name="tcp_retry_title">Retry times</string>
<string name="tcp_add_title">Server Address</string>
<string name="tcp_port_title">Server Port</string>
<string name="tcp_retry_title">Retry Times</string>
<string name="tcp_scan">Scan QR Code</string>
<string name="tcp_scan_desc">Scan the QR code from the server to obtain the connection configuration</string>
<string name="tcp_scan_unavailable">Unavailable, click to download dependencies</string>
Expand All @@ -47,7 +59,7 @@
<string name="tcp_scan_download_complete">Download complete, please restart the app</string>
<string name="tcp_scan_success">Scan successful</string>
<string name="tcp_scan_failed">Scan failed</string>
<string name="tcp_test_title">Test connection</string>
<string name="tcp_test_title">Test Connection</string>
<string name="tcp_test_default">Test the connection to the PC server</string>
<string name="tcp_test_connecting">Connecting…</string>
<string name="tcp_test_waiting">Waiting for response…</string>
Expand All @@ -56,37 +68,37 @@

<!-- Sync Preferences -->
<string name="server_port_title">Port</string>
<string name="input_delay_title">Input interval time(ms)</string>
<string name="input_delay_title">Input Interval Time(ms)</string>
<string name="input_open_title">Input: Open Stratagems List</string>
<string name="input_up_title">Input: Up</string>
<string name="input_down_title">Input: Down</string>
<string name="input_left_title">Input: Left</string>
<string name="input_right_title">Input: Right</string>
<string name="sync_config_title">Apply configuration</string>
<string name="sync_config_title">Apply Configuration</string>
<string name="sync_config_default">Synchronize configuration with the PC server, then you need to restart the server to apply it</string>
<string name="sync_config_finished">Please accept the request on the server, then restart the server to apply the configuration</string>

<!-- Control Preferences -->
<string name="enable_simplified_mode_title">Enable simplified mode</string>
<string name="enable_simplified_mode_title">Enable Simplified Mode</string>
<string name="enable_simplified_mode_desc">Keep only macro functions and remove most decorations</string>
<string name="swipe_distance_threshold_title">Gesture swipe distance threshold(pixel)</string>
<string name="swipe_velocity_threshold_title">Gesture swipe velocity threshold(pixel/s)</string>
<string name="swipe_distance_threshold_title">Gesture Swipe Distance Threshold (pixel)</string>
<string name="swipe_velocity_threshold_title">Gesture Swipe Velocity Threshold (pixel/s)</string>

<!-- Info Preferences -->
<string name="info_db_version">Database Version</string>
<string name="info_db_version_empty">Empty</string>
<string name="info_db_version_incomplete">Incomplete</string>
<string name="info_db_version_updatable">Database Version(Updatable)</string>
<string name="info_db_version_updatable">Database Version (Updatable)</string>
<string name="info_db_version_updatable_desc">%1$s ➡ %2$s</string>
<string name="info_db_version_updating">Database Version(Updating)</string>
<string name="info_db_version_updating">Database Version (Updating)</string>
<string name="info_db_version_updating_index_desc">Downloading index…</string>
<string name="info_db_version_updating_db_desc">Downloading database…</string>
<string name="info_db_version_updating_icons_desc">Downloading icons… (%1$d/%2$d)</string>
<string name="info_db_version_update_complete_desc">Update complete, please restart the app</string>
<string name="info_db_version_update_failed_desc">Update failed, please try again</string>
<string name="info_db_version_latest">Already the latest version</string>
<string name="info_app_version">App Version</string>
<string name="info_app_version_updatable">App Version(Updatable)</string>
<string name="info_app_version_updatable">App Version (Updatable)</string>
<string name="info_app_version_updatable_desc">%1$s ➡ %2$s</string>
<string name="info_app_update_log">New Version: v%1$s</string>
<string name="info_about">About</string>
Expand All @@ -103,18 +115,6 @@
<string name="viewGroup_menu_edit_title">Edit</string>
<string name="viewGroup_menu_delete_title">Delete</string>

<!-- Fragment Play -->
<string name="play_blank" translatable="false">PERSONAL HELLPAD\nSYSTEM</string>
<string name="play_banner_desc">Banner</string>
<string name="play_exit">Exit</string>
<string name="play_mode">Input mode</string>
<string name="play_freeInput">FREE INPUT</string>
<string name="play_upward">Upward</string>
<string name="play_downward">Downward</string>
<string name="play_backward">Backward</string>
<string name="play_forward">Forward</string>
<string name="play_network_status">Connect status</string>

<!-- Network -->
<string name="network_add_suffix" translatable="false">%1$s ┃ %2$s:%3$d</string>
<string name="network_connecting">Connecting…</string>
Expand All @@ -140,10 +140,10 @@
<string name="dialog_no_ask">Don\'t ask again</string>

<!-- Hints -->
<string name="hint_db_incomplete">Database incomplete</string>
<string name="hint_db_incomplete_desc">The database is incomplete, please go to \"Settings-Info\" to update the database</string>
<string name="hint_db_incomplete">Database Incomplete</string>
<string name="hint_db_incomplete_desc">The database is incomplete, please go to \"Settings>Info\" to update the database</string>
<string name="hint_welcome">Welcome to v%1$s</string>
<string name="hint_welcome_usage">Usage</string>
<string name="hint_welcome_desc">This update has redesigned the stratagem database. If you see any abnormal situations such as errors or missing stratagem (icon) after the update, simply go to \"Settings-Info\" and update the database, then the problems will be solved!</string>
<string name="hint_welcome_desc">This update has redesigned the stratagem database. If you see any abnormal situations such as errors or missing stratagem (icon) after the update, simply go to \"Settings>Info\" and update the database, then the problems will be solved!</string>

</resources>
136 changes: 132 additions & 4 deletions usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,143 @@

</div>

## Download and run
# 1 Usage

## 1.1 Download and run

Go to the [download page](https://github.com/WisteFinch/Helldivers2CallForStratagemsOnPhone/releases/latest), and choose the latest version.

### PC server
### 1.1.1 PC server

- Download `call-for-stratagem-server-x.x.x.exe` and run it, the system must be at least Windows 10 x64(I haven't tested the lower version).
- Download `call-for-stratagem-server-x.x.x.exe` and run it, the system must be at least Windows 10 x64(Haven't tested the lower version).
- For Linux/Mac, please refer to the [Build](./README.md#build) entry to compile on your own.

### Phone client
### 1.1.2 Phone client

- Downlaod `call-for-stratagem-client-x.x.x.apk` and install it, the system must be at least Android 8.0.

## 1.2 Connection

### 1.2.1 Connect and test

1. Ensure that the phone and computer are on the same network and have a smooth network connection.
2. Open the server and record the displayed IP and port information after successful startup. e.g. `Listening: 192.169.1.2:23333`, the IP is `192.168.1.2` and the port is `23333`.
3. Open the client and go to the `Settings>Connection` section.
- Manual setting: Fill in the input box with the recorded IP and port information.
- Scan QR code: Click the `Scan QR Code` button to take a picture of the QR code displayed on the computer, and the configuration will be automatically obtained.
4. Click the `Test Connection` button until it prompts `Success`.
- After `v0.3.0` we added authentication to prevent malicious attacks: When connecting for the first time or every three days, the server will ask the user to confirm the connection and display `Authentication request from: XXX, sid: XXX. Do you want to authenticate this client? (Y/N):`. Enter `Y` to accept the request.

## 1.3 Configuration

After `v0.3.0`, the application configuration needs to be manually confirmed to prevent malicious attacks: After clicking the `Apply Configuration` button, the server will display `Synchronization request from: XXX.Do you want to synchronize this configuration? (Y/N):`. enter ` Y ` to accept the request.

### 1.3.1 Change port

Suggest modifying this value only when the port is occupied.

1. Open the server and ensure that the client can connect to the server normally.
2. Open the client, go to `Settings>Sync>Port`, and modify it to any value from `1` to `65535`.
3. Click the `Apply Configuration` button below, and then restart the server.

### 1.3.2 Change input speed

This value represents the delay between pressing two buttons during call stratagems, which can affect the execution speed of macro and normal input. If the computer frame rate is too low and the call fails, you can try increasing this value.

1. Open the server and ensure that the client can connect to the server normally.
2. Open the client, go to `Settings>Sync>Input Interval Time`, and modify it to the desired value (in milliseconds, default 25).
3. Click the `Apply Configuration` button below, and then restart the server.

### 1.3.3 Change input mapping

1. Open the server and ensure that the client can connect to the server normally.
2. Open the client, go to `Settings>Sync` section, and modify it to the desired value (in milliseconds, default 25).
3. Click `Input: XXX`, modify it to the desired value.
4. Click the `Apply Configuration` button below, and then restart the server.

## 1.4 Control

### 1.4.1 Enable simplified mode

This feature was added in `v0.2.1`: The simplified mode only retains the macro function and removes most of the decorations, making it suitable for users who only need macros.

1. Open the client, go to `Settings>Control>Enable Simplified Mode`, click the toggle switch

### 1.4.2 Adjust the sensitivity of swipe gestures

If you encounter difficulties in recognizing swipe gestures during input, you can lower this value appropriately.

1. Open the client, go to `Settings>Control` section.
2. Adjust `Gesture Swipe Distance Threshold`(unit is pixels, default is 100). This value represents the minimum gesture swiping distance that can be recognized.
3. Adjust `Gesture Swipe Velocity Threshold`(unit is pixels per second, default is 100). This value represents the minimum gesture swiping speed that can be recognized.

## 1.5 Group

### 1.5.1 Create stratagem group

Group is a set of user selected stratagems. It is recommended to prepare corresponding groups for different battles, which is beneficial for quickly selecting the required stratagems during combat.

1. Open the client and click the plus sign (`+`) button in the bottom right corner of the main interface.
2. enter the `Edit Stratagem Group` interface, choose a suitable name for the group, and then check the required combat readiness in the list below.
3. Click the save button in the upper right corner to save the group.

### 1.5.2 Edit stratagem group

1. Open the client, click on the group you want to edit, and enter the `Browse Stratagem Group` interface.
2. Click `...` on the top right corner, then click the `Edit` button in the pop-up menu.
3. Enter the 'Edit Stratagem Group' interface, where you can modify the group name and check the required stratagems in the list below.
4. Click the save button in the upper right corner to save the group.

### 1.5.2 Delete stratagem group

This operation is irreversible, please choose carefully.

1. Open the client, click on the group you want to edit, and enter the `Browse Stratagem Group` interface.
2. Click `...` on the top right corner, then click the `Delete` button in the pop-up menu.

## 1.6 Play

### 1.6.1 Play stratagem group

1. Open the client and click on the desired group to enter the `Browse Stratagem Group` interface.
2. Click `play(▶)` button on the bottom right corner, enter the `Play` interface.
3. In this interface, the top left corner is the `Exit` button, the top right corner is the `Free Input Mode` button, the right side is the `Stratagems List`, the bottom left is the `Connection Status`, and the middle is the `Information Area`.

- Normal input: When a stratagem is selected in the `Stratagems List`, the `Information Area` will display the stratagem information and enable gesture input. Need to swipe according to prompts to activate stratagem.
- Macro: Swipe the stratagem icon to the left to activate stratagem.
- Free Input: Click the `Free Input Mode` button to enable it, which is suitable for random input situations such as operating terminals. To call for stratagem under this mode, you need to manually press the `Open Stratagems List` button in the game.
- The `Connection Status` indicates the current connection status with the server, with green indicating success, yellow indicating connection in progress, and red indicating connection failure. When attempting to activate stratagem in the event of failure, it will immediately attempt to reconnect.

### 1.6.2 Simplified mode

This feature was added in `v0.2.1`: The simplified mode only retains the macro function and removes most of the decorations, making it suitable for users who only need macros.

1. Refer to [1.4.1-Enable simplified mode](#141-enable-simplified-mode), and turn on simplified mode.
2. Enter `Play` interface and only the stratagem icons and `Connection Status` remain. Click on the icon to activate the stratagem.

## 1.7 Database

After `v0.4.0`, the app no longer has a built-in stratagem database, but is downloaded from the network to ensure that the database is always the latest version.

### 1.7.1 Update database

1. Open the client, go to `Settings>Info>Database Version`, and wait for the app to check for the new version.
2. If there is a new version, the title will change to `Database Version (Updatable)`, click to update it.

# 2 FAQ

## 2.1 Connection

### 2.1.1 The client cannot connect to the server

1. Both mobile phones and computers must be on the same network. Campus and enterprise networks may have AP isolation enabled, preventing devices from discovering each other. It is recommended to switch to a different network or use a hotspot.
2. Check if the server address and port are filled in correctly.
3. Turn off network proxy and VPN, disable virtual network adapter.
4. Check the firewall.
5. Restart the computer.

## 2.2 Database

### 2.2.1 Database incomplete

When encountering the error prompt `Database Incomplete`, or discovering situations such as missing stratagems or icon display error, please refer to [1.7.1-Update database](#171-update-database) for updates.
Loading

0 comments on commit 4d90d2d

Please sign in to comment.