Home   Help Search Login Register  

Author Topic: ECP in Mission Design  (Read 604 times)

0 Members and 1 Guest are viewing this topic.

Offline RangerX3X

  • Members
  • *
  • Ranger, out.
    • RangerX3X
ECP in Mission Design
« on: 05 Aug 2005, 05:04:06 »
I am completely new to this ECP thing:

1. Is there a tut on how everything is suppose to function?
2. If I use ECP in creating a mission, is it a true add-on in that other people who play the mission have to have ECP as well?
Ranger, out.

Offline .pablo.

  • Former Staff
  • ****
  • When in doubt, empty the magazine.
Re:ECP in Mission Design
« Reply #1 on: 05 Aug 2005, 06:31:05 »
1. look for ECP.pdf in your "OFP\ECP\Readme" folder

2. i asked a similar question in the ECP thread; here's what you need to do to make ECP a required addon:

Quote
Machoman:
You can edit the mission.sqm manually. All you need to do is add ECP_Effects to the required addons array.

So it would look something like this:
Code:

addOns[]=
  {
      "ECP_Effects"
  };
« Last Edit: 05 Aug 2005, 06:31:30 by .pablo. »

Dane

  • Guest
Re:ECP in Mission Design
« Reply #2 on: 05 Aug 2005, 08:18:53 »
No, people can play your mission even if they don't have ECP, but i think there's a variable to detect ECP to avoid people getting error messages if you put some ECP specific variables in your mission, i think so but i'm not sure, look in readme or settings.

Offline Killswitch

  • Members
  • *
  • Peace, cheese and ArmA
Re:ECP in Mission Design
« Reply #3 on: 05 Aug 2005, 10:32:54 »
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 accordingly

How do we do that then?

Example 1: Detecting any version of ECP
This is done by checking if the global variable ECP_path exists.
Code: [Select]
_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.
Code: [Select]
_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.

Offline MachoMan

  • Honoured
  • Former Staff
  • ****
  • KISS, Keep it Simple Stupid
Re:ECP in Mission Design
« Reply #4 on: 05 Aug 2005, 12:28:32 »
Although I provided the solution, I agree with Killswitch. It is best not to make ECP usage mandatory. His solution is best, but if you're lazy, do what I said. ;)
Get those missions out there you morons!