Input event that works in FS20 does not work in FS24

Version: 1.3.23.0

Frequency: Consistently

Severity: Blocker

Context: GA-8 Airvan

Bug description:
We are converting our 2020 Airvan into 2024-native and our custom electrical switch breaks the entire aircraft. In FS24 we are getting the following error:
Couldn't find input event: "Switch_Bus_1" there is no input event with this name in the current context
The error does not exist at all in FS20 and the plane works well there, as well as in 2024 backwards compatibiltiy mode. Our custom switch template is a modified version of the ASOBO Avionics bus switch template, which we modified into a generic electrical switch.
The INPUT_EVENT_ID_SOURCE is ELECTRICAL, with the IE_NAME being Switch_Bus_#ID#.

In FS2024 the aircraft works well during the Runway RTC, but as soon as you click “ready to fly” the entire plane freezes. When frozen, we set ELECTRICAL_Switch_Bus_1 and 2 using the Behaviors Debug window, the switches move and the event changes value correctly, but the plane remains completely broken.

The problem only exists when we make the plane modular. Converting the FS20 plane straight into an FS24 package without going through the modular aircraft process, everything works perfectly fine.

Repro steps: In developer mode, load the plane on the runway. The plane will be fine until you press “READY TO FLY” at which point it will freeze. Same code, no errors or problems in FS20 or FS24 backwards compatibility mode.

Private attachments: Sent 2020 and 2024 PackageSources along with instructions.

Hello @SWS-AlexVletsas

It seems to be a consequence of your modifications on the SWS_ELECTRICAL_Switch_Bus_Template template in the 2024 version of your aircraft.
Some of your parameters do mention the InputEvent as (B:#IE_NAME#, Bool), which means the ELECTRICAL_ prefix is missing.
You probably wanted to use (B:#INPUT_EVENT_ID_SOURCE#_#IE_NAME#, Bool) instead?

Regards,
Sylvain

Hello Sylvain! You are correct in that’s what I want to use, but there seems to be an issue deeper.

My template is a modification of ASOBO_ELECTRICAL_Avionics_Bus_Template. In my modification, the declared parameters for the InputEvent are:

<NODE_ID_NAME>Switch_Bus_#ID#</NODE_ID_NAME>

Which is then used in the parameters that form the InputEvent:

<INPUT_EVENT_ID_SOURCE>ELECTRICAL</INPUT_EVENT_ID_SOURCE>
<IE_NAME>#NODE_ID_NAME#</IE_NAME>

The first is an extra safeguard to make sure that ELECTRICAL does make it to the InputEvent, although it is already declared in ASOBO_ELECTRICAL_Base_Template which I end up calling. Within my template, IE_NAME and INPUT_EVENT_ID_SOURCE are only declared once and only called once in LOCALVAR_TO_WATCH_0, so all the interaction logic is handled within ASOBO_ELECTRICAL_Base_Template.

  • If I use the plane in 2020 it works without issue and I don’t get a console error.
  • If I build the plane in 2024 using the 2020 project as a non-modular aircraft, it works without issue and I don’t get a console error either.
  • If I break up the plane to be modular, that’s when the problem arises.

Unless there is something I can’t see (likely), I suspect that the problem might be in how the ASOBO_Interaction_Base_Template where the usual interactions are handled is “merged” into a modular plane.

I’m not sure I’m following you.
The part of the template that triggers the error does not come from ASOBO_ELECTRICAL_Base_Template, it’s in the part you edited (ENSURE_VARIABLE_CONSISTENCY parameter).

And this part seems also specific to your 2024 version.
This part of code does not exist in the 2020 version you provided.

Regards,
Sylvain

I hadn’t noticed that the code was inconsistent across versions. I will check and report back.