1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

What's wrong with this event?

Discussion in 'Civ4 - Creation & Customization' started by Dryhad, Jun 15, 2008.

  1. Dryhad

    Dryhad Prince

    Joined:
    Feb 23, 2006
    Messages:
    451
    I've been trying to make this event but every time it triggers the game crashes. It seems to be a problem with the additional event (EGYPTIAN_4) because it works when I take that out, but I don't know what I'm doing wrong.

    The trigger:
    Code:
    		<EventTriggerInfo>
    			<Type>EVENTTRIGGER_EGYPTIAN</Type>
    			<WorldNewsTexts>
    				<Text>The fabled Book of Thoth is rumored to have fallen into %s1_civ_adjective hands.</Text>
    			</WorldNewsTexts>
    			<TriggerTexts>
    				<TriggerText>
    					<Text>You have discovered the fabled Book of Thoth!</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/>
    			<iNumUnits>0</iNumUnits>
    			<iNumUnitsGlobal>0</iNumUnitsGlobal>
    			<iUnitDamagedWeight>0</iUnitDamagedWeight>
    			<iUnitDistanceWeight>0</iUnitDistanceWeight>
    			<iUnitExperienceWeight>0</iUnitExperienceWeight>
    			<bUnitsOnPlot>0</bUnitsOnPlot>
    			<BuildingsRequired/>
    			<iNumBuildings>0</iNumBuildings>
    			<iNumBuildingsGlobal>0</iNumBuildingsGlobal>
    			<iNumPlotsRequired>0</iNumPlotsRequired>
    			<bOwnPlot>0</bOwnPlot>
    			<iPlotType>-1</iPlotType>
    			<FeaturesRequired/>
    			<TerrainsRequired/>
    			<ImprovementsRequired/>
    			<BonusesRequired/>
    			<RoutesRequired/>
    			<ReligionsRequired>
    				<ReligionType>RELIGION_EGYPTIAN</ReligionType>
    			</ReligionsRequired>
    			<iNumReligions>1</iNumReligions>
    			<CorporationsRequired/>
    			<iNumCorporations>0</iNumCorporations>
    			<bPickReligion>1</bPickReligion>
    			<bStateReligion>1</bStateReligion>
    			<bHolyCity>0</bHolyCity>
    			<bPickCorporation>0</bPickCorporation>
    			<bHeadquarters>0</bHeadquarters>
    			<Events>
    				<Event>EVENT_EGYPTIAN_1</Event>
    				<Event>EVENT_EGYPTIAN_2</Event>
    				<Event>EVENT_EGYPTIAN_3</Event>
    			</Events>
    			<PrereqEvents/>
    			<bPrereqEventPlot>0</bPrereqEventPlot>
    			<OrPreReqs/>
    			<AndPreReqs/>
    			<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>0</bPickCity>
    			<bPickOtherPlayerCity>0</bPickOtherPlayerCity>
    			<bShowPlot>0</bShowPlot>
    			<iCityFoodWeight>0</iCityFoodWeight>
    			<PythonCanDo/>
    			<PythonCanDoCity/>
    			<PythonCanDoUnit/>
    			<PythonCallback/>
    		</EventTriggerInfo>
    The three choices:
    Code:
    		<EventInfo>
    			<Type>EVENT_EGYPTIAN_1</Type>
    			<Description>The secrets of this book are not worth the wrath of the gods. Return it to where it was found.</Description>
    			<LocalInfoText/>
    			<WorldNewsTexts/>
    			<OtherPlayerPopup/>
    			<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/>
    			<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/>
    			<UnitName/>
    			<UnitCombatPromotions/>
    			<UnitClassPromotions/>
    			<BuildingClass>NONE</BuildingClass>
    			<iBuildingChange>0</iBuildingChange>
    			<BuildingExtraYields/>
    			<BuildingExtraCommerces/>
    			<BuildingExtraHappies/>
    			<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/>
    			<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/>
    			<iConvertOwnCities>0</iConvertOwnCities>
    			<iConvertOtherCities>0</iConvertOtherCities>
    			<iMaxNumReligions>-1</iMaxNumReligions>
    			<iOurAttitudeModifier>0</iOurAttitudeModifier>
    			<iAttitudeModifier>0</iAttitudeModifier>
    			<iTheirEnemyAttitudeModifier>0</iTheirEnemyAttitudeModifier>
    			<iPopulationChange>0</iPopulationChange>
    			<AdditionalEvents/>
    			<EventTimes/>
    			<ClearEvents/>
    			<PythonCallback/>
    			<PythonExpireCheck/>
    			<PythonCanDo/>
    			<PythonHelp/>
    			<Button>,Art/Interface/Buttons/Process/Blank.dds,Art/Interface/Buttons/Beyond_the_Sword_Atlas.dds,8,5</Button>
    			<iAIValue>1000</iAIValue>
    		</EventInfo>
    		<EventInfo>
    			<Type>EVENT_EGYPTIAN_2</Type>
    			<Description>Use the magic of the book to improve our empire</Description>
    			<LocalInfoText/>
    			<WorldNewsTexts/>
    			<OtherPlayerPopup/>
    			<QuestFailText/>
    			<bQuest>0</bQuest>
    			<bGlobal>0</bGlobal>
    			<bTeam>0</bTeam>
    			<bPickCity>0</bPickCity>
    			<bPickOtherPlayerCity>0</bPickOtherPlayerCity>
    			<bDeclareWar>0</bDeclareWar>
    			<iGold>50</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/>
    			<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/>
    			<UnitName/>
    			<UnitCombatPromotions/>
    			<UnitClassPromotions/>
    			<BuildingClass>NONE</BuildingClass>
    			<iBuildingChange>0</iBuildingChange>
    			<BuildingExtraYields/>
    			<BuildingExtraCommerces/>
    			<BuildingExtraHappies/>
    			<BuildingExtraHealths/>
    			<iHappy>1</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/>
    			<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/>
    			<iConvertOwnCities>0</iConvertOwnCities>
    			<iConvertOtherCities>0</iConvertOtherCities>
    			<iMaxNumReligions>-1</iMaxNumReligions>
    			<iOurAttitudeModifier>0</iOurAttitudeModifier>
    			<iAttitudeModifier>0</iAttitudeModifier>
    			<iTheirEnemyAttitudeModifier>0</iTheirEnemyAttitudeModifier>
    			<iPopulationChange>0</iPopulationChange>
    			<AdditionalEvents>
    				<EventChance>
    					<Event>EVENT_EGYPTIAN_4</Event>
    					<iEventChance>50</iEventChance>
    				</EventChance>
    			</AdditionalEvents>
    			<EventTimes/>
    			<ClearEvents/>
    			<PythonCallback/>
    			<PythonExpireCheck/>
    			<PythonCanDo/>
    			<PythonHelp/>
    			<Button>,Art/Interface/Buttons/Process/Blank.dds,Art/Interface/Buttons/Beyond_the_Sword_Atlas.dds,8,5</Button>
    			<iAIValue>1000</iAIValue>
    		</EventInfo>
    		<EventInfo>
    			<Type>EVENT_EGYPTIAN_3</Type>
    			<Description>Use the book to research new technologies</Description>
    			<LocalInfoText/>
    			<WorldNewsTexts/>
    			<OtherPlayerPopup/>
    			<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/>
    			<iTechPercent>75</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/>
    			<UnitName/>
    			<UnitCombatPromotions/>
    			<UnitClassPromotions/>
    			<BuildingClass>NONE</BuildingClass>
    			<iBuildingChange>0</iBuildingChange>
    			<BuildingExtraYields/>
    			<BuildingExtraCommerces/>
    			<BuildingExtraHappies/>
    			<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/>
    			<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/>
    			<iConvertOwnCities>0</iConvertOwnCities>
    			<iConvertOtherCities>0</iConvertOtherCities>
    			<iMaxNumReligions>-1</iMaxNumReligions>
    			<iOurAttitudeModifier>0</iOurAttitudeModifier>
    			<iAttitudeModifier>0</iAttitudeModifier>
    			<iTheirEnemyAttitudeModifier>0</iTheirEnemyAttitudeModifier>
    			<iPopulationChange>0</iPopulationChange>
    			<AdditionalEvents>
    				<EventChance>
    					<Event>EVENT_EGYPTIAN_4</Event>
    					<iEventChance>75</iEventChance>
    				</EventChance>
    			</AdditionalEvents>
    			<EventTimes/>
    			<ClearEvents/>
    			<PythonCallback/>
    			<PythonExpireCheck/>
    			<PythonCanDo/>
    			<PythonHelp/>
    			<Button>,Art/Interface/Buttons/Process/Blank.dds,Art/Interface/Buttons/Beyond_the_Sword_Atlas.dds,8,5</Button>
    			<iAIValue>1000</iAIValue>
    		</EventInfo>
    The additional event:
    Code:
    		<EventInfo>
    			<Type>EVENT_EGYPTIAN_4</Type>
    			<Description/>
    			<LocalInfoText/>
    			<WorldNewsTexts>
    				<Text>The god Thoth has taken vengenance on his disrespectful %s1_civ_adjective followers.</Text>
    			</WorldNewsTexts>
    			<OtherPlayerPopup/>
    			<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/>
    			<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/>
    			<UnitName/>
    			<UnitCombatPromotions/>
    			<UnitClassPromotions/>
    			<BuildingClass>NONE</BuildingClass>
    			<iBuildingChange>0</iBuildingChange>
    			<BuildingExtraYields/>
    			<BuildingExtraCommerces/>
    			<BuildingExtraHappies/>
    			<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/>
    			<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/>
    			<iConvertOwnCities>0</iConvertOwnCities>
    			<iConvertOtherCities>0</iConvertOtherCities>
    			<iMaxNumReligions>-1</iMaxNumReligions>
    			<iOurAttitudeModifier>0</iOurAttitudeModifier>
    			<iAttitudeModifier>0</iAttitudeModifier>
    			<iTheirEnemyAttitudeModifier>0</iTheirEnemyAttitudeModifier>
    			<iPopulationChange>-1</iPopulationChange>
    			<AdditionalEvents/>
    			<EventTimes/>
    			<ClearEvents/>
    			<PythonCallback/>
    			<PythonExpireCheck/>
    			<PythonCanDo/>
    			<PythonHelp/>
    			<Button>,Art/Interface/Buttons/Process/Blank.dds,Art/Interface/Buttons/Beyond_the_Sword_Atlas.dds,8,5</Button>
    			<iAIValue>1000</iAIValue>
    		</EventInfo>
    Can anybody see anything wrong? You'll have to change the religion to something else if you're going to try it out yourself, but I think the rest of it should work (or not, as the case may be).
     
  2. Shiggs713

    Shiggs713 Immortal

    Joined:
    Mar 11, 2007
    Messages:
    2,361
    Location:
    Indianapolis
    well perhaps the description tag is required, but thats just a guess. You have no description in event 4. Other than that I dont see anything thats maybe wrong, though I haven't tinkered with events very much.
     
  3. Dryhad

    Dryhad Prince

    Joined:
    Feb 23, 2006
    Messages:
    451
    Can't be, none of the other "Additional Events" have descriptions. Besides, I already suspected it might be some stupid thing with the text fields and played around with them, with no luck.
     
  4. CyberChrist

    CyberChrist You caught my attention

    Joined:
    Dec 6, 2001
    Messages:
    1,424
    Location:
    The Matrix
    The problem is that the <Text> fields are not really the proper place for the actual texts that are to be displayed in game. The <Text> fields are used as tags that the program expects to point to an entry in one of the files in the Text directory where the actual in game texts are located (potentially in various language formats).

    Normally it won't matter that you do it the way you have done (except that there can be no translation to other languages), however in EVENT_EGYPTIAN_4 you have included the variable %s1_civ_adjective in the text and while that should work if you have the text placed in a properly formatted file in the Text directory then AFAIK it won't work in a tag field.


    EDIT: I see you used the same variable in the trigger event as well. Does this ever get displayed correctly?
     
  5. Dryhad

    Dryhad Prince

    Joined:
    Feb 23, 2006
    Messages:
    451
    Yes, it does work in this and every other event I have used it in. The text tags exist to provide translations, not because the XML can somehow not handle some features of it.

    Please, people, could you not state as fact things you have not tried yourself? It's really not that difficult to make a small test mod and try these solutions out before telling me how to fix it. In fact, I'll make it myself for you.

    There. It triggers when Buddhism is your state religion. Please try out any and all solutions before suggesting them, it'll take you like two minutes.
     

    Attached Files:

  6. CyberChrist

    CyberChrist You caught my attention

    Joined:
    Dec 6, 2001
    Messages:
    1,424
    Location:
    The Matrix
    Well, it is a fact that you are not using the <Text> field the proper way, but nice to hear it works even then.
     
  7. CyberChrist

    CyberChrist You caught my attention

    Joined:
    Dec 6, 2001
    Messages:
    1,424
    Location:
    The Matrix
    Anyway, you have EVENT_4 reduce population by 1 but the event trigger never choose a city - or did you intend this effect to take place in all cities? And also, I could well imagine the game would crash if trying to reduce a size 1 city.
     
  8. Dryhad

    Dryhad Prince

    Joined:
    Feb 23, 2006
    Messages:
    451
    For different reasons! Just because Firaxis uses it a different way to me doesn't mean they use it a different way for any reason relevant to this particular problem. As I said before, they do it for the purposes of translation and the fact that it does work my way shows that it is at least a correct way.

    It's all cities, just like the Healing Herbs event in the core game. I double checked to make sure this event entry is laid out exactly like the relevant event entry in that event.

    I thought that might be the problem, but it still crashes if it triggers after the city grows. If this is the problem, I don't see how to fix it, and Healing Herbs doesn't seem to have any way around it.
     

Share This Page