Results 1 to 2 of 2

Thread: Managing some rebels...

Hybrid View

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

    Default Managing some rebels...

    Hello everybody

    I'm in despair with my tests. Maybe you can help me...

    The Facts : I'm working on a fantasy mod for Kingdoms. In the story board of the main campaign the "rebels" (a strange faction named as "marauders") are leading, in the very beginning, massive attacks on several cities. An other faction, with the pope tag (I know, it's a bit complicated), will resist their attacks and then "ally" to them. For the moment everything, except my problem, is fine ; the faction slave is powerfull and leads deadly attacks when spawning brigands who don't hesitate to crush settlements. But the rebels spawned by my own need to be managed by script. The next step is to convert these spawned generals to "pope" and it seems to be working.

    The Problem : The slave general who's assigned to take the "pope" city start the siege but the next turn he's wandering around. So, when the order to terminate siege by assaulting the city occurs, he's far away and has no siege equipment ! It is very badly unrealistic. Could you please give me some hint to solve this ?
    => The behavior is scripted as : siege_settlement X, Y, maintain, then after a certain number of turns, siege_settlement X, Y, attack.

    The Files : (for the moment I'm testing scripts on Stainless Steel's main campaign map)
    Spoiler Alert, click show to read: 
    descr_strat.txt
    Code:
    faction slave, balanced mao
    ai_label mongol
    denari 1000
    denari_kings_purse 1000
     
    character Nadziranim_Adelmo, named character, male, age 30, x 169, y 147
        traits LoyaltyStarter 3, NaturalMilitarySkill 3, GoodCommander 3, ReligionStarter 2 
        army
        unit NE Bodyguard exp 9 armour 9 weapon_lvl 9
        unit Death Knights exp 6 armour 6 weapon_lvl 6
        unit Death Knights exp 6 armour 6 weapon_lvl 6
        unit Religious Fanatics exp 5 armour 3 weapon_lvl 6
        unit Religious Fanatics exp 4 armour 3 weapon_lvl 6
        unit Religious Fanatics exp 3 armour 3 weapon_lvl 6
        unit Religious Fanatics exp 3 armour 3 weapon_lvl 6
        unit Religious Fanatics exp 3 armour 3 weapon_lvl 6
        unit Religious Fanatics exp 2 armour 3 weapon_lvl 6
        unit Religious Fanatics exp 2 armour 3 weapon_lvl 6
        unit Religious Fanatics exp 2 armour 3 weapon_lvl 6
        unit Religious Fanatics exp 1 armour 3 weapon_lvl 6
        unit Religious Fanatics exp 1 armour 3 weapon_lvl 6
        unit Religious Fanatics exp 1 armour 3 weapon_lvl 6
        unit AS Catapult exp 3 armour 3 weapon_lvl 6
        unit AS Catapult exp 3 armour 3 weapon_lvl 6
    character random_name, heretic, male, age 20, x 169, y 147 
        traits NaturalHereticSkill 3, StrongFaith 3 
    character random_name, heretic, male, age 20, x 169, y 147 
        traits NaturalHereticSkill 2, StrongFaith 3 
    character random_name, heretic, male, age 20, x 169, y 147 
        traits NaturalHereticSkill 2, StrongFaith 3 
    character random_name, heretic, male, age 20, x 169, y 147 
        traits NaturalHereticSkill 1, StrongFaith 3 
    character random_name, heretic, male, age 20, x 169, y 147 
        traits NaturalHereticSkill 1, StrongFaith 3 
    character random_name, heretic, male, age 20, x 169, y 147 
        traits NaturalHereticSkill 3, StrongFaith 3 
    character random_name, heretic, male, age 20, x 169, y 147 
        traits NaturalHereticSkill 2, StrongFaith 3 
    character random_name, heretic, male, age 20, x 169, y 147 
        traits NaturalHereticSkill 2, StrongFaith 3 
    character random_name, heretic, male, age 20, x 169, y 147 
        traits NaturalHereticSkill 1, StrongFaith 3 
    character random_name, heretic, male, age 20, x 169, y 147 
        traits NaturalHereticSkill 1, StrongFaith 3


    Spoiler Alert, click show to read: 
    campaign_script.txt
    Code:
    ;; settlements assaults
    monitor_event FactionTurnEnd FactionType papal_states
        if I_CharacterExists Nadziranim_Adelmo
        and not I_SettlementOwner Rome = slave
        and I_TurnNumber = 2
            siege_settlement Nadziranim_Adelmo, Rome, attack
            terminate_monitor
        end_if
    end_monitor
     
    ; ... other generals as same as above ...
     
    ;; base behavior
    monitor_event PreFactionTurnStart FactionType slave
        if I_CharacterExists Nadziranim_Adelmo
        and not I_SettlementOwner Rome = slave
            siege_settlement Nadziranim_Adelmo, Rome, maintain
        end_if
        ;;
        ;; more and more rebel generals maintaining siege on strategic cities
        ;;
    end_monitor


    I've modified several times my script, but unsuccessfully. Houp ! I forgot to say I prefer that the order of assault occurs IN the target_faction turn. Maybe it's impossible...?

    Thanks for your help.
    Last edited by wuaf˛; July 02, 2008 at 09:40 AM.

  2. #2

    Default Re: Managing some rebels...

    Ok pb solved with freeze_faction_ai and unfreeze_faction_ai (after all i need this for the begining)

Posting Permissions

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