luckily the magic xml pixie has dropped by and gave me this:
Stick the modified xml files in your mod directory, never overwrite the originals - back them up, write-protect, whatever
Code:
<EventTriggerInfo>
<Type>EVENTTRIGGER_VILYATHAR_FREESTUFF</Type>
<WorldNewsTexts/>
<TriggerTexts>
<TriggerText>
<Text>The mighty Vilyathar has decreed we get free stuff!</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>1</iNumPlotsRequired>
<bOwnPlot>1</bOwnPlot>
<iPlotType>-1</iPlotType>
<FeaturesRequired/>
<TerrainsRequired/>
<ImprovementsRequired>
<ImprovementType>NONE</ImprovementType>
</ImprovementsRequired>
<BonusesRequired/>
<RoutesRequired>
<RouteType>NONE</RouteType>
</RoutesRequired>
<ReligionsRequired/>
<iNumReligions>0</iNumReligions>
<CorporationsRequired/>
<iNumCorporations>0</iNumCorporations>
<bPickReligion>0</bPickReligion>
<bStateReligion>0</bStateReligion>
<bHolyCity>0</bHolyCity>
<bPickCorporation>0</bPickCorporation>
<bHeadquarters>0</bHeadquarters>
<Events>
<Event>EVENT_VILYATHAR_FREESTUFF</Event>
</Events>
<PrereqEvents/>
<bPrereqEventPlot>0</bPrereqEventPlot>
<OrPreReqs/>
<AndPreReqs/>
<ObsoleteTechs/>
<bRecurring>0</bRecurring>
<bTeam>0</bTeam>
<bGlobal>1</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>1</bShowPlot>
<iCityFoodWeight>0</iCityFoodWeight>
<PythonCanDo>canTriggerVilyatharFreestuff</PythonCanDo>
<PythonCanDoCity/>
<PythonCanDoUnit/>
<PythonCallback/>
</EventTriggerInfo>
<EventInfo>
<Type>EVENT_VILYATHAR_FREESTUFF</Type>
<Description>Oooh lovely!</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>BONUS_MARBLE</BonusType>
<iBonusChange>1</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/button_g.dds</Button>
<iAIValue>1000</iAIValue>
</EventInfo>
really simple stuff. On turn 1, <iPercentGamesActive>100 (every game), <iWeight>-1 (automatically), the game will check the capital city tiles for one with <RouteType>NONE (no roads, railroads) and <ImprovementType>NONE (no mines, cottages, etc) and dump a <BonusType>BONUS_MARBLE there
shouldn't need to specify the tile doesn't have a bonus already, the game doesn't dump one on top of another .... it least I'm pretty sure it doesn't
you might not be able to see the resource yet, if that requires a tech you haven't acquired yet
this is a very long winded way of doing it, i bet a clever python coder could do it in a concise few lines ... I'll have a think and see if I can find something to steal. Sorry, write something better
first entry goes in eventtriggerinfos.xml, second in eventinfos.xml. Be careful to attach them at the end, keeping the xml file structure intact ... it has container header/footers marking 'the set of forms in this file' and 'the set of set of forms in this file' which won't take kindly to being ignored, a good xml checker is advisable
hope I'm hitting the sweet spot between making it easy and not insulting your intelligence, but you can clone these.
Important: EVENTTRIGGER_VILYATHAR_FREESTUFF can only work if it has a unique name, ditto EVENT_VILYATHAR_FREESTUFF which it controls. I think at the start of a game there is a list of events that will run, and duplicates are ignored, so if event 1 delivers ... errr salad and event 2 say, tinned anaconda slices, and they are both called eventtrigger_FREESTUFF only the (?) first one will trigger. You need eventtrigger_FREESTUFF_AGAIN as a top-level label to run a separate event. Seems obvious but I've done it. 1-watt-bulb.jpg
If the event is called
event_FREESTUFF
for both events, rather than
event_FREESTUFF and
event_FREESTUFF_A (or whatever)
you'll get two copies of the same event triggering, so pair triggers with the same-named events for clarity and dullness. Caveat: funny titled events make you laugh years later
Oh no! The xml pixie has run off ...