---
name: "Scripting Tags"
type: topic
aliases: ["OFPEC tags"]
source: https://community.bistudio.com/wiki/Scripting_Tags
revid: 369661
updated: 2024-10-02T11:00:41Z
---

# Scripting Tags

A Tag, also referred as an OFPEC tag, is a usually two to eight characters identifier that is individual to each designer, and allows for proper distinction between different authors' content.

> [!NOTE]
> Before 2022 and Arma Reforger era, a tag was three to five characters long.

If an addon does not have a tag it could cause a conflict with another addon: this can cause your mission, game (or even your whole computer depending on the game) to crash.

Tags are used in the following **mod/addon** contents:

- [Global variables](../topics/Identifier.md#recommendations)
- [Function names](../topics/Functions_Library.md#tag)
- New classes (in config.cpp files)
- P3D names
- Addon PBO names - this is less true in Arma 3 since mod management is made through Steam.\
  **Note**: for Real Virtuality games (OFP → Arma 3) pbo names tags should be lower case for Linux server compatibility.

> [!NOTE]
> It is [good practice](../topics/Code_Best_Practices.md#variable-format) for mission framework makers to use tags for global variables as well.

### Rules

| Valid | Invalid |
|---|---|
| - **ARM4**_Variable<br>- **ABC**_Variable<br>- **A2345678**_Variable | - 1ST_Variable<br>- A_Variable<br>- A234567890_Variable<br>- AbC_Variable<br>- ABCVariable |

Tags must:

- be composed of letters and eventually numbers
- be 2 to 8 characters long
- be uppercase
- start with a letter
- followed by an **underscore** `_`

> [!NOTE]
> Following the regex `^[A-Z][A-Z0-9]{1,7}_`.

### History

Tags were originally introduced by OFPEC in 2002 as a way to avoid conflicts between different addons.
The system was so effective that it was officially adopted by BI as a requirement for their Addons at Ease initiative.\
Today, every respectable addon maker has their own individual tag.

OFPEC have created a list of all these tags so that people can see who registered which tag in order to avoid a tag usage conflict.

> [!NOTE]
> - See the [OFPEC Tags page](http://www.ofpec.com/tags/) - [an account](http://www.ofpec.com/forum/?action=register) is required in order to register a tag.
> - A BIKI backup exists at [OFPEC Tags List](../topics/OFPEC_Tags_List.md).

### Examples

#### Scripting

```
// considering MYTAG is the current tag
player setVariable ["MYTAG_hasDocuments", false];

waitUntil { sleep 1; player getVariable ["MYTAG_hasDocuments", false] };
MYTAG_DocumentsGrabbed = true;
publicVariable "MYTAG_DocumentsGrabbed";
```

#### Unit Config

```cpp
class MYTAG_Ranger : B_Soldier_F
{
    displayName = "MYTAG Ranger";
    model="\mytag_rangers\MYTAG_Ranger";
}
```

this would use `mytag_rangers.pbo` and `MYTAG_Ranger.p3d` files

#### Weapon Config

```cpp
class CfgAmmo
{
    class Default {};
    class BulletSingle : Default {};
    class BulletBurst : BulletSingle {};
    class KozliceShell : BulletBurst {};
    class MYTAG_RemShell : KozliceShell
    {
        hit = 6;
        indirectHit = 6;
        indirectHitRange = 0.2;
    };
};

class CfgWeapons
{
    class Default {};
    class MGun : Default {};
    class Riffle : MGun {};
    class KozliceShell : Riffle {};
    class MYTAG_RemShell : KozliceShell
    {
        picture = "\mytag_delta\MYTAG_m_kozlice2.paa";
        // ...
        ammo = "MYTAG_RemShell";
        // ...
        sound[] = { "\mytag_delta\MYTAG_shotgun.wav", db0, 1 };
        reloadMagazineSound[] = { "\mytag_delta\MYTAG_shotgunreload.wav", db-80, 1 };
    };

    class Kozlice {};
    class MYTAG_Remington : Kozlice
    {
        displayName = "MYTAG_Remington";
        model = "\mytag_delta\MYTAG_Remington";
        picture = "\mytag_delta\MYTAG_w_kozlice.paa";
        muzzles[] = { 'MYTAG_RemingtonShellMuzzle' };
        class MYTAG_RemingtonShellMuzzle : MYTAG_RemShell
        {
            magazines[] = { "MYTAG_RemShell" };
        }
    };
};

class CfgNonAIVehicles
{
    class ProxyWeapon {};
    class ProxyMYTAG_Remington : ProxyWeapon {};
};
```

This would be stored in `mytag_delta.pbo` and use the `MYTAG_Remington.p3d` file.

<sub>Source: [BI Community Wiki — Scripting Tags](https://community.bistudio.com/wiki/Scripting_Tags) (revision 369661).</sub>
