1. We have added the ability to collapse/expand forum categories and widgets on forum home.
    Dismiss Notice
  2. All Civ avatars are brought back and available for selection in the Avatar Gallery! There are 945 avatars total.
    Dismiss Notice
  3. To make the site more secure, we have installed SSL certificates and enabled HTTPS for both the main site and forums.
    Dismiss Notice
  4. Civ6 is released! Order now! (Amazon US | Amazon UK | Amazon CA | Amazon DE | Amazon FR)
    Dismiss Notice
  5. Dismiss Notice
  6. Forum account upgrades are available for ad-free browsing.
    Dismiss Notice

Merge BUG with my MOD, please help

Discussion in 'Civ4 - BTS Unaltered Gameplay (BUG, BAT and BULL)' started by CHINCHIN, Aug 19, 2015.

  1. CHINCHIN

    CHINCHIN Chieftain

    Joined:
    Jul 8, 2004
    Messages:
    26
  2. Lemon Merchant

    Lemon Merchant Not into your drama

    Joined:
    Jun 27, 2008
    Messages:
    4,120
    Gender:
    Female
    Location:
    Red Sector A
    What is the odd behavior or error message that you're getting?
     
  3. CHINCHIN

    CHINCHIN Chieftain

    Joined:
    Jul 8, 2004
    Messages:
    26
    The BUG works perfectly, the part of my MOD, that falls to the file "CvMainInterface.py" fails. Nothing happens when you press the buttons. However in my MOD function.
     
  4. Lemon Merchant

    Lemon Merchant Not into your drama

    Joined:
    Jun 27, 2008
    Messages:
    4,120
    Gender:
    Female
    Location:
    Red Sector A
    What buttons do you mean? Which buttons don't work?
     
  5. CHINCHIN

    CHINCHIN Chieftain

    Joined:
    Jul 8, 2004
    Messages:
    26
    They are buttons for units incorporating my mod. Submerging submarine, taking ammunition...

    These work perfectly in my mod, but merge with the BUG fail.

    Are the lines that are incorporated into the file "CvMainInterface.py"
    Spoiler :
    ###### Unit Buttons ######
    pUnit = g_pSelectedUnit
    iUnitType = pUnit.getUnitType()
    pUnitOwner = gc.getPlayer(pUnit.getOwner())
    if pUnitOwner.isTurnActive():
    if iUnitType == CvUtil.findInfoTypeNum(gc.getUnitInfo, gc.getNumUnitInfos(), "UNIT_SUBMARINE"):
    if pUnit.isMadeAttack() == false and pUnit.canMove():
    screen.appendMultiListButton( "BottomButtonContainer", ArtFileMgr.getInterfaceArtInfo("SUB1").getPath(), 0, WidgetTypes.WIDGET_GENERAL,665, 665, False )
    screen.show( "BottomButtonContainer" )
    iCount = iCount + 1
    if iUnitType == CvUtil.findInfoTypeNum(gc.getUnitInfo, gc.getNumUnitInfos(), "UNIT_ATTACK_SUBMARINE"):
    if pUnit.canMove():
    screen.appendMultiListButton( "BottomButtonContainer", ArtFileMgr.getInterfaceArtInfo("SUB2").getPath(), 0, WidgetTypes.WIDGET_GENERAL,666, 666, False )
    screen.show( "BottomButtonContainer" )
    iCount = iCount + 1
    if pUnit.puedeSerRecargadaMuniciones():
    screen.appendMultiListButton( "BottomButtonContainer", ArtFileMgr.getInterfaceArtInfo("BALAS1").getPath(), 0, WidgetTypes.WIDGET_GENERAL,667, 667, False )
    screen.show( "BottomButtonContainer" )
    iCount = iCount + 1
    if pUnit.puedeSerRecargadaTotalMuniciones():
    screen.appendMultiListButton( "BottomButtonContainer", ArtFileMgr.getInterfaceArtInfo("BALAS4").getPath(), 0, WidgetTypes.WIDGET_GENERAL,668, 668, False )
    screen.show( "BottomButtonContainer" )
    iCount = iCount + 1
    if pUnit.puedeSerRecargadaCombustible():
    screen.appendMultiListButton( "BottomButtonContainer", ArtFileMgr.getInterfaceArtInfo("FUEL1").getPath(), 0, WidgetTypes.WIDGET_GENERAL,669, 669, False )
    screen.show( "BottomButtonContainer" )
    iCount = iCount + 1
    if pUnit.puedeSerRecargadaTotalCombustible():
    screen.appendMultiListButton( "BottomButtonContainer", ArtFileMgr.getInterfaceArtInfo("FUEL4").getPath(), 0, WidgetTypes.WIDGET_GENERAL,670, 670, False )
    screen.show( "BottomButtonContainer" )
    iCount = iCount + 1
    if pUnit.puedeRepartirMuniciones():
    screen.appendMultiListButton( "BottomButtonContainer", ArtFileMgr.getInterfaceArtInfo("MUNICION").getPath(), 0, WidgetTypes.WIDGET_GENERAL,671, 671, False )
    screen.show( "BottomButtonContainer" )
    iCount = iCount + 1
    if pUnit.puedeRepartirCombustible():
    screen.appendMultiListButton( "BottomButtonContainer", ArtFileMgr.getInterfaceArtInfo("COMBUSTIBLE").getPath(), 0, WidgetTypes.WIDGET_GENERAL,672, 672, False )
    screen.show( "BottomButtonContainer" )
    iCount = iCount + 1
     
  6. CHINCHIN

    CHINCHIN Chieftain

    Joined:
    Jul 8, 2004
    Messages:
    26
    I think the problem is that my MOD files "CvEventManager.py" and "CvGameUtils.py", conflict with the BUG.

    It does not seem that the solution is easy.

    Thanks Lemon Merchant
     
  7. Dancing Hoskuld

    Dancing Hoskuld Chieftain

    Joined:
    Jul 5, 2004
    Messages:
    20,821
    Gender:
    Male
    Location:
    Canberra, Australia
    The way BUG works is that you don't have your version of either file. You have your events and utilities in a different file and tell BUG through the init.xml and other files what parts of the Event manager and Game Utilis you are extending or overwriting.
     
  8. Dancing Hoskuld

    Dancing Hoskuld Chieftain

    Joined:
    Jul 5, 2004
    Messages:
    20,821
    Gender:
    Male
    Location:
    Canberra, Australia
    edit sorry that is not quite the full or true picture - I have had food poisoning, which means no coffee of solids for a week; I think my bacon levels have plummeted too far. ;)

    You can have your own event manager and games utils files you just cant call them that. I think Orion Veteran does exactly this in his Immigration mod. This might provide a clear example for you to look at.

    edit Gah - I was trying to edit my previous post. I need bacon and perhaps coffee too:lol:
     

Share This Page