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

2.7 Beta5

Discussion in 'More Naval AI Modmod' started by Tholal, Sep 26, 2016.

  1. Tholal

    Tholal Emperor

    Joined:
    May 19, 2009
    Messages:
    1,676
    Installer attached. Not compatible with previous saves!

    PATCH NOTES:
    • Fixed a couple of error messages related to BUG stuff
    • Some buildings are now immune to the City Fire event
    • Game interface now shows Turn number rather than BC/AD
    • New civilopedia texts from the Lore Compendium and Bestiary
    • Message shown when roads are pillaged
    • Messages shown when Wonders are captured or destroyed
    • Tolerant civs now use terrain yield from the original owner of the city
    • Info stats screen only shows units/buildings that have been built/destroyed
    • Fixed OOS cause by creating a Puppet State
    • Unit cycling is now interrupted by units that can cast some spells (determined by new XML flag in spellinfos.xml)
    • Fixed error caused by Inquisition completing outside of a city
    • Fixed a crash with Require Complete Kills option.
    • UI: Attitude modifier, free promotion and mutation chance are now displayed in the bonus help and sevopedia

    You can browse the repository to see what has changed - https://bitbucket.org/Tholal/more-naval-ai/commits/all
     

    Attached Files:

    Terkhen and jackal1234 like this.
  2. MagisterCultuum

    MagisterCultuum Great Sage

    Joined:
    Feb 14, 2007
    Messages:
    16,229
    Location:
    Kael's head
    Thanks Tholal!

    I had some trouble sleeping last night, so I went ahead and merged it with my mod, although I'm tired enough now that I'll need to get some sleep before doing some more playtesting.

    I noticed that you don't seem to have included the WorldBuilder version 17b patch yet. I'm pretty sure I shared it months ago. Should I made a new version of the files for this patch?


    I'm not really familiar with the newly used method of caching things at the start of CustomFunctions.py. What are its advantages? Should I be using it for more things in my modmod?
     
  3. KingGonzo

    KingGonzo Chieftain

    Joined:
    Jul 22, 2015
    Messages:
    4
    Hi,

    we tried to start a multiplayer (2-players) game with evolve as vpn, and it won't start. The host crashes with the first click on the map. After crash the host player wasn't able to reconnect to the game.

    We found a log file with this:
    21:03:50 DEBUG: BugUtil - extending BugEventManager.preGameStart instead CvAppInterface
    21:03:50 DEBUG: BugEventManager - adding event 'PreGameStart'
    21:03:50 DEBUG: BugEventManager - adding event 'BeginActivePlayerTurn'
    21:03:50 DEBUG: BugEventManager - adding event 'SwitchHotSeatPlayer'
    21:03:50 DEBUG: BugEventManager - adding event 'LanguageChanged'
    21:03:50 DEBUG: BugEventManager - adding event 'ResolutionChanged'
    21:03:50 DEBUG: BugEventManager - adding event 'PythonReloaded'
    21:03:50 DEBUG: BugEventManager - adding event 'unitUpgraded'
    21:03:50 DEBUG: BugEventManager - adding event 'unitCaptured'
    21:03:50 DEBUG: BugEventManager - adding event 'combatWithdrawal'
    21:03:50 DEBUG: BugEventManager - adding event 'combatRetreat'
    21:03:50 DEBUG: BugEventManager - adding event 'combatLogCollateral'
    21:03:50 DEBUG: BugEventManager - adding event 'combatLogFlanking'
    21:03:50 DEBUG: BugEventManager - adding event 'playerRevolution'
    21:03:50 DEBUG: BugInit - game not fully initialized
    PY:OnInit

    The last version we had installed before updating to 2.7beta5 was 2.6.
     
  4. Terkhen

    Terkhen King

    Joined:
    Aug 1, 2011
    Messages:
    911
    Gender:
    Male
    Location:
    Granada
    Great! Thank you Tholal :)

    It is called lazy initialization. The most important advantage over preparing the data at the beginning of the method that is going to use it is that the data created only once, instead of every time that the method is called. This saves time, specially if the method is called very frequently. If you have a method that is being called a lot and needs to initialize a lot of stuff at the beginning, using this is probably a good idea.

    Another advantage of lazy initialization is that the data is never initialized if the method is never used, saving memory and time until the data is actually used. In methods that are not called in all games like this one (CustomFunctions.doCityFire) this saves memory and time until they are actually used.

    ----

    Edit: I was thinking on applying this caching to other parts of the code while I was writing this post so I gave the rest of CustomFunctions and CvSpellInterface a look. The following methods are called very frequently in some games, and they do a lot of getInfoTypeForString calls (which imply a python -> c++ -> python context change whenever they are called). This means a lot of time wasted in them.

    CustomFunctions

    doHellTerrain
    doTurnKhazad
    doTurnLuchuirp

    CvSpellInterface

    postCombatMimic
    reqAddToWolfPack
    reqArcaneLacuna (Could be reused for spellArcaneLacuna)
    reqCrewBuccaneers
    reqCrewLongshoremen
    reqCrewNormalCrew
    reqCrewSkeletonCrew
    reqCrownOfBrillance
    reqDestroyUndead (Could be reused for spellDestroyUndead)
    reqDispelMagic
    reqHeal
    reqPirateCove
    reqRepair (Could be reused for spellRepair)
    reqRevelation (Could be reused for spellRevelation)
    reqSanctify (Could be reused for spellSanctify)
    reqSpring
    reqSprint
    reqTakeEquipmentBuilding
    reqTakeEquipmentPromotion
    reqTakeEquipmentUnit
    reqTeachSpellcasting
    reqVitalize

    Although these may be the most serious offenders, there are a ton of getInfoTypeForString calls being done everywhere. I think that I may be able to create a cache for all of the python at once, to store all getInfoTypeForString with lazy initialization without having to change the actual code everywhere. So huge changes would cause a lot of bugs, and make merges with any past, current and future mods a nightmare, while if my solution works all of the code and any mods on top of it would get the optimization for free. I will look into it and post an update when I reach a conclusion.
     
  5. Tholal

    Tholal Emperor

    Joined:
    May 19, 2009
    Messages:
    1,676
    Looks like I missed downloading that one. If you want to make a new version, that's great. Otherwise I'll dig up the old post.
     
  6. MagisterCultuum

    MagisterCultuum Great Sage

    Joined:
    Feb 14, 2007
    Messages:
    16,229
    Location:
    Kael's head
    Here is a Worldbuilder update, bringing Platybuilder version 4.17b in line with MNAIv2.7beta5. There is really not much too it, except for fixing a few xml typos and making AIAutoPlay from worldbuilder work correctly.

    There is still a bug which is causing the game to crash when I try to load a WorldBuilder save file made with this version. It have not re-familiarized myself with this code nearly enough yet to figure out how to fix that.




    Shortly before merging I ran into a bug with the revolution code. (I had copied the error into a reply in this thread, but then accidentally closed Chrome and lost it after already starting a new game and overwriting PythonErr.py.)

    It happened when I agreed to set a city free to form the Hippus. It was the Calabim city of Don'tgonearthe Castle, belonging to Decius. I was playing as Varn of the Malakim but had just formed a permanent alliance with Decius a couple turns earlier and was using the Control Whole Team game option of my modmod. I thought that I was still on the Malakim turn when the option to set the Calabim city free came up, but perhaps I had accidentally ended my turn already and it was just the first thing to happen after switching.

    Anyway, the bug prevented a new state from being formed, but did not cause a crash or anything serious.
     

    Attached Files:

  7. KingGonzo

    KingGonzo Chieftain

    Joined:
    Jul 22, 2015
    Messages:
    4
    Hi,

    while we were trying to reinstall the earlier Patch, we recognized that the origin donwload-link to FFH2 mod links to an error page:
    http://forums.civfanatics.com/threads/mod-fall-from-heaven-ii.171398/

    There are more Points we were interested in, like special multiplayer startposition conditions (starting as far away as possible from each other, reminding the different map types cylindric, etc.).
    There seems to be a bug because of all holy or disciple units allow to cast a new technologie.
    Another bug seems to be, that promotions for human players are only allowed to be selected one round later than the AI is allowed. This seems to be unfair, especially if you were defending your city and little doom Stacks knock on your door.

    Where to report these features/bugs, the linked lists are from 2015, are they still in use?

    Anyway great work, keep on going!

    Yours

    KingGonzo
     
  8. KingGonzo

    KingGonzo Chieftain

    Joined:
    Jul 22, 2015
    Messages:
    4
    One more point, if two AI players are in war and want you to join the war, you should get a positive point from party you refused to decare war on. Oherwise both parties will hate you without a chance to solve th problem. :)
     
  9. CurseUppl

    CurseUppl The bureaucracy expands.

    Joined:
    Apr 22, 2009
    Messages:
    257
    Location:
    Holy Terra
    Good work as usual, Tholal.
     
  10. jackal1234

    jackal1234 Chieftain

    Joined:
    Jul 11, 2010
    Messages:
    97
    Location:
    127.0.0.0
    Playing the new version, working pretty good and the AI seems smarter with diplomacy
     
  11. Broken Hawk

    Broken Hawk Emperor

    Joined:
    Jan 20, 2006
    Messages:
    1,230
    Location:
    On a hill
    Been away for some time. Glad to see the work on MNAI continues.
     
  12. kjnoren

    kjnoren Warlord

    Joined:
    Apr 6, 2004
    Messages:
    103
    Location:
    Värnamo, Sweden
    Been playing a bit with this version, and seems to be more stable at some maps than 2.6.3. However, when opening "Against the Wall" I ran into the following errors while choosing the scenario settings (leader and civ names):

    Python exception

    Traceback (most recent call last):

    File CivScreensInterface, line 741 in handleInput
    File CvEspionageAdvisor, line 375 in handleInput
    File CvEspionageAdvisor, line 511 in loadScenario
    File CvWBDesc line 2590 in applyMap

    RuntimeError: unidentifiable C++ exception

    (behind the rest of the errors)
    Python exception: Can't find enum for type tag None [OK]
     
  13. Pfeffersack

    Pfeffersack Deity

    Joined:
    May 10, 2003
    Messages:
    2,630
    Location:
    Germany
    I assume to install this beta Version, I just need to run the installer linked here (of course on top of v3.19 BTS with base FFH2 with latest patch "o" ;) ) However, both this beta installer (and also latest non-beta installer of the More-Naval-AI-mod) claim, that it necessary to install it "on top of the More-Naval-AI-mod" on the first site of the installation process. Minor, but can be quite confusing :crazyeye:
     
  14. Strigvir

    Strigvir Emperor

    Joined:
    Sep 12, 2013
    Messages:
    1,299
    The game freezes when the Hyborem stack attacks my stack.
     

    Attached Files:

Share This Page