Help with my civ and city-state mods

Blazikenpwnsyou

Chieftain
Joined
May 29, 2016
Messages
36
Location
Bloomington, IL
I'm not sure where exactly to post this, so if any admin knows where this should do, move it for me.

I have two of my mods, and they somehow don't seem to work once I began testing them.

The Denpa Colony: https://www.dropbox.com/s/leht3surqrxfb96/The Denpa Colony.zip?dl=0
The civ never shows up on the civ selection screen. (Updated, but someone will have to fix the rest of the issues for me.)

Sonic Unleashed City-States:
https://www.dropbox.com/s/xlhdapiopr98qd5/Sonic Unleashed City-States.zip?dl=0

If there are people out there that like to debug and fix those bugs, let me know and send me reports on how they are not working.
 
Last edited:
  1. This error causes the entire Building xml-file to be rejected:
    Code:
    <GameData>
    	<Buildings>
    		<CultureRateModifier>66</CultureRateModifier>
    
    		<Row>
    			<Type>BUILDING_ANTENNATOWER</Type>
    You have <CultureRateModifier>66</CultureRateModifier> dangling in mid-air.
  2. <UnitFlagAtlas>sv_DenpacolonyCoinCat</UnitFlagAtlas> from your units file seems not to be defined anywhere
  3. wrong trait name:
    Code:
    	<Trait_FreePromotionUnitCombats>
    		<Row>
    			<TraitType>TRAIT_RIVER_EXPANSION</TraitType>
    			<UnitCombatType>UNITCOMBAT_MELEE</UnitCombatType>
    			<PromotionType>PROMOTION_SENTRY</PromotionType>
    		</Row>
                  ..........etc
  4. This file should be set as Import Into VFS = true in Modbuddy, and should not be listed in the "<OnModActivated>" list of files:Crystal_Scene.xml

    See whoward69's what ModBuddy setting for what file types tutorial
  5. You cannot attempt to redefine POLICY_MEDIA_CULTURE as you are doing here:
    Code:
    	<Policies>
    		<Row>
    			<Type>POLICY_MEDIA_CULTURE</Type>
    			<Description>TXT_KEY_DECISIONS_MEDIA_CULTURE</Description>
    		</Row>
    	</Policies>
    The game already has a policy registered with that name. Any attempt to restate an existing Policy <Type> name will simply result in the entire file being discarded.
  6. This also is not going to work:
    Code:
    	<Policy_BuildingClassTourismModifiers>
    		<Row>
    			<PolicyType>POLICY_MEDIA_CULTURE</PolicyType>
    			<BuildingClassType>BUILDINGCLASS_BROADCAST_TOWER</BuildingClassType>
    			<TourismModifier>4</TourismModifier>
    		</Row>
    	</Policy_BuildingClassTourismModifiers>
    Because the game already has:
    Code:
    	<Policy_BuildingClassTourismModifiers>
    		<Row>
    			<PolicyType>POLICY_MEDIA_CULTURE</PolicyType>
    			<BuildingClassType>BUILDINGCLASS_BROADCAST_TOWER</BuildingClassType>
    			<TourismModifier>34</TourismModifier>
    		</Row>
    	</Policy_BuildingClassTourismModifiers>
    Any building that fits into the BROADCAST_TOWER is automatically covered by this code. Your attempt to restate the value would result in all Buildings witihn the BROADCAST_TOWER Building-Class to only net 4% more tourism when any player adopts the policy. If you wish to alter the amount of Tourism Modification created by buildings within the BroadCast Tower BuildingClass, you would need to do an <Update>, like this:
    Code:
    <Policy_BuildingClassTourismModifiers>
    	<Update>
    		<Where PolicyType="POLICY_MEDIA_CULTURE" BuildingClassType="BUILDINGCLASS_BROADCAST_TOWER" />
    		<Set TourismModifier="4" />
    	</Update>
    </Policy_BuildingClassTourismModifiers>
    But then users of the mod would probably scream bug bug bug because the affect would apply any time the mod was enabled, even if the civ was not currently active within a game.
  7. See whoward69's enable error logging tutorial
  8. This is probably causing the leader to fail:
    Code:
    [776317.437] Invalid Reference on Leaders.IconAtlas - "DENPACOLONY_ICON_ATLAS" does not exist in IconTextureAtlases
  9. You also have these errors, some of which are mis-match in the names of the Unit, for example, between one place in the code and another:
    Code:
    [776318.765] Invalid Reference on Units.Help - "TXT_KEY_UNIT_HELP_COINCAT" does not exist in Language_en_US
    [776318.828] Invalid Reference on Units.Strategy - "TXT_KEY_UNIT_COINCAT_STRATEGY" does not exist in Language_en_US
    [776318.890] Invalid Reference on Units.Civilopedia - "TXT_KEY_CIV5_COINCAT_TEXT" does not exist in Language_en_US
    [776318.953] Invalid Reference on Units.Description - "TXT_KEY_UNIT_COINCAT" does not exist in Language_en_US
    [776318.968] Invalid Reference on Unit_FreePromotions.PromotionType - "PROMOTION_IGNORES_TERRAIN_COST" does not exist in UnitPromotions
    [776318.968] Invalid Reference on Unit_FreePromotions.UnitType - "UNIT_COIN_CAT" does not exist in Units
  10. The Promotion is PROMOTION_IGNORE_TERRAIN_COST: there is no S at the end of "IGNORE"
 
