Update EDDP monitor into a BGS monitor
Observed
(Broken out from issue #97) EDDI relies on data from http://api.eddp.co, which is not up to date. Faction arrays with active and pending states aren't transmitted or handled appropriately by the server or the client.
- array data for faction active states, pending states, happiness, etc. are not handled by server,
- server returns localized names rather than ednames. Wherever possible, ednames should be made available.
Investigation
Faction state changes are handled differently in that they are relayed more or less in real time from the EDDN TCP uplink. Though this is bounced through http://api.eddp.co, faction state changes should continue to remain relatively reliable. See https://github.com/EDSM-NET/EDDN/wiki for how this information is transmitted and EddpMonitor.cs for how EDDI receives the data.
http://api.eddp.co appears to be listening to 'FSDJump' and updating a database of faction states. When a faction state change is detected, the server fires off an update of its own for EDDI users to pick up. This update is currently a text string like
2018-02-10T22:11:55 EddpMonitor:monitor [D] Message is {"newstate":"None","oldstate":"Boom","systemname":"Alintun","x":-78.9375,"y":110.8125,"z":-36.0625}
Cross reference with https://github.com/EDCD/EDDP-API/issues/3.
Also revise the monitor name to BGS monitor?
Notes:
- For expansion, 75% will fire expansion regardless of whether the faction drops lower before pending is complete. People tend to use arbitrary warning point below 75%, since once 75% is reached expansion can no longer be prevented.
- For retreat, the faction must be under 2.5% to trigger the pending state, again to trigger the active state, and yet again to complete the state 'successfully' by actually retreating.
- Civil war/war is triggered by parity to other factions (when influence would cross each other in influence, they instead go to exact parity and go into the conflict process). Civil war is typically triggered if factions originate from the same social group, war is triggered if they do not.
- Social:
- opens black markets
- elections with other Socials, wars with others
- usual group for Democracy, Cooperative, Confederacy or Communist governments, and some Theocracy governments
- Corporate:
- closes black markets
- elections with other Corporates, wars with others
- usual group for Corporation government
- Authoritarian:
- closes black markets
- elections with other Authoritarians, wars with others
- usual group for Dictatorship, Patronage, Feudal or Prison Colony governments, and some Theocracy governments
- Criminal:
- opens black markets
- offers wider range of illegal missions
- never has elections, always war/civil war
- usual group for Anarchy government
- Social:
- Coups: If a faction is not in control of a system, a coup war is triggered if they reach greater than 60% and either faction is not in cooldown.
- [ ] Add Min and Max influence triggers to the EDDP monitor?
- [ ] Allow users to set triggers for changes to both active and to pending faction states?
Recategorized since the EDDP monitor is unfit for purpose until this is corrected.