Zdravstvuyte, tovarish. Ya ochen kharasho!
Pochemu ty privel menya syuda?
Khoroshiy vopros! There was a discussion in Discord chat over essential DLCs for playing with Folk ARPS. Given that we're in a transitional period with new DLCs being rolled out, and players without the DLC join sessions too, I thought it would be good idea to document scripted solutions to handle non-DLC players in different circumstances. This will become even more important with Tanks DLC round the corner.
Aha! A fight against capitalist forces!
Er... you could say that is a potential side effect... but the motivation here is to make the session more enjoyable for those who may not be in a position to (or not want to) spend more money on Arma DLC for various reasons. This is especially relevant to newer guests. I'm usually not fond of money being a barrier-to-entry. something something capitalism...
Okay, so what are the tools of the revolution?
There are a bunch of script commands that are handy for circumventing vehicle locks, or preventing DLC gear from being given to non-DLC owners.
- getDLCs- checks whether player has DLCs. All DLC appIDs can be found in RPT file, or at the bottom of the link wiki page.
- getObjectDLC - Returns the AppID of an object, not a string. Can be used in conjunction with getDLCs.
- addAction - Adds an action menu action. Can be useful for providing a workaround to DLC-locked crew slots of vehicles.
- connectTerminalToUAV - useful to allow non-DLC owners to control DLC UAVs.
- List of various class names
WARNING: These scripts run once per player, so take care of things with "global effect".
Inspire us to action, Dear Leader Comrade Host!

Here are a few examples to get you started:
1. Say you want to use those fabulous Basic Helmets from Laws of War. You enter the class name into the assign gear script, so all playable units get it. Then, create a file initPlayerLocal.sqf. Here, you can simply say:
Code: Select all
if ((571710 in getDLCs 2) && {headgear player isEqualTo "H_PASGT_basic_olive_F"}) then {player addHeadgear "H_HelmetB_camo";};
The addition of two curly braces {...} around the second condition is an optimisation - if the first condition is false, the second isn't checked. Therefore, place the condition you expect to be false most frequently first. Here, I know most of the units have the helmet, so it's more likely that a player doesn't have the DLC, than it is that a player doesn't have the helmet equipped. While we're on the subject of optimisation, isEqualTo is faster for string comparison than ==. Finally, I can't use getObjectDLC with the helmet class name, because it's a string not an object.
Note that you don't always need to check for this stuff - if you need a particular Marksmen DLC or Apex DLC weapon in a mission, then that's completely fine. This is more for stuff that is more aesthetic and can be easily replaced without much loss of flavour or any loss in functionality.
2. Now, let's take a look at vehicles. DLC vehicles allow non-DLC owning passengers to get in, but not crew. And by crew I mean driver/pilot/gunner/commander. We want a custom action menu entry that lets a non-DLC player drive/command/be a gunner/loadmaster in a vehicle (driver includes a pilot role, of course). For example, this code can be pasted in the unit's init box, found in the vehicle's editor attributes window.
Code: Select all
this addAction ["Get in DLC Plane", {(_this select 1) moveInDriver (_this select 0)},nil, 6, true, true, "", "(driver _target != _this) && {isNull driver _target} && {601670 in (getDLCs 2)}",10];
Now, it's possible to generalise this a bit with getObjectDLC. For example:
Code: Select all
this addAction ["Drive DLC vehicle", {(_this select 1) moveInDriver (_this select 0)},nil, 6, true, true, "", "(driver _target != _this) && {isNull driver _target} && {(getObjectDLC _target) in (getDLCs 2)}",10];
Note: You may have noticed that this doesn't cover other crew positions, and they're probably best of with their own action menu entries. Also note that this won't prevent "nag screen" adverts from appearing.
Well, I hope this helps.
That's cool and all, but what about UAVs?
Meh I'm too tired to write an example.

Experiment! For science!

Kewl. btw I herd u liek mudkips?
