Results 1 to 10 of 10

Thread: some script

  1. #1

    Default some script

    campaign_script;i want too make script that notice every new turn if the faction that is played by the player is in civil war or not,not the ai factions,but something wrong i get sometimes two times message of cival war other times 6 times,but would have only one message appears that tells the player if he is in civil war or not,am losing mine hair here lol

    here is campaign script;
    Code:
    ;unrest minus bonus while king has civil war;POLAND
    monitor_event FactionTurnStart poland
    and not IsFactionAIControlled
    and I_FactionLeaderTrait poland Offensive_To_Nobles >= 1
    
    
         set_event_counter civil_war_poland_going_on 1
    
    
    historic_event CIVIL_WAR  factions { poland, }
                    
    end_monitor
    
    
    monitor_event FactionTurnStart poland
    and not IsFactionAIControlled
    
    
      and I_EventCounter civil_war_poland_going_on = 1
      and I_FactionLeaderTrait poland Offensive_To_Nobles < 1
    
    
            set_event_counter civil_war_poland_going_on 0
    
    
        historic_event END_CIVIL_WAR  factions { poland, }
            
    end_monitor
    
    
    ;spain
    monitor_event FactionTurnStart spain
    and not IsFactionAIControlled
    
    
        
      and I_FactionLeaderTrait spain Offensive_To_Nobles >= 1
         set_event_counter civil_war_spain_going_on 1
    
    
          historic_event CIVIL_WAR  factions { all, }      
              
    end_monitor
    
    
      monitor_event FactionTurnStart spain
    and not IsFactionAIControlled
    
    
      and I_EventCounter civil_war_spain_going_on = 1
      and I_FactionLeaderTrait spain Offensive_To_Nobles < 1
    
    
            set_event_counter civil_war_spain_going_on 0
        historic_event END_CIVIL_WAR  factions { all, }    
    end_monitor
    
    
    ;hungary
    monitor_event FactionTurnStart hungary
    and not IsFactionAIControlled
    
    
        
      and I_FactionLeaderTrait hungary Offensive_To_Nobles >= 1
         set_event_counter civil_war_hungary_going_on 1
          historic_event CIVIL_WAR  factions { all, }           
    end_monitor
    
    
      monitor_event FactionTurnStart hungary
    and not IsFactionAIControlled
    
    
      and I_EventCounter civil_war_hungary_going_on = 1
      and I_FactionLeaderTrait hungary Offensive_To_Nobles < 1
    
    
            set_event_counter civil_war_hungary_going_on 0
        historic_event END_CIVIL_WAR  factions { all, }        
    end_monitor
    
    
    ;england
    monitor_event FactionTurnStart england
    and not IsFactionAIControlled
    
    
        
      and I_FactionLeaderTrait england Offensive_To_Nobles >= 1
         set_event_counter civil_war_england_going_on 1
          historic_event CIVIL_WAR  factions { all, }           
    end_monitor
    
    
      monitor_event FactionTurnStart england
    and not IsFactionAIControlled
    
    
      and I_EventCounter civil_war_england_going_on = 1
      and I_FactionLeaderTrait england Offensive_To_Nobles < 1
    
    
            set_event_counter civil_war_england_going_on 0
        historic_event END_CIVIL_WAR  factions { all, }    
    end_monitor
    
    
    ;norway
    monitor_event FactionTurnStart norway
    and not IsFactionAIControlled
    
    
        
      and I_FactionLeaderTrait norway Offensive_To_Nobles >= 1
         set_event_counter civil_war_norway_going_on 1
          historic_event CIVIL_WAR  factions { all, }           
    end_monitor
    
    
      monitor_event FactionTurnStart norway
    and not IsFactionAIControlled
    
    
      and I_EventCounter civil_war_norway_going_on = 1
      and I_FactionLeaderTrait norway Offensive_To_Nobles < 1
    
    
            set_event_counter civil_war_norway_going_on 0
        historic_event END_CIVIL_WAR  factions { all, }        
    end_monitor
    
    
    ;teutonic_order
    monitor_event FactionTurnStart teutonic_order
    and not IsFactionAIControlled
    
    
        
      and I_FactionLeaderTrait teutonic_order Offensive_To_Nobles >= 1
         set_event_counter civil_war_teutonic_order_going_on 1
          historic_event CIVIL_WAR  factions { all, }          
    end_monitor
    
    
      monitor_event FactionTurnStart teutonic_order
    and not IsFactionAIControlled
    
    
      and I_EventCounter civil_war_teutonic_order_going_on = 1
      and I_FactionLeaderTrait teutonic_order Offensive_To_Nobles < 1
    
    
            set_event_counter civil_war_teutonic_order_going_on 0
        historic_event END_CIVIL_WAR  factions { all, }        
    end_monitor
    
    
    ;denmark
    monitor_event FactionTurnStart denmark
    and not IsFactionAIControlled
    
    
        
      and I_FactionLeaderTrait denmark Offensive_To_Nobles >= 1
         set_event_counter civil_war_denmark_going_on 1
          historic_event CIVIL_WAR  factions { all, }           
    end_monitor
    
    
      monitor_event FactionTurnStart denmark
    and not IsFactionAIControlled
    
    
      and I_EventCounter civil_war_denmark_going_on = 1
      and I_FactionLeaderTrait denmark Offensive_To_Nobles < 1
    
    
            set_event_counter civil_war_denmark_going_on 0
        historic_event END_CIVIL_WAR  factions { all, }    
    end_monitor
    
    
    ;antioch
    monitor_event FactionTurnStart antioch
    and not IsFactionAIControlled
    
    
        
      and I_FactionLeaderTrait antioch Offensive_To_Nobles >= 1
         set_event_counter civil_war_antioch_going_on 1
          historic_event CIVIL_WAR  factions { all, }           
    end_monitor
    
    
      monitor_event FactionTurnStart antioch
    and not IsFactionAIControlled
    
    
      and I_EventCounter civil_war_antioch_going_on = 1
      and I_FactionLeaderTrait antioch Offensive_To_Nobles < 1
    
    
            set_event_counter civil_war_antioch_going_on 0
        historic_event END_CIVIL_WAR  factions { all, }        
    end_monitor
    
    
    ;france
    monitor_event FactionTurnStart france
    and not IsFactionAIControlled
        
      and I_FactionLeaderTrait france Offensive_To_Nobles >= 1
         set_event_counter civil_war_france_going_on 1
          historic_event CIVIL_WAR  factions { all, }          
    end_monitor
    
    
      monitor_event FactionTurnStart france
    and not IsFactionAIControlled
    
    
      and I_EventCounter civil_war_france_going_on = 1
      and I_FactionLeaderTrait france Offensive_To_Nobles < 1
    
    
            set_event_counter civil_war_france_going_on 0
        historic_event END_CIVIL_WAR  factions { all, }        
    end_monitor
    
    
    ;hre
    monitor_event FactionTurnStart hre
    and not IsFactionAIControlled
        
      and I_FactionLeaderTrait hre Offensive_To_Nobles >= 1
         set_event_counter civil_war_hre_going_on 1
          historic_event CIVIL_WAR  factions { all, }          
    end_monitor
    
    
      monitor_event FactionTurnStart hre
    and not IsFactionAIControlled
    
    
      and I_EventCounter civil_war_hre_going_on = 1
      and I_FactionLeaderTrait hre Offensive_To_Nobles < 1
    
    
            set_event_counter civil_war_hre_going_on 0
        historic_event END_CIVIL_WAR  factions { all, }    
    end_monitor
    
    
    ;venice
    monitor_event FactionTurnStart venice
    and not IsFactionAIControlled
    
    
        
      and I_FactionLeaderTrait venice Offensive_To_Nobles >= 1
         set_event_counter civil_war_venice_going_on 1
          historic_event CIVIL_WAR  factions { all, }          
    end_monitor
    
    
      monitor_event FactionTurnStart venice
    and not IsFactionAIControlled
    
    
      and I_EventCounter civil_war_venice_going_on = 1
      and I_FactionLeaderTrait venice Offensive_To_Nobles < 1
    
    
            set_event_counter civil_war_venice_going_on 0
        historic_event END_CIVIL_WAR  factions { all, }    
    end_monitor
    
    
    ;sicily
    monitor_event FactionTurnStart sicily
    and not IsFactionAIControlled
    
    
        
      and I_FactionLeaderTrait sicily Offensive_To_Nobles >= 1
         set_event_counter civil_war_sicily_going_on 1
          historic_event CIVIL_WAR  factions { all, }           
    end_monitor
    
    
      monitor_event FactionTurnStart sicily
    and not IsFactionAIControlled
    
    
      and I_EventCounter civil_war_sicily_going_on = 1
      and I_FactionLeaderTrait sicily Offensive_To_Nobles < 1
    
    
            set_event_counter civil_war_sicily_going_on 0
        historic_event END_CIVIL_WAR  factions { all, }        
    end_monitor
    
    
    ;aztecs
    monitor_event FactionTurnStart aztecs
    and not IsFactionAIControlled
    
    
        
      and I_FactionLeaderTrait aztecs Offensive_To_Nobles >= 1
         set_event_counter civil_war_aztecs_going_on 1
          historic_event CIVIL_WAR  factions { all, }          
    end_monitor
    
    
      monitor_event FactionTurnStart aztecs
    and not IsFactionAIControlled
    
    
      and I_EventCounter civil_war_aztecs_going_on = 1
      and I_FactionLeaderTrait aztecs Offensive_To_Nobles < 1
    
    
            set_event_counter civil_war_aztecs_going_on 0
        historic_event END_CIVIL_WAR  factions { all, }        
    end_monitor
    
    
    ;saxons
    monitor_event FactionTurnStart saxons
    and not IsFactionAIControlled
    
    
        
      and I_FactionLeaderTrait saxons Offensive_To_Nobles >= 1
         set_event_counter civil_war_saxons_going_on 1
          historic_event CIVIL_WAR  factions { all, }           
    end_monitor
    
    
      monitor_event FactionTurnStart saxons
    and not IsFactionAIControlled
    
    
      and I_EventCounter civil_war_saxons_going_on = 1
      and I_FactionLeaderTrait saxons Offensive_To_Nobles < 1
    
    
            set_event_counter civil_war_saxons_going_on 0
        historic_event END_CIVIL_WAR  factions { all, }    
    end_monitor
    
    
    ;scotland
    monitor_event FactionTurnStart scotland
    and not IsFactionAIControlled
    
    
        
      and I_FactionLeaderTrait scotland Offensive_To_Nobles >= 1
         set_event_counter civil_war_scotland_going_on 1
          historic_event CIVIL_WAR  factions { all, }            
    end_monitor
    
    
      monitor_event FactionTurnStart scotland
    and not IsFactionAIControlled
    
    
      and I_EventCounter civil_war_scotland_going_on = 1
      and I_FactionLeaderTrait scotland Offensive_To_Nobles < 1
    
    
            set_event_counter civil_war_scotland_going_on 0
        historic_event END_CIVIL_WAR  factions { all, }        
    end_monitor
    
    
    ;bulgaria
    monitor_event FactionTurnStart bulgaria
    and not IsFactionAIControlled
    
    
        
      and I_FactionLeaderTrait bulgaria Offensive_To_Nobles >= 1
         set_event_counter civil_war_bulgaria_going_on 1
          historic_event CIVIL_WAR  factions { all, }            
    end_monitor
    
    
      monitor_event FactionTurnStart bulgaria
    and not IsFactionAIControlled
    
    
      and I_EventCounter civil_war_bulgaria_going_on = 1
      and I_FactionLeaderTrait bulgaria Offensive_To_Nobles < 1
    
    
            set_event_counter civil_war_bulgaria_going_on 0
        historic_event END_CIVIL_WAR  factions { all, }        
    end_monitor
    
    
    ;russia
    monitor_event FactionTurnStart russia
    and not IsFactionAIControlled
    
    
        
      and I_FactionLeaderTrait russia Offensive_To_Nobles >= 1
         set_event_counter civil_war_russia_going_on 1
          historic_event CIVIL_WAR  factions { all, }          
    end_monitor
    
    
      monitor_event FactionTurnStart russia
    and not IsFactionAIControlled
    
    
      and I_EventCounter civil_war_russia_going_on = 1
      and I_FactionLeaderTrait russia Offensive_To_Nobles < 1
    
    
            set_event_counter civil_war_russia_going_on 0
        historic_event END_CIVIL_WAR  factions { all, }    
    end_monitor
    
    
    ;portugal
    monitor_event FactionTurnStart portugal
    and not IsFactionAIControlled
    
    
        
      and I_FactionLeaderTrait portugal Offensive_To_Nobles >= 1
         set_event_counter civil_war_portugal_going_on 1
          historic_event CIVIL_WAR  factions { all, }          
    end_monitor
    
    
      monitor_event FactionTurnStart portugal
    and not IsFactionAIControlled
    
    
      and I_EventCounter civil_war_portugal_going_on = 1
      and I_FactionLeaderTrait portugal Offensive_To_Nobles < 1
    
    
            set_event_counter civil_war_portugal_going_on 0
        historic_event END_CIVIL_WAR  factions { all, }    
    end_monitor
    
    
    ;mongols
    monitor_event FactionTurnStart mongols
    and not IsFactionAIControlled
    
    
        
      and I_FactionLeaderTrait mongols Offensive_To_Nobles >= 1
         set_event_counter civil_war_mongols_going_on 1
          historic_event CIVIL_WAR  factions { all, }          
    end_monitor
    
    
      monitor_event FactionTurnStart mongols
    and not IsFactionAIControlled
    
    
      and I_EventCounter civil_war_mongols_going_on = 1
      and I_FactionLeaderTrait mongols Offensive_To_Nobles < 1
    
    
            set_event_counter civil_war_mongols_going_on 0
        historic_event END_CIVIL_WAR  factions { all, }    
    end_monitor
    
    
    ;egypt
    monitor_event FactionTurnStart egypt
    and not IsFactionAIControlled
    
    
        
      and I_FactionLeaderTrait egypt Offensive_To_Nobles >= 1
         set_event_counter civil_war_egypt_going_on 1
          historic_event CIVIL_WAR  factions { all, }          
    end_monitor
    
    
      monitor_event FactionTurnStart egypt
    and not IsFactionAIControlled
    
    
      and I_EventCounter civil_war_egypt_going_on = 1
      and I_FactionLeaderTrait egypt Offensive_To_Nobles < 1
    
    
            set_event_counter civil_war_egypt_going_on 0
        historic_event END_CIVIL_WAR  factions { all, }    
    end_monitor
    
    
    ;milan
    monitor_event FactionTurnStart milan
    and not IsFactionAIControlled
    
    
        
      and I_FactionLeaderTrait milan Offensive_To_Nobles >= 1
         set_event_counter civil_war_milan_going_on 1
          historic_event CIVIL_WAR  factions { all, }          
    end_monitor
    
    
      monitor_event FactionTurnStart milan
    and not IsFactionAIControlled
    
    
      and I_EventCounter civil_war_milan_going_on = 1
      and I_FactionLeaderTrait milan Offensive_To_Nobles < 1
    
    
            set_event_counter civil_war_milan_going_on 0
        historic_event END_CIVIL_WAR  factions { all, }        
    end_monitor
    
    
    ;wales
    monitor_event FactionTurnStart wales
    and not IsFactionAIControlled
    
    
        
      and I_FactionLeaderTrait wales Offensive_To_Nobles >= 1
         set_event_counter civil_war_wales_going_on 1
          historic_event CIVIL_WAR  factions { all, }           
    end_monitor
    
    
      monitor_event FactionTurnStart wales
    and not IsFactionAIControlled
    
    
      and I_EventCounter civil_war_wales_going_on = 1
      and I_FactionLeaderTrait wales Offensive_To_Nobles < 1
    
    
            set_event_counter civil_war_wales_going_on 0
        historic_event END_CIVIL_WAR  factions { all, }    
    end_monitor
    
    
    ;lithuania
    monitor_event FactionTurnStart lithuania
    and not IsFactionAIControlled
    
    
        
      and I_FactionLeaderTrait lithuania Offensive_To_Nobles >= 1
         set_event_counter civil_war_lithuania_going_on 1
          historic_event CIVIL_WAR  factions { all, }          
    end_monitor
    
    
      monitor_event FactionTurnStart lithuania
    and not IsFactionAIControlled
    
    
      and I_EventCounter civil_war_lithuania_going_on = 1
      and I_FactionLeaderTrait lithuania Offensive_To_Nobles < 1
    
    
            set_event_counter civil_war_lithuania_going_on 0
        historic_event END_CIVIL_WAR  factions { all, }    
    end_monitor
    
    
    ;moors
    monitor_event FactionTurnStart moors
    and not IsFactionAIControlled
    
    
        
      and I_FactionLeaderTrait moors Offensive_To_Nobles >= 1
         set_event_counter civil_war_moors_going_on 1
          historic_event CIVIL_WAR  factions { all, }          
    end_monitor
    
    
      monitor_event FactionTurnStart moors
    and not IsFactionAIControlled
    
    
      and I_EventCounter civil_war_moors_going_on = 1
      and I_FactionLeaderTrait moors Offensive_To_Nobles < 1
    
    
            set_event_counter civil_war_moors_going_on 0
        historic_event END_CIVIL_WAR  factions { all, }    
    end_monitor
    ;ghazni
    monitor_event FactionTurnStart ghazni
    and not IsFactionAIControlled
    
    
        
      and I_FactionLeaderTrait ghazni Offensive_To_Nobles >= 1
         set_event_counter civil_war_ghazni_going_on 1
      historic_event CIVIL_WAR  factions { all, }              
    end_monitor
    
    
      monitor_event FactionTurnStart ghazni
    and not IsFactionAIControlled
    
    
      and I_EventCounter civil_war_ghazni_going_on = 1
      and I_FactionLeaderTrait ghazni Offensive_To_Nobles < 1
    
    
            set_event_counter civil_war_ghazni_going_on 0
        historic_event END_CIVIL_WAR  factions { all, }    
    end_monitor
    
    
    ;byzantium
    monitor_event FactionTurnStart byzantium
    and not IsFactionAIControlled
    
    
        
      and I_FactionLeaderTrait byzantium Offensive_To_Nobles >= 1
         set_event_counter civil_war_byzantium_going_on 1
          historic_event CIVIL_WAR  factions { all, }          
    end_monitor
    
    
      monitor_event FactionTurnStart byzantium
    and not IsFactionAIControlled
    
    
      and I_EventCounter civil_war_byzantium_going_on = 1
      and I_FactionLeaderTrait byzantium Offensive_To_Nobles < 1
    
    
            set_event_counter civil_war_byzantium_going_on 0
        historic_event END_CIVIL_WAR  factions { all, }    
    end_monitor
    
    
    ;turks
    monitor_event FactionTurnStart turks
    and not IsFactionAIControlled
    
    
        
      and I_FactionLeaderTrait turks Offensive_To_Nobles >= 1
         set_event_counter civil_war_turks_going_on 1
          historic_event CIVIL_WAR  factions { all, }          
    end_monitor
    
    
      monitor_event FactionTurnStart turks
    and not IsFactionAIControlled
    
    
      and I_EventCounter civil_war_turks_going_on = 1
      and I_FactionLeaderTrait turks Offensive_To_Nobles < 1
    
    
            set_event_counter civil_war_turks_going_on 0
        historic_event END_CIVIL_WAR  factions { all, }    
    end_monitor
    
    
    ;timurids
    monitor_event FactionTurnStart timurids
    and not IsFactionAIControlled
    
    
        
      and I_FactionLeaderTrait timurids Offensive_To_Nobles >= 1
         set_event_counter civil_war_timurids_going_on 1
          historic_event CIVIL_WAR  factions { all, }          
    end_monitor
    
    
      monitor_event FactionTurnStart timurids
    and not IsFactionAIControlled
    
    
      and I_EventCounter civil_war_timurids_going_on = 1
      and I_FactionLeaderTrait timurids Offensive_To_Nobles < 1
    
    
            set_event_counter civil_war_timurids_going_on 0
        historic_event END_CIVIL_WAR  factions { all, }    
    end_monitor
    
    
    ;georgia
    monitor_event FactionTurnStart georgia
    and not IsFactionAIControlled
    
    
        
      and I_FactionLeaderTrait georgia Offensive_To_Nobles >= 1
         set_event_counter civil_war_georgia_going_on 1
          historic_event CIVIL_WAR  factions { all, }          
    end_monitor
    
    
      monitor_event FactionTurnStart georgia
    and not IsFactionAIControlled
    
    
      and I_EventCounter civil_war_georgia_going_on = 1
      and I_FactionLeaderTrait georgia Offensive_To_Nobles < 1
    
    
            set_event_counter civil_war_georgia_going_on 0
        historic_event END_CIVIL_WAR  factions { all, }    
    end_monitor
    and here is in export buildings;
    Code:
            happiness_bonus bonus -2 requires factions { spain, } and event_counter civil_war_spain_going_on 1        
            happiness_bonus bonus -2 requires factions { ghazni, } and event_counter civil_war_ghazni_going_on 1
            happiness_bonus bonus -2 requires factions { france, } and event_counter civil_war_france_going_on 1
            happiness_bonus bonus -2 requires factions { portugal, } and event_counter civil_war_portugal_going_on 1
            happiness_bonus bonus -2 requires factions { england, } and event_counter civil_war_england_going_on 1
            happiness_bonus bonus -2 requires factions { scotland, } and event_counter civil_war_scotland_going_on 1
            happiness_bonus bonus -2 requires factions { norway, } and event_counter civil_war_norway_going_on 1
            happiness_bonus bonus -2 requires factions { denmark, } and event_counter civil_war_denmark_going_on 1
            happiness_bonus bonus -2 requires factions { hre, } and event_counter civil_war_hre_going_on 1
            happiness_bonus bonus -2 requires factions { poland, } and event_counter civil_war_poland_going_on 1
            happiness_bonus bonus -2 requires factions { hungary, } and event_counter civil_war_hungary_going_on 1
            happiness_bonus bonus -2 requires factions { venice, } and event_counter civil_war_venice_going_on 1
            happiness_bonus bonus -2 requires factions { sicily, } and event_counter civil_war_sicily_going_on 1
            happiness_bonus bonus -2 requires factions { saxons, } and event_counter civil_war_saxons_going_on 1
            happiness_bonus bonus -2 requires factions { milan, } and event_counter civil_war_milan_going_on 1
            happiness_bonus bonus -2 requires factions { antioch, } and event_counter civil_war_antioch_going_on 1
            happiness_bonus bonus -2 requires factions { teutonic_order, } and event_counter civil_war_teutonic_order_going_on 1
            happiness_bonus bonus -2 requires factions { byzantium, } and event_counter civil_war_byzantium_going_on 1
            happiness_bonus bonus -2 requires factions { timurids, } and event_counter civil_war_timurids_going_on 1
            happiness_bonus bonus -2 requires factions { russia, } and event_counter civil_war_russia_going_on 1
            happiness_bonus bonus -2 requires factions { bulgaria, } and event_counter civil_war_bulgaria_going_on 1
            happiness_bonus bonus -2 requires factions { mongols, } and event_counter civil_war_mongols_going_on 1
            happiness_bonus bonus -2 requires factions { lithuania, } and event_counter civil_war_lithuania_going_on 1
            happiness_bonus bonus -2 requires factions { moors, } and event_counter civil_war_moors_going_on 1
            happiness_bonus bonus -2 requires factions { turks, } and event_counter civil_war_turks_going_on 1
            happiness_bonus bonus -2 requires factions { aztecs, } and event_counter civil_war_aztecs_going_on 1
            happiness_bonus bonus -2 requires factions { wales, } and event_counter civil_war_wales_going_on 1
            happiness_bonus bonus -2 requires factions { egypt, } and event_counter civil_war_egypt_going_on 1
                    happiness_bonus bonus -2 requires factions { georgia, } and event_counter civil_war_georgia_going_on 1
            law_bonus bonus -1 requires factions { spain, } and event_counter civil_war_spain_going_on 1
            law_bonus bonus -1 requires factions { ghazni, } and event_counter civil_war_ghazni_going_on 1
            law_bonus bonus -1 requires factions { france, } and event_counter civil_war_france_going_on 1
            law_bonus bonus -1 requires factions { portugal, } and event_counter civil_war_portugal_going_on 1
            law_bonus bonus -1 requires factions { england, } and event_counter civil_war_england_going_on 1
            law_bonus bonus -1 requires factions { scotland, } and event_counter civil_war_scotland_going_on 1
            law_bonus bonus -1 requires factions { norway, } and event_counter civil_war_norway_going_on 1
            law_bonus bonus -1 requires factions { denmark, } and event_counter civil_war_denmark_going_on 1
            law_bonus bonus -1 requires factions { hre, } and event_counter civil_war_hre_going_on 1
            law_bonus bonus -1 requires factions { poland, } and event_counter civil_war_poland_going_on 1
            law_bonus bonus -1 requires factions { hungary, } and event_counter civil_war_hungary_going_on 1
            law_bonus bonus -1 requires factions { venice, } and event_counter civil_war_venice_going_on 1
            law_bonus bonus -1 requires factions { sicily, } and event_counter civil_war_sicily_going_on 1
            law_bonus bonus -1 requires factions { saxons, } and event_counter civil_war_saxons_going_on 1
            law_bonus bonus -1 requires factions { milan, } and event_counter civil_war_milan_going_on 1
            law_bonus bonus -1 requires factions { antioch, } and event_counter civil_war_antioch_going_on 1
            law_bonus bonus -1 requires factions { teutonic_order, } and event_counter civil_war_teutonic_order_going_on 1
            law_bonus bonus -1 requires factions { byzantium, } and event_counter civil_war_byzantium_going_on 1
            law_bonus bonus -1 requires factions { timurids, } and event_counter civil_war_timurids_going_on 1
            law_bonus bonus -1 requires factions { russia, } and event_counter civil_war_russia_going_on 1
            law_bonus bonus -1 requires factions { bulgaria, } and event_counter civil_war_bulgaria_going_on 1
            law_bonus bonus -1 requires factions { mongols, } and event_counter civil_war_mongols_going_on 1
            law_bonus bonus -1 requires factions { lithuania, } and event_counter civil_war_lithuania_going_on 1
            law_bonus bonus -1 requires factions { moors, } and event_counter civil_war_moors_going_on 1
            law_bonus bonus -1 requires factions { turks, } and event_counter civil_war_turks_going_on 1
            law_bonus bonus -1 requires factions { aztecs, } and event_counter civil_war_aztecs_going_on 1
            law_bonus bonus -1 requires factions { wales, } and event_counter civil_war_wales_going_on 1
            law_bonus bonus -1 requires factions { egypt, } and event_counter civil_war_egypt_going_on 1
                    law_bonus bonus -1 requires factions { georgia, } and event_counter civil_war_georgia_going_on 1

  2. #2

    Default Re: some script

    Maybe you have the same issue with the blank lines as you had before. EDIT: You can also do this:

    Code:
    monitor_event FactionTurnStart not IsFactionAIControlled
    
        if I_LocalFaction poland
            if I_EventCounter CIVIL_WAR_poland = 1
            and I_FactionLeaderTrait poland Offensive_To_Nobles < 1
                set_event_counter CIVIL_WAR_poland 0
                historic_event END_CIVIL_WAR_poland factions { poland, }
            end_if
            if I_FactionLeaderTrait poland Offensive_To_Nobles >= 1
            and I_EventCounter CIVIL_WAR_poland = 0
                historic_event CIVIL_WAR_poland factions { poland, }
            end_if
        end_if
    ;repeat for other factions
     end_monitor
    and edit accordingly in the EDB.
    Thus, you won't have the "civil war" messages pop up multiple times per civil war
    Last edited by gsthoed; February 09, 2015 at 12:24 PM.

  3. #3

    Default Re: some script

    ok thanks i will try it that way and the thing from before i have fixed it and now it works.

    and funny... just tested it some different ways just a few minutes before,(before i came online again)and if i put this line ;

    Code:
    monitor_event PreFactionTurnStart FactionIsLocal    
                          and FactionType poland
              and not IsFactionAIControlled
              and I_FactionLeaderTrait poland Offensive_To_Nobles >= 1
    
    
         set_event_counter civil_war_poland_going_on 1
    
    
    historic_event CIVIL_WAR  factions { poland, }
                    
    end_monitor
    
    
    monitor_event PreFactionTurnStart FactionIsLocal
        and FactionType poland
    
    
      and I_EventCounter civil_war_poland_going_on = 1
      and I_FactionLeaderTrait poland Offensive_To_Nobles < 1
    
    
            set_event_counter civil_war_poland_going_on 0
    
    
        historic_event END_CIVIL_WAR  factions { poland, }
            
    end_monitor
    it seems too work too i got one message when mine king get the offense of nobles trait,the one of civil war,only got too test if i get a message again if the king lose the offense too nobles trait and so civil war end, and then when he got it again visa versa.but the lines between are normal not there it just the way this text is here.
    Last edited by stevietheconquer; February 09, 2015 at 12:37 PM.

  4. #4

    Default Re: some script

    In the first monitor, the FactionIsLocal condition is redundant: if at PreFactionTurnStart they are not AIControlled, then they are the local faction. In the second monitor, if you care about the script running correctly without any problem when they are no factions under human control, the same condition should be replaced with "not IsFactionAIControlled" .

    Try also run your test for one more time: if the civil war has not end, the first monitor will pop up the CIVIL_WAR message for one more time.

  5. #5

    Default Re: some script

    i just deleted the not isfactionaicontrolled, just got that only with poland,thanks for seeing that,test it again it took me too 8 round before king gets the message civil war,if he got trait offense too nobles,only one message he get,the next turn he still got the trait offense too nobles and get again(like i wanted the message civil_war) so this part seems too doin good,the only question is will it trigger the minus bonus for happiness and minus order for the buildings?(code in export_buildings)i known this is difficult too test.
    and i known some other mods are using this code in export_buildings

    edit;do i trigger this minus happiness and minus bonus code in export_buildings text by set_event_counter civil_war_poland_going_on 1,for poland in this line?
    Last edited by stevietheconquer; February 09, 2015 at 01:12 PM.

  6. #6

    Default Re: some scriptSOLVED

    ok after testing this i found out that it is working,just forget too delete trait offensive too nobles when cival war was over but fixed that and now it works like it schould,thanks for the factionislocal thing

    it only gives one message,when the civil war is over,and give every turn i message when the civil war is turning,so now everything is like i wanted.

  7. #7

    Default Re: some script

    A "minus bonus" is called a "penalty".

    Quote Originally Posted by gsthoed
    In the second monitor, if you care about the script running correctly without any problem when they are no factions under human control, the same condition should be replaced with "not IsFactionAIControlled"
    Can you explain this?
    Last edited by k/t; February 16, 2015 at 01:47 AM.

  8. #8

    Default Re: some script

    maybe others if you not say faction islocal you get a event picture for every faction that is in civil war?this is what i got the first time lol;clicking manny times after end turn.

  9. #9
    Vipman's Avatar Protector Domesticus
    Join Date
    Jul 2010
    Location
    Romania
    Posts
    4,405

    Default Re: some script

    From what I remember it's better to use "not IsFactionAIControlled" instead of the "FactionIsLocal" one in scripts because the latter doesn't work properly in hotseats where you can change faction between human and AI control anytime. F.e. some money for AI scripts remain although you change the control.

    When you start the hotseat the factions are set as human or AI and this "label" remains in scripts even if you change their control later. I wonder if "Local" and notAIcontrolled are different, local faction(s) are set at the start, then when you change it's control the faction is still local but AIcontrolled, that could be great.

    @gsthoed or anyone who knows, can I get a link to the thread where this was discussed, I didn't bookmark it and I don't remember where I read about this...
    Last edited by Vipman; February 17, 2015 at 04:33 PM.

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

Posting Permissions

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