# Advanced package configuration

Creating balanced mods often requires more complex settings of the mod package. \
Settings for the package are specified in the .info file.

## **Dependency configuration**

You can configure dependencies on existing packages using the `dependency` block.&#x20;

The mod will use the original game's resources if the "Men of War II, main package" ID is specified in the `dependency` block. Otherwise, Men of War II game resources will not be included in the mod.&#x20;

If a mod is dependent on another mod, a dependency block must be added specifying the ID of the required mod. \
Multiple dependency blocks can be included to determine the sequence of package connections. Should a mod require several other mods to function properly, a sequence of dependency blocks listing the necessary mod IDs in the order of their connection should be created.&#x20;

{% hint style="info" %}
Resources are loaded and modified in the order specified by these blocks in the .info file. The content and functionality of the target files depend on the correct order of these dependency blocks
{% endhint %}

{% hint style="warning" %}
Any discrepancies in the order can result in errors or conflicts during resource loading
{% endhint %}

<details>

<summary><strong>Example of setting the sequence for connecting packages</strong></summary>

```
{id "cc507783-2143-4598-99de-237a5ea5e621"}
{name "Fun games"}
{order 0}
{dependency "02f8e8f9-91d9-45e0-8ee6-dc56adae4763"}; main package
{default_disabled}
{ dependency “Id[A]”}
{ dependency “Id[D]”}
{ dependency “Id[C]”}
{ dependency “Id[B]”}
{author "Created by username, at Mon Apr 17 16:39:49 2024"}
```

*The package "Fun games" uses the `main` package as its base resources and requires the activation of packages A, B, C, and D.* \
*The sequence of `dependency` blocks sets the order in which these packages must be loaded. This ensures that each package functions correctly.*

</details>

## **Resource exclusion**

| Parameter      | Description                                                                                                        |
| -------------- | ------------------------------------------------------------------------------------------------------------------ |
| delete\_global | Specifies a list of resources that should be ignored by the game when activating resources from the global folder. |
| delete\_scene  | Specifies a list of resources that should be ignored by the game when activating resources from the scene folder.  |

## **Enforced resource activation**

<table><thead><tr><th width="252">Parameter</th><th>Description</th></tr></thead><tbody><tr><td>always_activate_scene</td><td>Always activates the 'scene' section of the package if the 'global' section of this package is active. By default, the 'scene' section is activated if a map located in the 'global' section of this package is loaded.</td></tr><tr><td>always_activate_global</td><td>Indicates that this package changes global game settings.<br>If a package with the always_activate_global parameter is enabled in the game, this fact is always noted in the list when creating a host, in saving the game, and similar instances.</td></tr></tbody></table>

## **Package compatibility checks**

| Parameter                     | Description                                                                                                                                                                                                                                             |
| ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| incompatible \<package id>    | Used to specify the IDs of packages that are incompatible with this package. The game will disable any package with the specified ID when this package is activated                                                                                     |
| min\_core\_version \<version> | The minimum game version with which the package is compatible. If this parameter is not specified, the corresponding check is absent                                                                                                                    |
| max\_core\_version \<version> | The maximum game version with which the package is compatible. If this parameter is not specified, the corresponding check is absent                                                                                                                    |
| hash                          | The hash parameter value allows for pre-determining that the package content is the same among different users and on the server when playing together. The hash parameter value is automatically updated when the package is published in the Workshop |
| client\_only                  | The package content is available only on the client, it is not loaded on the server and does not affect gameplay                                                                                                                                        |
| obsolete                      | Allows hiding package resources (entities and textures) in the lists of available resources in the editor                                                                                                                                               |

<details>

<summary><strong>Example .info content for a balanced mod</strong></summary>

```
{id "cc507783-2143-4598-99de-237a5ea5e621"}
{name "Fun games"}
{dependency "02f8e8f9-91d9-45e0-8ee6-dc56adae4763"} ; main package
{dependency "b86c6020-9b25-4659-bcdf-53b12715a0a1"} ; Good mod
{dependency "aa6c6408-9b43-4562-bcdf-53b12715a97d"} ; God mod
{delete_global "/map/single/2" "/video/menu.avi"}
{delete_scene "/entity/service/flag"}
{always_activate_scene}
{always_activate_global}
{author "Created by username, at Mon Apr 17 16:39:49 2024"}
```

*The mod operates on the base of the original game.* \
*The mod is compatible with the game version not lower than 1.302.* \
*Requires the sequential connection of the Good and God mods. Not compatible with the Realism mod.*  \
*The game will ignore resources from the folder "/map/single/2" and the file "/video/menu.avi" in the global section.* \
*The game will ignore the service object "/entity/service/flag" from the scene section upon loading.* \
*Contains a hash for resource identity verification.*

</details>


---

# 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://bestway-1.gitbook.io/documentation/mod-development/advanced-package-configuration.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.
