• 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.

Ephafn

Custom User Title
48 Badges
Sep 10, 2009
335
220
  • Crusader Kings II: Charlemagne
  • Magicka 2
  • Europa Universalis IV: Pre-order
  • Victoria 2: A House Divided
  • Sengoku
  • Europa Universalis IV: Res Publica
  • March of the Eagles
  • Magicka
  • Leviathan: Warships
  • Knights of Pen and Paper +1 Edition
  • Heir to the Throne
  • Hearts of Iron III
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Divine Wind
  • Europa Universalis III Complete
  • Crusader Kings II
  • Deus Vult
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Europa Universalis IV: Art of War
  • Crusader Kings II: Conclave
  • Europa Universalis IV: El Dorado
  • Stellaris
  • Stellaris: Leviathans Story Pack
  • Stellaris - Path to Destruction bundle
  • Stellaris: Synthetic Dawn
  • Age of Wonders III
  • Stellaris: Apocalypse
  • Prison Architect
  • Age of Wonders: Planetfall
  • Age of Wonders: Planetfall - Revelations
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Pillars of Eternity
  • Crusader Kings II: Way of Life
  • Crusader Kings II: Holy Knight (pre-order)
  • 500k Club
  • Victoria 2
  • Teleglitch: Die More Edition
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Europa Universalis IV
I am trying to create an event that would give a player a faction-appropriate colonizer unit. However, since there are 6 different colonizers, I want to use if/then statements to select the correct one based on the player faction.

However, even after looking at all possible conditions, I haven't found any that would fit. There is one (race description) for which I can select a faction description, but I cannot select a player faction to compare it with. And comparing whether the Amazon faction is indeed the Amazon faction doesn't bring me any closer to checking if the player faction is the Amazon faction.

Does anyone has any clue whether this is even possible?
 
Finding the player faction is something that the Final Mission has to do. Final_Campaing.rpk, Category Quests and Events, "Setting Human Player Slot - Trigger" (line 4).
It also has the issues of finding the faction, to give you the propery intro text from Carminia.
"For All Lord Players execute (Actions)" : an If/then block to find the players.

The "Load Unit data" things also check of the faction, but using Commander Identifiers. Maybe you could check wich Species "tag" the Commander has? That should give you reliable information about his Faction Species.
 
Thanks for the suggestion. From my understanding, the Final_Campaign.rpk scripts are based on specific commanders, not based on the faction directly.

But it also showed me how to check for the human player, which was also something I had missed. Looking more closely at Boolean comparisons, I saw the "Player - Has Property", which looks like it has potential for my need. I'll invistigate futher the next time I have time to do so.

30 minutes later edit: Got it to work with a single if-then statement, using the Boolean comparison and the faction leader unit property. Sadly, only the first if-then statement did anything, the second one was ignored. But that's easily fixable by switching to if-then-else statements.
 
Last edited: