I have an issue in the game i am currently writing, I would like to integrate diplomatic relations between the different factions, in a manner similar to the Civilization / Galactic Civ. games. The data part I can do, and did:
The map is cut into sectors, each one has a value depending on various factors (resources, assets and so on) so knowing the point of interest is not a problem.
Each faction value others according to various factors (past aggressions, similar laws or not, nearby borders causing frictions and so on) so knowing who like/hate who without diplomacy isn't really either
They also have a value they can check to compare military strength, so they know if they are threatened by others or if they are dominant.
The different factions have the following tools to interact:
- Declaring war for a specific neighboring sector
- Giving gifts / send diplomatic ship to improve relations
- Insult to lower relations
- Trade agreements (allowing ships to buy/sell from other factions assets)
- Passage agreements (using jumpgates from other factions to get to their sectors)
- Military/Alliance agreements (both factions using military ships as one)
- Give/sell/ask for a sector to improve relation or get money or remove a threat
Each faction has values that can be used: diplomatic power (how persuasive is a faction), xenophobia (how resistant is a faction to offers from another (to balance diplomatic power), how warlike or "tradelike" is the faction and so on. Most of it heavily influenced by 4X games.
Going to war is easy, but for the rest, like making alliances, allowing ship passage / trading and so on in a believable way, I am kinda lost. I don't really see a sort of generic algorithm that would make AI controlled factions using diplomacy without relying on a nightmarish mess of nested If/else/if/else. While I am fairly used to FSM logics which i used (to an extend) for individual units I don't really see that working on a faction level.
I've looked left and right about diplomatic / strategic AI but the documentation is kinda sparse and usually war focused. And that is definitively not my problem, which is basically how to handle "peace" or maintain it (and why). Is there something obvious that I am missing ? Is it something so game dependent that there's no general ideas on how to handle such things without into going "crazy" genetic algorithms ?
At this point any pointer to related documents or advice is more than welcome
I will provide more data regarding the game' structure if you need it.
Anyway, thank you for you time.
edit: changed link toward my indieDB page instead of my site which is currently down.
Edited by SerialKicked, 11 April 2014 - 03:46 PM.