core-diplomacy
Contains base entities for basic diplomacy.
-
Interaction
for anything that happens involvingPlayer
s. -
Declaration
for tracking persistent state betweenPlayer
s. -
Expiry
for terminatingDeclaration
s based on the currentTurn
. -
Proposal
for handling a decision within aNegotiation
. -
Resolution
for resolvingProposal
s. -
Negotiation
for tracking chains ofProposal
s.
Rule
s to help manage some of the above entities
Interaction
s
For -
Created
- fired on creation -
Sentiment
- allows a point system to be implemented for building a relationship score ofPlayer
s based on theirInteraction
s
Negotiation
s
For -
Interaction
- fired at each completed step of aNegotiation
-
Step
- controls whichInteraction
s are available at any given point in aNegotiation
. -
Terminated
- when theNegotiation
is complete
Proposal
s
For -
Accepted
/Declined
/Resolved
- fired whenProposal
s are affected
All interactions (anything that inherits from Interaction
) can be stored in the InteractionRegistry
to enable
sentiment analysis.
Future ideas
I'm sure some of these approaches might not work out further down the line, the implementation of using the
chooseFromList
mechanism in the Client
in particular might need altering, which might encourage further changes to
the flow here, but this is "good enough" for now.
Other ideas:
-
Voter
s. Maybe this is just an interface and any object can be aVoter
,Proposal
s could then bevote
d on by any entity that implements the interface and the concept could work for any type of diplomacy like UN, internalCity
elections, etc - Full support for more than two participants.
-
ResolutionStrategy
s for requirements likeUnanimous
andMajority
to allowProposal
s to be actioned. -
Dialogue
probably shouldn't be aProposal
...