MNAI-U: unofficial build & bugfixes

I'm thinking the AI should probably be altered to take into account game options like Always Peace. Even when I have that active, the AI tends to invest way too much into building up an army and not enough into training settlers, founding cities, and improving their cities by building useful buildings.


I also noticed in my last game that the game kept hanging up between turns unless I used worldbuilding to delete or skip a lot of units from two different teams which according to the BBAI log were always trying to attack a specific city (belonging to Thessa, my puppet state vassal. I was playing Rivanna the Wraith Lord of the Svartalfar) despite there being no hidden nationality units involved and the game options preventing the players from declaring war.

I should perhaps note that I was able to get her as a vassal because the Always Peace option did not prevent a revolution from causing Volanna to emerge as a rebel leader in one of my more distant cities shortly after The Ashen Veil was founded there. She then captured two more of my cities and gave one to Minister Koun as she accepted him as a permanent ally. After a long war I made peace with them, and then had Minister Koun ask to become my willing vassal despite their team's combined score being higher than mine. I then demanded some mana from Koun, which he gladly gave me, and then from Volanna, which she refused and resumed our war.

Perhaps the Always Peace option should also change how Revolutions and vassals work to prevent rebellions leading to war or to prevent players from making the kind of arrogant demands that can lead to war.


In that game I'd forgotten I even had the Always Peace game option active. (I did not realize it until I had every single tech, was working on the Tower of Mastery, and decided I should probably attack the Khazad capital to destroy The Crucible.) I usually like to start with it to reach at least the mid game without being dogpiled by huge armies crushing me, but by that point in this game I was already struggling in my civil war with Volanna and Koun.

I still really wish me could change the "10 turns of universal peace" from advanced Start games to something like 100 turns.
 
