Page 1 of 2 12 LastLast
Results 1 to 20 of 26

Thread: IsJihadTarget working?

  1. #1

    Default IsJihadTarget working?

    Is this command working, i cannot seem to get it to work.

    ----------------------------------------------------
    Identifier: IsJihadTarget
    Trigger requirements: settlement
    Parameters:
    Sample use: IsJihadTarget
    Description: Test if the settlement is the current jihad target
    Battle or Strat: Strat
    Class: IS_JIHAD_TARGET
    Implemented: Yes
    Author: Grig

    -----------------------------------------------------

    Here's the sample code;

    Code:
    monitor_event FactionTurnStart FactionType milan
    	
    	and not IsFactionAIControlled
    	and I_LocalFaction milan
    	and IsJihadTarget
    	and I_SettlementOwner Kings-Land = milan
    	and DiplomaticStanceFromFaction sicily = Allied
    	and I_CompareCounter go_edoras2 = 0
    	and I_TurnNumber >= 10
    	and FactionBuildingExists >= beacon_of_edoras
    
    	add_events
    	event counter help7_accepted
    	event counter help7_declined
    	end_add_events
    
    ... etc
    Apparently there's no parameter ??

    Any help thanks

    R
    oOo

    Rome 2 refugee ...

    oOo

  2. #2

    Default Re: IsJihadTarget working?

    i didn't use this condition yet, but i think you should add name of settlement bying target of jihad. Condition
    Code:
    	and I_SettlementOwner Kings-Land = milan
    may be not enought.
    I guess the target of jihaad in your script is not pointed clairly.

    What log says?

  3. #3

    Default Re: IsJihadTarget working?

    I cannot get this to work either ... hmmm


    Code:
    monitor_event FactionTurnStart FactionType milan
    	
    	and not IsFactionAIControlled
    	and I_LocalFaction milan
    	and I_JihadTimeLeft > 4
    	and I_SettlementOwner Kings-Land = milan
    	and DiplomaticStanceFromFaction sicily = Allied
    	and I_CompareCounter go_edoras2 = 0
    	and I_TurnNumber >= 10
    	and FactionBuildingExists >= beacon_of_edoras
    
    	add_events
    	event counter help7_accepted
    	event counter help7_declined
    	end_add_events
    Nor ..

    Code:
          and I_JihadInProgress
    hmmmm.

    R
    oOo

    Rome 2 refugee ...

    oOo

  4. #4
    /|\/|\/|\/|\/|\/|\/
    Join Date
    Jun 2005
    Posts
    10,770

    Default Re: IsJihadTarget working?

    Might help to explain what you're trying to do, how you are testing it, and what happens when you find it doesn't work.

  5. #5

    Default Re: IsJihadTarget working?

    If i understand him well he's trying to make a script giving reinsforcements attacked faction during jihaad. To make it he has to give a condition checking out if specify city is a target of jihaad.

  6. #6
    Squid's Avatar Opifex
    Patrician Artifex Technical Staff

    Join Date
    Feb 2007
    Location
    Frozen waste lands of the north
    Posts
    17,760
    Blog Entries
    3

    Default Re: IsJihadTarget working?

    Quote Originally Posted by Rorarii View Post
    Is this command working, i cannot seem to get it to work.

    ----------------------------------------------------
    Identifier: IsJihadTarget
    Trigger requirements: settlement
    Parameters:
    Sample use: IsJihadTarget
    Description: Test if the settlement is the current jihad target
    Battle or Strat: Strat
    Class: IS_JIHAD_TARGET
    Implemented: Yes
    Author: Grig

    -----------------------------------------------------

    Here's the sample code;

    Code:
    monitor_event FactionTurnStart FactionType milan
        
        and not IsFactionAIControlled
        and I_LocalFaction milan
        and IsJihadTarget
        and I_SettlementOwner Kings-Land = milan
        and DiplomaticStanceFromFaction sicily = Allied
        and I_CompareCounter go_edoras2 = 0
        and I_TurnNumber >= 10
        and FactionBuildingExists >= beacon_of_edoras
    
        add_events
        event counter help7_accepted
        event counter help7_declined
        end_add_events
    
    ... etc
    Apparently there's no parameter ??

    Any help thanks

    R
    It doesn't work because the condition requires the event to export settlement but the FactionTurnStart does not export settlement.
    Under the patronage of Roman_Man#3, Patron of Ishan
    Click for my tools and tutorials
    "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe." -----Albert Einstein

  7. #7

    Default Re: IsJihadTarget working?

    hmm. Interesing... Which one event export settlement?
    Maybe CrusadeCalled event would be OK? But how tu use this event? How to connect this event to specify settlement?
    Last edited by attyla; May 29, 2011 at 03:15 PM.

  8. #8

    Default Re: IsJihadTarget working?

    assume you need something like;

    monitor_event SettlementTurnStart SettlementName xxxx

    to get that to work, done for each possibly relevant settlement name,
    as there isn't a 'which settlements, owned by 'y' faction, fit condition, type command'.
    then put the who it's controlled by / other conditions in as separate clauses within..

  9. #9
    /|\/|\/|\/|\/|\/|\/
    Join Date
    Jun 2005
    Posts
    10,770

    Default Re: IsJihadTarget working?

    It says quite clearly in the log when a condition does not have the export it requires, so it's a good idea to check the log

  10. #10

    Default Re: IsJihadTarget working?

    Thanks all for the assist, I'm trying to get my old brain around scripting ..

    I'm trying to change the Beacon Code so When Sauron calls a Jihad against Edoras, lighting of beacons happens then, not when a enemy unit besieges the settlement. Once i get that working, I'll remove the spawn code so the Gondor player can create their own relief force. The idea being to get rid of the multiple spawns and removal of armies when Edoras is besieged 5+ times. A more realistic single Gondor army created by player would hang around until all threats are removed.

    Here's the working code (that i don't like and want to change)

    Code:
    ;#########################HUMAN	aid script: edoras
    declare_counter go_edoras2
    
    monitor_event FactionTurnStart FactionType milan
    	
    	and not IsFactionAIControlled
    	and I_LocalFaction milan
    	and I_SettlementUnderSiege Kings-Land
    	and I_SettlementOwner Kings-Land = milan
    	and DiplomaticStanceFromFaction sicily = Allied
    	and I_CompareCounter go_edoras2 = 0
    	and I_TurnNumber >= 20
    	and FactionBuildingExists >= beacon_of_edoras
    
    	add_events
    	event counter help7_accepted
    	event counter help7_declined
    	end_add_events
    
    	historic_event help7 true factions { milan, } event/siege.bik
    
    end_monitor
    
    ;----------------- accept ------------------------------------
    monitor_conditions I_EventCounter help7_accepted = 1
    
    	spawn_army 
    	faction milan
    	character	random_name, named character, age 33, x 188, y 150
    		unit	Gondor Infantry Mercs 	exp 3 armour 1 weapon_lvl 0
    		unit	Gondor Infantry Mercs	exp 2 armour 0 weapon_lvl 0
    		unit	Gondor Infantry Mercs	exp 2 armour 0 weapon_lvl 0
    		unit	Gondor Infantry Mercs	exp 2 armour 0 weapon_lvl 0
    		unit	Gondor Spearmen Mercs	exp 2 armour 0 weapon_lvl 0
    		unit	Gondor Spearmen Mercs	exp 2 armour 0 weapon_lvl 0
    		unit	Gondor Spearmen Mercs	exp 2 armour 0 weapon_lvl 0
    		unit	Gondor Spearmen Mercs	exp 2 armour 0 weapon_lvl 0
    		unit	Gondor Archers Mercs	exp 2 armour 0 weapon_lvl 0
    		unit	Gondor Archers Mercs	exp 2 armour 0 weapon_lvl 0
    	end	
    	
    	historic_event help7_accepted factions { milan, }
    	set_event_counter help7_accepted 0
    	set_counter go_edoras2 1
    
    end_monitor
    
    ;------------------ reject ------------------------------------
    monitor_conditions I_EventCounter help7_declined = 1
    
    	historic_event help7_declined factions { milan, }
    	set_event_counter help7_declined 0
    
    end_monitor 
    
    ;----------------- HUMAN post-battle edoras -----------
    monitor_event PostBattle FactionType milan
    	
    	and I_WonBattle milan
    	and IsRegionOneOf 87
    	and I_CompareCounter go_edoras2 = 1
    	add_money milan -2500
    	historic_event won7_ally
    	destroy_units milan Gondor Infantry Mercs
    	destroy_units milan Gondor Spearmen Mercs
    	destroy_units milan Gondor Archers Mercs
    	set_counter go_edoras2 0
    	
    end_monitor
    
    ;------------------ timer ------------------------------------
    declare_counter help7_time_limit
    
    monitor_event FactionTurnStart FactionType milan
    	and I_CompareCounter go_edoras2 = 1
    	inc_counter help7_time_limit 1
    end_monitor
    
    monitor_event FactionTurnStart FactionType milan
    	and I_CompareCounter go_edoras2 = 1
    	and I_CompareCounter help7_time_limit >= 2
    	destroy_units milan Gondor Infantry Mercs
    	destroy_units milan Gondor Spearmen Mercs
    	destroy_units milan Gondor Archers Mercs
    	set_counter go_edoras2 0
    	historic_event lose7_ally
    
    end_monitor
    So i removed the IsUnderSiege and replaced it with IsJihad OR preferrably ISJihadTarget <settlement> .. but it don't wanta work? for some reason? help?

    Logs?? the only log file i can find says all packs are ok?

    Ta

    R
    Last edited by Rorarii; May 30, 2011 at 01:59 AM.
    oOo

    Rome 2 refugee ...

    oOo

  11. #11

    Icon1 Re: IsJihadTarget working?

    When writing script or triggers for ancillaries or traits, it’s really important to understand which events will work with which conditions.

    If we take the ‘FactionTurnStart’ event for an example:
    Code:
    ---------------------------------------------------
    Identifier:         FactionTurnStart
    Event:              A Faction has started its turn
    Exports:            faction
    Class:              ET_FACTION_TURN_START
    Author:             Guy
    ---------------------------------------------------
    As you can see in the ‘exports’ line, it has ‘faction’ listed there. What that means is that it will work with any condition that has ‘faction’ in its ‘trigger requirement’ line. For example the ‘FactionType’ condition will works with the ‘FactionTurnStart’ event:
    Code:
    ---------------------------------------------------
    Identifier:              FactionType
    Trigger requirements:    faction
    Parameters:              faction type
    Sample use:              FactionType romans_julii
    Description:             Test the faction type
    Battle or Strat:         Either
    Class:                   FACTION_TYPE_CHECK
    Implemented:             Yes
    Author:                  Lee
    ---------------------------------------------------
    Rorarii: If you just wanted to change the script so it runs when a Crusade is called against Edoras, this should probably work:
    Spoiler Alert, click show to read: 
    Code:
    ;#########################HUMAN	Aid Script: Edoras
    
    declare_counter go_edoras2
    declare_counter crusad_edoras
    
    	monitor_event CrusadeCalled TargetSettlementName Kings-Land
     		and I_SettlementOwner Kings-Land = milan
    		and I_LocalFaction milan
    		set_counter crusad_edoras 1
    	end_monitor
    
    	monitor_event FactionTurnStart FactionType milan
    		and I_CompareCounter crusad_edoras = 1
    		and I_CompareCounter go_edoras2 = 0
    		and DiplomaticStanceFromFaction sicily = Allied
    		and FactionBuildingExists >= beacon_of_edoras
    		historic_event help7 true factions { milan, } event/siege.bik
    	end_monitor
    
    ;----------------- Accept ------------------------------------
    
    	monitor_conditions I_EventCounter help7_accepted = 1
    	spawn_army 
    		faction milan
    		character	random_name, named character, age 33, x 188, y 150
    		unit	Gondor Infantry Mercs 	exp 3 armour 1 weapon_lvl 0
    		unit	Gondor Infantry Mercs	exp 2 armour 0 weapon_lvl 0
    		unit	Gondor Infantry Mercs	exp 2 armour 0 weapon_lvl 0
    		unit	Gondor Infantry Mercs	exp 2 armour 0 weapon_lvl 0
    		unit	Gondor Spearmen Mercs	exp 2 armour 0 weapon_lvl 0
    		unit	Gondor Spearmen Mercs	exp 2 armour 0 weapon_lvl 0
    		unit	Gondor Spearmen Mercs	exp 2 armour 0 weapon_lvl 0
    		unit	Gondor Spearmen Mercs	exp 2 armour 0 weapon_lvl 0
    		unit	Gondor Archers Mercs	exp 2 armour 0 weapon_lvl 0
    		unit	Gondor Archers Mercs	exp 2 armour 0 weapon_lvl 0
    	end	
    		historic_event help7_accepted factions { milan, }
    		set_event_counter help7_accepted 0
    		set_counter go_edoras2 1
    	end_monitor
    
    ;------------------ Reject ------------------------------------
    
    	monitor_conditions I_EventCounter help7_declined = 1
    		historic_event help7_declined factions { milan, }
    		set_event_counter help7_declined 0
    	end_monitor 
    
    ;----------------- Crusade Edoras Success -----------
    
    	monitor_event CrusadeEnds TargetSettlementName Kings-Land
    		and CrusadeOutcome success
    		and I_CompareCounter go_edoras2 = 1
    		add_money milan -2500
    		historic_event won7_ally
    		destroy_units milan Gondor Infantry Mercs
    		destroy_units milan Gondor Spearmen Mercs
    		destroy_units milan Gondor Archers Mercs
    		set_counter crusad_edoras 0
    		set_counter go_edoras2 0
    	end_monitor
    
    ;----------------- Crusade Edoras Fail -----------
    
    	monitor_event CrusadeEnds TargetSettlementName Kings-Land
    		and CrusadeOutcome fail
    		and I_CompareCounter go_edoras2 = 1
    		historic_event lose7_ally
    		destroy_units milan Gondor Infantry Mercs
    		destroy_units milan Gondor Spearmen Mercs
    		destroy_units milan Gondor Archers Mercs
    		set_counter crusad_edoras 0
    		set_counter go_edoras2 0
    	end_monitor
    
    ;----------------- Crusade Edoras Cancel -----------
    
    	monitor_event CrusadeEnds TargetSettlementName Kings-Land
    		and CrusadeOutcome cancel
    		and I_CompareCounter go_edoras2 = 1
    		destroy_units milan Gondor Infantry Mercs
    		destroy_units milan Gondor Spearmen Mercs
    		destroy_units milan Gondor Archers Mercs
    		set_counter crusad_edoras 0
    		set_counter go_edoras2 0
    	end_monitor

  12. #12

    Default Re: IsJihadTarget working?

    ok, thanks ..

    This is my attempt and didn't work .. Beacon lighting question wasn't asked. looks ok to me unless 'TargetSettlementName' should be removed>

    ---------------------------------------------------
    Identifier: IsJihadTarget
    Trigger requirements: settlement
    Parameters:
    Sample use: IsJihadTarget
    Description: Test if the settlement is the current jihad target
    Battle or Strat: Strat
    Class: IS_JIHAD_TARGET
    Implemented: Yes
    Author: Grig
    ---------------------------------------------------

    Code:
    declare_counter Jihad_edoras
    
    monitor_event IsJihadTarget TargetSettlementName Kings-Land
     	and I_SettlementOwner Kings-Land = milan
    	and I_LocalFaction milan
    	set_counter Jihad_edoras 1
    end_monitor
    
    declare_counter go_edoras2
    
    monitor_event FactionTurnStart FactionType milan
    	
    	and not IsFactionAIControlled
    	and I_LocalFaction milan
    	and I_CompareCounter Jihad_edoras = 1
    	and I_SettlementOwner Kings-Land = milan
    	and DiplomaticStanceFromFaction sicily = Allied
    	and I_CompareCounter go_edoras2 = 0
    	and I_TurnNumber >= 10
    	and FactionBuildingExists >= beacon_of_edoras
    
    	add_events
    	event counter help7_accepted
    	event counter help7_declined
    	end_add_events
    
    	historic_event help7 true factions { milan, } event/siege.bik
    
    end_monitor
    
    ;----------------- accept ------------------------------------
    monitor_conditions I_EventCounter help7_accepted = 1
    
    ;	spawn_army 
    ;	faction milan
    ;	character	random_name, named character, age 33, x 188, y 150
    ;		unit	Gondor Infantry Mercs 	exp 3 armour 1 weapon_lvl 0
    ;		unit	Gondor Infantry Mercs	exp 2 armour 0 weapon_lvl 0
    ;		unit	Gondor Infantry Mercs	exp 2 armour 0 weapon_lvl 0
    ;		unit	Gondor Infantry Mercs	exp 2 armour 0 weapon_lvl 0
    ;		unit	Gondor Spearmen Mercs	exp 2 armour 0 weapon_lvl 0
    ;		unit	Gondor Spearmen Mercs	exp 2 armour 0 weapon_lvl 0
    ;		unit	Gondor Spearmen Mercs	exp 2 armour 0 weapon_lvl 0
    ;		unit	Gondor Spearmen Mercs	exp 2 armour 0 weapon_lvl 0
    ;		unit	Gondor Archers Mercs	exp 2 armour 0 weapon_lvl 0
    ;		unit	Gondor Archers Mercs	exp 2 armour 0 weapon_lvl 0
    ;	end	
    	
    	historic_event help7_accepted factions { milan, }
    	set_event_counter help7_accepted 0
    	set_counter go_edoras2 1
    
    end_monitor
    
    ;------------------ reject ------------------------------------
    monitor_conditions I_EventCounter help7_declined = 1
    
    	historic_event help7_declined factions { milan, }
    	set_event_counter help7_declined 0
    
    end_monitor 
    
    ;----------------- HUMAN post-battle edoras -----------
    monitor_event PostBattle FactionType milan
    	
    	and I_WonBattle milan
    	and IsRegionOneOf 87
    	and I_CompareCounter go_edoras2 = 1
    ;	add_money milan -2500
    	historic_event won7_ally
    ;	destroy_units milan Gondor Infantry Mercs
    ;	destroy_units milan Gondor Spearmen Mercs
    ;	destroy_units milan Gondor Archers Mercs
    	set_counter go_edoras2 0
    	set_counter Jihad_edoras 0
    	
    end_monitor
    
    ;------------------ timer ------------------------------------
    declare_counter help7_time_limit
    
    monitor_event FactionTurnStart FactionType milan
    	and I_CompareCounter go_edoras2 = 1
    	inc_counter help7_time_limit 1
    end_monitor
    
    monitor_event FactionTurnStart FactionType milan
    	and I_CompareCounter go_edoras2 = 1
    	and I_CompareCounter help7_time_limit >= 2
    ;	destroy_units milan Gondor Infantry Mercs
    ;	destroy_units milan Gondor Spearmen Mercs
    ;	destroy_units milan Gondor Archers Mercs
    	set_counter go_edoras2 0
    	historic_event lose7_ally
    
    end_monitor
    I assume Sauron calls Jihads, not crusades, if Rohan faction is milan.
    oOo

    Rome 2 refugee ...

    oOo

  13. #13
    /|\/|\/|\/|\/|\/|\/
    Join Date
    Jun 2005
    Posts
    10,770

    Default Re: IsJihadTarget working?

    IsJihadTarget is a condition, not an event. I'd suggest to use SettlementTurnStart as the event to export the settlement that IsJihadTarget needs.

    And here's my logging method:

    [ai]
    ltgd_logging = true

    [log]
    to=logs/log.txt
    level = * trace
    file = game.script* logs/script.log.txt
    file = game.script.exec logs/script.exec.log.txt
    file = game.script.counter logs/script.counter.log.txt
    file = game.script.trigger logs/script.trigger.log.txt
    file = game.script.anc logs/script.anc.log.txt
    file = ai.ltgd logs/ai.log.txt

    Enter that lot into your .cfg and you will have more detail in your logs and different logging elements separated into different files.

    But even without that lot, the error message I mentioned would still show in your log. So it's a mystery why it didn't.

    Anyway, here's a rough stab at scripting it for you:

    monitor_event SettlemetTurnStart TargetSettlementName Kings-Land
    and IsJihadTarget
    and not IsFactionAIControlled
    and I_SettlementOwner Kings-Land = milan
    and I_TurnNumber >= 10
    and FactionBuildingExists >= beacon_of_edoras

    historic_event help7 true factions { milan, } event/siege.bik
    end_monitor

    The condition monitor you made should work OK to spawn the army. Sorry if I missed anything, I'm in a rush!!
    Last edited by Taiji; May 30, 2011 at 09:53 AM.

  14. #14

    Icon1 Re: IsJihadTarget working?

    Rorarii: I just remembered that Sauron is actually the Pope, so you need to use ‘IsCrusadeTarget’ instead of ‘IsJihadTarget’. The TWC University has two classes on scripting in its archive that may be worth a read.

    Taiji: wouldn't you need to use ‘SettlementName Kings-Land’ instead of ‘TargetSettlementName Kings-Land’ if you have ‘SettlementTurnStart’ as the monitor event?

  15. #15

    Default Re: IsJihadTarget working?

    I've tried a few things, this was the latest, still nothing works ..

    Code:
    declare_counter Jihad_edoras
    
    monitor_event FactionTurnStart FactionType milan
            and IsCrusadeTargetFaction
     	and I_SettlementOwner Kings-Land = milan
    	and I_LocalFaction milan
    	set_counter Jihad_edoras 1
    end_monitor
    
    
    monitor_event FactionTurnStart FactionType milan
    	
    	and not IsFactionAIControlled
    	and I_LocalFaction milan
    	and I_CompareCounter Jihad_edoras = 1
    	and I_SettlementOwner Kings-Land = milan
    	and DiplomaticStanceFromFaction sicily = Allied
    	and I_CompareCounter go_edoras2 = 0
    	and I_TurnNumber >= 10
    	and FactionBuildingExists >= beacon_of_edoras
    
    	add_events
    	event counter help7_accepted
    	event counter help7_declined
    	end_add_events
    
    	historic_event help7 true factions { milan, } event/siege.bik
    
    end_monitor
    I have a vague memory of reading somewhere that some of these functions don't work??

    I'll try and track down those courses.

    As to log files, thanks Taiji, but now i have huge log files but am unsure what i'm looking for ?

    R
    oOo

    Rome 2 refugee ...

    oOo

  16. #16

    Icon1 Re: IsJihadTarget working?

    Try this:
    Spoiler Alert, click show to read: 
    Code:
    declare_counter Jihad_edoras
    
    monitor_event CrusadeCalled TargetSettlementName Kings-Land
     	and I_SettlementOwner Kings-Land = milan
    	and I_LocalFaction milan
    	set_counter Jihad_edoras 1
    end_monitor
    
    
    monitor_event FactionTurnStart FactionType milan
    	
    	and not IsFactionAIControlled
    	and I_LocalFaction milan
    	and I_CompareCounter Jihad_edoras = 1
    	and I_SettlementOwner Kings-Land = milan
    	and DiplomaticStanceFromFaction sicily = Allied
    	and I_CompareCounter go_edoras2 = 0
    	and I_TurnNumber >= 10
    	and FactionBuildingExists >= beacon_of_edoras
    
    	add_events
    	event counter help7_accepted
    	event counter help7_declined
    	end_add_events
    
    	historic_event help7 true factions { milan, } event/siege.bik
    
    end_monitor

  17. #17
    /|\/|\/|\/|\/|\/|\/
    Join Date
    Jun 2005
    Posts
    10,770

    Default Re: IsJihadTarget working?

    Quote Originally Posted by Rorarii View Post
    As to log files, thanks Taiji, but now i have huge log files but am unsure what i'm looking for ?
    Search for the word 'error' when you're looking for error messages that will guide you to the correct answer.

    Quote Originally Posted by TNZ View Post
    Taiji: wouldn't you need to use ‘SettlementName Kings-Land’ instead of ‘TargetSettlementName Kings-Land’ if you have ‘SettlementTurnStart’ as the monitor event?
    Yes, that's a mistake. Well spotted.

    BTW do you really need to add events that are generated automatically?:

    add_events
    event counter help7_accepted
    event counter help7_declined
    end_add_events



    And using 'I_LocalFaction' as well as 'not IsFactionAIControlled', how does that make sense? And if it does make sense somehow then why isn't it in both monitors?
    Last edited by Taiji; May 31, 2011 at 06:58 AM.

  18. #18

    Icon1 Re: IsJihadTarget working?

    Taiji: You're right. No need to use either of those:
    Spoiler Alert, click show to read: 
    Code:
    declare_counter Jihad_edoras
    
    monitor_event CrusadeCalled TargetSettlementName Kings-Land
     	and I_SettlementOwner Kings-Land = milan
    	and I_LocalFaction milan
    	set_counter Jihad_edoras 1
    end_monitor
    
    monitor_event FactionTurnStart FactionType milan
    	and I_CompareCounter Jihad_edoras = 1
    	and I_SettlementOwner Kings-Land = milan
    	and DiplomaticStanceFromFaction sicily = Allied
    	and I_CompareCounter go_edoras2 = 0
    	and I_TurnNumber >= 10
    	and FactionBuildingExists >= beacon_of_edoras
    	historic_event help7 true factions { milan, } event/siege.bik
    end_monitor

  19. #19
    /|\/|\/|\/|\/|\/|\/
    Join Date
    Jun 2005
    Posts
    10,770

    Default Re: IsJihadTarget working?

    That's looking pretty elegant, TNZ

    How about this:

    Spoiler Alert, click show to read: 

    Code:
    monitor_event SettlementTurnStart SettlementName Kings-Land
    and IsJihadTarget
    and I_SettlementOwner Kings-Land = milan
    and not IsFactionAIControlled
    and DiplomaticStanceFromFaction sicily = Allied
    and I_TurnNumber >= 10
    and FactionBuildingExists >= beacon_of_edoras
    and I_EventCounter help7 = 0
    historic_event help7 true factions { milan, } event/siege.bik
    end_monitor


    To make it repeatable something (like the siege ending) needs to reset help7 to 0.

    And personally I would not fire the event at STS and instead fire a counter that is used to trigger the event at FTS.
    Last edited by Taiji; May 31, 2011 at 07:47 AM.

  20. #20

    Default Re: IsJihadTarget working?

    ok, finally got it working, here's the code

    Code:
    monitor_event SettlementTurnStart SettlementName Kings-Land
    	and IsCrusadeTarget
    	and I_SettlementOwner Kings-Land = milan
    	set_counter Jihad_edoras 1
    end_monitor
    
    etc
    etc
    Thanks for the help, both of you, let hope I have smoother sailing from here on in .. otherwise 'Scripting' will gain top of my Hate list, pushing aside overcharging Dentists and thieving politicians.

    R
    oOo

    Rome 2 refugee ...

    oOo

Page 1 of 2 12 LastLast

Posting Permissions

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