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

[BUG Mod] Icons not displayed

Discussion in 'Civ4 - BTS Unaltered Gameplay (BUG, BAT and BULL)' started by BornInCantaloup, Mar 14, 2014.

  1. NobleZarkon

    NobleZarkon Civ IV Emperor EQM Moderator Hall of Fame Staff Supporter

    Joined:
    Sep 6, 2012
    Messages:
    3,108
    Gender:
    Male
    Location:
    Fife, Scotland
    Sorry I wasn't clear earlier but glad you got it to work, renaming a load of system folders was a painful way to go and would probably just cause random crashes even if you managed to get it to work.

    Have fun! :D
     
  2. Pengu

    Pengu Chieftain

    Joined:
    Apr 9, 2011
    Messages:
    386
    This is the exact problem I am having to a tee.
    How do I change the username?
     
  3. Lemon Merchant

    Lemon Merchant Smarticus Pantsidae

    Joined:
    Jun 27, 2008
    Messages:
    4,380
    Gender:
    Female
    Location:
    Red Sector A
    See your original thread for the answer.
     
  4. unas876

    unas876 Chieftain

    Joined:
    Jul 23, 2016
    Messages:
    101
    I run Windows 10 and have the same problem as described in the OP: no icons for a variety of things after installing BUG mod. After originally having an 'รถ' in my Windows user account name and changing that (I restarted my computer twice after that already), the problem is still there.
    So basically the solution that worked for OP does not work for me. Any advice?
     
  5. unas876

    unas876 Chieftain

    Joined:
    Jul 23, 2016
    Messages:
    101
    I see what the problem could be. I changed the name of my Windows account but going to C:/Users it still displays my old account name for the folder that should now be called my new account name.

    Could be the problem, right? Anyways, I have found easy solutions for this for Windows 7 and Windows 8, but a solution for Windows 10 I cannot find, while on the other hand finding a couple of people asking about the same problem and not getting any answers.

    I suppose if I ever want to get BUG to work properly I'd need to create a whole new account on which to install Steam and Civ IV + BUG again.
     
  6. ruff_hi

    ruff_hi Live 4ever! Or die trying

    Joined:
    Oct 24, 2005
    Messages:
    8,882
    Location:
    an Aussie in Boston
    That is exactly the problem. BUG reads the user path and has particular issues with non standard characters. Can you install (reinstall) Civ IV + BUG to your new windows account? That should fix the problem.
     
  7. unas876

    unas876 Chieftain

    Joined:
    Jul 23, 2016
    Messages:
    101
    Alright, thanks. I have fixed the problem now by creating a new user account on my computer and I will just switch to that account every time I want to play Civ IV.
     
  8. BornInCantaloup

    BornInCantaloup A Shadow for the Warrior

    Joined:
    Feb 9, 2010
    Messages:
    3,756
    Location:
    Cantaloupe Island
    Iirc, when I had the same issue, I migrated all of my other files to the new account, which allowed me to delete the former account. So I could avoid the bother of having 2 accounts.

    You may want to do the same. However, I had a new computer, which made the migration a rather simple matter.
     
  9. Manabu

    Manabu Chieftain

    Joined:
    Jul 28, 2017
    Messages:
    6
    Any chance of fixing that bug? I know python, but I don't know the BUG code base nor the Civ IV interface. But if someone can point me to where they mess up the path handling I might give a go fixing it myself.

    I have an old account, and changing it's name is equivalent to a clean windows install. Changing accounts only to play Civ IV is particularly annoying for me too, as it seems like Windows has a bug that it resets the taskbar to the main display after user change, while I want it in my portrait monitor. I can't change my main display, because many programs, like the unnaltered Civ IV itself, behave badly with portrait displays. And living with a taskbar stealing precious vertical realstate from my landscape monitor is also bad. An extra active account is also an 1+GB memory overhead.

    In all those years, only one other program gave me problem due to that, and it has already been fixed after I pointed it out.
     
    Last edited: Jul 28, 2017
  10. ruff_hi

    ruff_hi Live 4ever! Or die trying

    Joined:
    Oct 24, 2005
    Messages:
    8,882
    Location:
    an Aussie in Boston
    I would suggest adding a fixed / hard-coded directory in 'BugPath.py' file so that when the mod searches for the data directory, it finds your hard coded directory first.

    Code:
    def initDataFolder():
        """
        Finds the first directory that contains a folder named SETTINGS_FOLDER.
        """
        global _dataFolderInitDone
        if _dataFolderInitDone:
            return
        BugUtil.debug("BugPath - initializing data folder")
      
        dataDirs = (
            join(getUserDir(), getModName()),    # My Games\BUG Mod
            join(getRootDir(), getModName()),    # My Games\BTS\BUG Mod
            join(getAppDir(), getModName()),    # Civ4\BTS\BUG Mod
            join(getModDir(), DATA_FOLDER),     # Civ4\BTS\Mods\BUG Mod 3.6\Data
            join(getModDir()),                  # Civ4\BTS\Mods\BUG Mod 3.6
        )
        for dir in dataDirs:
            if setDataDir(dir):
                break
        else:
            BugUtil.error("No valid data directory containing %s found", SETTINGS_FOLDER)
        _dataFolderInitDone = True
     
  11. Manabu

    Manabu Chieftain

    Joined:
    Jul 28, 2017
    Messages:
    6
    Thank you for the pointers, but it doesn't appear to be it.

    If any directory in BugPath.py is wrong, BUG won't even start. The game starts bare, w/o the bars on the corners of the screen, hover text, city screen, etc but with a blank window with exit button. When the python code itself is invalid (I took sometime to discover that it's indentation doesn't follow pep8) the game skips the intro video and not even that blank window appears when loading a game.

    I tried hardcoding, changing the my documents finding routine in initRootFolder() for an alternative one, but all ended up the same, with bug generally working but missing icons.

    There are relative paths added to the 'CIV4ArtDefines_Interface.xml' in the CustomAssets/xml/art folder. Maybe when merging those paths with the dataFolder path it mess up the encoding of the strings? I still couldn't find where that merging happens though.

    By the way, how do I see the logged debug messages and/or python stacktraces?
     
  12. ruff_hi

    ruff_hi Live 4ever! Or die trying

    Joined:
    Oct 24, 2005
    Messages:
    8,882
    Location:
    an Aussie in Boston
    I haven't looked at the code or coded in python for way too long ... not sure I remember how to do that. There might be a debug mode in the civ4.ini file that needs to be turned on.
     
  13. Manabu

    Manabu Chieftain

    Joined:
    Jul 28, 2017
    Messages:
    6
    Ok, I should have searched first before asking, it was quite easy to find: https://strategywiki.org/wiki/Civilization_IV/Python_Debugging

    There is quite a lot of debuging output. I will list here the parts that seems anomalous:

    In the xml.log there is 3 MB of things like that for many xml files:
    Code:
    [45655.813] Loading XML file xml\Events/CIV4EventInfos.xml
    [45655.859] Load XML file xml\Events/CIV4EventInfos.xml SUCCEEDED
    [45655.859] SetGlobalClassInfo (Civ4EventInfos/EventInfos/EventInfo)
    [45655.859] info type NONE not found, Current XML file is: xml\Events/CIV4EventInfos.xml
    [45655.859] info type NONE not found, Current XML file is: xml\Events/CIV4EventInfos.xml
    [45655.859] info type NONE not found, Current XML file is: xml\Events/CIV4EventInfos.xml
    [45655.859] info type NONE not found, Current XML file is: xml\Events/CIV4EventInfos.xml
    [45655.859] info type NONE not found, Current XML file is: xml\Events/CIV4EventInfos.xml
    [45655.859] info type NONE not found, Current XML file is: xml\Events/CIV4EventInfos.xml
    [45655.859] info type NONE not found, Current XML file is: xml\Events/CIV4EventInfos.xml
    [45655.859] info type NONE not found, Current XML file is: xml\Events/CIV4EventInfos.xml
    [45655.859] info type NONE not found, Current XML file is: xml\Events/CIV4EventInfos.xml
    [45655.859] info type NONE not found, Current XML file is: xml\Events/CIV4EventInfos.xml
    [45655.859] info type  not found, Current XML file is: xml\Events/CIV4EventInfos.xml
    [45655.859] info type NONE not found, Current XML file is: xml\Events/CIV4EventInfos.xml
    [45655.859] info type NONE not found, Current XML file is: xml\Events/CIV4EventInfos.xml
    [45655.859] info type NONE not found, Current XML file is: xml\Events/CIV4EventInfos.xml
    [45655.859] info type NONE not found, Current XML file is: xml\Events/CIV4EventInfos.xml
    [45655.859] info type NONE not found, Current XML file is: xml\Events/CIV4EventInfos.xml
    [45655.859] info type NONE not found, Current XML file is: xml\Events/CIV4EventInfos.xml
    [45655.859] info type NONE not found, Current XML file is: xml\Events/CIV4EventInfos.xml
    and it continues for hundreds of lines, then changing to other files. I may post all the files that gave this problem if you want.

    in rsmgr.log contains the following:
    Code:
    RESMGR: Texture FlagDECAL.dds failed to load
    RESMGR: Texture PlayerColor01.tga failed to load
    RESMGR: Texture PlayerColor02.tga failed to load
    RESMGR: ---- Unloading ----
    
    Near the end of the PythonDbg.log, where BUG writes all its steps, there is this:
    Code:
    01:56:19 DEBUG: GameSetUpCheck - module disabled
    01:56:19 DEBUG: Timer - BUG init [call inits/events] took 92 ms
    01:56:19 DEBUG: Timer - BUG init [total] took 354 ms
    01:56:19 DEBUG: BugData - loading root
    01:56:19 DEBUG: BugData - opening root.SpyUtil: {}
    01:56:19 DEBUG: SpyUtil - loaded: {}
    01:56:19 DEBUG: SpyUtil - no data found
    01:56:19 DEBUG: AbstractOption - setting Autolog__LoggingOn to True
    01:56:19 DEBUG: BugOptions - setting Autolog__LoggingOn to True
    01:56:19 DEBUG: BugOptions - option Autolog.Autolog__LoggingOn changed from True to True
    01:56:19 DEBUG: BugTable - Reminders not found in root
    01:56:19 DEBUG: BugTable - Reminders not found in root
    01:56:19 DEBUG: FavoriteCivicDetector.initHelpers() gDetectionNecessary: False
    01:56:19 DEBUG: EventSignsEventHandler.onLoadGame()
    01:56:19 DEBUG: EventSigns.initOptions() initializing. g_bShowSigns is True.
    01:56:19 DEBUG: BugTable - EventSigns not found in root
    01:56:19 DEBUG: EventSigns has no saved data. Initializing new data.
    01:56:19 DEBUG: EventSigns.initData() initializing gSavedSigns
    01:56:19 DEBUG: BugTable - StrategyOverlay not found in root
    01:56:19 DEBUG: BugEventManager - event PreGameStart
    01:56:19 DEBUG: BugInit - init() already complete
    8500 - gold
    
    8501 - research
    
    8502 - culture
    
    8503 - espionage
    
    8483 - food
    
    8484 - production
    
    8485 - commerce
    
    8550 - judaism
    
    8551 - judaism
    
    8552 - christianity
    
    8553 - christianity
    
    8554 - islam
    
    8555 - islam
    
    8556 - hinduism
    
    8557 - hinduism
    
    8558 - buddhism
    
    8559 - buddhism
    
    8560 - confucianism
    
    8561 - confucianism
    
    8562 - taoism
    
    8563 - taoism
    
    3 SCREEN TURNED ON
    
    99 SCREEN TURNED ON
    Those 4 lines with "not found in root" may be some problem.

    And the end there is the following, maybe reflecting me hovering my mouse over things:

    Code:
    01:56:21 DEBUG: updatePlotListButtons_Orig - column 0, offset 225
    01:56:21 DEBUG: BugOptions - writing INI file 'Autolog.ini'
    load_module encodings.ascii
    
    01:56:21 DEBUG: updatePlotListButtons_Orig - column 0, offset 225
    01:56:21 DEBUG: updatePlotListButtons_Orig - iCount(225), iSkipped(0)
    01:56:21 DEBUG: Timer - scores took 2 ms
    01:56:21 DEBUG: BugEventManager - event BeginActivePlayerTurn: (0, 0)
    01:56:21 DEBUG: MapSigns.processSigns() starting. bShow = True and g_bShowSigns = True
    01:56:21 DEBUG: EventSigns.updateCurrentSigns() finished.
     MapSigns { plotDict = { } }
    01:56:21 DEBUG: BugEventManager - event endTurnReady: (0,)
    01:56:22 DEBUG: Timer - scores took 2 ms
    01:56:35 DEBUG: updatePlotListButtons_Orig - column 0, offset 225
    01:56:35 DEBUG: updatePlotListButtons_Orig - iCount(225), iSkipped(225)
    01:56:39 DEBUG: updatePlotListButtons_Orig - column 0, offset 225
    01:56:39 DEBUG: updatePlotListButtons_Orig - iCount(225), iSkipped(0)
    01:56:39 DEBUG: Timer - scores took 2 ms
    01:56:41 DEBUG: AbstractOption - setting MainInterface__FieldOfView_Value to 40
    01:56:41 DEBUG: BugOptions - setting MainInterface__FieldOfView_Value to 40
    01:56:41 DEBUG: BugEventManager - event UnInit
    PY:OnUnInit
    UnInit Python
    I don't know if those things in those log files are normal or not.

    And reading the logs, maybe the FontUtil.py is of interest. I will look into it more tomorow.
     
    Last edited: Aug 1, 2017

Share This Page