[MOD] More Naval AI

Discussion in 'More Naval AI Modmod' started by Tholal, Mar 18, 2010.

  1. scutarii

    scutarii King

    Joined:
    Jun 10, 2008
    Messages:
    747
    Thanx Tholal, we appreciate it, you're very busy anyway.
     
  2. MagisterCultuum

    MagisterCultuum Great Sage

    Joined:
    Feb 14, 2007
    Messages:
    16,395
    Location:
    Kael's head
    Thanks a lot for the update Tholal! This is a major improvement, and has allowed me to release a much improved version of my modmod as well.


    I was a bit disappointed to find that when a unit is upgraded the old unit still passes through onUnitLost function though. In my modmod this causes them to generate Sluagh units without actually dieing, allowing units to be duplicated by the Resurrection spell. It is not really a big deal as I found a workaround to prevent that, but the workaround also prevents me from taking advantage of your fix for upgrading avatars of leaders.
     
  3. Chean

    Chean Chieftain

    Joined:
    May 19, 2012
    Messages:
    24
    Thank you very much for all your work refining FFH, Tholal!
     
  4. Tholal

    Tholal Emperor

    Joined:
    May 19, 2009
    Messages:
    1,676
    I should be able to fix this.

    Hmmm... it shouldn't. I built in a workaround just for you. I'll have to look at it.
     
  5. thadian

    thadian Kami of Awakened Dreamers

    Joined:
    Sep 27, 2006
    Messages:
    2,288
    Location:
    Indiana, USA
    so convenient and handy, especially revolutions... i would play but im kinda past vanilla FFH - i would prefer it for the mod-mod's but thats just me XD
     
  6. doktarr

    doktarr Warlord

    Joined:
    Jan 31, 2005
    Messages:
    213
    No worries; I had the same problem not too long ago.

    Thanks for the update, Tholal. I'm really excited to try some of these changes out.

    Has anyone else noticed issues with civs refusing to capitulate when the "require complete kills" option is enabled? I recently (playing as Illians) had the Khazad down to their last city, with nothing but a heavily wounded Axeman in defense, and Wilboman and the High Priests of Winter staring him down. He still refused to capitulate. I captured the city, but the Khazad weren't eliminated until a few turns later - I presume that they had some orphaned figure far away that got killed at that point.

    I think the problem here was that the Khazad somehow thought they were in a stronger position, since the other unit wasn't near me. I guess my "fix" will be to turn complete kills off in subsequent games, but I like the idea of requiring complete kills, so I would like a better fix.

    EDIT: I went back to a savegame just before I had eliminated the last Khazad city, entered worldbuilder, tracked down the wandering unit (turned out to be a Trireme), and erased it. They still wouldn't accept capitulation. Has anyone else seen this sort of behavior? Now I'm questioning my assumption that "require complete kills" was the problem, although it's still possible. This was in 2.2 FWIW.
     
  7. timfi

    timfi Chieftain

    Joined:
    Aug 29, 2009
    Messages:
    15
    Another thing: jungles are converted to forests if the tile is under the influence of a temple of Hand. However, if the tile is turned to snow by any other means, you'll get the weird snowy jungle. Perhaps, turning a tile into snow or desert should eliminate anything but roads and forests in the first case?
     
  8. MagisterCultuum

    MagisterCultuum Great Sage

    Joined:
    Feb 14, 2007
    Messages:
    16,395
    Location:
    Kael's head
    In the last release of my modmod I included updated versions of the scenarios. I didn't actually change much yet, just what I thought was necessary to prevent incompatibilities with my modmod. Since scenarios are not a huge priority with me, I did not actually get around to testing them until after the release. As of now I have only played a few of them all the way through, but I have at least tried to start all of them once. So far I have only gotten errors with two of them. In the case of Beneath the Heel, the problem was obviously my fault. (I removed EVENTTRIGGER_MAGNADINE_HIRE_UNITS but did not change the python code that tries to trigger the event every turn.) However, in Lord of the Balors there is an issue that is more serious and almost certainly not my fault; the same thing happens whether I am trying to load this scenario with my modmod or with a clean copy of More Naval AI v2.3. The game seems to load ok, but the players are defeated before the game can actually start. As soon as you close the scenario's introduction text, you get the message that you have been defeated. The PythonErr.log file reads:
    Code:
    Traceback (most recent call last):
    
      File "CvWBInterface", line 271, in applyInitialItems
    
      File "CvWBDesc", line 1704, in applyInitialItems
    
    RuntimeError: unidentifiable C++ exception
    ERR: Python function applyInitialItems failed, module CvWBInterface
    Traceback (most recent call last):
    
      File "BugUtil", line 692, in <lambda>
    
      File "BugEventManager", line 570, in preGameStart
    
      File "CvAppInterface", line 70, in preGameStart
    
      File "CvScreensInterface", line 96, in showTechChooser
    
      File "CvTechChooser", line 231, in interfaceScreen
    
      File "CvTechChooser", line 243, in ConstructTabs
    
      File "CvTechChooser", line 280, in DrawTechChooser
    
      File "CvTechChooser", line 324, in placeTechs
    
    AttributeError: type object 'CvPythonExtensions.WidgetTypes' has no attribute 'WIDGET_TECH_CHOOSER_ERA'
    ERR: Python function preGameStart failed, module CvAppInterface
    
     
  9. Qatol

    Qatol Chieftain

    Joined:
    Jul 27, 2010
    Messages:
    3
    Great changes to the base game, Tholal. Adding a BUG-like interface makes this so much easier to play. Plus your tweaks to the AI are very much appreciated.

    However, I was just playing the new version (2.3) in multiplayer and we had a lot of OOS issues. I don't know exactly what triggered them, other than I'm pretty sure that whenever I founded a new city, whenever I changed civics, and when my friend declared war by walking into enemy borders, we went OOS. However, we also went OOS a few other times, so I'm not positive I listed all of the triggers.

    The Actions section of the General tab of the BUG interface could have been part of it (but once again wasn't the only cause - I know for sure we used the default settings at least once and went OOS). I have noticed that these options appear in single player, but not in multiplayer. Also, they seem to reset themselves sometimes. I know if they are set differently from the people you are playing with in regular Civ4, they can cause your game to go out of sync.

    Also, I have never been able to get the game to display the number of cities anyone has (regardless of whether the option in BUG is checked or not checked). Is this supposed to work this way?

    Finally, I've noticed that in multiplayer, the sound effects for lairs being explored play for me when the other player is the one who explored the lair. I assume this is a bug.
     
  10. Alsark

    Alsark Noble

    Joined:
    Jul 10, 2006
    Messages:
    841
    Gender:
    Male
    Location:
    Fort Wayne, Indiana
    I'm not sure if this is due to this modmod or if this happens in the base game, but whenever I play a game of Somnium for pride, then my game will crash the next turn. I first noticed this when I played online (LAN). My brother and I played a non-reward round with each other and no crash occurred; but if either of us played an AI for pride, then the game would crash next turn. I assumed it was a multiplayer issue, but when I later played by myself and played Somnium, my game still crashed the following turn.

    I didn't see this in the known bug list, so my apologies if this has already been stated.

    Otherwise this modmod has been really enjoyable and I haven't gotten a single OOS issue, so thank you for the time you've put into this modmod :).
     
  11. Tholal

    Tholal Emperor

    Joined:
    May 19, 2009
    Messages:
    1,676
    I dont think the Require Complete Kills option has any effect on the AI. I'll add it to my to-do list to look at the capitulation code.

    I believe that all the other ways tiles get converted to snow are temporary, so in a way it makes sense to keep the existing features.

    OK. I'll fix it for the next version. In the meantime, I think you can just comment out that Era Colors section of code. I removed the option since FFH doesnt use Eras like normal civ does, but apparently I left this code in. I'm not sure why it would only error on that particular scenario. Seems like it should be throwing errors for every game. Strange.

    Do you have any OOS logs I can look at?

    Interesting. Good to know.

    I had commented this code out because it's giving the player information that they normally wouldn't have. I had planned on fixing it so that it only worked with Embassies in Advanced Tactics, but never got around to that. I should probably just hide that option for the time being.

    Looks like spell sound effects are based on the plot. Can you see the plot that is being explored?

    I'm unable to replicate this issue. Do you have a save game where the issue is reproduceable?
     
  12. [to_xp]Gekko

    [to_xp]Gekko QCT junkie

    Joined:
    Dec 16, 2005
    Messages:
    7,947
    Location:
    Seyda Neen, Vvardenfell
    is there a way to reactivate the power icon next to the leader name in the scoreboard? checking the power graph every turn gets boring fast.
     
  13. MagisterCultuum

    MagisterCultuum Great Sage

    Joined:
    Feb 14, 2007
    Messages:
    16,395
    Location:
    Kael's head
    Would you mind explaining what exactly needs to be commented out? I just tried commenting out everything between # BUG - Tech Era Colors - start and # BUG - Tech Era Colors - end in the three files where it appears, but it seemed to do more harm than good. It did not make that scenario load better, it made Blood of the Angels as Mahala also result in instant defeat too, and it made the main interface disappear in all games.
     
  14. Tholal

    Tholal Emperor

    Joined:
    May 19, 2009
    Messages:
    1,676
    Look in CvMainInterface for "BUG - Power Rating - start". There's a variable called bShowPower that needs to be enabled.

    Hmmm. I thought that would work. Not sure then. I'll need to mess around with it and get back to you.
     
  15. Alsark

    Alsark Noble

    Joined:
    Jul 10, 2006
    Messages:
    841
    Gender:
    Male
    Location:
    Fort Wayne, Indiana
    Sure thing!

    It should be the latest version of both Fall From Heaven and your modmod; though if it matters, I am also using the media pack (but not Blue Marble). I haven't changed any of the files myself (though I have some stuff in my generic BTS custom assets file, but I wouldn't think that would matter).

    The crash occurs either before or after you've played Somnium for pride, whether you win or lose. I have uploaded saves both prior to playing Somnium (FFH_Lanun) and after losing to Varn Gosam (Lanun_Test). In the latter, the game should crash as soon as you end the turn.

    My brother also tried on a different computer with the same file set-up, but in a different game, and it crashed for him as well.
     

    Attached Files:

  16. [to_xp]Gekko

    [to_xp]Gekko QCT junkie

    Joined:
    Dec 16, 2005
    Messages:
    7,947
    Location:
    Seyda Neen, Vvardenfell
    TYVM Tholal!

    what about the civ4alerts when cities are about to grow into unhappiness btw?

    I'm used to Master of Mana where they automatically stop growing when they're about to get angry faces, which is a godsend.

    now I'm trying out latest Naval AI ( awesome btw ) on Nikis Night huge map of Erebus.

    I've read about some of the civ4alerts not working with naval AI, but hopefully at least that one works because I'm gonna go crazy if I have to check each city each turn to see if I have to turn on avoid growth :lol:

    I've turned on both civ4alerts and advanced combat odds in BUG options, the latter works but the former doesn't seem to... or at least I'm not getting any, which has me worried :D
     
  17. scutarii

    scutarii King

    Joined:
    Jun 10, 2008
    Messages:
    747
    for my taste - AI still builds to many mages/adepts. Adepts are useless anyway in the horde.

    At least not so much chariots/horsemen in defending cities.

    Ratio: 20 mages :5 catapults: 5 horsemen: 3 melee: 1-2 archers in AI stacks. Suits for fireballing/ summoning AI but...
     
  18. doktarr

    doktarr Warlord

    Joined:
    Jan 31, 2005
    Messages:
    213
    In 2.3, the graphic of a unit is not updated to remove the great general after "detach great general" is cast. The promotion is still removed, so this is entirely cosmetic, but it can be confusing. I'm pretty sure this wasn't the case in earlier patches.

    Also, I wasn't able to build a command post with a great general, even after I had military strategy.
     
  19. MartialDoctor

    MartialDoctor Chieftain

    Joined:
    Jan 26, 2007
    Messages:
    11
    Location:
    Taipei, Taiwan
    Thanks for this mod.

    I played with this mod a bit and saw the AI make some improved military decisions. However, it seems that the AI is overly aggressive, even attacking someone whom they have good relations with. Is that part of the programming or is this just a special instance that I've seen?

    I like the idea of the AI being smarter but still playing the game. They will still want to win the game but will follow diplomacy to do so. So, they aren't typically going to attack allies simply because they think they can conquer them.

    I'm getting the impression that the AI doesn't really do this but, instead, starts wars and attempts to conquer weaker civilizations just because it's more powerful (i.e. the relationship status doesn't affect it so much).
     
  20. Qatol

    Qatol Chieftain

    Joined:
    Jul 27, 2010
    Messages:
    3
    Thanks for the reply.

    I don't have any OOS logs right now, but I'll be sure to get some the next time I see an OOS error. Are they autosaved somewhere? Or is there something I should do to make sure that they are saved?

    Are you sure the city count information is something the players don't have? You can still get this information by checking the number of cities the AI "has for trade" and adding 1 (because the capital will never be available "for trade"). BUG was just putting those numbers together on the main screen.

    I cannot see the plot being explored. I can only hear the sound effect play.

    Also, new potential error: when the Bear constellation comes into prominence, some of my tiles are changed to tundra, whether or not I am Illian. Very frustrating to have your wine + your corn turned to tundra on turn 30. None of the other faction/religion-specific constellation events affect me when I am not that faction/religion.

    EDIT: Okay, I found a repeatable OOS error. Any time I start a multiplayer game as the Malakim, it goes OOS at the start.
     

Share This Page