Last edited:
  1. This error causes the entire Building xml-file to be rejected:
    Code:
    <GameData>
        <Buildings>
            <CultureRateModifier>66</CultureRateModifier>
    
            <Row>
                <Type>BUILDING_ANTENNATOWER</Type>
    You have <CultureRateModifier>66</CultureRateModifier> dangling in mid-air.
  2. <UnitFlagAtlas>sv_DenpacolonyCoinCat</UnitFlagAtlas> from your units file seems not to be defined anywhere
  3. wrong trait name:
    Code:
        <Trait_FreePromotionUnitCombats>
            <Row>
                <TraitType>TRAIT_RIVER_EXPANSION</TraitType>
                <UnitCombatType>UNITCOMBAT_MELEE</UnitCombatType>
                <PromotionType>PROMOTION_SENTRY</PromotionType>
            </Row>
                  ..........etc
  4. This file should be set as Import Into VFS = true in Modbuddy, and should not be listed in the "<OnModActivated>" list of files:Crystal_Scene.xml

    See whoward69's what ModBuddy setting for what file types tutorial
  5. You cannot attempt to redefine POLICY_MEDIA_CULTURE as you are doing here:
    Code:
        <Policies>
            <Row>
                <Type>POLICY_MEDIA_CULTURE</Type>
                <Description>TXT_KEY_DECISIONS_MEDIA_CULTURE</Description>
            </Row>
        </Policies>
    The game already has a policy registered with that name. Any attempt to restate an existing Policy <Type> name will simply result in the entire file being discarded.
  6. This also is not going to work:
    Code:
        <Policy_BuildingClassTourismModifiers>
            <Row>
                <PolicyType>POLICY_MEDIA_CULTURE</PolicyType>
                <BuildingClassType>BUILDINGCLASS_BROADCAST_TOWER</BuildingClassType>
                <TourismModifier>4</TourismModifier>
            </Row>
        </Policy_BuildingClassTourismModifiers>
    Because the game already has:
    Code:
        <Policy_BuildingClassTourismModifiers>
            <Row>
                <PolicyType>POLICY_MEDIA_CULTURE</PolicyType>
                <BuildingClassType>BUILDINGCLASS_BROADCAST_TOWER</BuildingClassType>
                <TourismModifier>34</TourismModifier>
            </Row>
        </Policy_BuildingClassTourismModifiers>
    Any building that fits into the BROADCAST_TOWER is automatically covered by this code. Your attempt to restate the value would result in all Buildings witihn the BROADCAST_TOWER Building-Class to only net 4% more tourism when any player adopts the policy. If you wish to alter the amount of Tourism Modification created by buildings within the BroadCast Tower BuildingClass, you would need to do an <Update>, like this:
    Code:
    <Policy_BuildingClassTourismModifiers>
        <Update>
            <Where PolicyType="POLICY_MEDIA_CULTURE" BuildingClassType="BUILDINGCLASS_BROADCAST_TOWER" />
            <Set TourismModifier="4" />
        </Update>
    </Policy_BuildingClassTourismModifiers>
    But then users of the mod would probably scream bug bug bug because the affect would apply any time the mod was enabled, even if the civ was not currently active within a game.
  7. See whoward69's enable error logging tutorial
  8. This is probably causing the leader to fail:
    Code:
    [776317.437] Invalid Reference on Leaders.IconAtlas - "DENPACOLONY_ICON_ATLAS" does not exist in IconTextureAtlases
  9. You also have these errors, some of which are mis-match in the names of the Unit, for example, between one place in the code and another:
    Code:
    [776318.765] Invalid Reference on Units.Help - "TXT_KEY_UNIT_HELP_COINCAT" does not exist in Language_en_US
    [776318.828] Invalid Reference on Units.Strategy - "TXT_KEY_UNIT_COINCAT_STRATEGY" does not exist in Language_en_US
    [776318.890] Invalid Reference on Units.Civilopedia - "TXT_KEY_CIV5_COINCAT_TEXT" does not exist in Language_en_US
    [776318.953] Invalid Reference on Units.Description - "TXT_KEY_UNIT_COINCAT" does not exist in Language_en_US
    [776318.968] Invalid Reference on Unit_FreePromotions.PromotionType - "PROMOTION_IGNORES_TERRAIN_COST" does not exist in UnitPromotions
    [776318.968] Invalid Reference on Unit_FreePromotions.UnitType - "UNIT_COIN_CAT" does not exist in Units
  10. The Promotion is PROMOTION_IGNORE_TERRAIN_COST: there is no S at the end of "IGNORE"
