[Help] Some questions about mod bugs

Harkodos

Warlord
Joined
Feb 9, 2016
Messages
197
Greetings, I am Harkodos. Long-time Civilization player, first time Civ 5 Modder.

I've recently decided to take up modding Civ 5, but have found numerous road blocks on my journey. These are probably the typical pitfalls of any upcoming modder, but I thought I'd like to inquire about some specific issues that I'm having.

I'm currently in the process of making a Civilization based off of Kefka Palazzo from Final Fantasy VI. I've been using numerous other mods as reference, and I can't seem to find out what is causing the problems in my mod. I want to illustrate each problem I have as carefully and exact to my knowledge as possible so it can be resolved efficiently.

First and foremost:
My Civilization is somewhat defined so it can at least RUN, which is good. The Mod can be selected in the Mods tab like other mods:
Spoiler :
WcEzatyV5Iz8RTmHx-t7LT5q56BWccysfSz80obw8EI

However: First snag is here, when I go to select the Civ I created in the Select Civilization tab, I get a screen like this without a scroll bar:
Spoiler :
7ab6AFcdnxhw5ya4pW6sFJwFbAIa6Ftc58OVjVuQXJI

I can select the Civ like normal in the Advanced Options tab, like so:
Spoiler :
LWkYXQseAxuWHXiAGbH9nJjtdAw0Ll-J2PUzyVxgeg4

But then when I actually start the game I get this:
Spoiler :
hND1MemHFNOd_2Y5ndYthMcTnPG3O0PyeZZmjAixwAI

I believe this problem may have something to do with my Civ not having "Uniques" defined, though I'm certain I defined them in my code:

Spoiler :

For my unique Unit (In the Units File):
Code:
	<Units>
		<Row>
			<Class>UNITCLASS_WW1_TANK</Class>
			<Type>UNIT_MAGITEK_ARMOR</Type>
			<PrereqTech>TECH_STEAM_POWER</PrereqTech>
			<Combat>55</Combat>
			<Cost>350</Cost>
			<Moves>3</Moves>
			<BaseSightRange>2</BaseSightRange>
			<CombatClass>UNITCOMBAT_ARMOR</CombatClass>
			<Domain>DOMAIN_LAND</Domain>
			<DefaultUnitAI>UNITAI_DEFENSE</DefaultUnitAI>
			<Description>TXT_KEY_UNIT_MAGITEK_ARMOR_DESC</Description>
			<Civilopedia>TXT_KEY_CIV5_UNITS_INDUSTRIAL_MAGITEK_ARMOR_PEDIA</Civilopedia>
			<Strategy>TXT_KEY_UNIT_MAGITEK_ARMOR_STRATEGY</Strategy>
			<Help>TXT_KEY_UNIT_MAGITEK_ARMOR_HELP</Help>
			<MilitarySupport>true</MilitarySupport>
			<MilitaryProduction>true</MilitaryProduction>
			<Pillage>true</Pillage>
			<Mechanized>true</Mechanized>
			<NukeDamageLevel>-1</NukeDamageLevel>
			<Conscription>true</Conscription>
			<CombatLimit>100</CombatLimit>
			<ObsoleteTech>TECH_COMBINED_ARMS</ObsoleteTech>
			<IgnoreBuildingDefense>true</IgnoreBuildingDefense>
			<GoodyHutUpgradeUnitClass>UNITCLASS_TANK</GoodyHutUpgradeUnitClass>
			<AdvancedStartCost>30</AdvancedStartCost>
			<XPValueAttack>3</XPValueAttack>
			<XPValueDefense>3</XPValueDefense>
			<UnitArtInfo>ART_DEF_UNIT_MAGITEK_ARMOR</UnitArtInfo>
			<UnitFlagAtlas>MAGITEK_ARMOR_ALPHA_ICON</UnitFlagAtlas>
			<UnitFlagIconOffset>0</UnitFlagIconOffset>
			<IconAtlas>ATLAS_KEFKA</IconAtlas>
			<PortraitIndex>1</PortraitIndex>
			<MoveRate>ROBOT</MoveRate>
		</Row>
	</Units>
And in the Civilization File:
Code:
	<Civilization_UnitClassOverrides>
		<Row>
			<CivilizationType>CIVILIZATION_THE_CULT_OF_KEFKA</CivilizationType>
			<UnitClassType>UNITCLASS_WW1_TANK</UnitClassType>
			<UnitType>UNIT_MAGITEK_ARMOR</UnitType>
		</Row>
	</Civilization_UnitClassOverrides>

