Modmodding Q&A Thread

In my mod, Sword of Islam expanded, I was creating victory goals for Portugal, when I accidentall did something that caused the game to not work. When I try to load it, it just shows the map, no interface, and it is impossible to do anything. Victory.py is the only file I changed since the last working version, my broken version is linked in post #240 in that thread

Can you please help me fix it

I answered in the other thread.
 
How do I put in Conscription as a civic without it turning to "can draft 5085713869 units per turn"? That's what I see on my civics screen. Apparently it is clashing with something else.
 
What did you put into the civic XML?
 
How do I put in Conscription as a civic without it turning to "can draft 5085713869 units per turn"? That's what I see on my civics screen. Apparently it is clashing with something else.

"Conscription" is already in use by the game to refer to the drafting mechanic, so you can't use that exact name for something else unless you rename all mentions of the drafting mechanic in the game files to something else. Or you just figure out another name for the civic. ;)
 
What did you put into the civic XML?

CivicInfos:

Spoiler :
<CivicInfo>
<CivicOptionType>CIVICOPTION_MILITARY</CivicOptionType>
<Type>CIVIC_CONSCRIPTION</Type>
<Description>TXT_KEY_CIVIC_CONSCRIPTION</Description>
<Civilopedia/>
<Strategy/>
<Button>,Art/Interface/Buttons/Civics/Tribalism.dds,Art/Interface/Buttons/Civics_Civilizations_Religions_Atlas.dds,7,3</Button>
<TechPrereq>TECH_NATIONALISM</TechPrereq>
<iAnarchyLength>1</iAnarchyLength>
<Upkeep>UPKEEP_HIGH</Upkeep>
<iAIWeight>0</iAIWeight>
<iGreatPeopleRateModifier>0</iGreatPeopleRateModifier>
<iGreatGeneralRateModifier>0</iGreatGeneralRateModifier>
<iDomesticGreatGeneralRateModifier>0</iDomesticGreatGeneralRateModifier>
<iStateReligionGreatPeopleRateModifier>0</iStateReligionGreatPeopleRateModifier>
<iDistanceMaintenanceModifier>0</iDistanceMaintenanceModifier>
<iNumCitiesMaintenanceModifier>0</iNumCitiesMaintenanceModifier>
<iCorporationMaintenanceModifier>0</iCorporationMaintenanceModifier>
<iExtraHealth>0</iExtraHealth>
<iFreeExperience>0</iFreeExperience>
<iWorkerSpeedModifier>0</iWorkerSpeedModifier>
<iImprovementUpgradeRateModifier>0</iImprovementUpgradeRateModifier>
<iMilitaryProductionModifier>0</iMilitaryProductionModifier>
<iBaseFreeUnits>0</iBaseFreeUnits>
<iBaseFreeMilitaryUnits>0</iBaseFreeMilitaryUnits>
<iFreeUnitsPopulationPercent>0</iFreeUnitsPopulationPercent>
<iFreeMilitaryUnitsPopulationPercent>0</iFreeMilitaryUnitsPopulationPercent>
<iGoldPerUnit>0</iGoldPerUnit>
<iGoldPerMilitaryUnit>0</iGoldPerMilitaryUnit>
<iHappyPerMilitaryUnit>0</iHappyPerMilitaryUnit>
<bMilitaryFoodProduction>0</bMilitaryFoodProduction>
<iMaxConscript>0</iMaxConscript>
<bNoUnhealthyPopulation>0</bNoUnhealthyPopulation>
<iExpInBorderModifier>0</iExpInBorderModifier>
<bBuildingOnlyHealthy>0</bBuildingOnlyHealthy>
<iLargestCityHappiness>0</iLargestCityHappiness>
<iWarWearinessModifier>0</iWarWearinessModifier>
<iFreeSpecialist>0</iFreeSpecialist>
<iTradeRoutes>0</iTradeRoutes>
<bNoForeignTrade>0</bNoForeignTrade>
<bNoCorporations>0</bNoCorporations>
<bNoForeignCorporations>0</bNoForeignCorporations>
<iCivicPercentAnger>0</iCivicPercentAnger>
<bStateReligion>0</bStateReligion>
<bNoNonStateReligionSpread>0</bNoNonStateReligionSpread>
<iStateReligionHappiness>0</iStateReligionHappiness>
<iNonStateReligionHappiness>0</iNonStateReligionHappiness>
<iStateReligionUnitProductionModifier>0</iStateReligionUnitProductionModifier>
<iStateReligionBuildingProductionModifier>0</iStateReligionBuildingProductionModifier>
<iStateReligionFreeExperience>0</iStateReligionFreeExperience>
<YieldModifiers/>
<CapitalYieldModifiers/>
<TradeYieldModifiers/>
<CommerceModifiers/>
<CapitalCommerceModifiers/>
<SpecialistExtraCommerces/>
<Hurrys/>
<SpecialBuildingNotRequireds/>
<SpecialistValids/>
<BuildingHappinessChanges/>
<BuildingHealthChanges/>
<FeatureHappinessChanges/>
<ImprovementYieldChanges/>
<WeLoveTheKing/>
</CivicInfo>


