# Required Resources

This section documents all Required config fields, purposes, allowed values, defaults, and fallback behavior.

For `dc` format conventions, please read:
- [Getting Started](../Getting_Started)

## Location & Scan Rules
- Directory: `DLC/required/`
- Only top-level files are scanned (no recursive subdirectory scan).
- Only entries with `isInList = true` are shown in the Required list.

## Complete Example
```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/requiredA.jar",
  "https://mirror.example.net/requiredA.jar"
]
priority = "curseforge,modrinth,directurl"

[basic]
identifier = "ExampleRequired"
file_name = "example-required-1.0.0.jar"
appliedTarget = "mods"
RedirectUrl = "https://example.com/required-resource-guide"
isInList = true
isHidden = false
dependencies = ["HelperLib"]

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

    [basic]
    identifier = "HelperLib"
    file_name = "helperlib.jar"
    appliedTarget = "mods"
    isInList = true
    isHidden = true
    dependencies = ""

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

    [tip]

[DisplayName]
en_us = "Required Example"
zh_cn = "必要资源示例"

[tip]
en_us = "Do not remove"
zh_cn = "请勿删除"
```

## Field Reference

#### `[download]`
- `curseforge_projectid`, `curseforge_fileid`
- `modrinth_projectid`, `modrinth_versionid`
- `directUrl`: string or string array
- `priority`: `curseforge`, `modrinth`, `directurl` (comma-separated)

#### `[basic].identifier`
- **Purpose**: Logical ID for dependencies/presets/conflicts matching.
- **Fallback**: config file base name.

#### `[basic].file_name`
- **Purpose**: DLC file name (including extension).
- **Fallback**: inferred from URL; then identifier.

#### `[basic].appliedTarget`
- **Purpose**: Apply/install target path.
- **Allowed**: relative or absolute path.

#### `[basic].RedirectUrl`
- **Purpose**: URL opened when the DLC name is double-clicked in the DLC list.
- **Allowed**: String.

#### `[basic].isInList`
- **Purpose**: Show in Required manager list.
- **Default**: `true`.

#### `[basic].isHidden`
- **Purpose**: Hide entry while still managed internally.
- **Default**: `false`.

#### `[basic].dependencies`
- **Allowed**: string or array of identifiers.

#### `[dependencies]`
- **Purpose**: Define nested dependency nodes.
- **Syntax**:
  - `identifier:` or `[identifier]`

#### `[DisplayName]`
- Localized display name table (`en_us`, `zh_cn`, etc.).

#### `[tip]`
- Localized tooltip text table (`en_us`, `zh_cn`, etc.).

#### `UserRemoved`
- Internal marker key written by runtime when user removes an entry manually.
- Do not set manually.

## Marker Files
- `DLC/required/SKIP`:
  - Skip required prompt.
  - Ignored when `FORCE` exists.
- `DLC/required/FORCE`:
  - Force required prompt and hide skip option.
  - If file content contains `forcerestart`, restart is mandatory.
