Jump to content
Sign in to follow this  
Solus

Extended eventhandlers

Recommended Posts

Neither init nor fired EH work here if sight adjustment addon with fixed bridge addon are loaded. Fired EH works for vehicles but not people. Here's the config.cpp of my addon:

class CfgPatches
{
   class q11_wind
   {
       units[] = {};
       weapons[] = {};
       requiredVersion = 1.08;
       requiredAddons[] = {"CAWeapons","CAWeapons3","Extended_EventHandlers"};
   };
};

class Extended_Init_EventHandlers
{    
   class Man
   {
       q11_wind_Init_Man = "_this execVM ""\q11_wind\Scripts\init.sqf"";";
   };
};

class Extended_Fired_EventHandlers
{
   class All
   {
       q11_wind_Fired = "_this execVM ""\q11_wind\Scripts\q11_wind.sqf"";";
   };
};

Init.sqf adds an action to the player, but it doesn't work when the mentioned addons are used.

Edited by W0lle

Share this post


Link to post
Share on other sites
Neither init nor fired EH work here if sight adjustment addon with fixed bridge addon are loaded.

The config looks correct. Maybe the problem lies in the order in which the four participating addons are loaded? You want them loaded in this order:

1: GMJ's sight adjustment addon

2: Extended_Eventhandlers.pbo and the fixed "bridge" addon that Solus posted above.

3: Your addon.

Try placing each of these in a mod folder of their own (the second mod folder having two addons). Then load them in order, ie with a -mod parameter similar to the following:

-mod=@GMJ_SightAdjustment;XEH;myaddon

In the end though, it would be best if GMJ's addon could be made properly and fully XEH compatible. Those interested can find such a config here: GMJ_SightAdjustment_XEH-config.cpp (Based on GJM's 0.4beta version of the sight adjustment addon)

PS. Naturally, all of this breaks in various ways if a third-party addon override parts or all of the EventHandlers class in the following core ArmA classes: AllVehicles, CAManBase, Helicopter, Plane, ParachuteBase and AV8B.

Edited by W0lle

Share this post


Link to post
Share on other sites

After toying around with the different versions of Event Handlers, I found that sometimes it's kinda luck if the XEH start or not. The biggest probability that they start, is when they're loaded with the last mod in the mod sequence.

Even when the XEH are loaded in a separate mod folder and at the end of all mods, it still can occur that they're not loaded. Happened last weekend to me when I set up 4 gaming machines all with the same install, same mod folders, same mod sequence. 3 of them started with all event handlers 1 not. And now!:

After rebooting all machines several times (due to Network installation) all 4 finally worked ok with the XEH.

Had the same issue today with another system I set up. Again the XEH didn't work in the 3 first missions. Then shut down ArmA, started again WITHOUT ANY CHANGES to the installation and they now work. Really strange.

Maybe this has something to do with what sickboy stated above concerning the delay of loading eventhandlers.

Solus or Killswitch any ideas why this happens?

EDIT:

Right now I played a mission "Blood sweat and tears" the XEH kicked in. I exited to main menu started the mission delivery boy and XEH don't work....

EDIT2:

Then pressed Esc, pressed Retry and the XEH work.... oh dear

Share this post


Link to post
Share on other sites

now that would explain my pain to get XEH addons workings on dedicated server while it works fine on non dedicated and so on ...

Share this post


Link to post
Share on other sites

OK I have found a reproduceable situation:

Each time I start ArmA and start with the "Delivery boy" mission the XEH don't work.

Each time I press Esc and then Retry then each time the PC is stuck for a moment and loads the XEH.

I'm running it on 1.09beta with a lot of mods and the last modfolder is @XEH/Addons with the Extended_Eventhandlers.pbo.

Any idea why it only works after Retry a mission?

EDIT: I can confirm the same happens also with the "Sanitizing Operation" mission.

EDIT2: I confirm this happens in all mission you play first time, without restart or retry.

So now the question is: What makes the XEH to work when mission is restarted or retried?

Share this post


Link to post
Share on other sites

can you post your modfolder loading order please

Share this post


Link to post
Share on other sites

DBE1;beta;@RLK;@TrueMods;@VFAI;@Proper;@UserAddons;@DurgsVegetationFix;@ArmAEffects;@DMSmokeGrenadeVB;@(a not yet released mod);FDF_Sounds

In the @UserAddons modfolder there are:

XEH, some unit replacement configs, EditorUpdate_v102,G85Editor,HT,HTRAD (Handy Tools),ROCKO_ILS, SDP_vehicles, ZGB_2A42_FDF,ZGB_FFARs and some small addons like: Civilians, Furniture, money, MoneyS, MADMED_insurgents, dk_znaki, ebu_soco1, CMCD_1ID

And one more info on XEH: When simply placing units in the Editor and then preview, no problem all addon that require XEH work right. So it must have something to do with mission loading and XEH loading conflict.

Edited by W0lle

Share this post


Link to post
Share on other sites

OK, just personally this is starting to suck (not XEH in general). I have about 10 different addons with (apparently) different versions of the Extended Eventhandler addons included. some that have the same main file name but different bisign names etc. what the hell am I meant to be installing? Forgive this post if it sounds shitty/shirty/snarky/rude, it's late and I'm drunk and confused. crazy_o.gif

<span style='font-size:6pt;line-height:100%'>and yes wednesday is a good day to be drinking.</span>

Share this post


Link to post
Share on other sites

just don't post while drunk ...

anyway the best is to urge all addon makers to 'try' sync theirs addons with latest XEH

and ofcourse everyone who 'can' to help improve XEH (e.g. to get of this RND init not init problems)

Share this post


Link to post
Share on other sites

