Results 1 to 8 of 8

Thread: Problems with the script of an emerging faction

Hybrid View

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

    Icon5 Problems with the script of an emerging faction

    Hello:

    To appear the emergent faction attacking a city, not conquest. The city becomes a rebel.
    Does anyone know what the problem? Do you have to pass some turns from the appearance until the siege?

    Thanks


  2. #2
    Vegas_Bear's Avatar Biarchus
    Join Date
    Sep 2005
    Location
    Las Vegas, NV
    Posts
    605

    Default Re: Problems with the script of an emerging faction

    Post what you have for the script plz.

    VB

  3. #3

    Default Re: Problems with the script of an emerging faction

    Quote Originally Posted by Vegas_Bear View Post
    Post what you have for the script plz.

    VB
    Hello. This is the script of the photo:
    Code:
    	monitor_event FactionTurnStart I_TurnNumber > 4
    
    		spawn_army 
    			faction mongols
    			character	random_name, named character, age 22, x 56, y 20, family, label almohade1, direction E
    			traits LoyaltyStarter 1 , GoodCommander 2 , NaturalMilitarySkill 2 , BattleDread 2 , ReligionStarter 3
    			unit		ME Bodyguard		exp 3 armour 0 weapon_lvl 0
    			unit		Bedouin Cavalry		exp 3 armour 0 weapon_lvl 0
    			unit		Bedouin Cavalry		exp 3 armour 0 weapon_lvl 0
    			unit		Dismounted Tuareg		exp 3 armour 0 weapon_lvl 0
    			unit		Dismounted Tuareg		exp 3 armour 0 weapon_lvl 0
    			unit		ME Catapult		exp 3 armour 0 weapon_lvl 0
    		end
    
    		if I_IsFactionAIControlled mongols
    			and not I_SettlementUnderSiege Melilla
    			and not I_SettlementOwner Melilla = mongols
    
    			console_command auto_win attacker
    			siege_settlement almohade1, Melilla, attack
    		end_if
    
    		terminate_monitor
    	end_monitor
    Do I have to add something else at the time of the occurrence?
    The files “descr_sm_factions.txt” and “descr_strat.txt” are the same than the vanilla (mongols lines)

  4. #4
    Den Stark's Avatar Tiro
    Join Date
    May 2012
    Location
    Vladivostok
    Posts
    248

    Default Re: Problems with the script of an emerging faction

    Code:
        monitor_event FactionTurnStart I_TurnNumber > 4
    
            spawn_army 
                faction mongols
                character    random_name, named character, age 22, x 56, y 20, family, label almohade1, direction E
                traits LoyaltyStarter 1 , GoodCommander 2 , NaturalMilitarySkill 2 , BattleDread 2 , ReligionStarter 3
                unit        ME Bodyguard        exp 3 armour 0 weapon_lvl 0
                unit        Bedouin Cavalry        exp 3 armour 0 weapon_lvl 0
                unit        Bedouin Cavalry        exp 3 armour 0 weapon_lvl 0
                unit        Dismounted Tuareg        exp 3 armour 0 weapon_lvl 0
                unit        Dismounted Tuareg        exp 3 armour 0 weapon_lvl 0
                unit        ME Catapult        exp 3 armour 0 weapon_lvl 0
            end
    
            if I_IsFactionAIControlled mongols
                and not I_SettlementUnderSiege Melilla
                and not I_SettlementOwner Melilla = mongols
    
                console_command auto_win attacker
                siege_settlement almohade1, Melilla, maintain
                siege_settlement almohade1, Melilla, attack
            end_if
    
            terminate_monitor
        end_monitor
    hello.
    maybe try that?

  5. #5

    Default Re: Problems with the script of an emerging faction

    Quote Originally Posted by den5104 View Post
    hello.
    maybe try that?
    Hello den5104.
    With the “maintain”, at end turn lifts the siege. With the two, pass the same (“maintain” and “attack”). Even leaving the units without orders the same thing happens. At times with units on their own in avanced turns it has worked. I do not understand why.

  6. #6
    Den Stark's Avatar Tiro
    Join Date
    May 2012
    Location
    Vladivostok
    Posts
    248

    Default Re: Problems with the script of an emerging faction

    and If this is done?
    sorry if my english bad
    Code:
                siege_settlement almohade1, Melilla, maintain
                console_command auto_win attacker
                siege_settlement almohade1, Melilla, attack
    Here the working code from another mod. attack immediately.
    Code:
    monitor_event SettlementTurnEnd SettlementIsLocal
        and SettlementName Rostov
        and not I_SettlementOwner Rostov = slave
        ;and SettlementTaxLevel > tax_low
        ;and not GovernorInResidence
        and RandomPercent < 1
        ;and Treasury > 30000
            spawn_army 
                faction slave, sub_faction russia
                character    Roman, named character, age 26, x 273, y 257
                traits GoodRiskyAttacker 1, GoodCommander 1, BattleDread 2, StrategyDread 2, LoyaltyStarter 5, Energetic 1, ReligionStarter 1, GoodAttacker 1, GoodAmbusher 1, siberians 1, Extra_Level_Slave_2 1
                unit        EE Bodyguard                exp 3 armour 2 weapon_lvl 1
                unit        Mordvini                    exp 3 armour 2 weapon_lvl 1
                unit        Mordvini                    exp 3 armour 2 weapon_lvl 1
                unit        Norse Archers                exp 3 armour 2 weapon_lvl 1
                unit        Norse Archers                exp 3 armour 2 weapon_lvl 1
                unit        Catapult                exp 3 armour 2 weapon_lvl 1
                unit        Catapult                exp 3 armour 2 weapon_lvl 1
            end
            siege_settlement Roman, Rostov, maintain
            siege_settlement Roman, Rostov, attack
    end_monitor
    maybe this will help? )

  7. #7

    Icon1 Re: Problems with the script of an emerging faction

    Miguel_80: It's not your script. The problem actually lies in how the game handles a faction that emerges as a hoarding faction. To put it simply, you just cannot script them to do things.

    You will only be able to direct that faction via a script after they have captured a settlement of their own accord.

    You can get around the problem by not emerging the faction as a hoarding faction: first remove the lines that make them a hoarding faction from the ‘descr_sm_factions.txt’ then change your script so it's similar to this:
    Spoiler Alert, click show to read: 
    Code:
    	monitor_event FactionTurnEnd FactionIsLocal
    		and I_TurnNumber > 4
    		and I_IsFactionAIControlled mongols
    		and not I_SettlementUnderSiege Melilla
    		and not I_SettlementOwner Melilla = mongols
    	spawn_army 
    		faction mongols
    		character	random_name, named character, age 22, x 56, y 20, family, label almohade1, direction E
    		traits LoyaltyStarter 1 , GoodCommander 2 , NaturalMilitarySkill 2 , BattleDread 2 , ReligionStarter 3
    		unit		ME Bodyguard		exp 3 armour 0 weapon_lvl 0
    		unit		Bedouin Cavalry		exp 3 armour 0 weapon_lvl 0
    		unit		Bedouin Cavalry		exp 3 armour 0 weapon_lvl 0
    		unit		Dismounted Tuareg		exp 3 armour 0 weapon_lvl 0
    		unit		Dismounted Tuareg		exp 3 armour 0 weapon_lvl 0
    		unit		ME Catapult		exp 3 armour 0 weapon_lvl 0
    	end
    		console_command auto_win attacker
    		siege_settlement almohade1, Melilla, attack
    	terminate_monitor
    	end_monitor

    The only problem with emerging a faction as a non-hoarding faction is that faction must own a settlement before their first turn after emerging, or they will be eliminated from the game.

  8. #8

    Default Re: Problems with the script of an emerging faction

    Hello TNZ:

    Yes, I have to wait for it to conquest a city on its own. But sometimes does the same if the number of turns are few. From its appearance or the beginning, I don't know why exactly. The problem is that the objective of the mod, I want to appear in exclusive cities.

    If you delete the lines of horde in the “descr_sm_factions.txt”, appear as rebel units. You referred to it you would have with the “freeze_faction_ai”?

Posting Permissions

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