Home   Help Search Login Register  

Author Topic: Detect ECP  (Read 2845 times)

0 Members and 1 Guest are viewing this topic.

Offline Blanco

  • Former Staff
  • ****
Detect ECP
« on: 27 Oct 2004, 01:37:03 »
In my mission there are lots of effectscripts, but a low-end user can disable them all at the start of the mission.

I want all effects disabled when the user 's running ecp mod.

How can I do that?

Search or search or search before you ask.

Offline Nemesis6

  • Members
  • *
Re:Detect ECP
« Reply #1 on: 27 Oct 2004, 09:17:28 »
ECP must have some global variables. Try checking if some of them are true, like this -
? ECP_effectvariable:Dowhatever.

Or just do it in a trigger, where you only have to type the global variable name in the condition box, and do whatever you wish with the activation box.a

I don't know the ECP variables, but you get the idea.
« Last Edit: 27 Oct 2004, 09:19:03 by Nemesis6 »
I am actually flying into a star... this is incredible!

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Detect ECP
« Reply #2 on: 27 Oct 2004, 11:35:44 »
I used a little script called from init.sqs.    If you dig through the ECP folder you will quickly find the master script, which controls all the main ECP global variables.     Your script just sets them to false.

The player can turn most of them back on again, so you might want to loop the script, maybe with hints so the player doesn't get confused.


Code: [Select]
; this script controls ECP (Enhanced configuration project) variables

; turn off explosions at the start
; this reduces lag and avoids mysterious bangs in the distance
; or even more mysterious bangs nearby
; depending on where you start


ECP_expeff_enable = false


; turn off other effects
; these have an effect on the mission so don't turn them back on again
; although it shouldn't cause mission-terminating problems if you do

ECP_h_smk_enable = false

ECP_h_rfail_enable = false

ECP_random_weather_enable = false

ECP_halo_enable = false

ECP_AI_join_enable = false



; these are just turned off to help with lag
; turn them back on again if you like

ECP_jam_enable = false

ECP_lh_enable = false

ECP_pln_smk_enable = false

ECP_alt_enable = false

ECP_keg_snow_enable = false


~1




; turn down some effects to help prevent lag
; by all means turn these up if you kit can take it

ECP_flies_max = 6

ECP_lod_dis = 150



~30


; turn explosions back on again
ECP_expeff_enable = true



exit




Plenty of reviewed ArmA missions for you to play

Offline Killswitch

  • Members
  • *
  • Peace, cheese and ArmA
Re:Detect ECP
« Reply #3 on: 27 Oct 2004, 12:23:56 »
In my mission there are lots of effectscripts, but a low-end user can disable them all at the start of the mission.

I want all effects disabled when the user 's running ecp mod.

How can I do that?
Check for the existence of and/or value of ECP_initialised and activate/deactivte your mission-specific effects script based on that. An example:
Code: [Select]
; My nifty effects script
? ECP_initialised: exit
...
...
; effects follow, will only be run if player isn't running ECP
...
...
« Last Edit: 27 Oct 2004, 16:06:00 by Killswitch »

Komuna

  • Guest
Re:Detect ECP
« Reply #4 on: 10 Nov 2004, 22:57:39 »
VERY IMPORTANT!

Don't use those variables! The new ECP architecture has only a few global variables - about 6 - therefore, it's quite probable that your scripts/missions won't be ECPv1.075 compliant.

I would recomend you to use the variable ECP_path, which is the variable that ECP uses to verify is the value database is launched, upon declaring this variable on EH init.

Note: With this variable, you can detect ECP on mission init.
Note2: In order to verify this variable, use the condition "(format["%1",ECP_path]) == _null", where "_null" is that strange value "scalar bool array 0xfddddd-or-something-like-that".

Offline Killswitch

  • Members
  • *
  • Peace, cheese and ArmA
Re:Detect ECP
« Reply #5 on: 11 Nov 2004, 00:48:20 »
Dang. I knew that would come back and bite me in the posterior.  ;D

Thanks for informing us of the new system!

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Detect ECP
« Reply #6 on: 11 Nov 2004, 11:19:56 »
I do not have ECP.  How can I ensure that my missions does not get screwed up when a player with ECP plays it?  

I liked macguba's solution of turning off various variables.  I don't know what they do but some I can guess.  
Quote
ECP_random_weather_enable  
for example.  In my current mission I have complete control of overcast, rain and fog and I certainly don't want any other code interferring with mine.

Until I know more, what I need is an ECP_OFF switch.  Is there one?  Is this heresy?
« Last Edit: 11 Nov 2004, 11:20:13 by THobson »

Offline MachoMan

  • Honoured
  • Former Staff
  • ****
  • KISS, Keep it Simple Stupid
Re:Detect ECP
« Reply #7 on: 11 Nov 2004, 23:48:44 »
Until I know more, what I need is an ECP_OFF switch.  Is there one?  Is this heresy?

Indeed it is!
It can't be done clean but there are some very dirty ways

You could for example change the ECP_path variable, that will make ECP go down!!!  ;D
I haven't tried it, but i fear u might kill ofp too  ;D
You'll at least see massive errors!

-- EDIT:

