FF Enemy Command - FFRO Bridge

by The Boi With No DLC
FF Enemy Command - FFRO Bridge

Summary

TEST BUILD - bridge: Enemy Command steers FF_Reoccupation counterattacks and shows its warning on the Intel page. Needs Enemy Command 0.1.10+. Feedback: github.com/FatihHekim0glu/FF-Series-Feedback

Description

TEST BUILD - please send feedback, bugs and ideas: https://github.com/FatihHekim0glu/FF-Series-Feedback

FF Enemy Command - Reoccupation Bridge connects two mods: FF Enemy Command (the enemy's brain) and FF_Reoccupation (its counterattacks and death squads). Load it only on servers that run both.

REQUIRES
- FF Enemy Command 0.1.10 or newer (update it first): https://reforger.armaplatform.com/workshop/C74C7AF9100C7769
- FF War Economy: https://reforger.armaplatform.com/workshop/8FF9767E026B74B3
- FF_Reoccupation: https://reforger.armaplatform.com/workshop/69A47272BCF14AD5
- Freedom Fighters
Without this bridge FF Enemy Command still works and only observes FF_Reoccupation ("observed (bridge not loaded)" on its Enemy Intel page). With it the page says "steered".

WHAT IT DOES
FF_Reoccupation keeps all of its own rules. The bridge answers at seven of its decision points with numbers from FF Enemy Command, and passes on one warning:
- Counterattack strength: inside FF_Reoccupation's own configured range, from the enemy's mood, the front, its stockpile and the rubber band.
- Counterattack delay: calm 1-4 hours, vengeful 0.5-2 hours, longer when the stockpile is thin; always inside FF_Reoccupation's range.
- Postponement while another battle runs: 15-60 minutes once the enemy is angry (aggression 40 and up).
- Number of parallel counterattack timers: from 1 (calm) up to 6 (aggression 100), never above FF_Reoccupation's own maximum.
- Selection weight: no counterattacks during a finale stand-down (the finale comes in a later package).
- Budget: FF_Reoccupation's own answer is unchanged; Enemy Command books what a counterattack costs its stockpile, once per battle.
- Death squads: vetoed below aggression 40, for a fortifier commander, in the finale and during an Enemy Command reprisal.
- Counterattack warning (new in 0.1.2): when FF_Reoccupation warns of a counterattack (about 5 to 12 minutes ahead), the bridge lets FF Enemy Command know the place and the time, so its Enemy Intel overview shows "Counterattack expected at X in about N min". FF_Reoccupation's own warning goes out first and unchanged; this part only reports and changes nothing. It needs FF_Reoccupation's priority messages to be on; the place is named from intel level 2.
When Enemy Command is off, every answer is FF_Reoccupation's own. When its data is older than two minutes, strength, delay and postponement are FF_Reoccupation's own, while the timer count, the stand-down and the death-squad veto keep the last answer. Plans already committed keep their strength. The bridge never writes FF_Reoccupation's data, timers or settings.

SWITCH
In FF Enemy Command's settings: knobs.ffroSteering = false hands everything back to FF_Reoccupation. enemyStrength and counterattackPace scale the numbers.

UPDATING
Update FF Enemy Command to 0.1.10 or newer before (or together with) this bridge 0.1.2: with FF Enemy Command 0.1.9 or older the bridge scripts do not compile. The old bridge 0.1.1 keeps working with FF Enemy Command 0.1.10, it just never shows the counterattack row.

LOGS
[FFEC][BRIDGE] layer ok once per session, plus lines on strength, delay and the veto; [FFEC] ffro: warning for ... when a warning is passed on.

KNOWN
FF_Reoccupation 6.4.9 throws a harmless script exception when its world is opened in the editor's edit mode. It does not happen on a server.

CREDITS
All credit for the counterattack timers, front index, recon, artillery, death squads and intelligence reports goes to the author of FF_Reoccupation. This bridge only supplies numbers at their own decision points. No FF_Reoccupation code is copied; the method names were read from its published files. Freedom Fighters is by its author. Bridge by Fatih Hekimoglu, licence APL-ND.

License

Arma Public License No Derivatives (APL-ND)