RHS Feedback - AFRF
View Issue Details
0004697AFRF[All Projects] Generalpublic2018-10-21 19:252018-10-24 09:10
Defunkt 
reyhard 
nonetweakalways
closedno change required 
 
 
Yes
1.84
Yes
Only my own (the subject of this development query).
0004697: EventHandlers Inheritance
Apologies if this is a bit remedial (these days I only get time to mod infrequently) but I wanted to query your policy on preserving EH inheritance.

I understood that I might hook the Fired EH in the following fashion (given FUNK_Fnc_Fired defined in CfgFunctions);

class CfgVehicles {
    class All {
        class EventHandlers;
    };
    class AllVehicles : All {
        class EventHandlers : EventHandlers {
            class FUNK {
                Fired = "_this Call FUNK_Fnc_Fired;";
            };
        };
    };
};

This works for vanilla units but not for the vast majority of RHS' units. For a specific instance 'rhs_msv_emr_rifleman' *appears* to discard my EHs in the definition of its ancestor 'rhs_infantry_msv_base'.

Am I attempting this in a hopelessly naive fashion (quite possible) or is it perhaps your policy not to support inter-operation in this manner? Otherwise is it something I might prevail upon you to tweak? Thanks!
No tags attached.
Issue History
2018-10-21 19:25DefunktNew Issue
2018-10-23 11:35reyhardNote Added: 0008706
2018-10-23 11:35reyhardAssigned To => reyhard
2018-10-23 11:35reyhardStatusnew => feedback
2018-10-23 16:03DefunktNote Added: 0008708
2018-10-23 16:03DefunktStatusfeedback => new
2018-10-23 16:30DefunktNote Added: 0008709
2018-10-23 16:47reyhardNote Added: 0008710
2018-10-23 16:47reyhardStatusnew => feedback
2018-10-23 19:26DefunktNote Added: 0008711
2018-10-23 19:26DefunktStatusfeedback => new
2018-10-24 09:10reyhardNote Added: 0008713
2018-10-24 09:10reyhardStatusnew => closed
2018-10-24 09:10reyhardResolutionopen => no change required

Notes
(0008706)
reyhard   
2018-10-23 11:35   
appears? Do you have some more details?
(0008708)
Defunkt   
2018-10-23 16:03   
Hi, thanks for replying so quickly. I'm ashamed to say this looks like a non-issue. When I set about creating the purest possible repo it stopped occurring (sorry, should've done that first *blush*).

It's down to my trying to be explicit about load order. Has always been my habit to create small addons listing all patches for major content groups (CoreA3, RHS, CUP) that I can reference as 'required' in functional addons. Requiring all vanilla patches be loaded before this mod seems to cause it to be loaded too late for many RHS classes. Generally I prefer to be explicit about such things but clearly I should just leave it to the engine to do its magic.

Thank you again and apologies for the nuisance report.
(0008709)
Defunkt   
2018-10-23 16:30   
I should say that I'm not sure that there was anything really wrong with what I was doing (the required 'loadlast' addon is described here; https://pastebin.com/d4h761wE [^] - basically everything from vanilla CfgPatches) and the fact that I've had to remove it might mean that you have a rogue EH definition somewhere. I might look at the original configs for the classes in question and if I find something that doesn't appear to preserve inheritance I'll report back.
(0008710)
reyhard   
2018-10-23 16:47   
wow, that cfgPatches looks really weird and I'm pretty sure it might confuse engine. All you need is to use tank dlc loader to load it as a last addon. With addon making change to all classes I think you would rather try to load it first. Definitely having > 10 addons in required addons is quite bad habit.
(0008711)
Defunkt   
2018-10-23 19:26   
Thanks, I guess that would be 'a3_data_f_tank_loadorder' and these are (relatively) new patches for just this purpose? Praise be.

At some point I expect I will be narrowing the classes down to something less global than AllVehicles but I take your point about loading sooner rather than later (and certainly this seems to fix the issue for now).

As far as the original report goes I understand kju may have been in touch with the some potential problems regarding inheritance. Please let me know if there's anything I can help with there.
(0008713)
reyhard   
2018-10-24 09:10   
sure, anyway, as I've mentioned if you are trying to load something so deep in inheritance tree you would rather to try your addon as first one, not as last one.