Results 1 to 4 of 4

Thread: N Turns Per Year - 1 Winter Only

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Morfans's Avatar Semisalis
    Join Date
    Oct 2006
    Location
    Milan, Italy
    Posts
    484

    Default N Turns Per Year - 1 Winter Only

    While GED's script is generally functional, it requires Winter to be the starting and ending turn each year.

    Additionally, there are some pathological cases in which alternating seasons are unavoidable, as reported by others in GED's thread. I don't know exactly why, but the cause must be something external, interfering with GED's scheme between the "slave" turn and the human player start.

    So I worked out this one which is all internal to the human player turn.

    Basically, before your turn starts, every season is set to Summer, then at the start one is conditionally set to Winter, like this:

    Code:
     
    ;;; -----  TURNS PER YEAR  -----
     
    monitor_event PreFactionTurnStart FactionIsLocal
     console_command season summer
    end_monitor
     
    declare_counter tpycount
    set_counter tpycount 1
    monitor_event FactionTurnStart FactionIsLocal
     
     if I_CompareCounter tpycount == 4 
      console_command season winter
      set_counter tpycount 0
     end_if
     
     inc_counter tpycount 1 
     
    end_monitor
    Tested on a number of Kingdoms mods (including the pathological ones) and it works.

    It goes without saying, descr_strat.txt must be modified accordingly.

    Also, the example is for 4 turns per year, but changing to N turns is straightforward
    .
    -
    Last edited by Morfans; January 20, 2011 at 02:21 PM.

  2. #2

    Default Re: N Turns Per Year - 1 Winter Only

    Wait what? ok, i want 4 turns per year, where do i insert "TURNS PER YEAR" and what do i modify in descr_start?

  3. #3

    Icon1 Re: N Turns Per Year - 1 Winter Only

    Quote Originally Posted by 0N3 View Post
    Wait what? ok, i want 4 turns per year, where do i insert "TURNS PER YEAR" and what do i modify in descr_start?
    You need to do this in the 'descr_strat' file:

    1. The 'start_date' need to be set to summer.

    2. The 'timescale' need to be set to 0.25.

    Then you need to add the script to the 'campaign_script' file.

  4. #4
    Morfans's Avatar Semisalis
    Join Date
    Oct 2006
    Location
    Milan, Italy
    Posts
    484

    Default Re: N Turns Per Year - 1 Winter Only

    Quote Originally Posted by TNZ View Post
    You need to do this in the 'descr_strat' file:

    1. The 'start_date' need to be set to summer.

    2. The 'timescale' need to be set to 0.25.

    Then you need to add the script to the 'campaign_script' file.


    Oops! I missed this one. Thanks, TNZ

    The script can be added just anywhere in campaing_script.txt, between the "script" and "wait_monitors" statements.

    -

Posting Permissions

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