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

Installing The BUG Mod in the MODs folder

Discussion in 'Civ4 - BTS Unaltered Gameplay (BUG, BAT and BULL)' started by alerum68, Oct 18, 2007.

  1. alerum68

    alerum68 Priest of Hiroshima

    Joined:
    Jan 3, 2004
    Messages:
    2,518
    Location:
    San Francisco, California, United States
  2. walbeek

    walbeek Warlord

    Joined:
    Sep 25, 2007
    Messages:
    116
    Location:
    Heumen, Netherlands
    But what directory to use. Do I use the Game directory, in my case on the E: drive E:\Games\Civilization 4\Beyond the Sword where the game is installed; or do I use the My Documents folder C:\Documents and Settings\user\My Documents\My Games\Beyond the Sword....???
     
  3. Cammagno

    Cammagno Chieftain

    Joined:
    Dec 15, 2005
    Messages:
    712
    Location:
    Genoa (Italy)
    The second.
    As it is written in the readme :rolleyes:
     
  4. Grave

    Grave 1 Goat = 400 Horses

    Joined:
    May 5, 2002
    Messages:
    1,530
    Location:
    Louisiana
    Ok guys, I have a question for you.


    In History it the Making, I have BUG Mod 2.00 in it. Everything works fine. But, when I went to update to 2.11, I couldn't access the Pedia and the Main Interface was blank.

    I did a WinMerge comparison, and updated every single file accordingly (and also added new files that came with 2.11), and still couldn't get it quite right.

    I know diagnosing this is kinda vague... but any ideas where I went wrong?
     
  5. EmperorFool

    EmperorFool Chieftain

    Joined:
    Mar 2, 2007
    Messages:
    9,633
    Location:
    Mountain View, California
    I need more to go on. Can you post the contents of PythonErr.log?
     
  6. Grave

    Grave 1 Goat = 400 Horses

    Joined:
    May 5, 2002
    Messages:
    1,530
    Location:
    Louisiana
    Sure, here it is:

    Code:
    Traceback (most recent call last):
      File "<string>", line 1, in ?
      File "<string>", line 52, in load_module
      File "CvEventInterface", line 13, in ?
      File "<string>", line 52, in load_module
      File "CvCustomEventManager", line 24, in ?
      File "<string>", line 52, in load_module
      File "CvEventManager", line 12, in ?
      File "<string>", line 52, in load_module
      File "CvScreensInterface", line 10, in ?
      File "<string>", line 35, in load_module
      File "<string>", line 13, in _get_code
      File "
    CvExoticForeignAdvisor
    ", line 
    422
    
        
    if (gc.getPlayer(iLoopPlayer).isAlive()
        
     
    ^
    IndentationError
    : 
    expected an indented block
    
    Failed to load python module CvEventInterface.
    ERR: Call function onEvent failed. Can't find module CvEventInterface
    ERR: Call function onEvent failed. Can't find module CvEventInterface
    ERR: Call function pediaShow failed. Can't find module CvScreensInterface
    ERR: Call function pediaShow failed. Can't find module CvScreensInterface
    ERR: Call function pediaShow failed. Can't find module CvScreensInterface
    ERR: Call function onEvent failed. Can't find module CvEventInterface
    






    The only other changes I made are to the following:

    In RuffModControl.py
    Code:
    except:
        mod = "BUG Mod"
    FileName = CvPath.get_INI_File(mod + ".ini")
    RuffModConfigFile = read_ConfigFile()
    
    is now
    Code:
    except:
    [COLOR="Red"]    mod = "HISTORY IN THE MAKING"
    FileName = CvPath.get_INI_File(mod + " Config.ini")[/COLOR]
    RuffModConfigFile = read_ConfigFile()
    




    In CvCustomEventManager
    Code:
    import CvEventManager
    import ReminderEventManager
    import autologEventManager
    import Civ4lerts
    import MoreCiv4lerts
    import UnitNameEventManager
    
    import BugOptionsEventManager
    
    is now
    Code:
    import CvEventManager
    
    [COLOR="red"]import CvPiratesModEventManager
    import CvEnhancedTechConquestEventManager
    import CvViaAppiaEventManager
    import CvUnitStatisticsEventManager[/COLOR]
    
    import ReminderEventManager
    import autologEventManager
    import Civ4lerts
    import MoreCiv4lerts
    import UnitNameEventManager
    
    import BugOptionsEventManager
    
    and
    Code:
        def __init__(self, *args, **kwargs):
            super(CvCustomEventManager, self).__init__(*args, **kwargs)
            # map the initial EventHandlerMap values into the new data structure
            for eventType, eventHandler in self.EventHandlerMap.iteritems():
                self.setEventHandler(eventType, eventHandler)
            # --> INSERT EVENT HANDLER INITIALIZATION HERE <--
    
            autologEventManager.autologEventManager(self)
            Civ4lerts.Civ4lerts(self)
            MoreCiv4lerts.MoreCiv4lerts(self)
            ReminderEventManager.ReminderEventManager(self)
            UnitNameEventManager.UnitNameEventManager(self)
            
            BugOptionsEventManager.BugOptionsEventManager(self)
    
    is now
    Code:
        def __init__(self, *args, **kwargs):
            super(CvCustomEventManager, self).__init__(*args, **kwargs)
            # map the initial EventHandlerMap values into the new data structure
            for eventType, eventHandler in self.EventHandlerMap.iteritems():
                self.setEventHandler(eventType, eventHandler)
            # --> INSERT EVENT HANDLER INITIALIZATION HERE <--
    [COLOR="red"]        CvPiratesModEventManager.CvPiratesModEventManager(self)
            CvEnhancedTechConquestEventManager.CvEnhancedTechConquestEventManager(self)
            CvViaAppiaEventManager.CvViaAppiaEventManager(self)
            CvUnitStatisticsEventManager.CvUnitStatisticsEventManager(self)[/COLOR]
    
            autologEventManager.autologEventManager(self)
            Civ4lerts.Civ4lerts(self)
            MoreCiv4lerts.MoreCiv4lerts(self)
            ReminderEventManager.ReminderEventManager(self)
            UnitNameEventManager.UnitNameEventManager(self)
            
            BugOptionsEventManager.BugOptionsEventManager(self)
    





    and finally in CvModName.py
    Code:
    #CvModName.py
    
    modName = "BUG Mod"
    modVersion = "2.11"
    
    civName = "BtS"
    civVersion = "3.13"
    
    def getName():
    	return modName
    
    def getVersion():
    	return modVersion
    
    def getNameAndVersion():
    	return modName + " " + modVersion
    
    
    def getCivName():
    	return civName
    
    def getCivVersion():
    	return civVersion
    
    def getCivNameAndVersion():
    	return civName + " " + civVersion
    
    is now
    Code:
    #CvModName.py
    
    [COLOR="red"]modName = "HISTORY IN THE MAKING"
    modVersion = "- BUG Mod 2.11"[/COLOR]
    
    civName = "BtS"
    civVersion = "3.13"
    
    def getName():
    	return modName
    
    def getVersion():
    	return modVersion
    
    def getNameAndVersion():
    	return modName + " " + modVersion
    
    
    def getCivName():
    	return civName
    
    def getCivVersion():
    	return civVersion
    
    def getCivNameAndVersion():
    	return civName + " " + civVersion
    


    There are also some very minor changes to CvMainInterface.py, but they only change the amount of Religions/Corportaions you can view on the CityScreen (increases them by +1) and I added Unit Statistics mod.
     
  7. Grave

    Grave 1 Goat = 400 Horses

    Joined:
    May 5, 2002
    Messages:
    1,530
    Location:
    Louisiana
    Ah, nevermind... I think I got it.


    I fixed the indent error in the CvExoticForeignAdvisor.py
    PythonErr log is now blank. :)


    I guess sometimes it helps to actually print out the errors you having and read them yourself, instead of just trying to fix things without doing so. ;)
     
  8. EmperorFool

    EmperorFool Chieftain

    Joined:
    Mar 2, 2007
    Messages:
    9,633
    Location:
    Mountain View, California
    :goodjob: Amen to that! The Python errors can be generally helpful, even if you're not used to them. And yes, indentation can bite you, especially if you try to mix tabs and spaces.
     
  9. cubeboy

    cubeboy Leader of the Noobs

    Joined:
    Jul 26, 2007
    Messages:
    38
    I don't fully understand how to install this. Do i put in the BTS Mod folder or the BTS folder in "My Games"?
     
  10. alerum68

    alerum68 Priest of Hiroshima

    Joined:
    Jan 3, 2004
    Messages:
    2,518
    Location:
    San Francisco, California, United States
    It goes in the BTS folder within My Games:

    My Documents
    My Games
    Beyond The Sword
    Mods

    BAT will install there automatically.
     
  11. shari

    shari Chieftain

    Joined:
    Apr 9, 2006
    Messages:
    9
    Hi

    I dont seem to get this thing installed.

    I followed the install guide and exported it to:

    Eigene Dateien (german windows)
    My Games
    Beyond The Sword
    Mods

    I can load the mod in the main menu but all the extra infos i see on the screens here in the boards are missing (looks like normal CIV).

    Am I missing something?

    greets shari
     
  12. Cammagno

    Cammagno Chieftain

    Joined:
    Dec 15, 2005
    Messages:
    712
    Location:
    Genoa (Italy)

    As it is written in the guide, if you install it in the Mod folder, you have to rename CustomAssets in Assets and then, of course, you have to load the Bug mod from the game menu.
    Otherwise, you may install it outside the Mod folder (which, according to me, is much better).
     
  13. alerum68

    alerum68 Priest of Hiroshima

    Joined:
    Jan 3, 2004
    Messages:
    2,518
    Location:
    San Francisco, California, United States
    Also you'll have to move all the support files (.INI's, and CDA info) to BUG Mod foler within My Games for the current SVN build.
     
  14. Caesium

    Caesium Radiant!

    Joined:
    Jan 14, 2006
    Messages:
    526
    What part of the code has to be changed, if want to incorporate bug into another mod, using that mod's name and structure, but if I want to use the BUG Mod.ini for my purpose?
     
  15. EmperorFool

    EmperorFool Chieftain

    Joined:
    Mar 2, 2007
    Messages:
    9,633
    Location:
    Mountain View, California
    I'm currently doing some work on BUG to make this a lot easier for mod authors to do. Can you please explain exactly what you mean by "using that mod's name and structure"? I assume you want the mod folder to be named for your mod, sure, but what else? Are you okay with a separate folder in "My Games\BtS" called "BUG Mod" that contains "BUG Mod.ini"?

    The more specific you can be, the better I can help you.
     
  16. Caesium

    Caesium Radiant!

    Joined:
    Jan 14, 2006
    Messages:
    526
    OK, what I thought about, is having my mod's name and in the mod's folder a subfolder called "ini files", for example, where I want to put all the inis my mod incorporates (there will be 3-4 ini files in this folder).
    But for now, after editing BugOptions.py BUG reads the "BUG Mod.ini" from my mod's main folder.
    In Line 122 I changed
    Code:
    self.iniFile = findMainModIniFile()
    to
    Code:
    self.iniFile = BugPath.findIniFile("BUG Mod.ini")
    and it works fine for me.
     
  17. EmperorFool

    EmperorFool Chieftain

    Joined:
    Mar 2, 2007
    Messages:
    9,633
    Location:
    Mountain View, California
    Yes, part of my work will involve creating more names than just modName in CvModName.py. Currently, it looks for the INI in various places, many involving "<modName>\<modName>.ini". I'd like to make the directory name separate from the INI name.
     
  18. alerum68

    alerum68 Priest of Hiroshima

    Joined:
    Jan 3, 2004
    Messages:
    2,518
    Location:
    San Francisco, California, United States
    Check the first page for new detailed directions on how to make BUG work with your Mod.
     
  19. lroumen

    lroumen Chieftain

    Joined:
    Jan 12, 2006
    Messages:
    178
    Location:
    Netherlands
    I'd like to try out the BUG mod as a stand-alone in the mods directory and I don't want parts of it sticking into any other parts of the BTS folders.

    I downloaded the zipfile and noticed that the BUGMod_30.zip contains 3 folders
    - BUG Mod
    - CustomAssets
    - PublicMaps

    I've read the readme on the site, but I don't think I fully understood. It seems to me that unzipping the file dumps the CustomAssets and PublicMaps (along with all their useful content and minimods) into the main mods folder and not in a singular BUGMod folder. Aren't mods supposed to have all content into their own folder, or have I somehow misunderstood?
     
  20. The Doc

    The Doc Time Lord

    Joined:
    Feb 4, 2008
    Messages:
    344
    Location:
    between time and space
    Just create a folder called "BUG Mod" or "BUG Mod 3.0" in your Mods folder and dump the 3 folders from the zip in there. Then rename "CustomAssets" to "Assets" and you're done. The BUG Mod folder in the zip-file just holds some config stuff.
    Maybe we should rename it to "BUG Settings" or something similar.
     

Share This Page