View Poll Results: Would you like enemy AI reinforcements (when AI is more powerful) to:

Voters
72. You may not vote on this poll
  • join main AI army?

    32 44.44%
  • attack player?

    28 38.89%
  • do something else? (please post feedback)

    2 2.78%
  • plant potatoes and watch Middle-earth pawn Central Europe on the market?

    10 13.89%
Page 2 of 46 FirstFirst 12345678910111227 ... LastLast
Results 21 to 40 of 909

Thread: ReallyBadAI Battle System +Hardcore +Settlements v5.7 >Oct 17< ### New Imladris AI ### incl. Battle AI and Content Switcher

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

    Default Re: ReallyBadAI and Battle AI Scripts (Stakes etc.) for TATW and RC+TATW

    @Taiji
    That's a two-edged sword, but I think increasing throughput and queue sizes while not overdoing it is a good decision. I've been thinking about scripting the whole 1st phase of attack, but I'll stick to easier methods for now.

    @Podolskius
    1.It's compatible and copying my files after installing RC is enough. It's Mithrandir's and Point Blank's decision whether they want any other mods integrated with their AI though.
    2. Not yet, imo it'll appear after the modding scene for TATW stabilises a bit.

    Regards
    SS 7.0 - The work continues

  2. #22

    Default Re: ReallyBadAI and Battle AI Scripts (Stakes etc.) for TATW and RC+TATW

    Thanks for your quick reply, Germanicu5!

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

    Default Re: ReallyBadAI and Battle AI Scripts (Stakes etc.) for TATW and RC+TATW

    Hey mate, can these 2 commands be fired in mid battle?

    Identifier: invulnerable_general
    Parameters: character_name
    Description: invulnerable_general <character_name> : makes that named general invulnerable in battle
    Sample use: invulnerable_general <rufus>
    Class: BATTLE_INVULNERABLE_GENERAL
    Implemented: Yes
    Author: Adam
    ---------------------------------------------------
    Identifier: vulnerable_general
    Parameters: character_name
    Description: vulnerable_general <character_name> : makes that named general vulnerable in battle
    Sample use: vulnerable_general <rufus>
    Class: BATTLE_VULNERABLE_GENERAL
    Implemented: Yes
    Author: Adam

    If they can and there is some way to insert the correct generals name we could have generals that only become vulnerable 5-10 mins into a battle, or something like that.

    What do you think?

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

    Default Re: ReallyBadAI and Battle AI Scripts (Stakes etc.) for TATW and RC+TATW

    @Taiji
    Yes, thay can be fired, I've done that before. And that's about it for good news.
    To make it work properly you'd need to put all possible combinations of names into a campaign script, but whenever a non-existing name appears, logs shows the game can't the script. So the only choice left is using general names which already exist during the start of a campaign. They invulnerability would probably need to be fired together with a battle, because otherwise it'd need condition monitoring and given the number of possible names, it would most likely cause lags.
    The last and pretty important thing is havoc 1 bodyguard can cause among player troops, it just goes from unit to unit killing everything it touches, it's so annoying nobody would stand that in a long run (actually I couldn't stand that in one battle).

    Info for Stakes Deployment Script Timer v0.12 users:
    v0.13 Bugfix Update available, please redownload the script for addtional functionality. Stakes deployment as such wasn't influenced.

    Battle AI Switcher released, see 1st post for details.

    Regards

    Last edited by Germanicu5; May 09, 2009 at 02:51 AM.
    SS 7.0 - The work continues

  5. #25

    Default Re: ReallyBadAI, Battle AI Switcher and Scripts (Stakes etc.) for TATW and Real Combat+TATW

    Little explanation on "Battle AI Switcher" please..
    Dico tibi verum, libertas optima rerum, nunquam servili sub nexu vivito, fili
    Invincibility lies in the defence; the possibility of victory in the attack.

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

    Default Re: ReallyBadAI, Battle AI Switcher and Scripts (Stakes etc.) for TATW and Real Combat+TATW

    Quote Originally Posted by Lacedaemonian View Post
    Little explanation on "Battle AI Switcher" please..
    A while ago there was a discussion in my SS/RR/RC thread regarding reloading battle-related files. The game caches battle_config.xml and config_ai_battle.xml before each battle, which means that it reads new values if these files are replaced. Ofc it would be too easy if it was that obvious... not all settings are reloaded, even if a totally new file is cached, for instance skirmishing distances stay the same until game restart (I suspect this is because they're related to EDU in a way).

    The conclusion was that a battle files switcher could be introduced - one that copies over a new set of AI files every x minutes and that's what I posted. This script will reload battle AI files as soon as it's started and kingdoms.exe is ruinning, then it will loop every 5 minutes and copy a randomly chosen set of ai files to mod's "Data" folder, replacing the old ones. Once kingdoms.exe process is terminated the script will detect it and shut automatically during a loop.

    Regards
    SS 7.0 - The work continues

  7. #27

    Default Re: ReallyBadAI, Battle AI Switcher and Scripts (Stakes etc.) for TATW and Real Combat+TATW

    OK I have a question looks good but both BAI sets have the same file names so can't exist in the TATW directory at the same time? One set overwrites the other on installation.

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

    Default Re: ReallyBadAI, Battle AI Switcher and Scripts (Stakes etc.) for TATW and Real Combat+TATW

    Each set is in a separate directory and is copied from there to "data" when a random number assigned to a certain set is generated (old files are overwritten as mentioned before), which makes it all convenient to use.
    Edit: Overwriting files in "data" directory doesn't cause any crashes etc, since after both AI files are cached they can be freely deleted/modified - and new AI set will get loaded as soon as another battle is started. So at a given time only one set of AI files exists in "data" directory and is read from there by the built-in xml parser.

    I hope I understood your concerns well.

    Regards
    Last edited by Germanicu5; May 09, 2009 at 07:15 AM.
    SS 7.0 - The work continues

  9. #29

    Default Re: ReallyBadAI, Battle AI Switcher and Scripts (Stakes etc.) for TATW and Real Combat+TATW

    Ah ok I just copied the files across directly from winzip, which didn't apply the directory structure, but when I extracted it, it worked properly. My own dumb fault

    Great work by the way!

    Will you be adding more BAI sets?

  10. #30

    Default Re: ReallyBadAI, Battle AI Switcher and Scripts (Stakes etc.) for TATW and Real Combat+TATW

    So, I understand, this IS compatible with RC for TATW?

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

    Default Re: ReallyBadAI, Battle AI Switcher and Scripts (Stakes etc.) for TATW and Real Combat+TATW

    @PB Yep, more AIs on the way. I'm adding slightly different formations now, but I've got loads of work irl till monday... possibly 2 more sets will be added in a few hours though.

    And thx for ""... it took me a while to write that script.

    @Archer9
    Yes, it's compatible.
    Make sure that after unpacking the structure of new files in mods\Third_Age\ is as follows: "G5BAISwitcher.vbs" and modified "Third Age.bat (size: 100 bytes)" in the main directory, plus 2 additional directories visible there: "AISet1" and "AISet2".

    Regards
    SS 7.0 - The work continues

  12. #32

    Default Re: ReallyBadAI, Battle AI Switcher and Scripts (Stakes etc.) for TATW and Real Combat+TATW

    Quote Originally Posted by Germanicu5 View Post
    A while ago there was a discussion in my SS/RR/RC thread regarding reloading battle-related files. The game caches battle_config.xml and config_ai_battle.xml before each battle, which means that it reads new values if these files are replaced. Ofc it would be too easy if it was that obvious... not all settings are reloaded, even if a totally new file is cached, for instance skirmishing distances stay the same until game restart (I suspect this is because they're related to EDU in a way).

    The conclusion was that a battle files switcher could be introduced - one that copies over a new set of AI files every x minutes and that's what I posted. This script will reload battle AI files as soon as it's started and kingdoms.exe is ruinning, then it will loop every 5 minutes and copy a randomly chosen set of ai files to mod's "Data" folder, replacing the old ones. Once kingdoms.exe process is terminated the script will detect it and shut automatically during a loop.

    Regards
    Thanks for explanation. +rep
    Dico tibi verum, libertas optima rerum, nunquam servili sub nexu vivito, fili
    Invincibility lies in the defence; the possibility of victory in the attack.

  13. #33
    Mithrandir's Avatar Flame of Anor
    Join Date
    May 2008
    Location
    Sweden
    Posts
    8,540

    Default Re: ReallyBadAI, Battle AI Switcher and Scripts (Stakes etc.) for TATW and Real Combat+TATW

    This sounds very promising indeed... I'll have to try this when RC is done.


    Under the patronage of
    Code_Knight

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

    Default Re: ReallyBadAI, Battle AI Switcher and Scripts (Stakes etc.) for TATW and Real Combat+TATW

    A total of 4 sets of different AIs available for Real Combat+ TATW now. They combine previous 2 sets with a new battle formation used instead of classical ai_triple_misiles_in_front, troops are more condensed in this version. I also renamed Batte Switcher version number to avoid confusion with ReallyBadAI+Stakes.
    First post updated.
    More changes coming when I have some spare time.

    Regards
    Last edited by Germanicu5; May 09, 2009 at 09:47 AM.
    SS 7.0 - The work continues

  15. #35
    /|\/|\/|\/|\/|\/|\/
    Join Date
    Jun 2005
    Posts
    10,738

    Default Re: ReallyBadAI, Battle AI Switcher and Scripts (Stakes etc.) for TATW and Real Combat+TATW

    Very cool 'Battle AI Switcher', really fascinating to see how you've done it +rep

    Although I see a minor potential problem. Is there an easy way to tell which AI set was in use in the last battle? Possibly it could be worked out if the formations are obviously different. It just seems that when you have a problem reported it would be nice to know which file to focus on.

    I have to stress again though... its' awesome! Really awesome!

    edit: OK now I am starting to think about it, though I lack any experience in programming....

    Would this work for 4 sets of AI files or am I missing something important? Like so:

    Spoiler Alert, click show to read: 
    WScript.Sleep 10000
    strProcess = "kingdoms.exe"
    strComputer = "."
    Set oFSO = CreateObject("Scripting.FileSystemObject")
    Set oWSH = CreateObject("WScript.Shell")
    sCurDir = oFSO.GetParentFolderName(WScript.ScriptFullName)

    Function IsProcessRunning( strServer, strProcess )
    Dim Process, strObject
    IsProcessRunning = False
    strObject = "winmgmts://" & strServer
    For Each Process in GetObject( strObject ).InstancesOf( "win32_process" )
    If UCase( Process.name ) = UCase( strProcess ) Then
    IsProcessRunning = True
    Exit Function
    End If
    Next
    End Function

    Do While True
    If ( IsProcessRunning( strComputer, strProcess ) = True ) Then
    intHighNumber = 4
    intLowNumber = 1

    Randomize
    intNumber = Int((intHighNumber - intLowNumber + 1) * Rnd + intLowNumber)
    If intNumber = 1 then oFSO.CopyFile sCurDir & "\AISet1\*.*", sCurDir & "\data\", True
    If intNumber = 2 then oFSO.CopyFile sCurDir & "\AISet2\*.*", sCurDir & "\data\", True
    If intNumber = 3 then oFSO.CopyFile sCurDir & "\AISet3\*.*", sCurDir & "\data\", True
    If intNumber = 4 then oFSO.CopyFile sCurDir & "\AISet4\*.*", sCurDir & "\data\", True
    End If
    If ( IsProcessRunning( strComputer, strProcess ) = False ) Then
    WScript.Quit
    End If
    WScript.Sleep 290000
    Loop


    I'd be surprised if I'm right since like I said I'm fairly clueless about programming but I am keen to get something like this working with a large selection of AI variations. The bit where I suspect I could have made a mistake is "intNumber = Int((intHighNumber - intLowNumber + 1) * Rnd + intLowNumber)", I don't really understand it and it seems to be defining the range of the randomising process.

    There are so many variations that are effective in different ways it would be great to be able to express them all. Of course it would mean that sometimes you fight an AI that is pretty crap at dealing with the current situation but at others you'd get an AI that is better at the situation through specialisation than one using a more flexible approach.

    Like with my AI it would be nice to lure the player into using a certain siege attack strategy by having most of the potential sets of AI allow the hold the square timer. Then while trying to do what they normally do the alternate, non timer, AI will destroy them... or at least hurt their feelings

    Quote Originally Posted by Germanicu5 View Post
    @Taiji
    Yes, thay can be fired, I've done that before. And that's about it for good news.
    To make it work properly you'd need to put all possible combinations of names into a campaign script, but whenever a non-existing name appears, logs shows the game can't the script. So the only choice left is using general names which already exist during the start of a campaign. They invulnerability would probably need to be fired together with a battle, because otherwise it'd need condition monitoring and given the number of possible names, it would most likely cause lags.
    The last and pretty important thing is havoc 1 bodyguard can cause among player troops, it just goes from unit to unit killing everything it touches, it's so annoying nobody would stand that in a long run (actually I couldn't stand that in one battle).
    The point about the lag and all possible names makes it seem pretty unattractive, AI turns take long enough already. It's a shame, you might not like it but that super-nasty general sounds pretty fun to me. Oh well, I was hoping for a solution to this issue of dismounted generals sucking so bad for the AI.

    edit2: I notice you've already done a script for 4 sets of AI on the other thread, sorry to ask a stupid question and woohoo! I got the answer right!
    Last edited by Taiji; May 09, 2009 at 01:53 PM.

  16. #36

    Default Re: ReallyBadAI, Battle AI Switcher and Scripts (Stakes etc.) for TATW and Real Combat+TATW

    This is some great work , but I note the 4 AI version points to an invalid attachment, or is it just me?

  17. #37
    /|\/|\/|\/|\/|\/|\/
    Join Date
    Jun 2005
    Posts
    10,738

    Default Re: ReallyBadAI, Battle AI Switcher and Scripts (Stakes etc.) for TATW and Real Combat+TATW

    What? you mean you can't download it? ... I had no probs there. Here's the link: http://www.twcenter.net/forums/attac...1&d=1241880180

  18. #38

    Default Re: ReallyBadAI, Battle AI Switcher and Scripts (Stakes etc.) for TATW and Real Combat+TATW

    have we got any more feed back from the guys who have down loaded this anynegatives ?? sounds like an amazing idea i just want to hear no ill affects lag ctd etc before implementing call me over cautious

    Heroes Hordes & beyond The official submod of KGCM (click the sig)

  19. #39
    /|\/|\/|\/|\/|\/|\/
    Join Date
    Jun 2005
    Posts
    10,738

    Default Re: ReallyBadAI, Battle AI Switcher and Scripts (Stakes etc.) for TATW and Real Combat+TATW

    Ok, you're over-cautious

    I shouldn't worry about it Soul Firez, Germaincu5' work has been thoroughly tested with SS+RC - it's only likely to improve your experience of TA:TW

  20. #40

    Default Re: ReallyBadAI, Battle AI Switcher and Scripts (Stakes etc.) for TATW and Real Combat+TATW

    Germanicu5, for the most part your AI rocks but I've found one major bug... the AI will not use their archers in melee even if they're under attack or they've run out of arrows... in both cases they act like complete speds...


Tags for this Thread

Posting Permissions

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