Need help for Civ 5 mod, first turn production crash.

CGanimated1227

Chieftain
Joined
May 19, 2016
Messages
7
I need help with a mod that I am working on. The modder I was previously being helped by has stopped being of use and I need to know what to do. The situation is this: I managed to finish icon atlases and other files. The Civ functions normally up until the point where I have to pick a production, but when I select the production, the game crashes. The modder I have been working with was good help to me up until now. I did everything he said but my mod still won't work and i don't want to start from scratch. I have logging enabled and I have been testing this for weeks. The database says that nothing is wrong besides the annoying "does not exist in Language_en_US" things. I know those aren't the problem because they have no effect on anything. Can anyone tell me what I can do to fix the problem?


Hopefully, I can stop asking for help after this.
 
  1. This code from your Buildings.xml file is no good:
    Spoiler :
    Code:
      <Buildings>
        <Row>
          <Type>BUILDING_PEACEKEEPER_FOUNDRY</Type>
          <Description>TXT_KEY_BUILDING_PEACEKEEPER_FOUNDRY</Description>
          <Civilopedia>TXT_KEY_CIV5_BUILDINGS_MILITARYACADEMY_TEXT</Civilopedia>
          <Strategy>TXT_KEY_BUILDING_PEACEKEEPER_FOUNDRY_STRATEGY</Strategy>
          <Help>TXT_KEY_BUILDING_PEACEKEEPER_FOUNDRY_HELP</Help>
          <GoldMaintenance>1</GoldMaintenance>     
          <NeverCapture>1</NeverCapture>
          <Cost>300</Cost>
          <Happiness>3</Happiness>
          <BuildingClass>BUILDINGCLASS_MILITARY_ACADEMY</BuildingClass>
          <ArtDefineTag>ART_DEF_BUILDING_MILITARY_ACADEMY</ArtDefineTag>
          [color="red"]<ReplacementBuildingClass>BUILDINGCLASS_MILITARY_ACADEMY</ReplacementBuildingClass>[/color]
          <TrainedFreePromotion>PROMOTION_PRIZE_SHIPS</TrainedFreePromotion>
          <PrereqTech>TECH_MILITARY_SCIENCE</PrereqTech>
          <PortraitIndex>3</PortraitIndex>
          <IconAtlas>CIV_METAL_ATLAS</IconAtlas>
        </Row>
    	<Row>
    	  <Type>BUILDING_GRAND_HALL</Type>
    	  <Description>TXT_KEY_BUILDING_GRAND_HALL</Description>
    	  <Civilopedia>TXT_KEY_CIV5_BUILDINGS_GRAND_HALL_TEXT</Civilopedia>
    	  <Strategy>TXT_KEY_BUILDING_GRAND_HALL_STRATEGY</Strategy>
    	  <Help>TXT_KEY_BUILDING_GRAND_HALL_HELP</Help>
    	  <MutuallyExclusiveGroup>-1</MutuallyExclusiveGroup>
    	  <Capital>1</Capital>
    	  <NeverCapture>1</NeverCapture>
    	  <NukeImmune>1</NukeImmune>
    	  <Defense>250</Defense>
    	  <BuildingClass>BUILDINGCLASS_PALACE</BuildingClass>
    	  <ArtDefineTag>PALACE</ArtDefineTag>
    	  [color="red"]<ReplacementBuildingClass>BUILDINGCLASS_PALACE</ReplacementBuildingClass>[/color]
    	  <GreatWorkSlotType>GREAT_WORK_SLOT_MUSIC</GreatWorkSlotType>
    	  <GreatWorkCount>4</GreatWorkCount>
    	  <PortraitIndex>2</PortraitIndex>
    	  <IconAtlas>CIV_METAL_ATLAS</IconAtlas>
    	</Row>  
      </Buildings>
    • <ReplacementBuildingClass> in table <Buildings> is used to specify a class of building that will supplant (for example) BUILDING_PEACEKEEPER_FOUNDRY. So if I specify
      Code:
      <ReplacementBuildingClass>BUILDINGCLASS_THINGAMAJIG</ReplacementBuildingClass>
      within the definition of BUILDING_PEACEKEEPER_FOUNDRY what I am telling the game is that as soon as the tech required for a BUILDINGCLASS_THINGAMAJIG building is researched, BUILDING_PEACEKEEPER_FOUNDRY will no longer be constructable in any of my cities, and I will have to construct the building that is correct for my civilization from within BUILDINGCLASS_THINGAMAJIG.
    • The result as you are trying to use <ReplacementBuildingClass> is an irreconcilable conflict because you are attempting to tell the game that a Building-Class will replace itself when the correct technology for the Building-Class is discovered.
    • Eliminate entirely the two lines shown in red. This will fix your crash-to-desktop.
  2. You are also assigning 4 great works of music slots to a Palace-Class Building. Palaces are hardcoded in the game's file that controls the Culture Overview Panel, so in order to get it to work you also need KyteM's Dynamic Culture Overview mod. You can also just add the files from KyteM's mod into your mod. Many of JFD's mods do this, as does Pouakia's Enlightenment Era mod, so you can use these as a reference on how you need to set-up the files from KyteM's mod.
  3. You don't need the JPG, PNG, or BMP files that are attached as part of the mod. Eliminate them from the mod and save some memory space. If you want to keep them as reference just copy them using your normal browser to the overall project folder directly under Documents/Firaxis ModBuddy/, then from within ModBuddy delete the files from the mod.
  4. Your unique unit that is both a great musician and a great general will probably not cause the game to crash since you have defined it as belonging to the great musician class of unit, and no other unit-class. But an AI will never use the unit to make a Citadel.
 
