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

Bug Reports and Discussion

Discussion in 'More Naval AI Modmod' started by Tholal, Jan 3, 2013.

  1. Azhral

    Azhral Let's get Tactical!

    Joined:
    Jul 9, 2008
    Messages:
    622
    Location:
    Dunedin, New Zealand
    Yea I've also noticed units can release themselves from cages. Seems like the Held promo no longer prevents casting spells.

    And I've also seen the multiple Orthus's Axe bug, this time from the Illians. Pretty sure Acheron was present too, perhaps an issue with with Acherons Meteors now that he can cast, possibly due to the aforementioned change to the Held promo.
     
  2. jackal1234

    jackal1234 Chieftain

    Joined:
    Jul 11, 2010
    Messages:
    96
    Location:
    127.0.0.0
    small bug: I summoned Basium last night and decided to switch over to him. Winning a battle, I generated a Great General, but it went to my former civ, the ones who built the mercurian gate
     
  3. omegaflames

    omegaflames Warlord

    Joined:
    Sep 21, 2012
    Messages:
    134
    Welp saw the orthus axe bug again but svaltarfar aren't in the game and acheron isn't even remotely nearby (as in on the other side of the map on a different continent...with no orthus axes near him either). I'm gonna have to test this but I'm beginning to think that multiple axes are getting dropped when a unit dies that was using it or some such.
     
  4. MagisterCultuum

    MagisterCultuum Great Sage

    Joined:
    Feb 14, 2007
    Messages:
    16,104
    Location:
    Kael's head
    My hypothesis is that groups of AI units casting a take equipment (promotion) spell sometimes adds the promotion to all the units in the stack faster than the python code can run to remove it from all the units. I'm not sure how to test that though.
     
  5. Tholal

    Tholal Emperor

    Joined:
    May 19, 2009
    Messages:
    1,676
    It's been a while since I've even looked at the game, but I thought that spells already pulled XML info for the mouseovers? I'll have to take a look.


    I had previously fixed some issues around blockades but it sounds like the current troubles stem from HN units specifically. Issue has been logged.


    Interesting. I'll add this issue to the list.


    What do you mean by "Neutral"? HN units should have free reign in attacking anyone, but should not be capturing any cities or forts.



    I've seen the item duplication issue myself, but only after the fact. I have not yet been able to track down exactly when it occurs, but yes, I think it is related to a stack moving onto an item and may also be directly related to barbarians.

    That Cage spell is a constant problem. I will probably remove it from the Lair Exploration results.



    Another interesting find. Perhaps Great General generation is tied to the team? I'll add it to the bug list.
     
  6. MagisterCultuum

    MagisterCultuum Great Sage

    Joined:
    Feb 14, 2007
    Messages:
    16,104
    Location:
    Kael's head
    The spells show the XML help text and the python help text. My complaint is that this is often redundant and takes up too much space. I would rather the XML help text appear in the pedia and in the mouseovers of spells that do not have PyHelp Tags, but have the PyHelp tag override the XMl help txt_keys when they both exist. In cases where both are desired we could easily call the TXT_KEY through python,


    It does not happen often, but I have seen HN units able to capture cities and forts from other players without war.

    I believe this always happened when I restored the HN promotion after the revelation spell (or equivalent on move effect of the Mirror of Heaven) has removed it.

    I think it was usually with Shadows, which would normally be invisible and unable to capture things anyway.
    Why doesn't the Cage result just grant a promotion that makes spellcasting impossible? That seems like an easy solution.

    p.s. I just merged in Platyping's latest update of World Builder and am in the process of adding some FfH2/MNAI specific stuff. I assume you wouldn't be ready to release another update before I share it anyway, but if so Id like a little warning to get it to you first.
     
  7. MagisterCultuum

    MagisterCultuum Great Sage

    Joined:
    Feb 14, 2007
    Messages:
    16,104
    Location:
    Kael's head
    If you capture a piece of equipment while capturing a city but then choose to liberate that city to a form a puppet state, then that equipment unit is destroyed.


    I had assumed that the equipment was being captured by my new vassal due to me giving it the bAlwaysHostile tag in my modmod, but I removed the tag and found it still happening. I just tested and found it occurs in base MNAI too.
     
  8. Sezren

    Sezren Chieftain

    Joined:
    Jan 17, 2009
    Messages:
    46
    Stasis lets trade deals (like resource vs gold-per-turn) continue.
    The AI does not cancel disadvantageous deals which include gold-per-turn.

    Some thoughts about possible fixes:
    If all trade deals were canceled it would be impossible to make new deals with a gold-per-turn component as no one has any income. If the AI cancels all disadvantageous gold deals and is then still willing to make new ones it could possibly be abused by the player - at least if playing the Illians. So I think the safest solutions would be either an automatic cancel of all deals which include gold or simply disabling the gold-per-turn part during Stasis. Logically/thematically if all trade is frozen then gold-per-turn trades should also be frozen - so I think this would be the best fix.

    Another (this time minor) issue with Stasis: Under Stasis plundering by pirates still works. Logically this does not make sense as all trade is frozen so it should not be possible to plunder any of it?
     
  9. Tholal

    Tholal Emperor

    Joined:
    May 19, 2009
    Messages:
    1,676
    After some review, I have decided that I will not work on fixing any issues related to the <bAlwaysHostile> tag. As far as I can tell, this tag was never fully implemented and may not have been intended for use in the regular game (some tags were added to Civ4 for use in specific scenarios).

    From an AI standpoint, they have to react to <bAlwaysHostile> units as potential enemies, which is the same way they react to Hidden Nationality units. The only difference is that Aways Hostile units will have their nationality revealed to the players.

    So, since there are so many bugs and AI issues with the <bAlwaysHostile> tag and Hidden Nationality achieves the same purpose (and has already been more fully integrated into the game), I will not spend my limited development time fixing anything related to the <bAlwaysHostile> tag. I would recommend that any mod-nodders avoid using it as a basic unit tag.
     
  10. MagisterCultuum

    MagisterCultuum Great Sage

    Joined:
    Feb 14, 2007
    Messages:
    16,104
    Location:
    Kael's head
    In my current game (with my modmod), I have again come across the issue of an HN unit being able to capture rival cities while not at war.


    I'm playing as Varn Gossam of the Malakim, but going contrary to the lore I adopted The Council of Esus state religion and trained the hero Gibbon Goetia.

    I was at war with Flauros of the Calabim, but made peace and then found Gibbon Goetia could keep capturing cities anyway.

    The Mirror of Heaven is near my capital, and I think Gibbon has lost his HN promotion at least once to the Revelation effect triggered upon a unit moving onto that tile.

    Since in my modmod Gibbon is not an archmage hero but an assassin with the Mimic and Shapeshifting ability, the issue could be related to it gained promotions that way or converting back and forth between unit types.


    I have a saved game from which I can consistently reproduce this behavior, but it is with a version of my modmod which I have not yet released (since I was planning on merging in your latest MNAI update first) and would not be compatible with the version you could download online.


    Edit: I just tested by adding a bunch of HN Nightwatches in worldbuilder, and found that they too could capture cities without war after killing all of the units (including workers and ships) found on the tile.

    Edit2: I just tested the issue in my copy of MNAI, and found that a Hidden Nationality Nightwatch can always capture an empty rival city even without war. None of the other factors I thought might be relevant actually seem to be.

    Edit3: I just confirmed that this bug is still present in Version 2.63
     
  11. Sezren

    Sezren Chieftain

    Joined:
    Jan 17, 2009
    Messages:
    46
    1) Truffles event can happen on/for peaks - at least on erebus.py map

    2) I had one case of "waiting for other civilizations" hangup during AI autoplay at ~turn 450 on epic on a huge map with many civs. I had modded the game somewhat but I do not believe this to be the cause. Strangely CPU use was very low (~25% of one core) so the cause was not getting stuck in an endless calculation. Furthermore it was possible to interact with the GUI - click dead civilization dialog and scroll the map - usually this is not possible during AI autoplay. I did not see any assert - python (have enabled) or otherwise.

    3) There appears to be strange code (probably bug) in the code for starting the Infernals:
    "if pPlot.isAdjacentOwned():" inside some loop is probably meant to be "if pCityPlot.isAdjacentOwned():"

    4) The algorithm for reqRiverOfBlood() which determines if the AI should cast it or not does not work properly on Deity with 2 settlers. Only if Calabim loose one of them or fail to build with the second one (both can happen but usually it does not) will they cast it early when it probably is most powerful. Optimally they should also wait a bit longer and be somewhat unpredictable about casting it.

    BTW: Is there any point reporting bugs still? The bug database linked in the first post is very long already and contains many very old bugs.
     
  12. Flugan

    Flugan Chieftain

    Joined:
    Nov 8, 2015
    Messages:
    7
    New to the forums, but a long time player. Thank you very much for all your work on FFH2 and MNAI. Loads of fun.

    Forgive me if this has been covered but I can't get the 'Barbarian World" option to work correctly. It works the first time I start a game after installing the mod, but for no games after that. I tried reinstalling everything and the same thing happens. It works the first time but, never again. Can I fix this?

    Also sometimes blockades get stuck in place, but I can solve that issue in worldbuilder if need be.

    Again, thanks so much for these awesome mods.
     
  13. Sezren

    Sezren Chieftain

    Joined:
    Jan 17, 2009
    Messages:
    46
    How? People around here used to say stuck naval blockades cant even be fixed via worldbuilder. It would be cool to have a non-worldbuilder solution though if the problem still exists.
     
  14. Sezren

    Sezren Chieftain

    Joined:
    Jan 17, 2009
    Messages:
    46
    Edit: Better look at the posts further down. They contain better information.

    There is definitely something wrong with blockades.
    I somehow managed to get a bugged situation with "trade blocked by enemy ship Teams: Infernal" Was testing with Ljosalfar. That was after killing a barbarian trireme (no other enemy ships around) which was blocking/staying on the only water tile adjacent to the town.
    The relevant/interesting part here: The Infernal had just been created. I explored this again a bit and it appears to be reproducible to some degree at least. It appears to behave in some kind of XOR manner when lifting the blockade with the new team starting out with an OFF. Do not know if a similar problem would exist if newly gaining trade access to an existing civilization.
     
  15. Sezren

    Sezren Chieftain

    Joined:
    Jan 17, 2009
    Messages:
    46
    Looked at the .cpp code. Not sure if I have the newest version of the sources. But:
    The combination of the following sources appears to be bugged - testing verifies that.

    void CvUnit::changeHiddenNationality(int iNewValue)
    {
    if (iNewValue != 0)
    {
    if (m_iHiddenNationality + iNewValue == 0)
    {
    updatePlunder(-1, false);
    setBlockading(false);
    m_iHiddenNationality += iNewValue;
    if (getGroup()->getNumUnits() > 1)
    {
    joinGroup(NULL, true);
    }
    updatePlunder(1, false);
    }
    else
    {
    m_iHiddenNationality += iNewValue;
    }
    }
    }

    [From: void CvPlot::changeBlockadedCount(TeamTypes eTeam, int iChange)]
    // Hack so that never get negative blockade counts as a result of fixing issue causing
    // rare permanent blockades.
    if( getBlockadedCount(eTeam) < 0 )
    {
    m_aiBlockadedCount[eTeam] = 0;
    }

    1. Privateer declares nationality
    2. The line "updatePlunder(-1, false);" has no effect due to the hack.
    3. The line "updatePlunder(1, false);" will then set trade blockade with hostile teams (Barbarian in my case).

    This does not explain the Hyborem/Infernal bug described above. Although it may also be related to the hack.
     
  16. Flugan

    Flugan Chieftain

    Joined:
    Nov 8, 2015
    Messages:
    7
    I just meant I could load an autosave and delete the offending unit if it proved to be a problem.
     
  17. Sezren

    Sezren Chieftain

    Joined:
    Jan 17, 2009
    Messages:
    46
    Regarding the bug with Hyborem naval blockade. It has nothing to do with killing the unit. The behaviour is quite simple: When Hyborem appears and a barbarian ship is doing a blockade then a Hyborem-blockade will be permanently added to the blockaded tiles. Obviously it has to do with Hyborem having the barbarian trait.
    During normal gameplay this is usually not visible (unless playing Infernal I guess) but with Ctrl-Z (cheat mode required) the information is shown on the tiles.

    Edit: I do not know if other players being added (revolution, puppet state, whatever) can also cause this. I also do not know if it only happens with barbarian trait or if there are other cases (like using war state of parent civ?). Or when a player gets killed and a new player takes that spot: Are blockades updated correctly then?


    Regarding: " It was possible to use the "blocked" water tiles though. So I do not know if this is the main problem."

    I was (probably) wrong - simply did not understand the blockade mechanics - meaning blockades being team specific on a per-tile base. It is (probably) not possible to work the permanently blocked tiles.



    Ok.
     
  18. Sezren

    Sezren Chieftain

    Joined:
    Jan 17, 2009
    Messages:
    46
    Do you remember if the problem is only caused by Privateers/Pirates or also by ships without HN? Or can other ships also have HN?
     
  19. Flugan

    Flugan Chieftain

    Joined:
    Nov 8, 2015
    Messages:
    7
    I don't remember exactly. The last time I noticed it was a barbarian spawn, I'm guessing from a shipwreck that a computer player explored. It was the Jolly Roger, but I wasn't laughing. It set up a blockade and then left, but the blockade was still there. I tracked it down and killed it to no avail.

    Really, I'm more concerned that I can;t use the barbarian world game option. Any thoughts in that regard?
     
  20. Sezren

    Sezren Chieftain

    Joined:
    Jan 17, 2009
    Messages:
    46
    Ok.

    Not one of the developers so I can only tell you how I would try to workaround that - may not be possible with a Steam version though:
    a) re/install
    b) Make a copy of the .ini file. It sometimes gets killed (or corrupted? dont remember) by the game.
    c) copy the civ4 directory; it may be sufficient to copy one of the sub dirs
    d) before playing the game (after the first play) delete civ4 directory and replace with a copy of the copy from c)
    That way you only have to do 1x step d) per game. Dont know if that will fix it though - it could be the .ini file (you can copy it then instead) or some windows registry settings (worst variant).
     

Share This Page