GameTextInfos_Objects:

Spoiler :
<TEXT>
<Tag>TXT_KEY_CIVIC_CONSCRIPTION</Tag>
<English>Conscription</English>
<French>
<Text>Conscription</Text>
<Gender>Female</Gender>
<Plural>0</Plural>
</French>
<German>
<Text>Conscription</Text>
<Gender>Male</Gender>
<Plural>0</Plural>
</German>
<Italian>
<Text>Conscription</Text>
<Gender>Female</Gender>
<Plural>0</Plural>
</Italian>
<Spanish>
<Text>Conscription</Text>
<Gender>Female</Gender>
<Plural>0</Plural>
</Spanish>
<Finnish>Conscription</Finnish>
</TEXT>


It worked flawlessly with everything else in the military column, so I assumed the word 'conscription' clashed with something.

"Conscription" is already in use by the game to refer to the drafting mechanic, so you can't use that exact name for something else unless you rename all mentions of the drafting mechanic in the game files to something else. Or you just figure out another name for the civic. ;)

DoC uses the name.
 
The iMaxConscript tag controls the number of available drafts per turn (in game value is modified by world map size). Are you saying that without coding any effects for the civic it still displays a very high number of drafts per turn?

You can always change the text key to something else, could be that the TXT_KEY_CIVIC_CONSCRIPTION key is used by the game already and you end up overwriting it. The name of the tag itself does not really matter.
 
Just saying, I went through exactly the same thing when I made my modmod for Legends of Revolution and introduced a military civics column and named one of them Conscription in the gamefiles initially, leading to exactly the same issue. If you must repeat my mistake, at least repeat my solution too and just rename it to something else.
 
The iMaxConscript tag controls the number of available drafts per turn (in game value is modified by world map size). Are you saying that without coding any effects for the civic it still displays a very high number of drafts per turn?

Apparently.

You can always change the text key to something else, could be that the TXT_KEY_CIVIC_CONSCRIPTION key is used by the game already and you end up overwriting it. The name of the tag itself does not really matter.

OK, I just renamed the key something else and kept the tag. And it worked! :wallbash::wallbash::wallbash::wallbash::wallbash::wallbash::wallbash::wallbash:
 
Hi, Leo! Recently we try to add Qing Dynasty to DoC 1.13. Generally we are succeed, but there are also two bugs.

First we find that when we play as any civs except Qing, the Core Area of all civs become Historical Area, and collapsed soon. Second there is a line in South China remains Chinese culture but not Qing culture, though China is not alive now.

Look forward to your favourable reply!

Download: http://pan.baidu.com/s/1pKu3Tbl

Picture: http://i68.tinypic.com/2vvjip2.jpg
 
Good to see you're still working on this. Are Python exceptions enabled? This looks like something goes wrong in the Python code.
 
Call me stupid, but how do I download individual files from Git? I'd like to download the files changed by yesterday's commit (except for the buildings thing, I did that manually) and replace my outdated versions in Dawn of Knoedel with them.
 
I don't think you can, you have to download the entire zip file.
 
Urgh, what's the point of Git the- wait a minute... I think I just thought of a workaround: The commits all point out which files exactly were changed. What I could do is update my local version of DoC again with Git pull and then just copy them from there.
 
Oh you have the git client working. Just do a pull, you will get all files but why wouldn't you want that anyway?
 
Well, I would have preferred to just download the files with my browser, and the fact that I can see which files exactly were changed in each commit is a relevation I only had some hours ago too.
 
Where do I remove the restrictions on building farms on flood plains before Biology?
 
Constructing an improvement is called a "build" in Civ, you can edit them here: Assets/XML/Units/CIV4BuildInfos.xml.
 
Where is the Civilopedia text for DoC stored?
 
Assets/XML/Text/Civilopedia.xml.
 
That doesn't exist, or if it does it isn't called that. I did a search and everything.
 
Back
Top Bottom