Results 1 to 15 of 15

Thread: AI Naval invasion help?

  1. #1
    Adonnus's Avatar Civis
    Join Date
    Jan 2012
    Location
    Turkmenistan
    Posts
    108

    Default AI Naval invasion help?

    I am trying to get several factions to land from their home territories to a bigger island over a sea. So far, none of them have even put any troops on the ships let alone crossed that sea and landed those armies.

    Things I have tried so far:

    -Prefers naval invasions is enabled
    -Sailor construction personality
    -Larger kings purse for the AI
    -Gave them a starting fleet of 6 cogs with 2xp, more than enough to beat pirates.

    What's currently happening is the AI is just going back and forth along their coastlines with their fleets.

    Anyone who knows something about AI and how to get them to land would be greatly appreciated. I am using my own generated map by the way (there are no impediments to me, as a player, from crossing the sea.)

  2. #2
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,125
    Blog Entries
    35

    Default Re: AI Naval invasion help?

    Ahh, but you have missed the magic bullet. Or more accurately: the magic pixel.

    Simply use a pixel from a mainland region and place it at the coast of the island, hiding the pixel under thick forest is my preferred method. Use several regions to 'link' in that way to increase the chance of the AI calculation to favor an invasion of the island. Just don't place those coastal pixels next to each other on the island, leave one pixel gap. Having the coastal region pixels right at the coast line of the island helps as well.

    Then set the owner of the island at war with the owners of the coastal regions and see what happens. You may not see a stream of convoys heading over there, but if there are no other (easier) targets then an invasion should take place. Possibly both ways.
    Last edited by Gigantus; December 14, 2019 at 12:11 AM.










  3. #3
    Adonnus's Avatar Civis
    Join Date
    Jan 2012
    Location
    Turkmenistan
    Posts
    108

    Default Re: AI Naval invasion help?

    Well, I ran 2 tests then of 20 turns each, unfortuntely it didn't seem to work fully, although one change was the AI was now putting some of its units on to the ships, however they did not veer from the coastline. The faction owner (England) is at war with rebels, who own the settlement I am trying to get them to land at. There is one region pixel touching that rebel region, on the coast.

    Not sure if it has any impact but England has no starting army, though the rebels don't have a garrison in that settlement either. England builds up a big army pretty quickly though they only ever build 1 cog throughout the whole test.

  4. #4
    Adonnus's Avatar Civis
    Join Date
    Jan 2012
    Location
    Turkmenistan
    Posts
    108

    Default Re: AI Naval invasion help?

    Is there something perhaps in descr_campaign_ai_db that I can edit which will make naval invasions more likely?

    On another note; I ran some more tests. I gave England a bigger starting army and a much bigger king's purse. They moved their navy up into the open ocean with an army on board, so I had hope for a minute, but then it came back down again. Looks like they were just sightseeing for mermaids.
    Last edited by Adonnus; December 16, 2019 at 05:28 AM.

  5. #5
    Adonnus's Avatar Civis
    Join Date
    Jan 2012
    Location
    Turkmenistan
    Posts
    108

    Default Re: AI Naval invasion help?

    I ran some new tests with some very weird and revealing results. When I put an army on the island, the English navy actually moves to the island and takes that army back home. I gave the rebel settlement nearby as a victory point to England, still they just ignored it and went back home. I then made sure that England's home provinces had enough public order, still, they just went back home. Very weird result where the AI doesn't seem to want to leave its 3 home provinces.

  6. #6
    z3n's Avatar State of Mind
    took an arrow to the knee

    Join Date
    Aug 2011
    Posts
    4,640

    Default Re: AI Naval invasion help?

    You can't control what the AI decides really. It's a LTGD (Long Term Goal Director), not a Short Term one.


    What may help is trying the attached file, unzip it and then replace your own. After that, edit the descr_strat for the faction where it says ai_label and then adjust that to say "default".

    Something like this

    Code:
    faction    ireland, fortified caesar
    ai_label default
    Delete your map.rwm file as well.



    However, if you insist on having them attack that specific settlement and want it to be taken; scripting is your better option.
    Attached Files Attached Files
    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)

  7. #7
    Adonnus's Avatar Civis
    Join Date
    Jan 2012
    Location
    Turkmenistan
    Posts
    108

    Default Re: AI Naval invasion help?

    There is no change from before. I could try scripting but I'm worried even if I can get an army to that settlement with scripts, the AI will just move it back to the mainland with its fleet.

  8. #8
    z3n's Avatar State of Mind
    took an arrow to the knee

    Join Date
    Aug 2011
    Posts
    4,640

    Default Re: AI Naval invasion help?

    There are many different scripting options that have addressed the siege and taking of a city. Sadly I'm on mobile right now or I would look for one.


    If you can't find them look in the major mods, DaC and EBII for example has one.
    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)

  9. #9
    Adonnus's Avatar Civis
    Join Date
    Jan 2012
    Location
    Turkmenistan
    Posts
    108

    Default Re: AI Naval invasion help?

    Update: I made a new island province nearby, confirming my theory that it seems to be a range issue and the part I want them to attack is too far away for them to consider.

    https://steamuserimages-a.akamaihd.n...A39C09ECC09FE/

    https://steamuserimages-a.akamaihd.n...3E802644E5340/

  10. #10
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,125
    Blog Entries
    35

    Default Re: AI Naval invasion help?

    Good find, will keep that in mind next time.










  11. #11
    z3n's Avatar State of Mind
    took an arrow to the knee

    Join Date
    Aug 2011
    Posts
    4,640

    Default Re: AI Naval invasion help?

    The distance part is controlled to an extent by the descr_character default movement points which contributes to the distance the AI calculates attacks from a character.

    If you modify those, you need to delete your map.rwm. However, I must warn you again that scripting is your better option for the most part, as the distance calculations being adjusted in that way are not super reliable. It will also increase the map generation time upon first load of a campaign the higher the number is.
    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)

  12. #12
    Adonnus's Avatar Civis
    Join Date
    Jan 2012
    Location
    Turkmenistan
    Posts
    108

    Default Re: AI Naval invasion help?

    Update 2: I added 2 more islands to see how far the AI would go. I also tripled the admiral movement points (and that part did work). It seems the AI has some kind of limit to how far it wants to send naval invasions, as you can see.

    https://steamuserimages-a.akamaihd.n...7F1A818198C96/

    https://steamuserimages-a.akamaihd.n...E92C6CA748119/


    Thanks z3n for your scripting suggestions. I'll look into them.

  13. #13
    z3n's Avatar State of Mind
    took an arrow to the knee

    Join Date
    Aug 2011
    Posts
    4,640

    Default Re: AI Naval invasion help?

    Did you update the very first entry, rather than just the admiral movement points? It is before named character movement points and everything else.

    The very first entry is what controls the path finding calculations. If you put it to a very high number the map generation time will increase quite a lot.

    There probably is a distance limit from the capital that is coded in as well, but I don't think that's in the descr_campaign-ai-db.
    Last edited by z3n; December 27, 2019 at 12:00 PM.
    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)

  14. #14
    Adonnus's Avatar Civis
    Join Date
    Jan 2012
    Location
    Turkmenistan
    Posts
    108

    Default Re: AI Naval invasion help?

    Quote Originally Posted by z3n View Post
    Did you update the very first entry, rather than just the admiral movement points? It is before named character movement points and everything else.

    The very first entry is what controls the path finding calculations. If you put it to a very high number the map generation time will increase quite a lot.

    There probably is a distance limit from the capital that is coded in as well, but I don't think that's in the descr_campaign-ai-db.
    Ok, I edited the first value from 200 to 1000, same result sadly. The capital distance limit might be the issue. If someone knows where that is if you know someone who might know I think that could be the answer.

  15. #15
    z3n's Avatar State of Mind
    took an arrow to the knee

    Join Date
    Aug 2011
    Posts
    4,640

    Default Re: AI Naval invasion help?

    Assuming you remembered to delete the map.rwm, then it looks like you're back to the original solution scripting.

    Someone mentioned that the AI must be able to attack a town within a single turn for it to be interested in invading. It normally takes the AI two turns (one to get into a boat, and one to sail toward the island to attack). So naval invasions are at a disadvantage right from the start it seems.
    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)

Posting Permissions

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