Howto Model Config – ArmA: Armed Assault

From Bohemia Interactive Community
Revision as of 01:33, 9 March 2007 by Raedor (talk | contribs) (first step. still WIP)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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 (as used on character models).

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"; // läd die Bones der class Vehicle
        skeletonBones[]=
        {

            "velka vrtule","", // Hauptrotor
            "mala vrtule","", // Heckrotor
            ...
            ...

        };

    };

    class AH64_Skeleton : Helicopter
    {

        skeletonInherit="Helicopter"; // läd die Bones der class Helicopter
        skeletonBones[]=
        {

            "mainRotor","", // Hauptrotor
            "tailRotor","", //Hechrotor

            "FGear","", // forderes Fahrwerk
            "RGear","", // hinteres Fahrwerk

            "map_tail","", // Heckstabilisator

            "sensors_turret","", //SensorTurm
            "sensors","sensors_turret", // SensorKopf mit SensorTurm

        };

    };

};

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";

            };

            ...

            ...

        };

    };

};