mirror of
https://github.com/moeru-ai/airi-factorio.git
synced 2025-09-04 17:02:04 +00:00
chore: more details in readme (#16)
This commit is contained in:
67
README.md
67
README.md
@@ -8,31 +8,64 @@ Helper for アイリ to play Factorio with you.
|
||||
|
||||
## Development
|
||||
|
||||
Clone the repository:
|
||||
### Project Structure
|
||||
|
||||
```bash
|
||||
git clone https://github.com/moeru-ai/airi-factorio
|
||||
```
|
||||
It's hard to describe the project structure in a few words, but it currently looks like this:
|
||||
|
||||
Symlink the mods to your Factorio mod folder:
|
||||
<div style="max-width: 500px; margin: 0 auto;">
|
||||
|
||||
```bash
|
||||
cd /path/to/airi-factorio
|
||||

|
||||
|
||||
ln -s /path/to/airi-factorio/packages/autorio/dist /path/to/factorio/data/autorio
|
||||
```
|
||||
</div>
|
||||
|
||||
Install dependencies:
|
||||
### Start to develop
|
||||
|
||||
```bash
|
||||
pnpm i
|
||||
```
|
||||
1. Clone the repository:
|
||||
|
||||
Run the script:
|
||||
```bash
|
||||
git clone https://github.com/moeru-ai/airi-factorio
|
||||
```
|
||||
|
||||
```bash
|
||||
pnpm run dev
|
||||
```
|
||||
2. Install dependencies:
|
||||
|
||||
```bash
|
||||
pnpm i
|
||||
```
|
||||
|
||||
3. Create a symlink for the `autorio` mod:
|
||||
|
||||
```bash
|
||||
cd /path/to/airi-factorio
|
||||
|
||||
ln -s /path/to/airi-factorio/packages/autorio/dist /path/to/factorio/data/autorio
|
||||
# If you are using DevContainer, you can use the following command:
|
||||
ln -s /workspace/airi-factorio/packages/autorio/dist /opt/factorio/data/autorio
|
||||
```
|
||||
|
||||
4. Copy and fill the `.env` file:
|
||||
|
||||
```bash
|
||||
cp packages/agent/.env.example packages/agent/.env.local
|
||||
cp packages/factorio-wrapper/.env.example packages/factorio-wrapper/.env.local
|
||||
```
|
||||
|
||||
If you are using DevContainer, you can set `WS_SERVER_HOST` and `FACTORIO_WS_HOST` and `RCON_API_SERVER_HOST` to `localhost`.
|
||||
|
||||
5. Create a game save file, the save file path should be the same as the one in the `.env` file:
|
||||
|
||||
```bash
|
||||
/path/to/factorio/bin/x64/factorio --create /path/to/factorio/saves/save.zip
|
||||
# If you are using DevContainer, you can use the following command:
|
||||
/opt/factorio/bin/x64/factorio --create /path/to/factorio/saves/save.zip
|
||||
# If your machine is not x64, you can use the following command:
|
||||
box64 /opt/factorio/bin/x64/factorio --create /path/to/factorio/saves/save.zip
|
||||
```
|
||||
|
||||
6. Run the development script:
|
||||
|
||||
```bash
|
||||
pnpm run dev
|
||||
```
|
||||
|
||||
Now you can use the commands in Factorio, the script will be compiled automatically, but you need to exit and re-enter the game to see the changes(no need to restart the game).
|
||||
|
||||
|
BIN
project-structure.png
Normal file
BIN
project-structure.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 135 KiB |
Reference in New Issue
Block a user