# Remote（远程 DLC）

本节说明 Remote 配置的字段、用途、可填写值、默认行为与回退规则。

`dc` 格式请先阅读：
- [开始使用](../Getting_Started)

## 位置
- 目录：`DLC/remote/`
- 子目录用于分类：
  - 当配置位于 `DLC/remote/<子目录>/` 时，下载文件会放到 `DLC/<子目录>/`。
  - 示例：`DLC/remote/mods/example.dc` -> `DLC/mods/<file_name>`。

## 完整示例
```dc
[download]
curseforge_projectid = "123456"
curseforge_fileid = "7890123"
modrinth_projectid = "project-slug-or-id"
modrinth_versionid = "version-id-or-number"
directUrl = [
  "https://example.com/mirror/modA.jar",
  "https://mirror.example.net/modA.jar"
]
priority = "curseforge,modrinth,directurl"

[basic]
identifier = "ExampleMod"
type = "mod"
file_name = "example-mod-1.0.0.jar"
appliedTarget = "mods"
RedirectUrl = "https://example.com/project-page"
isInList = true
isHidden = false
AllowEnableByAll = true
dependencies = ["HelperLib"]
conflicts = ["ConflictMod"]
alarm = false

[dependencies]
  HelperLib:
    [download]
    modrinth_projectid = "helperlib"
    modrinth_versionid = "helperlib-version"
    directUrl = ""
    priority = "modrinth"

    [basic]
    identifier = "HelperLib"
    type = "mod"
    file_name = "helperlib-1.0.0.jar"
    isInList = true
    isHidden = true
    AllowEnableByAll = true
    dependencies = ""
    conflicts = ""
    alarm = false

    [DisplayName]
    en_us = "Helper Library"
    zh_cn = "辅助库"

    [tip]

[DisplayName]
en_us = "Example Mod"
zh_cn = "示例模组"

[tip]
en_us = "Example tip"
zh_cn = "示例提示"
```

## 字段说明

#### `[download]`
- `curseforge_projectid`：CurseForge 项目 ID 或 slug。
- `curseforge_fileid`：CurseForge 文件 ID / 版本字符串 / 文件名。
- `modrinth_projectid`：Modrinth 项目 ID 或 slug。
- `modrinth_versionid`：Modrinth 版本 ID 或版本字符串。
- `directUrl`：字符串或字符串数组（多镜像）。
- `priority`：逗号分隔优先级。
  - 支持：`curseforge`、`modrinth`、`directurl`。
  - 为空时，默认从 `curseforge` 开始并按内置顺序补全。

#### `[basic].identifier`
- **用途**：用于前置/冲突/预设匹配的逻辑标识。
- **回退顺序**：identifier -> file_name -> 配置文件名 -> URL 文件名 -> 平台项目 ID。

#### `[basic].file_name`
- **用途**：DLC 文件名（包含扩展名）。
- **回退**：先从 URL 推断，再使用回退名。

#### `[basic].type`
- **可填**：`mod`、`resourcepack`、`datapack`、`gunpack`、`others`。
- **默认**：`mod`。

#### `[basic].appliedTarget`
- **用途**：覆盖应用目标路径。
- **可填**：相对路径或绝对路径。
- 相对路径按整合包根目录解析。

#### `[basic].RedirectUrl`
- **用途**：在 DLC 列表中双击 DLC 名称时打开的链接。
- **可填**：字符串。

#### `[basic].isInList`
- **用途**：是否在 DLC 列表中显示该条目。
- **默认**：`true`。

#### `[basic].isHidden`
- **用途**：隐藏该条目，但仍参与依赖关系管理。
- **默认**：`false`。

#### `[basic].AllowEnableByAll`
- **用途**：是否遵循“全部开启”而开启。
- **默认**：`true`。

#### `[basic].conflicts`
- **可填**：字符串或 identifier 数组。

#### `[basic].alarm`
- **用途**：启用前显示警告确认页。
- **可填**：布尔。

#### `[basic].dependencies`
- **可填**：
  - 字符串（如 `"LibA,LibB"`）
  - 数组（如 `["LibA","LibB"]`）

#### `[dependencies]`
- **用途**：以嵌套的形式定义前置。
- **语法**：
  - `identifier:` 或 `[identifier]`

#### `[DisplayName]`
- 多语言显示名文本表，通常为 `en_us` 与 `zh_cn`。

#### `[tip]`
- 多语言提示文本表，通常为 `en_us` 与 `zh_cn`。

## 补充说明
- 当 `type = "others"` 且 `appliedTarget` 为空时，该项会被强制不在列表展示。
- 显示语言回退：客户端语言 -> `en_us` -> 首个可用项。
- 非法文件名字符会被替换为 `_`。
