Are you, in fact, a pregnant lady who lives in the apartment next door to Superdeath's parents? - Commodore

Create an account  

 
Comparing the diplomacy system of Master of Orion, MoM and CoM.

While reading through the diplomacy information in the Master of Orion strategy guide, I'm going to post how code in MoM compares to that, and (when I did change it) my changes to it in CoM.
MoO information is based on official text, while MoM's is actual game code, so there is no guarantee MoO actually does work like described.

1. Diplomatic effect modifiers based on current relations.

Positive event effect per current relation :
MoO : -100 to +33 : Normal effect, +33 to +66 only 2/3, +66 or higher 1/3 effect
MoM : -100 to 0 : Double effect but cannot raise above +10, 0 to 24 Normal effect, 25-49 Halved effect, 50-74 One third, 75-100 : One quarter
CoM : -100 to 24 : Normal effect, rest unchanged.

Negative event effect per current relation :
MoO : -99 to -67 : One third, -66 to -34 : 2/3 effect, -33 to +50 normal effect, +51 or higher : Double effect
MoM : -99 to -75 : One quarter, -74 to -50 : One third, -49 to -25 : Half, -24 to -1 : Normal, 0 to +100 : Double effect.
CoM : -24 to +100 : Normal effect, rest unchanged.

I can't help to think MoO got this one right and MoM is worse. Doubling the bonus or penalty when the bar is only slightly above or below zero is just stupid.

2. Natural relations gravitation.
MoO : Each turn, relations gain or lose 1 point to move it closer to the starting value. (at least according to the guide)
MoM : First, if random(105)>abs(current relation), then nothing happens. Otherwise, the relation increases by random(2) if below the starting point. If above, there and the turn count is divisible by 10, it decreases by the same amount.
CoM : Not changed yet, but probably should.

Again, MoO is simple, clear and functional. MoM effect is much weaker, and has a bias towards positive relations. Gravitating back to the starting negative relation will barely happen, as 1-2 points every 10 turns, only when the random roll is made it...almost nothing.

3. "Starting" aka "Core" relation points.
MoO : Starting value based on races. +5 every time you offer a tech tribute. -5 for every "oath breaker action". -5 for every war declaration. Player character's personality modifies this by -40 to +40.
MoM : Starting value based on spellbooks. -5 for war declaration. +20 for breaking an alliance (bug). No change for breaking a pact, but both of these add to a different, direct diplomatic penalty variable instead. Again, it is bugged and adds +10 for a pact, and +20 for an alliance, instead of subtracting. -5 is added for every other wizard not involved in the broken treaty. Offering tributes also add to the other variable instead. There is no way to improve the core relations, aside from...breaking your alliances.
CoM : Fixed the bugs above, otherwise no change.

4. Temporary modifiers to reactions.
MoO : Has Treaty, Peace, Trade, Exchange, and Diplomat Gone modifier. Any offer regardless of outcome adds -10 to all of these. -30 to the related one if they aren't interested. They are gravitating towards +0 at end of turn by 10 points.
MoM : Has Treaty, Peace and Exchange variable. Any offer adds a varying amount depending on the offer type and result (a successful spell trade is -60!!!). Value gravitates toward +100 by 10 points at end of turn, and a further random(5) point twice if below 0 and 50 towards AI only. For peace, any negative diplomatic event during war adds one quarter of the event value to the suffering party and subtracts that much from the one doing the action. Diplomatic events add twice their relation change value to Treaty and Exchange modifiers. War declaration immediately sets all of them to -200 on both players involved. Broken treaties do similarly (I think only to -100 though).
"Diplomat Gone" modifier is simply the lowest of the other 3 modifiers instead of having a variable.
CoM : Mostly unchanged except peace, which only gets a +4 per turn if not at war. If at war, based on astrologer military strength, the stronger party is gravitating towards -200 rapidly, the weaker towards +200, and if there is less than 25% difference in military power, the value is unchanged. The amount received from diplomatic actions is unchanged. Also reduced spell exchange penalty and halved the +10 per turn to +5.

5. "-100 penalty"
MoO : When any of the above variables hits -100, excess lost points affect relations directly at halved strength.
MoM : No such effect.
CoM : No such effect.

6. AI asking for additional stuff in exchange for accepting a proposal
MoO : They will always ask for a tech is one is available. Money only if not available amount (random(8)+random(8))*Current turn.
MoM : Depends on how much you fail the roll for the offer, greater failure will prefer a spell, lesser failure prefers gold. Amount of gold is identical to MoO's.
CoM : Not changed.

7. Oath Breaker penalty
MoO : -5 Core relation, -36 Current relation for all treaty types, including peace.
MoM : +20 Core relation for breaking Alliance. +20 to Hidden relation for alliance, +10 for pact. -random(20) to current relation for breaking Alliance or WP. -5 Hidden relation to everyone not involved when breaking anything and you are at fault. When the AI breaks the treaty for your unit being too near, it is run for both players, effectively doubling the penalty on relations between the two involved parties. "breaking" peace is not implemented, nor is the duration of "peace" known to the player.
CoM : Fixed the bug of gaining points instead of losing. No -5 hidden relations to not involved parties. Rest unchanged.

