Page 1 of 2 12 LastLast
Results 1 to 20 of 39

Thread: Piter AI (new CAI)

  1. #1

    Default Piter AI (new CAI)

    PiterAI- artificial intelligence

    To mod to work properly, please install it always as the last. If you are installing something new is good to repeat the installation.

    Works with 6.0 - 7.0 (all)

    Ver 4.3 (28.12.2023)

    https://drive.google.com/open?id=1NR...bL_79hkRlYOuY7
    It's good to clean before using: https://drive.google.com/file/d/16t0...usp=drive_link

    Bellum 7.0 full original mod:

    https://mtwitalia.freeforumzone.com/...scussione.aspx

    Installation instructions:
    unzip in your mods\BellumCrucis7 folder
    delete the map.rwm file within the mods/BellumCrucis7/data/world/maps/campaign/custom/Ufficiale directory


    Need new campaign


    Information

    Diplomacy is based on many factors but in short it works as follows:

    From the point of view of campaign difficulty level:

    VH level – AI considers player as its biggest threat so it tries to form alliances against the player and tends to go to war against the player. The AI factions easily form alliances if they consider the player their biggest threat.

    H level – AI considers the player as a threat and tries to form alliances against the player and tends to go to war against the player, but to a more limited extent than on VH level. If an AI faction neighbors a faction that is significantly stronger, it will try to find an alliance against such faction. In such situation AI may propose alliance to the player and be a loyal ally.

    N level – AI tries to form alliances against the strong empires (factions that are significantly stronger than AI) and tends to weaken them. If there are no such strong factions, AI will try to go to war against the player. If AI does not border the player, it tries to attack its weakest neighbor (if it tried to attack the weakest neighbor first, the campaign would be rather boring ).

    In general:

    If the AI’s invasion priorities (i.e. code command driving AI to invade a given target) do not exceed a minimum threshold, the AI will not attack other factions (except for rebel / neutral provinces).


    By using the „opportunistic invasion” command in the options of war and rebel provinces conquer, AI will sometimes ignore its diplomatic priorities. Besides, M2TW AI is bugged anyway.

    Alliances – if an alliance is not aimed against an enemy which is the AI priority target, it works as a „non-aggression pact”. The alliance code includes commands which drive AI to attack a common enemy but if it is not the AI perceived “priority enemy”, the chance that such attack will be executed is rather small (especially on VH difficulty).

    Preparations for war



    The tactics responsible for invasion is rather a slow and “lazy” procedure so the AI will usually gather its armies along the borders before it finally decides to invade. Also AI will train its best available units and agents – do not be surprised when an AI assassin kills your favourite general. For the human player this knowledge is not a big facilitation though, since the fact that AI is gathering its forces along the border does not mean that it is going to invade the player’s faction in the nearest future.


    In some circumstances (for instance when the player does not wage a war with its neighbors), a neutral AI faction will also keep its garrisons on the border, just as it waged a war against the (neutral) player. This AI behavior may change when the it is in war with other factions – in such case it may send all its forces to the endangered front.

    War


    The highest priority of AI is besieging settlements – AI uses almost all its military potential on a given front to besiege settlements. It is probably not the best solution but taking into account the limitations of the M2TW engine it seems to be pragmatic and sufficient – otherwise AI would wander its armies aimlessly over the map.
    Then, as a second priority, AI tries to attack the available targets in range, so sometimes when besieging a settlement, another AI army may come to support the siege or even attack a defending player’s army which stands near the besieged settlement (to help defend it in case of assault), while the first AI army still keeps the siege.
    Finally, AI tries to do an “opportunistic attack”, which in some circumstances may ignore other AI settings and priorities. But thanks to this “opportunistic” possibility, AI is more “intelligent” and able to use some unexpected situations to its benefit. Since AI tries to besiege settlements, sometimes it may happen that it will spare player’s army standing on the bridge / ford and will walk around to lay a siege to a settlement or spare the closest strongly garrisoned settlement to lay a siege to the weaker one.


    - AI trains the troops of good quality, generally better than in the majority of mods I’ve seen and I think even better than in the original EB2 (no offence to the original EB CAI coder) since the troops quality depends mainly on the tactics settings in file descr_campaign_ai_db – I don’t know whether the twc modders know that.


    - The additional advantage of such tactics is the AI ability of starving the besieged settlements – AI will not attack until it is certain that it will win (taking into account the result of the autocalc battle).


    - AI is able to hire the mercenaries, which I did not observe frequently using other M2TW CAIs,


    - Of course AI can spam agents in some circumstances (especially the pesky merchants but these are no longer in EB2),


    - When AI declares a war, it can – especially when the border is long – attack simultaneously with several armies in different places along the border, which can demolish a careless player (I hope you don’t use the unhistorical “reload”).


    - AI uses its agents better,


    - AI can successfully strike with a really good sea invasion. This part of the code is perhaps not perfect but in my view it is quite good in comparison to other M2TW CAIs - I would like to see a CAI code which does it better.


    Defence:


    - Here I coded the AI in such a way that it is not so easy to conquer the settlements by attacking an army standing near the settlement and wiping out the settlement garrison that joins the battle as reinforcements (AI tries to place its armies a bit farther from settlements).

    If the total strength ratio on a given front is unfavorable to AI, it will not attack openly but will rather sit in garrisons or try to defend based on bridges / fords and prepare ambushes in forests. On some occasions AI fooled me with the following scheme: I see a weak army near the forest, attack, the AI withdraws to the forest, I attack… and then I am ambushed by significantly stronger AI army. This is not very frequent but the AI in the old M2TW can show some tricks – it’s a pity that the original authors made so weak use of the AI potential in the vanilla game.

    Even on N difficulty if an AI faction concludes that it no longer have common interests with the player and at the same time the AI faction is not in war against any of its neighbours, it may break the alliance with the player. In such case only relations 10/10 or 9/10 can protect the player from breaking the alliance by the AI. If AI is in war with a non-neighbouring faction, it does not count as a war and AI may break the alliance as soon as its common interests with the player end.
    Thank you for the translation Polehammer.




    Thanks for Araven for help in testing.



    Battle AI: I reworked AI Germanicu
    Last edited by Piterx93; December 28, 2023 at 03:09 PM.

  2. #2

    Default Re: Piter AI (new CAI)

    Thanks to you and the Polish community, Piter... I've always appreciated your CAI, one of the best available for MII, hands off!

    Hence, yep, this goes at the end, once you have BC 7.0 + hotfixer!

    Corrected path:
    unzip in your mods\BellumCrucis7 folder
    delete the map.rwm file within the mods\BellumCrucis7\data\world\maps\base directory


  3. #3

    Default Re: Piter AI (new CAI)

    Thank you.

  4. #4
    Hennin's Avatar Libertus
    Join Date
    Jan 2014
    Location
    Spain
    Posts
    74

    Default Re: Piter AI (new CAI)

    Quote Originally Posted by rafmc1989 View Post
    Thanks to you and the Polish community, Piter... I've always appreciated your CAI, one of the best available for MII, hands off!

    Hence, yep, this goes at the end, once you have BC 7.0 + hotfixer!

    Corrected path:
    unzip in your mods\BellumCrucis7 folder
    delete the map.rwm file within the mods\BellumCrucis7\data\world\maps\base directory
    Hello,

    When I deleted the map.rwm in mods\BellumCrucis7\data\world\maps\base directory, the game don磘 generated a new one in this folder. I磎 in round 70.

    is this normal?

    And another question: when I change my capital to another city or castle, do I don磘 have to pay anything in Bellum Crucis 7.0?, the game don磘 charge me nothing when I change it, is that normal?, I remember that in BC version 6.3 cost was around 5.000 thousand.

    I play whit BC 7.0, Bugfixer, Piter AI 4.2 and Germanicus AI v5.7 Battle mod.
    Last edited by Hennin; February 27, 2018 at 10:20 AM.

  5. #5

    Default Re: Piter AI (new CAI)

    mmh, putting the great CAI of Piter requires starting from the startgame again, in any case, so you get the rwm regenerated...

    While about the switching capital costs, mmh I think (from what I recall) the 5000 malus was removed in the scripts, only the info appears...


  6. #6
    Hennin's Avatar Libertus
    Join Date
    Jan 2014
    Location
    Spain
    Posts
    74

    Default Re: Piter AI (new CAI)

    Quote Originally Posted by rafmc1989 View Post
    mmh, putting the great CAI of Piter requires starting from the startgame again, in any case, so you get the rwm regenerated...

    While about the switching capital costs, mmh I think (from what I recall) the 5000 malus was removed in the scripts, only the info appears...
    Hello, I started several times new campains and the game don磘 regenerated the file map.rwm in mods/BellumCrucis7/data/world/maps/base directory.

    How can this be fixed, Is that a problem for the game, when the file map.rwm don磘 generate in that folder?.
    Last edited by Hennin; March 03, 2018 at 02:57 AM.

  7. #7

    Default Re: Piter AI (new CAI)

    Quote Originally Posted by Hennin View Post
    Hello, I started several times new campains and the game don磘 regenerated the file map.rwm in mods/BellumCrucis7/data/world/maps/base directory.

    How can this be fixed, Is that a problem for the game, when the file map.rwm don磘 generate in that folder?.
    Yes,I also have the same problem.

  8. #8

    Default Re: Piter AI (new CAI)

    the correct path to find the newly generated file is this:

    mods/BellumCrucis7/data/world/maps/campaign/custom/Ufficiale directory.

    BC 7.0 came with a single official campaign, minor and alternative ones were removed.. that's why the different path to the rwm than usual..

    every time you start a new campaign and the file is absent, it is generated again.


  9. #9
    Hennin's Avatar Libertus
    Join Date
    Jan 2014
    Location
    Spain
    Posts
    74

    Default Re: Piter AI (new CAI)

    Quote Originally Posted by rafmc1989 View Post
    the correct path to find the newly generated file is this:

    mods/BellumCrucis7/data/world/maps/campaign/custom/Ufficiale directory.

    BC 7.0 came with a single official campaign, minor and alternative ones were removed.. that's why the different path to the rwm than usual..

    every time you start a new campaign and the file is absent, it is generated again.
    Ok, do I have to do something or I have to deleted the map.rwm in the folder officials directory that you mention?

  10. #10

    Default Re: Piter AI (new CAI)

    when you use the Piter CAI, after you unzipped and copy-pasted, you just need to delete the mentioned map.rwm in the path I specified... the other rwm you see are just irrelevant, the engine does not use them..


  11. #11
    Hennin's Avatar Libertus
    Join Date
    Jan 2014
    Location
    Spain
    Posts
    74

    Default Re: Piter AI (new CAI)

    Quote Originally Posted by rafmc1989 View Post
    when you use the Piter CAI, after you unzipped and copy-pasted, you just need to delete the mentioned map.rwm in the path I specified... the other rwm you see are just irrelevant, the engine does not use them..
    Ok, what I understood is that the file map.rwm that would be found in mods/BellumCrucis7/data/world/maps/campaign/custom/Ufficiale directory. Is the file that I have to deleted, and the game will be regenerate again, and the file map.rwm that would be found in mods/BellumCrucis7/data/world/maps/base directory, i don't have to deleted it and I don't have to do nothing in this folder, because the game don't use it.

    I will reinstall the game and do in order:

    1. Bellum crucis 7.0

    2. Bugfixer.

    3. Piter AI4.2

    4. Delete map.rwm in mods/BellumCrucis7/data/world/maps/campaign/custom/Ufficiale directory.

    5. Start game.

    Is that correct?.
    L
    When it is correct, can you change the informatio in post number 2.

    Thanks for your help.
    Last edited by Hennin; March 04, 2018 at 03:18 AM.

  12. #12

    Default Re: Piter AI (new CAI)

    ok, given I cannot see by myself (not modding BC atm), please re-install again...

    yes you delete the .rwm the first time before playing, in the path we mentioned, then it regenerates... While you play, do not delete it again, or your campaign won't load anymore..

    I'll be updating the post asap you I get your reply


  13. #13
    Hennin's Avatar Libertus
    Join Date
    Jan 2014
    Location
    Spain
    Posts
    74

    Default Re: Piter AI (new CAI)

    Quote Originally Posted by rafmc1989 View Post
    ok, given I cannot see by myself (not modding BC atm), please re-install again...

    yes you delete the .rwm the first time before playing, in the path we mentioned, then it regenerates... While you play, do not delete it again, or your campaign won't load anymore..

    I'll be updating the post asap you I get your reply

    ok, there are three map.rwm files in three diferent places in \mods\BellumCrucis7\data\world\maps directory,

    when I deleted the file map.rwm in \mods\BellumCrucis7\data\world\maps\campaign\custom\Ufficiale directory,in this directory the game regenerate the file again.


    And the other two files map.rwm, one in \mods\BellumCrucis7\data\world\maps\campaign\imperial_campaign directory,
    and the other one in \mods\BellumCrucis7\data\world\maps\base directory, I deleted this two files, but the game did not regenerate the two files again.




    I supose that the file map.rwm that has been deleted in \mods\BellumCrucis7\data\world\maps\campaign\custom\Ufficiale directory, after you install the Piter AI4.2 mod is the correct file, because that is the only place or directory that the game regenerate the file map again.


    緿o I have to reinstall the game?, because I deleted the other two files map.rwm mentioned above and the game don磘 regenerated this two files again.
    Last edited by Hennin; March 04, 2018 at 11:01 AM.

  14. #14

    Default Re: Piter AI (new CAI)

    ook good and clear explanation thanks! + rep!

    Yes, the one the game uses is the rwm included in Ufficiale directory (so when it regenerates you can start again to play)...

    For the other too, they were leftovers of previous versions of the mod... they should not cause any harm... but for all safety, I suggest you to reinstall again, and then when you have the Piter CAI, you just delete the .rwm of Ufficiale..

    Do not delete it again when you have started playing otherwise your current saved gameplay won't load anymore..


  15. #15
    Hennin's Avatar Libertus
    Join Date
    Jan 2014
    Location
    Spain
    Posts
    74

    Default Re: Piter AI (new CAI)

    Quote Originally Posted by rafmc1989 View Post
    ook good and clear explanation thanks! + rep!

    Yes, the one the game uses is the rwm included in Ufficiale directory (so when it regenerates you can start again to play)...

    For the other too, they were leftovers of previous versions of the mod... they should not cause any harm... but for all safety, I suggest you to reinstall again, and then when you have the Piter CAI, you just delete the .rwm of Ufficiale..

    Do not delete it again when you have started playing otherwise your current saved gameplay won't load anymore..

    Ok, thanks for your help, .

  16. #16

    Default Re: Piter AI (new CAI)

    sure, feel free to ask any question you may have


  17. #17
    Hennin's Avatar Libertus
    Join Date
    Jan 2014
    Location
    Spain
    Posts
    74

    Default Re: Piter AI (new CAI)

    Quote Originally Posted by rafmc1989 View Post
    sure, feel free to ask any question you may have
    Hello,

    I reinstalled the game again, and I did the same with the 3 map.rwm files in \mods\BellumCrucis7\data\world\maps directory folder, to make sure that it whas like I told you in the last post.

    I have to say, that it磗 like I said, the only map.rwm file, from the 3 diferent map.rwm files, that where regenerated again after deleting the 3 map.rwm files when I start a new campaign, is in \mods\BellumCrucis7\data\world\maps\campaign\custom\Ufficiale directory folder.

    But I noticed that when I deleted the map.rwm file in \mods\BellumCrucis7\data\world\maps\campaign\imperial_campaign directory folder, the game regenerate the map.rwm file in this folder again when I play a battle in 创Personalized battles创 (I don磘 know if it is the right word because my english is not perfect, and I have the game in italian/spanish and in Italian is 创Battaglia personalizzata创), I let you know, that this only will happen if I delete the map.rwm file and I play a battle in 创 Battaglia Personalizzata创in this case the game will regenerate the map.rwm file in this folder again, but I want to remember you. that this will NOT happen if I start a new campaign, because the game in this case will not regenerate the map.rwm file again in this folder.

    Of course I also must say, that if I don磘 do nothing, and I install the game and don磘 delete the map.rwm file in \mods\BellumCrucis7\data\world\maps\campaign\imperial_campaign directory folder the game doesn磘 do nothing in this folder.

    I don磘 know if it is relevant or not for the installation or if it is important to know.

    Do I have to take care about that?.


    If I don磘 have to take care about that, I will reinstall the game and I will follow your last instructions and I will only delete the map.rwm file in \mods\BellumCrucis7\data\world\maps\campaign\custom\Ufficiale directory folder, after installing the Piter AI4.2 mod like you said in post number 14.
    Last edited by Hennin; March 06, 2018 at 12:23 PM.

  18. #18

    Default Re: Piter AI (new CAI)

    yes, the one which counts, only and exclusively, is the one of "Ufficiale directory", after you have the Piter CAI and that one deleted, you'll be ok..

    of course you may also like to merge with the other unofficial submods present for BC at the moment..

    thanks a lot for being specific in your posts..


  19. #19

    Default Re: Piter AI (new CAI)

    this new AI can make the other factions recruit agents and fleets?

  20. #20
    Danya82's Avatar Tiro
    Join Date
    Oct 2010
    Location
    Saint-Petersburg, Russia
    Posts
    227

    Default Re: Piter AI (new CAI)

    Is this Piter CAI compatible with other mods too?

Page 1 of 2 12 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
  •