1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Mod Component Requests Thread

Discussion in 'Civ4 - Mod Components' started by Thunderfall, Jun 15, 2006.

  1. Schmiddie

    Schmiddie Emperor

    Joined:
    Feb 27, 2012
    Messages:
    1,257
    Location:
    Germany
    Hi Folks, I search a function/modcomp that restricts professions, units and buildings for different era's. Hence I'd like to define for buildings and professions/units only to be build, acquired or used in specific eras.

    Is that possible? I have already searched in the complete modding forum but could not find such function/modcomp.

    Help is appreciated, Thanks a lot!
     
  2. Spillsandstains

    Spillsandstains Warlord

    Joined:
    Mar 31, 2008
    Messages:
    204
    hello lambs and piglets. more of a general question really - i'm about to test a civics mod that has many of the options generating <iCivicPercentAnger> rather than just one . . . has anyone tried it before and will it create a problem for the game?
     
  3. Spillsandstains

    Spillsandstains Warlord

    Joined:
    Mar 31, 2008
    Messages:
    204
    hi boss - there's a file called globaldefines in the main xml directory. i'm pretty sure it's in there somewhere last time i fooled around with it (changing the terrain created by gw to coast - fun but didn't look good). the xml guide http://civilization.wikia.com/wiki/XML/Documentation/GlobalDefines.xml will help you find which bit does it. i *think* it can be switched off.
     
  4. Phantom77

    Phantom77 Chieftain

    Joined:
    Apr 25, 2016
    Messages:
    2
    Is there already a mod created, that has altered all navy/ship units (movement range, unit transport capacity, etc.)? Or if not, is anyone interested in creating this? Thank you.
     
  5. Pomphis

    Pomphis Warlord

    Joined:
    Sep 22, 2010
    Messages:
    285
    Location:
    Berlin, Germany
    There is a mod called "navy_mod" with additional ships and techs.
     
  6. Civicus

    Civicus Chieftain

    Joined:
    Sep 7, 2014
    Messages:
    5
    Location:
    Germany
    i'd like a mod that disables tech trade but allows extortion under thread of force of techs. also, giving techs to the vassals should still be working. and in a perfect world, this mod would work with the k-mod.
     
  7. devolution

    devolution Warlord

    Joined:
    Oct 7, 2016
    Messages:
    263
    Gender:
    Male
    Location:
    Stavanger, Norway
    @Civicus If you're willing to get your hands dirty with the SDK it shouldn't be that hard. This is what I would do: Do a search for all uses of isOption(GAMEOPTION_NO_TECH_TRADING), then make exceptions for vassals and extortion in CvPlayer::canTradeItem and CvPlayer::updateTradeList
     
  8. Civicus

    Civicus Chieftain

    Joined:
    Sep 7, 2014
    Messages:
    5
    Location:
    Germany
    hm.. thx for the reply. I'll look into it, just downloaded the sdk, but it does sound too complicated for someone as simple as me.
     
  9. Underdog Ally

    Underdog Ally Chieftain

    Joined:
    Feb 22, 2019
    Messages:
    48
    Hi I have looked a lot for some extra units but the only time I find them the links are expired/dead. I am primarily interested in a land transport unit for infantry foot soldiers. Perhaps a transport truck that can hold 2 infantry and have 2 movement points. Defenseless like a worker, yet if it is destroyed with troops inside they survive but take damage similar to intercepted paratroopers. A helicopter transport would also work since it is essentially a ground transport still. Any help at all would be very appreciated :3
     
  10. hrochland

    hrochland Prince

    Joined:
    Apr 9, 2006
    Messages:
    2,133
    Location:
    Czech Kingdom
    Hello. I need to add obsolete technology to this code. Can anyone do this for me, please?
    Thank you.

    Code:
            if iImprovement == gc.getInfoTypeForString("IMPROVEMENT_WORKSHOP"):
                pPlot = CyMap().plot(iX, iY)
                pPlayer = gc.getPlayer(pPlot.getOwner())
                if pPlayer.getBuildingClassCount(gc.getInfoTypeForString("BUILDINGCLASS_FIRECIRCLE_TOWER")) == 1:
                    pPlot.setImprovementType(gc.getInfoTypeForString("IMPROVEMENT_ALCHEMIST"))
     
  11. hrochland

    hrochland Prince

    Joined:
    Apr 9, 2006
    Messages:
    2,133
    Location:
    Czech Kingdom
    Code:
        def onImprovementBuilt(self, argsList):
            'Improvement Built'
            iImprovement, iX, iY = argsList
    ## Alchemist´s tower Start ##
            b_BUILDING_TOWER = gc.getInfoTypeForString("BUILDING_FIRECIRCLE_TOWER")
            obsoleteTech = gc.getBuildingInfo(b_BUILDING_TOWER).getObsoleteTech()
            if iImprovement == gc.getInfoTypeForString("IMPROVEMENT_WORKSHOP"):
                pPlot = CyMap().plot(iX, iY)
                pPlayer = gc.getPlayer(pPlot.getOwner())
                if pPlayer.getBuildingClassCount(gc.getInfoTypeForString("BUILDINGCLASS_FIRECIRCLE_TOWER")) == 1:
                    pPlot.setImprovementType(gc.getInfoTypeForString("IMPROVEMENT_ALCHEMIST"))
    ## Alchemist´s tower End ##  
    Hello. It seems that all programmers have disappeared. I tried this code but it doesn't work. With obsolete technology the code continues to work. Can anyone advise please?
     
  12. Imp. Knoedel

    Imp. Knoedel Stalin and Starlight, Stalling a Stallion

    Joined:
    Nov 11, 2011
    Messages:
    8,572
    Location:
    The cooler Germany
    Perhaps you need to actually add some code to revert the Alchemist into a Workshop manually upon discovery of the obsoleting tech?
     
  13. hrochland

    hrochland Prince

    Joined:
    Apr 9, 2006
    Messages:
    2,133
    Location:
    Czech Kingdom
    The Alchemy Workshop is a bonus for the civilization that built the Fire tower. The real problem is that I have a system that allows you to build a specific building in a city that has in fat cross workshop.

    However, a civilization that built a tower can never build this specific building, because the unstoppable code turns every workshop into an alchemyworkshop.
     
  14. merijn_v1

    merijn_v1 Black Belt

    Joined:
    Dec 29, 2008
    Messages:
    5,614
    Location:
    The city of the original vlaai
    You could use this code. The reason why your code didn't work is because you didn't add a check if the civ has the obsoleteTech. I added this check to your code and cleaned it up a bit. ("and not gc.getTeam(pPlayer.getTeam()).isHasTech(obsoleteTech)")

    Code:
        def onImprovementBuilt(self, argsList):
            'Improvement Built'
            iImprovement, iX, iY = argsList
           
            pPlot = CyMap().plot(iX, iY)
            pPlayer = gc.getPlayer(pPlot.getOwner())
               
    ## Alchemist´s tower Start ##
            if iImprovement == gc.getInfoTypeForString("IMPROVEMENT_WORKSHOP"):
                b_BUILDING_TOWER = gc.getInfoTypeForString("BUILDING_FIRECIRCLE_TOWER")
                obsoleteTech = gc.getBuildingInfo(b_BUILDING_TOWER).getObsoleteTech()
                if pPlayer.getBuildingClassCount(gc.getInfoTypeForString("BUILDINGCLASS_FIRECIRCLE_TOWER")) > 0 and not gc.getTeam(pPlayer.getTeam()).isHasTech(obsoleteTech):
                    pPlot.setImprovementType(gc.getInfoTypeForString("IMPROVEMENT_ALCHEMIST"))
    ## Alchemist´s tower End ##
     
  15. hrochland

    hrochland Prince

    Joined:
    Apr 9, 2006
    Messages:
    2,133
    Location:
    Czech Kingdom
    Thank you very much. I can't program. I was just trying. Thanks again.
     
  16. Sword_Of_Geddon

    Sword_Of_Geddon Mysterious Jungle Warrior

    Joined:
    Dec 21, 2003
    Messages:
    13,323
    Gender:
    Male
    Location:
    New England, USA
    There are still coders, mostly working on projects(Caveman 2 Cosmos etc).
     

Share This Page