I did forget to update the link, but I got some of those fixed before I posted it, i admit to that, so I'll tend to the ones that do need to be fixed. Thanks. :3
 
I did not look at the city-states mod. No idea what/where your problems are with that.

But, use the logging system and look in the Database.log file for the errors being reported there. And be sure to run the test as shown in the tutorial without your mod running so you can know what is normally reported to the Database.log file even when your mod is not active.
 
I did not look at the city-states mod. No idea what/where your problems are with that.

But, use the logging system and look in the Database.log file for the errors being reported there. And be sure to run the test as shown in the tutorial without your mod running so you can know what is normally reported to the Database.log file even when your mod is not active.
The mod does run, but the city-states never show up, and the slider bugs to zero when you try to select how many city-state to appear. That's something that seems to be bugging me. I was using the Nintendo City-States XMLs for that, and I wonder if I needed something else to make that work.

Also, I dunno how to fix the unit problem, since I updated the link. If there is a way to fix it or rework it entirely, let me know.
 
Code:
	<Trait_FreePromotionUnitCombats>
		<Row>
			<UnitCombatType>UNITCOMBAT_MELEE</UnitCombatType>
			<PromotionType>PROMOTION_SENTRY</PromotionType>
		</Row>
Now you have no trait name. Previously you were using Washington's Trait-Name instead of TRAIT_HOLYORBANDFULLHEALALL

Now you have nothing. Database.log should have contained an error message for this new error you introduced.
 
