Results 1 to 4 of 4

Thread: freeze_recruit_pool

  1. #1
    Aneirin's Avatar of flowing verse
    Join Date
    Nov 2012
    Location
    Gododdin
    Posts
    2,734

    Default freeze_recruit_pool

    Hello there,

    I was wondering if anyone of you know more about how the command 'freeze_recruit_pool' works.
    You see, I am facing the problem that the recruitment pool gets frozen right away during the player's turn,
    but as soon as I unfreeze it, it takes another turn till the units show up again in the recruitment tab of the settlement.

    Does anyone know how to trigger the unfreezing right away? Especially in the context that it still takes several turns till new units are available, since the pool has to refill itself.


    Code:
            if I_SettlementOwner Siena = russia           ; does this faction own this settlement
                and I_CompareCounter exceedlimit_russia > 0     ; has this faction exceeded the upkeep limit
                and I_CompareCounter Siena_frozen < 1          ; is this pool NOT frozen
    
                freeze_recruit_pool Siena_Province true                 ; freeze the regional recruit pool
                set_counter Siena_frozen 1                       ; set the 'region' counter true
                historic_event test
            end_if
            if I_SettlementOwner Siena = russia
                and I_CompareCounter exceedlimit_russia < 1      ; is this faction below the upkeep limit
                and I_CompareCounter Siena_frozen > 0          ; is this pool frozen
                freeze_recruit_pool Siena_Province false                ; unfreeze the pool
                set_counter Siena_frozen 0                        ; set the 'region' counter false
    
                            historic_event test
            end_if
    Best
    Aneirin
    Proud son of Aikanár and brother of Iskar

  2. #2

    Default Re: freeze_recruit_pool

    I think the turn's delay is a facet of any operation involving recruit _pools - the same happens with pools activated by event_counter.

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

    Default Re: freeze_recruit_pool

    I don't know if it's practical but an alternative to freezing the pool would be to disable the ability to add anything to the recruit queue...

    Code:
    if I_SettlementOwner Siena = russia           ; does this faction own this settlement
        and I_CompareCounter exceedlimit_russia > 0     ; has this faction exceeded the upkeep limit
        and I_CompareCounter Siena_frozen < 1          ; is this pool NOT frozen
    
        freeze_recruit_pool Siena_Province true                 ; freeze the regional recruit pool
        filter_settlement_commands off Siena recruitment_queue_add
        set_counter Siena_frozen 1                       ; set the 'region' counter true
        historic_event test
    end_if
    if I_SettlementOwner Siena = russia
        and I_CompareCounter exceedlimit_russia < 1      ; is this faction below the upkeep limit
        and I_CompareCounter Siena_frozen > 0          ; is this pool frozen
        
        freeze_recruit_pool Siena_Province false                ; unfreeze the pool
        filter_settlement_commands on Siena recruitment_queue_add
        set_counter Siena_frozen 0                        ; set the 'region' counter false
        historic_event test
    end_if
    CONS:
    1) it doesn't reset any pools to zero nor stop their growth, so you can still see the units and over time that there are more of them, you just can't recruit them
    2) also prevents recruitment of agents
    3) player only? not sure but suspect so

  4. #4
    Aneirin's Avatar of flowing verse
    Join Date
    Nov 2012
    Location
    Gododdin
    Posts
    2,734

    Default Re: freeze_recruit_pool

    Thanks for sharing your thoughts on this, I guess I will stick with my current solution and have to live with it.
    Though interesting that is possible to 'disable' the recruitment queue.
    Proud son of Aikanár and brother of Iskar

Posting Permissions

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