DOPE komuna already said that, I should read before posting :(
« Last Edit: 11 Nov 2004, 23:50:14 by MachoMan »
Get those missions out there you morons!

Offline Zayfod

  • ECP Team
  • *
  • Llama, softest natural fibre in the world.
Re:Detect ECP
« Reply #8 on: 12 Nov 2004, 00:33:52 »
I do not have ECP.  How can I ensure that my missions does not get screwed up when a player with ECP plays it?  

I liked macguba's solution of turning off various variables.  I don't know what they do but some I can guess.   for example.  In my current mission I have complete control of overcast, rain and fog and I certainly don't want any other code interferring with mine.

Until I know more, what I need is an ECP_OFF switch.  Is there one?  Is this heresy?

Once ECP 1.075 is published you will see all those settings that you may turn off for your map if you dont want them in game. Simply choose the ones that you want switched off and make it so (in a script or trigger) when your map starts.  ;) I can't reveal what they are atm but the ECP_settings.sqs is very intuitive, I'm sure you will have no problems.

Zay

"I have come here to kick ass and chew bubble gum......an I'm all outta bubble gum!"

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Detect ECP
« Reply #9 on: 12 Nov 2004, 07:57:13 »
Fine.  Thanks.  

It would be helpful if the variables are published in a way that will not require everyone to download it, and then understand it in order to turn it off.

Also it seems that the ECP is being developed in a way that is not backwards compatible (macguba's solution for an earlier version of ECB would apparently be non-compliant with the up-coming version).  So even if I make my current mission compliant with this coming version of ECP there is no guarantee that it will be compliant with later versions).

I don't want to seem rude, but this feels like vandalism.
« Last Edit: 12 Nov 2004, 07:58:13 by THobson »

RED

  • Guest
Re:Detect ECP
« Reply #10 on: 12 Nov 2004, 08:27:35 »
Then just tell people not to use the ECP :P If you really don't want your mission to be effected by the ECP tell people not to use it, it will be their own fault if the mission gets screwed up because of it.

Regarding the new format of variables, it is not vandalism, it is the most constructive change to the ECP for a long time - It will have heaps of positive effects.

RED

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Detect ECP
« Reply #11 on: 12 Nov 2004, 10:42:36 »
I am sure it is wonderful, and I am sure I will really appreciate it when I get to it.  

I was reacting to the lack of backward compatibility.  If a mission builder deals with ECP in their mission (as macguba has done in his) I do feel they have a right to expect that future versions of ECP will not screw them up.

I think if I were him I would be quite irritated by the comment above that what he has done could make his mission non-compliant with the next version of ECP.
« Last Edit: 12 Nov 2004, 10:43:50 by THobson »

RED

  • Guest
Re:Detect ECP
« Reply #12 on: 12 Nov 2004, 11:48:27 »
I understand what you are saying, but as the ECP is still in the beta stage, things will always be changing and thus backwards compatiblity will not always be possible. Im sure people wouldn't mind changing a few lines of script in their missions inorder for them to work better would they?

RED

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Detect ECP
« Reply #13 on: 12 Nov 2004, 12:40:25 »
Actually I am bloody furious.    ECP, for all its great strengths, is capable of totally screwing up my mission.   (Weather routines and explosions in particular.)   I have spent a great deal of time digging into ECP to see how it works, fixing the variables, testing and so on, and now you tell me I have to do it all again!

THIS IS A DISGRACE.     >:(

If you want to create a new, better ECP using a different architecture that's great, I'm all in favour.     But it is YOUR job to include in that architecture the appropriate routines to keep old missions working.     All I've done is set variables LIKE YOU TOLD ME TO DO so fixing the architecture shouldn't be too difficult.

So yes, I mind a great deal about changing a few lines of script:-

a) on principle

b) its not just changing a few lines ... I have to understand the new ECP (which you already understand), revise my understanding of the old ECP (which you can probably remember), figure out how they relate to each other (which you already know) and then invent a new fix, test it, then release a whole new version of my mission.      It's a big mission and obviously for a release version everthing has to be tested (in case the change have introduced a bug) which takes a long time.    Its hard to predict but I would guess I'm looking at 25-50 hours of work.


Backwards compatability is an axiom of good software design.


ECP is great, I don't want to tell people not to use it.   I like using it myself on this mission.   It has lots of wonderful effects which really improve the atmosphere, which is an important element of the mission.    That is why I went to so much trouble to make it work with ECP.    You guys have done such a fantastic job in creating it it would be a dreadful, dreadful shame to piss it away like this.


Plenty of reviewed ArmA missions for you to play

RED

  • Guest
Re:Detect ECP
« Reply #14 on: 12 Nov 2004, 13:44:47 »
Ok, I agree with you on all your points apart from 'b', it would only take a matter of minutes to change. For example if you wanted to turn the weather off you would change:

ECP_random_weather_enable =false

Code: [Select]
; ECP_random_weather_enable:
   ; true / false, default is true
   ; defined by server in MP
ECP_public set [19, false]

No testing should be requires as it will operate exactly the same as the old version, only the way the scripts are executed are changed.

Having said that, I have just started work on a script that will solve your problem. It will just check for the old variables then 'translate' them to the new format. Not perfect but it should work.

RED