• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

ulmont

Field Marshal
103 Badges
May 9, 2001
2.788
1
Visit site
  • Europa Universalis: Rome Collectors Edition
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Europa Universalis: Rome
  • Victoria 2
  • Victoria 2: A House Divided
  • Rome: Vae Victis
  • 200k Club
  • 500k Club
  • Cities: Skylines
  • Crusader Kings II: Holy Knight (pre-order)
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Pre-order
  • Europa Universalis III Complete
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Mare Nostrum
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris: Nemesis
  • Europa Universalis III
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Darkest Hour
  • Deus Vult
  • Diplomacy
  • Hearts of Iron II: Armageddon
  • Europa Universalis III: Chronicles
  • Divine Wind
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Call to arms event
  • Hearts of Iron III
  • Heir to the Throne
  • Europa Universalis III Complete
So, I'm about to embark on a mod to make muslims and pagans "fully playable" through a rather ugly hack.

Namely, forcing all muslim and pagan characters to orthodox and using user defined traits A and B as muslim and pagan respectively.

Obviously, this will require some rework of the events. One question I have is how best to simulate the enemy_same_religion check.

Would something like the following work (to implement the not enemy_same_religion check, actually, but the principle applies):

Code:
        # check to be sure this is a real Christian character
        # i.e., catholic or "orthodox" missing the muslim and pagan traits
        condition = { 
                type = or
	        condition = { type = religion value = catholic }
                condition = {
                     type = and
                     condition = { type = religion value = orthodox }
                     condition = { type = not value = { type = trait value = user_defined_a } }
                     condition = { type = not value = { type = trait value = user_defined_b } }
                }
        }

        # now see if his enemy is a muslim or pagan based on the user trait
	condition = { type = any_enemy
                condition = {
                type = or
                     condition = { type = trait value = user_defined_a }
                     condition = { type = trait value = user_defined_b } }
                }
	}

Obviously, this is a lot more cumbersome, but it is what it is.
 
Last edited: