Results 1 to 17 of 17

Thread: Script preventing sally out exploit

  1. #1

    Default Script preventing sally out exploit

    Hi guys, this is for people who like challenges and know the trick of confusing the AI when defending a settlement. I found the sieges much more interesting and difficult when AI can use all its siege machines.

    I wrote this script to make routing units that sally out of the settlement in the first phase of the siege, when the siege engines are advancing. It makes it impossible or at least very risky to attack the ram and towers. It means that the sieges will become much more sophisticated and difficult as the enemy will use all the siege equipment. Up to now it was enough to attack the engines, leaving one ladder and AI was lost, crowding all the units to climb a ladder.

    1.Here is the file. (updated 14 July)

    To install it, just COPY EVERYTHING from the file above and REPLACE THE WHOLE BAI script in the campaign_script.txt. In detail- replace everything starting with this:
    Code:
    ;==================================================================
    ;------- G5 BAI STUFF
    ;==================================================================
    ....
    And finishing with this:

    Code:
    ....
    set_counter a2u18_distance 0
    set_counter a2u19_distance 0
    set_counter a2u20_distance 0
    ; suspend_unscripted_advice false
    end_monitor
    Doing this you will replace the Germanicus script with the same one but including some counters declaration and of course my script.
    I tested it with SSHIP, SS6.4 and Titanium, I hope some people will like this script and send some feedback.. enjoy!
    Last edited by Macaras; July 17, 2023 at 03:17 PM.

  2. #2

    Default Re: Script preventing sally out exploit

    If I'm understanding correctly, if you send units to attack an oncoming ram they will rout at initial contact or when they go through gates? Sounds excellent either way but could you elaborate a bit more?

  3. #3

    Default Re: Script preventing sally out exploit

    Yes, the units that are sent to oncoming ram will rout when they are in proximity to it (or whatever other enemy units)- they will pass through the gate without a problem, but when they are in radius of an enemy unit they will rout (7 meters or whatever units is used there). In technical details - the script remembers the starting positions of every unit and checks if a unit moved ahead, if it's close to the enemy unit and if it's not on walls.

    The idea is very simple. Units on walls, or moving not towards the enemy or not in proximity of the enemy will not rout.
    When the ladder reaches the walls the script will deactivate, but after some time (necessary for the ram to also attack the gate). If the ram reaches the gate the script stops and the player can do whatever he wants, also chasing the enemy routing units outside the walls.

    I found thats its the only way so that the player will not be able to stop the ram. Even with this script sometimes there are some wondering soldiers that make the engine doesn't read the unit position, so sometimes the ram will be stopped. In my campaign it happened once for like 10 or more sieges. But the most player can achieve is to stop ram, so no more comfortable attacking everything except one ladder and then make the enemy crowd under the fire of arrows.
    Last edited by Macaras; July 17, 2023 at 08:11 PM.

  4. #4
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,147
    Blog Entries
    36

    Default Re: Script preventing sally out exploit

    There goes my favorite exploit, no more keeping cavalry in besieged settlements then.

    Last edited by Gigantus; July 17, 2023 at 10:44 PM.










  5. #5
    Jurand of Cracow's Avatar History and gameplay!
    Join Date
    Oct 2012
    Location
    Cracovia
    Posts
    8,501

    Default Re: Script preventing sally out exploit

    Another intersting exploit is starting a siege with much inferior forces, making the AI sallying out and winning by destroying the troops in the field. IIRC, this was the case here. Maybe it's possible to limit this one as well with a similar script?

  6. #6

    Default Re: Script preventing sally out exploit

    Quote Originally Posted by Macaras View Post
    Yes, the units that are sent to oncoming ram will rout when they are in proximity to it (or whatever other enemy units)- they will pass through the gate without a problem, but when they are in radius of an enemy unit they will rout (7 meters or whatever units is used there). In technical details - the script remembers the starting positions of every unit and checks if a unit moved ahead, if it's close to the enemy unit and if it's not on walls.

    The idea is very simple. Units on walls, or moving not towards the enemy or not in proximity of the enemy will not rout.
    When the ladder reaches the walls the script will deactivate, but after some time (necessary for the ram to also attack the gate). If the ram reaches the gate the script stops and the player can do whatever he wants, also chasing the enemy routing units outside the walls.

    I found thats its the only way so that the player will not be able to stop the ram. Even with this script sometimes there are some wondering soldiers that make the engine doesn't read the unit position, so sometimes the ram will be stopped. In my campaign it happened once for like 10 or more sieges. But the most player can achieve is to stop ram, so no more comfortable attacking everything except one ladder and then make the enemy crowd under the fire of arrows.
    Macaras I still continue to stop the ram with my bodyguards even though the enemy attacks me and continues to carry the ram afterwards, since they are bodyguards or more resistant units they don't disband?
    THE MORE YOU SWEAT NOW,
    THE LESS YOU BLEED IN BATTLE!!!



    Sign the petition to remove hardcoded limits for M2TW

  7. #7

    Default Re: Script preventing sally out exploit

    Could you please upload a log after the battle ? I have to see if the script started? The units should rout before the ram but it’s possible that heavy cavalry reaches the enemy somehow. And the other units rout?

  8. #8
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,147
    Blog Entries
    36

    Default Re: Script preventing sally out exploit

    Quote Originally Posted by Jurand of Cracow View Post
    Another intersting exploit is starting a siege with much inferior forces, making the AI sallying out and winning by destroying the troops in the field. IIRC, this was the case here. Maybe it's possible to limit this one as well with a similar script?
    That's not really an exploit, is it? I am however not sure what 'nerfing' the youtuber might be talking about, to be honest. Massive attack\defense value discrepancy between attacking and besieging units?
    Unless I totally misunderstood - a related exploit I seem to recall is to besiege with an inferior force and have substantial allied re-inforcements nearby (not adjacent to besieger). But it's pretty rare, given the required circumstances.










  9. #9
    Jurand of Cracow's Avatar History and gameplay!
    Join Date
    Oct 2012
    Location
    Cracovia
    Posts
    8,501

    Default Re: Script preventing sally out exploit

    Quote Originally Posted by Gigantus View Post
    That's not really an exploit, is it? I am however not sure what 'nerfing' the youtuber might be talking about, to be honest. Massive attack\defense value discrepancy between attacking and besieging units?
    Unless I totally misunderstood - a related exploit I seem to recall is to besiege with an inferior force and have substantial allied re-inforcements nearby (not adjacent to besieger). But it's pretty rare, given the required circumstances.
    I mean someting different: as a player you know how the AI behaves and you know that if you siege a settlement with significantly inferior force, the AI will sally out. The question is: how the AI (ie the script) defines "significantly inferior". It values well heavy units but cavalry not so much. This makes it sally out and lose a field battle, while it would have won at ease if staying within the walls (God, the walls are exactly made for it)

    So the player knows that he can (1) take a few cavalry units (that were in reality not meant for sieging), (2) start a siege of a well guarded settlement (ie with heavy infantry), (3) the AI will sally out, (4) the player would flank and beat the AI infantry, (5) it would enter the empty settlement.

    I would consider it an exploit and I'd look for some solution to negate this method.

  10. #10
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,147
    Blog Entries
    36

    Default Re: Script preventing sally out exploit

    My take on exploits like that - if you need them then you may want to rethink your approach to games in general. And don't come complaining that the game is crap if it bites you.

    As to this one - have a chat with the AI guys if they have an idea.










  11. #11
    Jurand of Cracow's Avatar History and gameplay!
    Join Date
    Oct 2012
    Location
    Cracovia
    Posts
    8,501

    Default Re: Script preventing sally out exploit

    Quote Originally Posted by Gigantus View Post
    My take on exploits like that - if you need them then you may want to rethink your approach to games in general. And don't come complaining that the game is crap if it bites you.
    As to this one - have a chat with the AI guys if they have an idea.
    Just chating to him B-)
    Is it possible:
    (1) in the situation when the player sieges the AI
    (2) to check what's the difference in streghts counted by the engine
    (3) then if this difference is, say, 1-3 (ie the AI defender is assessed to be 3 times stronger), and the AI sallies out
    (4) to make the players units to rout?

  12. #12

    Default Re: Script preventing sally out exploit

    Quote Originally Posted by Jurand of Cracow View Post
    Just chating to him B-)
    Is it possible:
    (1) in the situation when the player sieges the AI
    (2) to check what's the difference in streghts counted by the engine
    (3) then if this difference is, say, 1-3 (ie the AI defender is assessed to be 3 times stronger), and the AI sallies out
    (4) to make the players units to rout?
    As much as I can say - It is possible, but the difference would need to be calculated based on heavy cavalry units, but it would be difficult to understand for the players. The battle would start and all the units rout suddenly.. I also think it's not the best idea, better would be to make AI less eager to sally out and lower the charge impact. I think main problem is that the charging is overpowered and it makes one cavalry unit worth 5 of good infantry..

  13. #13
    Jurand of Cracow's Avatar History and gameplay!
    Join Date
    Oct 2012
    Location
    Cracovia
    Posts
    8,501

    Default Re: Script preventing sally out exploit

    Quote Originally Posted by Macaras View Post
    As much as I can say - It is possible, but the difference would need to be calculated based on heavy cavalry units, but it would be difficult to understand for the players. The battle would start and all the units rout suddenly.. I also think it's not the best idea, better would be to make AI less eager to sally out and lower the charge impact. I think main problem is that the charging is overpowered and it makes one cavalry unit worth 5 of good infantry..
    Ok, you're probably right, it's better to make the AI less eager to sally out. On the other hand, in the SSHIP we've lowered the charge value much as compared to the SS6.4, we've had long discussions a few years ago on this matter.

  14. #14

    Default Re: Script preventing sally out exploit

    I remember I also lowered the mass of horses to achieve it I think it's better, but it still leave early spearmen a little too weak.. I don't know where but maybe there is a factor somewhere about how ai makes decisions to sally out. Because I was noticing it for a long time that ai sometimes would be better off staying in the castle, not only with an exploit situation, but in regular campaign

  15. #15

    Default Re: Script preventing sally out exploit

    I play on VH, so my opinion may not be the norm. Although I haven't tried the script yet, I'm imagining the "solution" is to sacrifice units outside the walls after the ladders arrive, which is still a better solution than letting the ram do its work or the siege towers dump invincible troops on your walls. As it is, the AI spam stacks of specialty units cut through militia like a hot knife through butter, meaning that even a single ladder can be a challenge in certain situations. Although I appreciate the effort to force sieges to play out in a more 'reasonable' manner, I expect this will make VH nigh unplayable if sieges are played out as intended. Perhaps this is intentional.

    The problem in my opinion is that the AI abandons siege equipment once combat starts. If the AI is able to pick it back up, then sallying out to disrupt the assault remains a viable and fair solution.
    Last edited by Gaku; July 31, 2023 at 03:01 PM.

  16. #16

    Default Re: Script preventing sally out exploit

    Quote Originally Posted by Gaku View Post
    I play on VH, so my opinion may not be the norm. Although I haven't tried the script yet, I'm imagining the "solution" is to sacrifice units outside the walls after the ladders arrive, which is still a better solution than letting the ram do its work or the siege towers dump invincible troops on your walls. As it is, the AI spam stacks of specialty units cut through militia like a hot knife through butter, meaning that even a single ladder can be a challenge in certain situations. Although I appreciate the effort to force sieges to play out in a more 'reasonable' manner, I expect this will make VH nigh unplayable if sieges are played out as intended. Perhaps this is intentional.
    It's not like this.. The solution is to make units rout, so they are not sacrificed, they rout back inside the castle. 95% of the time they rout BEFORE they contact the approaching enemy units, so AI just continues with ram or other siege equipment. The unit will have some casualties made by enemy arrows (or sometimes it gets stuck outside) so usually after few attempts the player learns and just sticks to defend the city inside the walls, at least this happened to me. I played Novgorod without the financial support with this script and won, so true it makes siege more difficult, but not impossible.
    There are some factions that will be close to impossible to win (Novgorod, Serbia, Hungary) and some that are easy. I wouldn't worry about it being too difficult, we can always adjust it raising financial support a little for example. But to play the real sieges is much more fun than just attacking all the siege machines and taking advantage of the ai incapability..

  17. #17

    Default Re: Script preventing sally out exploit

    Perhaps what I'm imagining won't be possible, but I'm imagining a situation where through careful placement, the units rout into the siege engines and/or fail to move out of the way quickly enough and thereby force a fight.

    As I play Hungary pretty much exclusively, the script as intended sounds like certain death.

Posting Permissions

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