Skip to content

API: For developers

Dedmen Miller edited this page Nov 7, 2016 · 2 revisions

###Factions It is possible to set default radio classes for the soldiers of some faction. Example of config entries:

class CfgFactionClasses
{
    class faction_class_name
    {
        displayName = "My Faction";
        backpack_tf_faction_radio = "some_backpack_radio_class";
        personal_tf_faction_radio = "some_personal_radio_class";
        rifleman_tf_faction_radio = "some_rifleman_radio_class";
        airborne_tf_faction_radio = "some_airborne_radio_class";
    };
} ;

Vehicles

Warning: do not set any config properties in base classes which are defined in not your addon - it may lead to conflicts with other addons.

To set radio type in vehicle use following config entry (by default backpack side radio used for land vehicles and airborne side air vehicles):

class MyVehicleWithRadio: LandVehicle {
    tf_RadioType = "some_backpack_radio_class";
};

To set if vehicle have inbuilt radio use:

class MyVehicleWithRadio: LandVehicle {
    tf_hasLRradio = 1;  // 1 = true, 0 = false
};

You may set isolation level of vehicle. If values more than '0.5' then it is impossible hear outside speech inside the vehicle (in future this value will be used as sound modifier):

class MyTankVehicle: LandVehicle {
    tf_isolatedAmount = 0.8;
};

Also, it is possible to overwrite some of the properties for vehicle-mounted radios (custom radio guide is in the works).

class MyVehicle: LandVehicle {
    tf_encryptionCode = "tf_some_side_radio_code"; // Variable name with default encryption code for radio
    tf_range = 50000; // Range of transmission for vehicle-mounted radio
    tf_dialog = "my_custom_radio_dialog"; // Name of the dialog for vehicle-mounted radio
    tf_dialogUpdate = "call TFAR_fnc_updateLRDialogToChannel;"; // The update function for dialog
    tf_subtype = "digital_lr"; // Radio subtype – affects DSP effects. Valid values are – digital_lr, digital, airborne
};