Skip to content
This repository has been archived by the owner on Jan 5, 2024. It is now read-only.

Faction state data for EDDP service is out of date for 3.X #3

Open
Tkael opened this issue Jun 24, 2019 · 2 comments
Open

Faction state data for EDDP service is out of date for 3.X #3

Tkael opened this issue Jun 24, 2019 · 2 comments
Labels
bug Something isn't working

Comments

@Tkael
Copy link
Member

Tkael commented Jun 24, 2019

EDDP publisher (see https://github.com/EDCD/EDDP-API/blob/master/eddnlistener.go) doesn't transmit active states, pending states, happiness, etc. EDDI cannot be updated to receive this data until it's first updated at the transmitter (e.g. the EDDP monitor has been fairly broken for a long time, we need to do some work here to unbreak it).

It also doesn't publish ednames, even when it receives them from the EDDN listener.

Cross reference with EDCD/EDDI#177.

@Tkael Tkael added the bug Something isn't working label Jun 24, 2019
@Tkael
Copy link
Member Author

Tkael commented Jun 24, 2019

Current EDDP messages are like:

{
	"newstate": "None",
	"oldstate": "Boom",
	"systemname": "Alintun",
	"x": -78.9375,
	"y": 110.8125,
	"z": -36.0625
}

System faction states are only reported for the controlling faction and do not consider the fact that a faction may now have several active faction states at once.

The EDDP publisher should loop through each faction in the faction array and allow faction states to be reported as an array for any faction whose details have changed.

Examples of desired outputs (if the faction is in a conflict state, e.g. war or civil war, the opposition faction will have the same state and influence percentage and can be identified using the conflictFaction property)...

  1. Change of active state
{
	"systemName": "Sol",
	"systemAddress": 123456789,
	"x": 0,
	"y": 0,
	"z": 0,
	"factionName": ...,
	"newActiveStates":
	[
		{
			"stateEdName": "Boom"
		}
	],
	"oldActiveStates":
	[
		{
			"stateEdName": "CivilLiberty"
		}
	],
    "conflictFaction": null
}
  1. Change of pending states
{
	"systemName": "Sol",
	"systemAddress": 123456789,
	"x": 0,
	"y": 0,
	"z": 0,
	"factionName": ...,
	"newPendingStates":
	[
		{
			"stateEdName": "Expansion"
		}
	],
	"oldPendingStates":
	[
		{
			"stateEdName": "Boom"
		}
	],
    "conflictFaction": null
}
  1. Change of influence:
{
	"systemName": "Sol",
	"systemAddress": 123456789,
	"x": 0,
	"y": 0,
	"z": 0,
	"factionName": ...,
	"newInfluence": ..,
	"oldInfluence": ..
}

Alternative to #1-#3... send a modified data package derived from the EDDN location / FSDJump schemas, containing all of the system faction data and identifying changed states, pending states, and influence. Each data package would then potentially contain multiple changes for a given star system:

{
	"StarSystem": "Kalak",
	"SystemAddress": 11665265206665,
	"StarPos": [-54.96875, -73.90625, -68.78125],
	"Factions": [{
			"Name": "Pilots' Federation Local Branch",
			"Influence": 0.000000,
			"Influence_Changed": false,
			"PendingStates_Changed": false,
			"ActiveStates_Changed": false,
			"PendingStates": [{
					"State": "None",
					"Trend": 0
				}
			],
			"RecoveringStates": [{
					"State": "None",
					"Trend": 0
				}
			],
			"ActiveStates": [
				{
					"State": "None"
				}
			]
		}, {
			"Name": "Order of Kalak",
			"Influence": 0.045545,
			"Influence_Changed": true,
			"PendingStates_Changed": true,
			"ActiveStates_Changed": false,
			"PendingStates": [{
					"State": "None",
					"Trend": 0
				}
			],
			"RecoveringStates": [{
					"State": "None",
					"Trend": 0
				}
			],
			"ActiveStates": [
				{
					"State": "None"
				}
			]			
		}, {
			"Name": "Kalak Dynamic Partners",
			"Influence": 0.074257,
			"Influence_Changed": false,
			"PendingStates_Changed": false,
			"ActiveStates_Changed": false,
			"PendingStates": [{
					"State": "None",
					"Trend": 0
				}
			],
			"RecoveringStates": [{
					"State": "None",
					"Trend": 0
				}
			],
			"ActiveStates": [
				{
					"State": "None"
				}
			]
		}, {
			"Name": "Democrats of Kalak",
			"Influence": 0.050495,
			"Influence_Changed": false,
			"PendingStates_Changed": false,
			"ActiveStates_Changed": false,
			"PendingStates": [{
					"State": "None",
					"Trend": 0
				}
			],
			"RecoveringStates": [{
					"State": "None",
					"Trend": 0
				}
			],
			"ActiveStates": [
				{
					"State": "None"
				}
			]
		}, {
			"Name": "Independents of Parenni",
			"Influence": 0.051485,
			"Influence_Changed": false,
			"PendingStates_Changed": false,
			"ActiveStates_Changed": false,
			"PendingStates": [{
					"State": "None",
					"Trend": 0
				}
			],
			"RecoveringStates": [{
					"State": "None",
					"Trend": 0
				}
			],
			"ActiveStates": [
				{
					"State": "None"
				}
			]
		}, {
			"Name": "Kalak Autocracy",
			"Influence": 0.047525,
			"Influence_Changed": false,
			"PendingStates_Changed": false,
			"ActiveStates_Changed": false,
			"PendingStates": [{
					"State": "None",
					"Trend": 0
				}
			],
			"RecoveringStates": [{
					"State": "None",
					"Trend": 0
				}
			],
			"ActiveStates": [
				{
					"State": "None"
				}
			]
		}, {
			"Name": "Kalak Gold Brothers",
			"Influence": 0.009901,
			"Influence_Changed": false,
			"PendingStates_Changed": false,
			"ActiveStates_Changed": false,
			"PendingStates": [{
					"State": "None",
					"Trend": 0
				}
			],
			"RecoveringStates": [{
					"State": "None",
					"Trend": 0
				}
			],			
			"ActiveStates": [
				{
					"State": "None"
				}
			]
		}, {
			"Name": "MediCorp",
			"Influence": 0.720792,
			"Influence_Changed": false,
			"PendingStates_Changed": false,
			"ActiveStates_Changed": false,			
			"PendingStates": [{
					"State": "Expansion",
					"Trend": 0
				}
			],
			"RecoveringStates": [{
					"State": "CivilLiberty",
					"Trend": 0
				}
			],
			"ActiveStates": [{
					"State": "Boom"
				}
			]
		}
	],
	"SystemFaction": {
		"Name": "MediCorp",
	}
}

Clients would derive the conflictFaction from full data and would be able to update the local database with all influence values in context

@Tkael
Copy link
Member Author

Tkael commented Jun 24, 2019

After inspecting http://api.eddp.co/systems/Sol, the star system definition should be updated as follows:

  • Add property: "edsm_id"
  • Remove property: "state"
  • Add array property: "states"
  • Remove property: "faction"
  • Add property: "controlling_minor_faction"
  • Add array property: "minor_faction_presences" with sub-properties (to closely match to the FSDJump event faction array data)
    • happiness (cross reference index to identify edname)
    • faction name (cross referencing with other data dumps to obtain minor faction name)
    • government (cross referencing with other data dumps to obtain government)
    • influence
    • active states (preferably with edname and trend value reported)
    • pending states (preferably with edname and trend value reported)
    • recovering states (preferably with edname and trend value reported)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant