Results 1 to 10 of 10

Thread: Getting Back the Old Way of Fighting

Hybrid View

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

    Default Getting Back the Old Way of Fighting

    Yo guys!! As you know in 2.04a they kinda got rid of ye old germanicu5 battle ai. It had bugs and stuff, but I remember 2.03c well enough that I'd prefer it to how the ai is fighting in 2.04a. So thanks to advice from the ever so considerate modders of EB2 I kinda know how to reinstate the old ai. However, there's still the issue of pre-battle deployment. You know the stage where you can move your units around rapidly to make your own custom battle deployment, maniple style formation, or double phlanx line or whatever. Because the ai is kinda..you know MTW2 ai.... the enemy army never really changes their pre-battle deployment formation except to either move it wayyy back or movee it wayyy forward in consideration to the distance of the enemy army. So, one wonders which file governs how units are always initially deployed (this includes player's units as well).

    To give an example, now in 2.04a units are regularly deployed in really thing, long formations, sometimes only 2-3 men deep (or 2-3 rows). How then does one make it so that units always will come in deeper formations or, more importantly in double phalanx lines at least. TO give illustration to what I'm talking about, how to make it so that in pre-battle deployment the army will already (without player interference) look like this : iiiiiiii (the small dots of i's represent the first battle line, the body of the i the second), instead of like this _______________ (one reallly long thin formation). Anybody who's played a real time battle (not the auto-calc) in 2.04a knows what I'm talking about. This includes the incredibly crucial, if I do so say myself , position of enemy cavalry. Because as you know in MTW2 ai, if they have only 2 cav units (in a situation where they barely have any cav) aside from the general they will position each on the flanks and the gen in the middle, and if their formation looks like this: ____________________ , well the general is just a sitting duck in the center, and his cav can't reach him in time to help. I remember the times in MTW2 where the cav are sometimes position right next to the gen, and believe me, it REALLY made things more difficult, because that one neighboring cav unit could give enough time for the gen to get away and charge at a better position, or that cav unit can do a preemptive charge that stops your general killing unit in its tracks. It really plays how the battle will go because as you know, the life and death of the general determines whether the units rout or stand. Sometimes all MTW2 battles basically have strategy that turns on one thing: Kill the King (general or captain), or so to speak.

    So, to summarize, what files determine the "standard" deployment of armies initially (like right after the screen loads) and without player or ai interference? Assistance would be really appreciated.

  2. #2
    z3n's Avatar State of Mind
    Moderator Emeritus

    Join Date
    Aug 2011
    Posts
    4,636

    Default Re: Getting Back the Old Way of Fighting

    2.03c did not have germanicu5 BAI in it, only 2.0/2.01 had it.

    descr_formations_ai but like I already said I am working on formations in the next updates. And yes I already read your description in the testing thread.


    By the way I'm really at a loss as to why you enjoyed 2.03c's BAI more.. I always found it extremely passive to the point of being completely non-reactive upwards of 1/3 of the times during my tests and rarely utilizing 60%+ units. What exactly did you like about it?
    Last edited by z3n; August 06, 2015 at 01:37 AM.
    The AI Workshop Creator
    Europa Barbaroum II AI/Game Mechanics Developer
    The Northern Crusades Lead Developer
    Classical Age Total War Retired Lead Developer
    Rome: Total Realism Animation Developer
    RTW Workshop Assistance MTW2 AI Tutorial & Assistance
    Broken Crescent Submod (M2TW)/IB VGR Submod (BI)/Animation (RTW/BI/ALX)/TATW PCP Submod (M2TW)/TATW DaC Submod (M2TW)/DeI Submod (TWR2)/SS6.4 Northern European UI Mod (M2TW)

  3. #3

    Default Re: Getting Back the Old Way of Fighting

    I think you guys should contact the SSHIP team if you want some help on how to make a better BAI. Their submod might not feature as many changes to the battle gameplay of the game like EB, but I've found their BAI to be absolutely marvelous for their submod.

  4. #4

    Default Re: Getting Back the Old Way of Fighting

    ;### This file contains manually scripted AI behaviour by Germanicu5 eliminating previously unfixable hardcoded bugs.

    Dude, this is the starting line in the background script file found in data\scripts\show_me of 2.03c. I'm sure of it, because unless my dw is wrong, the file's name really is 2.03c, compressed in 7zip format. And there is a looott of ai related text in said background script. For your query regarding the unresponsiveness of 2.03c's AI, YES, I have experienced it, ONLY when one didn't click the flashing adviser face. If you clicked Greek bearded face, the ai suddenly goes on the move and becomes less stupid. But your query kinda disturbed me, so I'll preserve the necessary files from 2.01 instead. And, believe me, even the unresponsiveness of the ai in 2.03c is better than 2.04a. a line with a reserve: iiiiiii, is still infinitely better than this:___________________.

  5. #5
    z3n's Avatar State of Mind
    Moderator Emeritus

    Join Date
    Aug 2011
    Posts
    4,636

    Default Re: Getting Back the Old Way of Fighting

    Z3NNN!! I just checked 2.03c. You really don't remember?????? ;####### Formations reworked by Germanicu5, tweaked for EBII by z3n #######??????? Dude, you were the one who reworked this in 2.03c!!! And as I said, the germanicu5 ai is in the background script!!! Hahhahaha!!!
    Oh dear you caught me. Well, actually you didn't.
    I really dislike writing longwinded technical posts until I warm to the subject but if you so desire... Let me begin.

    If you read it carefully it says manually scripted AI >behaviour<, not an actual BAI.

    The reason there are so many lines is because basically there are huge segments of repeated unit labels over and over again, but there are only 3 main things its meant to fix. Units are supposed to be matched during open battles, Horse archers aren't supposed to approach the enemy battle lines, Elephants attacking gates (and I'm not sure this even worked in the first place even after Quintus fixed something in the EDU on my request).

    The rest is unused, for example stakes script which is useful but unnecessary and unneeded for EBII, reinforcements part had to be removed because it caused very unstable reinforcing battles. Other than that I can't see anything else other than ordering the general to repeatedly stop which may or may not work/be useful.

    The files used by the BAI are

    1) battle config - data - purpose - controls unit behaviour and calculations based on that

    2) config ai battle - data - purpose - several different functions, mostly ways to control how calculations work/start/finish

    3) pathfinding (according to a discussion I had in private with makanyane the consensus we had was that pathfinding db is an unused file only the txt is used, also observed in my testing and hers on the subject) - data - purpose - pathfinding nodes have a part in calculations done and army movement

    4) descr formations ai - data - purpose - intial formation of ai + player armies, calculations based on relative unit position from player

    5) background script - data/scripts/show_me - purpose - scripted battle conditions + effects

    6) export_descr_unit - data + purpose - unit calculations e.g. cycle charge/flanking/unit matching

    With the background script, what we decided to do is keep it in until we could move away from it. I had originally planned on keeping it in/working with it but instead I left it be until the CTD reports became more of an issue than the issues it fixed. Which weren't very important to begin with for us.


    So lets read what CA (the game developers worked in a studio called The Creative Assembly) said about a command located within the script http://www.totalwar.org/Downloads/Rt...n_commands.txt
    ---------------------------------------------------Identifier: ai_active_set
    Parameters: on/off
    Description: Turns AI on or off
    Sample use: ai_active_set off
    Class: AI_ACTIVE_SET
    Implemented: Yes
    Author: Robbie
    In case it isn't immediately obvious, this command immediately brings to attention that the real AI is located somewhere else. Where? Not the script because the scripting language MTW2 has can tell the exe to tu turn the AI on or off...

    The real file that controls the battles 'intelligence' located in config ai battle and written in XML which is a flexible programming language. There are two types of XML implementations, one with a parser and one without someone once said that the game did have a parser but I can forgive them because they're not familiar with programming or a programmer themselves. Fortunately for us CA developers for the sake of their sanity decided to make the exe itself act as a parser during the battles according to its own understanding/logic this can be observed in previous tests and my own tests. So you could say its the real AI as it's worth noting there is a BAI written into the exe itself with its own commands for situations if you completely removed every single config ai battle file according to Taiji. Its hard to decide which exactly is the real battle AI unless you realize that the exe is truly the AI in this case, as it is trying to be 'intelligent' but the config ai file itself is the artificial part. RTW was written in C++ if I remember correctly from what a software engineer told me about 2 years ago and it stands to reason MTW2 would be too so this means that the exe is written in an object oriented language. This lets the AI be very powerful if so enabled by the other files due to the inherent efficiency and effectiveness of the C language. To this day we still have barely advanced the programming languages past that point other than in very specific disciplines. Last I heard we are still waiting for that 'next' language after C++ all these years later, CA did quite well to choose to write the exe in that language. So to close, I decided I will not be doing changes to the formations based on all this feedback because you have successfully convinced me otherwise (actually I'm only joking about that ).
    The AI Workshop Creator
    Europa Barbaroum II AI/Game Mechanics Developer
    The Northern Crusades Lead Developer
    Classical Age Total War Retired Lead Developer
    Rome: Total Realism Animation Developer
    RTW Workshop Assistance MTW2 AI Tutorial & Assistance
    Broken Crescent Submod (M2TW)/IB VGR Submod (BI)/Animation (RTW/BI/ALX)/TATW PCP Submod (M2TW)/TATW DaC Submod (M2TW)/DeI Submod (TWR2)/SS6.4 Northern European UI Mod (M2TW)

  6. #6

    Default Re: Getting Back the Old Way of Fighting

    And you know what, what nvm said is right. Firstly I don't know the relationship of the modders of EB2 with the rest of the modder community, and I won't presume on being an expert on inter-modder (ha, made that word up) relations, but is it permissible to use parts of other guys mods? I mean, this is from my experience, but mods like Stainless Steel, and Darthmod had pretty good battle ai. I also don't want to presume, but grand strategy and diplomatic strategy wise, Stainless Steel also was good at that. I never complained about stainless steel, the only problem was the uber power of Heavy Cavalry and the fact that generals (your own) were more of a threat than the enemy cause they kept on getting bankrupt traits and becoming rebels. So, would it be completely alright for EB2 to grab at least the battle ai from other mods?

  7. #7

    Default Re: Getting Back the Old Way of Fighting

    Z3NNN!! I just checked 2.03c. You really don't remember?????? ;####### Formations reworked by Germanicu5, tweaked for EBII by z3n #######??????? Dude, you were the one who reworked this in 2.03c!!! And as I said, the germanicu5 ai is in the background script!!! Hahhahaha!!!

  8. #8

    Default Re: Getting Back the Old Way of Fighting

    I have to say, I think G5 is overrated. It had this annoying tendency for enemy units to swirl around while you were advancing towards them, and it still suffered from the hardcoded "matching" nonsense. Where the AI couldn't even hold a line, because it was busy trying to chase down your flanking units, breaking up it's own line to do so.

  9. #9

    Default Re: Getting Back the Old Way of Fighting

    OK then. But, now that I have been illuminated in the presence of the scripts folder and the stuff therein, I have a question. In 2.04a, aside from forced diplomacy, all the other scripts are basically just named blanks. Like, they really don't have stuff in them, except their titles. So, exactly what file now is governing battlefield ai??? Are there plans to tweak it?

  10. #10

    Default Re: Getting Back the Old Way of Fighting

    "How then does one make it so that units always will come in deeper formations or, more importantly in double phalanx lines at least."

    The last number in the "formation" line in EDU is the number of rows of each unit. If you want the units to be less wide and deeper, increase the number.

Posting Permissions

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