Question on "Dragon Swallowed the Sun" achievement code

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

eastcoastceojam

Lt. General
45 Badges
Mar 21, 2018
1.692
1.773
  • Crusader Kings II
  • Europa Universalis IV: Mare Nostrum
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Republic
  • Crusader Kings II: The Old Gods
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: Together for Victory
  • Crusader Kings II: Monks and Mystics
  • Europa Universalis IV: Mandate of Heaven
  • Hearts of Iron IV: Death or Dishonor
  • Europa Universalis IV: Cradle of Civilization
  • Hearts of Iron IV: Expansion Pass
  • Europa Universalis IV: Rule Britannia
  • Europa Universalis IV: Dharma
  • Crusader Kings II: Holy Fury
  • Europa Universalis IV: Golden Century
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: La Resistance
  • Crusader Kings III
  • Battle for Bosporus
  • Europa Universalis 4: Emperor
  • Victoria 3 Sign Up
  • Hearts of Iron IV: By Blood Alone
  • Hearts of Iron IV: No Step Back
  • Crusader Kings II: Reapers Due
  • Crusader Kings II: Legacy of Rome
  • Europa Universalis IV
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Conclave
  • Hearts of Iron IV: Cadet
  • Europa Universalis IV: Rights of Man
  • Crusader Kings II: Charlemagne
  • Europa Universalis IV: Third Rome
  • Crusader Kings II: Jade Dragon
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: Sunset Invasion
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Res Publica
I'm finally getting around to knocking out the Manchukuo achievements, and I have a question on the 'Dragon Swallowed the Sun" achievement.

You need to annex Japan in order to get the achievement, but I don't see anything in the below code that checks for ownership of all of Japan's core states.


Code:
    #ROOT is winner #FROM gets annexed - For civil wars on_civil_war_end is also fired
    on_annex = {
        effect = {

            if = {
                limit = {
                    tag = MAN
                    is_in_faction = no
                    FROM = { tag = JAP }
                }
                set_country_flag = achievement_the_dragon_swallowed_the_sun       
            }
    
        }
    }


If I end up sharing a significant amount of warscore against Japan with another nation, would it be safer to first puppet Japan, than feed them as much land as possible? Then no one else could puppet them, and the worst they can do is grab some states in the peace conference.

To get the achievement, I could then lower my puppet's compliance over time, and peacefully annex them. Anyone see a reason why that wouldn't give the achievement?
 

eastcoastceojam

Lt. General
45 Badges
Mar 21, 2018
1.692
1.773
  • Crusader Kings II
  • Europa Universalis IV: Mare Nostrum
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Republic
  • Crusader Kings II: The Old Gods
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: Together for Victory
  • Crusader Kings II: Monks and Mystics
  • Europa Universalis IV: Mandate of Heaven
  • Hearts of Iron IV: Death or Dishonor
  • Europa Universalis IV: Cradle of Civilization
  • Hearts of Iron IV: Expansion Pass
  • Europa Universalis IV: Rule Britannia
  • Europa Universalis IV: Dharma
  • Crusader Kings II: Holy Fury
  • Europa Universalis IV: Golden Century
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: La Resistance
  • Crusader Kings III
  • Battle for Bosporus
  • Europa Universalis 4: Emperor
  • Victoria 3 Sign Up
  • Hearts of Iron IV: By Blood Alone
  • Hearts of Iron IV: No Step Back
  • Crusader Kings II: Reapers Due
  • Crusader Kings II: Legacy of Rome
  • Europa Universalis IV
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Conclave
  • Hearts of Iron IV: Cadet
  • Europa Universalis IV: Rights of Man
  • Crusader Kings II: Charlemagne
  • Europa Universalis IV: Third Rome
  • Crusader Kings II: Jade Dragon
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: Sunset Invasion
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Res Publica
  • 1Like
Reactions:

eastcoastceojam

Lt. General
45 Badges
Mar 21, 2018
1.692
1.773
  • Crusader Kings II
  • Europa Universalis IV: Mare Nostrum
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Republic
  • Crusader Kings II: The Old Gods
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: Together for Victory
  • Crusader Kings II: Monks and Mystics
  • Europa Universalis IV: Mandate of Heaven
  • Hearts of Iron IV: Death or Dishonor
  • Europa Universalis IV: Cradle of Civilization
  • Hearts of Iron IV: Expansion Pass
  • Europa Universalis IV: Rule Britannia
  • Europa Universalis IV: Dharma
  • Crusader Kings II: Holy Fury
  • Europa Universalis IV: Golden Century
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: La Resistance
  • Crusader Kings III
  • Battle for Bosporus
  • Europa Universalis 4: Emperor
  • Victoria 3 Sign Up
  • Hearts of Iron IV: By Blood Alone
  • Hearts of Iron IV: No Step Back
  • Crusader Kings II: Reapers Due
  • Crusader Kings II: Legacy of Rome
  • Europa Universalis IV
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Conclave
  • Hearts of Iron IV: Cadet
  • Europa Universalis IV: Rights of Man
  • Crusader Kings II: Charlemagne
  • Europa Universalis IV: Third Rome
  • Crusader Kings II: Jade Dragon
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: Sunset Invasion
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Res Publica
Do the puppet Japan focus. Savescum till you get it. Then diploannex.


