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

senxiu

Private
44 Badges
Oct 30, 2022
15
3
  • Stellaris: Lithoids
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Europa Universalis IV: Rule Britannia
  • Stellaris: Distant Stars
  • Europa Universalis IV: Dharma
  • Stellaris: Megacorp
  • Europa Universalis IV: Golden Century
  • Hearts of Iron IV: Expansion Pass
  • Prison Architect
  • Stellaris: Ancient Relics
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: La Resistance
  • Stellaris: Federations
  • Crusader Kings III
  • Battle for Bosporus
  • Europa Universalis 4: Emperor
  • Stellaris: Necroids
  • Stellaris: Nemesis
  • Hearts of Iron IV: By Blood Alone
  • Hearts of Iron IV: No Step Back
  • Hearts of Iron 4: Arms Against Tyranny
  • Stellaris
  • 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
  • Europa Universalis IV: Res Publica
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Common Sense
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Mare Nostrum
  • Crusader Kings II
  • Hearts of Iron IV: Cadet
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV: Third Rome
  • Hearts of Iron IV: Death or Dishonor
  • Stellaris: Synthetic Dawn
  • Europa Universalis IV: Cradle of Civilization
Hi community,

I'm trying to write a decision to create a character and make him the ruler.
I have tried something like:


Code:
when_taken = {
    create_character = {
        first_name = ...
        ...
        save_scope_as = ruler_target
    }
    
    scope:ruler_target = {
        set_character_as_ruler = yes
    }
}


but it doesn't work.

I've checked the game resource it seems that set_character_as_ruler is only used for displaying tooltip ? (Not sure)


Could you please help me with this ? Thanks.
 
The effect seems to be used all over and presumably works as expected. Maybe post your full script?

The other option appears to be that you can set the character as a ruler by using ruler = yes in the create_character effect itself.
 
The effect seems to be used all over and presumably works as expected. Maybe post your full script?

The other option appears to be that you can set the character as a ruler by using ruler = yes in the create_character effect itself.
Hi thanks for your reply

I'm trying to give the country a female ruler.
(it still doesn't work without the `female = yes`)

Code:
sx_create_female_ruler_decision = {
    is_shown = {
        is_player = yes
        NOT = {country_has_primary_culture = cu:manchu}
    }

    possible = {
        is_player = yes
        NOT = {country_has_primary_culture = cu:manchu}
    }

    ai_chance = {
        base = 0
    }

    when_taken = {
        create_character = {
            first_name = Meichuo
            last_name = Zhu
            birth_date = 1728.12.02
            culture = cu:han_chinese
            ruler = yes
            interest_group = ig_landowners
            female = yes
            ideology = ideology_traditionalist
            religion = rel:confucian
            traits = {
                cautious
            }
            save_scope_as = ruler_target
        }
        scope:ruler_target = {
            set_character_as_ruler = yes
        }
    }
}
 
Hm, and nothing in the error.log that seems relevant?
 
Hi thanks for your reply

I'm trying to give the country a female ruler.
(it still doesn't work without the `female = yes`)

Code:
sx_create_female_ruler_decision = {
    is_shown = {
        is_player = yes
        NOT = {country_has_primary_culture = cu:manchu}
    }

    possible = {
        is_player = yes
        NOT = {country_has_primary_culture = cu:manchu}
    }

    ai_chance = {
        base = 0
    }

    when_taken = {
        create_character = {
            first_name = Meichuo
            last_name = Zhu
            birth_date = 1728.12.02
            culture = cu:han_chinese
            ruler = yes
            interest_group = ig_landowners
            female = yes
            ideology = ideology_traditionalist
            religion = rel:confucian
            traits = {
                cautious
            }
            save_scope_as = ruler_target
        }
        scope:ruler_target = {
            set_character_as_ruler = yes
        }
    }
}
Hm, perhaps add (noble = yes) under ruler = yes?
 
Ah yes, that'd definitely affect things. Glad to hear it's working now.
 
  • 1Like
Reactions: