Warlords vs BTS python

Ekmek

on steam: ekmek_e
Joined
Aug 7, 2002
Messages
6,115
Location
San Diego, California
I triedconverting a warlords mod over to BTS. All the xml work is done and when it loads everythingis fine. But just as its about to start up the game crashes. I assumed that warlords python should work for BTS. I guess I waswrong, so I believe its the python interface according to the logs. Is there anything I should look out for? Would posting log or python files help? thanks in advance.
 
Definitely post the log or at least the part that shows the error relevant to this problem. Somebody should be able to help you then. If you don't have Python error reporting turned on, you might want to do that also. To turn on error reporting, open the BTS config file and look for this:

; Set to 1 for no python exception popups
HidePythonExceptions = 1

and change it to this.

; Set to 1 for no python exception popups
HidePythonExceptions = 0

After you do this you will probably get a popup with some error information when running the mod.
 
Thnaks Tso,

That definetely generated some popu-ups:

Code:
Traceback (most recent call last):
  File "<string>", line 1, in ?
  File "<string>", line 52, in load_module
  File "CvEventInterface", line 17, in ?
  File "CvBarbarianEventManager", line 33, in __init__
  File "CvEventManager", line 163, in __init__
AttributeError: 'module' object has no attribute 'EventShowWonder'

For the record I'm trying to convert some Warlords Firaxis Mods to BTS. This was my first attempt and I was trying it with the Barbarian Mod. I did all the xml work (and added a new barbarian leaderhead). But I have this python (or something) problem. Fortunately the mod is small so I RAR'd it and attached it here. Thanks for the help.

EDIT: attachment removed
 
Your'e porting "Barbarians" to BtS?:eek:

I love that mode, nothing like laying waste to all civilization and destroy rather than create. You have to tell me when this is done!!!
 
The error occurs because the CvUtil file in the mod doesn't have the attribute "EventShowWonder". If you save the mod's version of CvUtil.py somewhere else then copy the BTS version of the file into the Barbarian\Assets\Python folder, the error should go away. Unfornately the file was probably placed there by the mod designers because they made some changes in it. I took a real quick look through the file and didn't see any obvious changes with commets added. You may have to look at a standard Warlord CvUtil file and compare it to the mod file to find out what they changed. Or, you could just copy the missing item from the BTS file into the mod file. however there might be some other objects missing also.
 
Okay so I found thta the only difference between the barbarian/civutil.py and the warlords/civutil.py was:

Code:
EventBarbarianLaunch = 5012

So I added that into the BTS/Civutil.py that I used to replace in my barbarian mod's python folder. I still get the crash and it asks for a dump.

Attached is the barbarian mod with the updated Civutil.py

still don't know why it crashes and now the logs say nothing.

Thanks for the help.

EDIT: attachment removed
 
Do I understand the sequence of events correctly?

  1. Initial port lead to Python exception in PythonErr.log
  2. Modified CvUtil to add single missing line from BTS
  3. Mod now crashes to desktop with no Python error
A CTD usually means an XML problem or problem with the DLL. Since you're using the stock BTS DLL, the latter seems unlikely. But that you were making it past loading the XML initially and getting to the Python code make the former seem equally unlikely.

I'm stumped. :confused: I'll see if I can run it this weekend, but I'm pretty busy until next week.
 
It looks like the lockup is caused by XML\Art\CIV4ArtDefines_Interface.xml. If you remove that file the lockup will go away. There is another problem that occurs once you get past the Barbarian game length menu so you will have to look into that also. I suspect that the second problem may have something to do with artwork also. Art problems tend to make the game lockup.
 
Thanks General TSO, that got me in the right dection. I fixed that problem and then found that no matter what I did it wouldn't modularly load (Python issue?). Its like it ignores that part of a BTS ini file.

So I didn' make it modular. It loads up a normal game fine, but I cant force the worldBuildsave. I converted the Warlords one with mod to a BTS WBsave using
Gr3yhound's Map editor program.

When it does I get these errors:

Spoiler :


If I make the ini not force the scenario, the game starts and seems to play fine (I did a pangea map) but the foreign advisor/horde screen calls up these errors:

Spoiler :


Well for those following here is the mod a sit stands now. Without the forcing. Seems playable (even though it throws up errors).

THANKS FOR THE HELP!
 
That worldbuildersave file is just for menu purposes. I have no idea how Firaxis made it work because an attempt on my part to duplicate the process for a different mod failed.

i guess i can exclude it, it didn't appear to force any particular map. Plus looking at it in Mapview it was just on big black screen, o i think it generates randomly.

Anyone have ideas on the foreign advisor screen? I'll look later today or tomorrow and compare pythons but the screen is supposed to be different
 
The second error is because the signature of the isPromotionValid() function has changed: the boolean that was added is bLeader. Pass in False if you want to block promotions only available to units lead by a GG (Medic3, Leadership, Morale, etc).
 
I forgot to mention that removing CIV4ArtDefines_Interface.xml may have removed some of the mod's custom features like main menu screens or the loading screen. You might want to try and get them back into the mod if they existed in the first place.
 
If you don't have a good diff/merging tool already, I suggest getting the free WinMerge. You can compare entire folder hierarchies file-by-file from the Windows Explorer: select both folders, right-click and select WinMerge.

You could then compare the Warlords and BTS versions of the ArtDefines file to see what is needed and what isn't.
 
Top Bottom