Better BAT AI

I'm getting some errors in the logging can anyone help?
Don't know about the audio log and LSystem; in the other two log files (Python, XML), the only thing that looks worrisome to me are the
info type UNIT_MIXED_... not found
messages at the end. Well, the XML log is almost impossible to read due to all the "info type NONE not found" messages; that's a bit of a problem in its own right. BtS without mods will also produce those messages, just not quite as many. The log messages can only be suppressed through a DLL change; specifically, in CvGlobals::getInfoTypeForString, it says:
FAssertMsg(strcmp(szType, "NONE")==0 || strcmp(szType, "")==0, szError.c_str());
gDLL->logMsg("xml.log", szError);
I.e. no failed-assertion popup is shown for type string "NONE", but the log output is generated in any case.
 
Errors in the logging are one thing, but are you getting errors in the game?
 
I just did a clean install of Civ4 and the 319, checked the logs and im getting errors as I'm not loading things it seems or if I'm wrong and everything is correct I will install BBATAI from there and check the logs and see if everything is ok
 

Attachments

  • Logs.rar
    7.5 KB · Views: 57
Last edited:
This second batch of logs is as uneventful as it gets. Haven't checked line for line, but I think I'm getting pretty much the same. PythonErr.log is really the only one that should be empty when all is well. (Whereas PythonErr2.log is, I believe, only written from compiled Python code in the Warlords folder. I don't think anything interesting can ever appear there.)

Also, in your Better BAT AI logs for Python and XML, I don't see anything explicitly labeled as an error or even a warning. It should be possible to make the PythonDbg.log less verbose by setting
fileLogLevel = WARN
(instead of ...=DEBUG) in Assets\Python\BUG\BugUtil.py.
 
yeah thats what i had basically happen was a few warns in the resmgr and then my game continued to crash repeatedly and mainly the reason for a nice new clean in :) the game actually ran nice until 1945.

Lemon as the game continued crashing I believed it was one of the mods I added as I no pro but the thing was it keep crashing no matter how I changed things, before 1946 hit, I even Tried going back eariler in my saves but it it continued I did have 1 screen that came up a few times about C++ as I was loading my saves and continuing to try to see if it was one of the mods I added that was the problem so I kinda blew over it. :(
 
if it helps I'm going to upload the files I changed and added, in case that couldve been the problem. I do have a question, why am I having a problem added a civilization to BBATAI, I understand changing the schemas and making sure the new civ has the extra lines in the xml along with the new leader but I'm having trouble with the UB but everything else was fine. Also uploading the first logs of BBATAI after they are in the mods folder incase thats where the problem is starting
 

Attachments

  • modded python.rar
    20.7 KB · Views: 53
  • HockeyRink.rar
    71 KB · Views: 55
  • Logs same For both zippedsORinstalled on 1st load.rar
    14.6 KB · Views: 46
Last edited:
@KrisButtar The added civs for BBATAI must be modular (they go in the Modules folder). Just look at how the Varietas Delectat info is added and you will get the idea (I think). Otherwise just post back and we'll try to help.
 
Awesome I appreciate the help:) I had it done modules/custom civilizations/canada/leader folders, UU folder, UB folder. I couldnt get that hockey rink to work, the rest did to my knowledge but was thinking maybe that was the reason the game kept crashing as I couldnt get it to work and I do remember seeing an error about the Hockey_rink_civ4artdefine.xml. Well I.m starting fresh and I'll start with canada, then the tech by conquest followed by the ai auto, change player, tester and I'll be back where I was :)
 
I've taken a look. The AI Auto Play module is not registered with the BUG event manager. BBAI does this in a file named CvCustomEventManager.py – looks like that file hasn't been merged into Better BAT AI. To remedy this, it should suffice to
import AIAutoPlay
in Assets\Python\BUG\BugEventManager.py and to add the line
AIAutoPlay.AIAutoPlay(g_eventManager)
to the configure function in the same file. May want to put a
if getChtLvl():
check in front to make AI Auto Play unavailable when playing without cheats.
The ChangePlayer component (Ctrl+Shift+P, Ctrl+Shift+L) has the same problem and can be fixed in the same way:
import ChangePlayer
plus
ChangePlayer.ChangePlayer(g_eventManager)
This is all based on how K-Mod integrates the BBAI modules – and I've done a quick test in Better BAT AI.


What line exactly is the AIAutoPlay.AIAutoPlay(g_eventManager) added or can an example of the lines above and below be wrote out? I'm kind of guessing and been getting errors in what I think is the configure function
 
@KrisButtar: I'm attaching my version of BugEventManager.py, changes tagged with comments that say:
<f1rpo> ... </firpo>
 

Attachments

  • BugEventManager_f1rpo.zip
    5.6 KB · Views: 61