8. Non-agression pact (Wizard's Pact)
MoO : Requires a +15 current relation. Requires passing a roll based on Core+Current Rel+Temp Rel+rnd(100) when offered from player side. No info on AI offers.
MoM : Requires a +15 current relation. Requires passing a roll based on Current+Hidden relations+Relative military strength on AI wizard's continent+random value+Treaty temporary variable.
CoM : Requires +15 but the formula for the roll is changed significantly. As original included a component naturally gravitating towards +100 (the Treaty variable), the roll was almost always successful if the +15 relations was available. Military strength is checked globally instead of only on the continent, and unit combat value is used instead of unit production cost.

9. Alliance
All three : Same as Pact but requires +50 visible relation and a higher roll.

MoO : You are allowed to enter allied territory. Computer players will ask you to declare war on their enemies. If you ask them for the same, it'll always succeed but they might ask for stuff.
MoM : You are penalized for entering allied territory, just like the Wizard's Pact. AI is unable to ask the player to declare war. If you ask them for the same, it'll always succeed but they might ask for stuff.
CoM : You are allowed to enter allied territory. AI is unable to ask the player to declare war. If you ask them for the same, it'll always succeed but they might ask for stuff.

10. Peace Treaty

MoO : Peace variable gets points based on damage done to the opponent's forces, gravitating towards 0.
MoM : Peace variable gets points based on diplomatic events, including damage done to the opponent's forces, gravitating towards +100 and having one quarter of the event's strength in effect, but one half if the player is involved.
CoM : See above when explaining the peace variable.

11. "Inertia factor"
MoO : Long explanation about how the AI (and game rules) cause the game to still attack the player under the effect of peace or non-aggression.
MoM : No idea about the original, but in insecticide the AI actually does not attack during a treaty, although it tries to, it can't proceed with it.
CoM : AFAIK there are no remaining ways for the AI to attack without formally breaking the treaty, including peace. Units already sent out before peace, and engineers building roads might enter player cities, though.

12. Threatening
MoO : You can get a tech considered outdated by the computer, money, or an enforced peace treaty. In the case of the last, there is a +40 relation bonus. Roll based on Total Power rating. -50 to all temporary modifiers. Relation penalty of -30+personality rating.
MoM : You can get a spell (anything possible to offer, no limitations), or gold. If any of these is offered, the AI will avoid attacking you which is what MoM's peace treaty does. There is no relation bonus in any case but there always is a penalty of random(15) points. Roll based on relative military strength on the wizard's continent. Treaty temporary modifier set to -120.
CoM : No change to results but if spell was chosen and it's unavailable, it will try gold instead of nothing. Roll is based on global astrologer military strength.

13. Personality effect
MoO : It seems to affect the core relations mainly, not sure. Values range from -50 to +40.
MoM : It is directly added to most types of diplomacy rolls. Values range form +0 to +50.
CoM : No change, but values range from +0 to +80.

14. AI to AI diplomacy
MoO : Higher difficulty is less active
MoM : Higher difficulty is more active but the code is completely full of bugs and does the weirdest things you can imagine so this is the least of your concerns.
CoM : Higher difficulty is more active, fixed bugs as much as I could : No more trading during wars, trading does not increases the lower the relation is instead of higher, no alliance first, no new pact if already allied which would downgrade it instead, peace actually uses the peace variable etc.

15. AI to player diplomacy
MoO : same as AI to AI according to the strategy guide
MoM : the two are entirely different and AI to player (almost) never triggers due to bugs, like impossible to fulfill conditions.
CoM : had to come up with whatever felt right since the whole thing was not functional at all but it is pretty much identical to MoO's except for some formulas and constants (as MoM uses different variables for a lot of things). In fact, MoM code used MoO's values for checks in many cases which explains why the values were so impractical, as MoM variables are different, for example the temporary modifiers are usually at 100, while MoO's are 0. This alone can totally break a check for, say, a sum of +50 or above, one which worked in MoO would cause the offer to have a near 100% chance in MoM under normal playing conditions.

Also, in MoM and CoM, the AI is unable to ask the player to declare war, regardless of alliances. In MoO they can. In CoM they can only ask you to break your alliance with their enemies which works identically in both games. There is no LBX text or event or coding for it, so it most likely wasn't intended to be in the game.

16. AI offering stuff for treaties
MoO : The player gets the offered money even if they accepted the deal without the AI having to offer it.
MoM : Again, the event never triggered, but it did actually give the player the gold or spell if it wasn't needed.
CoM : I made the player only receive the offered gold or spell if it was, in fact, offered by the AI. I would have never guessed this wasn't a bug, but even if it wasn't, I rather have it this way, than gold or spells appearing out of nowhere without an explanation.

To be honest it feels like they try to talk their way out of a bug in the strategy guide, it just does not make sense to receive stuff that wasn't offered.

17. AI offering a reward to you attacking their enemies
MoO : Techs can be offered. Condition is total damage >=30.
MoM : Not implemented at all but text is in LBX for offering gold only. Spells don't seem to be meant for offering.
CoM : Implemented, see thread for details. An Alliance with the wizard is required.

18 : AI threats towards players
MoO : Two threats = war. Positive events can negate the effect of previous treats.
MoM : -75 relation : instant war without a threat. Threat will be displayed, even if the roll for adding to the threats counter isn't made. Two counters = they break your treaty. If not having one, there is a roll for war based on personality and the strength of the action triggering the warning, but relations are not considered in this roll. Positive events could reduce this counter like in MoO but MoM diplomacy has none of those, the only two positive actions are not using an event code and cannot trigger this.
CoM : Unchanged, but warning counters can also get cancelled if there is no event that turn instead of requiring a positive. There is also one type of positive event implemented, the "I'm pleased with you attacking my enemy" type, which can come with gold if allied, and without otherwise.

19. War Declaration
MoO :
-If relation is -90 or lower
-after two threats
-reaction to player's threats
-conquering their colony
-military superiority
-Their ally asked them to (based on relations with ally) join their war
-Other players asked them to join their wars
-Assassination event
-Erratic personality at a 2% chance (regardless of difficulty)

MoM :
-If a relation+local continent military based roll fails, checked at a 1/20 chance only
-If the above fails, checked at an additional 1/20 chance only if militarist or expansionist and not lawful
-at a chance after two threats
-immediately instead of threats if relation is -75 or lower
-conquering a city
-Their ally is at war with the player then they declare on anyone (suspected bug, should be "their ally asked them to join").
-If the player has fewer ongoing wars than difficulty and then on anyone having a -30 or lower relation at a chance (suspected bug, probably should be on player)
-Chaotic personality at a 1/300 chance multiplied by difficulty on anyone
-Every turn at 10% chance if Spell of Mastery is being cast

CoM
Same as above except when
-Their ally asked them to (based on relations with ally) join their war, fixed suspected bug above
-If the player has fewer ongoing wars than difficulty then on the player if -30 or less relation, fixed other suspected bug
-if militarist or expansionist, not peaceful and not lawful then if having military superiority (adjusted by usual relation modifiers), checked every turn
-at a 1/20 chance if failing a roll of "total army strength too close to own" weighted by usual modifiers and difficulty if it's the player, replacing he generic continent military power based one.

Some of these can get replaced by the AI first breaking the active treaty instead, others always cause a war.

20. Sources of diplomatic negative events :
Moo
-High council votes
-Spying
-Having too many planets
-Having too many ships near their territory
-Attacking other players
-Eliminating a player
-Using a biological weapon

MoM
-Casting a global enchantment
-Casting a town curse
-Having too many towns
-Having a larger army than theirs (displays "stop amassing troops near the border" like MoO but does not check for troop location at all.
-Eliminating or banishing a player
-Casting Spell of Mastery
-Unimplemented : Using a summon spell
-Begin too close to their towns during a Pact or Alliance, or at a very low chance during neutral relations.

CoM
-Casting a global enchantments (but only those that directly harm them somehow, casting Crusade for example has no penalty)
-Casting a town curse
-Having too many towns (limit increased by 1/land size)
-Eliminating or banishing an player who is allied with or has a pact with the wizard receiving the action
-Casting Spell of Mastery
-Begin too close to their towns during a Pact, or at a very low chance during neutral relations.


Overall, I'm quite sure MoM is intended to use MoO's diplomacy system, but it was a very poorly done implementation where values were simply copied over without regards to having different modifiers and variables.
Although not all, but most CoM changes actually seem to bring the game closer to that goal, even though I wasn't aware of this information earlier.
Reply

Well done! I'm glad to see you gain a greater understanding of the process. I look forward to a fixed diplomacy system! The game MoM was always meant to be.
Reply

Hats off, Seravy, that seems to be some fantastic work, by all standards. It probably needs some testing from players (as always), but your conception seems well rounded and clear. If you'd ever want to add this to Insecticide (or to whatever you name it), you have my full aproval. I am impressed.

Just to complete the picture, many of the bugs are in MoO already. The oathbreaker was a famous issue, Sakkras attacking your planet and a few turns later, accusing you of being filthy.
Reply

Yes, I do plan to add it to Insecticide, the name most likely will be Raid 1.50.

I want to spend some time playing the game and making sure everything (not just diplomacy) works perfectly, as well as giving people the time to do the same, before I separate the changes that would go into the future Insecticide update from those that belong to the Caster mod only. Considering there were several dozens of bugs fixed in general and about twice as much in just diplomacy, I rather test first before I copy over changes to another project.

I've pretty much managed to fix every bug I was aware of, except those related to the player moving units on the overland map. That part of the code looks ridiculously complicated so I leave that for a future release, if I even manage to fix anything there.
Reply



Forum Jump: