1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

MNAI-U: unofficial build & bugfixes

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

  1. Sezren

    Sezren Chieftain

    Joined:
    Jan 17, 2009
    Messages:
    74
    Not sure why you are quoting me. I just gave my opinion based on post by lfgr. (Before reading that I didnt even know there was bugginess associated with it.)

    Cant the 'bad' manas be traded away? (I am asking as I dont know if the AI values (>=0) them nor do I know if that gets rid of the penalty.)

    Isnt there some connection between AC and alignment? Like event choice availability? Also the pro-AC religion is evil. My complaint here is the lack of consistency - on the one hand there is the connection between AC and alignment. But on the other hand there is no particular benefit/penalty for (generic) evil/good - if anything good has the advantage due to hell terrain limitation. Gameplay and fluff are somewhat at odds.
     
  2. Devils_Advocate

    Devils_Advocate Chieftain

    Joined:
    Nov 8, 2015
    Messages:
    51
    You can tranfer the diplomatic penalties from Death and/or Entropy mana to another civilization by trading it, and even leaders who take issue with the use of those resources by others will be happy to receive them. ("To prevent their misuse", presumably.) Those leaders will also continue to dislike users of Death and Entropy mana even if they've converted to Ashen Veil.

    A lot of absurdities would go away if the effects of alignment were appropriately tied to religion directly. As it is, it's quite odd how alignment is only changed by and yet distinct from religion. But that's very probably beyond the scope of this mod.
     
    Tielby likes this.
  3. MagisterCultuum

    MagisterCultuum Great Sage

    Joined:
    Feb 14, 2007
    Messages:
    16,330
    Location:
    Kael's head
    Is there any ETA on the next release? I'd like to be able to incorporate any improvement to my next MagisterModmod update, which I'm aiming to have out no later than my birthday (February 1st, 2021)
     
  4. lfgr

    lfgr King

    Joined:
    Feb 6, 2010
    Messages:
    883
    I'd guess I'll have the next release ready before that, but I can't say for certain, unfortunately.
     
  5. MagisterCultuum

    MagisterCultuum Great Sage

    Joined:
    Feb 14, 2007
    Messages:
    16,330
    Location:
    Kael's head
    Could you add a new tag that controls whether an improvement is destroyed when a unit enters it, and stop automatically removing all improvements that use the SpawnUnitType tag and don't have bPermenent?

    I'd really like to try having Pirates Coves/Harbors/Ports generate pirate ships, but don't want them to be destroyed so easily and am unsure about making them permanent.


    Could you also make it so that permanent summons and do not all start immobile? You could add a new tag for immobilizing the summon if you want to keep the same functionality for the basic spells.

    Better yet, could you allow spells to specify the duration for the units they summon, rather than having them all be 1 (+1 for the Summoner trait) or permanent? You could just use -1 for permanent and have 1 be the default, but also allow certain summons to last longer by defaut.


    Could you make it so that captured units retain not just their names but also their promotions and religions? In my modmod I give a lot of great persons lore appropriate religions or promotions based on their name in onUnitCreated, but it is really weird how capturing a great person results in one with the same name but everything else about it matching a different great person.

    Would it be possible to let the <Button> tag in CIV4SpellInfos.xml accept a python function which could return different paths for the button part based on factors like the unit's race, the civilization type, religion type, etc? I'd love to combine several of my spells/abilities (including every religion's separate versions of Evangelize City or Evangelize Units and the Ordain spells that turn Prophets into High Priests, or hiring mercenaries where the unit hired could be a unique unit instead of the default version) into one spell but still be able to use different icons.


    If you don't manage to get it working so that I can add an arbitrary number of game options in XML, could you just insert a bunch of extra game options? I now have 24 religions in my modmod I'd like an option to disable each of them.


    If would be nice to have these for my next release, but if it would push your release past the end of the month I can certainly wait for the next update.
     
  6. lfgr

    lfgr King

    Joined:
    Feb 6, 2010
    Messages:
    883
    I'm a bit skeptical about the <Button> thing. I'm not sure if it is a good idea to run python whenever getButton() is called. It would be a separate tag in any case.

    I will do that for the next release.

    I'll put the rest on the TODO list, but for later. I'm already playtesting the upcoming release.

    An unrelated thing: I realized that in MNAI it is not possible to build a lumbermill on an ancient forest. It is kept when a normal forest with a lumbermill becomes an ancient forest. This seems like incentivizing somewhat degenerate gameplay.
    For now, I'm making it possible to build lumbermills on ancient forests. I don't expect this to have any real effect on balance, as it only affects non-elves FoL, which isn't viable for higher-level play anyway AFAIK. If somebody thinks otherwise, please let me know.
     
    jackal1234 likes this.
  7. MagisterCultuum

    MagisterCultuum Great Sage

    Joined:
    Feb 14, 2007
    Messages:
    16,330
    Location:
    Kael's head
    Thanks.

    I'm now leaning more towards just using bPermanent for Pirate Coves/Harbors/Ports and changing onMovePirateCove so that when a non-Lanun non-barbarian unit enters a hostile player's Pirate Coves/Harbors/Port it automatically pillages it (reducing Ports to Harbors, Harbors to Coves, and Coves to nothing), so that change doesn't matter too much.



    I personally think that it makes the most sense to allow the construction of Lumbermills on Ancient Forests, but to forbid players with Fellowship of the Leaves as their state religion from building them. That is how it works in my modmod.

    I also have a random event that may trigger on any plots with both Ancient Forests and Lumbermills, destroying the lumbermills and generating a few hostile Treants. I think I may add a random chance it it generating a hostile treant when a lumbermill is first built too. It might also make sense for a lumbermill to eventually run out of the oldest trees and cause the feature to revert to a regular forest. I may also play around with using
    pPlot.setRealFeatureType(gc.getInfoTypeForString('FEATURE_FOREST')), pPlot.setRealFeatureVariety(iVariety), and pPlot.changeTempFeatureTimer(iRnd) upon the completion of a Lumbermill on Ancient Forest.
     
  8. Sezren

    Sezren Chieftain

    Joined:
    Jan 17, 2009
    Messages:
    74
    One problem (not specifically about this modmod I think but I have seen it here) I have come across is that somehow barb pathings can be blocked by own units in such a manner that it doesnt really make sense. I think even worker/settler units cause this.

    Example: I build a new city. 7 tiles further there is a big stack of doom with 20 barbarian units. They are out for blood(*) and beeline towards the newly built city. But that "beeline" algorithm considers my units (their strength doesnt seem to matter) as hard obstacles. So if there is an Erebus-typical bottleneck in between that stack of doom and my newly undefended city and I place one wimpy unit there that stack of doom will then lose all interest in the new city. I think this is pretty lame. And it works in general too - I can make a line of units blocking passage and the city will no longer be a valid target.

    Also: Even if not trying to "abuse" this its often not really possible on Erebus type maps due to those bottlenecks.


    (*) Mine or rather my citizens/units, or often their own if they suicide against a well defended city.


    Edit: Just realized it may be explainable with fluff: Barbarians secretly use rats for scouting similar to hawks. Except that the rats can only spot one tile and instead of (instant) flying they need to (instant) walk. But they cant walk over units (not even workers) so this all makes some sense.

    Edit 2: Workers are indeed sufficient for blocking.
     
    Last edited: Jan 13, 2021
  9. lfgr

    lfgr King

    Joined:
    Feb 6, 2010
    Messages:
    883
    I've noticed something similar before. Do you also experience this with AI civs, or only with barbs?
     
  10. Sezren

    Sezren Chieftain

    Joined:
    Jan 17, 2009
    Messages:
    74
    I dont remember noticing it with AI civs. I do remember AIs attacking blocked bottlenecks but I dont remember the details so I cant say if this is proper evidence to the contrary. (Barbs will often also attack bottleneck defenders - just like any other units I think - if they can reach them in one turn.)
     
    lfgr likes this.
  11. Sezren

    Sezren Chieftain

    Joined:
    Jan 17, 2009
    Messages:
    74
    This seems to be a general issue. Found a thread with several posts describing it. It mentions some "AI scripting" as the source of the behavior.

    Links:
    with image: https://forums.civfanatics.com/thre...rians-on-marathon-speed.565836/#post-14239739
    https://forums.civfanatics.com/thre...rians-on-marathon-speed.565836/#post-14233106
    some more information: https://forums.civfanatics.com/thre...rians-on-marathon-speed.565836/#post-14241243
     
  12. lfgr

    lfgr King

    Joined:
    Feb 6, 2010
    Messages:
    883
    Thanks for doing the research. Then this will be hard to fix. I will take a look at the barb AI code at some point, though. Maybe I could get them to target nearby units if they can't path to a nearby city. For AI players I'm a bit afraid to touch the code and potentially mess up their behavior in normal situations.
     
  13. Sezren

    Sezren Chieftain

    Joined:
    Jan 17, 2009
    Messages:
    74
    Can you explain that - like pointing to the .cpp code where this is done? Especially the implication that AI players are also affected - I didnt see that in the linked posts. (With 'general' I meant 'not only this mod'.)
    I dont think this would be a good idea... It would be too easy to lead them where I want to have them if I have superior mobility (hills move or forest move or 2+-move).
    Without properly knowing the code I would have thought it would be possible to change the 'canRoute' or such function to ignore blockers further away. Non-adjacent blockers in reach of 1-turn may be an issue though - depends how the code is used I guess.
    AI civs arent prone to suicid against adjacent enemies if they dont have a better 1-turn target. So it doesnt make sense for them to ignore strong blockers for pathing. Which (if they are affected also as you seem to be implying) may make this much harder to fix I think.
     
  14. lfgr

    lfgr King

    Joined:
    Feb 6, 2010
    Messages:
    883
    No, that's part of the problem. I don't know where the relevant code is and how it is structured (yet).

    Doesn't your link post with the image talk about an AI player, Mehmet?

    Fixing pathing to ignore enemy units (in certain circumstances) might already be hard. And even if I can change the pathing to ignore units, it might still mess up other parts of the AI, since the units will encounter unexpected units in their way.

    Anyway, I will report back here if I figure out how this works and what can be done. Will not happen before next release, though.
     
  15. Sezren

    Sezren Chieftain

    Joined:
    Jan 17, 2009
    Messages:
    74
    You are right. But I am not sure this means AI civs are affected too. From my POV its still possible that AI civs cant be blocked by a weak unit/stack. Depends how to interpret that post - did the poster try to leave only a weak unit in or not?
    The other two linked posts imply that a single warrior is enough to block barbs though. Unfortunately without mentioning whether this applies to AI civs too.
     
  16. David12596

    David12596 Warlord

    Joined:
    Jul 15, 2014
    Messages:
    156
    So i'm noticing something very strange. Keep in mind I played MNAI a lot in the older version of ExtraModMod and Magister Modmod. I remember back in the day that even on prince the AI was doing really well in keeping up with me and my group and sometimes we even lost. Now it seem like the AI with this version of the mod has a lot of warriors and are not nearly aggressive as they use to be. Am I the only one seeing this? Am I crazy? lol
     
  17. Sezren

    Sezren Chieftain

    Joined:
    Jan 17, 2009
    Messages:
    74
    Dont really have a comparison with older versions. But the (not properly serious, quite a few of them, all on 'Immortal') games I have played with these beta versions didnt show AI being insufficiently aggressive. If anything there were a few cases where AI was too aggressive (no real odds to get a positive net out of a war).
    If you dont know though: AI aggression depends extremely on the leader. I think you need to give more/better information if you think there is a problem. AI also often doesnt want more than one war at once. AI also mostly seems to only make war if it thinks it looks good. So if you also have "a lot of warriors" they are unlikely to attack.
     
  18. David12596

    David12596 Warlord

    Joined:
    Jul 15, 2014
    Messages:
    156
    yeah but when I have champions, assassins, mages, etc running around they should not have 10-20 warriors. Like I don't remember seeing that at that stage of the game in older builds.
     
    Last edited: Jan 24, 2021
  19. Sezren

    Sezren Chieftain

    Joined:
    Jan 17, 2009
    Messages:
    74
    One issue with the AI declaring nationality on captured animals is that it declares one turn after the capture instead of on the turn of capture. This gives a human player (or another AI one - they like to stack-follow each other) a window of opportunity to either kill or capture the still-HN animal. Especially early in the game in higher difficulties when AI sometimes gets super-bear-capturing-scouts (AI also gets a bonus vs barbs I think so it has an easier time to win) this can be used to sniper the catches of the AI.

    Players can use 'Create Den'? How?

    I think if you want to be helpful here you need to better express "the problem" - at least I dont understand how exactly the AI got worse - if that is what you are saying.
     
    lfgr likes this.
  20. omegaflames

    omegaflames Warlord

    Joined:
    Sep 21, 2012
    Messages:
    163
    The ability does not show up until you meet the requirements. IIRC it's fully healed and on an unowned tundra/snow tile for bears. I want to say there is a lion den as well but I don't remember it's requirements. That is something I changed in my personal mod of MNAI. I changed almost all spell/abilities that don't show until you can use them to now show at all times so you at least know it exists. It never makes sense to me to hide such things from the player to begin with.
     

Share This Page