Fandom

武装突袭 Wiki

ArmA: Howto Model Config

简体 | 繁體

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

您使用了广告屏蔽软件!


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

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

General 编辑

The model.cfg contains description about the skeleton and the functionality (animations) of a model. The model.cfg is divided in two classes, which are class CfgSkeletons and class CfgModels .

In class CfgSkeletons all animated "bones" of the model are defined (in this example for an AH-64). Bones which have to be animated together, as it should be in turrets with guns, are linked here. The skeleton can have a hierarchy (as here with the AH-64), which means that each bone is affixed on the previous one. If it does not have a hierarchy, all bones are on the same level.

In class CfgModels you can define sections of a model which can be required for certain effects (like rotor blur) or for hiddenselections (as in OFP days with setObjectTexture). Also, you have to define the animations in the CfgModels nowadays.


CfgSkeletons example 编辑

class CfgSkeletons
{

    class Default
    {

        isDiscrete = 1;
        skeletonInherit = "";
        skeletonBones[] = {};

    };

    class Vehicle : Default{};

    class Helicopter : Vehicle
    {

        skeletonInherit="Vehicle"; // loads the bones of class Vehicle
        skeletonBones[]=
        {

            "velka vrtule","", // main rotor
            "mala vrtule","", // tail rotor
            ...
            ...

        };

    };

    class AH64_Skeleton : Helicopter
    {

        skeletonInherit="Helicopter"; // loads the bones of class Helicopter
        skeletonBones[]=
        {

            "mainRotor","", // main rotor
            "tailRotor","", //tail rotor

            "FGear","", // front gear
            "RGear","", // rear gear

            "map_tail","", // tail fin

            "sensors_turret","", // sensor turret
            "sensors","sensors_turret", // sensor head with mit sensor turret

        };

    };

};


CfgSkeletons explanations 编辑

isDiscrete = 0;

Defines if the bones have a hierarchy or not (0 = no hierarchy, for characters).

skeletonInherit = "";

Defines which skeleton class is inherited, for example skeletonInherit = "Helicopter"; loads the bones of class Helicopter.

skeletonBones[] = {...an Arraylist of bones...};

Defines the bones.

Ordinarily, any bones declared in parent(s) would be ignored by a new array declaration. skeletonInherit is a sneaky way of retaining the existing list (if any). Ordinarily, skeletonInherit simply points to the parent of this class (if any).

CfgModels example 编辑

class CfgModels
{

    class Default
    {

        sectionsInherit="";
        sections[] = {};
        skeletonName = "";

    };

    class Vehicle : Default
    {

        sections[] =
        {

            "clan",
            "clan_sign",
            ...
            ...
            "zasleh"

        };

    };

    class Helicopter : Vehicle
    {

        sectionsInherit="Vehicle";
        sections[]=
        {

            "velka vrtule staticka",
            "velka vrtule blur",
            "mala vrtule staticka",
            "mala vrtule blur",
            ...
            ...

        };
        skeletonName="Helicopter";
        class Animations
        {

            class IndicatorAltRadar: Rotation
            {

                source="altRadar";
                sourceAddress="loop";
                selection="alt";
                axis="osa_alt";
                memory=0;
                maxValue=304;
                angle1="rad -360";

            };
            class IndicatorAltRadar2: IndicatorAltRadar
            {

                selection="alt2";
                axis="osa_alt2";

            };

            ...
            ...

        };

    };

    class ah64 : Helicopter
    {

        sectionsInherit = "Helicopter";
        sections[] =
        {

            "mainRotor","mainRotor_staticka","mainRotor_blur","mainRotor_dive",
            "tailRotor","tailRotor_staticka","tailRotor_blur",

            "tail_fin"

        };
        skeletonName = "AH64_Skeleton";
        class Animations : Animations
        {

            class mainRotor
            {

                type = "rotationY";
                source = "rotorH";
                selection = "mainRotor";
                axis = "";
                memory = 1;
                sourceAddress = "loop";
                minValue = 0;
                maxValue = 1;
                angle0 = 0;
                angle1 = "rad +360";

            };
            class mainRotor_dive
            {

                type = "rotationX";
                source = "rotorHdive";
                selection = "mainRotor";
                axis = "predni osa naklonu";
                memory = 1;
                minValue = -1.570800;
                maxValue = 1.570800;
                angle0 = -1.570796;
                angle1 = 1.570796;

            };
            class tailRotor
            {

                type = "rotationX";
                source = "rotorV";
                selection = "tailRotor";
                axis = "";
                memory = 1;
                sourceAddress = "loop";
                minValue = 0;
                maxValue = 1;
                angle0 = 0;
                angle1 = "rad -360";

            };
            class mainTurret
            {

                type = "rotationY";
                source = "mainTurret";
                selection = "otocvez";
                axis = "osaveze";
                animPeriod = 0;
                memory = 1;
                minValue = "rad -360";
                maxValue = "rad +360";
                angle0 = "rad -360";
                angle1 = "rad +360";

            };
            class mainGun
            {

                type = "rotationX";
                source = "mainGun";
                selection = "otochlaven";
                axis = "osahlavne";
                animPeriod = 0;
                memory = 1;
                minValue = "rad -360";
                maxValue = "rad +360";
                angle0 = "rad -360";
                angle1 = "rad +360";

            };
            class sensors_turret : mainTurret
            {

                selection = "sensors_turret";
                axis = "axis_sensors_turret";

            };
            class sensors : mainGun
            {

                selection = "sensors";
                axis = "axis_sensors";

            };

            ...

            ...

        };

    };

};


CfgModels explanations 编辑

sectionsInherit = "";编辑

Defines which sections are inherited, for example sectionsInherit = "Helicopter"; loads all sections of class Helicopter.

sections[] = {};编辑

Defines the sections.

Again, like skeletonInherit, sectionsInherit prevents the erasure of existing sections inherited from parents. Generally (unlike skeletonInherit), sectionsInherit tends to point to a base class. In this example, one and the same thing, but it is quite comment for a range of specific helicopter models to be itemised in a single model.cfg, each progressively inheriting from each other, but the sectionsInherit points to the one and only base class.

Note to the unwary, that sectionsInherit must be declared in *every* class model that introduces added bones to that class. Sounds logical. It is frequently overlooked.

skeletonName = "";编辑

Defines which skeleton (defined by CfgSkeleton) is used by this model. It is common eg. to #include a common skeleton 'library'. Helicopters, tanks. pink elephants. Only the wanted skeleton is massaged into the p3d. Other skeletons are ignored and cause no harm.

class Animations{...};编辑

Defines the animations for the model. It can be inherited from another model via class Animations : Animations{...};

For explanations for the class Animations, see page Model_Config.

更多维基

随机维基