Results 1 to 3 of 3

Thread: Script Change????

Hybrid View

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

    Icon1 Script Change????

    I got help writing these scripts a little while ago but i am wanting to change them now....old idea was to simulate historical accuracy because in 1180 the teutonic knights where just starting to be formed in Acre so i started them out there...in 1211 they were asked by hungary to help fight the kieven/rus but then essentially kicked out by hungary in 1225... in 1217 the crusades against the pagans in the baltic began and in 1225 poland requested help from the teutonic knights to fight the pagans who had invaded prussia and in doing so they gave the order some land and agreed that any land they were to conquer they could keep....anyway here are my current scripts to simulate these historic events....

    Script
    ;;;;;;;;;;;;;;;;;;;;;;;; Hungary Requests Help ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

    declare_counter aid_hungary_timer

    monitor_event PreFactionTurnStart FactionIsLocal
    and FactionType teutonic_order
    and I_EventCounter aid_hungary_accepted = 0
    if I_TurnNumber > 42
    set_counter aid_hungary_timer 1
    end_if
    if I_TurnNumber > 42
    inc_counter aid_hungary_timer 1
    end_if
    if I_CompareCounter aid_hungary_timer = 8
    set_counter aid_hungary_timer 1
    end_if
    end_monitor

    monitor_event FactionTurnStart FactionIsLocal
    and FactionType teutonic_order
    and I_EventCounter aid_hungary_accepted = 0
    and I_CompareCounter aid_hungary_timer = 1
    and DiplomaticStanceFromFaction hungary <= Hostile
    and I_SettlementOwner Iasi = hungary
    historic_event aid_hungary true factions { teutonic_order, }
    end_monitor

    monitor_conditions I_EventCounter aid_hungary_accepted = 1
    console_command capture_settlement Iasi
    console_command add_money 25000
    spawn_army
    faction teutonic_order
    character Wenceslaus Vaclav, named character, age 18, x 354, y 224
    traits GoodCommander 5 , LoyaltyStarter 1 , GoodAdministrator 3 , Loyal 4 , PublicFaith 4 , BattleChivalry 4 , StrategyChivalry 3 , Stoic 3 , ReligiousActivity 2 , ReligionStarter 1
    unit TO Bodyguard exp 6 armour 3 weapon_lvl 0
    unit Teutonic Knights exp 3 armour 1 weapon_lvl 0
    unit Teutonic Knights exp 3 armour 1 weapon_lvl 0
    unit Teutonic Knights exp 3 armour 1 weapon_lvl 0
    unit Teutonic Knights exp 3 armour 1 weapon_lvl 0
    unit Longbowmen exp 2 armour 1 weapon_lvl 0
    unit Longbowmen exp 2 armour 1 weapon_lvl 0
    unit Longbowmen exp 2 armour 1 weapon_lvl 0
    unit Longbowmen exp 2 armour 1 weapon_lvl 0
    unit Order Spearmen exp 2 armour 1 weapon_lvl 0
    unit Order Spearmen exp 2 armour 1 weapon_lvl 0
    unit Order Spearmen exp 2 armour 1 weapon_lvl 0
    unit Order Spearmen exp 2 armour 1 weapon_lvl 0
    end
    terminate_monitor
    end_monitor

    monitor_conditions I_EventCounter aid_hungary_declined = 1
    set_event_counter aid_hungary_declined 0
    end_monitor

    ;;;;;;;;;;;;;;;;;;;;;;;; Poland Requests Help ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

    declare_counter aid_poland_timer

    monitor_event PreFactionTurnStart FactionIsLocal
    and FactionType teutonic_order
    and I_EventCounter aid_poland_accepted = 0
    if I_TurnNumber > 70
    set_counter aid_poland_timer 1
    end_if
    if I_TurnNumber > 70
    inc_counter aid_poland_timer 1
    end_if
    if I_CompareCounter aid_poland_timer = 8
    set_counter aid_poland_timer 1
    end_if
    end_monitor

    monitor_event FactionTurnStart FactionIsLocal
    and FactionType teutonic_order
    and I_EventCounter aid_poland_accepted = 0
    and I_CompareCounter aid_poland_timer = 1
    and DiplomaticStanceFromFaction poland <= Hostile
    and I_SettlementOwner Marienburg = poland
    and I_SettlementOwner Konigsberg = lithuania
    historic_event aid_poland true factions { teutonic_order, }
    end_monitor

    monitor_conditions I_EventCounter aid_poland_accepted = 1
    console_command capture_settlement Marienburg
    console_command add_money 25000
    spawn_army
    faction teutonic_order
    character Nikolaus von Hesse, named character, age 18, x 293, y 270
    traits GoodCommander 4 , LoyaltyStarter 1 , GoodAdministrator 3 , Loyal 4 , PublicFaith 4 , BattleChivalry 4 , StrategyChivalry 3 , ReligiousActivity 2 , ReligionStarter 1
    unit TO Bodyguard exp 6 armour 3 weapon_lvl 0
    unit Teutonic Knights exp 1 armour 1 weapon_lvl 0
    unit Teutonic Knights exp 1 armour 1 weapon_lvl 0
    unit Teutonic Knights exp 1 armour 1 weapon_lvl 0
    unit Longbowmen exp 1 armour 1 weapon_lvl 0
    unit Longbowmen exp 1 armour 1 weapon_lvl 0
    unit Longbowmen exp 1 armour 1 weapon_lvl 0
    unit Order Spearmen exp 1 armour 1 weapon_lvl 0
    unit Order Spearmen exp 1 armour 1 weapon_lvl 0
    unit Order Spearmen exp 1 armour 1 weapon_lvl 0
    end
    terminate_monitor
    end_monitor

    monitor_conditions I_EventCounter aid_poland_declined = 1
    set_event_counter aid_poland_declined 0
    end_monitor


    What I'm wanting to do is to change these two so that the hungary request event fires the first time hungary and kieven/rus go to war but never again after....i am also wanting to change the poland request to fire when lithuania takes control of konigsberg region...since this game is kinda about rewriting history i don't find it necessary to have them fire on exact dates...if someone could help i would greatly appreciate it...thanks in advance
    Last edited by valvegas1; November 29, 2011 at 04:32 AM.

  2. #2

    Icon1 Re: Script Change????

    valvegas1: Try this:
    Spoiler Alert, click show to read: 
    terminate_monitor = a one time event.
    Code:
    ;;;;;;;;;;;;;;;;;;;;;;;; Hungary Requests Help ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    
    declare_counter aid_hungary
    
    	monitor_event FactionWarDeclared FactionType hungary
    		and TargetFactionType russia
    		set_counter aid_hungary 1
    	terminate_monitor
    	end_monitor
    
    	monitor_event FactionTurnStart FactionIsLocal
    		and FactionType teutonic_order
    		and I_CompareCounter aid_hungary = 1
    		and DiplomaticStanceFromFaction hungary <= Hostile 
    		historic_event aid_hungary true factions { teutonic_order, }
    	terminate_monitor
    	end_monitor
    
    	monitor_conditions I_EventCounter aid_hungary_accepted = 1
    		console_command diplomatic_stance teutonic_order russia war
    		console_command add_money 25000
    	spawn_army 
    		faction teutonic_order
    		character Wenceslaus Vaclav, named character, age 18, x 354, y 224 
    		traits GoodCommander 5 , LoyaltyStarter 1 , GoodAdministrator 3 , Loyal 4 , PublicFaith 4 , BattleChivalry 4 , StrategyChivalry 3 , Stoic 3 , ReligiousActivity 2 , ReligionStarter 1 
    		unit 	TO Bodyguard exp 6 armour 3 weapon_lvl 0
    		unit 	Teutonic Knights 	exp 3 armour 1 weapon_lvl 0
    		unit 	Teutonic Knights 	exp 3 armour 1 weapon_lvl 0
    		unit 	Teutonic Knights 	exp 3 armour 1 weapon_lvl 0
    		unit 	Teutonic Knights 	exp 3 armour 1 weapon_lvl 0
    		unit 	Longbowmen 		exp 2 armour 1 weapon_lvl 0
    		unit 	Longbowmen 		exp 2 armour 1 weapon_lvl 0
    		unit 	Longbowmen 		exp 2 armour 1 weapon_lvl 0
    		unit 	Longbowmen 		exp 2 armour 1 weapon_lvl 0
    		unit 	Order Spearmen 		exp 2 armour 1 weapon_lvl 0
    		unit 	Order Spearmen 		exp 2 armour 1 weapon_lvl 0
    		unit 	Order Spearmen 		exp 2 armour 1 weapon_lvl 0
    		unit 	Order Spearmen 		exp 2 armour 1 weapon_lvl 0
    	end
    	terminate_monitor
    	end_monitor
    
    ;;;;;;;;;;;;;;;;;;;;;;;; Poland Requests Help ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    
    declare_counter aid_poland
    
    	monitor_event GeneralCaptureSettlement FactionType lithuania
        		and TargetFactionType poland
    		and SettlementName Konigsberg
    		set_counter aid_poland 1
    	terminate_monitor
    	end_monitor
    
    	monitor_event FactionTurnStart FactionIsLocal
    		and FactionType teutonic_order
    		and I_CompareCounter aid_poland = 1
    		and DiplomaticStanceFromFaction poland <= Hostile
    		and I_SettlementOwner Konigsberg = lithuania
    		historic_event aid_poland true factions { teutonic_order, }
    	terminate_monitor
    	end_monitor
    
    	monitor_conditions I_EventCounter aid_poland_accepted = 1
    		console_command diplomatic_stance teutonic_order lithuania war
    		console_command add_money 25000
    	spawn_army 
    		faction teutonic_order
    		character Nikolaus von Hesse, named character, age 18, x 293, y 270 
    		traits GoodCommander 4 , LoyaltyStarter 1 , GoodAdministrator 3 , Loyal 4 , PublicFaith 4 , BattleChivalry 4 , StrategyChivalry 3 , ReligiousActivity 2 , ReligionStarter 1 
    		unit 	TO Bodyguard exp 6 armour 3 weapon_lvl 0
    		unit 	Teutonic Knights 	exp 1 armour 1 weapon_lvl 0
    		unit 	Teutonic Knights 	exp 1 armour 1 weapon_lvl 0
    		unit 	Teutonic Knights 	exp 1 armour 1 weapon_lvl 0
    		unit 	Longbowmen 		exp 1 armour 1 weapon_lvl 0
    		unit 	Longbowmen 		exp 1 armour 1 weapon_lvl 0
    		unit 	Longbowmen 		exp 1 armour 1 weapon_lvl 0
    		unit 	Order Spearmen 		exp 1 armour 1 weapon_lvl 0
    		unit 	Order Spearmen 		exp 1 armour 1 weapon_lvl 0
    		unit 	Order Spearmen 		exp 1 armour 1 weapon_lvl 0
    	end
    	terminate_monitor
    	end_monitor

  3. #3

    Default Re: Script Change????

    Thanks much TNZ...when i am home and have a chance i'll test it out...i had a feeling it was going to involve changing the entire layout of the script....i trying to do it just by changing the turn number command into a check of diplomatic stance but nothing i tried worked so i consulted the experts.....thanks much bro

Posting Permissions

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