Extra ressource with a building

Eiskalt

Chieftain
Joined
Jul 28, 2013
Messages
32
How can i code it that I have an extra ressource when my building is finished?

Example:
Oilcompany - +2 Gold, +2 Production and +1 Oil

Other Example:
Supermarket - +1 Gold, +2 Food and +1 Wine

I already searched in the documents but I have no plan. Pls help. Ty
 
Use either of:

(1) MODIFIER_SINGLE_CITY_GRANT_RESOURCE_IN_CITY
(Arguments: Name: ResourceType / Value: RESOURCE_X)

for this Modifier, see example GREATPERSON_GRANT_OIL​

(2) MODIFIER_PLAYER_ADJUST_FREE_RESOURCE_IMPORT
(Arguments: Name: ResourceType / Value: RESOURCE_X)

for this Modifier, see example MINOR_CIV_HATTUSA_OIL_RESOURCE_BONUS
You would couple this Modifier formula with a BuildingModifier that refers to it, as follows:

<Row>
<BuildingType>BUILDING_OILCOMPANY</BuildingType>
<ModifierId>OILCOMPANY_OIL_IMPORTS_MODIFIER</ModifierId>
</Row>

GB
 
Can you explain it for dumb people pls? :D How I fill in it correctly in the buildingsfolder?
 
Can someone helps me pls? I like to release my mod today and this is the last thing what I need. The second code I can understand but what does he means with the first? How can I code it right? Can someone write the right code for the example oil here in this thread? I really tried to code it correctly but it was always wrong and my other civmodderfriend can´t also understood it. Pls help me. It would be nice :) .
 
<BuildingModifiers>
<Row>
<BuildingType>BUILDING_MONUMENT</BuildingType>
<ModifierId>MONUMENT_GRANT_OIL</ModifierId>
</Row>
</BuildingModifiers>

<Modifiers>
<Row>
<ModifierId>MONUMENT_GRANT_OIL</ModifierId>
<ModifierType>MODIFIER_SINGLE_CITY_GRANT_RESOURCE_IN_CITY</ModifierType>
</Row>
</Modifiers>

<ModifierArguments>
<Row>
<ModifierId>MONUMENT_GRANT_OIL</ModifierId>
<Name>ResourceType</Name>
<Value>RESOURCE_OIL</Value>
</Row>
<Row>
<ModifierId>MONUMENT_GRANT_OIL</ModifierId>
<Name>Amount</Name>
<Value>1</Value>
</Row>
</ModifierArguments>

This is the solution for what you are looking for, for testing purpose i attached the modifier to the Monument Building, and it is working.
you would have to replqce BUILDING_MONUMENT with your building type
and maybe rename the modifier MONUMENT_GRANT_OIL to something more fitting (like OILCOMPANY_GRANT_OIL)

so in shot: for every effect you want like this you need to:
1) create a modifier with the type you need , done in <Modifiers>
2) give that modifier its arguments, done in <ModifierArguments>
3) attach that modifier to your building, done in <BuildingModifiers>
 
Last edited:
Top Bottom