Older systems: iOS 18+ / macOS 15+ via the older-API build; floating left stick; runeword required level; Mac keyboard, mouse and docs; clearer older-device dialog

This commit is contained in:
jhaizhou
2026-10-14 01:49:25 +08:00
parent 2eb5758771
commit d9e95c3381
52 changed files with 1325 additions and 274 deletions
+3 -3
View File
@@ -8,7 +8,7 @@ The iPhone 14 family, iPhone 15 / 15 Plus and earlier models can play; they just
Almost all of the game's textures use BC compression. Apple GPUs support that format only from the A17 Pro (iPhone 15 Pro) on; earlier chips cannot read it. The answer is to convert those textures offline, on a computer, into ASTC, which these devices do support — the picture is the same picture. Textures are game content, so we cannot provide this pack; it can only be generated on your own computer from your own game files.
**Which devices need it**: the App decides this itself at launch, so there is no table to consult. A device that needs it shows "Supplementary Pack Required"; if it shows "Device Not Supported" instead, the App was built without the part that goes with the pack — rebuild it as in step 4 below.
**Which devices need it**: the App decides this itself at launch, so there is no table to consult. A device that needs it shows "Supplementary Pack Required"; if it shows "One More Step for This Device" (older versions say "Device Not Supported") instead, the App was built without the part that goes with the pack — rebuild it as in step 4 below.
## What you need
@@ -51,7 +51,7 @@ Afterwards `$D/pack` contains:
cd dm/ios && DM_ASTC_PACK="$D/pack" ./run.sh build
```
An App built without this variable only says "Device Not Supported" on older devices.
An App built without this variable only says "One More Step for This Device" (older versions say "Device Not Supported") on older devices.
5. **Install** as usual (`./run.sh install` or Xcode).
@@ -72,4 +72,4 @@ Afterwards `$D/pack` contains:
## In practice
The lowest device we measured is the iPhone 14 Pro Max (A16, 6 GB of RAM), running at 60 fps. During internal testing this route was completed by users on A16 devices.
The lowest device we measured is the iPhone 14 Pro Max (A16, 6 GB of RAM), running at 60 fps. During internal testing this route was completed by users on A16 devices; the oldest device our test players actually play on is the iPhone 13 Pro Max (A15, 6 GB of RAM), in the 30 fps mode.
+3 -3
View File
@@ -8,7 +8,7 @@ iPhone 14 系列、iPhone 15 / 15 Plus 以及更早的机型可以玩,只是
游戏的贴图绝大多数用的是 BC 压缩格式。苹果的显卡从 A17 Pro(iPhone 15 Pro)起才支持这种格式,更早的芯片不认。做法是在电脑上把这些贴图离线转成这些机型支持的 ASTC 格式,画面是同一份画面。贴图是游戏内容,所以这个包不能由我们提供,只能用你自己的游戏文件在你自己的电脑上生成。
**哪些机型需要**:App 启动时自己会判断,不用查表。需要的机型会弹「需要老机型补充包」(补充包就是这里说的贴图包);如果弹的是「暂不支持本机型」,说明这个 App 构建时没有带上贴图包的配套部分——照下面第 4 步重新构建即可。
**哪些机型需要**:App 启动时自己会判断,不用查表。需要的机型会弹「需要老机型补充包」(补充包就是这里说的贴图包);如果弹的是「这台设备要多做一步」(旧版本显示的是「暂不支持本机型」),说明这个 App 构建时没有带上贴图包的配套部分——照下面第 4 步重新构建即可。
## 需要什么
@@ -51,7 +51,7 @@ python3 dm/tools/astc_pack.py finalize "$D/pack" # 3 收尾:
cd dm/ios && DM_ASTC_PACK="$D/pack" ./run.sh build
```
不带这个变量构建出来的 App,在老机型上只会提示「暂不支持本机型」。
不带这个变量构建出来的 App,在老机型上只会提示「这台设备要多做一步」(旧版本显示的是「暂不支持本机型」)。
5. **装机**,和平常一样(`./run.sh install` 或用 Xcode)。
@@ -72,4 +72,4 @@ python3 dm/tools/astc_pack.py finalize "$D/pack" # 3 收尾:
## 实际情况
最低实测机型是 iPhone 14 Pro Max(A16,6 GB 内存),60 帧运行。这条路在内测阶段由 A16 机型的用户走通过。
最低实测机型是 iPhone 14 Pro Max(A16,6 GB 内存),60 帧运行。这条路在内测阶段由 A16 机型的用户走通过;内测玩家实际在玩的最老机型是 iPhone 13 Pro Max(A15,6 GB 内存),30 帧档。
+99 -32
View File
@@ -1,70 +1,137 @@
# Playing on a Mac (macOS App, first version)
# Playing on a Mac (macOS App)
中文:[MAC.zh-CN.md](MAC.zh-CN.md)
简体中文: [MAC.zh-CN.md](MAC.zh-CN.md)
On an Apple silicon Mac running **macOS 26 or later**, this project can be built into a native macOS App, `D2R Mobile.app`: double-click to start, with keyboard, mouse and gamepad all working. It runs the same game and the same features we added (rifts, the trove, the chronicle, the Custom page and so on), using the original game's gamepad UI.
On an Apple silicon Mac this project can be built into a native macOS App, `D2R Mobile.app`: double-click to start, with keyboard, mouse and gamepad all working. It runs the same game and the same features we added (rifts, the trove, the chronicle, the Custom page and so on), using the original's gamepad interface.
**Up front: nobody has actually sat down and played this version yet.** Keyboard keys, a physical gamepad, the resource-folder dialog, ⌘Q and menu clicks, and how it feels in the hand — none of these five has been operated by a person. Everything described as "verified" below was run unattended: keys injected by a test script, the mouse through a test entry point, quit / full screen / window resizing through test switches. If you are among the first to try it, please open an issue and tell us how it went.
**Up front: these five things have not been operated by a person yet** — keyboard keys, a physical gamepad, the resource-folder dialog, ⌘Q and menu clicks, and how it feels in the hand. Where this page says "verified", it was run unattended: keys injected by a test script, the mouse through a test entry, quitting, full screen and resizing through test switches. If you try it, please open an Issue and tell us how it went.
## Requirements
Apple silicon and macOS 26 or later. The graphics side is built entirely on a graphics interface that only exists from macOS 26 on (Metal 4); on earlier systems it neither compiles nor opens (the system says the App cannot be used with this version of macOS). The iPhone / iPad version requires iOS 26 for the same reason.
Apple silicon. Two tiers by system:
| Your system | How to build | Output |
|---|---|---|
| macOS 26 or later | Default: `dm/tools/mac_app.sh` | `D2R Mobile.app` |
| macOS 15 – 25 | Older-API build: `DM_MAC_M3=1 dm/tools/mac_app.sh` | `D2R Mobile M3.app` |
The default build puts the graphics side on a graphics interface that only exists from macOS 26 on (Metal 4); on earlier systems it does not open (the system says the App cannot be used with this version of macOS). The older-API build is the same source and the same game with the graphics side using interfaces that older systems also have; its minimum is macOS 15.0. Details: [OLDER_SYSTEMS.md](OLDER_SYSTEMS.md).
## Build
The prerequisites are the same as for the iOS route: your game files in place and `./setup.sh` finished (see "Getting started" on the front page). Then:
The prerequisites are the same as for iOS: game files in place and `./setup.sh` finished (see "Getting started" in the README). Then:
```bash
source ~/dm-work/build/cache/dm/venv/bin/activate
dm/tools/mac_app.sh
dm/tools/mac_app.sh # macOS 26 or later
DM_MAC_M3=1 dm/tools/mac_app.sh # macOS 15 – 25
```
It takes a dozen seconds or so and produces `~/dm-work/out/macapp/D2R Mobile.app` (about 3 MB). To put it elsewhere: `dm/tools/mac_app.sh <output directory>`.
The default build takes ten-odd seconds and produces `~/dm-work/out/macapp/D2R Mobile.app` (about 3 MB). The older-API build recompiles the shader libraries for macOS 15 the first time, which adds about 3–4 minutes, and produces `D2R Mobile M3.app`; it has its own save and log directories (with M3 in the name), so it can sit next to the default App. To put the output elsewhere, add an output directory after the command.
The App contains only our own program. The rewritten game program, the shader library and the UI overlay are made from your game files; they stay in your workspace (`~/dm-work`) and the App only records where they are — so **this App runs only on the Mac that built it**. Please do not copy it to anyone else, and do not delete the workspace. It is signed with a local ad-hoc signature: no developer account and no device registration are needed.
The App contains only our own program. The rewritten game program, the shader libraries and the UI overlay are all made from your game files; they stay in your working directory (`~/dm-work`) and the App only records where they are — so **the App runs only on the Mac that built it**. Please do not copy it to anyone, and do not delete or move the working directory (the shader libraries recompiled for the older-API build are in the output directory). Signing is local ad-hoc signing: no developer account and no device registration.
Version and build number can be set: `DM_MAC_VERSION` (default 1.0) and `DM_MAC_BUILD` (default: the current month-day-hour-minute).
## First launch
Double-click `D2R Mobile.app`. The first launch asks you to choose the **game resource folder**: pick `~/dm-work/data/switch/3.3.94012/Update` (or the `RomFS` inside it); it must contain a `data` folder. A wrong choice is explained and you can pick again; a right one is remembered and not asked for again.
Double-click the App. The first launch asks you to choose the **game resource folder**: pick `~/dm-work/data/switch/3.3.94012/Update` (or the `RomFS` inside it); it must contain a `data` folder. A wrong choice is explained and you are asked again; a correct one is remembered.
The key mapping is then shown once; afterwards it is always available under Help in the menu bar.
A key reference is then shown once; afterwards it is under Help in the menu bar.
## Where things are
- Saves: `~/Library/Application Support/D2R Mobile/save`
- Log: `~/Library/Logs/D2R Mobile/host.log` (the previous run is `host.prev.log`). Please attach it when reporting a problem.
Language: the first launch follows the system language (Chinese systems start in Chinese, everything else in English). To change it: Options → Custom, the language switch in the first row → Accept All → close and reopen the App.
## Keyboard ↔ gamepad
Button prompts on screen show gamepad letters; the keyboard keys are:
Button prompts on screen show gamepad letters. Where the screen says "A", "B", "X" or "Y", the key to press is **not** the letter of the same name on the keyboard (the keyboard's A walks left) but the one in the right-hand column:
| Gamepad | Keyboard |
| What you want / gamepad button | Keyboard |
|---|---|
| Confirm (A) | Space or J |
| Back (B) | Esc or K (in game with no panel open, Esc opens the inventory group of pages) |
| Return | confirm; acts as + when the bottom of the page shows a "+" hint (such as "Accept" after naming); on the main menu Return = enter the game |
| + (menu / new character) | the = key |
| − (map) | Tab |
| Left stick (move) | W A S D |
| D-pad | Arrow keys |
| A confirm / B back / X / Y | J / K / U / I |
| X / Y | U / I |
| L / R | Q / E |
| ZL / ZR | Z / C |
| Left stick press / right stick press | F / G |
| + (menu) / − (map) | Return / Tab |
Mouse: left click on a target or on the UI, right click = B (back / close panel), wheel scrolls lists. A gamepad works as soon as it is connected, alongside the keyboard.
**Creating a character, start to finish**: on the main menu press `=` (or click "New Character") → choose a class with the arrow keys and press Return (or click that class's figure) → on the mode page press Return or Space → on the naming page press Return to open the input box, type, Return → press Return once more to create.
The menu bar has View → Full Screen (⌃⌘F) and Quit (⌘Q). The window can be resized freely; the game picture stays 16:9 and centred.
A gamepad works as soon as it is connected, alongside the keyboard. The menu bar has View → Full Screen (⌃⌘F) and Quit (⌘Q). The window can be resized freely; the game picture stays 16:9 and centred.
## Mouse
What it can do now:
- **Click a target in the world** (monster, NPC, chest, waypoint, item on the ground): the character walks over and interacts.
- **Click the bottom row**: a skill icon = use that skill (the same as pressing the key shown under it), a potion cell = drink it, the middle button = open the inventory group of pages, the run / walk button = toggle.
- **Click the interface**: buttons, checkboxes and tabs in panels (including the in-page tabs of the skill tree), the pause menu, the settings pages, "Start" on the rift level-selection page.
- **Click a key hint at the bottom**: clicking an entry presses that key.
- **Click a figure when creating a character**: the class you click is selected.
- **Top-right minimap**: opens automatically on entering a game; Tab toggles it; clicking the area name at its top switches to the full-screen map, and another click returns.
- Right click = back (B); the wheel scrolls lists.
What it cannot do yet:
- **Clicking empty ground does not walk.** Move with W A S D or a gamepad stick.
- **Key caps on screen are still gamepad letters**; translate them with the table above.
- **Long press / double click / drag / buying on items do not take the mouse.** Use the keyboard or gamepad cursor: move the cursor onto the item with W A S D and press the key shown in the bottom bar. For example, buying from a vendor: cursor onto the goods (the bottom bar shows "A Buy") → press Space (or J) → press it again in the confirmation.
- "Hold …" key hints need longer than a click, so hold the key on the keyboard; a hint with two key caps is not recognised.
- The life orb, mana orb and experience bar do nothing when clicked.
## Saves, logs and iCloud
- Saves: `~/Library/Application Support/D2R Mobile/save`
- Log: `~/Library/Logs/D2R Mobile/host.log` (the previous run is `host.prev.log`). Please attach it when reporting a problem.
- The older-API build (`D2R Mobile M3.app`) uses a separate pair of directories with M3 in the name.
**iCloud save sync: not available in an App you build from this repository.** The program has the same sync as on iPhone / iPad wired in, but it needs the App to carry the iCloud signing entitlement; an App you build yourself is signed locally without it, so saves stay on this Mac, the log records one line saying iCloud is unavailable and only local saves are used, and the game runs as usual. To bring your phone's progress over, import it by hand as below.
### Importing saves from an iPhone / iPad
Importing is a one-time manual copy: afterwards each side goes its own way and progress diverges; to bring them together later you copy the whole thing again and let one side overwrite the other.
**1. Find the save on the iPhone / iPad**
- Quit the game completely on the phone / tablet first (swipe it away in the app switcher).
- Open the built-in Files app → "On My iPhone" (or "On My iPad") → "D2R Mobile" → the `save` folder inside is the save.
**2. Copy the whole `save` folder, do not pick files**
It holds one folder per character (folder name = character name), a few shared-stash files and a `Settings` folder (game settings including the interface language — after copying, the Mac's game settings become the phone's). The data of the features we added (the extra personal stash pages, the pouch, rift records, the chronicle vault and so on) is in this folder too. The switches on the Custom page are not in it; each device keeps its own.
AirDrop, a cable (the Files tab in Finder) or iCloud Drive all work for getting it to the Mac.
**3. Put it on the Mac**
1. Quit the game on the Mac completely (⌘Q).
2. In Finder press ⇧⌘G, enter `~/Library/Application Support/D2R Mobile` and press Return. (This folder exists only after the game has been started once.)
3. **Back up first**: rename the existing `save` folder there (for example `save backup`); do not delete it.
4. Put the `save` folder from the phone here. Correct looks like this: directly under `D2R Mobile/save/` are the character folders, `Settings` and a few `.d2i` files — no extra level (not `save/save/…`).
5. If `save.work` or `save.new` sit next to it, leave them; the game discards and rebuilds them at launch.
6. Open the game; the phone's characters should appear on the main menu.
Got it wrong or want to go back: quit the game, take the `save` you just put in away, and rename the one from step 3 back to `save`.
The other direction (Mac → iPhone / iPad) uses the same files and mirrors the steps: quit the game on the Mac, copy the Mac's `save` into the game's folder in Files on the phone, replacing the one there (rename the phone's original first as a backup). Keep the App on both sides as current as you can.
Verified: on a Mac, a save placed in the save directory laid out as in step 4 shows its characters on the main menu after launch and can enter a game (one unattended run). The whole route from a real iPhone / iPad through the Files app onto the Mac, the other direction, and hardcore characters have not been operated by a person.
## Quitting and saving
Closing the window, ⌘Q and Quit in the menu all save first and then quit, in any state: in game, with the pause menu open, with a panel open, in a loading screen and with the rift panel open were each verified once. It waits at most 3 seconds; if the save has not completed by then, the log records "quit without saving".
Closing the window, ⌘Q and Quit in the menu all save before quitting, in any state: in game, with the pause menu open, with a panel open, on the loading screen and with the rift panel open were each verified with one run. It waits at most 3 seconds; if saving has not finished by then, the log records a line saying it quit without saving.
## How this version is operated
After a forced quit or a crash, the system's "reopen windows?" dialog no longer comes up to block the game window on the next launch.
- **Move** with W A S D or the gamepad stick. A mouse click on a monster, NPC or object walks over and interacts; a click on empty ground does not move.
- **Items** — sorting, equipping, buying and selling — are handled with the keyboard or gamepad cursor: move the cursor onto the item with W A S D and press the key shown in the bottom bar. For example, buying from a vendor: cursor onto the goods (the bottom bar shows "A Buy") → press J → press J again in the confirmation.
- **The UI** is the original gamepad UI, and the pages we added (the Custom page, the trove, the chronicle, rift floor selection and so on) are all in it.
## Known shortcomings
## Not in this version yet
- Mouse click-to-move on the ground, and long-press / double-click / drag-and-drop on items with the mouse.
- The free town portal on the empty ZR slot of the gamepad.
- The rift task list on the left.
- iCloud save sync, update checks, sharing the diagnostic log.
- The five things from the top have not been operated by a person: keyboard keys, a physical gamepad, the resource-folder dialog, ⌘Q and menu clicks, how it feels in the hand. The key mapping was written from the key-code table.
- Clicking empty ground does not walk; key caps on screen are still gamepad letters; long press / double click / drag / buying on items do not take the mouse (see "Mouse" above).
- The free town portal on ZR + Space of a gamepad is not there.
- The quest bar on the left in rifts is not there.
- An App you build yourself has no iCloud save sync; there are no update checks and no sharing of the diagnostic log.
- The older-API build was played on macOS 15 by one player in our test group (Mac mini M4, macOS 15.7, using a package built elsewhere); building it from this repository on a Mac running macOS 15 has not been operated by a person.
+95 -28
View File
@@ -1,14 +1,21 @@
# 在 Mac 上玩(macOS App,第一版)
# 在 Mac 上玩(macOS App)
English: [MAC.md](MAC.md)
Apple 芯片的 Mac(**macOS 26 及以上**)可以把本项目构建成一个原生的 macOS App:`D2R Mobile.app`,双击启动,键盘、鼠标、手柄都能用。它跑的是同一份游戏、同一套我们加的功能(秘境、珍宝匣、编年史、自定义页等),界面用的是原版的手柄版界面。
Apple 芯片的 Mac 可以把本项目构建成一个原生的 macOS App:`D2R Mobile.app`,双击启动,键盘、鼠标、手柄都能用。它跑的是同一份游戏、同一套我们加的功能(秘境、珍宝匣、编年史、自定义页等),界面用的是原版的手柄版界面。
**先说在前面:这一版还没有人真的坐下来玩过。**键盘按键、实体手柄、选资源文件夹的对话框、⌘Q 与菜单点击、真人手感——这五项都没有人实际操作过。下面写「验过」的,都是无人值守跑出来的:按键用测试脚本注入,鼠标用测试入口注入,退出、全屏、改窗口大小用测试开关。欢迎第一批试用的人把结果开 Issue 告诉我们。
**先说在前面:下面这五项还未经真人操作**——键盘按键、实体手柄、选资源文件夹的对话框、⌘Q 与菜单点击、真人手感。下面写「验过」的,都是无人值守跑出来的:按键用测试脚本注入,鼠标用测试入口注入,退出、全屏、改窗口大小用测试开关。你试过的话,请开 Issue 把结果告诉我们。
## 系统要求
Apple 芯片,macOS 26 及以上。图形部分整个建在 macOS 26 才有的图形接口(Metal 4)上,更早的系统上编不过、也打不开(系统会提示这个 App 不能与当前版本的 macOS 配合使用)。iPhone / iPad 版要求 iOS 26 是同一个原因。
Apple 芯片。按系统分两档:
| 你的系统 | 用哪种出法 | 产出 |
|---|---|---|
| macOS 26 及以上 | 缺省:`dm/tools/mac_app.sh` | `D2R Mobile.app` |
| macOS 15 – 25 | 老接口版:`DM_MAC_M3=1 dm/tools/mac_app.sh` | `D2R Mobile M3.app` |
缺省的构建把图形部分建在 macOS 26 才有的图形接口(Metal 4)上,更早的系统上打不开(系统会提示这个 App 不能与当前版本的 macOS 配合使用)。老接口版是同一份源码、同一个游戏,图形部分改用老系统也有的接口,最低 macOS 15.0;细节见 [OLDER_SYSTEMS.zh-CN.md](OLDER_SYSTEMS.zh-CN.md)。
## 构建
@@ -16,55 +23,115 @@ Apple 芯片,macOS 26 及以上。图形部分整个建在 macOS 26 才有的
```bash
source ~/dm-work/build/cache/dm/venv/bin/activate
dm/tools/mac_app.sh
dm/tools/mac_app.sh # macOS 26 及以上
DM_MAC_M3=1 dm/tools/mac_app.sh # macOS 15 – 25
```
约十几秒,产出 `~/dm-work/out/macapp/D2R Mobile.app`(约 3 MB)。想放到别处:`dm/tools/mac_app.sh <输出目录>`。
缺省出法约十几秒,产出 `~/dm-work/out/macapp/D2R Mobile.app`(约 3 MB)。老接口版第一次要把着色器库按 macOS 15 重编一份,多花约 3–4 分钟,产出 `D2R Mobile M3.app`;它有自己的存档与日志目录(名字里带 M3),可以和缺省的 App 并存。想放到别处:命令后面跟输出目录。
这个 App 里只有我们自己的程序。改写后的游戏程序、着色器库、界面覆盖层都是从你的游戏文件做出来的,它们留在你的工作区(`~/dm-work`)里,App 只记着它们的位置——所以**这个 App 只能在构建它的这台 Mac 上跑**,请不要拷给别人,也不要删掉工作区。签名用的是本机临时签名,不需要开发者账号,也不需要登记设备。
这个 App 里只有我们自己的程序。改写后的游戏程序、着色器库、界面覆盖层都是从你的游戏文件做出来的,它们留在你的工作区(`~/dm-work`)里,App 只记着它们的位置——所以**这个 App 只能在构建它的这台 Mac 上跑**,请不要拷给别人,也不要删掉或挪动工作区(老接口版重编的着色器库就在输出目录里)。签名用的是本机临时签名,不需要开发者账号,也不需要登记设备。
版本号与构建号可以指定:`DM_MAC_VERSION`(缺省 1.0)、`DM_MAC_BUILD`(缺省取当前的月日时分)。
## 第一次打开
双击 `D2R Mobile.app`。第一次启动会请你选**游戏资源文件夹**:选 `~/dm-work/data/switch/3.3.94012/Update`(或它里面的 `RomFS`)即可,里面要有 `data` 文件夹。选错了会说明原因并让你重选;选对之后会记住,下次不再问。
双击 App。第一次启动会请你选**游戏资源文件夹**:选 `~/dm-work/data/switch/3.3.94012/Update`(或它里面的 `RomFS`)即可,里面要有 `data` 文件夹。选错了会说明原因并让你重选;选对之后会记住,下次不再问。
接着会弹一次键位对照表,之后在菜单栏「帮助」里随时能看。
## 东西放在哪
- 存档:`~/Library/Application Support/D2R Mobile/save`
- 日志:`~/Library/Logs/D2R Mobile/host.log`(上一次运行的是 `host.prev.log`)。报问题时请附上它。
语言:首次启动跟系统语言(中文系统进中文,其余进英文)。想换:设置 →「自定义」页第一行的语言开关 → 全部接受 → 把 App 关掉重开。
## 键盘 ↔ 手柄
界面上的按键提示显示的是手柄字母,对应的键盘按键如下:
界面上的按键提示显示的是手柄字母。屏上写着「A」「B」「X」「Y」的地方,按的**不是**键盘上的同名字母(键盘的 A 是向左走),而是下表右边那一列:
| 手柄 | 键盘 |
| 要做的事 / 手柄键 | 键盘 |
|---|---|
| 确认(A) | 空格 或 J |
| 返回(B) | Esc 或 K(局内没有面板开着时,Esc = 打开物品栏那组页面) |
| 回车 | 确认;页面底部有「+」提示时是 +(如起名之后的「接受」);主菜单上回车 = 进入游戏 |
| +(菜单 / 新角色) | = 键 |
| −(地图) | Tab |
| 左摇杆(移动) | W A S D |
| 十字键 | 方向键 |
| A 确认 / B 返回 / X / Y | J / K / U / I |
| X / Y | U / I |
| L / R | Q / E |
| ZL / ZR | Z / C |
| 按左摇杆 / 按右摇杆 | F / G |
| +(菜单)/ −(地图) | 回车 / Tab |
鼠标:左键点目标或界面,右键 = B(返回 / 关面板),滚轮滚列表。接上手柄直接可用,与键盘并存。
**建一个角色,从头到尾这样按**:主菜单按 `=`(或鼠标点「新角色」)→ 用方向键选职业再按回车(或直接点那个职业的人物)→ 模式页按回车或空格 → 起名页按回车弹出输入框,直接打字,回车 → 再按一次回车创建。
菜单栏有「显示 → 全屏(⌃⌘F)」和「退出(⌘Q)」。窗口可以随意拉大小,游戏画面保持 16:9 居中。
接上手柄直接可用,与键盘并存。菜单栏有「显示 → 全屏(⌃⌘F)」和「退出(⌘Q)」。窗口可以随意拉大小,游戏画面保持 16:9 居中。
## 鼠标
现在能做的:
- **点世界里的目标**(怪、NPC、箱子、传送点、地上的物品):走过去交互。
- **点底部那一排**:技能图标 = 放那个技能(等于按它下面标的键),药水格 = 喝那格药,中间的钮 = 打开物品栏那组页面,跑 / 走钮 = 切换。
- **点界面**:面板里的按钮、勾选框、页签(含技能树页里的分页)、暂停菜单、设置页、秘境选层页的「开始」。
- **点底部的按键提示**:点哪一条,等于按那个键。
- **建角时点人物**:点哪个职业的人物就选哪个。
- **右上角小地图**:进局自动打开,按 Tab 开 / 关;点它顶上的地名那一条 = 切到全屏地图,再点一下回来。
- 右键 = 返回(B),滚轮 = 滚列表。
还不能的:
- **点空地不会走**。移动用 W A S D 或手柄摇杆。
- **屏上的键帽仍是手柄字母**,照上面的表换成键盘键。
- **物品的长按 / 双击 / 拖放 / 购买不认鼠标**,用键盘或手柄的光标操作:W A S D 把光标移到物品上,按底栏提示的键。例如在商人处买东西:光标移到货物上(底栏出现「A 购买」)→ 按空格(或 J)→ 确认框里再按一次。
- 「按住…」类的按键提示点一下不够长,用键盘按住;一条提示带两个键帽的不认。
- 血球、魔球、经验条点了没有反应。
## 存档、日志与 iCloud
- 存档:`~/Library/Application Support/D2R Mobile/save`
- 日志:`~/Library/Logs/D2R Mobile/host.log`(上一次运行的是 `host.prev.log`)。报问题时请附上它。
- 老接口版(`D2R Mobile M3.app`)用的是名字里带 M3 的另一对目录。
**iCloud 存档同步:从本仓库自己构建的 App 没有。**程序里接了与 iPhone / iPad 相同的同步,但它需要 App 带着 iCloud 的签名权限;自己构建的 App 用的是本机临时签名,没有这项权限,所以存档只留在这台 Mac 上,日志里会记一行「iCloud 不可用…只用本地存档」,游戏照常。要把手机上的进度带过来,用下面的手工导入。
### 从 iPhone / iPad 导入存档
导入是手工拷一次:拷完之后两边各玩各的,进度会分叉;以后想合到一起,只能再整份拷一次、以其中一边为准覆盖另一边。
**1. 在 iPhone / iPad 上找到存档**
- 先把手机 / 平板上的游戏完全退出(从多任务界面划掉)。
- 打开系统自带的「文件」App →「我的 iPhone」(或「我的 iPad」)→「D2R Mobile」→ 里面的 `save` 文件夹就是存档。
**2. 拷整个 `save` 文件夹,不要挑文件**
里面每个角色一个文件夹(文件夹名 = 角色名),另有共享仓库的几个文件和一个 `Settings` 文件夹(游戏设置,含界面语言——拷过来后 Mac 上的游戏设置会变成手机上那份)。我们加的功能(个人仓库的另外几页、百宝囊、秘境纪录、编年史仓库等)的数据也都在这个文件夹里。「自定义」页的开关不在里面,两台设备各管各的。
用隔空投送、数据线(访达里的「文件」页)或 iCloud 云盘把它传到 Mac 上都行。
**3. 放到 Mac 上**
1. 把 Mac 上的游戏完全退出(⌘Q)。
2. 在访达里按 ⇧⌘G,输入 `~/Library/Application Support/D2R Mobile` 回车。(这个文件夹在游戏第一次启动后才有。)
3. **先备份**:把里面现有的 `save` 文件夹改个名字(比如 `save 备份`),别删。
4. 把从手机拷来的 `save` 文件夹放进来。放对的样子是:`D2R Mobile/save/` 下面直接就是各个角色文件夹、`Settings`、几个 `.d2i` 文件——不要多套一层(不是 `save/save/…`)。
5. 旁边若有 `save.work`、`save.new` 不用管,游戏启动时会丢掉重建。
6. 打开游戏,主菜单上应当出现手机上的角色。
放错了或想恢复:退出游戏,把刚放进去的 `save` 拿走,把第 3 步改了名的那份改回 `save`。
反方向(Mac → iPhone / iPad)文件是同一套,做法对称:Mac 上退出游戏,把 Mac 的 `save` 拷到手机「文件」里游戏文件夹下替换原来的(先把手机上原来的改名备份)。两边的 App 尽量都用最新的。
验过的:在 Mac 上把一份存档按上面第 4 步的摆法放进存档目录,启动后主菜单显示出那份存档里的角色,能进局(无人值守一局)。从真的 iPhone / iPad 经「文件」App 拷出来再放进 Mac 的整个过程、反方向、专家模式角色,未经真人操作。
## 退出与存盘
关窗口、⌘Q、菜单里点退出,在任何状态下都会先存盘再退:局内、暂停菜单开着、面板开着、读取画面、秘境面板开着各验过一局。最多等 3 秒;到点还没存成,会在日志里记一行「未存盘退出」。
## 这一版的操作方式
被强制退出或崩溃之后再打开,不会再有系统那个「要重新打开窗口吗」的框挡住游戏窗口。
- **移动**用 W A S D 或手柄摇杆。鼠标点到怪物、NPC、物件会走过去交互;点空地不会走。
- **物品**的整理、穿脱、买卖用键盘或手柄的光标操作:W A S D 把光标移到物品上,按底栏提示的键。例如在商人处买东西:光标移到货物上(底栏出现「A 购买」)→ 按 J → 确认框里再按 J。
- **界面**是原版的手柄版界面,我们加的页面(自定义页、珍宝匣、编年史、秘境选层等)都在里面。
## 已知不足
## 这一版还没有的
- 鼠标点地面走路、鼠标对物品的长按 / 双击 / 拖放。
- 手柄上 ZR 空格的免费回城。
- 秘境左侧的任务栏。
- iCloud 存档同步、更新检查、分享诊断日志。
- 开头说的五项未经真人操作:键盘按键、实体手柄、选资源文件夹的对话框、⌘Q 与菜单点击、真人手感。键位是照键码表写的。
- 鼠标点空地不会走;屏上的键帽仍是手柄字母;物品的长按 / 双击 / 拖放 / 购买不认鼠标(见上面「鼠标」一节)。
- 手柄上 ZR 空格的免费回城没有。
- 秘境左侧的任务栏没有。
- 自己构建的 App 没有 iCloud 存档同步;没有更新检查和分享诊断日志。
- 老接口版在 macOS 15 上由一位内测玩家实际玩过(Mac mini M4,macOS 15.7,用的是出好的包);在 macOS 15 的 Mac 上从本仓库自己构建,未经真人操作。
+1 -1
View File
@@ -15,7 +15,7 @@ The normal route is to build the whole app with Xcode on a Mac (see "Building" o
## What the shell contains and does not contain
Download the shell from this repository's [Releases page](https://github.com/jhaizhou-ops/d2r-mobile/releases). The shell (`D2RMobile-shell.ipa`, about 3 MB) contains only our own host program, the icon and two tables that are public in this repository. It does **not** contain: the game program, shaders, the overlay, UI art, or any data table generated from game files. The script that builds the shell (`dm/ios/tools/shell_build.sh`) finishes by searching every file in the shell for real game content, and refuses to produce a shell if it finds any.
Download the shell from this repository's [Releases page](https://github.com/jhaizhou-ops/d2r-mobile/releases). There are two on the Releases page: `D2RMobile-shell.ipa` for iOS 26 and later, `D2RMobile-shell-ios18.ipa` for iOS 18 – 25 ([OLDER_SYSTEMS.md](OLDER_SYSTEMS.md)); pick the one for your phone's system, the steps after that are the same. The shell (about 4 MB) contains only our own host program, the icon and two tables that are public in this repository. It does **not** contain: the game program, shaders, the overlay, UI art, or any data table generated from game files. The script that builds the shell (`dm/ios/tools/shell_build.sh`) finishes by searching every file in the shell for real game content, and refuses to produce a shell if it finds any.
The shell cannot start by itself: on launch it tells you that this package has no game program in it yet.
+1 -1
View File
@@ -15,7 +15,7 @@ English: [NO_XCODE.md](NO_XCODE.md)
## 壳里有什么、没有什么
壳从本仓库的[发布页](https://github.com/jhaizhou-ops/d2r-mobile/releases)下载。壳(`D2RMobile-shell.ipa`,约 3 MB)里只有我们自己的宿主程序、图标和两张随仓库公开的表。它**没有**:游戏程序、着色器、覆盖层、界面素材、任何从游戏文件生成的数据表。构建壳的脚本(`dm/ios/tools/shell_build.sh`)在最后会拿真实的游戏内容去壳里逐个文件搜一遍,搜到就不出壳。
壳从本仓库的[发布页](https://github.com/jhaizhou-ops/d2r-mobile/releases)下载。发布页上有两份:`D2RMobile-shell.ipa` 给 iOS 26 及以上,`D2RMobile-shell-ios18.ipa` 给 iOS 18 – 25([OLDER_SYSTEMS.zh-CN.md](OLDER_SYSTEMS.zh-CN.md)),按手机的系统挑一份,后面的步骤相同。壳(约 4 MB)里只有我们自己的宿主程序、图标和两张随仓库公开的表。它**没有**:游戏程序、着色器、覆盖层、界面素材、任何从游戏文件生成的数据表。构建壳的脚本(`dm/ios/tools/shell_build.sh`)在最后会拿真实的游戏内容去壳里逐个文件搜一遍,搜到就不出壳。
壳自己起不来——它启动时会告诉你「这个安装包里还没有游戏程序」。
+61
View File
@@ -0,0 +1,61 @@
# Older systems: iOS 18 – 25 and macOS 15
**English** | [简体中文](OLDER_SYSTEMS.zh-CN.md)
The default build requires iOS 26 / macOS 26: the graphics side is built on a graphics interface that only exists from those systems on (Metal 4). Devices that have not moved to 26 use the "older-API build" — the same source, the same game, the same features, with the graphics side using interfaces that older systems also have. Its minimum is **iOS 18.0 / macOS 15.0**.
## Which one do I need
Look at the system first, then at the chip. The two are independent and can be combined:
| Your device | System is iOS 26 or later | System is iOS 18 – 25 |
|---|---|---|
| **A17 Pro and newer** (iPhone 15 Pro and later, iPhone 16 and later) | Default build, nothing to add | Older-API build |
| **A16 and earlier** (iPhone 14 series, iPhone 15 / 15 Plus and before) | Default build + Legacy Device Pack | Older-API build + Legacy Device Pack |
- The **system** decides which build to use (default / older-API).
- The **chip** decides whether you also need a Legacy Device Pack: the GPU of the A16 and earlier does not accept the format of the game textures. See [LEGACY_DEVICES.md](LEGACY_DEVICES.md).
- On a Mac only the system matters: macOS 26 or later uses the default build, macOS 15 – 25 the older-API build; no Apple silicon Mac needs the texture pack.
## Building the older-API version
### iPhone / iPad, with a Mac and Xcode
Preparation is unchanged (`./setup.sh`); add one switch when building:
```bash
cd dm/ios
DM_IOS_M3=1 ./run.sh build
```
It changes the deployment target to iOS 18.0 and switches the graphics side to the older interfaces. A free Apple ID still works: `DM_FREE_ACCOUNT=1` can be set together with it. For A16 and earlier devices, also bring the texture pack (`DM_ASTC_PACK`) as described in [LEGACY_DEVICES.md](LEGACY_DEVICES.md).
### iPhone / iPad, without Xcode
The Releases page has two shells. Pick the one for your system; every other step is exactly as in [NO_XCODE.md](NO_XCODE.md):
| Shell | For |
|---|---|
| `D2RMobile-shell.ipa` | iOS 26 and later |
| `D2RMobile-shell-ios18.ipa` | iOS 18 – 25 |
The packaging tool accepts both shells with the same command. For A16 and earlier devices add `D2RM_ASTC_PACK` as well (see the "Older devices" section of NO_XCODE) — the texture pack depends only on the chip, and both shells use the same pack.
### Mac
```bash
source ~/dm-work/build/cache/dm/venv/bin/activate
DM_MAC_M3=1 dm/tools/mac_app.sh # produces ~/dm-work/out/macapp/D2R Mobile M3.app
```
It recompiles the shader libraries for macOS 15 (about 3 minutes, the first time only) into the output directory. The older-API App is called "D2R Mobile M3" and has its own save and log directory, so it can sit next to the default App. Like the default App it runs only on the Mac that built it; **do not delete or move the output directory**, the recompiled shader libraries are in it.
## How it differs from the default build
- Picture, gameplay and save format are the same.
- The graphics side submits about 20 – 30% more commands per draw, so the same picture costs some more CPU time; the frame-time difference we measured is within measurement noise.
- The resource-download extension is not included (it only serves Apple-hosted asset packs, which public builds do not use anyway).
## In practice
macOS 15: a player in our test group has played the older-API build on a Mac mini M4 running macOS 15.7. iOS 18: a community developer has run the game on iOS 18 on their own branch with the same kind of change; the iOS 18 package of this repository's version has just gone out to our test group. If you run into a problem, open an Issue with the device model, the system version and the diagnostic log (pause menu → "Share diagnostic log").
+61
View File
@@ -0,0 +1,61 @@
# 老系统:iOS 18 – 25 与 macOS 15
[English](OLDER_SYSTEMS.md) | **简体中文**
缺省的构建要求 iOS 26 / macOS 26:图形部分建在这两个系统才有的图形接口(Metal 4)上。没升到 26 的设备用「老接口版」——同一份源码、同一个游戏、同样的功能,只是图形部分改用老系统也有的接口,最低 **iOS 18.0 / macOS 15.0**。
## 我该用哪一种
先看系统,再看芯片。两件事互不相干,可以叠在一起:
| 你的设备 | 系统是 iOS 26 及以上 | 系统是 iOS 18 – 25 |
|---|---|---|
| **A17 Pro 及更新**(iPhone 15 Pro 起、iPhone 16 起) | 缺省构建,什么都不用加 | 老接口版 |
| **A16 及更早**(iPhone 14 系列、iPhone 15 / 15 Plus 及更早) | 缺省构建 + 老机型贴图包 | 老接口版 + 老机型贴图包 |
- **系统**决定用哪种构建(缺省 / 老接口版)。
- **芯片**决定要不要多做一份「老机型贴图包」:A16 及更早的显卡不认游戏贴图的格式,做法见 [LEGACY_DEVICES.zh-CN.md](LEGACY_DEVICES.zh-CN.md)。
- Mac 只看系统:macOS 26 及以上用缺省构建,macOS 15 – 25 用老接口版;Apple 芯片的 Mac 都不需要贴图包。
## 怎么出老接口版
### iPhone / iPad,有 Mac 和 Xcode
准备步骤不变(`./setup.sh`),构建时多带一个开关:
```bash
cd dm/ios
DM_IOS_M3=1 ./run.sh build
```
它把部署目标改成 iOS 18.0、图形部分换成老接口。免费的 Apple ID 照旧可用:`DM_FREE_ACCOUNT=1` 与它可以同时设。A16 及更早的机型,再照 [LEGACY_DEVICES.zh-CN.md](LEGACY_DEVICES.zh-CN.md) 带上贴图包(`DM_ASTC_PACK`)。
### iPhone / iPad,不用 Xcode
发布页上有两份壳,挑对应系统的那一份,其余步骤与 [NO_XCODE.zh-CN.md](NO_XCODE.zh-CN.md) 完全相同:
| 壳 | 给谁 |
|---|---|
| `D2RMobile-shell.ipa` | iOS 26 及以上 |
| `D2RMobile-shell-ios18.ipa` | iOS 18 – 25 |
做包工具两份壳都认,命令不变。A16 及更早的机型同样加 `D2RM_ASTC_PACK`(见 NO_XCODE 的「老机型」一节)——贴图包只和芯片有关,两份壳用的是同一个贴图包。
### Mac
```bash
source ~/dm-work/build/cache/dm/venv/bin/activate
DM_MAC_M3=1 dm/tools/mac_app.sh # 产出 ~/dm-work/out/macapp/D2R Mobile M3.app
```
它会把着色器库按 macOS 15 重编一份(约 3 分钟,只在第一次),放在输出目录里。老接口版的 App 叫「D2R Mobile M3」,存档和日志目录也是单独的,可以和缺省的 App 并存。和缺省的 App 一样,它只能在构建它的这台 Mac 上跑;**输出目录不要删也不要挪**,重编的着色器库在里面。
## 和缺省构建有什么不同
- 画面、玩法、存档格式都一样。
- 图形部分每次绘制要多提交约两到三成的指令,所以同样的画面多花一些处理器时间;我们量到的帧时间差别在测量噪声之内。
- 不带「资源下载扩展」(它只服务苹果托管的资源包,公开构建本来也用不上)。
## 实际情况
macOS 15:已有内测玩家在 Mac mini M4(macOS 15.7)上实际玩过老接口版。iOS 18:已有社区开发者在自己的分支上用同样的改法把游戏跑在了 iOS 18 上;本仓库这一版的 iOS 18 包刚发给内测玩家。遇到问题请开 Issue,带上机型、系统版本和诊断日志(暂停菜单 →「分享诊断日志」)。