• 📚 A new project from the admin: Check out PictureBooks.io, an AI storyteller that lets you create personalized picture books for kids in seconds. Give it a try and let me know what you think!

Whats wrong with this Event?

jefmart1

Prince
Joined
Aug 16, 2005
Messages
463
Why is the forge not being removed? This is driving me insane.

Its triggered by having a forge in a city. The event triggers and says you will lose the forge. But it never goes away. I tested it by adding a forge into the city.

Here is the Eventinfos XML:
Spoiler :
<EventInfo>
<Type>EVENT_IRON</Type>
<Description>You've got Iron</Description>
<LocalInfoText></LocalInfoText>
<WorldNewsTexts>
</WorldNewsTexts>
<OtherPlayerPopup></OtherPlayerPopup>
<QuestFailText></QuestFailText>
<bQuest>0</bQuest>
<bGlobal>0</bGlobal>
<bTeam>0</bTeam>
<bPickCity>0</bPickCity>
<bPickOtherPlayerCity>0</bPickOtherPlayerCity>
<bDeclareWar>0</bDeclareWar>
<iGold>0</iGold>
<bGoldToPlayer>0</bGoldToPlayer>
<iRandomGold>0</iRandomGold>
<iCulture>0</iCulture>
<iEspionagePoints>0</iEspionagePoints>
<bGoldenAge>0</bGoldenAge>
<iFreeUnitSupport>0</iFreeUnitSupport>
<iInflationMod>0</iInflationMod>
<iSpaceProductionMod>0</iSpaceProductionMod>
<Tech>NONE</Tech>
<TechFlavors>
</TechFlavors>
<iTechPercent>0</iTechPercent>
<iTechCostPercent>0</iTechCostPercent>
<iTechMinTurnsLeft>0</iTechMinTurnsLeft>
<PrereqTech>NONE</PrereqTech>
<UnitClass>NONE</UnitClass>
<iNumFreeUnits>0</iNumFreeUnits>
<bDisbandUnit>0</bDisbandUnit>
<iUnitExperience>0</iUnitExperience>
<iUnitImmobileTurns>0</iUnitImmobileTurns>
<UnitPromotion></UnitPromotion>
<UnitName></UnitName>
<UnitCombatPromotions>
</UnitCombatPromotions>
<UnitClassPromotions>
</UnitClassPromotions>
<BuildingClass>BUILDINGCLASS_FORGE</BuildingClass>
<iBuildingChange>-1</iBuildingChange>
<BuildingExtraYields>
</BuildingExtraYields>
<BuildingExtraCommerces>
</BuildingExtraCommerces>
<BuildingExtraHappies>
</BuildingExtraHappies>
<BuildingExtraHealths>
</BuildingExtraHealths>
<iHappy>0</iHappy>
<iHealth>0</iHealth>
<iHurryAnger>0</iHurryAnger>
<iHappyTurns>0</iHappyTurns>
<iRevoltTurns>0</iRevoltTurns>
<iMinPillage>0</iMinPillage>
<iMaxPillage>0</iMaxPillage>
<iFood>0</iFood>
<iFoodPercent>0</iFoodPercent>
<FreeSpecialistCounts>
</FreeSpecialistCounts>
<FeatureType>NONE</FeatureType>
<iFeatureChange>0</iFeatureChange>
<ImprovementType>NONE</ImprovementType>
<iImprovementChange>0</iImprovementChange>
<BonusType>NONE</BonusType>
<iBonusChange>0</iBonusChange>
<RouteType>NONE</RouteType>
<iRouteChange>0</iRouteChange>
<BonusRevealed>NONE</BonusRevealed>
<BonusGift>NONE</BonusGift>
<PlotExtraYields>
</PlotExtraYields>
<iConvertOwnCities>0</iConvertOwnCities>
<iConvertOtherCities>0</iConvertOtherCities>
<iMaxNumReligions>-1</iMaxNumReligions>
<iOurAttitudeModifier>0</iOurAttitudeModifier>
<iAttitudeModifier>0</iAttitudeModifier>
<iTheirEnemyAttitudeModifier>0</iTheirEnemyAttitudeModifier>
<iPopulationChange>0</iPopulationChange>
<AdditionalEvents>
</AdditionalEvents>
<EventTimes>
</EventTimes>
<ClearEvents>
</ClearEvents>
<PythonCallback></PythonCallback>
<PythonExpireCheck></PythonExpireCheck>
<PythonCanDo></PythonCanDo>
<PythonHelp></PythonHelp>
<Button>,Art/Interface/Buttons/Process/Blank.dds,Art/Interface/Buttons/Beyond_the_Sword_Atlas.dds,8,5</Button>
<iAIValue>1000</iAIValue>
</EventInfo>


Here is the eventtrigger XML:
Spoiler :
<EventTriggerInfo>
<Type>EVENTTRIGGER_IRON</Type>
<WorldNewsTexts>
<Text>Iron available</Text>
</WorldNewsTexts>
<TriggerTexts>
<TriggerText>
<Text>Add and Remove Iron</Text>
<Era>NONE</Era>
</TriggerText>
</TriggerTexts>
<bSinglePlayer>0</bSinglePlayer>
<iPercentGamesActive>100</iPercentGamesActive>
<iWeight>-1</iWeight>
<bProbabilityUnitMultiply>0</bProbabilityUnitMultiply>
<bProbabilityBuildingMultiply>0</bProbabilityBuildingMultiply>
<Civic>NONE</Civic>
<iMinTreasury>0</iMinTreasury>
<iMinPopulation>0</iMinPopulation>
<iMaxPopulation>0</iMaxPopulation>
<iMinMapLandmass>0</iMinMapLandmass>
<iMinOurLandmass>0</iMinOurLandmass>
<iMaxOurLandmass>-1</iMaxOurLandmass>
<MinDifficulty>NONE</MinDifficulty>
<iAngry>0</iAngry>
<iUnhealthy>0</iUnhealthy>
<UnitsRequired>
</UnitsRequired>
<iNumUnits>0</iNumUnits>
<iNumUnitsGlobal>0</iNumUnitsGlobal>
<iUnitDamagedWeight>0</iUnitDamagedWeight>
<iUnitDistanceWeight>0</iUnitDistanceWeight>
<iUnitExperienceWeight>0</iUnitExperienceWeight>
<bUnitsOnPlot>0</bUnitsOnPlot>
<BuildingsRequired>
<BuildingClass>BUILDINGCLASS_FORGE</BuildingClass>
</BuildingsRequired>
<iNumBuildings>1</iNumBuildings>
<iNumBuildingsGlobal>1</iNumBuildingsGlobal>
<iNumPlotsRequired>0</iNumPlotsRequired>
<bOwnPlot>1</bOwnPlot>
<iPlotType>-1</iPlotType>
<FeaturesRequired>
</FeaturesRequired>
<TerrainsRequired>
</TerrainsRequired>
<ImprovementsRequired>
</ImprovementsRequired>
<BonusesRequired>
</BonusesRequired>
<RoutesRequired>
</RoutesRequired>
<ReligionsRequired>
</ReligionsRequired>
<iNumReligions>0</iNumReligions>
<CorporationsRequired>
</CorporationsRequired>
<iNumCorporations>0</iNumCorporations>
<bPickReligion>0</bPickReligion>
<bStateReligion>0</bStateReligion>
<bHolyCity>0</bHolyCity>
<bPickCorporation>0</bPickCorporation>
<bHeadquarters>0</bHeadquarters>
<Events>
<Event>EVENT_IRON</Event>
</Events>
<PrereqEvents>
</PrereqEvents>
<bPrereqEventPlot>0</bPrereqEventPlot>
<OrPreReqs>
</OrPreReqs>
<AndPreReqs>
</AndPreReqs>
<ObsoleteTechs>
</ObsoleteTechs>
<bRecurring>0</bRecurring>
<bTeam>0</bTeam>
<bGlobal>0</bGlobal>
<bPickPlayer>0</bPickPlayer>
<bOtherPlayerWar>0</bOtherPlayerWar>
<bOtherPlayerHasReligion>0</bOtherPlayerHasReligion>
<bOtherPlayerHasOtherReligion>0</bOtherPlayerHasOtherReligion>
<bOtherPlayerAI>0</bOtherPlayerAI>
<iOtherPlayerShareBorders>0</iOtherPlayerShareBorders>
<OtherPlayerHasTech>NONE</OtherPlayerHasTech>
<bPickCity>1</bPickCity>
<bPickOtherPlayerCity>0</bPickOtherPlayerCity>
<bShowPlot>0</bShowPlot>
<iCityFoodWeight>0</iCityFoodWeight>
<PythonCanDo></PythonCanDo>
<PythonCanDoCity></PythonCanDoCity>
<PythonCanDoUnit></PythonCanDoUnit>
<PythonCallback></PythonCallback>
<iPrereqCrime>0</iPrereqCrime>
<iPrereqGlobalCounter>0</iPrereqGlobalCounter>
<PrereqAlignment>NONE</PrereqAlignment>
<PrereqTrait>NONE</PrereqTrait>
</EventTriggerInfo>
 
Just a guess, try changing iPlotRequired to 1. I think adding required buildings means required buildings in a certain plot. (Unless you only use the global integer.) If that fails, you *could* try making certain (through easy python) that the city that is selected is the city with the Forge.
 
I had to change pick city to 1, turning it on. Now I just need to figure out why the second event isn't happening?
 
Got the second event to happen. The forge is removed and replaced in the same turn. Now I need to figure out why the third event to remove it isn't working.
 
Back
Top Bottom