Making a mission so as to require ECP to be present (by adding "ECP_Effects" to the mission.sqm) is the wrong way to go about it.
One has to think of ECP as something that
might be present, not "must be present". Take all the stock BIS missions, for example. They play fine without ECP but get a new life when you have ECP loaded. A well made mission lets the player choose wether or not to use ECP.
Now, a mission maker might want to guarantee that some of the neat features of ECP is present in his/her mission. A common example would be rotorwash dust effects for helicopters, or perhaps neat wreckage burn effects on vehicles.
In order to have those effects in the mission even when a player doesn't use ECP, you'd have to use custom third-party effects scripts. However, if a player does use ECP, they are not needed. So what should you do as a mission maker?
The solution: Detect if ECP is present or not and take action accordinglyHow do we do that then?
Example 1: Detecting any version of ECPThis is done by checking if the global variable
ECP_path exists.
_ECP_present=false
?format["%1",ECP_path]!=format["%1",nil]:_ECP_present=true
...
...
...
; Add your own code and use _ECP_present as needed
Example 2: Detecting the latest ECP (1.085 or later)ECP 1.085 being present means
ECP_path exists and that there's an array named
ECP_public too.
_ECP_present=false
?format["%1",ECP_path]!=format["%1",nil]&&format["%1",count ECP_public]!="scalar":_ECP_present=true
...
...
...
; As before...
Summary- BAD: requiring ECP to be present for a mission to work. Sloppy. Amateurish. Bad form.
- GOOD: check if ECP is there and adapt.