Max supported gens

what is the max supported # of gens to engines allowed in the sim? i see vars for up to 4 and nothing beyond. i currently am working on an aircraft with 7 gens total and can only manage functions of 4 of them (in any order with the list given in the SDK ). i was curious if theres a known limit on max number of gens etc.

just a bump for curiosity. so far ive got power going to all 7 gens (electrical debug shows power to them, just cant toggle the other 2 gens (7th gen is an apu gen of which i got working)), can only trigger 4 (of the 6 total non apu gens) to turn on/off.

Where are you seeing the limit of 4?
There is no limitation on the indices listed in the events to control the alternators (excepting the old toggle events):
https://docs.flightsimulator.com/html/Programming_Tools/Event_IDs/Aircraft_Electrical_Events.htm

using the TOGGLE_ALTERNATOR5 event ( SDK only goes up to TOGGLE_ALTERNATOR4) i cannot toggle 5 and 6 with a toggle switch like i can 1-4(again i have power going to all my gens). BUT i can only toggle up to #4 with a switch.

toggle events up to #4 gen. keeping the same structure but going beyond #4 (aka TOGGLE_ALTERNATOR5 ,TOGGLE_ALTERNATOR6 , doesnt work like 1-4 does (hence why im asking if theres a known limit to total amount of gens)

5 (>K:TOGGLE_MASTER_ALTERNATOR) shall work.
same for Event IDs ALTERNATOR_OFF &ALTERNATOR_ON.
:slight_smile:

2 Likes

appreciate you!

while this works 5 (>K:TOGGLE_MASTER_ALTERNATOR), it currently does not work 100 out of 100 times. several times upon implementing this and or using the same format for gens 2,3,4,5, for whatever reason the sim sometimes will load it so it toggles like the others, and other times it wont toggle at all and on the electrical debug shows that the others (2,3,4) switch fine but 5 wont. gens 1 and 6 are on one switch, gens 2,3,4,5 are on another. this is a pic with both switches on (where it should show that 5 is on but it doesnt and also shows 1 is off which is set to another switch. no theres no other references to gen 1 or 5 in the xml). this is the more common result

i also have a video of it strangely working the right way the first time i rebuilt the project in the insim editor, but not again after that initial build (which is really really odd).

The issue seems to be initial conditions. (The *.flt files may have entries for Gens 1 through 4, but not the others). Does the offending alternator respond in reverse when flipping the switch? If that is the case, you’ll need some logic to set them up at start-up.