Unit Art Defines are not done using table <UnitMemberArtInfos> nor table <UnitArtInfo>. Nor have they for some time. Here is a sample xml-only unit art define that is working and has two different styles of "people" in the unit animation:
Spoiler :
Code:
<GameData>
	<ArtDefine_UnitInfos>
		<Row>
			<Type>ART_DEF_UNIT_VELOCIRAPTOR_WLR</Type>
			<DamageStates>1</DamageStates>
			<Formation>DefaultCavalry</Formation>
		</Row>
	</ArtDefine_UnitInfos>
	<ArtDefine_UnitInfoMemberInfos>
		<Row>
			<UnitInfoType>ART_DEF_UNIT_VELOCIRAPTOR_WLR</UnitInfoType>
			<UnitMemberInfoType>ART_DEF_UNIT_MEMBER_VELOCIRAPTOR_WLR</UnitMemberInfoType>
			<NumMembers>3</NumMembers>
		</Row>
		<Row>
			<UnitInfoType>ART_DEF_UNIT_VELOCIRAPTOR_WLR</UnitInfoType>
			<UnitMemberInfoType>ART_DEF_UNIT_MEMBER_VELOCIRAPTOR_WLR_V2</UnitMemberInfoType>
			<NumMembers>2</NumMembers>
		</Row>
	</ArtDefine_UnitInfoMemberInfos>
	<ArtDefine_UnitMemberInfos>
		<Row>
			<Type>ART_DEF_UNIT_MEMBER_VELOCIRAPTOR_WLR</Type>
			<Scale>0.23</Scale>
			<Model>velociraptor.fxsxml</Model>
			<MaterialTypeTag>CLOTH</MaterialTypeTag>
			<MaterialTypeSoundOverrideTag>FLESH</MaterialTypeSoundOverrideTag>
		</Row>
		<Row>
			<Type>ART_DEF_UNIT_MEMBER_VELOCIRAPTOR_WLR_V2</Type>
			<Scale>0.23</Scale>
			<Model>velociraptor_v2.fxsxml</Model>
			<MaterialTypeTag>CLOTH</MaterialTypeTag>
			<MaterialTypeSoundOverrideTag>FLESH</MaterialTypeSoundOverrideTag>
		</Row>
	</ArtDefine_UnitMemberInfos>
	<ArtDefine_UnitMemberCombats>
		<Row>
			<UnitMemberType>ART_DEF_UNIT_MEMBER_VELOCIRAPTOR_WLR</UnitMemberType>
			<EnableActions>Idle Attack RunCharge AttackCity Bombard Death BombardDefend Run Fortify CombatReady Walk</EnableActions>
			<MoveRadius>7.0</MoveRadius>
			<ShortMoveRadius>24.0</ShortMoveRadius>
			<ShortMoveRate>0.349999994039536</ShortMoveRate>
			<TurnRateMin>0.5</TurnRateMin>
			<TurnRateMax>0.75</TurnRateMax>
			<TurnFacingRateMin>15.0</TurnFacingRateMin>
			<TurnFacingRateMax>20.0</TurnFacingRateMax>
			<TargetHeight>12.0</TargetHeight>
			<HasShortRangedAttack>1</HasShortRangedAttack>
			<HasLongRangedAttack>1</HasLongRangedAttack>
			<HasStationaryMelee>1</HasStationaryMelee>
			<HasRefaceAfterCombat>1</HasRefaceAfterCombat>
			<OnlyTurnInMovementActions>1</OnlyTurnInMovementActions>
		</Row>
		<Row>
			<UnitMemberType>ART_DEF_UNIT_MEMBER_VELOCIRAPTOR_WLR_V2</UnitMemberType>
			<EnableActions>Idle Attack RunCharge AttackCity Bombard Death BombardDefend Run Fortify CombatReady Walk</EnableActions>
			<MoveRadius>7.0</MoveRadius>
			<ShortMoveRadius>24.0</ShortMoveRadius>
			<ShortMoveRate>0.349999994039536</ShortMoveRate>
			<TurnRateMin>0.5</TurnRateMin>
			<TurnRateMax>0.75</TurnRateMax>
			<TurnFacingRateMin>15.0</TurnFacingRateMin>
			<TurnFacingRateMax>20.0</TurnFacingRateMax>
			<TargetHeight>12.0</TargetHeight>
			<HasShortRangedAttack>1</HasShortRangedAttack>
			<HasLongRangedAttack>1</HasLongRangedAttack>
			<HasStationaryMelee>1</HasStationaryMelee>
			<HasRefaceAfterCombat>1</HasRefaceAfterCombat>
			<OnlyTurnInMovementActions>1</OnlyTurnInMovementActions>
		</Row>
	</ArtDefine_UnitMemberCombats>
	<ArtDefine_UnitMemberCombatWeapons>
		<Row>
			<UnitMemberType>ART_DEF_UNIT_MEMBER_VELOCIRAPTOR_WLR</UnitMemberType>
			<Index>0</Index>
			<SubIndex>0</SubIndex>
			<VisKillStrengthMin>10.0</VisKillStrengthMin>
			<VisKillStrengthMax>20.0</VisKillStrengthMax>
			<WeaponTypeTag>METAL</WeaponTypeTag>
			<WeaponTypeSoundOverrideTag>ARROW</WeaponTypeSoundOverrideTag>
		</Row>
		<Row>
			<UnitMemberType>ART_DEF_UNIT_MEMBER_VELOCIRAPTOR_WLR</UnitMemberType>
			<Index>1</Index>
			<SubIndex>0</SubIndex>
			<VisKillStrengthMin>10.0</VisKillStrengthMin>
			<VisKillStrengthMax>20.0</VisKillStrengthMax>
			<WeaponTypeTag>FLAMING_ARROW</WeaponTypeTag>
		</Row>
		<Row>
			<UnitMemberType>ART_DEF_UNIT_MEMBER_VELOCIRAPTOR_WLR_V2</UnitMemberType>
			<Index>0</Index>
			<SubIndex>0</SubIndex>
			<VisKillStrengthMin>10.0</VisKillStrengthMin>
			<VisKillStrengthMax>20.0</VisKillStrengthMax>
			<WeaponTypeTag>METAL</WeaponTypeTag>
			<WeaponTypeSoundOverrideTag>ARROW</WeaponTypeSoundOverrideTag>
		</Row>
		<Row>
			<UnitMemberType>ART_DEF_UNIT_MEMBER_VELOCIRAPTOR_WLR_V2</UnitMemberType>
			<Index>1</Index>
			<SubIndex>0</SubIndex>
			<VisKillStrengthMin>10.0</VisKillStrengthMin>
			<VisKillStrengthMax>20.0</VisKillStrengthMax>
			<WeaponTypeTag>FLAMING_ARROW</WeaponTypeTag>
		</Row>
	</ArtDefine_UnitMemberCombatWeapons>
	<ArtDefine_StrategicView>
		<Row>
			<StrategicViewType>ART_DEF_UNIT_VELOCIRAPTOR_WLR</StrategicViewType>
			<TileType>Unit</TileType>
			<Asset>SV_ForestElephant.dds</Asset>
		</Row>
	</ArtDefine_StrategicView>
</GameData>
You ned to check the check-boxes in ModBuddy for ReloadAudioSystem, ReloadStrategicViewSystem, and ReloadUnitSystem. See Common Novice-Modder Mistakes -- "NOT CHECKING THE REQUIRED MODBUDDY CHECK-BOXES" for where to find these.

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

The city-states mod: you have never given your mod any actions to perform when the mod is loaded, so it doesn't do anything.
 
Last edited:
refer to William Howard's reference on required file settings in ModBuddy for the various file types. Long story short with the City-States mod you have no Actions of "OnModActivated", "UpDateDatabase" in Modbuddy for any of your xml files.
 
refer to William Howard's reference on required file settings in ModBuddy for the various file types. Long story short with the City-States mod you have no Actions of "OnModActivated", "UpDateDatabase" in Modbuddy for any of your xml files.
Ah. Well, I should consider myself a dummy for not noticing that, since between my first mod and those two, it was some time since then. XD
 
Top Bottom