Results 1 to 5 of 5

Thread: Need some advice for multiple winter months for 12 turns per year script

  1. #1
    Artifex
    Join Date
    Mar 2010
    Location
    Sweden
    Posts
    1,344

    Default Need some advice for multiple winter months for 12 turns per year script

    I am trying to change the years to take 12 turns instead of 4, mostly in order to have more realistic movement on the campaign map while preserving the challenge of not being able to reach all your towns in one round and so on. I have tested out the following and the aging works but it's sad with only one winter season. Winter campaigning traits appear during autumn though, which I can live with (rain, storms and muddy roads certainly didn't do wonders for armies).

    By default, characters age during winter in Medieval II, so the round after a winter round they will be one year older. I know it is possible to script two or more winter months with correct aging but I don't know how to work that into EB II:s season script without messing up something else. Not sure if I edited the four-year cycles part correctly either but my main question is how to make multiple winter seasons work with proper aging in this scrip. Does anyone have some advice on that?

    The script below works, so if you can live with only one winter month you can use it. Search for the seasons part in the campaign_script.txt in ...Medieval II Total War\mods\ebii\data\world\maps\campaign\imperial_campaign . Don't forget to make a backup before and remember my minor disclaimer about the yearly cycles.

    Code:
        ; === 12 seasons ===
    
        declare_counter ReligionUpdateCounter
        declare_counter FourYearCycleCounter
        declare_counter FiveYearCycleCounter
        declare_counter season_counter
        declare_counter year_locker
        set_counter season_counter 0
        set_counter year_locker 0
    
        monitor_event FactionTurnEnd FactionType slave
            inc_counter season_counter 1
            if I_CompareCounter season_counter == 12
                set_counter season_counter 0
                set_counter year_locker 0
            end_if
            inc_counter ReligionUpdateCounter 1
            set_event_counter ecReligionUpdate 0
            if I_CompareCounter ReligionUpdateCounter == 3        ;;; this value can be changed to any number of turns that prove working and feeling best, 2 is very low value for testing only
                set_counter ReligionUpdateCounter 0
                set_event_counter ecReligionUpdate 1
            end_if
        end_monitor
    
        monitor_event PreFactionTurnStart FactionIsLocal
            set_event_counter ecSpring 0
            set_event_counter ecSummer 0
            set_event_counter ecAutumn 0
            set_event_counter ecWinter 0
            ; resetting the year to avoid 'jump' due to BC start date
            if I_TurnNumber < 4
                console_command date -272
            end_if        
            if I_CompareCounter season_counter == 0
                console_command season summer
                set_event_counter ecSpring 1
            end_if
            if I_CompareCounter season_counter == 1
                console_command season summer
                set_event_counter ecSpring 1
            end_if
            if I_CompareCounter season_counter == 2
                console_command season summer
                set_event_counter ecSpring 1
            end_if
            if I_CompareCounter season_counter == 3
                console_command season summer
                set_event_counter ecSummer 1
            end_if
            if I_CompareCounter season_counter == 4
                console_command season summer
                set_event_counter ecSummer 1
            end_if
            if I_CompareCounter season_counter == 5
                console_command season summer
                set_event_counter ecSummer 1
            end_if
            if I_CompareCounter season_counter == 6
                console_command season summer
                set_event_counter ecSummer 1
            end_if
            if I_CompareCounter season_counter == 7
                console_command season summer
                set_event_counter ecAutumn 1
            end_if
            if I_CompareCounter season_counter == 8
                console_command season summer
                set_event_counter ecAutumn 1
            end_if
            if I_CompareCounter season_counter == 9
                console_command season summer
                set_event_counter ecAutumn 1
            end_if
            if I_CompareCounter season_counter == 10
                console_command season summer
                set_event_counter ecAutumn 1
            end_if
            if I_CompareCounter season_counter == 11
                console_command season winter
                set_event_counter ecWinter 1
            end_if
            
            ; Track four-year cycles
            if I_CompareCounter year_locker = 0
                inc_counter FourYearCycleCounter 1
                inc_counter FiveYearCycleCounter 1
                inc_counter year_locker 1
                if I_CompareCounter FourYearCycleCounter == 12
                    set_counter FourYearCycleCounter 0
                end_if
                if I_CompareCounter FourYearCycleCounter == 1
                    set_event_counter ecOlympicYear 1
                end_if
                if I_CompareCounter FourYearCycleCounter == 11
                    set_event_counter ecOlympicYear 0
                end_if
                if I_TurnNumber = 0
                    set_counter FiveYearCycleCounter 2
                end_if
                if I_CompareCounter FiveYearCycleCounter == 11
                    set_counter FiveYearCycleCounter 0
                end_if
                set_event_counter ecRomanCensusYear 0
                set_event_counter ecRomanCensusNextYear 0
                if I_CompareCounter FiveYearCycleCounter == 0
                    set_event_counter ecRomanCensusNextYear 1
                end_if
                if I_CompareCounter FiveYearCycleCounter == 1
                    set_event_counter ecRomanCensusYear 1
                end_if
            end_if
        end_monitor
    The Misadventures of Diabolical Amazons - Completed.
    An Orcs Tale, a Third Age AAR - Completed.
    Reviewed by Alwyn in the Critics Quill
    My Dread Lady, a Warcraft Total War AAR - 27 chapters done.
    Home to Midgard, a Third Age AAR about two dwarves, a spy and a diplomat - Completed (pictures remade up to chapter 19).
    Reviewed by Boustrophedon in The Critics Quill

  2. #2

    Default Re: Need some advice for multiple winter months for 12 turns per year script

    I suspect one winter season is hardcoded, which is why you will only get one no matter how many turns per year you have.

  3. #3
    Artifex
    Join Date
    Mar 2010
    Location
    Sweden
    Posts
    1,344

    Default Re: Need some advice for multiple winter months for 12 turns per year script

    No, it's possible to script;
    "console_command season winter"

    There's actually a modders resource of such scripts from GrnEyedDvl himself;
    http://www.twcenter.net/forums/showt...h-proper-aging
    Call of Warhammer and Beginning of the End Times (warhammer submod, although it's a standalone install) have 12 turns per year for example. I used green eyed devils script in a couple of othe rmods but in EB II I don't know what to delete and what to keep in order to not disturb other scripted functions.
    The Misadventures of Diabolical Amazons - Completed.
    An Orcs Tale, a Third Age AAR - Completed.
    Reviewed by Alwyn in the Critics Quill
    My Dread Lady, a Warcraft Total War AAR - 27 chapters done.
    Home to Midgard, a Third Age AAR about two dwarves, a spy and a diplomat - Completed (pictures remade up to chapter 19).
    Reviewed by Boustrophedon in The Critics Quill

  4. #4

    Default Re: Need some advice for multiple winter months for 12 turns per year script

    Quote Originally Posted by Maltacus View Post
    The script below works, so if you can live with only one winter month you can use it. Search for the seasons part in the campaign_script.txt in ...Medieval II Total War\mods\ebii\data\world\maps\campaign\imperial_campaign . Don't forget to make a backup before and remember my minor disclaimer about the yearly cycles.
    The timescale in descr_strat.txt should also be changed for 0.0835, no?

  5. #5
    Artifex
    Join Date
    Mar 2010
    Location
    Sweden
    Posts
    1,344

    Default Re: Need some advice for multiple winter months for 12 turns per year script

    The timescale in descr_strat.txt should also be changed for 0.0835, no?
    Precisely. 0,083333333333 and so on to be exact.
    The Misadventures of Diabolical Amazons - Completed.
    An Orcs Tale, a Third Age AAR - Completed.
    Reviewed by Alwyn in the Critics Quill
    My Dread Lady, a Warcraft Total War AAR - 27 chapters done.
    Home to Midgard, a Third Age AAR about two dwarves, a spy and a diplomat - Completed (pictures remade up to chapter 19).
    Reviewed by Boustrophedon in The Critics Quill

Tags for this Thread

Posting Permissions

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