It doesn't work even If i copy something already made ingame!!

MrTerror

Chieftain
Joined
Sep 30, 2019
Messages
10
Hello,
I'm writing this post to get some help from you guys.

Namely, I do some mods that adds buildings to game.
Now I'm making "training camp"
I wanted it to give 5% production in city where it was built in.
And now... It doesn't work...
I tried to l i t e r a l l y copy code from game data. And it wasn't working at all.

So, my question is: Why? What I am doing wrong?

Here is how it looks:
1.JPG
2.JPG
3.JPG



There it is.. In game it isn't crashing or something like that, building just doesn't have that feature.

I really don't know what is happening,
and I would be really happy if someone know what is wrong with it :)
 
The actual code directly copied from your xml file would be of more use.

But from the screencaptures you have posted you have stated an amount of 5%. But an amount of 5% of what? Your screen captures do not show a designation of a YieldType. You always need one row in table ModifierArguments stating the Amount value and a second row stating the YieldType designation.
Code:
	<Modifiers>
		<!--Adjust City Yield %-->
		<Row ModifierId="LRS_BUILDING_ADD_SCIENCE_YIELD_PERCENT_001" ModifierType="MODIFIER_SINGLE_CITY_ADJUST_CITY_YIELD_MODIFIER" />
	</Modifiers>
	<ModifierArguments>
		<!--Adjust City Yield %-->
		<Row ModifierId="LRS_BUILDING_ADD_SCIENCE_YIELD_PERCENT_001" Name="Amount" Value="1" />
		<Row ModifierId="LRS_BUILDING_ADD_SCIENCE_YIELD_PERCENT_001" Name="YieldType" Value="YIELD_SCIENCE" />
	</ModifierArguments>
 
The actual code directly copied from your xml file would be of more use.

But from the screencaptures you have posted you have stated an amount of 5%. But an amount of 5% of what? Your screen captures do not show a designation of a YieldType. You always need one row in table ModifierArguments stating the Amount value and a second row stating the YieldType designation.
Code:
    <Modifiers>
        <!--Adjust City Yield %-->
        <Row ModifierId="LRS_BUILDING_ADD_SCIENCE_YIELD_PERCENT_001" ModifierType="MODIFIER_SINGLE_CITY_ADJUST_CITY_YIELD_MODIFIER" />
    </Modifiers>
    <ModifierArguments>
        <!--Adjust City Yield %-->
        <Row ModifierId="LRS_BUILDING_ADD_SCIENCE_YIELD_PERCENT_001" Name="Amount" Value="1" />
        <Row ModifierId="LRS_BUILDING_ADD_SCIENCE_YIELD_PERCENT_001" Name="YieldType" Value="YIELD_SCIENCE" />
    </ModifierArguments>


Oh yeah, i have that thing also written in my core and it doesn't work still :/
(Sorry, i forgot to sreenshot that aswell)
 
This is how it looked from the start:

all.JPG




I uploaded also two files that, i think, they are only significant (for the sake of working code).

I would be really grateful if someone can help :c
(also thank you guys for trying to help so far)
 

Attachments

  • Osiedlowa_Gameplay.xml
    4.5 KB · Views: 151
  • Osiedlowa.Art.xml
    17.1 KB · Views: 164
There is no game table called BuildingModifier. The correct name of the table is BuildingModifiers. You are missing the final "s" in the table-name. Check Database.log at
Code:
C:\Users\[YourUserNameHere]\Documents\My Games\Sid Meier's Civilization VI\Logs
It will be showing an error for an invalid table-name.
Code:
	<BuildingModifier>  <------------------------!!!!!!!!!
		<Row>
			<BuildingType>BUILDING_GAME_DOM</BuildingType>
			<ModifierId>GAME_DOM_FOOD</ModifierId>
		</Row>

		<Row>
			<BuildingType>BUILDING_GAME_DOM</BuildingType>
			<ModifierId>GAME_DOM_GOLD</ModifierId>
		</Row>

		<Row>
			<BuildingType>BUILDING_GAME_FLAT</BuildingType>
			<ModifierId>GAME_FLAT_FOOD</ModifierId>
		</Row>

		<Row>
			<BuildingType>BUILDING_GAME_CAMP</BuildingType>
			<ModifierId>GAME_CAMP_PRODUCTION</ModifierId>
		</Row>

		<Row>
			<BuildingType>BUILDING_GAME_CAMP</BuildingType>
			<ModifierId>GAME_CAMP_PERCENTPRODUCTION</ModifierId>
		</Row>

		<Row>
			<BuildingType>BUILDING_GAME_CAMP</BuildingType>
			<ModifierId>CAMP_TRAINED_UNIT_XP_MODIFIER</ModifierId>
		</Row>
	</BuildingModifier>  <------------------------!!!!!!!!!
Because of this fatal syntax error none of the modifiers within the file are ever implemented.
 
There is no game table called BuildingModifier. The correct name of the table is BuildingModifiers. You are missing the final "s" in the table-name. Check Database.log at
Code:
C:\Users\[YourUserNameHere]\Documents\My Games\Sid Meier's Civilization VI\Logs
It will be showing an error for an invalid table-name.
Code:
    <BuildingModifier>  <------------------------!!!!!!!!!
        <Row>
            <BuildingType>BUILDING_GAME_DOM</BuildingType>
            <ModifierId>GAME_DOM_FOOD</ModifierId>
        </Row>

        <Row>
            <BuildingType>BUILDING_GAME_DOM</BuildingType>
            <ModifierId>GAME_DOM_GOLD</ModifierId>
        </Row>

        <Row>
            <BuildingType>BUILDING_GAME_FLAT</BuildingType>
            <ModifierId>GAME_FLAT_FOOD</ModifierId>
        </Row>

        <Row>
            <BuildingType>BUILDING_GAME_CAMP</BuildingType>
            <ModifierId>GAME_CAMP_PRODUCTION</ModifierId>
        </Row>

        <Row>
            <BuildingType>BUILDING_GAME_CAMP</BuildingType>
            <ModifierId>GAME_CAMP_PERCENTPRODUCTION</ModifierId>
        </Row>

        <Row>
            <BuildingType>BUILDING_GAME_CAMP</BuildingType>
            <ModifierId>CAMP_TRAINED_UNIT_XP_MODIFIER</ModifierId>
        </Row>
    </BuildingModifier>  <------------------------!!!!!!!!!
Because of this fatal syntax error none of the modifiers within the file are ever implemented.
Hmmm, ok, thank you, I'll change it
But, how this thing works, because other modifiers (for example : for the food yield) worked even with this mistake. Does the yieldchange work without buildingmodifiers?
 
Thank you all! It works now :D
I had two mistakes: one with this buildingmodifier and another with "modierType"
So, a lesson i can tell to everyone, watch out for misspelling! xD
 
The game reads and accepts anything within an SQL or XML file top-down up to a fatal syntax error. It then ignores anything else within the file. So part of a file can be implemented while later parts are not.
 
Top Bottom