Results 1 to 7 of 7

Thread: Faction Resurrection

Hybrid View

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

    Default Faction Resurrection

    Hello everyone. =)

    There are some solutions for a Faction resurrection (like the horde system).

    But for example the Call of Warhammer team don't use that. They only spawn an army of the dead faction and let them capture an settlement. And it works fine.

    I want to use that too and all works fine. But every time when it is the turn of the resurrected faction, the game crashes with an unspecified error and I don't know why.

    I have now looked at all files, but I can't find the mistake. The files that I have edited are the campaign_script.txt and the historic_events.txt.


    Is there someone with an idea what it could be?

  2. #2

    Default Re: Faction Resurrection

    show us your script spawning dead fction first

  3. #3

    Icon1 Re: Faction Resurrection

    Scout of Imladris: It sounds like it’s the historical event causing the problem: try the script without it. Historical events are case sensitive, in the ‘campaign_script’ file they are lower case, and in the ‘historic_events’ file they are uppercase. Other than that, I would need to see the script and the ‘historic_events’ entries to be any real help. If you don't want to post them here, you can PM them to me. I am more than happy to help.

  4. #4

    Default Re: Faction Resurrection

    I don't think that it have something to do with the historic events. At the thime where it crashes, all historic events are shown correctly.

    I commented it a bit for a better understanding.


    Code:
    ; ROHAN
    
    monitor_event FactionTurnStart FactionIsLocal
    		and I_IsFactionAIControlled milan
    		and not I_IsFactionAIControlled sicily
    		and I_NumberOfSettlements milan = 0
    		and I_SettlementOwner Anorien = sicily ;Minas Tirith
    		
    		historic_event rohan_fallen
    		
    	
    terminate_monitor
    end_monitor
    
    
    
    declare_counter rohan_r
    declare_counter rohan_error
    
    set_counter rohan_r 0
    set_counter rohan_error 0
    
    
    monitor_event FactionTurnStart FactionIsLocal
    		and I_IsFactionAIControlled milan
    		and not I_IsFactionAIControlled sicily
    		and I_NumberOfSettlements sicily > 3
    		and I_SettlementOwner Anorien = sicily
    		and I_NumberOfSettlements milan = 0
    		and I_SettlementOwner Kings-Land = sicily ; Edoras
    		and not I_SettlementUnderSiege Kings-Land
    		
    		inc_counter rohan_error 1
    		
    		if I_CompareCounter rohan_error < 2
    		historic_event rohan_resurrection true
    		set_counter rohan_r 1
    		end_if
    end_monitor
    
    
    
    monitor_conditions I_EventCounter rohan_resurrection_accepted = 1
    		and not I_IsFactionAIControlled sicily
    		and I_IsFactionAIControlled milan
    		and not I_SettlementUnderSiege Kings-Land
    		
    		historic_event rohan_resurrection_acc
    		
    		set_counter rohan_r 2
    		set_counter rohan_error 3 ;rohan_error 2 is for the option to make a  betrayed event
    	
    terminate_monitor
    end_monitor
    
    monitor_event FactionTurnStart FactionIsLocal
    		and I_CompareCounter rohan_r = 2
    		and not I_IsFactionAIControlled sicily
    		and I_IsFactionAIControlled milan
    		and not I_SettlementUnderSiege Kings-Land
    
    		spawn_character sicily, Aranuir, diplomat, age 30, x 219, y 144 
    		spawn_character milan, Alchfrid, diplomat, age 30, x 218, y 144
    		
    		move_strat_camera 218, 144
    		set_counter rohan_r 3
    		
    terminate_monitor
    end_monitor
    
    monitor_event FactionTurnStart FactionIsLocal
    		and I_CompareCounter rohan_r = 3
    		and not I_IsFactionAIControlled sicily
    		and I_SettlementOwner Kings-Land = milan ; at this point the player should have given the settlement to the ai with the diplomats
    	
    		spawn_army 
    		faction milan
    		character	random_name, named character, x 186, y 152, family
    		traits	LoyaltyStarter 1,  Upright 2, GoodCommander 1, PublicFaith 2, GoodCommander 4
    		unit		rohan bodyguards		exp 5 armour 0 weapon_lvl 1
    		unit		militia					exp 2 armour 0 weapon_lvl 0
    		unit		militia					exp 1 armour 0 weapon_lvl 0
    		unit		warriors				exp 2 armour 0 weapon_lvl 0
    		unit		warriors				exp 1 armour 0 weapon_lvl 0
    		unit		Special Axemen			exp 2 armour 0 weapon_lvl 0
    		unit		Dismounted Eored Lancers	exp 3 armour 0 weapon_lvl 0
    		unit		Dismounted Eored Lancers	exp 2 armour 0 weapon_lvl 0
    		unit		Rohan Axemen			exp 2 armour 0 weapon_lvl 0
    		unit		Rohan Axemen			exp 2 armour 0 weapon_lvl 0
    		unit		Rohan Axemen			exp 1 armour 0 weapon_lvl 0
    		unit		archers					exp 1 armour 0 weapon_lvl 0
    		unit		archers					exp 2 armour 0 weapon_lvl 0
    		unit		rohan rider				exp 3 armour 0 weapon_lvl 0
    		unit		rohan rider				exp 1 armour 0 weapon_lvl 0
    		unit		rohan rider				exp 2 armour 0 weapon_lvl 0
    		unit		rohirrim				exp 3 armour 0 weapon_lvl 0
    		unit		eorlingas				exp 2 armour 0 weapon_lvl 0
    		unit		eorlingas				exp 2 armour 0 weapon_lvl 0
    		end	
    		
    		spawn_army 
    		faction milan
    		character	random_name, named character, x 188, y 152, family
    		traits	LoyaltyStarter 1,  Upright 2, GoodCommander 1, PublicFaith 2, GoodCommander 4
    		unit		rohan bodyguards		exp 5 armour 0 weapon_lvl 1
    		unit		militia					exp 2 armour 0 weapon_lvl 0
    		unit		militia					exp 1 armour 0 weapon_lvl 0
    		unit		warriors				exp 2 armour 0 weapon_lvl 0
    		unit		warriors				exp 1 armour 0 weapon_lvl 0
    		unit		Special Axemen			exp 2 armour 0 weapon_lvl 0
    		end	
    
    		set_counter rohan_r 4
    		
    terminate_monitor
    end_monitor
    
    monitor_event FactionTurnEnd FactionIsLocal
    		and I_CompareCounter rohan_r = 4
    		and not I_IsFactionAIControlled sicily
    
    		set_faction_standing sicily milan 9.9	
    		set_faction_standing sicily turks 9.9	
    		set_faction_standing sicily scotland 9.9
    
    		add_money sicily 10000
    		historic_event rohan_is_resurrected		
    		
    		set_counter rohan_r 5
    		
    terminate_monitor
    end_monitor
    
    ; At this point all works correctly! 
    ; Then come the turn of the new resurrected faction and -> crash

  5. #5

    Icon1 Re: Faction Resurrection

    Scout of Imladris: In your original script the resurrected faction gets an army first and then a settlement. In your latest version you've reversed it: now the faction getting a settlement first and then an army. Maybe it’s the change in the sequence that causing the problem. Try spawning the army first.
    Spoiler Alert, click show to read: 
    Code:
    ; ROHAN
    
    declare_counter rohan_r
    
    	monitor_event FactionTurnStart FactionIsLocal
    		and FactionType sicily
    		and I_IsFactionAIControlled milan
    		and I_NumberOfSettlements milan = 0
    		and I_SettlementOwner Anorien = sicily		
    		historic_event rohan_fallen	
    	terminate_monitor
    	end_monitor
    
    	monitor_event FactionTurnStart FactionIsLocal
    		and FactionType sicily
    		and I_IsFactionAIControlled milan
    		and I_NumberOfSettlements sicily > 3
    		and I_SettlementOwner Anorien = sicily
    		and I_NumberOfSettlements milan = 0
    		and I_SettlementOwner Kings-Land = sicily
    		and not I_SettlementUnderSiege Kings-Land		
    		historic_event rohan_resurrection true
    	terminate_monitor
    	end_monitor
    
    	monitor_conditions I_EventCounter rohan_resurrection_accepted = 1
    		historic_event rohan_resurrection_acc
    	spawn_army 
    		faction milan
    		character	random_name, named character, x 218, y 144, family
    		traits	LoyaltyStarter 1,  Upright 2, GoodCommander 1, PublicFaith 2, GoodCommander 4
    		unit		rohan bodyguards		exp 5 armour 0 weapon_lvl 1
    		unit		militia					exp 2 armour 0 weapon_lvl 0
    		unit		militia					exp 1 armour 0 weapon_lvl 0
    		unit		warriors				exp 2 armour 0 weapon_lvl 0
    		unit		warriors				exp 1 armour 0 weapon_lvl 0
    		unit		Special Axemen			exp 2 armour 0 weapon_lvl 0
    		unit		Dismounted Eored Lancers	exp 3 armour 0 weapon_lvl 0
    		unit		Dismounted Eored Lancers	exp 2 armour 0 weapon_lvl 0
    		unit		Rohan Axemen			exp 2 armour 0 weapon_lvl 0
    		unit		Rohan Axemen			exp 2 armour 0 weapon_lvl 0
    		unit		Rohan Axemen			exp 1 armour 0 weapon_lvl 0
    		unit		archers					exp 1 armour 0 weapon_lvl 0
    		unit		archers					exp 2 armour 0 weapon_lvl 0
    		unit		rohan rider				exp 3 armour 0 weapon_lvl 0
    		unit		rohan rider				exp 1 armour 0 weapon_lvl 0
    		unit		rohan rider				exp 2 armour 0 weapon_lvl 0
    		unit		rohirrim				exp 3 armour 0 weapon_lvl 0
    		unit		eorlingas				exp 2 armour 0 weapon_lvl 0
    		unit		eorlingas				exp 2 armour 0 weapon_lvl 0
    	end		
    	spawn_army 
    		faction milan
    		character	random_name, named character, x 188, y 152, family
    		traits	LoyaltyStarter 1,  Upright 2, GoodCommander 1, PublicFaith 2, GoodCommander 4
    		unit		rohan bodyguards		exp 5 armour 0 weapon_lvl 1
    		unit		militia					exp 2 armour 0 weapon_lvl 0
    		unit		militia					exp 1 armour 0 weapon_lvl 0
    		unit		warriors				exp 2 armour 0 weapon_lvl 0
    		unit		warriors				exp 1 armour 0 weapon_lvl 0
    		unit		Special Axemen			exp 2 armour 0 weapon_lvl 0
    	end
    		spawn_character sicily, random_name, diplomat, age 30, x 219, y 144
    		move_strat_camera 218, 144
    		set_counter rohan_r 1
    	terminate_monitor
    	end_monitor
    
    	monitor_event GiveSettlement FactionType sicily
    		and TargetFactionType milan
    		and SettlementName Kings-Land
    		and I_CompareCounter rohan_r = 1
    		set_faction_standing sicily milan 9.9	
    		set_faction_standing sicily turks 9.9	
    		set_faction_standing sicily scotland 9.9
    		add_money sicily 10000
    		historic_event rohan_is_resurrected
    	terminate_monitor
    	end_monitor

  6. #6

    Default Re: Faction Resurrection

    That is, because the original idea was, that an army of the resurrected faction spawn and capture the city that is hold by an ally.

    The second (and better) idea was to make it possible for the player to present the city as a gift for the faction.

    But I will try it, with first spawning the army.

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

    Default Re: Faction Resurrection

    re_emergent missing from descr_strat details of faction? (it goes under ai_label)
    Last edited by Taiji; May 25, 2011 at 10:23 AM.

Posting Permissions

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