[MOD] More Naval AI

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

  1. CurseUppl

    CurseUppl The bureaucracy expands.

    Joined:
    Apr 22, 2009
    Messages:
    257
    Location:
    Holy Terra
    By power rating next to the scoreboard, do you mean that small number that shows your ratio compared to other civs? I'm pretty sure I saw that option under ctrl + alt + O (or is it shift + ctrl + O?) You should be able to enable it.
     
  2. Red Key

    Red Key Modder

    Joined:
    Sep 24, 2011
    Messages:
    422
    Gender:
    Male
    Location:
    USA
    I think it would be awesome to include this! :goodjob:
     
  3. [to_xp]Gekko

    [to_xp]Gekko QCT junkie

    Joined:
    Dec 16, 2005
    Messages:
    7,950
    Location:
    Seyda Neen, Vvardenfell
    true, there's a "power ratio" box you can toggle in the scoreboard section. it doesn't work for me though. I'm not using advanced tactics, not sure if it works correctly with that option enabled.
     
  4. lfgr

    lfgr King

    Joined:
    Feb 6, 2010
    Messages:
    994
    I played a bit and experienced nothing odd. Only Issue is that Growth bar is showing "Growth" rather than "Stagnant (Growth Control)" when that button is activated.

    You'll have to convince Tholal to make it optional again.
    You can easily edit it yourself.

    If it were that easy, I would do the changes and release them as alternatives to the current configuration. But I'd have to update them every time Tholal releases a new version of his mod, and I don't have the time for this. So you'll have to do it yourself. The autocasting thing is really easy, though :).

    I know, it's in the Bug Tracker here ;). I will look over it maybe.
     

    Attached Files:

  5. MagisterCultuum

    MagisterCultuum Great Sage

    Joined:
    Feb 14, 2007
    Messages:
    16,428
    Location:
    Kael's head
    I assumed he was referring to the fact tha in the last update of base FfH2 Kael somehow accidentally moved the <PythonPostCombatLost>postCombatExplode(pCaster,pOpponent)</PythonPostCombatLost> from UNIT_PYRE_ZOMBIE to UNIT_SON_OF_ASENA.

    This is a very basic fix that has been in More Naval AI and pretty much every other modmod for a long time.

    The work boat issue can be solved easily by removing the <bSacrificeCaster>1 tag from SPELL_PIRATE_COVE and adding pCaster.kill(True, pCaster.getOwner()) to the end of def spellPirateCove(pCaster):

    The update of my momod includes that fix. It also makes work boats work like superforts when the advanced tactics option is active.


    I have merged in all of the corrected files lfgr has posted since the last official release too. I'm just about to have lunch, then test to make sure the CvMainInterface.py merge was successful, and then get ready to upload everything.
     
  6. [to_xp]Gekko

    [to_xp]Gekko QCT junkie

    Joined:
    Dec 16, 2005
    Messages:
    7,950
    Location:
    Seyda Neen, Vvardenfell
    the avoid unhappy button still doesn't work 100% correctly, in my test with it active my capitol got to 20/20 food bucket and one turn later grown into unhappiness. this was an issue in WM, and Sephi has since fixed it in MoM, perhaps it should avoid filling the food bucket completely?
     
  7. lfgr

    lfgr King

    Joined:
    Feb 6, 2010
    Messages:
    994
    Thanks for the report, but I don't really understand. How do you get the food bucket full?
    I will download the MoM DLL source code now, Maybe I can find the solution there.
    EDIT: I think I found it. I'll have to test.
    EDIT2: I think I found Gekko's bug.
    I set baby boom (+10 food in all cities) to occur every turn. This caused a full food bucket and the city grew into unhappiness.
    I merged some stuff from MoM but it's still not working.
    EDIT3: Fixed! (I actually forgot to activate avoid unhappiness after merging the MoM part :mischief:) Thanks again, Gekko!
    All Credits to sephi, of course.
    EDIT4: And Credits to Jean Elcard :)
     

    Attached Files:

  8. [to_xp]Gekko

    [to_xp]Gekko QCT junkie

    Joined:
    Dec 16, 2005
    Messages:
    7,950
    Location:
    Seyda Neen, Vvardenfell
    thank you for the work lfgr - I just remembered this used to be an issue in WM as well but got fixed during the move to MoM :)

    by the way, those buttons were made by Jean Elcard for his FiRe! mod which was the first merge of ffh and revolutionsmod ever, Sephi only included it in WM and then fixed a couple malfunctions with it :)
     
  9. akatosh

    akatosh Prince

    Joined:
    Dec 2, 2012
    Messages:
    401
    @lfgr - what does autocasting do? Can you set adepts to autocast buffs like haste, or automate them to auto-sanctify your terrain?
     
  10. lfgr

    lfgr King

    Joined:
    Feb 6, 2010
    Messages:
    994
    I think so. I actually only know it from Rise from Erebus, but never used it. You should better ask somebody else :)
     
  11. [to_xp]Gekko

    [to_xp]Gekko QCT junkie

    Joined:
    Dec 16, 2005
    Messages:
    7,950
    Location:
    Seyda Neen, Vvardenfell
    autosanctify is still in, units with terraform abilities can be automated.

    autocasting is exactly what you say, for example having an adept cast haste automagically each turn. VERY useful, but Kael removed it some versions ago for some very very weird reasons.
     
  12. Tasunke

    Tasunke Crazy Horse

    Joined:
    Mar 20, 2009
    Messages:
    2,800
    Location:
    the 1800s
    auto-sanctify and auto-haste are some of the best damn autos in the game.

    Right up there with auto-blur ;)
     
  13. MagisterCultuum

    MagisterCultuum Great Sage

    Joined:
    Feb 14, 2007
    Messages:
    16,428
    Location:
    Kael's head
    I personally quite like having the Lanun Pirate Coves/Harbors/Ports act as "super forts," using them to claim coastal territory and requiring ships guarding them to make them upgrade. However, the AI does not seem to understand how to use them nearly as well as it does the land based Forts/Castles/Citadels. They don't seem to guard them, so they remain Coves while mine advance to Ports. Could you make the AI understand to use naval units to garrison "super forts" on water?
     
  14. Red Key

    Red Key Modder

    Joined:
    Sep 24, 2011
    Messages:
    422
    Gender:
    Male
    Location:
    USA
    I improved the fort defense AI only for the following AI types: CITY_DEFENSE, CITY_SPECIAL, CITY_COUNTER, and RESERVE. I could do the same for some appropriate naval AI types.

    I am also working on code to give all plots a choke value and canal value. The AI will use these values to find good spots for forts and it could influence city placement too. I coded the choke point part to work for both land and water.
     
  15. MagisterCultuum

    MagisterCultuum Great Sage

    Joined:
    Feb 14, 2007
    Messages:
    16,428
    Location:
    Kael's head
    Sounds good.

    (Be sure not to make DOMAIN_SEA units try to guard super forts on land though, as ships are destroyed in forts just as easily as inside a city.)

    Speaking of super forts, it seems wrong to me that Hidden Nationality units can be used to claim forts from other players with whom you are not at war. Changing the owner of the tile gives away the unit's nationality just as much as conquering cities would. It would be better for super forts taken by HN units to be given the barbarian state, and probably better still for them simply to belong to no one until a non-HN units comes to claim the tile.


    p.s. I would also very much like it if automated Work Boats could build Pirate Coves in order to claim valuable naval territory much as workers do with forts, instead of only building them near cities to boost the yields of workable plots. Of course, you probably would not want to do this unless Tholal decided that he wants to make Pirates Coves act like super forts in this modmod too. Before my changes, work boats were only allowed to use the Pirate Cove spell within their own territory. Having them venture out in order to claim territory and the not be able to do so could be a problem.
     
  16. Terkhen

    Terkhen King

    Joined:
    Aug 1, 2011
    Messages:
    916
    Gender:
    Male
    Location:
    Granada
    I have a few goodies that should be ready for inclusion in that new version if you want to use them :)

    Spanish translation: It includes a spanish translation for all strings except for those which are only "fluff" text. It includes a new text file, which fixes translation errors of the spanish translation of vanilla BtS. the only changes to existing strings are removing trailing whitespaces from the end of the string.

    Kuriotate settlements: This ModComp prevents Kuriotates from always creating cities without being given the chance to decide between cities and settlements in multiplayer. The first Kuriotate settlement will still be upgraded automatically to a city. The rest of the new settlements will not be upgraded automatically; they can be upgraded later (if the player chooses to do so) by activating the Promote Settlement ability in the settlement.This ModComp should not modify this behavior in single player games.

    EDIT: Attachments removed.
     
  17. lfgr

    lfgr King

    Joined:
    Feb 6, 2010
    Messages:
    994
    Update on avoid growth button:
    In MoM, the avoid unhappy citizens button is activated by default. If you want to adopt that behavior: file attached.
    TXT keys for the buttons are found here.

    EDIT: An idea how to solve the problem whether to include autocast and other features you don't want to have in, but are easy to include: Activate autocast and bring the xml tags back, but deactivate it in the DLL unless somebody sets a XML define true.
     

    Attached Files:

  18. [to_xp]Gekko

    [to_xp]Gekko QCT junkie

    Joined:
    Dec 16, 2005
    Messages:
    7,950
    Location:
    Seyda Neen, Vvardenfell
    .cpp files are only for DLL compiling I guess?
     
  19. Terkhen

    Terkhen King

    Joined:
    Aug 1, 2011
    Messages:
    916
    Gender:
    Male
    Location:
    Granada
    I also noticed that the area available for putting the mouse over a promotion of the currently selected unit and showing the promotion's tooltip is quite small, just a small line at the right of each promotion. Can anyone else confirm this issue?
     
  20. [to_xp]Gekko

    [to_xp]Gekko QCT junkie

    Joined:
    Dec 16, 2005
    Messages:
    7,950
    Location:
    Seyda Neen, Vvardenfell
    you are correct, MagisterCuultum also posted a possible workaround that hopefully works :)
     

Share This Page