And for the Unique Building(s) (In the Buildings File):
Code:
		<Row>
			<Type>BUILDING_MAGITEK_RESEARCH_FACILITY</Type>
			<Description>TXT_KEY_BUILDING_MAGITEK_RESEARCH_FACILITY_DESC</Description>
			<Civilopedia>TXT_KEY_CIV5_BUILDINGS_MAGITEK_RESEARCH_FACILITY_PEDIA</Civilopedia>
			<Strategy>TXT_KEY_BUILDING_MAGITEK_RESEARCH_FACILITY_STRATEGY</Strategy>
			<Help>TXT_KEY_BUILDING_MAGITEK_RESEARCH_FACILITY_HELP</Help>
			<ArtDefineTag>ART_DEF_BUILDING_MAGITEK_RESEARCH_FACILITY</ArtDefineTag>
			<GoldMaintenance>3</GoldMaintenance>
			<MutuallyExclusiveGroup>-1</MutuallyExclusiveGroup>
			<Cost>360</Cost>
			<HurryCostModifier>0</HurryCostModifier>
			<MinAreaSize>-1</MinAreaSize>
			<BuildingClass>BUILDINGCLASS_FACTORY</BuildingClass>
			<PrereqTech>TECH_INDUSTRIALIZATION</PrereqTech>
			<SpecialistType>SPECIALIST_ENGINEER</SpecialistType>
			<SpecialistCount>2</SpecialistCount>
			<XBuiltTriggersIdeologyChoice>3</XBuiltTriggersIdeologyChoice>
			<ConquestProb>66</ConquestProb>
			<WonderSplashAnchor>R,T</WonderSplashAnchor>
			<IconAtlas>ATLAS_KEFKA</IconAtlas>
			<PortraitIndex>2</PortraitIndex>
		</Row>
		<Row>
			<Type>BUILDING_KEFKA_MONUMENT</Type>
			<BuildingClass>BUILDINGCLASS_MONUMENT</BuildingClass>
			<FreeStartEra>ERA_MEDIEVAL</FreeStartEra>
			<Cost>40</Cost>
			<GoldMaintenance>0</GoldMaintenance>
			<Help>TXT_KEY_BUILDING_KEFKA_MONUMENT_HELP</Help>
			<Description>TXT_KEY_BUILDING_KEFKA_MONUMENT_DESC</Description>
			<Civilopedia>TXT_KEY_CIV5_BUILDINGS_KEFKA_MONUMENT_PEDIA</Civilopedia>
			<Strategy>TXT_KEY_BUILDING_KEFKA_MONUMENT_STRATEGY</Strategy>
			<ArtDefineTag>ART_DEF_BUILDING_KEFKA_MONUMENT</ArtDefineTag>
			<MinAreaSize>-1</MinAreaSize>
			<HurryCostModifier>40</HurryCostModifier>
			<IconAtlas>BW_ATLAS_1</IconAtlas>
			<NeverCapture>true</NeverCapture>
			<PortraitIndex>21</PortraitIndex>
		</Row>
And again in the Civilizations File:
Code:
	<Civilization_BuildingClassOverrides>
		<Row>
			<CivilizationType>CIVILIZATION_THE_CULT_OF_KEFKA</CivilizationType>
			<BuildingClassType>BUILDINGCLASS_FACTORY</BuildingClassType>
			<BuildingType>BUILDING_MAGITEK_RESEARCH_FACILITY</BuildingType>
		</Row>
	</Civilization_BuildingClassOverrides>
	<Civilization_BuildingClassOverrides>
		<Row>
			<CivilizationType>CIVILIZATION_THE_CULT_OF_KEFKA</CivilizationType>
			<BuildingClassType>BUILDINGCLASS_MONUMENT</BuildingClassType>
			<BuildingType>BUILDING_KEFKA_MONUMENT</BuildingType>
		</Row>
	</Civilization_BuildingClassOverrides>

