# Config

### General Structure

```lua
FRKN = {
  ServerCallbacks = {},
  OpenPetCommand = "mypet",
  Interaction = { Target = "qb-target" },

  Shops = { Coords = vector3(564.9654, 2745.9912, 42.8771) },

  Job = {'police' , 'sheriff'},

  K9Search = { "joint", "cokebaggy", "crack_baggy", ... },

  Training = { ... },

  Item = { reviveItems = {...}, foodItems = {...}, waterItems = {...},
           energyItems = {...}, leashItems = {...}, connectItems = {...}, tennisItems = {...} },

  DieMode = true,
  AgeControlTime = 600000,

  PetDecay = { health=0.5, notEating=5, hunger=1.0, thirst=1.0, energy=0.8, updateInterval=60000 },

  Cages = { [1] = { coords=vector3(...), heading=... }, ... },

  FeatureList = { {name='15% More Damage', price=1500, type='damage', multiple=15}, ... },

  PetList = { { name="Rex", model="a_c_k9", ... }, ... },

  PartConfigByModel = { ["a_c_k9"] = { vest={...}, ... }, ... },

  Currency = "$",
  ItemShopCoords = vector4(561.2651, 2745.0737, 42.8771, 96.7979),

  Categories = { {id="catfood", label="Cat Food", order=1}, ... },

  Items = { { id="dogrevive", name="Revive", category="health", ... }, ... }
}
```

***

### Commands & Interaction

#### `OpenPetCommand`

* **Type:** `string`
* **Default:** `"mypet"`
* **Description:** The command used by players to open their personal pet menu.

#### `Interaction.Target`

* **Type:** `string` (`qb-target` / `ox_target`)
* **Description:** Defines the target system used for shop and interaction zones.

***

### Shop & Job Restrictions

#### `Shops.Coords`

* **Type:** `vector3`
* **Description:** The location of the pet shop.

#### `Job`

* **Type:** `string[]`
* **Description:** Which jobs are allowed to use the K9 system.
* **Example:** `{ 'police', 'sheriff' }`

***

### Contraband Search

#### `K9Search`

* **Type:** `string[]`
* **Description:** List of items that the K9 can detect during a search.

***

### Training Area

```lua
Training = {
  requiredLevel = { {name="Side Walk", level=10}, ... },

  MarkerType = 2,
  MarkerScale = vec3(0.6, 0.6, 0.6),
  MarkerColor = { r=0, g=180, b=255, a=180 },
  ReachRadius = 1.2,

  MarkerCoords = vector3(...),
  MarkerHeading = 343.3976,

  Checkpoints = {
    {pos=vec3(...), msg=Lang:t("general.checkpoint_msg_1")},
    ...
  },

  DummyPedModel = "a_m_m_tramp_01",
  DummyPeds = { {pos=vec3(...), heading=70.5}, ... },

  TargetFindRadius = 6.0,
  KOTimeoutMs = 5000,

  TrashModels = { joaat("prop_bin_07c") },
  TrashRadius = 3.0
}
```

* **requiredLevel:** Defines which skills/actions require a minimum training level.
* **MarkerType / Scale / Color:** Visual configuration for training checkpoints.
* **ReachRadius:** The distance at which a checkpoint is considered reached.
* **MarkerCoords / Heading:** Starting location of the training route.
* **Checkpoints:** Training path points and displayed messages.
* **DummyPedModel / DummyPeds:** Peds placed in the training zone (used for target practice).
* **TargetFindRadius:** Detection radius for training scenarios.
* **KOTimeoutMs:** Duration of knockout/stun in milliseconds.
* **TrashModels / TrashRadius:** Defines searchable objects (e.g., trash bins).

***

### Items (Usage Config)

```lua
Item = {
  reviveItems = { {name="dogrevive", event="useReviveItem", value=100, prop=nil}, ... },
  foodItems   = { {name="dogfood", event="useFoodItem", value=20, prop="prop_cs_bowl_01b"}, ... },
  waterItems  = { {name="dogwater", event="useWaterItem", value=20, prop="prop_cs_paper_cup"}, ... },
  energyItems = { {name="dogenergy", event="useEnergyItem", value=20, prop="prop_turkey_leg_01"}, ... },
  leashItems  = { {name="dogleash", event="useLeashItem", prop=nil}, ... },
  connectItems= { {name="dogconnect", event="useConnectItem", prop=nil} },
  tennisItems = { {name="dogtennis", event="useTennisBall", prop="prop_tennis_ball"} }
}
```

* **name:** The item’s internal ID in your framework.
* **event:** Triggered when the item is used.
* **value:** Amount restored/affected (health, hunger, thirst, energy).
* **prop:** Object shown when the item is used.

***

### Life Cycle & Difficulty

#### `DieMode`

* **Type:** `boolean`
* **Description:** If `true`, once a pet’s health reaches 0, it can no longer be used and must be replaced.

#### `AgeControlTime`

* **Type:** `number` (ms)
* **Default:** `600000` (10 minutes)
* **Description:** Interval at which pet age is checked/updated.

#### `PetDecay`

* **Type:** `table`
* **Description:** Defines stat decrease over time.
* **Fields:**
  * `health`: Health loss per hour.
  * `notEating`: Extra health loss if not fed/watered.
  * `hunger`, `thirst`, `energy`: Hourly decrease values.
  * `updateInterval`: How often stats update (ms).

***

### Cages (Shop Display)

#### `Cages`

* **Type:** `table`
* **Description:** Coordinates and headings for pet cages in the shop.
* **Usage:** Pets for sale are placed at these coordinates.

***

### Features (Buffs)

#### `FeatureList`

* **Type:** `table`
* **Description:** Purchaseable pet upgrades.
* **Fields:**
  * `name`: Display name.
  * `price`: Cost.
  * `type`: Identifier key used internally.
  * `multiple`: Effect percentage or multiplier.

***

### Pet Catalog

#### `PetList`

Each pet entry includes:

* `name`, `breed`, `price`, `image`, `description`, `status`
* `model`: Ped model (`_c_k9`, `a_c_chop...`)
* `coords`, `heading`: Display position in the shop
* Growth values:
  * `currentHeight`, `currentWeight`
  * `maxHeight`, `maxWeight`
  * `heightDivision`: Adjust if the pet’s feet do not align correctly with the ground.

***

### Model-Based Parts

#### `PartConfigByModel`

* **Type:** `table`
* **Description:** Defines which wearable parts/accessories exist per model.
* **Fields:**
  * `comp`: Component index
  * `max`: Maximum available variations
  * `allowOff`: Whether the part can be removed
  * `label`: Display name in the UI

***

### Shop & Items

#### `Currency`

* **Type:** `string`
* **Description:** The currency symbol displayed in the shop (e.g., `$`, `€`, `₺`).

#### `ItemShopCoords`

* **Type:** `vector4`
* **Description:** Coordinates where the shop UI can be accessed.

#### `Categories`

* **Type:** `table`
* **Description:** Shop item categories and their display order.

#### `Items`

* **Type:** `table`
* **Description:** All purchasable items in the shop.
* **Fields:**
  * `id`: Unique shop identifier
  * `name`: Item name shown in UI
  * `category`: Category ID from `Categories`
  * `price`: Price in `Currency`
  * `image`: Path to item image
  * `desc`: Short description
  * `itemName`: Actual framework item ID
  * `stack`: How many fit in one inventory slot
  * `maxPerCart`: Max allowed per purchase


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.0resmon.org/0resmon/frkn-resources/frkn-k9-system/config.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
