Results 1 to 11 of 11

Thread: Push an army to assault a settlement?

Hybrid View

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

    Default Push an army to assault a settlement?

    Hi,
    I want to spawn armies ( easy ), and push them to attack a specific factions settlements, with trigger like attack settlements with low garrison.

    I found esoteric stuff about AI, but it is not specific enough.
    So is there a way to script that?

    In terms of gameplay: I change the 180 settlements ( buildings, religion and owner ) after checking historical datas available ( for 1080 ). Byzantium has been recreated as it was, with a massive Constantinople, twice larger, but corrupted with buildings damage. But with almost full roster available ( Byzantium units existed for centuries ).
    And few units. ( in 1080 )

    In order to make the game balanced ( cause if Byzantium is not attack, it's the most powerfull empire in 1080 ) and as it was in history: I want an AI full scale assault of Sicilian from the west, and Seljuk from the east...

    The gameplay will be for the player to survive the assault and kept no more than half of his territory. As it was in history... ( Then strike back )

    But I don't know at all how to push an army to attack a specific faction, with goals.

    Thank you

  2. #2
    GrnEyedDvl's Avatar Liberalism is a Socially Transmitted Disease
    Artifex Technical Staff

    Join Date
    Jan 2007
    Location
    Denver CO
    Posts
    23,851
    Blog Entries
    10

    Default Re: Push an army to assault a settlement?

    Spawn the army then use this command:
    Code:
    siege_settlement
    attacking_character, settlement_name [,maintain|attack]
    Instruct the character to siege the settlement
    siege_settlement Gaius Julius, Rome, attack
    SIEGE_SETTLEMENT

  3. #3

    Default Re: Push an army to assault a settlement?

    Thx a lot, it's good to have Sensei helping us this fast. I spend hours to try and find by myself...
    Again thx, all my 150 hours revamp depend on this ( to be balance )

  4. #4

    Default Re: Push an army to assault a settlement?

    Still some issues. Even after changing AI a bit,
    siege_settlement works fine, but the next turn the army moves away.
    I know that I can freeze AI, but talking a settlement take 4 to 8 turns, I dont want turks to do nothing during this time.
    I can do it in two turns too, but that's not fair. ( like siege_settlement maintain, and the turn after
    with prefaction siege_settlement attack ).

    I use while, it's working but the army lift the sige every turn then come back.

    So the question is:

    Is it possible to maintain_siege until the siege's army is routed or the city taken, without using freeze AI.

    For the AI I insert 5000 to invade dislike faction ( -1.0 with byzantium )
    But still the army lift the siege
    Last edited by sysyphe; August 13, 2008 at 03:49 PM.

  5. #5
    GrnEyedDvl's Avatar Liberalism is a Socially Transmitted Disease
    Artifex Technical Staff

    Join Date
    Jan 2007
    Location
    Denver CO
    Posts
    23,851
    Blog Entries
    10

    Default Re: Push an army to assault a settlement?

    Use the maintain/attack switch. Put maintain or siege after the command.

  6. #6

    Default Re: Push an army to assault a settlement?

    I've already used :
    siege_settlement Cihangir, Edessa, maintain
    It sieges, but the turn after they left.
    I f I use while, they left and come back right after, but the siege count start again.

    siege_settlement Cihangir, Edessa, attack

    The army attacks right away the city.

    Why I want a siege that lenght on a single command?
    I want to implement a lot of conditions, like the type of settlements ( castle or city ), the state of the army ( lost half its men ), and the weakness of the target settlements. ( Push the army to select a city settlement with the lowest defense, wall and garrison ).

    Anyway I may start scripting this with AI_freeze, while I can find how do it without the freeze.
    Last edited by sysyphe; August 14, 2008 at 08:31 AM.

  7. #7

    Default Re: Push an army to assault a settlement?

    sysyphe
    Do they need to attack? That is if you make it seige every turn it is not owned by the faction, at some point the enemy will come out and have a fight, which you will either win (in which case it will now be owned by the faction - seige ends) or it loses and is forced to retreat. If thats the case you need the army to stop, so perhaps you could use something like BattleArmyRouted to end the script in that case.

    To err is human, but to really foul things up you need a computer.
    Paul Ehrlich

  8. #8

    Default Re: Push an army to assault a settlement?

    The Idea is that Seljuk And Sicilian attack the Byzantium Empire, at the begining of the game as it was in history. So I want to implement many triggers and conditions to make them act correctly.

    My only issue is that whatever I did script, without freeze_ai, the sieging army never maintain the Siege.

    So I can script that the first turn they start the siege, and another script to attack it. But it will be hard to script all triggers and conditions, with a multiple scripting siege.

    I only want to force a faction control by AI, to siege a designet target, and to capture it, as human player uselly do.
    Last edited by sysyphe; August 14, 2008 at 03:21 PM.

  9. #9

    Default Re: Push an army to assault a settlement?

    I've done some scripted attack's and I find that if you use the maintain and the attacking army has a bigger, better army than the defender, it will build some ram's etc and keep up the seige until the defenders sally or the garrison surrenders.

  10. #10

    Default Re: Push an army to assault a settlement?

    ok I will dig that.

    The issue is in the AI, for sure...

    I will try 10 turn later.

    Thx

  11. #11

    Default Re: Push an army to assault a settlement?

    After reading the good AI explnation from
    http://rtw.heavengames.com/cgi-bin/f...ct&f=9,6718,,1

    I've conclude that I should not look on scripting issues to solve my problem.
    In order to make things work, the clever way is to create specifics AI behavior mixed with good desc_strat.tex scripts.

    The idea is to:
    Paste and copy AI catholic behaviour and Ai Islamic behaviour, and rename it for respectively Normans and Seljuks. I script then only a behaviour between them and Byzantium.

    With the help of the AI explanations, I'll change the starting AI of those two factions. So I can tell to the Seljuk, if you are not at war with another neighbour's factions ( there is none at the begining ) apart from Slave, attack very aggressively the easiest target settlements in Anatolia ( first city ). Attack them until you capture them all, and stop when you've captured some key settlements, or destroy Byzantium factions, and/or loose twice key battle at Bari, Trebizond and Constantinople. Or Stop if you're loosing ( hardly possible ), half your army strengh, and/or 2 settlements.
    Once one this trigger works, just change the default Seljuk Ai Behaviour to Islamic once.

    So the Turks will be very aggressive against Byzantium and make clever choices, until they loose their momentum, or achive their goals, or are in danger. Then their behaviour change to be more defensive.

    For the normans, it will something like: if Byzantium is at war with Seljuk, and start loosing some settlements, and Neigbours Byzantium Settlements not with high Garrison, and Sicily not at war with hre, Papal_state or Venice, attack Byzantium, and if defeated or loose half its army, or a Neigbours factions declare war, whange behaviour to catholic one.

    So mixing strat scripts, and AI scripts, allows us to push AI to behave differently with some factions, and be more clever.

    For exemple, with France and England focusing on each other, depending if Scotland is highly involved, or if there is a crusade....

    In facts, once you've mastered to adjust and test successfully three AI stances: one very Agressive and offensive, one by default ( the default AI ), and one very defensive, you just have to copy and paste them, put the name of the Faction concerned by this behaviour, and the target faction. Then on desc_strat, you script to input triggers to change the AI_factions behaviour.

Posting Permissions

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