So I'm wondering if I actually DID define the information correctly? I followed the designs of the other Mods Civs I've used for reference, but mine still seems to have these problems. Did I misspell or incorrectly reference one of the data tables? I read somewhere that a single typo could cause problems, but I only found one when I browsed through it (fixing it didn't change anything, really. It was a typo for the UU).

Also, following the above image, does the game recognize Black as a transparency color? I haven't actually made the DOM, Leader, or MapSelect images yet, so they should all be black screens, but instead I get the Red and Grey checkered screen. Just want to be sure of that so I won't use black anymore (that, or I may have goofed and created transparent .dds images instead of black like I intended by accident).

On to the next problem, when I start the game, I notice this setup:
Spoiler :
tnMjmhRxq06gimigtQm-ORGs2C52NMkMc_on0aQh6NE

At first glance you'd think: Nothing's wrong with that, looks good to me! but then let me point you to this bit of code I made here:
Spoiler :
Code:
	<Civilization_Start_Region_Priority>
		<Row>
			<CivilizationType>CIVILIZATION_THE_CULT_OF_KEFKA</CivilizationType>
			<RegionType>REGION_PLAINS</RegionType>
		</Row>
	</Civilization_Start_Region_Priority>
	<Civilization_Start_Region_Priority>
		<Row>
			<CivilizationType>CIVILIZATION_THE_CULT_OF_KEFKA</CivilizationType>
			<RegionType>REGION_DESERT</RegionType>
		</Row>
	</Civilization_Start_Region_Priority>
	<Civilization_Start_Region_Avoid>
		<Row>
			<CivilizationType>CIVILIZATION_THE_CULT_OF_KEFKA</CivilizationType>
			<RegionType>REGION_FOREST</RegionType>
		</Row>
	</Civilization_Start_Region_Avoid>
	<Civilization_Start_Region_Avoid>
		<Row>
			<CivilizationType>CIVILIZATION_THE_CULT_OF_KEFKA</CivilizationType>
			<RegionType>REGION_JUNGLE</RegionType>
		</Row>
	</Civilization_Start_Region_Avoid>
As I've programmed it, my Civ should want to start near Plains and Desert and avoid Jungle and Forest, and yet in the games I've loaded up, they almost ALWAYS start near Forests and Jungle, but ALSO have Plains and Desert within a short distance. With that in mind, I have to wonder does the Civilization_Start_Region_Avoid tag actually work? Or does it work in reverse, even? I've seen games where Egypt for example started surrounded by forest, even though they're supposed to avoid this terrain at startup. Does the tag need to be reworked, does it work at all? What am I missing here? Did BNW change how that tag works?

Next problem: Continuing with the unique Buildings and Units trouble I'm having, this is what I get when I go into my city:
Spoiler :
2sd7nHodTNF1ndmM7GvpVyw6XLVSYCvREOipxNSfwgg

It seems my replacement isn't appearing in the game and thus makes it impossible to build a Monument. Similar results affect the Unique Unit and other Unique Building:
Spoiler :
Nsa1BMdaAo_BdsUwEAKr9EJmRoKog096wZ719uYS8xQ

My unique building should replace the Factory and appear in Industrialization, whereas my unique unit should replace the Landship (which curiously still appears, even though I've created definitions to replace it), and should appear in Steam Power. I'll assume this still involves my improper defining of the Unit and Buildings, so I'm certain once they're resolved, this problem will no longer be an issue.

I'll assume these next two screenshots are also a result of the unit and buildings being improperly defined:
Spoiler :
N9T1j647w_wBgMhctPOyBmSC5ZsWUvCLynePfxQholM

a2fzovvs9dB4NVa6BxQeZ7wZT3umpw7JY6Ddw7rQk2M

As would be expected, their Civilopedia pages do not appear at all (in the Industrial era tabs or otherwise).

And finally, I believe I may not have defined the Leader properly, as I get this in the Civilopedia File:
Spoiler :
W92saG--4Y1sT5Su4rNJmcyXqmpjmRL0eyxDNFTq_Gs

The leader's page is... lacking, even though I've pretty much defined everything in the game for the leader at this point:
Spoiler :
Code:
		<Row>
			<Type>LEADER_KEFKA</Type>
			<Description>TXT_KEY_LEADER_KEFKA</Description>
			<Civilopedia>TXT_KEY_LEADER_KEFKA_PEDIA</Civilopedia>
			<CivilopediaTag>TXT_KEY_CIVILOPEDIA_LEADERS_KEFKA</CivilopediaTag>
			<ArtDefineTag>Kefka_Scene.xml</ArtDefineTag>
			<VictoryCompetitiveness>3</VictoryCompetitiveness>
			<WonderCompetitiveness>1</WonderCompetitiveness>
			<MinorCivCompetitiveness>2</MinorCivCompetitiveness>
			<Boldness>9</Boldness>
			<DiploBalance>3</DiploBalance>
			<WarmongerHate>1</WarmongerHate>
			<WorkAgainstWillingness>8</WorkAgainstWillingness>
			<WorkWithWillingness>5</WorkWithWillingness>
			<DenounceWillingness>3</DenounceWillingness>
			<DoFWillingness>7</DoFWillingness>
			<Loyalty>5</Loyalty>
			<Neediness>3</Neediness>
			<Forgiveness>8</Forgiveness>
			<Chattiness>9</Chattiness>
			<Meanness>9</Meanness>
			<PortraitIndex>0</PortraitIndex>
			<IconAtlas>ATLAS_KEFKA</IconAtlas>
			<PackageID/>
		</Row>
(Just a few examples of the Civilopedia text)
Code:
		<!--Kefka-->
		<Row Tag="TXT_KEY_LEADER_KEFKA">
			<Text>Kefka Palazzo</Text>
		</Row>
		<!--Pedia-->
		<Row Tag="TXT_KEY_LEADER_KEFKA_PEDIA">
			<Text>About Kefka</Text>
		</Row>
		<Row Tag="TXT_KEY_CIVILOPEDIA_LEADERS_KEFKA_HEADING_1">
			<Text>History</Text>
		</Row>
Curiously, THIS is the only page that's completely 100% perfect (Save for a few spelling errors I JUST noticed thanks to this post):
Spoiler :
dDkGV_Qzb1t8tqKhQBN95B3-Fz52Lq4GiI0dU-BsDYI

So my question there is does the Civilopedia demand a SPECIFIC type of formatting? In the other Mod Civs I've looked at, it didn't really seem to matter, yet by formatting like so:
Spoiler :
Just some examples:
Code:
		<Row Tag="TXT_KEY_CIV5_THE_CULT_OF_KEFKA_DESC">
			<Text>The Cult of Kefka</Text>
			<Gender>neuter:an</Gender>
		</Row>
		<Row Tag="TXT_KEY_CIV5_THE_CULT_OF_KEFKA_HEADING_1">
			<Text>History</Text>
		</Row>
Code:
		<Row Tag="TXT_KEY_CIV5_THE_CULT_OF_KEFKA_TEXT_1">
			<Text>The Cult of Kefka existed for a period of less than a year. It consists primarily of individuals who have given up life and hope; preferring to spend all of their time worshipping Kefka for fear of being destroyed by his Light of Judgement. Because the cult consists only of the individuals who have given up life and hope, it is likely that most members have either lost loved ones, or been stripped of something irreplaceable, as there are still many individuals in the World of Ruin that do not join or belong to the cult.</Text>
		</Row>

I'm able to get the only page that looks absolutely like it should. Very curious this is to me.

Also, I haven't defined the Character's trait fully yet (two of his three abilities ARE defined, but require Monuments to work, and those aren't working at present). I'm certain it'll require some LUA programming, but I'll deal with that after these problems are resolved, if possible.

One last thing, I get this graphical error when leaving the game:
Spoiler :
RbP3Wzf0e1B76HvZ-PlMNQ-S1vVATkd7cWok5MsL9dU

For reasons unknown to me, it displays the image for the Settler Difficulty setting and the Marathon timescale, even though I have it set to Deity and Quick (the game still plays as such). So, I'm wondering how what I've programmed could possibly affect those, unless SOMEHOW, my Atlas definitions are getting in the way, but that seems ridiculous to me. Also, there's a little finger pointer in the bottom right corner that I've never noticed before. I assume that's because it belongs with the Settler difficulty and is for some reason appearing now.

Anyways, those are the problems I'm having and can remember off the top of my head. If anyone is willing to help me, I'd greatly appreciate it. Once I get these bugs licked, I plan to make many more custom Civs. I really hope that this one can be a big first step towards that goal.

Cheers,
Harkodos
 
Attach the actual mod to a post: whoward69's zip your mods and attach tutorial

  1. As added stress on the point, we need the actual mod as it is in the game's MODS folder, and not the project from within the "Firaxis ModBuddy" folder.
  2. Many first-timers don't read William Howard's tutorial closely enough, or get in a hurry or something, and attach a copy of the whole project from within the Firaxis Modbuddy folder. But those are useless to us because we cannot drop that into the game's MODS folder on our end to see what the mod is actually doing in-game.

My suspicion is that you:
There is also this, which may or may not shed light on your problems if it is indeed an 'incorrect ModBuddy procedure': Common Novice-Modder Mistakes -- "INCORRECT OPERATION IN MODBUDDY"
 
All your images are broken.

If I copy/paste the urls directly into the browser, dropbox is telling me I don't belong there and probably need to sign in
 
D'OH! :cry: I knew I was going to screw up something with my first post...

All your images are broken.

If I copy/paste the urls directly into the browser, dropbox is telling me I don't belong there and probably need to sign in
I just saw that myself. C'mon Dropbox, really?

Alright, well here's the Mod Package, as described.
 

Attachments

  1. Review William Howard's tutorial on file type settings in ModBuddy. You have at least two files set as both "ImportIntoVFS=true" and "OnModActivated -> UpdateDatabase". No file should ever be set up this way in Modbuddy.
  2. You have this
    Code:
    <ArtDefine_StrategicView>
    	<Row>
    		<StrategicViewType>ART_DEF_UNIT_MAGICTEK_ARMOR</StrategicViewType>
    		<TileType>Unit</TileType>
    		<Asset>SV_MagitekArmor.dds</Asset>
    	</Row>
    </ArtDefine_StrategicView>
    In both your Kefka_Units.xml and your Kefka_ArtDefines.xml files.
  3. There is no such unit-class as "UNITCLASS_WW1_TANK" nor for that matter "UNIT_WW1_TANK". The correct designations are UNITCLASS_WWI_TANK and UNIT_WWI_TANK. Note the use of the capital 'I' and not the numeral '1'. You did not make this common mistake for your Unit, obviously, but you did make it when designating the Unit-Class.
  4. Table <Traits> has no such columns defined within the table as "DOWCombatBonusModifier" or "MonumentProductionModifier". See Common Novice-Modder Mistakes -- "INCORRECTLY USING COLUMN NAMES".
    This error causes the entire contents of file Kefka_Traits.xml to be rejected by the game.
  5. Have you defined this referenced ART_DEF name elsewhere in your mod?
    <ArtDefineTag>ART_DEF_CIVILIZATION_THE_CULT_OF_KEFKA</ArtDefineTag>
  6. Same comment as above for this
    <ArtDefineTag>ART_DEF_BUILDING_MAGITEK_RESEARCH_FACILITY</ArtDefineTag>
    and this
    <ArtDefineTag>ART_DEF_BUILDING_KEFKA_MONUMENT</ArtDefineTag>
    For buildings, just use "NONE" or use the same one as used by the game for Factories and Monuments.
  7. No such resource as RESOURCE_CATTLE, as is used here:
    Code:
    	<Building_ResourceYieldChanges>
    		<Row>
    			<BuildingType>BUILDING_MAGITEK_RESEARCH_FACILITY</BuildingType>
    			<ResourceType>RESOURCE_BISON</ResourceType>
    			<YieldType>YIELD_SCIENCE</YieldType>
    			<Yield>1</Yield>
    		</Row>
    		<Row>
    			<BuildingType>BUILDING_MAGITEK_RESEARCH_FACILITY</BuildingType>
    			<ResourceType>[color="red"]RESOURCE_CATTLE[/color]</ResourceType>
    			<YieldType>YIELD_SCIENCE</YieldType>
    			<Yield>1</Yield>
    		</Row>
    Nor is there any such resource as RESOURCE_HORSES, as is used here:
    Code:
    		<Row>
    			<BuildingType>BUILDING_MAGITEK_RESEARCH_FACILITY</BuildingType>
    			<ResourceType>[color="red"]RESOURCE_HORSES[/color]</ResourceType>
    			<YieldType>YIELD_SCIENCE</YieldType>
    			<Yield>1</Yield>
    		</Row>
    The correct designations are RESOURCE_COW and RESOURCE_HORSE. Your usages are also commonly-made mistakes.
  8. Your code within file Kefka_ArtDefines.xml doesn't look right, but I don't have time at the moment to look more closely at the file.
  9. I would highly advise you enable error logging and make use of the error reports that will be made to file Database.log after you do enable logging: whoward69's enable error logging tutorial. Nearly all if not all of these errors will have been reported in one way or the other.
 
Back
Top Bottom