-
November 23, 2012, 12:32 PM
#1
Scripted Religion Change
Hi everyone.
In trying to make my MTW2 game more dynamic I played around with the religion change script. This works. Jerusalem is the faction I am playing at the moment so it is set to "FactionIsLocal". All the other nations are set the same way as England: "not FactionIsLocal" It is a bit rustic but it works 100% so far for me. Regarding the religious building in the edb file I just made every single religious building available to all factions so that if your faction changes religion you can change the "church" as well.
What I also did was rename the religions as political ideologies in the religion text file:
{catholic} Socialist
{heretic} Anarchist
{islam} Theocratic
{orthodox} Communist
{pagan} Democratic
{buddism} Nationalist
{protestant} Feudal
{hindu} Facist
{shinto} Republican
{shia} Monarchist
I was getting tired of religion. I also changed the symbols in the pip files to what I thought represents each ideology. I also added 4 other religions to give more depth.
Try it, and I hope it works.
For Campaign Script:
declare_counter conversion
declare_counter conversion2
declare_counter conversion3
declare_counter conversion4
declare_counter conversion5
declare_counter conversion6
declare_counter conversion7
declare_counter conversion8
declare_counter conversion9
;;;;;;;;;;;;;;;;;;;;;;;;;Conversion jerusalem;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
monitor_event BecomesFactionLeader FactionIsLocal
and FactionType jerusalem
and FactionLeaderAttribute Command < 5
generate_random_counter JerusalemRandomNumber 1 9
if I_EventCounter JerusalemRandomNumber = 1
set_event_counter conversion_accepted == 1
set_religion jerusalem orthodox
change_population_religion jerusalem orthodox 75 buddism
historic_event conversionjerusalem_accepted
end_if
if I_EventCounter JerusalemRandomNumber = 4
set_event_counter conversion2_accepted == 1
set_religion jerusalem catholic
change_population_religion jerusalem catholic 75 buddism
historic_event conversionjerusalem2_accepted
end_if
if I_EventCounter JerusalemRandomNumber = 7
set_event_counter conversion7_accepted == 1
set_religion jerusalem buddism
change_population_religion jerusalem buddism 75 buddism
historic_event conversionjerusalem7_accepted
end_if
if I_EventCounter JerusalemRandomNumber = 8
set_event_counter conversion3_accepted == 1
set_religion jerusalem islam
change_population_religion jerusalem islam 75 buddism
historic_event conversionjerusalem3_accepted
end_if
if I_EventCounter JerusalemRandomNumber = 3
set_event_counter conversion4_accepted == 1
set_religion jerusalem hindu
change_population_religion jerusalem hindu 75 buddism
historic_event conversionjerusalem4_accepted
end_if
if I_EventCounter JerusalemRandomNumber = 2
set_event_counter conversion5_accepted == 1
set_religion jerusalem shinto
change_population_religion jerusalem shinto 75 buddism
historic_event conversionjerusalem5_accepted
end_if
if I_EventCounter JerusalemRandomNumber = 9
set_event_counter conversion6_accepted == 1
set_religion jerusalem pagan
change_population_religion jerusalem pagan 75 buddism
historic_event conversionjerusalem6_accepted
end_if
if I_EventCounter JerusalemRandomNumber = 6
set_event_counter conversion8_accepted == 1
set_religion jerusalem protestant
change_population_religion jerusalem protestant 75 buddism
historic_event conversionjerusalem8_accepted
end_if
if I_EventCounter JerusalemRandomNumber = 5
set_event_counter conversion9_accepted == 1
set_religion jerusalem shia
change_population_religion jerusalem shia 75 buddism
historic_event conversionjerusalem9_accepted
end_if
end_monitor
;;;;;;;;;;;;;;;;;;;;;;;;;Conversion england;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
monitor_event BecomesFactionLeader not FactionIsLocal
and FactionType england
and FactionLeaderAttribute Command < 5
generate_random_counter RandomNumber 1 9
if I_EventCounter RandomNumber = 1
set_event_counter conversion_accepted == 1
set_religion england orthodox
change_population_religion england orthodox 75 protestant
historic_event conversioneng_accepted
end_if
if I_EventCounter RandomNumber = 4
set_event_counter conversion2_accepted == 1
set_religion england catholic
change_population_religion england catholic 75 protestant
historic_event conversioneng2_accepted
end_if
if I_EventCounter RandomNumber = 7
set_event_counter conversion7_accepted == 1
set_religion england buddism
change_population_religion england buddism 75 protestant
historic_event conversioneng7_accepted
end_if
if I_EventCounter RandomNumber = 8
set_event_counter conversion3_accepted == 1
set_religion england islam
change_population_religion england islam 75 protestant
historic_event conversioneng3_accepted
end_if
if I_EventCounter RandomNumber = 3
set_event_counter conversion4_accepted == 1
set_religion england hindu
change_population_religion england hindu 75 protestant
historic_event conversioneng4_accepted
end_if
if I_EventCounter RandomNumber = 2
set_event_counter conversion5_accepted == 1
set_religion england shinto
change_population_religion england shinto 75 protestant
historic_event conversioneng5_accepted
end_if
if I_EventCounter RandomNumber = 9
set_event_counter conversion6_accepted == 1
set_religion england pagan
change_population_religion england pagan 75 protestant
historic_event conversioneng6_accepted
end_if
if I_EventCounter RandomNumber = 6
set_event_counter conversion8_accepted == 1
set_religion england protestant
change_population_religion england protestant 75 protestant
historic_event conversioneng8_accepted
end_if
if I_EventCounter RandomNumber = 5
set_event_counter conversion9_accepted == 1
set_religion england shia
change_population_religion england shia 75 protestant
historic_event conversioneng9_accepted
end_if
end_monitor
For Historic Events Text
I did this for all the factions. Excuse the english, got tired so I just ctrl-h the names as replacements.
{CONVERSIONENG_ACCEPTED_BODY}England have converted to Communism
{CONVERSIONENG_ACCEPTED_TITLE}Communist England
{CONVERSIONENG2_ACCEPTED_BODY}England have converted to Socialist
{CONVERSIONENG2_ACCEPTED_TITLE}Socialist England
{CONVERSIONENG3_ACCEPTED_BODY}England have converted to a Theocratic!
{CONVERSIONENG3_ACCEPTED_TITLE}Theocratic England
{CONVERSIONENG4_ACCEPTED_BODY}England have converted to Facist
{CONVERSIONENG4_ACCEPTED_TITLE}Facist England
{CONVERSIONENG5_ACCEPTED_BODY}England have converted to Republic
{CONVERSIONENG5_ACCEPTED_TITLE}Republic England
{CONVERSIONENG6_ACCEPTED_BODY}England have become a Democracy
{CONVERSIONENG6_ACCEPTED_TITLE}Democracy England
{CONVERSIONENG7_ACCEPTED_BODY}England has converted to Nationalism
{CONVERSIONENG7_ACCEPTED_TITLE}Nationalistic England
{CONVERSIONENG8_ACCEPTED_BODY}England have converted to Feudal
{CONVERSIONENG8_ACCEPTED_TITLE}Feudal
{CONVERSIONENG9_ACCEPTED_BODY}England have converted to Monarchy
{CONVERSIONENG9_ACCEPTED_TITLE}Monarchy England
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules