Results 1 to 4 of 4

Thread: Did I do it right?

Hybrid View

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

    Default Did I do it right?

    I trying to apply $ turns per year script for the mod RoG,

    Can someone please check if what I did here is correct?

    ;------------------------------------------
    AdviceThread 4tpy_thread
    GameArea Campaign

    Item 4tpy_text_01
    Uninhibitable
    Verbosity 0
    Threshold 1
    MaxRepeats 0
    RepeatInterval 1
    Attitude Normal
    Presentation Default
    Title 4tpy_text_01_Title
    On_display scripts\show_me\4tpy_script.txt
    Text 4tpy_text_01_text1
    Trigger 1081_4tpy_trigger_1
    WhenToTest ButtonPressed

    Condition ButtonPressed faction_button

    AdviceThread 4tpy_thread 1

    ;------------------------------------------
    Trigger 1082_4tpy_trigger_2
    WhenToTest ButtonPressed

    Condition ButtonPressed construction_button

    AdviceThread 4tpy_thread 1

    ;------------------------------------------
    Trigger 1083_4tpy_trigger_3
    WhenToTest ButtonPressed

    Condition ButtonPressed recruitment_button

    AdviceThread 4tpy_thread 1

    ;------------------------------------------
    Trigger 1084_4tpy_trigger_4
    WhenToTest SettlementSelected

    AdviceThread 4tpy_thread 1

    ;------------------------------------------
    {4tpy_Text_01_Title} INVASIO BARBARORUM Campaign Script

    {4tpy_Text_01_Text1} INVASIO BARBARORUM Campaign Script n\click on the ‘show me how’ button to execute. REMEMBER to run this script with every game you start or load a game.

  2. #2

    Default Re: Did I do it right?

    you want to make 4 turns a year yes with proper aging sorry thats what i think you mean if so try this one in the campaign script

    monitor_event PreFactionTurnStart FactionIsLocal ; set the season for each quarter
    if I_CompareCounter quarter == 1 ;Jan, Feb, March
    console_command season winter
    end_if

    if I_CompareCounter quarter == 2 ;April, May, June
    console_command season summer
    end_if

    if I_CompareCounter quarter == 3 ;July, Aug, Sept
    console_command season summer
    end_if

    if I_CompareCounter quarter == 4 ;Oct, Nov, Dec
    console_command season winter
    end_if

    inc_counter quarter 1 ;advance the quarter
    if I_CompareCounter quarter == 5 ;start a new year
    set_counter quarter 1
    end_if
    end_monitor
    monitor_event FactionTurnEnd FactionType slave
    and I_CompareCounter quarter > 1
    console_command season summer
    end_monitor

    Heroes Hordes & beyond The official submod of KGCM (click the sig)

  3. #3
    JuL14n's Avatar Centenarius
    Join Date
    Apr 2009
    Location
    Finland
    Posts
    830

    Default Re: Did I do it right?

    Wait, you are making it for a Medieval 2 total war mod? In M2TW the show me how button
    is not needed when adding scripted events and such.

    3 summers, 1 winter, 4 turns per year, proper aging:

    Copy and paste it to Worlds\maps\campaign\imperial_campaign\campaign_script

    Code:
    ;;;;;; 3 Summers and 1 Winter ;;;;;;
    
    declare_counter season_counter
    
    monitor_event FactionTurnStart FactionIsLocal
    	inc_counter season_counter 1
    	
    	; 0 equals winter
    	if I_CompareCounter season_counter == 0
    		console_command season winter
    	end_if
    	if I_CompareCounter 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_CompareCounter season_counter == 3
    		set_counter season_counter -1
    	end_if
    end_monitor

  4. #4

    Default Re: Did I do it right?

    Im making it for RoG RTW mod.

    The seasons script is already there, its the advice thread and the triggers I need to apply.
    That's my work on the upper post, something must be wrong because whenever I click the faction button or a settlement, it ctds.

Posting Permissions

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