> For the complete documentation index, see [llms.txt](https://docs.bestway.com.ua/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bestway.com.ua/foundational-knowledge/basic-knowledge-about-configuration-files/mod-instruction.md).

# Mod instruction

The **mod instruction** is designed to control the inclusion or exclusion of blocks of descriptions and settings based on the global mode of operation. This feature is especially useful in cases where different game modes require different configurations.

## **Global modes in the Men of War II game**

<table><thead><tr><th width="211">Mode</th><th>Description</th></tr></thead><tbody><tr><td><strong>Multiplayer (mp)</strong></td><td>This mode activates configurations that are specifically tailored for multiplayer gameplay.</td></tr><tr><td><strong>Everything else</strong></td><td>This includes single-player missions and the game editor mode</td></tr></tbody></table>

## Template for a mod instruction

> **Template for the mod instruction**
>
> ```
> (mod mode_name {code})
> ```
>
> mode\_name specifies the mode for which the enclosed code block `{code}` should be active

<details>

<summary>Example</summary>

```
(mod mp {code})
```

If the game sets the `mp` modifier (indicating that the player has launched multiplayer mode), then the `{code}` block is inserted into the SDL.

</details>

For instance, if the mode is set to mp, the code block will only be executed in multiplayer mode.

The **mod instruction** can also be used in a prohibitive format, which means you can specify that certain code blocks should only be excluded in certain modes rather than included. This is useful for disabling specific features or settings in a particular mode without having to explicitly include them in all other modes.

<details>

<summary>Example</summary>

```
(mod not_mp {code})
```

</details>

This structured approach using the mod instruction allows developers to neatly organize their code and ensure that the correct settings and features are active based on the game mode, enhancing both maintainability and gameplay experience.

{% hint style="info" %}
If you have difficulties understanding the terminology and the essence of the instruction description, please refer to the article [**Basic knowledge about configuration files**](https://bestway-1.gitbook.io/documentation/foundational-knowledge/basic-knowledge-about-configuration-files).
{% endhint %}

Additionally, you can explore other types of instructions.

<table data-view="cards"><thead><tr><th></th><th data-type="content-ref"></th><th data-hidden data-card-cover data-type="files"></th></tr></thead><tbody><tr><td>Include instruction</td><td><a href="/foundational-knowledge/basic-knowledge-about-configuration-files/include-instruction.md">Include instruction</a></td><td><a href="https://2358506489-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2UV9d5d9aTZPISbocWyo%2Fuploads%2FXqe0ZKqSICsAK0XgCyMC%2Fsplash_editor_3.jpg?alt=media&amp;token=ecb5bb0d-d794-4925-a780-f7d98f315d42">default_cover.jpg</a></td></tr><tr><td>Define instruction</td><td><a href="/foundational-knowledge/basic-knowledge-about-configuration-files/define-instruction.md">Define instruction</a></td><td><a href="https://2358506489-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2UV9d5d9aTZPISbocWyo%2Fuploads%2FXqe0ZKqSICsAK0XgCyMC%2Fsplash_editor_3.jpg?alt=media&amp;token=ecb5bb0d-d794-4925-a780-f7d98f315d42">default_cover.jpg</a></td></tr></tbody></table>
