
Disaster
The Decline of Majapahit
Our Majapahit Flavor Rank is not as prosperous as it once was. Beset by internal dynastic conflicts, this period of weakness has long been anticipated by our rivals, who eagerly await any chance when to encroach on our borders. Now, with the rise of Islam in Indonesia, we could easily fall from relevance and into the dark oubliette of forgotten empires...
- 5%
- Set variable
- Name: Sunni Dominance
- Value: 0
- Set variable
- Name: original_majapahit_religion
- Value: religion
- Set variable
- Name: decline_of_majapahit_timer
- Value: yes
- Years: 30
- The Event '
The Decline of Country' happens
Exact script
- Set variable
- Not shown in the game's tooltip
- Set variable
- Name: sunni_pop_count
- Value:
religion_population_in_country(religion:sunni)
- Set variable
- Name: hindu_pop_count
- Value:
religion_population_in_country(religion:hindu)
- Set variable
- Name: maj_sunni_percentage
- Value
- Value: var:sunni_pop_count
- Divide
- Value: var:sunni_pop_count
- Add: var:hindu_pop_count
- Multiply: 0.01
- Set variable
- Name: maj_stability_impact
- Value
- Value: stability
- Multiply: -0.01
- Multiply: 0.01
- Set variable
- Name: maj_legitimacy_impact
- Value
- Value: 100
- Subtract: legitimacy
- Multiply: 0
- Set variable
- Name: demak_progress_growth
- Value
- Value: 0
- Add: var:maj_sunni_percentage
- Add: var:maj_stability_impact
- Add: var:maj_legitimacy_impact
- Change variable
- Name: Sunni Dominance
- Add: var:demak_progress_growth
- If
- Has Variable: Sunni Dominance
- Sunni Dominance ≥ 1
Then- Trigger event silently
- Set variable
- Name: Sunni Dominance
- Value: 1
Else if- Has Variable: Sunni Dominance
- Sunni Dominance < 0
- Trigger event silentlyId:
Rise of Mataram - One of these, at random
- 16.7%Trigger event silently
- 83.3%Nothing happens
- One of these, at random
- 8.3%Trigger event silently
- 91.7%Nothing happens
- Trigger event silently
- Trigger event silentlyId:
An Offer of Aid
- Set variable
- One of these, at random
- 87.5%No Event occurs
- 12.5%An Event relevant to this Disaster may occur
- 87.5%
- Not shown in the game's tooltipOne of these, at random
- 87.5%Nothing happens
- 3.1%Trigger event silently
- 3.1%Trigger event silently
- 3.1%Trigger event silentlyId:
Local Discontent - 3.1%Trigger event silently
Exact script
- At least one of↗
- Is
Mataram - All of
- At least 10950 days have passed since the start of The Decline of Majapahit Disaster. Decline Of Majapahit Timer days left.Does NOT have Variable: decline_of_majapahit_timer
- Trigger if
- LimitHas Variable: Sunni Dominance
- Sunni Dominance is less than 50.0%Sunni Dominance ≤ 0.5
Exact conditions
- The Event '
A New Dawn for Country' happens - set_ended_disaster_flag_effect: Type:
decline_of_majapahit↗IfDoes NOT have Variable:had_decline_of_majapahit_disasterThenSet variable- Name:
had_decline_of_majapahit_disaster - Value: 1
OtherwiseChange variable- Name:
had_decline_of_majapahit_disaster - Add: 1
- Name:
- Remove variable: Sunni Dominance
- Remove variable: demak_progress_growth
- Remove variable: sunni_pop_count
- Remove variable: hindu_pop_count
- Remove variable: maj_sunni_percentage
- Remove variable: maj_stability_impact
- Remove variable: maj_legitimacy_impact
- Remove variable: original_majapahit_religion
- Remove variable: decline_of_majapahit_timer
- IfHas Muslim AidThenLoses the effect of Muslim Aid
- IfThenLoses the effect of Adipati Conversion Ban
Exact script
- Is
Requires 4
Countries
MajapahitCan start
Static Modifiers
- Adipati Conversion BanWhen it ends
- Muslim AidWhen it ends, Each month
- Peranakan Trading Rights RestrictionWhen it ends, Each month
Triggers 12
Events
Spread of Islam in MajapahitEach month
The Decline of CountryWhen it starts
A New Dawn for CountryWhen it ends
Rise of MataramEach month
Rise of Target CountryEach month
Disloyalty to CountryEach month
Eclipse of CountryEach month
Local DiscontentEach month
Pretender Challenges the ThroneEach month
Target Religion Adjective Flight to Target ProvinceEach month
Removes 3
- Adipati Conversion BanWhen it ends
- Muslim AidWhen it ends
- Peranakan Trading Rights RestrictionWhen it ends
Mentions 1
IslamDesc
Required by 6
Actions
Ban Conversion of AdipatisSelect trigger
Control the BhresSelect trigger
Convert to IslamSelect trigger
Restrict Peranakan Trading RightsSelect trigger
Rescind the Ban on Conversion of AdipatisSelect trigger
Restore Peranakan Trading RightsSelect trigger
Members 11
Events
The Decline of CountryEvent namespace
A New Dawn for CountryEvent namespace
Rise of MataramEvent namespace
Rise of Target CountryEvent namespace
Disloyalty to CountryEvent namespace
Eclipse of CountryEvent namespace
Local DiscontentEvent namespace
Pretender Challenges the ThroneEvent namespace
Target Religion Adjective Flight to Target ProvinceEvent namespace
Adipati of Target Location ConvertsEvent namespace
Mentioned in 1
Rise of MataramDesc
Scripting 29
Requires 1
- Sunni DominanceEach month
Grants 9
Variables
- decline_of_majapahit_timerWhen it starts
- Sunni DominanceEach month, When it starts
- demak_progress_growthEach month
- hindu_pop_countEach month
- maj_legitimacy_impactEach month
- maj_stability_impactEach month
- maj_sunni_percentageEach month
- original_majapahit_religionWhen it starts
- sunni_pop_countEach month
Removes 9
Variables
- decline_of_majapahit_timerWhen it ends
- Sunni DominanceWhen it ends
- demak_progress_growthWhen it ends
- hindu_pop_countWhen it ends
- maj_legitimacy_impactWhen it ends
- maj_stability_impactWhen it ends
- maj_sunni_percentageWhen it ends
- original_majapahit_religionWhen it ends
- sunni_pop_countWhen it ends
Uses 3
Scripted Effects
- set_ended_disaster_flag_effecttype = decline_of_majapahitWhen it ends
Scripted Triggers
- decline_of_majapahit_triggerCan end
- had_disaster_triggertype = death_of_hayan_wuruk (+1)Can start
References 7
Script Values
- monthly_spawn_chance_very_highMonthly spawn chance
Variables
- demak_progress_growthEach month
- hindu_pop_countEach month
- maj_legitimacy_impactEach month
- maj_stability_impactEach month
- maj_sunni_percentageEach month
- sunni_pop_countEach month
image = "gfx/interface/illustrations/disaster/death_of_hayan_wuruk.dds"
modifier = {
}


