How likely is it that Japan will agree to become your puppet with the "Dominate Japan" focus?

I think the below are the relevant events. I'm not sure how to interpret the below weights, but it would seem the chances of them accepting are pretty low. That would mean a lot of save-scumming if it only has a 1% of success.


Code:
shared_focus = {
    id = CHI_dominate_japan
    prerequisite = { focus = CHI_imperial_legacy }

   available = {
        NOT = { has_war_with = JAP }
        NOT = { is_subject_of = JAP }
    }

    bypass = {
        JAP = { is_subject_of = ROOT }
    }

    cancel_if_invalid = yes
    continue_if_invalid = no
    available_if_capitulated = no

    completion_reward = {
        JAP = { country_event = { id = wtt_china.10 } }
    }
}


Code:
# China demands ROOT be puppeted
country_event = {
    id = wtt_china.10
    
    #Accept puppet
    option = {
        name = wtt_china.10.a
        ai_chance = { base = 10 }
        FROM = {
            puppet = ROOT
            country_event = { id = wtt_china.11 }
        }
    }
    option = {

        name = wtt_china.10.b
        ai_chance = {
            base = 10
            modifier = {
                tag = JAP
                add = 80 #TODO_WTT_AI script modifiers for how likely people are to accept puppeting
            }
            modifier = {
                tag = TIB
                add = 30 #TODO_WTT_AI script modifiers for how likely people are to accept puppeting
            }
            modifier = {
                tag = MON
                add = 30 #TODO_WTT_AI script modifiers for how likely people are to accept puppeting
            }
        }
        FROM = {
            create_wargoal = {
                type = puppet_wargoal_focus
                target = ROOT
            }
            country_event = { id = wtt_china.12 }
        }
    }
}
 
  • 1Like
Reactions:

desphorin

Captain
7 Badges
Nov 7, 2019
300
490
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Together for Victory
  • Hearts of Iron IV: Death or Dishonor
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: La Resistance
  • Battle for Bosporus
How likely is it that Japan will agree to become your puppet with the "Dominate Japan" focus?

I think the below are the relevant events. I'm not sure how to interpret the below weights, but it would seem the chances of them accepting are pretty low. That would mean a lot of save-scumming if it only has a 1% of success.


Code:
shared_focus = {
    id = CHI_dominate_japan
    prerequisite = { focus = CHI_imperial_legacy }

   available = {
        NOT = { has_war_with = JAP }
        NOT = { is_subject_of = JAP }
    }

    bypass = {
        JAP = { is_subject_of = ROOT }
    }

    cancel_if_invalid = yes
    continue_if_invalid = no
    available_if_capitulated = no

    completion_reward = {
        JAP = { country_event = { id = wtt_china.10 } }
    }
}


Code:
# China demands ROOT be puppeted
country_event = {
    id = wtt_china.10
   
    #Accept puppet
    option = {
        name = wtt_china.10.a
        ai_chance = { base = 10 }
        FROM = {
            puppet = ROOT
            country_event = { id = wtt_china.11 }
        }
    }
    option = {

        name = wtt_china.10.b
        ai_chance = {
            base = 10
            modifier = {
                tag = JAP
                add = 80 #TODO_WTT_AI script modifiers for how likely people are to accept puppeting
            }
            modifier = {
                tag = TIB
                add = 30 #TODO_WTT_AI script modifiers for how likely people are to accept puppeting
            }
            modifier = {
                tag = MON
                add = 30 #TODO_WTT_AI script modifiers for how likely people are to accept puppeting
            }
        }
        FROM = {
            create_wargoal = {
                type = puppet_wargoal_focus
                target = ROOT
            }
            country_event = { id = wtt_china.12 }
        }
    }
}

If i understand correctly accept is 10, where reject is 10 + which tag you are targeting, in this case is 80. So the odds of accepting is 10 / (10+10+80) = 10%, which is alright i guess.
 
  • 2
Reactions: