1. We have added the ability to collapse/expand forum categories and widgets on forum home.
    Dismiss Notice
  2. Photobucket has changed its policy concerning hotlinking images and now requires an account with a $399.00 annual fee to allow hotlink. More information is available at: this link.
    Dismiss Notice
  3. All Civ avatars are brought back and available for selection in the Avatar Gallery! There are 945 avatars total.
    Dismiss Notice
  4. To make the site more secure, we have installed SSL certificates and enabled HTTPS for both the main site and forums.
    Dismiss Notice
  5. Civ6 is released! Order now! (Amazon US | Amazon UK | Amazon CA | Amazon DE | Amazon FR)
    Dismiss Notice
  6. Dismiss Notice
  7. Forum account upgrades are available for ad-free browsing.
    Dismiss Notice

Can I use the BUG mod? YES!

Discussion in 'Civ4 - Macintosh' started by Virtual Alex, Aug 10, 2009.

  1. AlanH

    AlanH Mac addict, php monkey Moderator Supporter GOTM Staff

    Joined:
    Jan 9, 2003
    Messages:
    28,765
    Gender:
    Male
    Location:
    England
    I'm on the latest version of Warlords. I suspect the problem is one of those Python 2.4 issues. You may recall that when we were working on BUG and BUFFY for the Mac, we had to deal with several Python incompatibilities because Civ4 for Mac ships with an old version of Python embedded?

    I already had to fix several bits of Ruff's code that were Windows-specific - winreg references and directory path concatenation that assumes Windows "\" delimiters. As a general rule, it's better to use os.path.join() to build file paths rather than just 'xxxx'+'\yyyyy'.
     
  2. Ramesses-Rules

    Ramesses-Rules Chieftain

    Joined:
    Nov 27, 2008
    Messages:
    837
    Location:
    Sequim, WA
    That is sad news. What I need now is to beg or bribe somebody to create a version of BUG than runs Warlords on Mac. How hard would that be for somebody who knows what they're doing? Certainly not me!:D
     
  3. AlanH

    AlanH Mac addict, php monkey Moderator Supporter GOTM Staff

    Joined:
    Jan 9, 2003
    Messages:
    28,765
    Gender:
    Male
    Location:
    England
    What's the big deal with Warlords? Surely buying BtS is not as expensive as the notional cost of the time you are asking someone to spend on your behalf converting BUG for Warlords?
     
  4. Ramesses-Rules

    Ramesses-Rules Chieftain

    Joined:
    Nov 27, 2008
    Messages:
    837
    Location:
    Sequim, WA
    Good question. I have been playing Warlords for years. I have a lot of fun with it. I have never tried BTS, but I can see from reading the forum that it plays quite differently than Warlords. If I finally get over the hump and win a few times on Immortal level, I may give it a try.:)
     
  5. awilder

    awilder Chieftain

    Joined:
    Jan 18, 2009
    Messages:
    240
    Location:
    Cali
    Hi, I just got the complete CiV IV pack on Steam (for mac) and I tried installing BUG 4.4, but I get no interface in any game I start. Here's the log file:

    Spoiler :

    Traceback (most recent call last):
    File "<string>", line 1, in ?
    File "<string>", line 52, in load_module
    File "CvEventInterface", line 17, in ?
    File "<string>", line 52, in load_module
    File "BugEventManager", line 572, in ?
    File "BugEventManager", line 566, in hookupPreGameStartEvent
    File "BugUtil", line 699, in extend
    TypeError
    :
    readonly attribute

    Failed to load python module CvEventInterface.
    ERR: Call function onEvent failed. Can't find module CvEventInterface
    ...
    (snip)
    ...
    File "CvAppInterface", line 70, in preGameStart

    File "CvScreensInterface", line 83, in showTechChooser

    File "CvTechChooser", line 231, in interfaceScreen

    File "CvTechChooser", line 243, in ConstructTabs

    File "CvTechChooser", line 280, in DrawTechChooser

    File "CvTechChooser", line 324, in placeTechs

    AttributeError: type object 'CvPythonExtensions.WidgetTypes' has no attribute 'WIDGET_TECH_CHOOSER_ERA'
    ERR: Python function preGameStart failed, module CvAppInterface
    ERR: Call function onEvent failed. Can't find module CvEventInterface


    If anyone has any ideas I'd really appreciate it!


    EDIT: two more bits of info that might be helpful
    1) the first thing that happens when I start a game is that the technology advisor window opens and is empty (no pic of leader etc)
    2) the same problem occurs if I try to use BUG as a mod
     
  6. s.bernbaum

    s.bernbaum Mostly lurking

    Joined:
    Dec 2, 2006
    Messages:
    2,626
    Location:
    The wilds of Montana
    There is one line in the python file that must be edited out because it does nothing on a Mac but will crash the program.
    Quoting Alan H:

    The location that Alan gives is for the standard install. Steam puts the files elsewhere but it sounds like you know where to find them.

    Of course, you can just find the file in the unzipped package before installing it and edit it there, which is what I did. I have been using BUG 4.4 for a long time now, having installed it in CustomAssets. The CustomAssets approach has the added benefit of you not having to put it in the place where Steam puts the mods.

    The weird start you are getting is typical of those caused by the un-edited-for-Mac BUG. Try this. If it does not work or you have already done this, post again.
     
  7. EmperorFool

    EmperorFool Chieftain

    Joined:
    Mar 2, 2007
    Messages:
    9,633
    Location:
    Mountain View, California
    Thanks, s.bernbaum. That's exactly what needs to be done.
     
  8. Skytha

    Skytha Chieftain

    Joined:
    Feb 9, 2009
    Messages:
    11
    Location:
    Peru
    I'm currently running JARM and tried to install BUG - removed the problematic XML line but was still having trouble with the interface not showing up and the blank tech advisor screen on load. I unloaded JARM and BUG seems to be working like a charm but I'm hoping there's some way to reconcile both. I'm really tired of being a Jewish Mayan or a Hindu Celt! I noticed someone was merging the two but it doesn't seem to be a public project. Might anyone know what the conflict is, and if it can be fixed?

    I get this message upon starting a game: BugInit - Cannot find XML file for ModInit

    I'm running OSX Snow Leopard
    3.19 BTS
    4.4 BUG
    The latest JARM (can't remember version)

    My error logs:
    View attachment PythonDbg.txt

    View attachment PythonErr.txt
     
  9. AlanH

    AlanH Mac addict, php monkey Moderator Supporter GOTM Staff

    Joined:
    Jan 9, 2003
    Messages:
    28,765
    Gender:
    Male
    Location:
    England
    I don't know JARM, and I have never tried to combine BUG with another mod, but your PythonDbg.txt file contains a couple of significant lines:


    12:19:58 DEBUG: BugPath - not a file: '/Users/Gwytherinn/Documents/Civilization IV Beyond the Sword/Mods/JARM/Assets/Config/init.xml'
    12:19:58 DEBUG: BugPath - not a file: '/Users/Gwytherinn/Library/Application Support/Steam/SteamApps/common/sid meier's civilization iv beyond the sword/Beyond the Sword/Assets/Config/init.xml'
    12:19:58 WARN : BugPath - cannot find asset file init.xml in Config
    12:19:58 ERROR: BugInit - cannot find XML file for mod init

    The BUG mod is looking for its init.xml file. It looks as if it expects to find it in the main BtS data folder, or inside JARM. This is strange, as on my system it is in ~/Documents/Civilization IV Beyond the Sword/MODS/BUGMod_4.4/Assets/Config. The Config folder is normally created automatically when BUG first runs, so I think there is a problem with interaction between JARM and BUG. Have you checked with the BUG development team?
     
  10. Xyth

    Xyth History Rewritten

    Joined:
    Jul 14, 2004
    Messages:
    3,834
    Location:
    Aotearoa
    My guess is that you've tried to merge BUG into JARM, it would actually be much easier to do it the other way around. BUG is more complicated than pretty much any other non SDK mod component out there so its always best to use it as the base.

    Unfortunately BUG and JARM are not trivial to merge, not because of Python or XML quirks, but because they both have customised gamefont files that need to be combined. These are .tga files found in /Assets/Res/ and are notoriously difficult to work with. One pixel out of place in the invisible alpha channel can break or even crash your mod. There's a great Gamefont Editor available that simplifies the process immensely, but it's Windows only. I had no luck getting it to work via WINE but it runs fine under virtualization (Fusion/Parallels/etc) if have you such an option. You'll need to do some reading on how the gamefont files work though; even with the editor they're tricky wee beasties that many modders avoid when possible.
     
  11. Skytha

    Skytha Chieftain

    Joined:
    Feb 9, 2009
    Messages:
    11
    Location:
    Peru
    Hi Alan and Xyth (Hey, I downloaded your mod! I haven't tried it yet though.) thanks a lot for taking a look and giving me some feedback - I really appreciate it. I think for now I'll just use JARM, the effort to merge the two is definitely not something I can take on at the moment. Maybe I'll crosspost this in one of the BUG threads and see what they say.

    PS - I put JARM in the mods folder and set it to load automatically. I put BUG in the custom assets folder so that it would load automatically as well. No effort to merge.
     
  12. yanner39

    yanner39 Chieftain

    Joined:
    Sep 17, 2008
    Messages:
    1,382
    Location:
    Ottawa, Canada
    This is possibly a dumb question. I got a new PC today. I installed Civ4, BTS, patched it to 3.19, installed BUG 4.4 and I and trying to install BULL. I'm following the directions to copy the CvGameCoreDLL.dll (change the name of the original and then try and copy the new one). Windows asks for permission so I put my password. I see it copy but the file is nowhere to be seen in the folder. It's like it doesn't want to copy.

    Anything thoughts?

    Thanks.
     
  13. AlanH

    AlanH Mac addict, php monkey Moderator Supporter GOTM Staff

    Joined:
    Jan 9, 2003
    Messages:
    28,765
    Gender:
    Male
    Location:
    England
    Why are you posting this in the Mac forum?
     
  14. yanner39

    yanner39 Chieftain

    Joined:
    Sep 17, 2008
    Messages:
    1,382
    Location:
    Ottawa, Canada
    Hi AlanH

    Yeah my mistake. Sorry about that. Will repost in correct forum.
     
  15. Bacon Maker

    Bacon Maker Chieftain

    Joined:
    Jul 22, 2009
    Messages:
    10
    I keep getting a crash to desktop after installing the BUG Mod to my applications/Civilization IV/BtS/Mods folder. I deleted line 699 from the python file as directed. I edited the .ini to launch the BUG Mod by default. The crash happens rarely or not at all during the early game, but it increases in frequency as the game progresses.

    Would it be better if I installed the mod to custom assets? I had tried to do this but after following all the directions in the read me, the game would launch in vanilla BtS mode. No idea what I did wrong. Perhaps I need idiot-proof instructions on how to install to custom assets.

    Here's the most recent crash report:

    Spoiler :
    Process: Civilization IV Beyond the Sword [50497]
    Path: /Applications/Civilization IV/Beyond the Sword/Civilization IV Beyond the Sword.app/Contents/MacOS/Civilization IV Beyond the Sword
    Identifier: com.aspyr.civ4bts
    Version: 3.19 (92131)
    Code Type: X86 (Native)
    Parent Process: launchd [500]

    Date/Time: 2012-05-05 13:09:36.505 -0700
    OS Version: Mac OS X 10.6.8 (10K549)
    Report Version: 6

    Interval Since Last Report: 277895 sec
    Crashes Since Last Report: 5
    Per-App Interval Since Last Report: 58447 sec
    Per-App Crashes Since Last Report: 5
    Anonymous UUID: D9B6B02D-12AE-4DFE-8D99-97F4A03A3C13

    Exception Type: EXC_BAD_ACCESS (SIGSEGV)
    Exception Codes: KERN_INVALID_ADDRESS at 0x00000000b258f000
    Crashed Thread: 4

    Thread 0: Dispatch queue: com.apple.main-thread
    0 libSystem.B.dylib 0x93b8caa2 __semwait_signal + 10
    1 libSystem.B.dylib 0x93b8c75e _pthread_cond_wait + 1191
    2 libSystem.B.dylib 0x93b8e3f8 pthread_cond_wait$UNIX2003 + 73
    3 GLEngine 0x53aec405 gleFinishCommandBufferPTHREAD + 265
    4 GLEngine 0x53a8021d glDeleteTextures_ExecThread + 33
    5 libGL.dylib 0x9488b4d0 glDeleteTextures + 38
    6 com.aspyr.civ4bts 0x0007091b IDirect3DDevice_Mac::MacDeleteTexture(unsigned long) + 117
    7 com.aspyr.civ4bts 0x0006c9a5 IDirect3DBaseTexture_Mac::~IDirect3DBaseTexture_Mac() + 161
    8 com.aspyr.civ4bts 0x000871f2 IDirect3DTexture_Mac::~IDirect3DTexture_Mac() + 160
    9 com.aspyr.civ4bts 0x0008e603 IUnknown_Mac::Release() + 29
    10 com.aspyr.civ4bts 0x005fb472 FFileWriter::WriteDDS(char const*, NiTexture*, unsigned int, unsigned int, unsigned int) + 768
    11 com.aspyr.civ4bts 0x005fb4b9 FFileWriter::WriteTGA(char const*, NiTexture*) + 55
    12 com.aspyr.civ4bts 0x00ac9431 CvEngine::render() + 1389
    13 com.aspyr.civ4bts 0x00a920a9 CvApp::OnIdle() + 1743
    14 com.aspyr.civ4bts 0x0066ea41 FWinApp::Run() + 31
    15 com.aspyr.civ4bts 0x00b1ee52 WinMain + 50
    16 com.aspyr.civ4bts 0x000a7f99 sEventLoopEventHandler(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*) + 111
    17 com.apple.HIToolbox 0x90745c2f DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) + 1567
    18 com.apple.HIToolbox 0x90744ef6 SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*) + 411
    19 com.apple.HIToolbox 0x90744d55 SendEventToEventTargetWithOptions + 58
    20 com.apple.HIToolbox 0x90779a24 ToolboxEventDispatcherHandler(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*) + 3006
    21 com.apple.HIToolbox 0x90746080 DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) + 2672
    22 com.apple.HIToolbox 0x90744ef6 SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*) + 411
    23 com.apple.HIToolbox 0x907677f3 SendEventToEventTarget + 52
    24 com.apple.HIToolbox 0x908f0c17 ToolboxEventDispatcher + 86
    25 com.apple.HIToolbox 0x908f0d4f RunApplicationEventLoop + 243
    26 com.aspyr.civ4bts 0x000a8052 InstallEventsAndRunGameLoop() + 166
    27 com.aspyr.civ4bts 0x000a83ea main + 356
    28 com.aspyr.civ4bts 0x00002642 _start + 216
    29 com.aspyr.civ4bts 0x00002569 start + 41

    Thread 1: Dispatch queue: com.apple.libdispatch-manager
    0 libSystem.B.dylib 0x93b85382 kevent + 10
    1 libSystem.B.dylib 0x93b85a9c _dispatch_mgr_invoke + 215
    2 libSystem.B.dylib 0x93b84f59 _dispatch_queue_invoke + 163
    3 libSystem.B.dylib 0x93b84cfe _dispatch_worker_thread2 + 240
    4 libSystem.B.dylib 0x93b84781 _pthread_wqthread + 390
    5 libSystem.B.dylib 0x93b845c6 start_wqthread + 30

    Thread 2:
    0 libSystem.B.dylib 0x93b5eb5a semaphore_timedwait_signal_trap + 10
    1 libSystem.B.dylib 0x93b8c6e1 _pthread_cond_wait + 1066
    2 libSystem.B.dylib 0x93bbb5a8 pthread_cond_timedwait_relative_np + 47
    3 ...ple.CoreServices.CarbonCore 0x94a8db90 TSWaitOnConditionTimedRelative + 242
    4 ...ple.CoreServices.CarbonCore 0x94a8d8ce TSWaitOnSemaphoreCommon + 511
    5 ...ickTimeComponents.component 0x93063965 ReadSchedulerThreadEntryPoint + 4698
    6 libSystem.B.dylib 0x93b8c259 _pthread_start + 345
    7 libSystem.B.dylib 0x93b8c0de thread_start + 34

    Thread 3:
    0 libSystem.B.dylib 0x93b5eb5a semaphore_timedwait_signal_trap + 10
    1 libSystem.B.dylib 0x93b8c6e1 _pthread_cond_wait + 1066
    2 libSystem.B.dylib 0x93bbb5a8 pthread_cond_timedwait_relative_np + 47
    3 com.apple.audio.CoreAudio 0x960813ab CAGuard::WaitFor(unsigned long long) + 219
    4 com.apple.audio.CoreAudio 0x960843dd CAGuard::WaitUntil(unsigned long long) + 289
    5 com.apple.audio.CoreAudio 0x96081cda HP_IOThread::WorkLoop() + 1892
    6 com.apple.audio.CoreAudio 0x96081571 HP_IOThread::ThreadEntry(HP_IOThread*) + 17
    7 com.apple.audio.CoreAudio 0x96081488 CAPThread::Entry(CAPThread*) + 140
    8 libSystem.B.dylib 0x93b8c259 _pthread_start + 345
    9 libSystem.B.dylib 0x93b8c0de thread_start + 34

    Thread 4 Crashed:
    0 libSystem.B.dylib 0xffff088c __memcpy + 236
    1 com.apple.GeForceGLDriver 0x8f175779 glrCompExecuteKernel + 555497
    2 com.apple.GeForceGLDriver 0x8f1d44bd gldModifyTexSubImage + 6557
    3 GLEngine 0x53a1625b glTexSubImage2D_Exec + 950
    4 GLEngine 0x53a92042 glTexSubImage2D_UnpackThread + 82
    5 GLEngine 0x53aeb40f gleCmdProcessorPTHREAD + 311
    6 libSystem.B.dylib 0x93b8c259 _pthread_start + 345
    7 libSystem.B.dylib 0x93b8c0de thread_start + 34

    Thread 4 crashed with X86 Thread State (32-bit):
    eax: 0xffff0893 ebx: 0x8f174dd1 ecx: 0x00003000 edx: 0x0000c000
    edi: 0x5b477f50 esi: 0xb258f000 ebp: 0xb0313448 esp: 0xb0313440
    ss: 0x0000001f efl: 0x00010206 eip: 0xffff088c cs: 0x00000017
    ds: 0x0000001f es: 0x0000001f fs: 0x0000001f gs: 0x00000037
    cr2: 0xb258f000
     
  16. AlanH

    AlanH Mac addict, php monkey Moderator Supporter GOTM Staff

    Joined:
    Jan 9, 2003
    Messages:
    28,765
    Gender:
    Male
    Location:
    England
    Looks like a graphics driver bug. Have you (a) turned off anti-aliasing and (b) tried reducing the other graphics settings in the in-game Options menu?
     
  17. Bacon Maker

    Bacon Maker Chieftain

    Joined:
    Jul 22, 2009
    Messages:
    10
    a) I always have AA off

    b) I always play on high graphic settings in vanilla BtS with no problems, but I did try bumping it down to medium after a few crashes. Should I reduce it to low settings?
     
  18. AlanH

    AlanH Mac addict, php monkey Moderator Supporter GOTM Staff

    Joined:
    Jan 9, 2003
    Messages:
    28,765
    Gender:
    Male
    Location:
    England
    I don't see how installing in CustomAssets would make any difference. If the mod loads then it should run. Once it's loaded it doesn't care where it's loaded from.

    What hardware are you running? Nvidia drivers are not known for stability with Civ4, and they stopped updating them on Macs when Apple changed over to ATI as their preferred supplier.
     
  19. Bacon Maker

    Bacon Maker Chieftain

    Joined:
    Jul 22, 2009
    Messages:
    10
    From System Profiler:

    Model Name: MacBook Pro
    Model Identifier: MacBookPro5,4
    Processor Name: Intel Core 2 Duo
    Processor Speed: 2.53 GHz
    Number Of Processors: 1
    Total Number Of Cores: 2
    L2 Cache: 3 MB
    Memory: 4 GB

    NVIDIA GeForce 9400M

    VRAM: 256 MB
     
  20. AlanH

    AlanH Mac addict, php monkey Moderator Supporter GOTM Staff

    Joined:
    Jan 9, 2003
    Messages:
    28,765
    Gender:
    Male
    Location:
    England
    Should be good enough.

    Have you tried playing in a window instead of full screen? I've seen reports that this can help.
     

Share This Page