You will need the other 2 widgets for this one to run. enemy intel and build proposer.
The prediction is mode based on a counter matric that was built with online information .
Select ur army and the friendly units around it are counted in the prediction against the enemies surrounding them.
the widget (there are settings to play around with in hud panels/engagement predictor. if you can suggest a default setting for the range at which the widget looks at units that would be nice)
widget (put it in luaui/widgets)
https://pastebin.com/RmXiQT6sScreenshot of the panel (you can disable all the extra information and only have it tell you the victory probability)
https://imgur.com/a/AyslEoy