Results 1 to 7 of 7

Thread: need help with depopulation script

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Harbinger of... saliva Member alpaca's Avatar
    Join Date
    Aug 2003
    Location
    Germany
    Posts
    2,767

    Default Re: need help with depopulation script

    Try this syntax:
    Code:
    declare_counter break_counter
    monitor_event SettlementTurnStart Carthago
    and SettlementPopulationMaxedOut
    and I_CompareCounter break_counter = 0
    console_command add_population Carthago -7000
    set_counter break_counter 1
    end_monitor
    
    while TrueCondition
    if I_CompareCounter break_counter = 1
    set_counter break_counter 0
    end_if
    end_while
    Edit: As an afterthought it probably won't work very well. Could you test if it only executes once each time you press end turn when you provide no condition for the monitor?
    Last edited by alpaca; 06-20-2006 at 17:55.

  2. #2

    Default Re: need help with depopulation script

    Monkwarrior
    My mother language is russian, but I'm dreaming learn spanish someday
    I tried made script in your way with advice threads, but again without success. Cheked all several times started new campaign but it seemes that script doesnt' run.
    There is one condition that not very suitable for me "SettlementIsLocal". In this way script affects only on human player but I suppose that AI suffers from overflowing cities much more than player. I want include all settlements on the map in the script and I believe that decrease of population can improve AI behaviour.

    alpaca
    I tried your syntax and it doesn't work
    If I put your original script nothing happened.

    I tried add "and Carthago SettlementPopulationMaxedOut" beacuse in docudemon written that SettlementPopulationMaxedOut need settlement. In this way population level decrease till 400 men on next turn.

    I tried run script without conditions
    Code:
    declare_counter break_counter
    monitor_event SettlementTurnStart Carthago
    console_command add_population Carthago -7000
    set_counter break_counter 1
    end_monitor
    
    while TrueCondition
    if I_CompareCounter break_counter = 1
    set_counter break_counter 0
    end_if
    end_while
    In this way nothing happened.
    If I leave only and I_CompareCounter break_counter = 0 as condition the population level fall till 400 men level on next turn.
    I tried different syntax with your code but I cannot discover any solution to make "SettlementTurnStart" work. It seemes that "ButtonPressed ButtonPressed end_turn" works better but in this way end turn button triggered console_command and script run without checking "SettlementPopulationMaxedOut".

    Any new ideas gladly appreciated!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Single Sign On provided by vBSSO