Contents

In short: MKA Engine helps find agreements, organizations, disputes and country-to-country opinions created by mods—packages that add content and rules to a game. It distinguishes mutual from one-way agreements, checks organization membership and finds permitted steps in a dispute. The game defines what the rules mean and which political action to take.
What was the problem?
Agreements, organization membership, opinions between countries and disputes are different kinds of relationships in a strategy game. An agreement can connect two countries; an organization can bring several together; and the sides in a dispute can have different roles. Players need more than an answer to “does this relationship exist?” They also need to know its direction and whether a proposed next step fits the game's rules.
MKA Engine helps find these relationships and answer basic eligibility questions. It does not choose the political meaning of an agreement, the conditions for joining an organization or the outcome of a dispute. Each game sets those rules for itself.
How did we solve it? We kept four relationships separate from game rules
Agreements: mutual or one-way
Some agreements mean the same thing for both countries: the relationship between A and B is still the same when asked about B and A. In other agreements, the countries have different roles. A right that A gives B is not the same as a right that B gives A. The engine preserves this distinction and helps find an agreement or the other countries linked to one country by it.
That difference shapes what the player sees in the game. A mutual defense agreement may apply to both countries, while a subject relationship may go in one direction. The game decides what each agreement means and who may enter it.

Organizations: members and leaders
The engine can list an organization’s members and report whether the organization and country are active and whether the membership already exists. The game sets political admission rules.
If an organization’s leader leaves, the engine reports that the leadership seat will be vacant. If the game supplies scores for candidates, the engine can suggest a leader; the game decides whether to use the suggestion and records the next leader.
Disputes: only defined next steps
A dispute is a process involving two countries that can move through stages. The game defines which step may follow each stage. The engine checks whether a move from the current stage is defined. If not, it reports that result; the engine does not apply the step itself, and the game controls the next action. The game also defines what each stage means and what follows.

How countries view one another
One country’s opinion of another need not match the reverse. A’s opinion of B and B’s opinion of A can be found as separate relationships. The game calculates the opinion and how it changes; the engine helps find the relationship in the requested direction.
What did the checks show?
Checks found a mutual agreement from either direction and treated the reverse of a one-way agreement as a separate relationship. They also checked organization membership: when its leader left, no replacement was chosen; the result only reported a vacant seat. In a dispute example, a defined next step was allowed while a jump over an intermediate step was not. Country opinions were looked up in each direction separately.
These checks do not measure whether a game's diplomacy rules are correct or fair. They test whether the engine finds relationships and permitted transitions supplied by the game. This work includes no performance measurement.
Why did we make this distinction?
The meaning of an agreement, organization or dispute varies from game to game. Sharing relationship searches while leaving political rules in the game keeps the engine from imposing one diplomacy model on every game. The game defines relationships and eligibility conditions; the engine helps search and check within that framework.
What does it cost?
The game must supply the countries involved, the meaning of each relationship and the rules to apply. The engine's answer does not apply the decision by itself; the game still takes the next step. No result here measures speed or memory use in a real campaign.
What comes next?
In the next diary, we will look at where a game day spends its time and what that measurement can—and cannot—tell us.
Frequently asked questions
What is the difference between a mutual and a one-way agreement?
For a mutual relationship, swapping the countries leaves the relationship the same. For a one-way relationship, their roles change its meaning.
Does the engine decide who can join an organization or become its leader?
No. The engine lists current members and checks basic membership status; the game sets admission rules and chooses the next leader.
Can a dispute move to any stage?
No. The engine finds a next step the game has defined. The game decides what each stage means and how the process ends.
Is a country's opinion of another a shared value?
Not necessarily. Each country can view the other differently; the game decides how to calculate those opinions.
The previous diary described how a game can order heir candidates; this one looks at agreements countries make and other relationships between them. Read Developer Diary #20, learn more about MKA Engine and developer diaries, or visit contact if you have questions.
Sources and related docs
You may also like
- How is a strategy game's world map made?
For MKA Engine we built a 27,357-location world map of 1337 from real data: how terrain, rivers, straits, population and location borders were made.
- The road to a game engine
How we started MKA Engine: reading four games, treating determinism as law, moving phase by phase with measurements, and where we are now.