> For the complete documentation index, see [llms.txt](https://uyen18827.gitbook.io/veinif/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://uyen18827.gitbook.io/veinif/optional/precondition.md).

# Precondition

Preconditions are conditions that must be met before player can proceed with a choice.

## Interface

Bellow is the interface - the structure that all preconditions conform to.

```typescript
export interface Precondition {
    stat?: Array<Stat>,
    item?: Array<Items>,
    style?: conStyle, //type: show, hidden or hideReason
};
```

## Usage

Precondition is an optional field for [Choice](/veinif/components/choice.md) and Item. It is checked by checkChoiceCondition().

## Behaviour

Precondition perform checks with the player's inventory and stat. If the checks failed, the choice will be disabled.
