Fandom

武装突袭 Wiki

OFPEC tags

简体 | 繁體

4,827个页面创建
于此维基上
添加新页面
评论0 分享

您使用了广告屏蔽软件!


Wikia通过广告运营为用户提供免费的服务。我们对用户通过嵌入广告屏蔽软件访问网站进行了使用调整。

如果您使用了广告屏蔽软件,将无法使用我们的服务。请您移除广告屏蔽软件,以确保页面正常加载。

OFPEC Tags were originally introduced by OFPEC in 2002 as a way of avoiding 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. If an addon does not have a tag it could cause a conflict with another addon: this will cause your mission (or even your whole computer) to crash. It's good practice for mission makers to use tags for global variables, but at present it is not compulsory. Although tags may still be refered to as "OFPEC tags", their use is equally valid and encouraged in all BI game engines!

OFPEC Tags are used in the following:

  • Global variables
  • Global function names
  • New classes (in config.cpp files)
  • P3D names
  • Addon PBO names

A 'tag' is simply a three to five letter identifier that is individual to each designer. OFPEC have created a list of all these tags, so that people can see who 'owns' particular tags and we don't have multiple designers using the same tag.

View the current OFPEC tag list and register your own tag here. You must be a member of OFPEC to submit a tag (this takes about 30 seconds, go here to register).

A locked backup of the tag list is also kept on this wiki.

Tag Rules编辑

OFPEC Tags must:

  • Be 3 to 5 letters long.
  • Contain only alphanumeric upper case characters. The first letter must be alphabetical.
  • Not be the same as pre-existing tags.

Four and five letter tags must be followed by an underscore, three letter tags may be followed by an underscore, ie SNY_MyVariable, SNYMyFunction or OFPEC_MyAddon.pbo. If don't use an underscore after a three letter tag, you are not allowed to use any underscore in the following identifier, ie SNYMyVariable or SNY_My_Variable are allowed, but not SNYMy_Variable.

Examples (by SelectThis)编辑

Example #1

class STTRanger: SoldierWB
{
    displayName="STT Ranger";
    model="\STTRangers\STTRanger";
}

this would use STTRangers.PBO and STTRanger.P3D files

now another example for a more complicated cpp.

Example #2

class CfgAmmo
{
    class Default {};
    class BulletSingle : Default {};
    class BulletBurst: BulletSingle {};
    class KozliceShell : BulletBurst {};
    class STTRemShell: KozliceShell
    {
        hit=6;indirectHit=6;indirectHitRange=0.2;
    };
};
class CfgWeapons
{
    class Default {};
    class MGun: Default {};
    class Riffle: MGun {};
    class KozliceShell: Riffle {};
    class STTRemShell:KozliceShell
    {
        picture="\STTDelta\STTm_kozlice2.paa";
        ###
        ammo = STTRemShell;
        ###
        sound[]={\STTDelta\STTshotgun.wav,db0,1};
        reloadMagazineSound[]={\STTDelta\STTshotgunreload.wav,db-80,1};
    };
    class Kozlice {};
    class STTRemington: Kozlice
    {
        displayName = "STTRemington";
        model="\STTDelta\STTRemington";
        picture="\STTDelta\STTw_kozlice.paa";
        muzzles[] = {STTRemingtonShellMuzzle};
        class STTRemingtonShellMuzzle : STTRemShell
        {
            magazines[] = {STTRemShell};
        }
    };
};
class CfgNonAIVehicles
{
    class ProxyWeapon {};
    class ProxySTTRemington: ProxyWeapon {};
};

This is stored in STTDelta.PBO and uses the STTRemington.P3D

I've cut out the lines that don't need a tag to make it easier to read.

As you can see I have used the STT tag all the way through the class names. I even use the Tag for the paa/pac and wav files that I have inside the addon folder (this just makes it easier to see what files I have altered- not necessary to avoid conflicts)

SelectThis

更多维基

随机维基