Page 2 of 3 FirstFirst 123 LastLast
Results 21 to 40 of 47

Thread: ReallyBadAI Battle System for RTW/RS2

  1. #21
    GRANTO's Avatar Domesticus
    Join Date
    Dec 2010
    Location
    glastonbury uk
    Posts
    2,207

    Default Re: ReallyBadAI Battle System for RTW/RS2

    how did this go? did g5 make a script or is it still in the pipeline?

  2. #22

    Default Re: ReallyBadAI Battle System for RTW/RS2

    I get the feeling this has been abandoned


    Under patronage of Spirit of Rob; Patron of Century X, Pacco, Cherryfunk, Leif Erikson.

  3. #23

    Default Re: ReallyBadAI Battle System for RTW/RS2

    Ok.. its a really old post but I was curious as to whether G5 had made any progress since his WIn8 problems .. from the looks of it nothing's happened since Tone's last post. I wonder if its worthwhile dropping Germanucis a wee note and see if he was still interested in porting his BI over ?

  4. #24
    dvk901's Avatar Consummatum est
    Patrician

    Join Date
    Mar 2006
    Location
    Michigan
    Posts
    20,984

    Default Re: ReallyBadAI Battle System for RTW/RS2

    I'm afraid it would seem that this has been delayed, at best...and I'm afraid I know why. I had a look at Germanicus5's ReallyBadAI for M2TW, and had thought of asking for permission to use it if I could convert it to RTW. The problem is that a number of 'key' conditions were added in M2TW that are missing in RTW:

    I_BattlePlayerArmyNumberOfUnits

    and:

    I_BattleEnemyArmyNumberOfUnits

    These are the two conditions that allowed him to 'label' units dynamically in the script, according to how many there were in the player's army and the AI army. I haven't yet found anything in RTW that would do the same thing.
    Last edited by dvk901; November 05, 2013 at 11:21 PM.

    Creator of: "Ecce, Roma Surrectum....Behold, Rome Arises!"
    R.I.P. My Beloved Father

  5. #25

    Default Re: ReallyBadAI Battle System for RTW/RS2

    Certainly my feeling is that this won't work


    Under patronage of Spirit of Rob; Patron of Century X, Pacco, Cherryfunk, Leif Erikson.

  6. #26
    dvk901's Avatar Consummatum est
    Patrician

    Join Date
    Mar 2006
    Location
    Michigan
    Posts
    20,984

    Default Re: ReallyBadAI Battle System for RTW/RS2

    Yes, and it's too bad. I have been thinking about ways to prevent the AI from putting 'infantry' units with no missile weapons on the walls of cities. They are useless there, and put the AI at a disadvantage because they don't come down in time to defend properly..if at all.

    Creator of: "Ecce, Roma Surrectum....Behold, Rome Arises!"
    R.I.P. My Beloved Father

  7. #27

    Default Re: ReallyBadAI Battle System for RTW/RS2

    In some respects it depends how you are attacking - for if you are assaulting with Ladders, or even Towers, then 'proper' infantry units are the best things to have on the walls once the 'enemy' have reached the walls. Where, however, they are not so good is if you manage to destroy the wall(s) either side of them and they don't move them fast enough to stop that.

    I must admit that I've never found the 'defending the walls' bit to be a particularly bad part of the BAI performance - certainly compared to wanting to tweak the open-field a bit more. Making sure it defends the central plaza would have more effect.
    "RTW/RS VH campaign difficulty is bugged out (CA bug that never got fixed) and thus easier than Hard so play on that instead" - apple

    RSII 2.5/2.6 Tester and pesky irritant to the Team. Mucho praise for long suffering dvk'.

  8. #28
    dvk901's Avatar Consummatum est
    Patrician

    Join Date
    Mar 2006
    Location
    Michigan
    Posts
    20,984

    Default Re: ReallyBadAI Battle System for RTW/RS2

    Quote Originally Posted by ur-Lord Tedric View Post
    In some respects it depends how you are attacking - for if you are assaulting with Ladders, or even Towers, then 'proper' infantry units are the best things to have on the walls once the 'enemy' have reached the walls. Where, however, they are not so good is if you manage to destroy the wall(s) either side of them and they don't move them fast enough to stop that.

    I must admit that I've never found the 'defending the walls' bit to be a particularly bad part of the BAI performance - certainly compared to wanting to tweak the open-field a bit more. Making sure it defends the central plaza would have more effect.
    You know, I totally forgot about that, as I almost never use siege towers or ladders. Very good point. And yes, defending the plaza would be a better place to focus. At present, once you've gotten into the city, you invariably find that there are only one or two units defending the 'flag'...which makes it too easy.

    Creator of: "Ecce, Roma Surrectum....Behold, Rome Arises!"
    R.I.P. My Beloved Father

  9. #29

    Default Re: ReallyBadAI Battle System for RTW/RS2

    urLordships got a really valid point .. Ive always thought the AI did fairly well when attacking and using seige equipement or even when defending. As where on the subject the current Carthage campaign using the Darth AI formations, the AI initiated a night time attack to try and break the seige that I had started on Massila. I've never seen the AI do that before during the siege and it took me by surpise. I also noticed prior to that Rome was able to capture Massila within the turn following them laying siege to the city - and the Greeks had a full stack garrisoning it so not sure whats up there.

    Is there any way that the AI could be forced to retrain units aka Alex.exe or disband and recruit a new stack ? I know if it was possible it would have been done by now but I thought Id ask the question..

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

    Default Re: ReallyBadAI Battle System for RTW/RS2

    Guys,

    somehow life took over and I haven't been able to continue the project. It seems now that I need to wrap up SS 7.0 work - since most of the code has been ready for 18 months or more.
    I have RTW installed, I just need some spare time to see what workarounds I could use - off the top of my head I see at least one, that would include adding unique unit attributes (like "rbai_1-500").

    Edit: that last idea may not work at all.

    Regards
    Last edited by Germanicu5; September 14, 2014 at 04:55 AM.
    I have no memory of this place.

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

    Default Re: ReallyBadAI Battle System for RTW/RS2

    Some basic features work now, unfortunately a few major commands controlling AI army are missing, but there are some workarounds to try (although not so effective).

    RTW is more primitive in terms of possible debugging and monitoring, so I can't really check AI behavior "on the fly" by seeing which code is executed, which is an annoyance.

    You can also expect a version of RBAI hardcore.

    I'll upload a basic script for testing within a few weeks maximum.

    Regards
    I have no memory of this place.

  12. #32

    Default Re: ReallyBadAI Battle System for RTW/RS2

    Thanks!


    Under patronage of Spirit of Rob; Patron of Century X, Pacco, Cherryfunk, Leif Erikson.

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

    Default Re: ReallyBadAI Battle System for RTW/RS2

    I have an update on what can be expected, sadly the AI can't be controlled the way it's possible in MTW. RTW is also totally unforgiving when it comes to unit labelling errors, so I can't "probe" AI armies to see how many of them are around and script their behaviour.


    I will focus on passive features: protecting the general, using special abilities (testudo?), preventing AI from getting stuck during sieges (I have not noticed the AI being stuck lately anyway, but I assume it's an issue).
    Of course RBAI hardcore will be implemented to some level.

    What will not happen: more aggressive AI during battles (particularly when defending)*, sally-out turning into sieges - basically aything involving changing complex behaviour.
    Also no reinforcements tweaks as mentioned before.

    Regards

    Edit: I've been able to use a decent workaround (not listed in docudemons) to tackle the issue, so it's relatively conceivable for 1st AI army (Alx only).
    Last edited by Germanicu5; October 20, 2014 at 04:09 PM.
    I have no memory of this place.

  14. #34

    Default Re: ReallyBadAI Battle System for RTW/RS2

    Sounds encouraging despite RTW limitations


    Under patronage of Spirit of Rob; Patron of Century X, Pacco, Cherryfunk, Leif Erikson.

  15. #35

    Default Re: ReallyBadAI Battle System for RTW/RS2

    Sounds very good indeed!

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

    Default Re: ReallyBadAI Battle System for RTW/RS2

    A small update on the progress: more responsive AI when defending in land battles works, same with AI protecting the general. It still might need a few tricks, I may be able to pull off a bit more advanced system than for MTW.
    Also (jut in case) - in theory AI not getting stuck during sieges should work.

    I have a small dream for the future: adjusting formation and basic army strategy based on player's army composition, maybe some crazy formation (like 2 attack columns separated by 150m or so to divide player's forces).

    What holds me back:
    this code works - monitor_event ShortcutTriggered ShortcutTriggered card_manager select_infantry
    this doesn't - call_object_shortcut card_manager select_infantry

    I tried all possible combinations to automatically select unit cards of units of a specific category (including select_ui_element), but failed. Perhaps one of you can have a fresh look at this issue.

    Regards

    P.S. In your opinion - does AI deploy too close to walls when player sallies out?
    Last edited by Germanicu5; October 25, 2014 at 03:01 PM.
    I have no memory of this place.

  17. #37

    Default Re: ReallyBadAI Battle System for RTW/RS2

    Quote Originally Posted by Germanicu5 View Post
    ...............

    P.S. In your opinion - does AI deploy too close to walls when player sallies out?
    No, in all normal sieges the AI deploys similarly to the player (or as the player can); with units with siege equipment up on the 'line'. However, I will note that the rest of the army is often at a considerable distance - far enough occasionally for the player to sally and destroy a lone attacking unit.

    When an actual sally-forth in initiated by the player, the AI normally makes immediately for the closest high ground.
    "RTW/RS VH campaign difficulty is bugged out (CA bug that never got fixed) and thus easier than Hard so play on that instead" - apple

    RSII 2.5/2.6 Tester and pesky irritant to the Team. Mucho praise for long suffering dvk'.

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

    Default Re: ReallyBadAI Battle System for RTW/RS2

    @ur-Lord Tedric

    Thanks for the answers, I haven't had time to look into sally-out battles yet, but it gives me an excuse not to do so, since AI's strategy here is quite obvious.
    It would be almost impossible to tweak it without making AI run along the walls, still doable though (perhaps not worth it).

    Regards
    I have no memory of this place.

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

    Default Re: ReallyBadAI Battle System for RTW/RS2

    I would've posted the AI a week ago, but I've encountered an odd inconsistency. I'm using 2 PCs for modding, on one I have to run the game in compatibility mode.

    Now the fun part - a certain part of code causes a straight CTD on PC1, but does not do that on PC2 in Win8 compatibility mode (because it attaches shim to the process and interceps some calls).

    In other words - you can have non-working code in the show_me script, but the script and the game will not crash.

    Regards
    I have no memory of this place.

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

    Default Re: ReallyBadAI Battle System for RTW/RS2

    I've been able to solve code launching strategy, which was the main issue (actually I needed to prevent CTD in something like 1% of battles - cases in which player helps an allied army, but does not attack).

    Here is the first alpha version of scripts, for campaign (paste into background script), RTW Alex only. The code is WIP, so it's untidy and will be as I leave MTW code as guidance.

    Active features - AI more active when defending, AI protecting its general (open battles and sieges), occasional "ai got stuck during siege" fix.

    I'll hopefully attach a version of RBAI hardcore in several hours as well (edit: or not).

    Regards

    P.S. Please post if you encounter define_unit_group error.

    P.S. 2. More recent scripts are found in a later post.
    Last edited by Germanicu5; November 03, 2014 at 05:51 PM.
    I have no memory of this place.

Page 2 of 3 FirstFirst 123 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
  •