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

Quick Modding Questions Thread

Discussion in 'Civ4 - Creation & Customization' started by kiwitt, Jan 27, 2010.

  1. Mouthwash

    Mouthwash Escaped Lunatic

    Joined:
    Sep 26, 2011
    Messages:
    9,368
    Location:
    Hiding
    How does Spiritual give bonuses to all temples? I want to extend the bonus to cathedrals, monasteries, and shrines (which are buildable in my mod).
     
  2. Zeta Nexus

    Zeta Nexus Deity

    Joined:
    Jan 23, 2014
    Messages:
    4,207
    Gender:
    Male
    Location:
    In a constant brainstorm...
    CIV4BuildingInfos.XML:
    Code:
                <ProductionTraits>
                    <ProductionTrait>
                        <ProductionTraitType>TRAIT_SPIRITUAL</ProductionTraitType>
                        <iProductionTrait>100</iProductionTrait>
                    </ProductionTrait>
                </ProductionTraits>
    
    Insert to all buildings you want to.
     
  3. Mouthwash

    Mouthwash Escaped Lunatic

    Joined:
    Sep 26, 2011
    Messages:
    9,368
    Location:
    Hiding
    Ain't there.
     
  4. Zeta Nexus

    Zeta Nexus Deity

    Joined:
    Jan 23, 2014
    Messages:
    4,207
    Gender:
    Male
    Location:
    In a constant brainstorm...
    Are you looking in BuildingInfos.XML?
     
  5. Mouthwash

    Mouthwash Escaped Lunatic

    Joined:
    Sep 26, 2011
    Messages:
    9,368
    Location:
    Hiding
    Yes. The only bonus given by Spiritual is to Cristo Redentor. Besides, if it used BuildingInfos it would say double production for Jewish, Christian, Hindu, etc. temples. But I don't know of any class that includes temples in general.
     
  6. Zeta Nexus

    Zeta Nexus Deity

    Joined:
    Jan 23, 2014
    Messages:
    4,207
    Gender:
    Male
    Location:
    In a constant brainstorm...
    Okay, I've found it. Actually there is a better way than the one I suggested first:

    CIV4SpecialBuildingInfos.XML

    In AND2 it looks like this:
    Code:
            <SpecialBuildingInfo>
                <Type>SPECIALBUILDING_TEMPLE</Type>
                <Description>TXT_KEY_SPECIALBUILDING_TEMPLE</Description>
                <ObsoleteTech>NONE</ObsoleteTech>
                <TechPrereq>TECH_PRIESTHOOD</TechPrereq>
                <TechPrereqAnyone>NONE</TechPrereqAnyone>
                <bValid>1</bValid>
                <ProductionTraits>
                    <ProductionTrait>
                        <ProductionTraitType>TRAIT_SPIRITUAL</ProductionTraitType>
                        <iProductionTrait>100</iProductionTrait>
                    </ProductionTrait>
                </ProductionTraits>
                <Button>Art/Interface/Buttons/Buildings/Temple.dds</Button>
            </SpecialBuildingInfo>
            <SpecialBuildingInfo>
                <Type>SPECIALBUILDING_CATHEDRAL</Type>
                <Description>TXT_KEY_SPECIALBUILDING_CATHEDRAL</Description>
                <ObsoleteTech>NONE</ObsoleteTech>
                <TechPrereq>TECH_PAPACY</TechPrereq>
                <TechPrereqAnyone>NONE</TechPrereqAnyone>
                <bValid>1</bValid>
                <ProductionTraits>
                    <ProductionTrait>
                        <ProductionTraitType>TRAIT_SPIRITUAL</ProductionTraitType>
                        <iProductionTrait>100</iProductionTrait>
                    </ProductionTrait>
                </ProductionTraits>
                <Button>Art/Interface/Buttons/Buildings/Cathedral.dds</Button>
            </SpecialBuildingInfo>
    
     
    Mouthwash likes this.
  7. Mouthwash

    Mouthwash Escaped Lunatic

    Joined:
    Sep 26, 2011
    Messages:
    9,368
    Location:
    Hiding
    :woohoo:

    How would I add shrines as a special building?
     
  8. Zeta Nexus

    Zeta Nexus Deity

    Joined:
    Jan 23, 2014
    Messages:
    4,207
    Gender:
    Male
    Location:
    In a constant brainstorm...
    Add:
    Code:
            <SpecialBuildingInfo>
                <Type>SPECIALBUILDING_SHRINES</Type>
                <Description>TXT_KEY_SPECIALBUILDING_TEMPLE</Description>
                <ObsoleteTech>NONE</ObsoleteTech>
                <TechPrereq>NONE</TechPrereq>
                <TechPrereqAnyone>NONE</TechPrereqAnyone>
                <bValid>1</bValid>
                <ProductionTraits>
                    <ProductionTrait>
                        <ProductionTraitType>TRAIT_SPIRITUAL</ProductionTraitType>
                        <iProductionTrait>100</iProductionTrait>
                    </ProductionTrait>
                </ProductionTraits>
                <Button>Art/Interface/Buttons/Buildings/Temple.dds</Button>
            </SpecialBuildingInfo>
    
    and in BuildingInfos for every shrine:
    Code:
            <BuildingInfo>
                <BuildingClass>BUILDINGCLASS_JEWISH_SHRINE</BuildingClass>
                <Type>BUILDING_JEWISH_SHRINE</Type>
                <SpecialBuildingType>SPECIALBUILDING_SHRINES</SpecialBuildingType>
    ...
    
     
    Mouthwash likes this.
  9. Mouthwash

    Mouthwash Escaped Lunatic

    Joined:
    Sep 26, 2011
    Messages:
    9,368
    Location:
    Hiding
    Welp, problem solved. Thank you sir. :hatsoff:
     
  10. Andera412

    Andera412 Chieftain

    Joined:
    Sep 30, 2014
    Messages:
    55
    Location:
    Ukraine
    Dear modders!
    I am constructing a mod, which changes the modern era. My friends and me like to start our games from modern on duel maps with lots of opponents.. However, even Better AI is rather weak. I want to create new AI behaviour algorhytm when starting from modern era, which copys pro player's game.
    For example, those AI players, which are near to humans, on every game set their culture sum to 100%, accept certain civics, their workers start chopping the forest, they build determined unit, when forest cut down, they change production to worker, slave him, then continue building unit...
    It is one determined scheme of AI behaviour on first 30 turns of the game.

    What language, python or SDK, i need use to do that?
     
  11. f1rpo

    f1rpo plastics

    Joined:
    May 22, 2014
    Messages:
    929
    Location:
    Germany
    The thing about the culture slider can be done in AI_doCommerce, and civics in AI_doCivics, both in CvPlayerAI.cpp. Neither of these functions calls Python, so I don't see a way to implement this in Python. City production is handled by a large function called AI_chooseProduction in CvCityAI.cpp.
     
  12. Andera412

    Andera412 Chieftain

    Joined:
    Sep 30, 2014
    Messages:
    55
    Location:
    Ukraine
    So, it will be SDK. Thank you!
     
  13. kine100

    kine100 Warlord

    Joined:
    May 8, 2010
    Messages:
    119
    Dear modding people,
    I am building a mod with merging the existing mods.
    and I am a newbie for SDK codes.

    For the first step I merged Revolution DCM by glider1 which is base for the mod and [MODCOMP] Route Restricter by Shqype
    Merging the codes and compiling DLL seemed not to have any problem.
    Merging XML and I sterted game.

    and I lost main buttons in the screen.

    I tried with shortcuts with key-board and they seemed to work but miss some functions or not sure doing correct, functions from Revolution DCM, like fighter engagement, hanger bombing, etc
    still not sure miss any but I see the functions are still in the mod by BUG SCREEN from Revolution DCM

    The function from the Route Restricter is exist along to the Pedia. The mechanized infantry requires plot to have road or railroad to move.

    The Route Restricter is version For BTS 3.13, made with Bhruic's unofficial patch 1.11.. and I am suspecting and guessing the version difference caused the problem.
    Then, I have to figure how to convert 3.13 version to 3.19 or whatever else I need.

    or.. is it common that cannot be fixed because I never seen the mod has railroad only units.

    Need help from who knows or experienced similar problem, please give a guide to solve it for next step.

    I attached screenshots from the mod below.

    Civ4ScreenShot0056.JPG Civ4ScreenShot0057.JPG Civ4ScreenShot0058.JPG
     
  14. Andera412

    Andera412 Chieftain

    Joined:
    Sep 30, 2014
    Messages:
    55
    Location:
    Ukraine
    It seems, that CvGameInterface.cpp It seems, that CvGameInterface.cpp is corrupted. It is not right to merge 3.13 mod with 3.19 mod. To update 3.13 mod up to 3.19 version
    1) merge 3.13 mod files with original 3.13 CvGameCore source and comment differences.
    2) Merge 3.13 commented code with original 3.19 CvGameCore source and you'll get 3.19 mod.
    3) Merge 3.19 mod with RevDCM 3.19.It seems, that CvGameInterface.cpp It seems, that CvGameInterface.cpp is corrupted. It is not right to merge 3.13 mod with 3.19 mod. To update 3.13 mod up to 3.19 version
    1) merge 3.13 mod files with original 3.13 CvGameCore source and comment differences.
    2) Merge 3.13 code with original 3.19 CvGameCore source and you'll get 3.19 mod.
    3) Merge 3.19 mod with RevDCM 3.19.

    Variant 2: ChinChin has updated Route Restricter as a part of his Combat Revolution Modcomp. Try to extract it.
     
  15. kine100

    kine100 Warlord

    Joined:
    May 8, 2010
    Messages:
    119
    Thank you very much for your answer.
    I must try.
    Thank you again~!
     
  16. Herostratus

    Herostratus Grim Harbinger of Things to Come

    Joined:
    Jul 24, 2009
    Messages:
    116
    I added one new category of civics (Education) to my mod, and everything seems to be working except for one thing:
    When I put the "Adopt Highest-Level Education Civic" UN resolution up to a vote in my test game, a few AI civs defied it the first time, and then ALL AI civs defied it-- and none of them suffered *any* "World Considers You a Villain" anger as a result! (They DID suffer it for defying original civics.)

    So it seems UN-defiance has to be manually enabled for each civic category. I assume I missed something somewhere, but I'll be damned if I know where. I'm equally sure somebody has done this before. Anybody know where to point me?
     
  17. kine100

    kine100 Warlord

    Joined:
    May 8, 2010
    Messages:
    119
    ChinChin's Combat Revolution MODCOMP has too many modified sources to compile with Revolution DCM MOD. At least, for me.
    I like way he designed mod but it is very complicated to merge them.

    So, what I decided was uninstall CIV4 and reinstall and patch the 3.13 and then 3.17 to keep the old codes for my modding inventory.
    Hope that I understood well the what you wrote before.
    Thank you~
     
  18. kine100

    kine100 Warlord

    Joined:
    May 8, 2010
    Messages:
    119
    Does anyone knows how to go down to BTS 3.13 version..??
    or way to get CvGamecoreDLL from BTS 3.13...
    I just re-installed CIV4 and it seems to be version 3.17
    Civ4ScreenShot0000.JPG
     
  19. Xyth

    Xyth History Rewritten

    Joined:
    Jul 14, 2004
    Messages:
    4,054
    Location:
    Aotearoa
    Can anyone tell me where to find crash reports on Windows 10? In earlier versions of Windows there was a "Show Details' button in the crash dialog that generated the report. I've tried the Event Viewer but that only seems to store a tiny fraction of the necessary details and nothing useful like thread traces. What am I doing wrong?
     
  20. Mattygerst

    Mattygerst Prince

    Joined:
    Jan 19, 2008
    Messages:
    538
    Location:
    St. Louis, Missouri, USA
    I tried to simply copy the "America" civ from the game and create "United States of America" ... as you can see, I've copied the America civ and created the new civ using Notepad++ ... however, I am having a text issue. It seems the game cannot cross reference the TXT_KEY for the new civ. However ... 3 years ago when I tried this, I was able to cross-reference these from a folder ... which I think I found in the Civ4 > Assets > Text file. But, and I swear the Steam package is different in some ways that I can't cross-reference, but, I cannot find where I need to add the TXT_KEY for the new civ so that the game recognizes it and uses it properly. I promise I have exhausted myself trying to find this. Are you able to help guide me where I should be looking to find this? I mean, simply adding new civs by just changing the names of them is pretty easy stuff ... I did it in this case, already. But the game is not able to cross-reference the new civ name but I cannot, at all, find where I need to make that change. Thank you for any guidance you're willing to offer.
     

    Attached Files:

Share This Page