Repo ↗ · 原始 README ↗ · 文件包(Markdown/授權)
封面參考(原作): RimWorld · 原作宣傳圖,由 IGDB 提供。圖片版權屬原權利人,供辨識原作使用,不代表此重寫/模組專案的實際畫面。
來源維護者: BulletTrain222 · 版本: b61b88f353b3 · 整理日期: 2026-10-12
文件授權: MIT · LICENSE-APACHE · LICENSE-MIT · 本文形式: README 翻譯
下文為來源 README 的繁中翻譯,由 Kirikirin 使用 AI 輔助整理;功能、完成度與測試結果均為原作者描述,本站未逐項實機驗證。圖片改為來源連結,指令與技術識別保留原文。
rim-rs
開源 Rust 與 Bevy 重製的 RimWorld 殖民地模擬,使用來自你自己遊戲安裝的資料。
從零開始以 Rust 重新實作 RimWorld 的遊戲行為,使用 Bevy 引擎。
rim-rs 的目標是與 RimWorld 達到行為相容:在已實作的部分中,相同的規則、時序、決策與互動。
重要
rim-rs 是一個獨立專案。它不是 RimWorld 的反編譯副本,不是 RimWorld 的散布版本,也不是自動化的 C# → Rust 轉換。
本專案不包含任何 RimWorld 遊戲檔案。它在執行階段從你自己的 RimWorld 安裝載入支援的資料與材質,因此需要一份合法取得的 RimWorld 副本。
RimWorld 是 Ludeon Studios 的商標。rim-rs 與 Ludeon Studios 無關,亦未獲其背書。
專案狀態
rim-rs 處於實驗性且不完整的狀態。你可以開始一個殖民地並遊玩一個小型循環(建造、農耕、烹飪、研究、搬運、採礦、狩獵、戰鬥、存檔與讀檔),但 RimWorld 的很大一部分仍然缺失。不宣稱完整的 RimWorld 相容性。
| 參考 RimWorld 版本 | 1.6.4871 rev591(其他版本會以警告啟動) |
| 內容 | 僅限主遊戲;DLC 與模組會被忽略 |
| 平台 | Windows(已測試);Linux 與 macOS 應可建置但未經測試 |
| 引擎 | Rust(stable)+ Bevy 0.19 |
目前可運作(概述): RimWorld Def 載入與繼承;在執行階段從你的安裝解碼材質;RimWorld 風格的地圖生成(地形、山脈、礦石、植物、野生動物);尋路、思考樹與工作;食物、休息與作息表、部分娛樂與心情;工作優先順序與大多數基本工作(搬運、建造、採礦、農耕、烹飪、屠宰、研究、清潔、醫療);健康、溫度、光照與電力;近戰與遠程戰鬥;狩獵與掠食者;存檔/讀檔;以及 RimWorld 風格的介面(殖民者列、選取、檢視面板、gizmos、右鍵命令、建築師、工作與作息分頁)。
尚未具備: 敘事者與襲擊、世界地圖、任務、貿易、大部分心情與精神崩潰、許多建築與物品、檢視分頁與大多數主分頁、DLC 與模組。
詳見 docs/status.md 的詳細清單。
運作方式
-
在執行階段使用原始遊戲資料。
rim-rs 直接從使用者的 RimWorld 安裝讀取支援的 Defs、設定與材質。原始安裝不會被修改。 -
行為以 Rust 獨立實作。
遊戲系統以 Rust 從零撰寫。RimWorld 本身被用作行為參考,而非複製其實作。 -
與原版進行比對。
相容性工作使用 RimWorld 的資料、受控觀察與針對性研究來判定規則、時序、順序與邊界情況。rim-rs 接著獨立實作這些行為。 -
模擬與呈現分離。
確定性模擬位於rimworld_sim中,且不依賴 Bevy。Bevy 應用程式負責渲染、輸入與介面行為。 -
使用者擁有的資產留在儲存庫之外。
RimWorld XML、材質、二進位檔、反編譯器輸出與診斷產物不會隨 rim-rs 散布。
開始使用
1. 安裝先決條件
-
RimWorld,合法取得(Steam、GOG 或其他商店)。rim-rs 絕不會修改它。
-
來自 rustup.rs 的 Rust(stable)。
-
Windows: 具有「Desktop development with C++」工作負載的 Visual Studio Build Tools(MSVC 連結器)。
-
Linux: Bevy 的系統套件,例如在 Debian/Ubuntu 上:
sudo apt install libasound2-dev libudev-dev libwayland-dev libxkbcommon-dev
2. 取得程式碼
git clone https://github.com/BulletTrain222/rim-rs.git
cd rim-rs
3. 告訴 rim-rs RimWorld 安裝在哪裡
你需要的資料夾是包含 Version.txt 與 Data/Core 的那個。典型位置:
| 平台 | 預設 Steam 位置 |
|---|---|
| Windows | C:\Program Files (x86)\Steam\steamapps\common\RimWorld |
| Linux | ~/.local/share/Steam/steamapps/common/RimWorld |
| macOS | ~/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app |
使用其中一種方法(依此順序檢查):
-
命令列:
--rimworld "" -
環境變數:
RIMWORLD_PATH="" -
設定檔: 將
config.example.toml複製到config.toml並設定
路徑(此檔案會被 git 忽略,因此你的本機路徑永遠不會被提交):[rimworld] path = "C:/Program Files (x86)/Steam/steamapps/common/RimWorld" -
什麼都不做: 會自動嘗試常見的 Steam 位置。
4. 檢查是否找到你的安裝
cargo run --release -p rimworld_app -- --check
這會載入遊戲的 Defs、印出摘要(Def 數量、生成的地圖、殖民者)並結束,不會開啟視窗。它應該回報
no load warnings。如果你沒有使用設定檔或環境變數,請加上 --rimworld ""。
首次建置會編譯 Bevy,需要數分鐘;之後的建置很快。
5. 執行它
cargo run --release -p rimworld_app
會開啟一個視窗,在全新生成的地圖上有三位殖民者。使用
--release:debug 建置慢得多。
遊玩
介面遵循 RimWorld 的樣式:殖民者列位於頂部,檢視面板與選取項目的命令(gizmos)位於左下方,主按鈕沿著底部排列。
| 動作 | 控制 |
|---|---|
| 選取 | 左鍵點擊(再次點擊:游標下的下一個物件);Shift 可加入/移除;拖曳可框選 |
| 跳至某位殖民者 | 在殖民者列中雙擊其頭像 |
| 命令(移動、攻擊、裝備、優先處理工作) | 選取殖民者後按右鍵 |
| 建築師(建造、區域、命令) | Tab、建築師按鈕,或在未選取任何東西時按右鍵 |
| 工作分頁 | F1 |
| 作息分頁 | F2 |
| 徵召/解除徵召 | R(gizmo) |
| 放置時旋轉 | Q / E |
| 放下工具/關閉視窗 | 右鍵或 Esc |
| 暫停/速度 | Space / 1–4 |
| 平移/縮放 | WASD 或方向鍵、中鍵拖曳/滑鼠滾輪 |
| 顯示所有快速鍵的除錯面板 | Ctrl+F1 |
| 快速存檔/快速讀檔 | Ctrl+F5 / Ctrl+F9(儲存至 saves/quicksave.json) |
第一個殖民地:開啟建築師,在殖民者旁邊放置一個儲存區,使用 Structure → Wall 並拖曳出一個房間(被詢問時選擇材料),從 Structure 加入一扇 Door,從 Furniture 加入 Beds,並標記一個種植區。殖民者會自行搬運、建造與農耕;工作分頁(F1)決定誰做什麼。
命令列選項
| 選項 | 意義 |
|---|---|
--rimworld |
RimWorld 安裝資料夾(覆寫 RIMWORLD_PATH 與 config.toml) |
--config <file> |
要讀取的設定檔(預設 ./config.toml) |
--check |
載入 Defs、印出摘要並結束 |
--seed <n> |
地圖種子(預設 1) |
--pawns <n> |
殖民者數量(預設 3) |
--showcase |
一個預先布置的示範殖民地(已建好的房間、研究、電力、農場、藍圖) |
--colony / --farm |
以一個種植區開始(以及一間臥室的藍圖) |
--speed <n> |
每步的初始速度(以 tick 計)(1、3、6、15) |
--zoom <scale> / --focus x,z |
初始相機縮放/聚焦格 |
--play <file> |
執行按鍵與點擊的腳本(見 crates/rimworld_app/src/script.rs) |
--help |
列出每個選項 |
執行測試
cargo test --workspace
- 需要 RimWorld 安裝的測試在未設定時會自行跳過。設定
RIMWORLD_PATH(或建立config.toml)即可一併執行它們。 - 重播原版遊戲錄影的測試在錄影缺失時會跳過;錄影不屬於此儲存庫的一部分。
送出變更前,也請執行:
cargo fmt --all --check
cargo clippy --workspace --all-targets -- -D warnings
疑難排解
- 「no RimWorld installation configured」、「does not exist」或「is not a
RimWorld installation」。 將 rim-rs 指向包含
Version.txt與Data/Core的資料夾(不是.exe,也不是Data)。當錯誤
訊息能猜測到時,會建議修正後的路徑。 - 「RimWorld x has not been tested」。 rim-rs 仍會繼續;大多數資料
在版本之間是穩定的,但行為是對照 1.6.4871
rev591 檢查的。 - 關於
alsa、udev、wayland或xkbcommon(Linux)的建置錯誤。
安裝上方列出的系統套件。 - Windows 上的連結器錯誤。 安裝 Visual Studio Build Tools(C++
工作負載)並重新開啟你的終端機。 - 遊戲執行緩慢。 使用
--release。 - 材質顯示為純色方塊。 你安裝中的材質
無法讀取;rim-rs 會退回使用除錯顏色。檢查
安裝路徑以及遊戲檔案是否完好。
儲存庫結構
rim-rs/
├── Cargo.toml
├── crates/
│ ├── rimworld_assets/ # install discovery, config, version, texture loading
│ ├── rimworld_defs/ # XML Def loading, inheritance and typed Def database
│ ├── rimworld_sim/ # deterministic, engine-independent game simulation
│ └── rimworld_app/ # Bevy renderer, input and interface
├── docs/ # architecture, compatibility, status and provenance
├── tools/ # asset guards and Git hooks
├── config.example.toml
├── LICENSE-MIT
├── LICENSE-APACHE
└── THIRD_PARTY_NOTICES.md
文件
- docs/status.md — 已實作的內容與主要缺口
- docs/architecture.md — 各 crate 如何組合在一起
- docs/compatibility.md — 參考版本與
版本政策 - docs/provenance.md — 可提交的內容與
使用的資源
程式碼註解會引用本專案相容性研究筆記的章節
(docs/research.md);那些筆記尚未發布。
貢獻
歡迎貢獻。為了讓儲存庫保持可發布:
-
絕不提交任何來自 RimWorld 安裝的東西(XML、材質、
音效、二進位檔)、反編譯器輸出或傾印。每次複製後啟用一次防護:git config core.hooksPath tools/git-hooks -
自行以 Rust 實作行為,並用自己的話描述發現。將已知的近似處標記為
// COMPATIBILITY TODO: currently approximate。 -
保持提交範圍小,並先執行測試、
cargo fmt與cargo clippy。
授權條款
rim-rs 的原創程式碼以 MIT 或
Apache-2.0 雙重授權,由你選擇。第三方素材請見
THIRD_PARTY_NOTICES.md。
RimWorld 及其所有內容仍為 Ludeon Studios 的財產。
授權與來源聲明
原始 README 與翻譯沿用 MIT 授權;本次修改為繁中翻譯、連結與排版調整。可修改的 Markdown、原始 README、LICENSE 與 NOTICE 收錄於頂部文件包。原作遊戲內容與商標不因此獲得授權。
LICENSE-APACHE
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
LICENSE-MIT
MIT License
Copyright (c) 2026 The rim-rs contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
THIRD_PARTY_NOTICES.md
# Third-party notices
rim-rs's own code is licensed under MIT OR Apache-2.0 (see
[LICENSE-MIT](LICENSE-MIT) and [LICENSE-APACHE](LICENSE-APACHE)). This file
lists material from other sources.
## libnoise gradient vector table
`crates/rimworld_sim/src/noise_vectors.rs` contains the 256 normalized
gradient vectors (1024 numbers) published in `vectortable.h` of libnoise by
Jason Bevins (http://libnoise.sourceforge.net/). That file states:
> Written by Jason Bevins. Actually it's the output of a program written by
> me. [...]
>
> This file is in the public domain.
The values are reproduced unchanged (checked value for value against the
original header). Only this table is used; no other libnoise code is
included.
## Cargo dependencies
Dependencies such as Bevy, roxmltree, serde, toml and thiserror are not
vendored. Cargo downloads them under their own licences (see each crate on
crates.io). All of them are available under permissive terms (MIT,
Apache-2.0, BSD, ISC, Zlib, BSL-1.0, CC0, Unlicense, Unicode-3.0); `r-efi`
offers LGPL-2.1 only as an alternative to MIT or Apache-2.0. Binaries built
from this repository include those crates and must carry their notices.
## RimWorld
RimWorld and its data, textures, sounds and other content are the property
of Ludeon Studios. None of it is included in this repository. rim-rs
reads the data it needs from the user's own installation at runtime.

評論
…