Page 1 of 2 12 LastLast
Results 1 to 20 of 29

Thread: Religious conversion option

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    ChivalrousKiller's Avatar Domesticus
    Join Date
    Jan 2010
    Location
    Grimstad, Norway
    Posts
    2,244

    Default Religious conversion option

    Is it possible to give a faction the option to convert to another religion in an event during the campaign, such as Lithuania in the Teutonic campaign?

    If so, how?

    (I would like to give the Mongols a chance to convert to Christianity )

    -CK

  2. #2

    Default Re: Religious conversion option

    Yep its possible.


    Here is a tutorial... http://www.twcenter.net/forums/showthread.php?t=190927
    If you need more help, ask me. I made a mod about these conversions so I know a lot about it ^^
    Last edited by Supermoler; November 18, 2010 at 10:56 AM.

  3. #3
    ChivalrousKiller's Avatar Domesticus
    Join Date
    Jan 2010
    Location
    Grimstad, Norway
    Posts
    2,244

    Default Re: Religious conversion option

    I'd very much like that

  4. #4
    ChivalrousKiller's Avatar Domesticus
    Join Date
    Jan 2010
    Location
    Grimstad, Norway
    Posts
    2,244

    Default Re: Religious conversion option

    I've added this to the campaign_script (in KGCM)

    ;setup MONGOLS CONVERSION counters

    add_events
    event counter mongols_conversion_accepted
    event counter mongols_conversion_declined
    event counter mongols_conversion_timer
    date 0
    end_add_events

    generate_random_counter mongols_conversion_timer 0 1
    set_event_counter mongols_conversion_accepted 0
    set_event_counter mongols_conversion_declined 0


    And this to the historic_events (just to write something )

    {MONGOLS_CONVERSION_BODY}conversion text
    {MONGOLS_CONVERSION_TITLE}Mongols conversion

    {MONGOLS_CONVERTS_BODY}Yahoo! The mongol hordes have converted!
    {MONGOLS_CONVERTS_TITLE}The Hordes convert


    I didn't quite understand that guide, so can you tell me what is left to do?




  5. #5

    Default Re: Religious conversion option

    Code:
     
    monitor_event FactionTurnStart
     
            add_events
                event    counter   mongols_accepted
                event    counter    mongols_declined
                 date    0
       end_add_events
     
      terminate_monitor
    end_monitor
     
    monitor_event FactionTurnStart FactionIsLocal
     
            if I_NumberOfSettlements mongols < 3
     
                historic_event mongols_conversion true factions { mongols, }
     
                terminate_monitor
     
            end_if
     
    end_monitor
    And this to historic events:

    Code:
    {MONGOLS_CONVERSION_BODY}conversion text
    {MONGOLS_CONVERSION_TITLE}Mongols conversion
    Thats enough

    That will do this: if mongols got more than 3 settlements, the human player will be asked to choose convert or no...

    I cant set anything more, since I dont know what conditions do you want.
    And what you want with that timer?


    edit: oh and you need this too:

    Code:
     
        monitor_conditions I_EventCounter mongols_conversion_accepted = 1
                set_religion mongols catholic
                change_population_religion mongols islam 75 catholic
     
     end
                
            terminate_monitor
        
        end_monitor
    Last edited by Supermoler; November 18, 2010 at 11:54 AM.

  6. #6
    ChivalrousKiller's Avatar Domesticus
    Join Date
    Jan 2010
    Location
    Grimstad, Norway
    Posts
    2,244

    Default Re: Religious conversion option

    Quote Originally Posted by Supermoler View Post
    [CODE]

    edit: oh and you need this too:

    Code:
     
        monitor_conditions I_EventCounter mongols_conversion_accepted = 1
                set_religion mongols catholic
                change_population_religion mongols islam 75 catholic
     
     end
                
            terminate_monitor
        
        end_monitor
    In campaign_script? Where?

  7. #7
    ChivalrousKiller's Avatar Domesticus
    Join Date
    Jan 2010
    Location
    Grimstad, Norway
    Posts
    2,244

    Default Re: Religious conversion option

    Can I set "> 3" so it requires more than 3 settlements? EDIT: "Doesn't the < mean less than?

    And how do I choose the turn where it happens?
    And what sets the religion to convert to?
    Last edited by ChivalrousKiller; November 18, 2010 at 11:55 AM.

  8. #8

    Default Re: Religious conversion option

    Yes you can set.

    And the second question, I think:

    date 4 8

    (two numbers, but I dont understand them, i dont know what that 2 numbers mean.)

    edit: "In campaign_script? Where? "

    Yes, just add to that file. In that monitor you can set what will happen if they accept (they will be catholic)

  9. #9
    ChivalrousKiller's Avatar Domesticus
    Join Date
    Jan 2010
    Location
    Grimstad, Norway
    Posts
    2,244

    Default Re: Religious conversion option

    But the event came up at first, but when I added what you wrote last under it, then it didn't work.

    Is this right:

    monitor_event FactionTurnStart

    add_events
    event counter mongols_accepted
    event counter mongols_declined
    date 0
    end_add_events

    terminate_monitor
    end_monitor

    monitor_event FactionTurnStart FactionIsLocal

    if I_NumberOfSettlements mongols > 3

    historic_event mongols_conversion true factions { mongols, }

    terminate_monitor

    end_if

    end_monitor

    monitor_conditions I_EventCounter mongols_conversion_accepted = 1
    set_religion mongols catholic
    change_population_religion mongols islam 75 catholic

    end

    terminate_monitor

    end_monitor

  10. #10

  11. #11
    ChivalrousKiller's Avatar Domesticus
    Join Date
    Jan 2010
    Location
    Grimstad, Norway
    Posts
    2,244

    Default Re: Religious conversion option

    Campaign_Script Attachment 121851

  12. #12

    Default Re: Religious conversion option

    Changed a small thing.

    It needs to work. if mongols have more than 3 settlements, you will be asked to change them..

  13. #13
    ChivalrousKiller's Avatar Domesticus
    Join Date
    Jan 2010
    Location
    Grimstad, Norway
    Posts
    2,244

    Default Re: Religious conversion option

    No, it still doesn't come up at all. Neither playing as the Mongols (which is what I want), nor as any other faction

    But it did so before I added the "monitor conditions"

  14. #14

    Default Re: Religious conversion option

    In my mod thats working for me.
    Download this mini mod (its for TATW, but good source)

    Copy the scripts and replace some things (faction name.. )

    In campaign_script, search for the last some script. (eriador is the best example)
    That script is working. I dont know why yours not.

  15. #15
    ChivalrousKiller's Avatar Domesticus
    Join Date
    Jan 2010
    Location
    Grimstad, Norway
    Posts
    2,244

    Default Re: Religious conversion option

    Thank you. Had a look at it, but couldn't find a difference.

    But I also had a look at the KGCM campaign script again, and found this for Lithuania:

    Lithuania conversion
    ;------------------- LITHUANIA CONVERSION TO CATHOLICISM -------------------;

    ;increment the timer for conversion offer
    monitor_event FactionTurnStart FactionType lithuania

    inc_event_counter lithuania_conversion_timer 1

    if I_EventCounter lithuania_conversion_accepted = 1
    terminate_monitor
    end_if

    end_monitor

    ;offer the conversion to Lithuania if the correct conditions are met

    monitor_event FactionTurnStart FactionType lithuania

    if I_NumberOfSettlements lithuania < 5
    and I_EventCounter lithuania_conversion_timer >= 60
    and I_EventCounter lithuania_conversion_accepted = 0

    ;offer conversion to christianity
    historic_event lithuania_conversion true factions { lithuania, }

    ;if AI random chance to accept
    if I_IsFactionAIControlled lithuania

    generate_random_counter random_accept 0 2
    if I_EventCounter random_accept < 2
    set_event_counter lithuania_conversion_accepted 1
    end_if

    end_if

    terminate_monitor

    end_if

    if I_EventCounter lithuania_conversion_timer >= 80
    and I_EventCounter lithuania_conversion_accepted = 0

    ;offer conversion to christianity
    historic_event lithuania_conversion true factions { lithuania, }

    ;if AI random chance to accept
    if I_IsFactionAIControlled lithuania

    generate_random_counter random_accept 0 2
    if I_EventCounter random_accept < 2
    set_event_counter lithuania_conversion_accepted 1
    end_if

    end_if

    terminate_monitor

    end_if

    end_monitor

    monitor_conditions I_EventCounter lithuania_conversion_accepted = 1

    ;Three easy steps for conversion

    ;1 - Convert the people
    set_religion lithuania catholic
    change_population_religion lithuania catholic 75 pagan

    ;2 - Destroy the pagan buildings
    destroy_buildings lithuania temple_dievas true
    destroy_buildings lithuania temple_dievas_castle true
    destroy_buildings lithuania temple_perkunas true
    destroy_buildings lithuania temple_perkunas_castle true
    destroy_buildings lithuania temple_giltine true
    destroy_buildings lithuania temple_giltine_castle true

    ;3 - Disband the pagan units
    retire_characters Lithuania priest
    destroy_units Lithuania pagan_unit

    ;notify all factions that Lithuania has converted and become Catholic
    historic_event lithuania_converts event/Lithuania_converts.bik

    set_event_counter pagan_lithuania 0
    set_event_counter not_pagan_lithuania 1

    ; change lithuania ai label
    link_faction_ai lithuania catholic

    terminate_monitor

    end_monitor


    Is it possible that I have to add this for the Mongols under the Lithuania one?

  16. #16

    Default Re: Religious conversion option

    I think yes. Just rename faction and some more things you want. And add to historic_events.txt.

  17. #17
    ChivalrousKiller's Avatar Domesticus
    Join Date
    Jan 2010
    Location
    Grimstad, Norway
    Posts
    2,244

    Default Re: Religious conversion option

    I did so, and removed the monitor_conditions at the top. And I have both Mongols_Conversion and Mongols_Converts in the historic_events, but it doesn't come up

  18. #18
    ChivalrousKiller's Avatar Domesticus
    Join Date
    Jan 2010
    Location
    Grimstad, Norway
    Posts
    2,244

    Default Re: Religious conversion option

    Would you take a look at it again?

    script
    Attachment 121856


    Just scroll down to Lithuania Converts to Catholicism, under that one, I added Mongols Converts to Catholicism

  19. #19

    Default Re: Religious conversion option

    Do the mongols have at least 4 regions?

  20. #20
    ChivalrousKiller's Avatar Domesticus
    Join Date
    Jan 2010
    Location
    Grimstad, Norway
    Posts
    2,244

    Default Re: Religious conversion option

    Starting with five

Page 1 of 2 12 LastLast

Posting Permissions

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