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

[MOD] More Naval AI

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

  1. [to_xp]Gekko

    [to_xp]Gekko QCT junkie

    Joined:
    Dec 16, 2005
    Messages:
    7,943
    Location:
    Seyda Neen, Vvardenfell
    you can play on ErebusContinent with a lower cohesion setting, you'll get separated landmasses that will require navies ;)
     
  2. Tholal

    Tholal Emperor

    Joined:
    May 19, 2009
    Messages:
    1,676
    Unfortunately, the mod author made some changes to the mapscript a while back to make it so the landmasses were more interconnected because the Naval AI was non-existent in FFH. If you want some islands, set water level to high and cohesion to low.


    Yep. First step is to go into your civ4.ini file and set cheat code to "chipotle"

    Then, once you're in-game you can hit CTRL-z to expose the whole map and show what the AI is researching. You can also hold down various combinations of CTRL/ALT/SHIFT while mousing over tiles, units or players in the score table to get more info.

    To have the AI play itself, once you're ingame, press SHIFT-~
    This should bring up a command window that says something about Python (if there is no text in the window, hit SHIFT-~ to close it and try again). Then type the following:

    CyGame().setAIAutoPlay(xx)

    where xx should be replaced by the number of turns you want the AI to autoplay. You can scroll around the map (slowly) and see what's happening while the AI is playing, but you can't interact with any cities, players or units.
     
  3. jprc

    jprc My dog is smarter than me

    Joined:
    Sep 22, 2006
    Messages:
    492
    Location:
    Mozambique and far-far East
    Priceless !!

    And it works...

    for information, instructions are designed for US keyboard.
    By instance, in my Portuguese layout keyboard, Shift + ~ is actually Shift + Ç
    But, at the opposite, the text [CyGame().setAIAutoPlay(xx)] must by typed exactly as said, not according to the keyboard (in Port keyboard, it would do: CyGame*(.setAIAutoplay*100( for 100 turns. You must play around on your keyboard for typing the exact instruction CyGame().setAIAutoPlay(xx)

    I am going to watch now a Civ 4/FFH movie for a while ...

    to [to xp]Gekko : I will definitely try this setting!
     
  4. Skarn

    Skarn Chieftain

    Joined:
    Jun 30, 2010
    Messages:
    51
    I tried your mod in my latest games and, while it seems the AI effectively got improved (I even got invaded by sea courtesy of Falamar), I ran into some strange bugs.

    First, I see in the "known bugs" list that the barbarians sometimes spawn Freaks and Lightbringers, and I've effectively seen them in the endgame. But I've also seen Monks and Grigori Medics (and a Shadow, but it could have been an HN unit from Tasunke, I didn't check in WB)... do you have an idea where these might come from?

    Second, I saw Valledia building stacks of Soldiers and Kilmorph who could easily have captured the poorly defended barbarian town near her borders, but she just kept camping near that city with Bambur and some Kilmorph guys... even though she could have overrun them in seconds. When she DOWd me later in the game (which took me completely by surprise since she was at Pleased, but she probably saw my poorly defended cities as a way to extend her kingdom), I thought I was done for, but I managed to turn the tables with just a stack of a few crusaders, the three Stooges and Valin... since she just made her stacks of mages and paramander roam her lands instead of rushing them through my borders. What's the point in building so many units if you don't even use them correctly?

    Third, I spread Order in Galveholm, which was already affected by the Kilmorph plague (but Os-Gabella didn't switch to Kilmorph, which is a huge improvemend over base FFH). I tried to convert her, but the option simply wasn't there. Not even redded out. The same deal happened with Falamar later.

    Fourth, I was able to build Abashi in captured Galveholm (playing as Ethne), and Guybrush in a Lanun town. I thought Tolerant didn't let you build other civ's heroes?

    Fifth (this is a question, not a bug report), Jonas adopted FoL early in the game (which I founded), then founded AV, but did not convert. Were his religious weights changed somehow?

    Anyway, despite the bugs, these were probably the best FFH games I had in a while, so thank you for your mod :)
     
  5. Hesmyrr

    Hesmyrr Chieftain

    Joined:
    Oct 21, 2010
    Messages:
    29
    Also throwing a bit here. I'm not confident about it, but I don't think the werewolf hero guy's mechanic works (even when I killed more than ~20 units using the werewolf hero, no ravid werewolf unit was generated).
     
  6. clearbeard

    clearbeard King

    Joined:
    Dec 17, 2004
    Messages:
    691
    Gender:
    Male
    Location:
    Delaware, USA
    Worked fine in my game. Are you sure you were attacking living units? Fighting constructs (golems, etc), machines (catapaults, etc), undead, demons, or angels will not spawn ravenous werewolves. Also, if the stack you were attacking had a lot of stronger units defending, your ravenous werewolves may have attacked and died immediately after being created, without your noticing.
     
  7. Tholal

    Tholal Emperor

    Joined:
    May 19, 2009
    Messages:
    1,676
    Unfortunately, this one has stymied me when I tried to fix it in the past. It is relatively minor issue, but I find it an annoyance (especially since it's a bug I introduced!), so I'll move it to the top of my bug fix list and give it another shot (though not in the next release)


    This seems to happen occasionally with stacks flagged with the Barbsmasher AI. Do you happen to have a save game where I can take a look at the aimless troops?


    Interesting. I didn't intentionally touch anything regarding diplomacy options, but maybe it's a by-product of some other changes. I'll make a note to take a look at that.

    Does base FFH behave the same way or is this another bug of mine?

    AI religious choice was altered to be more dynamic. So even though a leader might have a preference towards a certain religion, they won't automatically adopt it every time.

    Glad to hear that you enjoy the mod! I very much appreciate the feedback, so don't be afraid to keep it coming!
     
  8. Tholal

    Tholal Emperor

    Joined:
    May 19, 2009
    Messages:
    1,676
    I just ran a test and it seems to be working properly. If none of the situations Clearbeard outlines fit what you're seeing, please provide a save game and I'll look into it. Thanks!
     
  9. Skarn

    Skarn Chieftain

    Joined:
    Jun 30, 2010
    Messages:
    51
    Description for the Tolerant trait mentions that "you will not be able to build other civs' heroes", so I assumed it would be the case (though ironically, I won that game thanks to Abashi...). But it has been a while since I last played the Elohim and I usually don't go military with them, so I wouldn't know if the bug could come from base FFH...

    Sadly I don't have an available save for the Amurite war, but if the bug ever comes again I'll be sure to keep one.
     
  10. Tholal

    Tholal Emperor

    Joined:
    May 19, 2009
    Messages:
    1,676
    Fair enough. I'll add it to the bug list!
     
  11. Tholal

    Tholal Emperor

    Joined:
    May 19, 2009
    Messages:
    1,676
    Version 1.3 released (compatible with previous saves)

    • Fix for Adventurers not gaining experience
    • Adventurers can upgrade to Grigori Medics
    • Fix for a Python error when Orthus is created
    • Improvements to AI civic choices (based on Better AI and Denev's mod)
    • Fix for some ships having too much defense
    • Fix for AI building too many ships
    • Minor fix to AI_Missionary move to keep the AI from using their first Disciple unit to create a Great Work rather than establishing a religion
    • Update to the AI's computation of it's religious victory status (checks that religious victory is turned on and also checks the XML for what percentage the victory is set to)
    • Minor tweaks to AI city production
    • Heroes less likely to attack at low odds
     
  12. jprc

    jprc My dog is smarter than me

    Joined:
    Sep 22, 2006
    Messages:
    492
    Location:
    Mozambique and far-far East
    As it is "More Naval AI" mod, was not it normal to have AI building more ships?
    Actually, I did not notice in my games with this mod that the AI built too many ships, but rather did not used/promoted them accordingly to the map (emphasis on transport, or raiders, or trade blockers... or sea domination, or exploration)
    Do you mean: "too many ships "... of a certain kind, i.e., not directly useful to sea invasion (ex.: building caravels rather than Galleons when at war and in need of transports ?

    p.s.: link on 1st page still talks about v 1.2: Download link (v1.2)
     
  13. Tholal

    Tholal Emperor

    Joined:
    May 19, 2009
    Messages:
    1,676
    There was a spot in the code where the AI would get stuck in a sort of loop. For example, the AI would count how many ships it has with the ESCORT_SEA AI. If it didn't have enough, then it would queue up a ship build. However, sometimes it would decide to switch the AI of the new ship to RESERVE after it was built, resulting in the next count showing that it still needed ESCORT_SEA ships, rinse, repeat.

    Now I have the AI including the number of ships set to AI_RESERVE when counting its fleet.


    Thanks! I'll fix that now.
     
  14. Skarn

    Skarn Chieftain

    Joined:
    Jun 30, 2010
    Messages:
    51
    Does that mean Cassiel will stop switching to Religion as soon as he can and that we can see something else than Conquest in the AI economy? If that's the case, you have my eternal thanks.
     
  15. Tholal

    Tholal Emperor

    Joined:
    May 19, 2009
    Messages:
    1,676
    There will definitely be some variety. I discovered that the AIweights in the XML were set to overly high values, resulting in nearly every civ adopting the same civics. I set most of the AIweights to 0 and incorporated some new code to help the AI decide what civics it should adopt. It's one of those areas that will always be a work in progress (now the AI doesn't like Infernal Pact for some reason), but hopefully it's already an improvement.
     
  16. Broken Hawk

    Broken Hawk Emperor

    Joined:
    Jan 20, 2006
    Messages:
    1,228
    Location:
    On a hill
    do you install the mod on top of patch o? thanks.
     
  17. Tholal

    Tholal Emperor

    Joined:
    May 19, 2009
    Messages:
    1,676
    Yes. Install Patch O then install the More Naval AI mod.
     
  18. Broken Hawk

    Broken Hawk Emperor

    Joined:
    Jan 20, 2006
    Messages:
    1,228
    Location:
    On a hill
    I am playing my first game of the mod with the Erebus Continent mapscript. It's the most fun I've had with FfH in a long time.
     
  19. badtim

    badtim Chieftain

    Joined:
    Oct 19, 2009
    Messages:
    14
    any chance that this may be, in any way, compatible with Tweakmod? or made compatible without running massive amounts of file diffs? i've tried out all the major modmods (Orbis, RiFE, Wildmana) and really don't like any of them, but i do like some of the changes. now, if i could just have AI using actual navy + tweakmod changes, then i think i'd be a happy camper :)
     
  20. Tholal

    Tholal Emperor

    Joined:
    May 19, 2009
    Messages:
    1,676
    Excellent! I'd love to hear about your game when you're done.

    Since Tweakmod is all Python and XML it could probably be done. It would take some work though. And yes, you would need to diff all the Python and XML files.
     

Share This Page