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

Thread: Encouraging the AI to wait out sieges

Hybrid View

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

    Default Encouraging the AI to wait out sieges

    Hello. I know much of M2 is hard coded and inaccessible to modders, but sometimes there are tricks that can be used to help guide the AI.

    The AI, from my experience, never waits sieges out, and usually assaults the turn after. My guess is that since the AI is fickle, if they were to wait sieges out more often, they would almost never complete a siege since the campaign AI would tell them to do something else during the 5+ turns it waits. Are there any entries in battle or campaign text files that governs the AI's determination to assault, or wait? Is there a script you could possibly add? Or a trait that might trick the AI into waiting?

    If it helps anybody, it seems the AI is much more eager to wait out forts than cities or castles. Perhaps time is the only thing it considers.

    Thanks for any advice.
    Last edited by Chodetaculous; January 30, 2011 at 12:01 AM.

  2. #2
    Swagger's Avatar Imperial Coffee-Runner
    Join Date
    Apr 2007
    Location
    Portugal
    Posts
    12,453

    Default Re: Encouraging the AI to wait out sieges

    Hello. I know much of M2 is hard coded and inaccessible to modders, but sometimes there are tricks that can be used to help guide the AI.
    lies.


    The AI, from my experience, never waits sieges out, and usually assaults the turn after. My guess is that since the AI is fickle, if they were to wait sieges out more often, they would almost never complete a siege since the campaign AI would tell them to do something else during the 5+ turns it waits. Are there any entries in battle or campaign text files that governs the AI's determination to assault, or wait? Is there a script you could possibly add? Or a trait that might trick the AI into waiting?

    If it helps anybody, it seems the AI is much more eager to wait out forts than cities or castles. Perhaps time is the only thing it considers.
    rubicon already stated that

    there's a modifier that checks the ratio of besieging units compared to defender's, if you change it, it will influence it
    Under the Patronage of the Dreadful cedric37!
    Ancs Guide, Emergent Factions , Yes/No Events |L'Outremer for Modders| Swagger's Skymod


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

    Default Re: Encouraging the AI to wait out sieges

    Chodetaculous, can't work out exactly what you are trying to ask. Simplify your question if you want a chance I'll help. (BTW unless I am mistaken the other posters are jumping to conclusions about what you mean)
    Last edited by Taiji; January 30, 2011 at 10:18 AM.

  4. #4
    Swagger's Avatar Imperial Coffee-Runner
    Join Date
    Apr 2007
    Location
    Portugal
    Posts
    12,453

    Default Re: Encouraging the AI to wait out sieges

    that's the point


    not only will the AI mantain the siege, but the defending AI won't sally out either
    Under the Patronage of the Dreadful cedric37!
    Ancs Guide, Emergent Factions , Yes/No Events |L'Outremer for Modders| Swagger's Skymod


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

    Default Re: Encouraging the AI to wait out sieges

    OK I think I've worked it out:

    He wants the AI to siege settlements to death if possible.

    Interesting idea and I haven't a clue how you're going to achieve it, Chodetaculous.

    But unfortunately I am pretty confident that nothing mentioned in the thread so far will help.

  6. #6

    Default Re: Encouraging the AI to wait out sieges

    Quote Originally Posted by Taiji View Post
    OK I think I've worked it out:

    He wants the AI to siege settlements to death if possible.

    Interesting idea and I haven't a clue how you're going to achieve it, Chodetaculous.

    But unfortunately I am pretty confident that nothing mentioned in the thread so far will help.
    Thank you, that was it. I apologize for the ambiguous language.

    I'll try your suggestion out Germanicu5. I'll probably need to start a new campaign for the effects to take place, right?

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

    Default Re: Encouraging the AI to wait out sieges

    It could be scripted to 'maintain', theoretically, but then the siege talked about isn't scripted.

  8. #8
    Germanicu5's Avatar Will buy spare time...
    Join Date
    Feb 2009
    Location
    Not Zee Germany
    Posts
    2,101

    Default Re: Encouraging the AI to wait out sieges

    This'll help (descr_campaign_db.xml):

    <siege_att_str_modifier float="0.30"/> - anything between 0.3 and 0.6 is within reason, depending on results you want to achieve, 0.3 is close to AI always waiting you out

    if talking about sally out battles (apart from previously mentioned config_ai_battle entry), you can fiddle with this value (pretty self-explanatory):
    <sally_att_str_modifier float="1.0"/>

    Regards
    I have no memory of this place.

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

    Default Re: Encouraging the AI to wait out sieges

    Quote Originally Posted by Germanicu5 View Post
    This'll help (descr_campaign_db.xml):

    <siege_att_str_modifier float="0.30"/> - anything between 0.3 and 0.6 is within reason, depending on results you want to achieve, 0.3 is close to AI always waiting you out
    Oh yes, that's right, how could I have forgotten

  10. #10
    Germanicu5's Avatar Will buy spare time...
    Join Date
    Feb 2009
    Location
    Not Zee Germany
    Posts
    2,101

    Default Re: Encouraging the AI to wait out sieges

    Nope, it doesn't need a restart, the results should be nearly instant.

    Regards
    I have no memory of this place.

  11. #11

    Default Re: Encouraging the AI to wait out sieges

    Going to give that value .40 and see how it goes.

    Does <crusade_att_str_modifier float="0.9"/> mean the same thing except for only crusading armies? Can it go above 1.0?

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

    Default Re: Encouraging the AI to wait out sieges

    Yes and yes. 1.0 is just 100%, so it sees it's own strength as it really is. 5.0 would be 500%, so it finds itself to be 5 times more powerful than it really is. It has the effect of causing the AI to attack when even if they don't stand much chance, so it can be a waste. But then I use 3.0 for crusades and I'm happy with the speed they complete. Also look at the <autoresolve> section in descr_campaign_db.xml, many interfering factors exist, and I seem to remember that these <autoresolve> settings help manage some of them. The stuff about gates and so on, modifiers for settlement defenders' str basically.
    Last edited by Taiji; January 30, 2011 at 08:32 PM.

  13. #13

    Default Re: Encouraging the AI to wait out sieges

    Hmm. Lowering the value from .6 to .4 doesn't appear to have changed anything. My castles are still being immediately assaulted even though the battles have 1:1 odds.

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

    Default Re: Encouraging the AI to wait out sieges

    Quote Originally Posted by Chodetaculous View Post
    Hmm. Lowering the value from .6 to .4 doesn't appear to have changed anything. My castles are still being immediately assaulted even though the battles have 1:1 odds.
    So then what did you try? 0.3? 0.2? .... Did you make sure it isn't having an effect?
    Last edited by Taiji; January 31, 2011 at 07:19 AM.

  15. #15

    Default Re: Encouraging the AI to wait out sieges

    I'll do some more observations and report back. I've got it set at .35 right now.

  16. #16

    Default Re: Encouraging the AI to wait out sieges

    Quote Originally Posted by RubiconDecision View Post
    1:1 odds based on? Are you looking at the initial strength calculation that's in the screen right before battle?
    Yes, that screen. I was assuming the AI would take ratio into consideration when assaulting or just maintaining the siege.

  17. #17

    Default Re: Encouraging the AI to wait out sieges

    Either the AI is unpredictable, or <siege_att_str_modifier float="x"/> doesn't do what I thought it did. I've been observing my campaign, and a new one I created just to test, and have been noticing different behavior. Rather than AI armies maintaining sieges more often rather than assaulting walls, the AI just doesn't initiate the siege nearly as often unless they vastly outnumber the defenders. When a siege is initiated, they either assault it next turn, or disengage and do something else.

    It appears to me this value dictates if an AI initiates siege in the first place. While it is nice not to have the AI throw their bodies against walls, this really stifles their expansion and war. Especially AI vs. AI wars.

    What confuses me was Germanicu5's suggestion: that <siege_att_str_modifier float="x"/> does modify the AI's determination to assault or maintain. I wonder why our results are different.

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

    Default Re: Encouraging the AI to wait out sieges

    Quote Originally Posted by Chodetaculous View Post
    What confuses me was Germanicu5's suggestion: that <siege_att_str_modifier float="x"/> does modify the AI's determination to assault or maintain. I wonder why our results are different.
    The point is that it affects it, and it's true that it does.

    The most cleanly honest answer to your question is 'No you can't have what you want because noone knows how to do that' but since a few things are known to affect it, they can look like answers when in fact they aren't.

    There is no setting which modifies how many 'maintains' they make before an assault.

    Another influencial factor is the AI, your campaign_ai_db is to some extent telling the AI when to start attacks. You can imagine that if the str required in campaign_db is 1.7 and the str required in the CAI is 1.2 then the AI is perhaps going to get there and find themselves weaker than they need to be in order to attack.

    But then note I said 'to some extent'. The AI seems to have some randomness anyway, so even if you remove random elements from the CAI files, the results need to be measured with batch of tests.

    The whole point of having an AI is that, in some ways like us, it doesn't behave like a simple script.

    If you think you might want a script instead... It's still not going to be simple... You're going to be making a huge script and complex script, and you'll earn my deepest respect for your skills and huge effort if you even come close.
    Last edited by Taiji; February 01, 2011 at 08:59 AM.

  19. #19

    Default Re: Encouraging the AI to wait out sieges

    Thanks for your help and suggestions everyone. Looks like I'll have to find another way to try to make sieges more fair for the AI. Removing cannon towers seems like a good start...

  20. #20
    Germanicu5's Avatar Will buy spare time...
    Join Date
    Feb 2009
    Location
    Not Zee Germany
    Posts
    2,101

    Default Re: Encouraging the AI to wait out sieges

    You made a valid observation, because changing army size that's sent towards player's settlement is what this setting was supposed to do - usually it works for purpose I suggested in a semi-direct way - AI hasn't got enough resources to create such huge armies, it sends out smaller ones, which are forced to wait out sieges because of lack of theoretical power to attack a settlement.
    Ofc it can also result in breaking sieges. I recall tests some of TATW players did while we had a discussion related to battle AI, their reports indicated the result was close to what you expect (witn 0.3 setting) - but it's also dependant on parameters of campaign AI you're using, for instance overuse of force_invade could break AI's plans as I imagine.

    Actually the situation in which AI brings large army and attacks is somehow optimal anyway, because you get no chance to bring in reinforcements and even if they waited you out, it'd force them into battle on the last turn - which makes huge army preoccupied for several turns and increases failure risk.

    The last resort is checking if AI has hidden or too many SiegeEngineering bonus traits in EDCT- no bonus would delay equipment construction (which I rather disencourage).

    I'm afraid that's it for easily applicable solutions.

    Regards
    Last edited by Germanicu5; February 01, 2011 at 06:39 AM.
    I have no memory of this place.

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
  •