Thank you, that's awesome of you. Hmmm that's how I had it for one of my attempts but control+shirt+X doesn't do anything, just tried replacing my own BUGEventManager with yours and Control+Shift+X didn't bring up the window either. I tried changing the cheatcode from a 0 to a 1 for the BTS Civilization.ini as well, added that option directly to the BBATAI.ini and didn't work. Not sure what I'm missing?

Also should I be edit and use the CvAltRoot by cut/paste it into my Assets/Python folder?

Figured out a lot of my audio files are files that are in the sound folder in the civ4 base game and warlords, any idea on how to fix this?
 
Last edited:
I tried changing the cheatcode from a 0 to a 1 for the BTS Civilization.ini as well, added that option directly to the BBATAI.ini and didn't work. Not sure what I'm missing?
The cheat code in CivilizationIV.ini (in My Games\Beyond the Sword) would have to be:
CheatCode = chipotle
I don't think it has any effect in the mod's ini file.
(Or you could just remove the getChtLvl check.)
Also should I be edit and use the CvAltRoot by cut/paste it into my Assets/Python folder?
Not sure, but, so far, it doesn't sound to me like BUG is unable to locate files on your end.
Figured out a lot of my audio files are files that are in the sound folder in the civ4 base game and warlords, any idea on how to fix this?
I would assume(?) that audio files, as well as most other files, are loaded from all three folders (base game, Warlords, BtS).
 
Audio files are loaded from the base game folders, unless the mod has special audio files. BBATAI does not, unless you install the Modern Era Expansion pack.
 
The cheat code in CivilizationIV.ini (in My Games\Beyond the Sword) would have to be:
CheatCode = chipotle
I don't think it has any effect in the mod's ini file.
(Or you could just remove the getChtLvl check.)
Not sure, but, so far, it doesn't sound to me like BUG is unable to locate files on your end.
I would assume(?) that audio files, as well as most other files, are loaded from all three folders (base game, Warlords, BtS).

OK that clears that up, I figured I was missing something thank you. Also I tried removing the getchtlvl, so it basically went "

# <f1rpo> From K-Mod
if AIAutoPlay.AIAutoPlay(g_eventManager)
ChangePlayer.ChangePlayer(g_eventManager)
# </f1rpo>

but it didnt work, I dont mind using the chipotle for faster game testing. I'm Glad it works now and thank you

Audio files are loaded from the base game folders, unless the mod has special audio files. BBATAI does not, unless you install the Modern Era Expansion pack.

Yeah the audio problem basically is the AS3D_UN_AMAZON_SELECTION_VOX of TagId 4, AS3D_UN_AMAZON_ACTION_VOX of TagId 4 which the XMLs and sounds in the main files and are in the module Female and in the FUNIT.FPK. Should I delete XML and the extra audio file in the FPK and repack it, as I read it was only read for art stuff or should I leave it? Also sometimes I get the error "Could not find string AS2D_BUILD_GROCERY of TagId 3"
 
OK that clears that up, I figured I was missing something thank you. Also I tried removing the getchtlvl, so it basically went [...]
Good that this issue is at least resolved. For the record, to remove the cheat level check, the "if" and indentation after it would have to be removed as well. The code you've posted isn't syntactically correct, so there should've been an error message in PythonErr.log hinting at the problem (and also an error popup with HidePythonExceptions = 0 in CivilizationIV.ini).
 
Just getting back into Civ 4. I hope this is the correct spot for this. Have installed Better Bat AI and have a couple of questions on the Foreign Advisor Screen.

1. On the Relations Tab there is a series of words on the left of the screen (Hide Vassals, Hide Team Members, Contacts, War etc.). To the left of each word is a small button. Is it supposed to serve a purpose? When I click it X's out but doesn't seem to accomplish anything.
2. On the Glance Tab what are the percentages given? The numbers and percent's both are colored. Is there a significance to this coloring? In the Bug Mod Options under Advisors there is a choice for the Glance Tab to show Numbers, Smilies or Both. This doesn't seem to do anything as I always see numbers.
3. Finally on many of the screens there is an overall number representing the attitude of the foreign leader. The number obviously is the sum of the negative and positive occurrences that have had an influence on this leader. My question is how does this number correspond to the five attitudes a leader will have (in order I think Friendly, Pleased, Cautious, Annoyed, and Furious?). On my Glance Screen I have two leaders with a +3 attitude, but one is Cautious, and the other is Pleased. Obviously, I am missing something, and I feel it is somehow tied to that percentage that I do not understand.

Thanks for any help
Jack
 
Does this have the same odd Civilization Flag edits (Non-Vanilla) as normal Bat Mod? And if so how do I revert them back to Vanilla Civ IV?
 
Top Bottom