1. Firaxis celebrates the "Asian American and Pacific Islander Heritage Month", and offers a give-away of a Civ6 anthology copy (5 in total)! For all the details, please check the thread here. .
    Dismiss Notice

MNAI-U: unofficial build & bugfixes

Discussion in 'More Naval AI Modmod' started by lfgr, May 15, 2019.

  1. Deaf Metal

    Deaf Metal Chieftain

    Joined:
    Oct 5, 2015
    Messages:
    46
    Remnants of Patria apparently can be attempted to be placed on the same tile as an ancient tower during map generation, so there will be an ancient tower improvement with the event sign Remnants of Patria, but the tile yield will not be modified.
     
  2. Deaf Metal

    Deaf Metal Chieftain

    Joined:
    Oct 5, 2015
    Messages:
    46
    Is it intentional for there to be no Assassin unit model in the bottom left when one is selected?
     
  3. LightAcolyte

    LightAcolyte Chieftain

    Joined:
    Aug 4, 2013
    Messages:
    27
    In Multiplayer, the Kuriotates' choice when settling a city of "Settlement" or "City" does not appear. While this is fairly easy to rectify by having the escorting unit that should be with the Settler anyway casting "Promote Settlement," the problem is that since unit movement speeds aren't always a match you can lose some turns to do this of city growth.
     
    lfgr and Tielby like this.
  4. lfgr

    lfgr Emperor

    Joined:
    Feb 6, 2010
    Messages:
    1,025
    Fixed this for the next version, thank you.

    Which mapscript?
     
  5. lfgr

    lfgr Emperor

    Joined:
    Feb 6, 2010
    Messages:
    1,025
    I do see the model. Which civ were you playing?
     
  6. Deaf Metal

    Deaf Metal Chieftain

    Joined:
    Oct 5, 2015
    Messages:
    46
    Erebus

    Malakim
     
    lfgr likes this.
  7. lfgr

    lfgr Emperor

    Joined:
    Feb 6, 2010
    Messages:
    1,025
    Thanks, with Malakim I get the same problem. It must be the civ-specific model.
     
  8. Tielby

    Tielby Prince

    Joined:
    Sep 23, 2007
    Messages:
    383
    Location:
    The sacred and free citadel of mind
    Is there any reason Acheron doesn't fly ("Can move through impassible terrain")? It certainly does have wings. Drifa does fly.
     
    Last edited: Oct 12, 2021
  9. MagisterCultuum

    MagisterCultuum Great Sage

    Joined:
    Feb 14, 2007
    Messages:
    16,446
    Location:
    Kael's head
    I believe it is because Flying units do not get fortification bonuses that were deemed more useful for Acheron than flight considering he is supposed to stay put in his city.

    In my modmod I give a lot of unit a a Winged promotion that lets them toggle Flying off and on depending on whether you would rather have the defensive bonuses or the added movement point and ability to move through all terrains, but base FfH2 does not have that. .
     
    Tielby likes this.
  10. Deaf Metal

    Deaf Metal Chieftain

    Joined:
    Oct 5, 2015
    Messages:
    46
    Is it intentional that the Fall from Heaven II Scenarios WB Save unloads MNAI back to vanilla Ffh2?
     
  11. LightAcolyte

    LightAcolyte Chieftain

    Joined:
    Aug 4, 2013
    Messages:
    27
    If you use the scenarios linked by the Scenarios screen, the original ones do this automatically. If you use the scenarios to load them from inside the world editor from the More Naval AI Mod included scenarios, they play with the More Naval AI mod.

    In other news, when I have Advanced Tactics on, it seems the Great Generals cannot be attached to anyone because the spell for this is not present in this version of the mod. When I add the correct spell into the XML and python, the AI lacks any programming to use Great Generals, so they just sit in their cities. In MP, of course, this gives the human players a decided advantage...while the AI just gets sapped by increasing maintenance costs from accumulated Great Generals. Suggestions on whose version of the AI use of Great Generals I should use from another mod/modmod/version?
     
    Last edited: Oct 14, 2021
    Tielby likes this.
  12. lfgr

    lfgr Emperor

    Joined:
    Feb 6, 2010
    Messages:
    1,025
    It works for me (the spell part, didn't check the AI). Maybe you're confusing Great Generals and Great Commanders? The former are only present with Advanced Tactics on, I think, and work just like in vanilla BtS. The latter cannot lead units by themselves, but other units in the same stack can cast "Join Great Commander", which works about the same. Incidentally, Great Generals can also join Great Commanders, giving you a strength-1 unit; that ought to be fixed.
    And yes, it's stupid that there are two types of units for this. ExtraModMod merged the two, but I reverted that change for some reason I don't remember. It's possible that the AI can use Great Generals, but not Great Commanders.
     
  13. Deaf Metal

    Deaf Metal Chieftain

    Joined:
    Oct 5, 2015
    Messages:
    46
    The Hidden promotion seems to have no discernible effect. I had a game in which the Sidar AI cast their world spell and all that happened was their warriors gained the promotion but were still as visible as they were before. All I had were warriors, so there was nothing that would reveal them; and they retained the promotion for turns afterward so they hadn't lost it for being involved in combat nor could they have cast any spells. Unfortunately, I don't have the save.

    Edit: Their warriors were stacked in their city, is that the reason why?
     
    Last edited: Oct 15, 2021
  14. lfgr

    lfgr Emperor

    Joined:
    Feb 6, 2010
    Messages:
    1,025
    Correct. I'll make that clear in the pedia.
     
    jackal1234 likes this.
  15. jackal1234

    jackal1234 Warlord

    Joined:
    Jul 11, 2010
    Messages:
    102
    Location:
    127.0.0.0
    hey man any ETA on new v.. just wondering, might start a new one soon.. thanks!
     
  16. lfgr

    lfgr Emperor

    Joined:
    Feb 6, 2010
    Messages:
    1,025
    It will take a while. I just finished the last EMM version and barely started working on the next MNAI version.
     
    jackal1234 and Tielby like this.
  17. LightAcolyte

    LightAcolyte Chieftain

    Joined:
    Aug 4, 2013
    Messages:
    27
    So in MNAI-2.9 archive version copied and replacing all name-matching files in a copy of an unmodified Fall From Heaven 2 mod installation in Civ4 BTS v.3.19, there is no "Lead Troops as a Warlord" spell/special ability for any unit category or combat type, except on the Great General Unit itself. There is no entry in the Sevopedia for "Lead Troops as a Warlord." The AI is incorrectly programmed to use the spell "Lead Troops as a Warlord" on the unit combat types, which does not happen in standard Civ4 BTS so this behavior is not the same. Even if the unit combat types are removed so that any unit with access to the spell uses it: when there's more than one unit (as there almost always is for the AI in their cities where the Great Generals spawn after enough Great General "XP" is earned from combat with non-Barbarian units), the AI will cancel the spell/ability like with the last option in the menu to "Nevermind" resulting in the Great General never being attached to any units for some reason. In our MP games, the AI cities have at least one Great General unit in one or more cities usually just standing around taking up maintenance. Even if the spell is changed or added to be allowed for the unit combat types to cast themselves when a Great General is present and the spell added to the Sevopedia, the AI is not using it correctly in cities, but will attach a Great General in the field (except that the Great Generals never get out into the field to be attached in the first place).
     
    Last edited: Oct 20, 2021
  18. Deaf Metal

    Deaf Metal Chieftain

    Joined:
    Oct 5, 2015
    Messages:
    46
    The sidar have two warriors and a settler yet they don't move them for turns and don't found a city till around turn 12.
     

    Attached Files:

  19. Sezren

    Sezren Chieftain

    Joined:
    Jan 17, 2009
    Messages:
    76
    In the context of barbarian assaults on cities being blockable by a single weak unit in a chokepoint (etc, see spoiler further down for more context) I have looked at the cpp source. My impression is that this can be improved by adding the MOVE_THROUGH_ENEMY flag at the right place - see code:
    Code:
    void CvUnitAI::AI_barbAttackMove()
    {
    
    <snip>
    
       // don't wander aimlessly in Clan territory, please
       if (bFriendlyTerritory)
       {
           if (AI_goToTargetCity(0, 12))
           {
               return;
           }
           if (AI_retreatToCity())
           {
               return;
           }
       }
           
       // Aggressive movements (actively seek out distant cities)
       if (bAggressive)
       {
    
    <snip>
    
           if (AI_goToTargetCity(MOVE_THROUGH_ENEMY, 12))
           {
               return;
           }
       }
       // Semi-Aggressive Movements (attack cities if nearby)
       if (bSemiAggressive)
       {
    
    <snip>
    
           if (AI_goToTargetCity(0, 4))
           {
               return;
           }
       }
    
    <snip>
    
    }
    
    
    Optionally that flag could also be added to the "if (AI_goToTargetCity(0, 4))" line in the code but I am not sure if that is desirable or not - should "semi aggressive" (more cautious) barbarians ignore blockers or not?

    Note that this shouldnt affect AI players at all as this is a function for barbarians only. I have also looked somewhat at AI players: They already do have programming for such behavior in some situation/s. The code for them is more complex though and I didnt try to figure out the exact situations in which they may or may not also have that blocking problem.

    Spoiler :


     
  20. lfgr

    lfgr Emperor

    Joined:
    Feb 6, 2010
    Messages:
    1,025
    @Sezren: That looks promising. Did you test your changes already?

    @LightAcolyte: Apologies for the late reply. I now also checked the AI; it's definitely using "Lead by Warlord", although ineffeficiently, since it still assumes the standard BtS behaviour. For example, since you can't split a GG from a unit in BtS, it waits until wartime before leading units. I'll made a note to try to improve that in the future.

    I'll try to answer your individual points, but I feel we're talking past each other to some degree.

    Such a spell indeed does not exist, so you won't find it in the pedia or the XML (the ability comes from the <LeaderPromotion> tag in CIV4UnitInfos.xml instead). "Special abilities" in the pedia are just spells on the technical side.

    I don't understand what you mean, sorry. Which unit combat types are you talking about?

    Which spell are you talking about now? The "Join Commander" spell? How do you know that the AI is canceling the spell?

    As mentioned above, this is probably because the AI thinks it has to save its generals for later. I think if their in a war on the same continent, they should use the GG.

    Here I again don't know which spell you're talking about.
     

Share This Page