• Our friends from AlphaCentauri2.info are in need of technical assistance. If you have experience with the LAMP stack and some hours to spare, please help them out and post here.

Quick Modding Questions Thread

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).
 
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).
CIV4BuildingInfos.XML:
Code:
            <ProductionTraits>
                <ProductionTrait>
                    <ProductionTraitType>TRAIT_SPIRITUAL</ProductionTraitType>
                    <iProductionTrait>100</iProductionTrait>
                </ProductionTrait>
            </ProductionTraits>

Insert to all buildings you want to.
 
CIV4BuildingInfos.XML:
Code:
            <ProductionTraits>
                <ProductionTrait>
                    <ProductionTraitType>TRAIT_SPIRITUAL</ProductionTraitType>
                    <iProductionTrait>100</iProductionTrait>
                </ProductionTrait>
            </ProductionTraits>

Insert to all buildings you want to.

Ain't there.
 
Are you looking in BuildingInfos.XML?

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.
 
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>
 
Okay, I've found it. Actually there is a better way than the one I suggested first:

CIV4SpecialBuildingInfos.XML

:woohoo:

How would I add shrines as a special building?
 
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>
...
 
Welp, problem solved. Thank you sir. :hatsoff:
 
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?
 
What language, python or SDK, i need use to do that?
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.
 
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.
So, it will be SDK. Thank you!
 
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
 
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.
 
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.

Thank you very much for your answer.
I must try.
Thank you again~!
 
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?
 
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.

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~
 
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
 
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?
 
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.
 

Attachments

  • Pic1.jpg
    Pic1.jpg
    100.1 KB · Views: 60
  • Pic2.jpg
    Pic2.jpg
    101.4 KB · Views: 54
Back
Top Bottom