michail-nikolaev / task-force-arma-3-radio

TeamSpeak integration for Arma 3
http://radio.task-force.ru/en/
Other
313 stars 168 forks source link

Stand alone hmmwv by granQ support #358

Closed michail-nikolaev closed 10 years ago

michail-nikolaev commented 10 years ago

http://www.armaholic.com/page.php?id=24518

Also, add way to force radio in vechicle

CorruptedHeart commented 10 years ago

Perhaps something in the config for vehicles along the lines of

class CfgVehicles
{
    class Land
    {
        tf_hasLRradio = 0;
    };
    class Car;
    class specificCar: Car
    {
        tf_hasLRradio = 1;
    };
};

(I'm not entirely sure of the exact hierarchy) A similar system could be used for backpack radios.

michail-nikolaev commented 10 years ago

Currently we have function to check for inheritance (because we need to support mods too). I think we just check hmmwv base class.

Also, some kind of vehicle setVariable["tf_hasRadio", true, true] is enough

CorruptedHeart commented 10 years ago

Wouldn't

if (getNumber(configFile >> "CfgVehicles" >> _this >> "tf_hasLRradio") == 1) exitWith { true };

Be faster than looping through an array of all supported types? Also to have to edit a script file to add every supported vehicle mod seems a bit unnecessary, rather than providing the option for those respective modders to specify that the vehicle has a LR radio.

michail-nikolaev commented 10 years ago

Yep, maybe you right. But it also requires to override correct values in config for vanilla vehicles...

michail-nikolaev commented 10 years ago

Will it possible to override config to get same logic as here - https://github.com/michail-nikolaev/task-force-arma-3-radio/blob/master/arma3/%40task_force_radio/addons/task_force_radio/functions/fn_hasVehicleRadio.sqf

michail-nikolaev commented 10 years ago

also, not every car have radio (civilian have not). And such config entries should be added to task_force_radio_items to allow easy debugging using the debug mission

CorruptedHeart commented 10 years ago

It is possible to add config entries to any config class. So it would be entirely possible to get the same logic. I'll throw together a prototype and send it to you on Skype soon.

CorruptedHeart commented 10 years ago

This should be closed due to https://github.com/michail-nikolaev/task-force-arma-3-radio/pull/361 Although perhaps providing an optional config .pbo for it but could be entirely separate.

michail-nikolaev commented 10 years ago

Hm... From some point it is bad - we can't support any vehicle from separated addon.... Need to think here....

CorruptedHeart commented 10 years ago

Well we have provided the means, it is up to those specific mod developers to choose to support TFAR or not. Even then we have provided means for mission makers to specify if a vehicle has a radio.

michail-nikolaev commented 10 years ago

Yes, but at the same time it will cool to have some way to provide support for mod (for example Arma 3 Samples Mod) without waiting for original author and additional mini-mod with config...

michail-nikolaev commented 10 years ago

Lets wait for a little: http://forums.bistudio.com/showthread.php?169068-ASM-Arma-Samples-Mod&p=2614911&viewfull=1#post2614911

michail-nikolaev commented 10 years ago

But also: https://imagizer.imageshack.us/v2/1051x731q90/571/lmxa.jpg (http://forums.bistudio.com/showthread.php?168333-A3C-Name-Tag-Mod&p=2554330#post2554330)

it will be not easy to ask every mod maker to add additional support :)

michail-nikolaev commented 10 years ago

Got an idea: if no tf_hasLRradio value in vehicle class "specificCar" check for same variable in class "TFAR_specificCar". So, we'll able to add first support for mods which may be overrided by author.

What do think?

CorruptedHeart commented 10 years ago

That wouldn't be able to work, because tf_hasLRradio is set to 0 in the most base class that all other vehicle classes extend from, so tf_hasLRradio is defined for every class. And I'm not sure you can check if a specific class overrides a config entry.

michail-nikolaev commented 10 years ago

Not sure what to do here... Another moment: if some addon maker will set config flag for "Car" to zero value - we'll get conflict.....

CorruptedHeart commented 10 years ago

While no direct support has been added, external mods are now supported. Also mission makers are also supported with vehicle setVariable ["tf_hasLRradio", true, true]

michail-nikolaev commented 10 years ago

Yes, we need to add property without "api" prefix

kavinsky commented 10 years ago

this issue is finally closeable :)

michail-nikolaev commented 10 years ago

@kavinsky not yet, we need to test our API by this mod