Results 1 to 3 of 3

Thread: Scripting a Request for help????

Hybrid View

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

    Default Scripting a Request for help????

    How would I go about scripting a yes/no event on specific dates where Poland asks the Teutonic Order for help fighting the Pagans in the Baltic. When it fires and Teutonic Order accepts Then Poland gives them Marienburg Region and a small army spawns. If Teutonic Order declines then it resets and The event fires again in a few years.

    I'm using KGCM & HHB and making a ton of changes to add to the realism. I've tried a few variations with no luck so if someone could help me out I would greatly appreciate it.

  2. #2

    Icon1 Re: Scripting a Request for help????

    valvegas1: Try this way:
    Spoiler Alert, click show to read: 
    Code:
    declare_counter aid_poland_timer
    
    	monitor_event PreFactionTurnStart FactionIsLocal
    		and FactionType teutonic_order
    		and I_EventCounter aid_poland_accepted = 0
    		if I_TurnNumber = 60
    		set_counter aid_poland_timer 1
    	end_if
    		if I_TurnNumber > 60
    		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
    		historic_event aid_poland true factions { teutonic_order, }
    	end_monitor
    
    	monitor_conditions I_EventCounter aid_poland_accepted = 1
    		console_command capture_settlement Marienburg
    	spawn_army 
    		faction teutonic_order
    		character	random_name, general, age 26, x ?, y ?
    		unit	Christ Knights			exp 1 armour 0 weapon_lvl 0
    		unit	Sword Brethren			exp 1 armour 0 weapon_lvl 0
    		unit	Prussian Archers		exp 1 armour 0 weapon_lvl 0
    		unit	Prussian Archers		exp 1 armour 0 weapon_lvl 0
    		unit	Order Spearmen			exp 1 armour 0 weapon_lvl 0
    		unit	Order Spearmen			exp 1 armour 0 weapon_lvl 0
    		unit	Clergymen			exp 1 armour 0 weapon_lvl 0
    		unit	Clergymen			exp 1 armour 0 weapon_lvl 0
    		unit	NE Catapult			exp 1 armour 0 weapon_lvl 0
    		unit	NE Catapult			exp 1 armour 0 weapon_lvl 0
    		unit	Mangonel			exp 1 armour 0 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

  3. #3

    Default Re: Scripting a Request for help????

    Thx TNZ that's almost the same as what my last attempt was....i was having a hard time figuring out how to swith marienburg to the teutonic order....i did a bunch of research and figured out shortly after my post that i had to use the capture_settlement command...but thanks for the help i'll try it out...much appreciated....+rep

Posting Permissions

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