Changing The Brandenburg Gate Bonus

speedygonzalez

Chieftain
Joined
May 6, 2018
Messages
6
Hi all..

I want to change Brandenburg Gate bonus from +15 XP for all unit built in the city, to +30 XP for all barracks/krepost in the empire. Thus all cities with barracks, armory, and military academy in the empire will produce +60 XP. Down bellow is the following code from the original CIV5Buildings.xml :

Spoiler :

<Buildings>
<Row>
<Type>BUILDING_BRANDENBURG_GATE</Type>
<BuildingClass>BUILDINGCLASS_BRANDENBURG_GATE</BuildingClass>
<Cost>750</Cost>
<PrereqTech>TECH_MILITARY_SCIENCE</PrereqTech>
<Help>TXT_KEY_WONDER_BRANDENBURG_GATE_HELP</Help>
<Description>TXT_KEY_BUILDING_BRANDENBURG_GATE</Description>
<Civilopedia>TXT_KEY_WONDER_BRANDENBURGGATE_DESC</Civilopedia>
<Quote>TXT_KEY_WONDER_BRANDENBURGGATE_QUOTE</Quote>
<ArtDefineTag>BRENDANBURG GATE</ArtDefineTag>
<MaxStartEra>ERA_MODERN</MaxStartEra>
<SpecialistType>SPECIALIST_SCIENTIST</SpecialistType>
<GreatPeopleRateChange>2</GreatPeopleRateChange>
<NukeImmune>true</NukeImmune>
<HurryCostModifier>-1</HurryCostModifier>
<MinAreaSize>-1</MinAreaSize>
<ConquestProb>100</ConquestProb>
<DisplayPosition>2</DisplayPosition>
<IconAtlas>BW_ATLAS_2</IconAtlas>
<PortraitIndex>20</PortraitIndex>
<WonderSplashImage>WonderConceptBrandenburg.dds</WonderSplashImage>
<WonderSplashAnchor>L,T</WonderSplashAnchor>
<WonderSplashAudio>AS2D_WONDER_SPEECH_BRANDENBURG_GATE</WonderSplashAudio>
</Row>
</Buildings>


Spoiler :

<Building_FreeUnits>
<Row>
<BuildingType>BUILDING_BRANDENBURG_GATE</BuildingType>
<UnitType>UNIT_GREAT_GENERAL</UnitType>
<NumUnits>1</NumUnits>
</Row>
</Builing_FreeUnits>


Spoiler :

<Building_DomainFreeExperiences>
<Row>
<BuildingType>BUILDING_BARRACKS</BuildingType>
<DomainType>DOMAIN_LAND</DomainType>
<Experience>15</Experience>
</Row>
<Row>
<BuildingType>BUILDING_BARRACKS</BuildingType>
<DomainType>DOMAIN_SEA</DomainType>
<Experience>15</Experience>
</Row>
<Row>
<BuildingType>BUILDING_BARRACKS</BuildingType>
<DomainType>DOMAIN_AIR</DomainType>
<Experience>15</Experience>
</Row>
<Row>
<BuildingType>BUILDING_KREPOST</BuildingType>
<DomainType>DOMAIN_LAND</DomainType>
<Experience>15</Experience>
</Row>
<Row>
<BuildingType>BUILDING_KREPOST</BuildingType>
<DomainType>DOMAIN_SEA</DomainType>
<Experience>15</Experience>
</Row>
<Row>
<BuildingType>BUILDING_KREPOST</BuildingType>
<DomainType>DOMAIN_AIR</DomainType>
<Experience>15</Experience>
</Row>
<Row>
<BuildingType>BUILDING_BRANDENBURG_GATE</BuildingType>
<DomainType>DOMAIN_LAND</DomainType>
<Experience>15</Experience>
</Row>
<Row>
<BuildingType>BUILDING_BRANDENBURG_GATE</BuildingType>
<DomainType>DOMAIN_SEA</DomainType>
<Experience>15</Experience>
</Row>
<Row>
<BuildingType>BUILDING_BRANDENBURG_GATE</BuildingType>
<DomainType>DOMAIN_AIR</DomainType>
<Experience>15</Experience>
</Row>
</Building_DomainFreeExperiences>


Which code should I add/change?

Any help would be appreciated.
 

elotar

