Results 1 to 6 of 6

Thread: [RELEASED]Resource: 4-12 TPY switch script

  1. #1
    Kiliç Alì's Avatar Domesticus
    Artifex

    Join Date
    Feb 2011
    Location
    Italy
    Posts
    2,114

    Default [RELEASED]Resource: 4-12 TPY switch script

    This is a small one to switch between 4 and 12 TPY once in-game.
    I made it for personal use in MOS but it may work for any mod\submod.

    Replace the current "Aging & Season script" section in campaign_script.txt with this:
    Code:
    ;###################### Aging & Season script ########################
    monitor_event FactionTurnStart FactionIsLocal
        historic_event tpy_event true
    terminate_monitor
    end_monitor
    
    declare_counter month
    set_counter month 1 ;set to January
    
    monitor_event PreFactionTurnStart FactionIsLocal ; set the season for each month
        if I_EventCounter tpy_event_declined = 1
            if I_CompareCounter month == 1 ;January
                console_command season winter
            end_if
        
            if I_CompareCounter month == 2 ;February
                console_command season winter
            end_if
        
            if I_CompareCounter month == 3 ;March
                console_command season summer
            end_if
        
            if I_CompareCounter month == 4 ;April
                console_command season summer
            end_if
        
            if I_CompareCounter month == 5 ;May
                console_command season summer
            end_if
        
            if I_CompareCounter month == 6 ;June
                console_command season summer
            end_if
        
            if I_CompareCounter month == 7 ;July
                console_command season summer
            end_if
        
            if I_CompareCounter month == 8 ;August
                console_command season summer
            end_if
        
            if I_CompareCounter month == 9 ;September
                console_command season summer
            end_if
        
            if I_CompareCounter month == 10 ;October
                console_command season summer
            end_if
        
            if I_CompareCounter month == 11 ;November
                console_command season winter
            end_if
        
            if I_CompareCounter month == 12 ;December
                console_command season winter
            end_if
        
            inc_counter month 1 ;advance the month
            if I_CompareCounter month == 13 ;start a new year
                set_counter month 1
            end_if
        end_if
        if I_EventCounter tpy_event_accepted = 1
            terminate_monitor
        end_if
    end_monitor
    
    monitor_event FactionTurnEnd FactionType slave
        if I_EventCounter tpy_event_declined = 1
            and I_CompareCounter month < 12
            console_command season summer
        end_if
        if I_EventCounter tpy_event_accepted = 1
            terminate_monitor
        end_if
    end_monitor
    
    declare_counter season_counter
    monitor_event FactionTurnStart FactionType slave
        inc_counter season_counter 1
        
        ; 0 equals winter
        if I_EventCounter tpy_event_accepted = 1
            if I_EventCounter season_counter == 0
                console_command season winter
            end_if
            if I_EventCounter season_counter > 0
                console_command season summer
            end_if
            ; Reset the counter on the autumn turn so that it'll be 0 next turn
            if I_EventCounter season_counter == 3
                set_counter season_counter -1
            end_if
        end_if
        if I_EventCounter tpy_event_declined = 1
            terminate_monitor
        end_if
    end_monitor
    then add this in historic_events.txt
    Code:
    {TPY_EVENT_TITLE}Turns per year?
    {TPY_EVENT_BODY}Press V to play with 4 turns per year. \n Press X to play with 12 turns per year. \n\nNOTE: date may show wrong in 4 tpy mode.
    Delete historic_events.strings.bin when done


    Finally a nice eventpic (optional):

    The one above is a .jpg; download the tpy_event.tga down here (it must be extracted with 7z), save it in \data\ui\southern_european\eventpics and it is done.


    BUGS\GLITCHES:

    The only problem is that this affects season\aging but not the date (timescale) since it is set in descr_strat. But it's the only way to let people switch between 12-4 tpy once in-game.


    Permissions: free to use, crediting is nice.
    Last edited by Kiliç Alì; May 31, 2014 at 03:26 AM.

    Member of the Imperial House of Hader, proud client of The only and sole Ferrit

  2. #2

    Default Re: [RELEASED]Resource: 4-12 TPY switch script

    Nice script. Though I'd recommend taking the extra lore step and naming the months according to either the Numenorean or Hobbit calendar vice the Gregorian.

    http://en.wikipedia.org/wiki/Middle-earth_calendar
    What's life like if you don't take a chance now and then? ~ Matrim Cauthon

  3. #3
    Withwnar's Avatar Script To The Waist
    Join Date
    Oct 2008
    Location
    Earth
    Posts
    6,329

    Default Re: [RELEASED]Resource: 4-12 TPY switch script

    Good idea for testing, Kilic. Regarding the image, surely it is not as simple as renaming to ".tga"? It would need to be converted to TGA format.

  4. #4
    Kiliç Alì's Avatar Domesticus
    Artifex

    Join Date
    Feb 2011
    Location
    Italy
    Posts
    2,114

    Default Re: [RELEASED]Resource: 4-12 TPY switch script

    Well, that's curious, GIMP opens the renamed file but M2 does not... I tought it would have worked fine

    Added the .tga in OP

    @deus, the names are only a comment to the code. Vanilla TATW actually

    Member of the Imperial House of Hader, proud client of The only and sole Ferrit

  5. #5

    Default Re: [RELEASED]Resource: 4-12 TPY switch script

    +rep
    American, French, Israeli and British government's ILLEGAL aggression against the Syrian people, without any proof for chemical attacks in Douma, and without waiting for OPCW to conduct their investigation..
    Sons of *******, leave that poor, war torn country in peace.
    If you are a citizen of one of these countries, then DO NOT ask any help from me on these forums, since, in protest against this aggression by your governments, I do not provide assistance/help anymore.
    Let Syria be finally in peace.

    A video of false chemical attack in Douma, Syria, which led to Western illegal attacks.

  6. #6

    Default Re: [RELEASED]Resource: 4-12 TPY switch script

    Help! I can't find the Aging & Season part in campaign_script.txt
    Please & Thanks

Posting Permissions

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