Results 1 to 9 of 9

Thread: Unit behavioural scripting

  1. #1
    Baltizar's Avatar Civis
    Join Date
    Apr 2010
    Location
    Glasgow, scotland
    Posts
    145

    Default Unit behavioural scripting

    Does any one know if there is a way to add a script whereby, during battle, if you designate a unit to move to a position and they come across and enemy unit, you did not notice or anticipate that the AI sends to intercept...can you make a script that allows your units to automatically stop marching and engage with that unit before continuing its march to its designated position....similar to the way the old Take command worked. I find it annoying that the units just continue their march and walk straight in to the enemy unit without automatically stopping when in range and opening fire on them.

  2. #2
    Steph's Avatar Maréchal de France
    Patrician Artifex

    Join Date
    Apr 2010
    Location
    Pont de l'Arn, France
    Posts
    9,174

    Default Re: Unit behavioural scripting

    I don't thin you should have much hope for that.

  3. #3

    Default Re: Unit behavioural scripting

    YES! Totally possible. Done. Works... But if Steph or someone of equal knowledge can help my team get this recompiled and implemented, then possibly a reality. It works in testing, getting it to the game, within a "Battle of..." type scenario, will work for Single-Player.

    Sorry to revive a long-aged thread but I just saw this trolling for "quotes" help....
    ACW 2.6 - American Civil War Released:


    https://www.twcenter.net/forums/show...ar-June-2-2019

  4. #4

    Default Re: Unit behavioural scripting

    It's been known for a long time by now that in historical battles it is possible to script the AI to a certain extent, however, it's historical battles only, and it is very limited, I'm not sure how well you can use it for anything.
    My Mods and Projects

    - Realism Core v5 for La Monteé de L'Empire 4.2 (NTW)
    - Battle Chaos, give life to your fights! (NTW)
    - Battleterrain Mod, larger, better campaign battle maps (NTW)
    - Developer for 1800 (ETW) battle mechanics, unit stats
    - Developer for Victoria Total War (ETW) unit modeller \ texturer
    - Developer of Rise of the Eagles (MTW2 - HOSTED), creator \ db \ models \ textures
    - Risorgimento 1859 The Franco-Austrian War (NTW), creator \ developer

  5. #5

    Default Re: Unit behavioural scripting

    My intention was to create two linked campaign-like Single-Player components: "Campaigns of the Confederacy" and "Campaigns of the Union", using my 43 maps. If we can get stable re-compiles of the LUAc etc, we can make far more interesting battles with the AI defending instead of it generally advancing every time from the historical positions. This would allow my 'Historical Scenario' battles to be played from the attacker-side as well, and linked in sequence like those of the base-NTW game.
    ACW 2.6 - American Civil War Released:


    https://www.twcenter.net/forums/show...ar-June-2-2019

  6. #6

    Default Re: Unit behavioural scripting

    I get that but you cannot "link" battle maps like that. To my knowledge recompiling LUAC files into readable LUAs and back is A very difficult and B inevitably leads to artifacts in the code, which at this point is fairly old and every programmer from the old days has moved on to newer engine iterations (if they're still here at all). So that in itself would be a near-impossible task. The best option IMHO would be studying what has been documented inside the readable LUA files - there is a battle manager \ battle director file that lists some vague possibilities with what we have - and compare it with the much greater info we have either on MTW2's old scripting, which, apart from the syntax, seems pretty similar to me, OR try to use what has been given us with Shogun 2's TEd via the battle scripting functions specifically made to create historical battles. From there you'd make 43 separate battles each with its own scripts.
    My Mods and Projects

    - Realism Core v5 for La Monteé de L'Empire 4.2 (NTW)
    - Battle Chaos, give life to your fights! (NTW)
    - Battleterrain Mod, larger, better campaign battle maps (NTW)
    - Developer for 1800 (ETW) battle mechanics, unit stats
    - Developer for Victoria Total War (ETW) unit modeller \ texturer
    - Developer of Rise of the Eagles (MTW2 - HOSTED), creator \ db \ models \ textures
    - Risorgimento 1859 The Franco-Austrian War (NTW), creator \ developer

  7. #7

    Default Re: Unit behavioural scripting

    I get what you are saying, Sirloin. I know we can't link battles in an order, but I would come up with some sort of convention to name the battles in an order to get the desired result. At worst, I would have a third aspect of game play with scripted AI defense that would make for more interesting battles. I have never played Shogun, I have looked briefly at the tools so maybe that suggestion would be worth looking into. It is a shame CA bungled so many aspects of the tools and community support for this game,the potential could be so great.

    Thanks for the feedback and suggestions.
    ACW 2.6 - American Civil War Released:


    https://www.twcenter.net/forums/show...ar-June-2-2019

  8. #8

    Default Re: Unit behavioural scripting

    Shogun 2's tools were promised for NTW back in the day. Remember the uniform customization? The files for the prototype unit editor are still there inside NTW's packs. They didnt finish the tools for "lack of time", that was their excuse back in the day. This, thankfully, makes most of what S2 has retroactively compatible with NTW. Do check it out. Maybe replacing the standard Napoleon's Battles would be the only option available right now.
    My Mods and Projects

    - Realism Core v5 for La Monteé de L'Empire 4.2 (NTW)
    - Battle Chaos, give life to your fights! (NTW)
    - Battleterrain Mod, larger, better campaign battle maps (NTW)
    - Developer for 1800 (ETW) battle mechanics, unit stats
    - Developer for Victoria Total War (ETW) unit modeller \ texturer
    - Developer of Rise of the Eagles (MTW2 - HOSTED), creator \ db \ models \ textures
    - Risorgimento 1859 The Franco-Austrian War (NTW), creator \ developer

  9. #9

    Default Re: Unit behavioural scripting

    Actually, replacing the standard battles was part of our discussion! Then that evolved into "Could we put a false map under them/move around the icons?". We made some progress but not enough. So much to understand and so little time with all the other aspects that I am trying to get into ACW 2.0. If it was possible to get a campaign map in, then I would be happy to spend the next two years making it all, but.... I suppose never going to be. Another sad loss.
    ACW 2.6 - American Civil War Released:


    https://www.twcenter.net/forums/show...ar-June-2-2019

Posting Permissions

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