Adding this building does not work,help pls.(Resolved,thank you TTSev)

Pitohui

Chieftain
Joined
Feb 27, 2019
Messages
98
I tried to add this Building,the mod does Show up in the mod list and the build in modbuddy succedes,despite this the Building cant be found ingame.help pls.
The Code:
<?xml version="1.0" encoding="utf-8"?>
<!-- Pit_Haligi_Building -->
<!-- Author: Pitohui -->
<!-- DateCreated: 11/4/2019 7:31:58 PM -->
<GameData>
<Types>
<Row>
<Type>BUILDING_HALIGI_PIT</Type>
<Kind>KIND_BUILDING</Kind>
</Row>
</Types>
<Buildings>
<Row>
<BuildingType>BUILDING_HALIGI_PIT</BuildingType>
<Name>BUILDING_HALIGI_PIT_NAME</Name>
<PrereqTech>TECH_SAILING</PrereqTech>
<Description>LOC_BUILDING_HALIGI_PIT_DESCRIPTION</Description>
<PrereqDistrict>DISTRICT_CITY_CENTER</PrereqDistrict>
<Purchase_Yield>YIELD_GOLD</Purchase_Yield>
<Cost>70</Cost>
<Maintenance>1</Maintenance>
<AdvisorType>ADVISOR_GENERIC</AdvisorType>
</Row>
</Buildings>
<Modifiers>
<Row>
<ModifierId>PIT_HALIGI_ADD_CULTURE</ModifierId>
<SubjectRequirementSetId>PIT_PLOT_IS_COAST</SubjectRequirementSetId>
<ModifierType>MODIFIER_CITY_PLOT_YIELDS_ADJUST_PLOT_YIELD</ModifierType>
</Row>
<Row>
<ModifierId>PIT_HALIGI_ADD_SCIENCE</ModifierId>
<SubjectRequirementSetId>PIT_PLOT_IS_COAST</SubjectRequirementSetId>
<ModifierType>MODIFIER_CITY_PLOT_YIELDS_ADJUST_PLOT_YIELD</ModifierType>
</Row>
<Row>
<ModifierId>PIT_HALIGI_ADD_FAITH</ModifierId>
<SubjectRequirementSetId>PIT_PLOT_IS_COAST</SubjectRequirementSetId>
<ModifierType>MODIFIER_CITY_PLOT_YIELDS_ADJUST_PLOT_YIELD</ModifierType>
</Row>
<Row>
<ModifierId>PIT_HALIGI_ADD_GOLD</ModifierId>
<SubjectRequirementSetId>PIT_PLOT_IS_COAST</SubjectRequirementSetId>
<ModifierType>MODIFIER_CITY_PLOT_YIELDS_ADJUST_PLOT_YIELD</ModifierType>
</Row>
</Modifiers>
<ModifierArguments>
<Row>
<ModifierId>PIT_HALIGI_ADD_CULTURE</ModifierId>
<Name>Amount</Name>
<Value>1</Value>
</Row>
<Row>
<ModifierId>PIT_HALIGI_ADD_CULTURE</ModifierId>
<Name>YieldType</Name>
<Value>YIELD_CULTURE</Value>
</Row>
<Row>
<ModifierId>PIT_HALIGI_ADD_SCIENCE</ModifierId>
<Name>Amount</Name>
<Value>1</Value>
</Row>
<Row>
<ModifierId>PIT_HALIGI_ADD_SCIENCE</ModifierId>
<Name>YieldType</Name>
<Value>YIELD_SCIENCE</Value>
</Row>
<Row>
<ModifierId>PIT_HALIGI_ADD_FAITH</ModifierId>
<Name>Amount</Name>
<Value>1</Value>
</Row>
<Row>
<ModifierId>PIT_HALIGI_ADD_FAITH</ModifierId>
<Name>YieldType</Name>
<Value>YIELD_FAITH</Value>
</Row>
<Row>
<ModifierId>PIT_HALIGI_ADD_GOLD</ModifierId>
<Name>Amount</Name>
<Value>1</Value>
</Row>
<Row>
<ModifierId>PIT_HALIGI_ADD_GOLD</ModifierId>
<Name>YieldType</Name>
<Value>YIELD_GOLD</Value>
</Row>
</ModifierArguments>
<RequirementSets>
<Row>
<RequirementSetId>PIT_PLOT_IS_COAST</RequirementSetId>
<RequirementSetType>REQUIREMENT_TEST_ALL</RequirementSetType>
</Row>
</RequirementSets>
<RequirementSetRequirements>
<Row>
<RequirementSetId>PIT_PLOT_IS_COAST</RequirementSetId>
<RequirementId>REQUIRES_PLOT_HAS_COAST</RequirementId>
</Row>
</RequirementSetRequirements>
<Requirements>
<Row>
<RequirementId>REQUIRES_PLOT_HAS_COAST</RequirementId>
<RequirementType>REQUIREMENT_PLOT_TERRAIN_TYPE_MATCHES</RequirementType>
</Row>
</Requirements>
<RequirementArguments>
<Row>
<RequirementId>REQUIRES_PLOT_HAS_COAST</RequirementId>
<Name>TerrainType</Name>
<Value>TERRAIN_COAST</Value>
</Row>
</RequirementArguments>
<BuildingModifiers>
<Row>
<BuildingType>BUILDING_HALIGI_PIT</BuildingType>
<ModifierId>PIT_HALIGI_ADD_CULTURE</ModifierId>
</Row>
<Row>
<BuildingType>BUILDING_HALIGI_PIT</BuildingType>
<ModifierId>PIT_HALIGI_ADD_SCIENCE</ModifierId>
</Row>
<Row>
<BuildingType>BUILDING_HALIGI_PIT</BuildingType>
<ModifierId>PIT_HALIGI_ADD_FAITH</ModifierId>
</Row>
<Row>
<BuildingType>BUILDING_HALIGI_PIT</BuildingType>
<ModifierId>PIT_HALIGI_ADD_GOLD</ModifierId>
</Row>
</BuildingModifiers>
</GameData>
Text is defined in another file,i dont think ist the reason this does not work
 
Hello,

You should get the habit of checking the database.log file when you get issues (Documents/My Games/Sid Meier's Civilization VI/Logs).
When I ran your mod it showed an error: "[1026308.378] [Gameplay] ERROR: table Buildings has no column named Purchase_Yield"
That's because the column is called PurchaseYield and not Purchase_Yield.
With that change the building is properly added.
There's also an issue with the requirement. The requirement for coast already exists in the game, it's "PLOT_HAS_COAST_REQUIREMENTS" so you can simply put:
Code:
    <Modifiers>
        <Row>
            <ModifierId>PIT_HALIGI_ADD_CULTURE</ModifierId>
            <SubjectRequirementSetId>PLOT_HAS_COAST_REQUIREMENTS</SubjectRequirementSetId>
            <ModifierType>MODIFIER_CITY_PLOT_YIELDS_ADJUST_PLOT_YIELD</ModifierType>
        </Row>
        <Row>
            <ModifierId>PIT_HALIGI_ADD_SCIENCE</ModifierId>
            <SubjectRequirementSetId>PLOT_HAS_COAST_REQUIREMENTS</SubjectRequirementSetId>
            <ModifierType>MODIFIER_CITY_PLOT_YIELDS_ADJUST_PLOT_YIELD</ModifierType>
        </Row>
        <Row>
            <ModifierId>PIT_HALIGI_ADD_FAITH</ModifierId>
            <SubjectRequirementSetId>PLOT_HAS_COAST_REQUIREMENTS</SubjectRequirementSetId>
            <ModifierType>MODIFIER_CITY_PLOT_YIELDS_ADJUST_PLOT_YIELD</ModifierType>
        </Row>
        <Row>
            <ModifierId>PIT_HALIGI_ADD_GOLD</ModifierId>
            <SubjectRequirementSetId>PLOT_HAS_COAST_REQUIREMENTS</SubjectRequirementSetId>
            <ModifierType>MODIFIER_CITY_PLOT_YIELDS_ADJUST_PLOT_YIELD</ModifierType>
        </Row>
    </Modifiers>
And remove what you put about requirements:
Code:
    <RequirementSets>
        <Row>
            <RequirementSetId>PIT_PLOT_IS_COAST</RequirementSetId>
            <RequirementSetType>REQUIREMENT_TEST_ALL</RequirementSetType>
        </Row>
    </RequirementSets>
    <RequirementSetRequirements>
        <Row>
            <RequirementSetId>PIT_PLOT_IS_COAST</RequirementSetId>
            <RequirementId>REQUIRES_PLOT_HAS_COAST</RequirementId>
        </Row>
    </RequirementSetRequirements>
    <Requirements>
        <Row>
            <RequirementId>REQUIRES_PLOT_HAS_COAST</RequirementId>
            <RequirementType>REQUIREMENT_PLOT_TERRAIN_TYPE_MATCHES</RequirementType>
        </Row>
    </Requirements>
    <RequirementArguments>
        <Row>
            <RequirementId>REQUIRES_PLOT_HAS_COAST</RequirementId>
            <Name>TerrainType</Name>
            <Value>TERRAIN_COAST</Value>
        </Row>
    </RequirementArguments>
 
Hello,

You should get the habit of checking the database.log file when you get issues (Documents/My Games/Sid Meier's Civilization VI/Logs).
When I ran your mod it showed an error: "[1026308.378] [Gameplay] ERROR: table Buildings has no column named Purchase_Yield"
That's because the column is called PurchaseYield and not Purchase_Yield.
With that change the building is properly added.
There's also an issue with the requirement. The requirement for coast already exists in the game, it's "PLOT_HAS_COAST_REQUIREMENTS" so you can simply put:
Code:
    <Modifiers>
        <Row>
            <ModifierId>PIT_HALIGI_ADD_CULTURE</ModifierId>
            <SubjectRequirementSetId>PLOT_HAS_COAST_REQUIREMENTS</SubjectRequirementSetId>
            <ModifierType>MODIFIER_CITY_PLOT_YIELDS_ADJUST_PLOT_YIELD</ModifierType>
        </Row>
        <Row>
            <ModifierId>PIT_HALIGI_ADD_SCIENCE</ModifierId>
            <SubjectRequirementSetId>PLOT_HAS_COAST_REQUIREMENTS</SubjectRequirementSetId>
            <ModifierType>MODIFIER_CITY_PLOT_YIELDS_ADJUST_PLOT_YIELD</ModifierType>
        </Row>
        <Row>
            <ModifierId>PIT_HALIGI_ADD_FAITH</ModifierId>
            <SubjectRequirementSetId>PLOT_HAS_COAST_REQUIREMENTS</SubjectRequirementSetId>
            <ModifierType>MODIFIER_CITY_PLOT_YIELDS_ADJUST_PLOT_YIELD</ModifierType>
        </Row>
        <Row>
            <ModifierId>PIT_HALIGI_ADD_GOLD</ModifierId>
            <SubjectRequirementSetId>PLOT_HAS_COAST_REQUIREMENTS</SubjectRequirementSetId>
            <ModifierType>MODIFIER_CITY_PLOT_YIELDS_ADJUST_PLOT_YIELD</ModifierType>
        </Row>
    </Modifiers>
And remove what you put about requirements:
Code:
    <RequirementSets>
        <Row>
            <RequirementSetId>PIT_PLOT_IS_COAST</RequirementSetId>
            <RequirementSetType>REQUIREMENT_TEST_ALL</RequirementSetType>
        </Row>
    </RequirementSets>
    <RequirementSetRequirements>
        <Row>
            <RequirementSetId>PIT_PLOT_IS_COAST</RequirementSetId>
            <RequirementId>REQUIRES_PLOT_HAS_COAST</RequirementId>
        </Row>
    </RequirementSetRequirements>
    <Requirements>
        <Row>
            <RequirementId>REQUIRES_PLOT_HAS_COAST</RequirementId>
            <RequirementType>REQUIREMENT_PLOT_TERRAIN_TYPE_MATCHES</RequirementType>
        </Row>
    </Requirements>
    <RequirementArguments>
        <Row>
            <RequirementId>REQUIRES_PLOT_HAS_COAST</RequirementId>
            <Name>TerrainType</Name>
            <Value>TERRAIN_COAST</Value>
        </Row>
    </RequirementArguments>
Thank you so much!I didn’t even know about that log file,that seems very useful!How do I run something in there?
 
Last edited:
You don't run a mod in the file. You start a game with you mod and then check the file.
 
Back
Top Bottom