You can have both the old and new eventhandlers loaded at the same time with no apparent harm done smile_o.gif So just keep the old and the new until all your addons have been updated!

Oh, and sickboy + I are going to release a new version of DSAI soonish that will support the new XEH and...well, be a helluva lot more optimized to boot. :P Just incase that's one of your addons.

Regards,

Wolfrug

Share this post


Link to post
Share on other sites

which as i got bit chaos now which may work together smile_o.gif

XEH 1.0 + EEH 1.26 or 1.25 or 1.2 or 1.1 ? smile_o.gif

plus they seems to work (most of time) relative ok on client but it's disaster on dedicated server

Share this post


Link to post
Share on other sites

My best experience is with XEH1.0 + EEH1.26. for MP,

XEH1.0 only for SP

Right now I fixed all used addons with the line Extended_Eventhandlers/Init.sqf instead of Extended_Init_Eventhandlers/Init.sqf and all addons work correct. Although I have to retry every mission in SP to get them all to work.

In MP it worked by far better than in SP. In MP I made the sequence that XEH1.0 would be loaded before EEH1.26 and it worked well on LAN.

No experience on dedicated server though.

PS. Hope addon makers will very soon find a common XEH.

(Reminds me a little bit of the JAM addon story for OFP...)

Share this post


Link to post
Share on other sites
I have about 10 different addons with (apparently) different versions of the Extended Eventhandler addons included. some that have the same main file name but different bisign names etc. what the hell am I meant to be installing?
The only XEH addon you should need is the one from this post ("Extended_Eventhandlers.pbo") and the bisign from the same archive.
Right now I fixed all used addons with the line Extended_Eventhandlers/Init.sqf instead of Extended_Init_Eventhandlers/Init.sqf and all addons work correct.
What other addons are that? The only addon that should use that script is Extended_Eventhandlers itself.
Although I have to retry every mission in SP to get them all to work.

In MP it worked by far better than in SP. In MP I made the sequence that XEH1.0 would be loaded before EEH1.26 and it worked well on LAN.

This is puzzling. Can you find a minimal set of addons that will reproduce this behaviour, so I can test it for myself? (A minimal set would be XEH and one other addon)

PS. Hope addon makers will very soon find a common XEH.

Yep. If/once we can figure out why SP/MP differs and dedicated servers behave differently, and fix it, the common XEH should be the "consolidated" one from this thread.

:smile_o:

Thanks for the feedback, everyone. Now let's see if we can sort these quirks out... the code is in the addon, so if there's a clever cookie out there that sees it, don't be shy. :biggrin_o:

Edited by W0lle

Share this post


Link to post
Share on other sites

Hey Ks,

I would like to make a suggestion:

Could you guys please make a solution for addon makers that 'forget' to add a semicolon at the end of their eventHandlers?

In the past this has been problematic for some.

I have 2 solutions for it:

[*] Instead of adding every eventhandler string on top of eachother and then executing that one big line, the eventhandlers can be saved in an array ( _inits=[]; ) <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_inits=_inits+[compile (getText ((configFile/_Extended_Init_Class/_x) select _i))];

and then simply execute: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">{ call _x } forEach _inits;

[*] Add a semicolon string ";" at the end of every eventhandler <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_inits=_inits+((getText ((configFile/_Extended_Init_Class/_x) select _i))+";");

I prefer the array smile_o.gif

Share this post


Link to post
Share on other sites

Excellent suggestions, Sickboy. I've implemented those along with a  fix for the initialisation of vehicle crew members, creating an updated 1.1 version of the Extended Eventhandlers addon.

Solus has kindly allowed me shared parenthood of the baby known as XEH, and here's the latest one: Extended_Eventhandlers11.zip

As usual, the addon "Extended_Eventhandler.pbo" should replace any older copies of the same and it also replaces the two older, now obsolete, addons named "Extended_Init_Eventhandlers.pbo" and "Extended_Fired_Eventhandlers.pbo".

Also in the archive are three example addons and one "bridge"  addon for gmJamez' SightAdjustment addon that will allow it to work together with XEH and other XEH addons.

Enjoy!

Share this post


Link to post
Share on other sites

Are there any plans to add support for the DisplayEventHandler? I believe that also suffers from similar problems to the init event.

Cheers

Share this post


Link to post
Share on other sites

sickboy is your experimental EH in 6thS different or all what's there is now in 1.1 XEH ?

Share this post


Link to post
Share on other sites

Hi Solus and Killswitch

I like what you are trying to achieve. I’m currently having trouble with the GMJ sight adjustment addon. It appears to disable parts of other addons, I have reduced my addons to only arma effects and the sight adjustment addon when its loaded the back blast from the m136 in arma effects is not seen if I only load arma effects I see the back blast from the m136. It’s the same for sound mods (Chammy) all sounds without GMJ and only some with it. I’m currently using mod folders. All I can assume in that the "SightAdjustment_AutoInit.pbo" is to fix this. I have tried to load it in side the arma effects folder and the gmj folder but still no joy also tried to load the 2 mods in different order in my target line

F:\ArmA\arma.exe -mod=@GMJ_SightAdjustment;@ArmAEffects

As you can see I have it loaded in a non standard location but I don’t have arma on my C drive to check it that it.

Any help please will be most appreciated as I like both these mods and other but cant get them to work with each other.

Note: All files used are current versions and recently downloaded and Im using all files in this mod.

Share this post


Link to post
Share on other sites

The armaholic.com file now contains this fixed version of the SightAdjustment_Autoinit addon.

We packed it again.

Share this post


Link to post
Share on other sites

isn't easier use directly fixed config.cpp for GMJ_sightadjustment which was posted by Killswitch sometime ago

i use it and w/o single issue since that time (no need for bridge)

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×