I see, I misread that, sorry. So what you want is simply a marker for otherwise normal leaders, so that these leaders are shown behind a slash in the pedia?
That is something that can easily be done in python, without the hassle of adding a new tag. The leader buttons are drawn in the placeLeader() method in python/Contrib/Sevopedia/SevopediaCivilization.py. You could hard-code your minor leaders there. Let me know if you need help.
Only got back to this now, and my code for it is probably horrendously inefficient (probably best option would be adding an "is minor" XML tag to the leaders and calling that value, but I don't yet know how to do it), but it does work!
So thanks for the pointer, I didn't think it would be that readily accessible. :)


1709768165883.png


Code:
Python:
def placeLeader(self):
        screen = self.top.getScreen()
        panelName = self.top.getNextWidgetName()
        screen.addPanel(panelName, localText.getText("TXT_KEY_CONCEPT_LEADERS", ()), "", False, True, self.X_LEADERS, self.Y_LEADERS, self.W_LEADERS, self.H_LEADERS, PanelStyles.PANEL_STYLE_BLUE50)
        screen.attachLabel(panelName, "", "  ")
        bPreviousMajor = False # Alekseyev
        for iLeader in range(gc.getNumLeaderHeadInfos()):      
       
            # Alekseyev start
            iMinor = False          
            if iLeader in (CvUtil.findLeaderNum( 'LEADER_ANAGANTIOS' ), CvUtil.findLeaderNum( 'LEADER_ANAGANTIOS' ), CvUtil.findLeaderNum( 'LEADER_AVERAX' ), CvUtil.findLeaderNum( 'LEADER_BRAEDEN' ), CvUtil.findLeaderNum( 'LEADER_DUIN' ), CvUtil.findLeaderNum( 'LEADER_DUMANNIOS' ), CvUtil.findLeaderNum( 'LEADER_FURIA' ), CvUtil.findLeaderNum( 'LEADER_GOSEA' ), CvUtil.findLeaderNum( 'LEADER_HAFGAN' ), CvUtil.findLeaderNum( 'LEADER_JUDECCA' ), CvUtil.findLeaderNum( 'LEADER_KANE' ), CvUtil.findLeaderNum( 'LEADER_KOUN' ), CvUtil.findLeaderNum( 'LEADER_LETHE' ), CvUtil.findLeaderNum( 'LEADER_MAHON' ), CvUtil.findLeaderNum( 'LEADER_MALCHAVIC' ), CvUtil.findLeaderNum( 'LEADER_MELISANDRE' ), CvUtil.findLeaderNum( 'LEADER_MERESIN' ), CvUtil.findLeaderNum( 'LEADER_OSTANES' ), CvUtil.findLeaderNum( 'LEADER_OUZZA' ), CvUtil.findLeaderNum( 'LEADER_RIUROS' ), CvUtil.findLeaderNum( 'LEADER_RIVANNA' ), CvUtil.findLeaderNum( 'LEADER_SALLOS' ), CvUtil.findLeaderNum( 'LEADER_SHEKINAH' ), CvUtil.findLeaderNum( 'LEADER_STATIUS' ), CvUtil.findLeaderNum( 'LEADER_ULDANOR' ), CvUtil.findLeaderNum( 'LEADER_TETHIRA' ), CvUtil.findLeaderNum( 'LEADER_TYA' ), CvUtil.findLeaderNum( 'LEADER_THESSALONICA' ), CvUtil.findLeaderNum( 'LEADER_VOLANNA' ), CvUtil.findLeaderNum( 'LEADER_WEEVIL' )):
                iMinor = True  
            # Alekseyev end
           
            civ = gc.getCivilizationInfo(self.iCivilization)          
           
            # Alekseyev modified
            if civ.isLeaders(iLeader) and iMinor == False:
                screen.attachImageButton(panelName, "", gc.getLeaderHeadInfo(iLeader).getButton(), GenericButtonSizes.BUTTON_SIZE_CUSTOM, WidgetTypes.WIDGET_PEDIA_JUMP_TO_LEADER, iLeader, self.iCivilization, False)
                bPreviousMajor = True
            if civ.isLeaders(iLeader) and iMinor == True:
                if bPreviousMajor == True:
                    screen.attachLabel(panelName, "", " <font=4>/</font> ")  
                screen.attachImageButton(panelName, "", gc.getLeaderHeadInfo(iLeader).getButton(), GenericButtonSizes.BUTTON_SIZE_CUSTOM, WidgetTypes.WIDGET_PEDIA_JUMP_TO_LEADER, iLeader, self.iCivilization, False)
                bPreviousMajor = False
            # Alekseyev modified end
 
I'm thinking the AI should probably be altered to take into account game options like Always Peace. Even when I have that active, the AI tends to invest way too much into building up an army and not enough into training settlers, founding cities, and improving their cities by building useful buildings.
This is quite niche, so I don't really want to invest time into improving that. In particular Revolutions don't make much sense with Always Peace, IMO.
 
Is it deliberate that the alignment attitude modifiers are asymmetrical? good to evil is -5 but evil to good is -4.
 
Could you make a change in recalcName in DynamicCivNames? Something like:
Python:
# DERTUEK: Set names only if something changed
tsOldTuple = ( pPlayer.getCivilizationDescription( 0 ), pPlayer.getCivilizationShortDescription( 0 ), pPlayer.getCivilizationAdjective( 0 ) )
tsNewTuple = self.chooseName( iPlayer, bForceUpdate )
if tsOldTuple != tsNewTuple:
    pPlayer.setCivName( *tsNewTuple )
Otherwise desc/shortdesc/adjective are always overwritten for nothing and that thing totally break the use of gender/plural in translations.

It won't prevent DCN to break it when the name really changes but for people who don't use Revolution/DCN like me, things will be ok.

Thx
 
@lfgr It looks like the code repo is down, or at least is showing a 500 error when I try to access it. Is there a new location for it?
 
@lfgr It looks like the code repo is down, or at least is showing a 500 error when I try to access it. Is there a new location for it?
Unfortunately notabug.org has become increasingly unreliable. I guess I'll have to bite the bullet and migrate to github. I'll do that next week (no access to the code right now).

Unrelated, as you can maybe tell, I've been very busy lately, but I hope to pick up development again in a few weeks, and perhaps release a small new version.

Is it deliberate that the alignment attitude modifiers are asymmetrical? good to evil is -5 but evil to good is -4.
No idea, it probably is. I think it's fitting, evil civs being more likely to work together with good ones if it furthers their goals.

Could you make a change in recalcName in DynamicCivNames? [...]
I'll check how to best fix this. I agree DCN should do nothing when not activated.
I looked into fixing the gender/plural/case etc. stuff a while ago. My idea was to create a new text object every time the name changes, and add it with an appropriate key (like TXT_KEY_PLAYER_..._DESC). Unfortunately, there seems to be no way to delete text objects, so that would probably introduce a memory leak.
 
How's it goin'? KCD2 is coming out in less than a month, but after that I'm looking at another playthrough perhaps. I can never seem to let the last one, be the last one I ever do!

did the full evil playthrough the last time, maybe it's time for one last fully good.. switch to Basium off the Elohim for old time's sake 🤔
 
@lfgr So I'll start by saying that if Linux support isn't a priority for you, that's totally valid.

BUT, I'm testing software on my dual-boot laptop, and installing CIV4:BTS on the linux partition and booting using WINE/Proton, I've made the following observations:
  • The base game boots without issues
  • FFH2, the original version of the mod, boots without issues
  • MNAI-U Version 2.9.2-1u, Does not boot, with the following errors
CIV4GraphicOptionInfos.xml.png
CIV4PlayerOptionInfos.xml.png

The one thing standing out to me in the error messages is the fact that the directory separators are mixed up, which makes me think that standardizing the directory separators as forward slashes (which both windows and linux support; but linux only permits forward slashes) is all that's required to fix this error. I don't know which part of the code would have these references though.

I'm going to look at the code repo, and if I find a fix, I'll submit a PR for it.
 
Okay I actually don't have the permissions to open PRs on the current repo, so I'll just post the candidates here, which are in the CvXMLLoadUtilitySet.cpp file:
  • Line 1855
  • Line 1870
  • Line 1938
  • Line 1953
They all attempt to read XML files using a backslash in the filename, which goes wrong on Linux. Changing those to Forward Slashes should fix it without interfering with behavior on Windows.

There might be more areas, but that's what stood out to me.
 
@Xirema: I'm definitely interested in fixing this. I've attached a DLL for you to test, with most backslashes in CvXMLLoadUtilitySet.cpp changed to forward slashes (some seemingly can't be replaced without causing errors...). It has assertions enabled to potentially get additional information on the bug. Please replace the old .dll file in your Assets directory (something like ".../Beyond the Sword/Mods/More Naval AI/Assets").
I'll say it would be a bit weird if that's the problem, since those lines all come from vanilla BtS, which you say works. Also, I'm assuming file system access through wine can normally handle backslashes (otherwise it would fail to run most software).
 

Attachments

@Xirema: I'm definitely interested in fixing this. I've attached a DLL for you to test, with most backslashes in CvXMLLoadUtilitySet.cpp changed to forward slashes (some seemingly can't be replaced without causing errors...). It has assertions enabled to potentially get additional information on the bug. Please replace the old .dll file in your Assets directory (something like ".../Beyond the Sword/Mods/More Naval AI/Assets").
I'll say it would be a bit weird if that's the problem, since those lines all come from vanilla BtS, which you say works. Also, I'm assuming file system access through wine can normally handle backslashes (otherwise it would fail to run most software).
1760276317804.png

Yeah, unfortunately your hypothesis is correct: the error message has the correct slashes, but it's still failing to find the file. So I guess that wasn't it.

I didn't get any additional error messages (beyond the ones I was normally getting), do you know if the assertions get logged somewhere/where I would find those?
 
View attachment 744832
Yeah, unfortunately your hypothesis is correct: the error message has the correct slashes, but it's still failing to find the file. So I guess that wasn't it.

I didn't get any additional error messages (beyond the ones I was normally getting), do you know if the assertions get logged somewhere/where I would find those?
Point of order that I just now thought about: I actually can't prove the specific problem is the application's ability to open/read the file. The root failure seems to occur here, in CvXMLLoadUtility.cpp:
1760280005997.png

That particular line at 373 is an opaque reference external to the code base available (at least to the best of my understanding), so I'm not sure how to dig into what that function may or may not be doing, and therefore what might be causing the failure.
 
Asserts are always shown with a popup.
That particular line at 373 is an opaque reference external to the code base available (at least to the best of my understanding), so I'm not sure how to dig into what that function may or may not be doing, and therefore what might be causing the failure.
The external code is in the .exe file. The XML processing code is always a nightmare to work with, because half of it is not accessible. From my experience, your error message could indeed be related to any problem with opening either the XML file, or even the associated Schema.

If you're motivated to do some more testing, here's some questions/suggestions:
  • Just to be sure: have you double-checked that the mod was installed correctly? Not sure what if the installer works with wine, but the archive should
  • What exactly happens when starting the game? You get the two error messages, then the program crashes?
  • Can you upload the contents of your log folder? ("<home>/Documents/My Games/Beyond the Sword/Logs/" for me)
  • Could you try deleting the file More Naval AI/Assets/XML/GameInfo/CIV4GameInfoSchema.xml? This will cause a bunch more errors that will probably crash the game again; but, we'll see if the game is now able to at least load the two files from your error messages.
  • You could also try deleting GameInfo/CIV4PlayerOptionInfos.xml. I doubt this file is the problem, since the other file (GraphicOptionInfos) isn't changed in either vanilla FfH or MNAI, and still shows an error.
  • If all this doesn't help, please try an older version of MNAI (https://forums.civfanatics.com/resources/more-naval-ai-ffh-mod.14499/history). If they work, the problem could be with my compilation process.
 
Asserts are always shown with a popup.

The external code is in the .exe file. The XML processing code is always a nightmare to work with, because half of it is not accessible. From my experience, your error message could indeed be related to any problem with opening either the XML file, or even the associated Schema.

If you're motivated to do some more testing, here's some questions/suggestions:
  • Just to be sure: have you double-checked that the mod was installed correctly? Not sure what if the installer works with wine, but the archive should
  • What exactly happens when starting the game? You get the two error messages, then the program crashes?
  • Can you upload the contents of your log folder? ("<home>/Documents/My Games/Beyond the Sword/Logs/" for me)
  • Could you try deleting the file More Naval AI/Assets/XML/GameInfo/CIV4GameInfoSchema.xml? This will cause a bunch more errors that will probably crash the game again; but, we'll see if the game is now able to at least load the two files from your error messages.
  • You could also try deleting GameInfo/CIV4PlayerOptionInfos.xml. I doubt this file is the problem, since the other file (GraphicOptionInfos) isn't changed in either vanilla FfH or MNAI, and still shows an error.
  • If all this doesn't help, please try an older version of MNAI (https://forums.civfanatics.com/resources/more-naval-ai-ffh-mod.14499/history). If they work, the problem could be with my compilation process.
So the way I did the install was to copy the directory containing the mod from the windows partition (where I can successfully boot the mod) into the linux partition and try to run it there. I did the same thing for FFH2, although I'll concede that if any part of the install process could go south, that would be a good candidate.

Describing the exact order of operations:
  1. I boot CIV4 Beyond the Sword, which was installed using steam on my linux partition
  2. After the game is loaded, I go to "Advanced" and Load the mod, named "More Naval AI"
  3. After waiting about 10 seconds, I get four pop-ups in a row.
    1. "Failed Loading XML File xml/GameInfo/CIV4GraphicOptionInfos.xml." (using the new dll you provided; only change is the directory separators)
    2. "LoadXML call failed for GameInfo/CIV4GraphicOptionInfos.xml."
    3. "Failed Loading XML File xml/GameInfo/CIV4PlayerOptionInfos.xml."
    4. "LoadXML call failed for GameInfo/CIV4PlayerOptionInfos.xml."
  4. Nothing past this point
On Linux, the directory where the logs are located are here: /home/[username]/.steam/steam/steamapps/compatdata/8800/pfx/drive_c/users/steamuser/Documents/My Games/Beyond the Sword/Logs, I've attached the logs although there's not much in there:

Spoiler Logs :

xml.log:
Code:
[2258.867] Loading XML file xml\GameInfo/CIV4PlayerOptionInfos.xml
[2258.878] Load XML file xml\GameInfo/CIV4PlayerOptionInfos.xml SUCCEEDED
[2258.878] SetGlobalClassInfo (Civ4PlayerOptionInfos/PlayerOptionInfos/PlayerOptionInfo)
[2258.879] Loading XML file xml\GameInfo/CIV4GraphicOptionInfos.xml
[2258.880] Load XML file xml\GameInfo/CIV4GraphicOptionInfos.xml SUCCEEDED
[2258.880] SetGlobalClassInfo (Civ4GraphicOptionInfos/GraphicOptionInfos/GraphicOptionInfo)

init.log:
Code:
[2274.535] DBG: CIV Init
[2274.535] VERSION: App: Z:\home\xirema\.local\share\Steam\steamapps\common\Sid Meier's Civilization IV Beyond the Sword\Beyond the Sword\Civ4BeyondSword.exe
[2274.536] VERSION: Build: Wed May 28 21:28:49 2014
[2274.536] VERSION: 3.1.9.0 (128100)
[2280.146] VERSION: Mod Loaded: Mods\More Naval AI\
[2280.157] DBG: FILE Cat Init

PythonErr2.log:
Code:
sys.path = ['..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\email', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\encodings', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\build', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\lib', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\py', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\tools', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\lib\\colourchooser', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\lib\\editor', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\lib\\floatcanvas', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\lib\\masked', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\lib\\mixins', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\lib\\ogl', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\af', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\ca', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\cs', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\da', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\de', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\el', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\es', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\eu', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\fi', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\fr', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\hi', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\hu', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\id', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\it', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\ja', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\lv', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\nb', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\nl', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\pl', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\pt_BR', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\ru', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\sl', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\sv', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\tr', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\uk', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\zh_CN', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\zh_TW', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\af\\LC_MESSAGES', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\ca\\LC_MESSAGES', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\cs\\LC_MESSAGES', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\da\\LC_MESSAGES', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\de\\LC_MESSAGES', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\el\\LC_MESSAGES', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\es\\LC_MESSAGES', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\eu\\LC_MESSAGES', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\fi\\LC_MESSAGES', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\fr\\LC_MESSAGES', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\hi\\LC_MESSAGES', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\hu\\LC_MESSAGES', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\id\\LC_MESSAGES', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\it\\LC_MESSAGES', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\ja\\LC_MESSAGES', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\lv\\LC_MESSAGES', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\nb\\LC_MESSAGES', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\nl\\LC_MESSAGES', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\pl\\LC_MESSAGES', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\pt_BR\\LC_MESSAGES', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\ru\\LC_MESSAGES', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\sl\\LC_MESSAGES', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\sv\\LC_MESSAGES', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\tr\\LC_MESSAGES', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\uk\\LC_MESSAGES', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\zh_CN\\LC_MESSAGES', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\locale\\zh_TW\\LC_MESSAGES', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\py\\tests', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\tools\\XRCed', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM\\wx\\tools\\XRCed\\src-images', '..\\WARLORDS\\ASSETS\\PYTHON\\SYSTEM']

sys.modules = {'zipimport': <module 'zipimport' (built-in)>, 'signal': <module 'signal' (built-in)>, '__builtin__': <module '__builtin__' (built-in)>, 'sys': <module 'sys' (built-in)>, '__main__': <module '__main__' (built-in)>, 'exceptions': <module 'exceptions' (built-in)>, 'CvPythonExtensions': <module 'CvPythonExtensions' (built-in)>}

sys.builtin_module_names = ('CvPythonExtensions', '__builtin__', '__main__', '_bisect', '_codecs', '_codecs_cn', '_codecs_hk', '_codecs_iso2022', '_codecs_jp', '_codecs_kr', '_codecs_tw', '_csv', '_heapq', '_hotshot', '_locale', '_multibytecodec', '_random', '_sre', '_subprocess', '_symtable', '_weakref', '_winreg', 'array', 'audioop', 'binascii', 'cPickle', 'cStringIO', 'cmath', 'collections', 'datetime', 'errno', 'exceptions', 'gc', 'imageop', 'imp', 'itertools', 'marshal', 'math', 'md5', 'mmap', 'msvcrt', 'nt', 'operator', 'parser', 'regex', 'rgbimg', 'sha', 'signal', 'strop', 'struct', 'sys', 'thread', 'time', 'xxsubtype', 'zipimport')
load_module CvEventInterface
load_module CvUtil
load_module traceback
load_module CvEventManager
load_module CvScreensInterface
load_module CvMainInterface
load_module ScreenInput
load_module CvScreenEnums
load_module time
load_module CvDomesticAdvisor
load_module CvTechChooser
load_module CvForeignAdvisor
load_module math
load_module CvExoticForeignAdvisor
load_module IconGrid
load_module DomPyHelpers
load_module PyHelpers
load_module TechTree
load_module re
load_module CvMilitaryAdvisor
load_module CvFinanceAdvisor
load_module CvReligionScreen
load_module CvCorporationScreen
load_module CvCivicsScreen
load_module string
load_module CvVictoryScreen
load_module CvEspionageAdvisor
load_module CvOptionsScreen
load_module CvReplayScreen
load_module CvHallOfFameScreen
load_module CvDanQuayle
load_module CvGameUtils
load_module CvUnVictoryScreen
load_module CvDawnOfMan
load_module CvTechSplashScreen
load_module CvTopCivs
load_module random
load_module CvInfoScreen
load_module CvIntroMovieScreen
load_module CvVictoryMovieScreen
load_module CvWonderMovieScreen
load_module CvEraMovieScreen
load_module CvSpaceShipScreen
load_module CvPediaMain
load_module CvPediaScreen
load_module CvScreen
load_module CvPediaTech
load_module CvPediaUnit
load_module CvPediaBuilding
load_module CvPediaPromotion
load_module CvPediaUnitChart
load_module CvPediaBonus
load_module CvPediaTerrain
load_module CvPediaFeature
load_module CvPediaImprovement
load_module CvPediaCivic
load_module CvPediaCivilization
load_module CvPediaLeader
load_module CvPediaSpecialist
load_module CvPediaHistory
load_module CvPediaProject
load_module CvPediaReligion
load_module CvPediaCorporation
load_module CvWorldBuilderScreen
load_module Popup
load_module CvWorldBuilderDiplomacyScreen
load_module CvDebugTools
load_module CvDebugInfoScreen
load_module CvMapGeneratorUtil
load_module CvGFCScreen
load_module CvPopupInterface
load_module CvScreenUtilsInterface
load_module CvScreenUtils
init-ing world builder screen
load_module CvWBPopups
load_module CvCameraControls
load_module CvAdvisorUtils
PY:OnInit
load_module CvAppInterface


I'll make a few attempts to start the game again following those suggestions of deleting/moving those files later, this was all I had time to look into today.
 
  • Could you try deleting the file More Naval AI/Assets/XML/GameInfo/CIV4GameInfoSchema.xml? This will cause a bunch more errors that will probably crash the game again; but, we'll see if the game is now able to at least load the two files from your error messages.
Alright, so speaking as someone who has quite a lot of professional software development experience, I really don't like what I'm about to write here.

But this worked.

Deleting that file (or, more precisely, renaming it as CIV4GameInfoSchema.xml.bkup not only got MNAI to boot, but I was able to start a game. It looks a little funny, probably because Linux doesn't have the same Font Smoothing algorithm that Windows has, but as far as I can tell the game is functional.

From looking at the actual contents it doesn't seem like that file has any FFH2 or MNAI-specific data, so I don't know how essential it is. I also haven't spent more than 5 minutes in-game, so if there's something that's going to crash half an hour or half a day later, I don't know about it.

But at least right at this moment, somehow, that file was blocking the game from loading, and removing it allows the game to fully boot.
1760665291549.png
 
Well, my excitement has waned lmao

The game has not crashed... yet... But the civics are completely fudged. The evidence became clear very quickly when I discovered that every city in the game was undergoing revolution at the same time on turn 15, because every city was gaining +100 revolution index per turn (which appears to be the per-turn cap).

Also, my previous claim that the file didn't have any changes is unsubstantiated. I ran a comparison between the file in MNAI and FFH2 and found at least a few differences.

But maybe that substantiates the idea that the problem might be with that file specifically?

Bad Civics.png
1760667667795.png
 
Oh, and to round off the other troubleshooting ideas:
  • Deleting CIV4PlayerOptionInfos.xml did not fix the issue
  • The last version of the "official" More Naval AI modmod, version 2.71, works properly (or at least seems to).
 
Back
Top Bottom