#Make kingdom 1 and kingdom 2 start the game in a defensive alliance.
#Note that this code only works properly at the very start of the game.
(set_relation, "fac_kingdom_1", "fac_kingdom_2", 50),
(store_sub, ":treaty_slot", fac_kingdom_2, kingdoms_begin),
(val_add, ":treaty_slot", slot_faction_truce_days_with_factions_begin),
(faction_set_slot, "fac_kingdom_1", ":treaty_slot", dplmc_treaty_defense_days_initial),#Because stronger treaties degrade to weaker ones over time, instead of storing treaty type separately the number of days remaining in the treaty is used to determine what kind of treaty it is.
(val_sub, ":treaty_slot", "fac_kingdom_2"),
(val_add, ":treaty_slot", "fac_kingdom_1"),
(faction_set_slot, "fac_kingdom_2", ":treaty_slot", dplmc_treaty_defense_days_initial),