Results 1 to 6 of 6

Thread: Religious Tug of War

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default Religious Tug of War

    I wnat to have several factions switch religions multiple times (theoretically infinite, but the chances tail off as the game progresses) based ons et criteria. I know how to alter the EDB to function with a religion change script, and I've picked apart the teutonic script, but I still can't figure out how to get the event to be offered multiple times.
    My criteria are:

    game stage- late game factions can't change as often, with very late game factions rarely changing religions

    scaling repurcussions: the later you switch, the worse it will be, as in, more rebels, less conversion

    turncoats- the more you switch, the greater the chance of war with former "brothers" and the smaller the chance of acceptance by your new compatriots, this also affects the chance of being offered the religion switch

    plus all of the regular ones, i.e. losing the capital, war with other factions, neighbor religion, etc
    A well informed opinion is a well formed opinion.

  2. #2
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: Religious Tug of War

    Docudemons is your friend:

    Identifier: set_religion
    Parameters: faction, religion
    Description: Changes the religion of a faction.
    Sample use: set_religion England pagan

    Identifier: change_population_religion
    Parameters: faction, religion_to, percent, religion_from (religion_from optional, current faction religion by default)
    Description: Changes the religion of a faction.
    Sample use: change_population_religion England pagan 50 catholic










  3. #3

    Default Re: Religious Tug of War

    I've seen those. I know how to change a faction's religion; I don't know how to allow a faction's religion to be changed multiple times.
    A well informed opinion is a well formed opinion.

  4. #4
    Squid's Avatar Opifex
    Patrician Artifex Technical Staff

    Join Date
    Feb 2007
    Location
    Frozen waste lands of the north
    Posts
    17,751
    Blog Entries
    3

    Default Re: Religious Tug of War

    Use the set_religion command multiple times . . .
    Under the patronage of Roman_Man#3, Patron of Ishan
    Click for my tools and tutorials
    "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe." -----Albert Einstein

  5. #5
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: Religious Tug of War

    Quote Originally Posted by Sqυιd View Post
    Use the set_religion command multiple times . . .










  6. #6

    Icon1 Re: Religious Tug of War

    I think Carle’s question is not how do you use the ‘set_religion’ and ‘change_population_religion’ commands, but rather how do you write a script which offers the player the ability to switch religion multiple times.

    Carle: The first thing your script would need is a monitor event that happens frequently. A good example of this would be the ‘BecomesFactionLeader’ event. Assuming that you are going to have a yes/no event that allows the player to switch religion, in that case you will need to set the event counters back to 0. Do not use ‘terminate_monitor’ in the script.

    Finally, you will want to add a counter to the script. That way you will be able to tell how many times the change of religion event has being offered to the player.
    Code:
    declare_counter switch_religion
    
    	monitor_event BecomesFactionLeader FactionType england
    		historic_event player_switch_religion true
       		inc_counter switch_religion 1
    	end_monitor
    
    	monitor_conditions I_EventCounter player_switch_religion_accepted = 1
    		if I_CompareCounter switch_religion = 1
    		set_religion england ?
    		change_population_religion england ? 70 ?
    	end_if
    		if I_CompareCounter switch_religion = 2
    		set_religion england ?
    		change_population_religion england ? 60 ?
    	end_if
    		if I_CompareCounter switch_religion = 3
    		set_religion england ?
    		change_population_religion england ? 50 ?
    	end_if
    		set_event_counter player_switch_religion_accepted 0
    	end_monitor
    
    	monitor_conditions I_EventCounter player_switch_religion_declined = 1
    		set_event_counter player_switch_religion_declined 0
    	end_monitor

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •