Results 1 to 3 of 3

Thread: Script or EDB problem

Hybrid View

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

    Default Script or EDB problem

    i use script as a condition for recruiting system. It looks like this:
    monitor_conditions not I_SettlementOwner Constantinople = byzantium
    and I_EventCounter holds_constantinople == 1
    and I_NumberOfSettlements byzantium > 0
    set_event_counter holds_constantinople 0
    end_monitor

    ;Detect if settlement has been taken
    ;Increment event counter

    monitor_conditions I_SettlementOwner Constantinople = byzantium
    and I_EventCounter holds_constantinople == 0
    add_events
    event counter holds_constantinople
    date 0
    end_add_events
    end_monitor
    Script works well, but i have a little problem with rectuiting new units, because after checking who is owner of Constantinople, i have to wait whole period of replenish unit. Is there any tip to fix this problem?
    Last edited by attyla; April 05, 2011 at 07:31 AM.

  2. #2

    Icon1 Re: Script or EDB problem

    Quote Originally Posted by attyla View Post
    i use script as a condition for recruiting system. It looks like this:

    Script works well, but i have a little problem with rectuiting new units, because after checking who is owner of Constantinople, i have to wait whole period of replenish unit. Is there any tip to fix this problem?
    Try adding ‘set_recruit_pool’ or ‘inc_recruit_pool’ to your script:
    Code:
    Identifier:         set_recruit_pool
    Parameters:         region_name|region_id value unit_name 
    Description:        Set specified amount of units to the unit pool of the specified type of unit in the specified region.
    Sample use:         set_recruit_pool York_Province 5 temp heavy spearmen
    Class:              SET_RECRUIT_POOL
    Implemented:        Yes
    Author:             Grig
    Code:
    monitor_event SettlementTurnStart SettlementName Jerusalem
    		and FactionReligion catholic
    		set_recruit_pool Jerusalem_Province 2 Jerusalem Sergeants
    		set_recruit_pool Jerusalem_Province 2 Dismounted Jerusalem Knights
    		set_recruit_pool Jerusalem_Province 2 Jerusalem Knights
    	end_monitor
    Code:
    Identifier:         inc_recruit_pool
    Parameters:         region_name|region_id value unit_name
    Description:        Add specified amount of units to the unit pool of the specified type of unit in the specified region.
    Sample use:         inc_recruit_pool York_Province -2 temp_heavy_spearmen
    Class:              INC_RECRUIT_POOL
    Implemented:        Yes
    Author:             Grig
    Code:
    	monitor_event SettlementTurnStart SettlementName Jerusalem
    		and FactionReligion catholic
    		inc_recruit_pool Jerusalem_Province 2 Jerusalem Sergeants
    		inc_recruit_pool Jerusalem_Province 2 Dismounted Jerusalem Knights
    		inc_recruit_pool Jerusalem_Province 2 Jerusalem Knights
    	end_monitor

  3. #3

    Default Re: Script or EDB problem

    i've made it:
    monitor_conditions not SettlementBuildingFinished town_watch = byzantium
    and I_EventCounter zaciag_gwardii == 1
    set_event_counter zaciag_gwardii 0
    end_monitor

    monitor_conditions SettlementBuildingFinished town_watch = byzantium
    and I_EventCounter zaciag_gwardii == 0
    add_events
    event counter zaciag_gwardii
    date 0
    end_add_events
    end_monitor

    monitor_event PreFactionTurnStart FactionType byzantium

    if I_EventCounter holds_constantinople = 1
    and I_EventCounter zaciag_gwardii = 1
    set_recruit_pool Constantinople_Province 1 Varangian Axemen
    end_if


    end_monitor
    Unfortunately, i have cdt after addig it. What's wrong with it?

Posting Permissions

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