Results 1 to 9 of 9

Thread: Battle AI Script Management - Idea Kitchen

Hybrid View

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

    Default Battle AI Script Management - Idea Kitchen

    Hey people,

    I am going to tackle the scripts in the game. At first glance, I see that most scripts do not have unit type discrimination, which is an opening to extensive overhaul of the battle AI is managed properly.

    I like to hear and discuss ideas on the actions AI general should take. This is not a technical discussion thread, but rather a thread to make us understand how we can command the AI general better. Remember that AI general may not have a grand strategy other than reaching your units or a high point on map. So, when we generate the ideas, we have to think from that perspective and rethink again on how we may make things work smoother.

    For example, we want to eliminate the cavalry units charging into spear walls or generals suiciding themselves. I believe these things are possible, if clear cut and precise definitions for the actions are given.

    Again as an example:

    - If unit is cavalry.
    ... - Enemy unit spear infantry.
    ...... - Unengaged friendly units present nearby.
    ......... -> Do not engage.
    ...... - Engaged friendly units present nearby.
    ......... - Nearby units more than enemy units.
    ............ -> Do not engage.
    ......... - Nearby units less than enemy units.
    - xxxxxxx

    And such. It is difficult to make up these clear instructions and make them simple. Too complex and it won't be possible to implement.

    If you are interested, come up with ideas

  2. #2
    Inevitability won
    Patrician Citizen

    Join Date
    Mar 2010
    Posts
    9,594

    Default Re: Battle AI Script Management - Idea Kitchen

    The scripts you see are not the AI. They are merely some functions that are no doubt used within the AI algorithms to work out unit spacing and the like, nothing to the level you seem to want to be able to change.

    The AI is not located within any type of lua as far as Iv seen in any of the 3 Warscape engine games.

  3. #3

    Default Re: Battle AI Script Management - Idea Kitchen

    Quote Originally Posted by .Mitch. View Post
    The AI is not located within any type of lua as far as Iv seen in any of the 3 Warscape engine games.
    The historical Battle AI is all done in Lua
    My Tools, Tutorials and Resources

    Was running out of space, so see the full list here!

    Consider the postage stamp: its usefulness consists in the ability to stick to one thing till it gets there.- Josh Billings
    The creatures outside looked from pig to man, and from man to pig, and from pig to man again; but already it was impossible to say which was which.- George Orwell

  4. #4
    Inevitability won
    Patrician Citizen

    Join Date
    Mar 2010
    Posts
    9,594

    Default Re: Battle AI Script Management - Idea Kitchen

    No thats not AI, hence when you remove that scripting the enemy still fights. That scripting is specific commands, like "go here, at this time", and most of it is specificaly made for the certain map. You won't make an AI that is based on If statements that can handle random scenarios with what is available..

    At the very most, at least in my opinion, you'd only be able to alter the functions in the lua, such as the distance between units function, perhaps add a few If's in there to stop/do certain things, providing you know the actual battle scripting functions too.

    If you believe it is possible, you'd need to get some serious stuff written down and discussed before even thinking of attempting it.

  5. #5

    Default Re: Battle AI Script Management - Idea Kitchen

    The functions mentioned, I believe, are the functions employed by the AI in some way. But I might have misunderstood the 'release to AI' remarks I saw on the script files. I thought that AI was like a 'general manager' and the scripts are like 'department heads'. Take the Pursuit script for example. Why such a script?

    It feels like this to me: AI first makes a general strategy decision. For example, decides to move the army at the enemy position. It would call the Patrol script, with a set of parameters no doubt. How AI determines those parameters ( i.e. the set points) and formation and speed etc is unknown to us. Yet, the examples show how they might be used and is probably used within AI. AI keeps track of all units, their positions, types and various stats. It might run some scripts on a loop, like the Pursuit script.

    Now, my question is: If we can change the Pursuit script, are they going to be called with our 'revised' version? Or AI has its own functions that has nothing to do with what we see.

    If the latter is the case, I am wasting my time. I guess the only way to do this is to try. When I have time, I will report with my findings. I hope you will do similar as well.

    Example: Change the Interception Radius in the Pursuit script, to some extraordinarily large or small value. Let's see how AI behaves then.

  6. #6
    The Hedge Knight's Avatar Fierce When Cornered
    Artifex

    Join Date
    Oct 2009
    Location
    England
    Posts
    5,875

    Default Re: Battle AI Script Management - Idea Kitchen

    If your talking about the scripting libruary its because its used in historic battles.

    The whole point of warscape battles was for them not to have a scripted ai unlike rome/medII which is why empire was so bad in terms of ai.

  7. #7

    Default Re: Battle AI Script Management - Idea Kitchen

    Well... The AI will check whether one unit is close or not, right? It will check whether a unit is attacked, is inside range, is flanked etc.

    My question is: Does AI use any of the functions written in the .lua files in campaign battles?

  8. #8
    The Hedge Knight's Avatar Fierce When Cornered
    Artifex

    Join Date
    Oct 2009
    Location
    England
    Posts
    5,875

    Default Re: Battle AI Script Management - Idea Kitchen

    No.

  9. #9
    Condottiere SOG's Avatar Domesticus
    Join Date
    Dec 2006
    Location
    Oregon, USA
    Posts
    2,274

    Default Re: Battle AI Script Management - Idea Kitchen

    It is possible to manipulate AI behavior in 'kv_rules'
    Erasmo
    Operating System: Windows 7 Home Premium 64-bit (6.1, Build 7601)
    System Manufacturer: ASUSTeK Computer Inc.
    System Model: G73Sw
    Processor: Intel(R) Core(TM) i7-2630QM CPU @ 2.00GHz (8 CPUs), ~2.0GHz
    Memory: 12288MB RAM
    Available OS Memory: 12266MB RAM
    Page File: 2634MB used, 21881MB available
    Windows Dir: C:\Windows
    DirectX Version: DirectX 11
    DX Setup Parameters: Not found
    User DPI Setting: Using System DPI
    System DPI Setting: 96 DPI (100 percent)
    DWM DPI Scaling: Disabled
    DxDiag Version: 6.01.7601.17514 32bit Unicode

Posting Permissions

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