Chieftain
Joined
Jan 16, 2014
Messages
22
I don't think it will work. For beginners it's better to stick with changes of existing values (changing BG exp from 15 to 69) or moving values from one object to the other (giving BG ability of some other building).
 

speedygonzalez

Chieftain
Joined
May 6, 2018
Messages
6
What if the +15 XP from Brandenburg Gate is given to another building, arsenal for example.

Because I want the bonus +15 XP given to all city in the empire, not just the city where the Brandenburg Gate is located. But players need to go the extra length to get those bonus, because I don't want it to be too OP.

Btw, the Neuschwanstein castle is using this code to enabled the bonus:

Spoiler :

<Building_BuildingClassYieldChanges>
<Delete BuildingType="BUILDING_NEUSCHWANSTEIN"/>
<Row>
<BuildingType>BUILDING_NEUSCHWANSTEIN</BuildingType>
<BuildingClassType>BUILDINGCLASS_CASTLE</BuildingClassType>
<YieldType>YIELD_GOLD</YieldType>
<YieldChange>3</YieldChange>
</Row>
<Row>
<BuildingType>BUILDING_NEUSCHWANSTEIN</BuildingType>
<BuildingClassType>BUILDINGCLASS_CASTLE</BuildingClassType>
<YieldType>YIELD_CULTURE</YieldType>
<YieldChange>2</YieldChange>
</Row>
</Building_BuildingClassYieldChanges>
<Building_BuildingClassHappiness>
<Delete BuildingType="BUILDING_NEUSCHWANSTEIN"/>
<Row>
<BuildingType>BUILDING_NEUSCHWANSTEIN</BuildingType>
<BuildingClassType>BUILDINGCLASS_CASTLE</BuildingClassType>
<Happiness>1</Happiness>
</Row>
</Building_BuildingClassHappiness>


Is this code can get the extra +15 XP from arsenal?

Spoiler :

<Building_BuildingClassYieldChanges>
<Delete BuildingType="BUILDING_BRANDENBURG_GATE"/>
<Row>
<BuildingType>BUILDING_BRANDENBURG_GATE</BuildingType>
<BuildingClassType>BUILDINGCLASS_ARSENAL</BuildingClassType>
<YieldType>YIELD_EXPERIENCE</YieldType>
<YieldChange>15</YieldChange>
</Building_BuildingClassYieldChanges>
 
Last edited:

whoward69

DLL Minion
Joined
May 30, 2011
Messages
8,641
Location
Near Portsmouth, UK
Experience is not a yield. As Lees said, you'll need Lua to achieve this.
 

speedygonzalez

Chieftain
Joined
May 6, 2018
Messages
6
Okay, thanks for the replies guys.

I'm affraid I'm not yet familiar with editing the Lua files. Can you show me which specific section that I need to change?
 

whoward69

DLL Minion
Joined
May 30, 2011
Messages
8,641
Location
Near Portsmouth, UK
It's not a change to existing Lua, you'll need to write some new Lua and hook it up to events to achieve what you want to do. And no, I can't provide an example.
 

ThanOscar

Chieftain
Joined
Feb 13, 2019
Messages
41
You need first to check if the player has a wonder (I think enlightenment era has some lua that could help you) then check in every city if they have the BUILDINGCLASS_BARRACKS and if they do, add a dummy building that gives XP

example of dummy building:
Code:
<Row>
            <Type>BUILDING_HIDDENDUMMY</Type>           
            <BuildingClass>BUILDING_HIDDENDUMMY</BuildingClass>
            <Cost>-1</Cost>  <!-- hides it in buildings list -->
            <GreatWorkCount>-1</GreatWorkCount> <!-- hides it from being seen in the city overview -->
            <NeverCapture>true</NeverCapture> 
            <NukeImmune>true</NukeImmune>
        </Row>
    </Buildings>
    
     <Building_DomainFreeExperiences>
          <Row>
                 <BuildingType>BUILDING_HIDDENDUMMY</BuildingType>
                 <DomainType>DOMAIN_LAND</DomainType> 
                 <Experience>15</Experience>
         </Row>
          <!-- you can add sea and air if you wish too -->
    </Building_DomainFreeExperiences>

(not sure if in code above you also have to put additional info such as building description, shouldn't be required)
unfortunately im not versed in lua so i can't put an example but you could adapt enlightenment era's wonders.lua to your use
 
Top Bottom