Thanks for your help. I knew something was wrong with the buildings. About the Music slots, though. What exactly am I supposed to look for in the files in the Dynamic Culture Overview mod and the Enlightenment Era mod?
 
IIRC, the Dynamic Culture Overview (DCO) debugs the culture overview UI.
For example, without DCO, if you add a great work slot to a building that originally didn't have one, the slot simply doesn't show up in the Culture overview! The same goes if you remove a great work slot from a building that originally did have one, it will keep showing up as if it had a great work slot! DCO simply fixes that issue (IIRC) :)
 
Thanks for your help. I knew something was wrong with the buildings. About the Music slots, though. What exactly am I supposed to look for in the files in the Dynamic Culture Overview mod and the Enlightenment Era mod?

IIRC, the Dynamic Culture Overview (DCO) debugs the culture overview UI.
For example, without DCO, if you add a great work slot to a building that originally didn't have one, the slot simply doesn't show up in the Culture overview! The same goes if you remove a great work slot from a building that originally did have one, it will keep showing up as if it had a great work slot! DCO simply fixes that issue (IIRC) :)

Troller is correct.

What you want is the entire set of files from KyteM's Dynamic Culture Overview mod. You copy all of his files as-is without attempting to edit them, and then you make settings within your ModBuddy Project for these files in the same manner as is done within KyteM's mod. If you look at KyteM's mod, and open the xxxx.modinfo file for his mod in Notepad or some other text editor, the modinfo file will show you all the settings made for KyteM's mod when he created it in ModBuddy.

If you look at the modinfo file for the Enlightenment Era mod, you will see the same filenames are listed, and the settings within the modinfo file that relate to the files taken from Dynamic Culture Overview and added into Enlightenment Era are the same between the two mods and their respective modinfo files.

-----------------------------------------------------------

Your other alternative is to tell users they must download and have KyteM's mod enabled in order for your mod to run correctly. Problem is, people never read the manual...or the mod usage instructions.
 
Troller is correct.

What you want is the entire set of files from KyteM's Dynamic Culture Overview mod. You copy all of his files as-is without attempting to edit them, and then you make settings within your ModBuddy Project for these files in the same manner as is done within KyteM's mod. If you look at KyteM's mod, and open the xxxx.modinfo file for his mod in Notepad or some other text editor, the modinfo file will show you all the settings made for KyteM's mod when he created it in ModBuddy.

If you look at the modinfo file for the Enlightenment Era mod, you will see the same filenames are listed, and the settings within the modinfo file that relate to the files taken from Dynamic Culture Overview and added into Enlightenment Era are the same between the two mods and their respective modinfo files.

Alright, I did that. I added the xml through the actions tab and added the lua through the content tab. I didn't change any of the files' content, but when I test the mod, the culture overview menu opens when the game starts and won't close! Any fixes of this guys?
 
Alright, I did that. I added the xml through the actions tab and added the lua through the content tab. I didn't change any of the files' content, but when I test the mod, the culture overview menu opens when the game starts and won't close! Any fixes of this guys?
From the modinfo file of KyteM's mod:
Code:
  <Files>
    <File md5="4486E05E92C6A1829D1BD4FC8EAB80DE" import="1">CultureOverview.lua</File>
    <File md5="BF85D174CA9D4F2EC2AD7E3FBB6C0D6D" import="1">CultureOverview.xml</File>
  </Files>
And from the modinfo file of the Enlightendment Era mod
Code:
    <File md5="4486E05E92C6A1829D1BD4FC8EAB80DE" import="1">Lua/CultureOverview.lua</File>
    <File md5="BF85D174CA9D4F2EC2AD7E3FBB6C0D6D" import="1">Lua/CultureOverview.xml</File>
Neither file is used as an "OnModActivated" under the Actions tab or as an "InGameUIAddin" under the Content tab of ModBuddy. Within your mod they both need to be placed within the same folder (as is done in Enlightenment Era) and they both need to set as ImportIntoVFS=true within MopBuddy for the file properties of the two files. See also whoward69's what ModBuddy setting for what file types tutorial with regard to replacing entire game-files for UI elements such as the Culture Overview Panel.
 
Top Bottom